@syncedco/flow 0.3.2 → 0.5.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.
- package/CHANGELOG.md +51 -0
- package/CONTRIBUTING.md +18 -5
- package/README.md +32 -9
- package/bin/synced-flow.mjs +515 -83
- package/components.css +440 -9
- package/dist/index.d.ts +69 -0
- package/dist/index.js +69 -0
- package/docs/accessibility-css.md +14 -3
- package/docs/ai-usage.md +22 -1
- package/docs/api-contract.md +10 -2
- package/docs/audit-2026-06.md +13 -12
- package/docs/cli-reference.md +9 -6
- package/docs/config-reference.md +2 -2
- package/docs/css-optimisation.md +10 -10
- package/docs/native-components.md +121 -0
- package/docs/patterns.md +18 -0
- package/docs/quick-start.md +6 -4
- package/docs/recipes.md +12 -0
- package/docs/release-readiness.md +32 -7
- package/docs/system-primitives.md +9 -2
- package/docs/tokens.md +4 -1
- package/examples/README.md +2 -2
- package/examples/next/app/synced-flow.generated.css +5 -5
- package/examples/plain-html/synced-flow.generated.css +5 -5
- package/examples/templates/README.md +2 -0
- package/examples/templates/app-settings-workflow.html +81 -0
- package/examples/vite/src/synced-flow.generated.css +5 -5
- package/examples/wordpress/assets/css/synced-flow.css +150 -23
- package/package.json +14 -3
- package/skills/synced-flow/SKILL.md +20 -3
- package/src/index.ts +69 -0
- package/src/presets.mjs +5 -5
- package/src/tokens.mjs +10 -8
- package/styles.css +452 -19
- package/tokens.css +12 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,56 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.0 - 2026-09-25
|
|
4
|
+
|
|
5
|
+
- Fix `border`, `border-t`, `border-2` and the other border width utilities
|
|
6
|
+
drawing nothing: they now also set `border-style: solid`.
|
|
7
|
+
- Fix `space-x-*`, `space-y-*`, `divide-x` and `divide-y` doing nothing unless
|
|
8
|
+
core CSS was included. They now generate their own child rules for any
|
|
9
|
+
value, so `space-y-7` works too.
|
|
10
|
+
- Fix `h-screen`, `min-h-screen`, `max-h-screen`, `top-screen`,
|
|
11
|
+
`bottom-screen` and `translate-y-screen` using the viewport width (`100svw`)
|
|
12
|
+
instead of the viewport height (`100svh`). `size-screen` now sets
|
|
13
|
+
`100svw` by `100svh`.
|
|
14
|
+
- Add `dvh`, `dvw`, `lvh` and `lvw` sizing keywords, such as `min-h-dvh`.
|
|
15
|
+
- Add common utilities: `border-dashed`/`dotted`/`double`/`none`,
|
|
16
|
+
`divide-<colour>`, `divide-dashed`, `divide-x-2`, `order-*`,
|
|
17
|
+
`col-start-*`/`col-end-*`/`row-start-*`/`row-end-*`, `justify-items-*`,
|
|
18
|
+
`justify-self-*`, `flex-initial`, `max-w-none`, `max-h-none`,
|
|
19
|
+
`object-<position>`, `bg-cover`/`contain`, `bg-<position>`,
|
|
20
|
+
`bg-no-repeat` and other repeat values, `bg-fixed`, `bg-linear-to-*`,
|
|
21
|
+
`bg-none`, `origin-*`, `font-serif`, `text-ellipsis`, `text-clip`, `blur`,
|
|
22
|
+
`transition-opacity`, `transition-shadow`, `transition-none`,
|
|
23
|
+
`animate-ping`, `animate-bounce` and `animate-none`.
|
|
24
|
+
- Improve `synced-flow lint` hints: suggest Flow's own class first
|
|
25
|
+
(`prose` suggests `sf-prose`), suggest the same utility with a valid value
|
|
26
|
+
(`h-scren` suggests `h-screen`, not `hidden`), and only suggest near typos,
|
|
27
|
+
so hints no longer name a class that does something else.
|
|
28
|
+
|
|
29
|
+
## 0.4.1 - 2026-09-09
|
|
30
|
+
|
|
31
|
+
- Fix source-tree generated-CSS checks when the package is tested from a
|
|
32
|
+
root-only installation, and refresh tracked example outputs against the
|
|
33
|
+
current theme tokens.
|
|
34
|
+
|
|
35
|
+
## 0.4.0 - 2026-09-09
|
|
36
|
+
|
|
37
|
+
- Add native checkbox-backed switches, radio-backed segmented controls,
|
|
38
|
+
grouped inputs, styled file/range inputs, and a reduced-motion-safe spinner.
|
|
39
|
+
- Add app-tier presentation contracts for searchable selects, bulk actions,
|
|
40
|
+
complete pagination, and multi-step forms while keeping JavaScript state in
|
|
41
|
+
consuming apps.
|
|
42
|
+
- Expand CLI catalogue, suggestion routing, patterns, and the
|
|
43
|
+
`app-settings-workflow` recipe across the new public surface.
|
|
44
|
+
- Expand the TypeScript `fluidSystem.components` shortcuts and document the
|
|
45
|
+
existing code-window, token-strip, marquee, command-list, and platform-card
|
|
46
|
+
presentation classes as public.
|
|
47
|
+
- Fix modal Cancel form association and move sortable-table `aria-sort` to the
|
|
48
|
+
column header.
|
|
49
|
+
- Add generated-CSS freshness, semantic React/Next compilation, package dry-run,
|
|
50
|
+
and cross-browser accessibility/interaction release gates.
|
|
51
|
+
- Darken default light-theme action and link tokens to meet normal-text colour
|
|
52
|
+
contrast, including hover states.
|
|
53
|
+
|
|
3
54
|
## 0.3.2 - 2026-06-15
|
|
4
55
|
|
|
5
56
|
- Add an explicit accessible root typography baseline with `html { font-size: 100%; }`.
|
package/CONTRIBUTING.md
CHANGED
|
@@ -9,15 +9,24 @@ documentation.
|
|
|
9
9
|
## Local Setup
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
pnpm install
|
|
13
|
-
pnpm
|
|
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
|
-
|
|
48
|
-
|
|
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,
|
|
26
|
-
|
|
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-
|
|
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` |
|
|
141
|
-
| `tokens.css` |
|
|
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.
|
|
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` |
|
|
146
|
-
| `components.css` |
|
|
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.
|