ranranrunforit commited on
Commit
659b895
·
verified ·
1 Parent(s): 9886ff7

Delete styles.css

Browse files
Files changed (1) hide show
  1. styles.css +0 -174
styles.css DELETED
@@ -1,174 +0,0 @@
1
- # Chan Compass · Spectrum 2 Design System
2
-
3
- A design system for **Chan Compass · US** — a multi-timeframe 缠论 (Chan theory)
4
- stock-signal engine — rendered in **Adobe Spectrum 2**, Adobe's design language.
5
- It exists to give design agents a single, accurate source of truth for building
6
- beautiful, on-brand Chan Compass interfaces (the live Gradio app, mocks, slides,
7
- marketing) without re-deriving Spectrum 2 every time.
8
-
9
- > **Spectrum 2** is Adobe's open design system. This project recreates its
10
- > visual foundations (color, type, spacing, elevation, motion) and a set of
11
- > React components, then applies them to the Chan Compass product surfaces.
12
-
13
- ---
14
-
15
- ## What the product is
16
-
17
- Chan Compass is an **educational US-equities signal tool** that runs entirely
18
- locally. It has six surfaces (Gradio tabs):
19
-
20
- | Surface | What it does |
21
- |---|---|
22
- | **Signals** | Runs the Chan engine over a ticker pool; returns next-session **BUY / SELL / HOLD / WAIT / WATCH** with confidence, suggested weight, stop, and a full multi-timeframe ruling chain (monthly → weekly → daily → 60m → 30m → 15m → 5m nested-interval confirmation). |
23
- | **Sector Rotation** | Where capital is flowing across the 11 SPDR sector ETFs; flow proxy = change % × dollar volume, plus relative strength vs SPY, over 1 / 5 / 20 days. |
24
- | **Watchlist News** | Checks **today's** news per holding; pushes an AI brief only when news exists. |
25
- | **Auto Research** | A local multi-step agent: PLAN → 5 evidence tools → sectioned report, with a saved JSON trace. |
26
- | **Automation** | Daily pipeline at 18:10 America/New_York. |
27
- | **Model** | Loads Qwen3 GGUF weights through llama.cpp — everything runs locally, nothing leaves the machine. |
28
-
29
- The AI is a **local sub-agent pool** (Qwen3-1.7B translator/narrator + a deeper
30
- analyst), served via `llama-cpp-python`. Data comes from Yahoo Finance.
31
-
32
- ## Sources this system was built from
33
-
34
- - **Codebase:** `chan-compass-us-v1.7/` (attached) — a Gradio app (`app.py`)
35
- plus the Chan engine (`chan_engine.py`, `chan_multilevel.py`, `chan_enhance.py`),
36
- signal/rotation/news/research/automation modules. The app already ships an
37
- *approximation* of Spectrum 2 in Gradio CSS; this system replaces it with the
38
- real thing. The product deploys as a **Hugging Face Gradio Space**.
39
- - **Design language — Adobe Spectrum 2 / React Spectrum:**
40
- <https://github.com/adobe/react-spectrum> (the `@react-spectrum/s2` package —
41
- `style/spectrum-theme.ts`, `style/tokens.ts` — was read for exact spacing,
42
- radii, easing, weights and the type scale). Token values were cross-checked
43
- against <https://spectrum.adobe.com/page/color-palette/>.
44
- Explore that repo to go deeper on component behavior and accessibility.
45
-
46
- > **Deploying the live app?** See `gradio/` — a ready-to-paste Spectrum 2 Gradio
47
- > theme (`theme.py` = `THEME` + `CSS`), a guaranteed-green standalone demo Space,
48
- > and an HF deploy checklist (`gradio/INTEGRATE.md`).
49
-
50
- ---
51
-
52
- ## Content fundamentals
53
-
54
- How Chan Compass writes. Match this voice in any UI copy.
55
-
56
- - **Voice:** expert, terse, instrument-panel. Copy reads like a trading desk
57
- tool, not a consumer app. Short noun phrases over sentences: *"Tomorrow's
58
- plan"*, *"Where capital is flowing"*, *"Buy/sell zone"*.
59
- - **Person:** mostly impersonal/imperative. Buttons are verbs — *"Run analysis"*,
60
- *"Check today's news"*, *"Load model"*. When it addresses the user it's second
61
- person and possessive — *"My holdings"*, *"your ticker pool"*.
62
- - **Casing:** **Sentence case** everywhere — labels, buttons, headings
63
- (*"Run analysis"*, not "Run Analysis"). Ticker symbols and ETF codes are
64
- **UPPERCASE monospace** (NVDA, XLK). Signal verbs render UPPERCASE in pills
65
- (BUY/SELL/HOLD).
66
- - **Bilingual register:** the engine's internal ruling chain is **Chinese**
67
- (缠论 terms: 中枢, 背驰, 区间套, 买卖点 B1/B2/B3/S1/S2/S3); user-facing summaries
68
- are **English**, produced by the local translator sub-agent. Keep Chinese for
69
- authentic engine output; keep English for everything the user reads first.
70
- - **Numbers carry meaning, not decoration.** Every percent, confidence score,
71
- weight and stop price is real signal. No vanity stats. Percentages are signed
72
- (+2.43% / −3.08%) and color-coded.
73
- - **Honesty & disclaimers:** always frames itself as *"educational tool — not
74
- investment advice."* States its data limits plainly (*"Yahoo only keeps 7 days
75
- of 1-minute bars, so the 1m level is skipped"*). No hype, no guarantees.
76
- - **AI is labeled.** Anything model-generated is prefixed with the sub-agent and
77
- model — *"🤖 Translator sub-agent (Qwen3-1.7B · llama.cpp)"* — and notes
78
- latency honestly (*"first words in ~5–15s"*).
79
- - **Emoji:** the live app uses tab emoji (📈 🔄 📰 🧪 ⏰ 🧠) and the 🧭 brand mark.
80
- In the **polished design system we prefer Spectrum line icons** for UI chrome
81
- and reserve emoji for the brand mark / casual chips. Don't scatter emoji into
82
- data or buttons.
83
-
84
- ---
85
-
86
- ## Visual foundations
87
-
88
- The Spectrum 2 look, as applied here.
89
-
90
- - **Color vibe:** calm, neutral, **light-first**. A near-white canvas
91
- (`gray-50 #F8F8F8`) with **white cards** (`gray-25`) and crisp hairline borders
92
- (`gray-100 #E6E6E6`). One disciplined accent — **Spectrum blue `#0265DC`** —
93
- carries all primary action and selection. Color is otherwise **semantic only**:
94
- green = positive/BUY, red = negative/SELL, blue = HOLD/accent, orange = WATCH/notice.
95
- No decorative color, no rainbow dashboards.
96
- - **Type:** **Source Sans 3** for UI and headings (open stand-in for the
97
- proprietary Adobe Clean), **Source Serif 4** for editorial/report prose,
98
- **Source Code Pro** for tickers, prices and logs. Modular scale, ratio **1.125**,
99
- **14px UI base**. Headings are **bold (700)** and slightly tightened
100
- (`-0.015em`); body is **regular (400)** at a spacious **1.5** line height.
101
- - **Spacing:** an **8px base rhythm** (2 · 4 · 8 · 12 · 16 · 24 · 32 · 48 · 64).
102
- Generous padding inside cards (24px), comfortable 24–32px gaps between regions.
103
- - **Backgrounds:** **flat, layered surfaces** — no photographic imagery, no
104
- full-bleed art, no repeating textures. Depth comes from Spectrum's
105
- *background layering* (canvas → card → subtle well), not from shadows alone.
106
- The **only gradient** is a small one on the 🧭 brand mark
107
- (blue → indigo → purple), echoing the app's original hero; the rest is solid.
108
- - **Corner radii:** soft but not pill-everything — **16px cards**, **8px inputs
109
- & square buttons**, **4px chips**, and **fully-rounded (pill) action buttons** —
110
- the single most recognizable Spectrum 2 signature here.
111
- - **Elevation:** **soft, low-spread** drop shadows (`raised` = `0 1px 3px
112
- rgba(0,0,0,.06)`), never heavy. Cards sit barely off the canvas. The AI panel
113
- gets a faint **accent-tinted glow** instead of a darker shadow.
114
- - **Borders:** 1px hairlines for structure; inputs use a **2px** border that
115
- turns accent-blue on focus. Tabs sit on a 2px track and the selected tab draws
116
- a 2px accent underline.
117
- - **Hover / press:** Spectrum's **one-stop-darker** rule — hover bumps a button
118
- one color stop darker (`accent → accent-hover`), press goes one more and adds a
119
- **subtle `scale(.98)`**. Quiet/ghost controls fill with `gray-75` on hover.
120
- Rows highlight to `gray-75` on hover, `blue-100` when selected.
121
- - **Focus:** a **2px solid accent ring with 2px offset** on every interactive
122
- element — visible, never removed.
123
- - **Motion:** quick and restrained. Durations **130–220ms**; the house easing is
124
- Spectrum's `cubic-bezier(0.45, 0, 0.4, 1)` (with `ease-out` for entrances).
125
- Fades and one-stop color shifts; **no bounces**, one tasteful pulse for live
126
- status and the running pipeline step. Respect `prefers-reduced-motion`.
127
- - **Transparency / blur:** used sparingly — not a glassmorphism system. Surfaces
128
- are opaque; selection tints use solid subtle fills (`blue-100`), not alpha.
129
- - **Cards:** white surface, 16px radius, 1px hairline border, soft raised shadow,
130
- optional header with title + subtitle + a trailing action slot.
131
-
132
- ---
133
-
134
- ## Index — what's in this project
135
-
136
- **Foundations (root)**
137
- - `styles.css` — the single entry point consumers link (`@import`s only).
138
- - `tokens/` — `colors.css` · `typography.css` · `spacing.css` · `elevation.css`
139
- · `fonts.css` · `base.css`. Primitives + semantic aliases.
140
- - `guidelines/` — foundation specimen cards (Colors, Type, Spacing) shown in the
141
- Design System tab.
142
-
143
- **Components** (`components/<group>/` — React primitives, bundled to `window.<Namespace>`)
144
- - `actions/` — **Button** (pill, accent/secondary/negative/quiet)
145
- - `forms/` — **Field**, **Checkbox**, **Switch**
146
- - `status/` — **Badge**, **StatusLight**, **SignalBadge** (BUY/SELL/HOLD/WAIT/WATCH)
147
- - `containers/` — **Card**, **InlineAlert** (incl. the signature `ai` panel)
148
- - `navigation/` — **Tabs** (quiet tabs + accent underline)
149
-
150
- **UI kit** (`ui_kits/chan-compass/`)
151
- - `index.html` — full interactive Spectrum 2 recreation of the 6-tab app
152
- (Signals, Rotation, Research, News, Model). Composes the components above.
153
-
154
- **Deploy bridge** (`gradio/`)
155
- - `theme.py` (`THEME` + `CSS`), standalone demo `app.py`, `requirements.txt`,
156
- `README.md` (HF Space), `INTEGRATE.md` (port + deploy checklist).
157
-
158
- **Meta**
159
- - `SKILL.md` — makes this folder usable as an Agent Skill.
160
-
161
- ---
162
-
163
- ## Iconography
164
-
165
- See the **Iconography** section below and the `assets/` README. In short: Chan
166
- Compass has **no custom icon set** of its own — the live app leans on **emoji**
167
- for tab affordances and the **🧭 compass** as its brand mark. Spectrum's own
168
- **workflow-icons** are the canonical reference but aren't freely CDN-hosted, so
169
- this system substitutes **[Lucide](https://lucide.dev)** — clean 2px line icons
170
- whose weight and rounded joinery read as Spectrum-adjacent — loaded from CDN in
171
- the UI kit. **Substitution flagged.** If you license Adobe's Spectrum workflow
172
- icons, swap Lucide for them and the visual language tightens further.
173
-
174
- *Educational tool — not investment advice.*