@njeybe/nativ 2.0.2 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,78 +1,184 @@
1
- # UI/UX Specifications & Layout Design
2
-
3
- ## 1. System Identity & Visual Design Style
4
- - **System Domain Archetype:** Developer Mission Control / Analytical Workbench / Workflow Pipeline / Creative Canvas
5
- - **Design Style Archetype:** Modern Minimalist / Neo-Brutalism / Glassmorphism / Bento Grid / Neumorphism / Claymorphism / Skeuomorphism / Spatial UI
6
- - **Zero-Emoji Mandate:** Strictly enforced. All visual iconography must be precision vector SVGs aligned to the stroke and geometry of the chosen style. Never use Unicode emojis.
7
-
8
- ---
9
-
10
- ## 2. Design Tokens & CSS Variables
11
- Define explicit CSS variables for the chosen style to avoid ad-hoc hardcoded values:
12
-
13
- ```css
14
- :root {
15
- /* Surface & Canvas */
16
- --bg-canvas: #f8fafc;
17
- --surface: #ffffff;
18
- --surface-hover: #f1f5f9;
19
- --border-subtle: #e2e8f0;
20
- --border-hover: #cbd5e1;
21
-
22
- /* Typography & Contrast */
23
- --text-primary: #0f172a;
24
- --text-secondary: #64748b;
25
- --text-muted: #94a3b8;
26
-
27
- /* Brand & Accents */
28
- --brand: #4f46e5;
29
- --brand-hover: #4338ca;
30
- --brand-surface: #eef2ff;
31
-
32
- /* Status Colors */
33
- --status-success: #059669;
34
- --status-success-bg: #ecfdf5;
35
- --status-warning: #d97706;
36
- --status-warning-bg: #fffbeb;
37
- --status-danger: #e11d48;
38
- --status-danger-bg: #fff1f2;
39
- --status-info: #0284c7;
40
- --status-info-bg: #f0f9ff;
41
-
42
- /* Elevation & Geometry (Adjust by Design Style) */
43
- --radius-sm: 6px;
44
- --radius-md: 10px;
45
- --radius-lg: 16px;
46
- --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
47
- --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08);
48
- }
49
- ```
50
-
51
- ---
52
-
53
- ## 3. Layout Structure & Navigation Hierarchy
54
- - **Navigation Modality:** Vertical Pinned Sidebar (240px) or Top App Bar depending on application density.
55
- - **Content Area:** Fluid layout, max-width bounded, responsive grid/flex partitions.
56
- - **Docked Telemetry Drawer:** Collapsible bottom drawer for live logs, streaming output, or contextual diff inspections.
57
-
58
- ---
59
-
60
- ## 4. The 5 UI States Matrix
61
- Every component and view must implement all five states:
62
-
63
- | State | Visual & Interactive Requirement |
64
- | :--- | :--- |
65
- | **Default / Populated** | Crisp typography, tabular alignment for metrics, subtle hover feedback. |
66
- | **Empty State** | Meaningful vector SVG illustration, clear explanatory text, primary CTA button. |
67
- | **Loading / Skeleton** | Shimmer pulse cards matching the exact dimensions of loaded content (zero CLS). |
68
- | **Error / Degraded** | Actionable error alert card with an inline "Retry" action and non-cryptic diagnosis. |
69
- | **Overflow / Truncated** | Ellipsis truncation with full-value tooltips; pagination or virtual scrolling for >20 items. |
70
-
71
- ---
72
-
73
- ## 5. Interaction Ergonomics & Accessibility
74
- - **Micro-Transitions:** `transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);`.
75
- - **Active Click State:** `transform: scale(0.98)` (or brutalist `translate(2px, 2px)`).
76
- - **Focus Rings:** `:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }`.
77
- - **Dialogs & Drawers:** Dismissible via `Escape` key and backdrop click; background scroll locking.
78
- - **Accessible Labels:** `aria-label` required on all icon-only buttons.
1
+ # UI/UX Specifications
2
+
3
+ Plain language, concise. The Architect fills this in; workers follow it. Tasks point at a component with a specRef such as `ui_specs.md#appointment-list`.
4
+
5
+ ---
6
+
7
+ ## Planning Level
8
+ Pick one and write it here: **Level: Quick | Standard | Full**
9
+
10
+ - **Quick:** small fix, fast-path task, no design phase.
11
+ - **Standard:** new screen in an existing design. Flow + wireframe + component map. Reuse existing tokens.
12
+ - **Full:** new app, new platform or redesign. Discovery questions, brief, flows, two directions with style tiles, wireframes, component map.
13
+
14
+ ---
15
+
16
+ ## Design Brief
17
+ - **Who uses it:**
18
+ - **The job they are doing:**
19
+ - **Tone (three words):**
20
+ - **Things to avoid:**
21
+
22
+ ---
23
+
24
+ ## Users & Top Tasks
25
+ Top 3-5 user tasks and how often each happens.
26
+
27
+ | Task | Frequency |
28
+ | :--- | :--- |
29
+ | | |
30
+
31
+ ---
32
+
33
+ ## Real Content Samples
34
+ Real sample data per screen, drawn from `db_schema.json` and `api_contracts.json`. Include extremes: long names, empty values, big numbers. Never "Item 1" or lorem ipsum.
35
+
36
+ ---
37
+
38
+ ## User Flows
39
+ Each key journey step by step, with tap/click counts.
40
+
41
+ 1. Journey name (N taps)
42
+ 1. Step
43
+ 2. Step
44
+
45
+ ---
46
+
47
+ ## Design Directions
48
+ Exactly two directions.
49
+
50
+ - **Direction A:**
51
+ - **Direction B:**
52
+ - **Chosen and why:**
53
+ - **Full level only:** style tile at `.ai/design/style-tile.html`
54
+
55
+ ---
56
+
57
+ ## Design Tokens
58
+ Placeholders the Architect fills, each with a one-line rationale. Do not copy a default palette.
59
+
60
+ ```css
61
+ :root {
62
+ /* Surface & canvas */
63
+ --bg-canvas: <value>; /* why */
64
+ --surface: <value>; /* why */
65
+ --surface-hover: <value>; /* why */
66
+ --border-subtle: <value>; /* why */
67
+ --border-hover: <value>; /* why */
68
+
69
+ /* Typography & contrast */
70
+ --text-primary: <value>; /* why */
71
+ --text-secondary: <value>; /* why */
72
+ --text-muted: <value>; /* why */
73
+
74
+ /* Brand & accents */
75
+ --brand: <value>; /* why */
76
+ --brand-hover: <value>; /* why */
77
+ --brand-surface: <value>; /* why */
78
+
79
+ /* Status */
80
+ --status-success: <value>; --status-success-bg: <value>;
81
+ --status-warning: <value>; --status-warning-bg: <value>;
82
+ --status-danger: <value>; --status-danger-bg: <value>;
83
+ --status-info: <value>; --status-info-bg: <value>;
84
+
85
+ /* Geometry & elevation */
86
+ --radius-sm: <value>; --radius-md: <value>; --radius-lg: <value>;
87
+ --shadow-sm: <value>; --shadow-md: <value>;
88
+ }
89
+ ```
90
+
91
+ **Flutter mapping:** each token maps to a `ThemeData` field (`colorScheme`, `textTheme`) or a `ThemeExtension` (status colors, radii, shadows). List the mapping here.
92
+
93
+ | Token | Flutter target |
94
+ | :--- | :--- |
95
+ | `--brand` | `colorScheme.primary` |
96
+ | `--status-*` | `ThemeExtension` |
97
+
98
+ ---
99
+
100
+ ## Platform Rules
101
+ - **Primary platform (designed first):**
102
+ - **Web:** sidebar or top bar, density, keyboard support, hover states, targets at least 32px, behavior on wide screens.
103
+ - **Mobile:** bottom nav and sheets, back gesture, one main action per screen, thumb reach, targets at least 48dp, offline / slow / permission-denied states, safe areas and keyboard.
104
+ - **Mobile design language (choose explicitly):** Material 3 | Cupertino | custom.
105
+
106
+ ---
107
+
108
+ ## Wireframes
109
+ ASCII box-drawing, max 80 columns. Label each region `<ComponentName>`. One desktop wireframe per key screen, plus mobile for the primary screen. Use real content. No HTML mockups.
110
+
111
+ ```
112
+ +--------------------------------------------------+
113
+ | <AppHeader> Clinic Dela Cruz [Sign out] |
114
+ +----------+---------------------------------------+
115
+ | <SideNav>| <AppointmentList> |
116
+ | Today | 09:00 Maria Concepcion-Villanueva |
117
+ | Patients | 09:30 (no name given) |
118
+ +----------+---------------------------------------+
119
+ ```
120
+
121
+ ---
122
+
123
+ ## Component Map
124
+
125
+ | Region | Component | File path | States | Section |
126
+ | :--- | :--- | :--- | :--- | :--- |
127
+ | | | | | [appointment-list](#appointment-list) |
128
+
129
+ ### appointment-list
130
+ Example component section. One per component: purpose, data, states, behavior. Keep the heading anchor stable.
131
+
132
+ ---
133
+
134
+ ## Copy & Wording
135
+ - **UI language(s):** e.g. English / Filipino
136
+ - **Key labels:**
137
+ - **Button verbs (domain words):**
138
+ - **Empty-state text:**
139
+ - **Error messages (plain language):**
140
+
141
+ ---
142
+
143
+ ## Signature Moments
144
+ One or two. Everything else stays restrained.
145
+
146
+ ---
147
+
148
+ ## Anti-Generic Checklist
149
+ **Web**
150
+ - [ ] No default Inter or system-only type without a reason.
151
+ - [ ] No default indigo/purple accent.
152
+ - [ ] No rows of identical cards with pastel icon boxes.
153
+ - [ ] No gradient-text hero.
154
+ - [ ] No decorative blobs.
155
+ - [ ] No greeting banners.
156
+ - [ ] No emojis. Icons are vector SVG.
157
+
158
+ **Mobile**
159
+ - [ ] No default Material seed blue.
160
+ - [ ] No unthemed default widgets without a reason.
161
+ - [ ] No emojis.
162
+
163
+ ---
164
+
165
+ ## States
166
+ Every component and view covers these.
167
+
168
+ | State | Requirement |
169
+ | :--- | :--- |
170
+ | **Loading** | Skeleton matching loaded dimensions. |
171
+ | **Empty** | Short explanation and a primary action. |
172
+ | **Error** | Plain diagnosis with a Retry action. |
173
+ | **Success** | Clear confirmation. |
174
+ | **Disabled** | Visibly inactive, with a reason where useful. |
175
+ | **Mobile only** | Offline, slow connection, permission denied. |
176
+
177
+ ---
178
+
179
+ ## Accessibility
180
+ - **Transitions:** `transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);`
181
+ - **Active state:** `transform: scale(0.98)`.
182
+ - **Focus rings:** `:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }`
183
+ - **Dialogs and drawers:** close with `Escape` and backdrop click; lock background scroll.
184
+ - **Labels:** `aria-label` on every icon-only button.