@syncedco/flow 0.3.1 → 0.4.1

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,38 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.1 - 2026-09-09
4
+
5
+ - Fix source-tree generated-CSS checks when the package is tested from a
6
+ root-only installation, and refresh tracked example outputs against the
7
+ current theme tokens.
8
+
9
+ ## 0.4.0 - 2026-09-09
10
+
11
+ - Add native checkbox-backed switches, radio-backed segmented controls,
12
+ grouped inputs, styled file/range inputs, and a reduced-motion-safe spinner.
13
+ - Add app-tier presentation contracts for searchable selects, bulk actions,
14
+ complete pagination, and multi-step forms while keeping JavaScript state in
15
+ consuming apps.
16
+ - Expand CLI catalogue, suggestion routing, patterns, and the
17
+ `app-settings-workflow` recipe across the new public surface.
18
+ - Expand the TypeScript `fluidSystem.components` shortcuts and document the
19
+ existing code-window, token-strip, marquee, command-list, and platform-card
20
+ presentation classes as public.
21
+ - Fix modal Cancel form association and move sortable-table `aria-sort` to the
22
+ column header.
23
+ - Add generated-CSS freshness, semantic React/Next compilation, package dry-run,
24
+ and cross-browser accessibility/interaction release gates.
25
+ - Darken default light-theme action and link tokens to meet normal-text colour
26
+ contrast, including hover states.
27
+
28
+ ## 0.3.2 - 2026-06-15
29
+
30
+ - Add an explicit accessible root typography baseline with `html { font-size: 100%; }`.
31
+ - Add `--sf-text-base` and generated `--text-base` aliases for fluid body text.
32
+ - Use the new fluid body text token in shipped and generated base CSS.
33
+ - Convert CLI-generated utility lengths for blur, rings, outlines, and thicker borders from static `px` to `rem`.
34
+ - Extend guardrails and tests so shipped generated examples reject raw pixels outside allowed hairline, visually-hidden, and forced-colors exceptions.
35
+
3
36
  ## 0.3.1 - 2026-06-13
4
37
 
5
38
  - Fix mobile app drawer scrolling by giving the drawer sidebar a viewport block size.
package/CONTRIBUTING.md CHANGED
@@ -9,15 +9,24 @@ documentation.
9
9
  ## Local Setup
10
10
 
11
11
  ```bash
12
- pnpm install
13
- pnpm test
12
+ pnpm install --ignore-scripts
13
+ pnpm build:types
14
+ pnpm check:generated
15
+ pnpm exec playwright install chromium
14
16
  ```
15
17
 
18
+ Lifecycle scripts rebuild tracked CSS, so install with `--ignore-scripts` when
19
+ reviewing a checkout. `check:generated` verifies package CSS and the tracked
20
+ plain HTML, Vite, Next, Astro, and WordPress outputs before a build can refresh
21
+ them.
22
+
16
23
  Useful commands:
17
24
 
18
25
  ```bash
19
- pnpm build
20
26
  pnpm check
27
+ pnpm test
28
+ pnpm test:browser
29
+ pnpm test:browser:all
21
30
  pnpm pack --dry-run
22
31
  ```
23
32
 
@@ -39,13 +48,17 @@ pnpm pack --dry-run
39
48
  Run:
40
49
 
41
50
  ```bash
51
+ pnpm check:generated
42
52
  pnpm check
43
53
  pnpm test
54
+ pnpm test:browser
44
55
  pnpm pack --dry-run
45
56
  ```
46
57
 
47
- For documentation-only changes, `pnpm check` is usually enough unless package
48
- metadata or generated files changed.
58
+ Install all release browsers with
59
+ `pnpm exec playwright install chromium firefox webkit` before running
60
+ `pnpm test:browser:all`. Pull requests and `main` run Chromium in CI; version
61
+ tags must pass Chromium, Firefox, and WebKit before npm publishing can start.
49
62
 
50
63
  ## Commercial Work
51
64
 
package/README.md CHANGED
@@ -22,12 +22,12 @@ brand drift, or generated class chaos.
22
22
  project usage
23
23
  - layout primitives: container, section, stack, cluster, grid, sidebar,
24
24
  switcher, frame, cover, hero, and flow
25
- - component primitives: buttons, cards, surfaces, navigation, forms, alerts,
26
- badges, avatars, charts, and section headers
25
+ - component primitives: buttons and loading states, cards, navigation, complete
26
+ forms, switches, segmented choices, app data controls, charts, and feedback
27
27
  - website patterns: logo clouds, feature blocks, stats, testimonials, pricing,
28
28
  FAQ, CTA, and footer helpers
29
29
  - native component styling: dialog, popover, drawer, tooltip, disclosure, tabs,
30
- breadcrumbs, pagination, scroll snap, and sticky patterns
30
+ breadcrumbs, complete pagination, file/range inputs, scroll snap, and sticky patterns
31
31
  - AI-friendly CLI discovery: `catalog --json`, `suggest`, `lint`, `watch`, and
32
32
  `theme init --from` for turning a site brief into reusable theme tokens
33
33
  - project-level AI agent setup: `agents install`, `agents status`, and `skill`
@@ -133,17 +133,17 @@ breakpoint-heavy patterns: fluid `clamp()` scales, CSS custom properties,
133
133
  logical sizing and spacing, cascade layers, OKLCH colour tokens,
134
134
  container-aware layout primitives, and `prefers-reduced-motion` handling.
135
135
 
136
- Current built CSS sizes from `pnpm build` on 2026-05-28:
136
+ Current built CSS sizes from `pnpm build` on 2026-09-09:
137
137
 
138
138
  | File | Raw | Gzip | Purpose |
139
139
  | --- | ---: | ---: | --- |
140
- | `styles.css` | 59.1 KB | 10.5 KB | Full core stylesheet for simple setup. |
141
- | `tokens.css` | 9.5 KB | 2.2 KB | Design tokens only. |
140
+ | `styles.css` | 98.0 KB | 15.7 KB | Full core stylesheet for simple setup. |
141
+ | `tokens.css` | 12.0 KB | 2.5 KB | Design tokens only. |
142
142
  | `reset.css` | 0.7 KB | 0.4 KB | Reset layer only. |
143
- | `base.css` | 3.4 KB | 1.2 KB | Base element styles. |
143
+ | `base.css` | 3.5 KB | 1.1 KB | Base element styles. |
144
144
  | `defaults.css` | 0.5 KB | 0.3 KB | Optional site/UI defaults for links, lists, and native controls. |
145
- | `layout.css` | 7.5 KB | 1.9 KB | Fluid layout, app shell, scroll, sticky, media, and split primitives. |
146
- | `components.css` | 31.3 KB | 5.0 KB | Button, icon, avatar, chart, card, surface, nav, form, alert, native component, website pattern, accessibility state, and input primitives. |
145
+ | `layout.css` | 12.2 KB | 2.8 KB | Fluid layout, app shell, scroll, sticky, media, and split primitives. |
146
+ | `components.css` | 62.9 KB | 9.3 KB | Button, form, native control, app data, overlay, website, accessibility, and presentation primitives. |
147
147
  | `utilities.css` | 7.5 KB | 1.9 KB | Static `sf-*` content, positioning, motion, and helper utilities. |
148
148
 
149
149
  CSS is not automatically tree-shaken like JavaScript in every environment. The
@@ -235,6 +235,15 @@ import '@syncedco/flow/styles.css'
235
235
  import './synced-flow.generated.css'
236
236
  ```
237
237
 
238
+ JavaScript and TypeScript consumers can use the dependency-free `cx()` helper
239
+ and typed class shortcuts without importing CSS through JavaScript:
240
+
241
+ ```ts
242
+ import { cx, fluidSystem } from '@syncedco/flow'
243
+
244
+ const settingClass = cx(fluidSystem.components.switch, 'project-setting')
245
+ ```
246
+
238
247
  Add package scripts:
239
248
 
240
249
  ```json
@@ -262,7 +271,11 @@ pnpm exec synced-flow tokens
262
271
  pnpm exec synced-flow tokens --json
263
272
  pnpm exec synced-flow catalog --json
264
273
  pnpm exec synced-flow suggest "full page scroll portfolio"
274
+ pnpm exec synced-flow suggest "searchable select and multi-step settings" --json
275
+ pnpm exec synced-flow pattern switch-control --markup
276
+ pnpm exec synced-flow pattern searchable-select --markup
265
277
  pnpm exec synced-flow recipe portfolio-scroll --markup
278
+ pnpm exec synced-flow recipe app-settings-workflow --markup
266
279
  pnpm exec synced-flow recipe portfolio-scroll --framework next --markup
267
280
  pnpm exec synced-flow theme init --from brief.md
268
281
  pnpm exec synced-flow theme init --from brief.md --preset-base neutral-saas
@@ -330,7 +343,17 @@ an existing codebase that still contains compatibility classes such as `sm:` or
330
343
  ## Scripts
331
344
 
332
345
  ```bash
346
+ pnpm check:generated
333
347
  pnpm build
334
348
  pnpm check
349
+ pnpm test
350
+ pnpm test:browser
351
+ pnpm test:browser:all
352
+ pnpm pack --dry-run
335
353
  pnpm type-check
336
354
  ```
355
+
356
+ Run `pnpm check:generated` before a build or package lifecycle script when
357
+ reviewing tracked CSS freshness. `test:browser` uses Chromium for the normal
358
+ development gate; `test:browser:all` adds Firefox and WebKit for release
359
+ readiness.
package/base.css CHANGED
@@ -4,6 +4,7 @@
4
4
  html {
5
5
  background: var(--sf-colour-background);
6
6
  color: var(--sf-colour-foreground);
7
+ font-size: 100%;
7
8
  scroll-behavior: smooth;
8
9
  }
9
10
 
@@ -11,7 +12,7 @@
11
12
  background: var(--sf-colour-background);
12
13
  color: var(--sf-colour-foreground);
13
14
  font-family: var(--sf-font-sans);
14
- font-size: var(--sf-type-body);
15
+ font-size: var(--sf-text-base);
15
16
  line-height: var(--sf-line-height-body);
16
17
  -webkit-font-smoothing: antialiased;
17
18
  text-rendering: optimizeLegibility;