@reqvire-org/ads 0.3.18 → 0.3.20

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.
Files changed (78) hide show
  1. package/dist/behaviors.mjs +5 -5
  2. package/dist/bootstrap-ds/ADS.md +2 -2
  3. package/dist/bootstrap-ds/README.md +1 -1
  4. package/dist/bootstrap-ds/design-system/index.ts +0 -1
  5. package/dist/bootstrap-ds/design-system/review/index.ts +1 -0
  6. package/dist/bootstrap-ds/design-system/tokens/Foundation.scenario.tsx +1 -1
  7. package/dist/bootstrap-ds/ds.config.json +1 -1
  8. package/dist/bootstrap-ds/tsconfig.json +18 -3
  9. package/dist/bootstrap-ds/vite.config.ts +1 -1
  10. package/dist/boundaries.mjs +4 -2
  11. package/dist/check.mjs +20 -13
  12. package/dist/config.mjs +13 -2
  13. package/dist/init.mjs +17 -14
  14. package/dist/layers.mjs +288 -0
  15. package/dist/lint-config.mjs +1 -1
  16. package/dist/mcp/context.mjs +2 -1
  17. package/dist/mcp/edit-preparation.mjs +3 -3
  18. package/dist/mcp/mutations.mjs +1 -1
  19. package/dist/mcp/prompts.mjs +1 -1
  20. package/dist/mcp/server.mjs +6 -2
  21. package/dist/mcp/widget.bundle.js +1 -1
  22. package/dist/oxlint.mjs +3 -1
  23. package/dist/preview-resources.mjs +11 -1
  24. package/dist/public-api.mjs +13 -6
  25. package/dist/scenario-trace.mjs +6 -6
  26. package/dist/scenarios-vite.mjs +2 -1
  27. package/dist/scenarios.mjs +10 -7
  28. package/dist/showcase/client.bundle.js +1 -1
  29. package/dist/showcase/sandbox.bundle.js +1 -1
  30. package/dist/skills/ads-break-ui/SKILL.md +21 -6
  31. package/dist/skills/ads-break-ui/references/guarded-editing.md +1 -1
  32. package/dist/skills/ads-break-ui/references/layers.md +123 -0
  33. package/dist/skills/ads-break-ui/references/review.md +96 -0
  34. package/dist/skills/ads-break-ui/references/scenarios.md +24 -3
  35. package/dist/skills/ads-designer/SKILL.md +22 -7
  36. package/dist/skills/ads-designer/assets/bootstrap-ds/ADS.md +2 -2
  37. package/dist/skills/ads-designer/assets/bootstrap-ds/README.md +1 -1
  38. package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/index.ts +0 -1
  39. package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/review/index.ts +1 -0
  40. package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/tokens/Foundation.scenario.tsx +1 -1
  41. package/dist/skills/ads-designer/assets/bootstrap-ds/ds.config.json +1 -1
  42. package/dist/skills/ads-designer/assets/bootstrap-ds/tsconfig.json +18 -3
  43. package/dist/skills/ads-designer/assets/bootstrap-ds/vite.config.ts +1 -1
  44. package/dist/skills/ads-designer/references/guarded-editing.md +1 -1
  45. package/dist/skills/ads-designer/references/layers.md +123 -0
  46. package/dist/skills/ads-designer/references/review.md +96 -0
  47. package/dist/skills/ads-designer/references/scenarios.md +24 -3
  48. package/dist/skills/ads-import/SKILL.md +21 -6
  49. package/dist/skills/ads-import/references/guarded-editing.md +1 -1
  50. package/dist/skills/ads-import/references/layers.md +123 -0
  51. package/dist/skills/ads-import/references/review.md +96 -0
  52. package/dist/skills/ads-import/references/scenarios.md +24 -3
  53. package/dist/skills/ads-migrate/SKILL.md +21 -6
  54. package/dist/skills/ads-migrate/references/guarded-editing.md +1 -1
  55. package/dist/skills/ads-migrate/references/layers.md +123 -0
  56. package/dist/skills/ads-migrate/references/review.md +96 -0
  57. package/dist/skills/ads-migrate/references/scenarios.md +24 -3
  58. package/dist/skills/ads-motion/SKILL.md +22 -7
  59. package/dist/skills/ads-motion/references/audit.md +1 -1
  60. package/dist/skills/ads-motion/references/guarded-editing.md +1 -1
  61. package/dist/skills/ads-motion/references/layers.md +123 -0
  62. package/dist/skills/ads-motion/references/motion-review.md +35 -0
  63. package/dist/skills/ads-motion/references/review.md +96 -35
  64. package/dist/skills/ads-motion/references/scenarios.md +24 -3
  65. package/dist/units.mjs +17 -14
  66. package/docs/ADS.md +32 -5
  67. package/docs/ARCHITECTURE.md +37 -4
  68. package/docs/BEHAVIORS.md +7 -0
  69. package/docs/CHANGELOG.md +23 -0
  70. package/docs/GUIDE.md +3 -2
  71. package/docs/MCP.md +27 -6
  72. package/package.json +1 -1
  73. package/dist/bootstrap-ds/design-system/patterns/token-preview/Scenario.tsx +0 -4
  74. package/dist/bootstrap-ds/design-system/patterns/token-preview/fixture.ts +0 -8
  75. package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/patterns/token-preview/Scenario.tsx +0 -4
  76. package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/patterns/token-preview/fixture.ts +0 -8
  77. /package/dist/bootstrap-ds/design-system/{patterns → review}/token-preview/TokenPreview.tsx +0 -0
  78. /package/dist/skills/ads-designer/assets/bootstrap-ds/design-system/{patterns → review}/token-preview/TokenPreview.tsx +0 -0
package/docs/BEHAVIORS.md CHANGED
@@ -366,3 +366,10 @@ Keep ESM modules and explicit imports. Avoid an eagerly imported controller
366
366
  registry. Tree shaking and shared chunks follow the project bundler: class methods,
367
367
  side effects, global CSS and dynamic maps can retain extra code. Inspect emitted
368
368
  resources instead of assuming a controller produces a minimal bundle.
369
+
370
+ Development-only `review/<Owner>` units may register the same guarantee/check
371
+ contracts for review presentation and controls. Subjects can name that owner's
372
+ separate review API or local headless helpers; checks still run registered project
373
+ profiles and can refer to an existing real scenario. This grants no production
374
+ API, catalogue entry, `covers` credit or runtime import permission. See the
375
+ [portable review guide](../skills/ads-designer/references/review.md).
package/docs/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Changelog
2
2
 
3
+ ## Unreleased
4
+
5
+ ## 0.3.20
6
+
7
+ - Preserve the motion-review checklist separately from the development review-layer
8
+ guide; both remain self-contained in the motion skill. Version 0.3.19 was tagged
9
+ but publication was cancelled before this correction.
10
+
11
+ - Separate project-owned review UI from production patterns. Add `review/` owners,
12
+ a configurable development entry and derived `/review` alias, guarded companion
13
+ exports and review contracts. Preserve real component/token render evidence,
14
+ block production imports and verify review assets stay out of product bundles.
15
+ Move the working showcase and empty starter helpers to the new layer; publish
16
+ self-contained migration guidance in all skills and `ads://guides/review`.
17
+ - Enable native form validation and submit events across the showcase, diagnostic
18
+ explorer and legacy App iframe layers. Retain opaque App origins and block
19
+ native action requests through CSP. Cover click/Enter submission, custom/native
20
+ validation and no-network behavior in generic React, Preact and HTML Apps.
21
+ - Enforce runtime component dependency direction and public component contracts
22
+ for patterns through aliases, re-exports and helpers. Reject proven private
23
+ style-hook/variable access while preserving ancestor-context layout and documented
24
+ customization. Publish portable layer guidance in every skill and through MCP.
25
+
3
26
  ## 0.3.18
4
27
 
5
28
  - Preserve complete typed `@property` registrations through atomic css/styled
package/docs/GUIDE.md CHANGED
@@ -495,10 +495,10 @@ export default function Scenario() { return <Button>{fixture.label}</Button>; }
495
495
  IDs derive from filenames; do not maintain another registry or hand-assigned IDs.
496
496
  Token scenarios live beside foundation CSS under the configured token directory.
497
497
  The starter includes `tokens/Foundation.scenario.tsx` and its local fixture for
498
- a project-owned token review pattern. Keep its presentation in that pattern:
498
+ a project-owned token review renderer. Keep its presentation in that pattern:
499
499
 
500
500
  ```tsx
501
- import { TokenSamples } from "@ds";
501
+ import { TokenSamples } from "@ds/review";
502
502
  import { fixture } from "./Typography.fixture";
503
503
  export const scenario = { title: fixture.title, covers: ["TokenSamples"], samples: fixture.samples };
504
504
  export default function Scenario() { return <TokenSamples {...fixture} />; }
@@ -723,6 +723,7 @@ inspection errors fail the check. These guards read files and never delete them.
723
723
  "dsDir": "design-system",
724
724
  "publicAlias": "@ds",
725
725
  "publicEntry": "index.ts",
726
+ "reviewEntry": "review/index.ts",
726
727
  "stylesEntry": "styles.css",
727
728
  "tokenDir": "tokens",
728
729
  "inlineStyleFiles": [],
package/docs/MCP.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # ADS over MCP
2
2
 
3
+ For component/pattern classification and dependency/style boundary diagnostics,
4
+ read `ads://guides/layers`. A component supplies one cohesive UI capability; a
5
+ pattern arranges capabilities into reusable structures/workflows. Guards enforce
6
+ resolved ownership boundaries, not component counts. Scenarios may compose public
7
+ UI to demonstrate their subject; application adapters own store access and routing.
8
+
3
9
  `ads mcp [directory]` serves a project's local design system over stdio. It uses
4
10
  the same `ds.config.json`, token inspection and core checks as the CLI. It reads
5
11
  source and build artifacts. Optionally it manages one configured project
@@ -54,15 +60,21 @@ managed project compiler on demand and after relevant source changes.
54
60
  Switching entries overlays a centered loading spinner, then reveals the new
55
61
  scenario inside the existing App. Loading and diagnostic overlays do not move the
56
62
  preview. Token presentation comes from project-owned scenarios, fixtures and
57
- public review patterns, using the project's real foundation CSS and extracted
63
+ development-only review helpers, using the project's real foundation CSS and extracted
58
64
  styles. The App runtime contains no token sample templates or named token ordering.
59
65
  The generic definition inspector remains available without a scenario build.
60
66
 
61
67
  There are no required browser-page files in the project. Colocated scenarios and
62
- fixtures, optional public review-layout patterns, and the project's compiler
68
+ fixtures, optional development-only review helpers, and the project's compiler
63
69
  entry supply the presentation. Use the existing runtime URL when MCP is connected
64
70
  instead of starting a second compiler for that project.
65
71
 
72
+ Development review UI lives in `review/`, behind a separate development entry;
73
+ production patterns remain application UI. Discover `ads_status.project.review`
74
+ and read `ads://guides/review` for imports, guarded owners and migration. Review
75
+ exports are not product catalogue entries. They can frame real scenarios and
76
+ render token samples without entering the deployed application's graph.
77
+
66
78
  ## Connect Codex or Claude
67
79
 
68
80
  Use the published package through `npx`. No ADS checkout or global installation
@@ -397,6 +409,7 @@ The same discovery covers the rest of the project ADS:
397
409
 
398
410
  | Unit | Scope |
399
411
  |------|-------|
412
+ | `review/<Owner>` | Development-only frames, token renderers, demo controls, local checks and review-entry re-exports |
400
413
  | `foundation` | Shared ADS entry styles and root helpers |
401
414
  | `documentation` | ADS/project guides, shared credits and license notices, and `licenses/` text collections |
402
415
  | `assets/brand`, `assets/fonts`, other `assets/*` groups | Original SVG, image, font and other asset files |
@@ -509,8 +522,8 @@ Install changed dependencies before verification; candidates use the project's
509
522
  installed `node_modules`.
510
523
 
511
524
  Resolve ownership diagnostics by preserving the required capability in its proper
512
- layer. Demo-only sizing, borders and framing belong in a public review/layout
513
- pattern; a component API addition needs a runtime use case. Measured imperative
525
+ layer. Demo-only sizing, borders and framing belong in a development-only review
526
+ helper; a component API addition needs a runtime use case. Measured imperative
514
527
  geometry uses exact `styleWrites` properties. After migrating JSX inline geometry,
515
528
  replace its own boundary entries in the same owner patch and check the final state.
516
529
  After the gates pass, verify the behavior in a browser.
@@ -518,7 +531,7 @@ After the gates pass, verify the behavior in a browser.
518
531
  A small change needs only its hunk. A complete new component may include its
519
532
  implementation, public re-export, scenario and fixture in the same unit patch,
520
533
  so coverage is checked against a complete candidate. New units use a new
521
- `components/`, `patterns/` or `composition/` owner ID following the same colocation
534
+ `components/`, `patterns/`, `controllers/`, `review/` or `composition/` owner ID following the same colocation
522
535
  convention. A patch cannot include a peer unit, capture existing peers beneath
523
536
  a new directory owner, or change unrelated public-entry statements. Shared
524
537
  public-entry changes are limited to re-exports from the selected unit. Alongside
@@ -652,6 +665,14 @@ origin hosts the sandbox proxy; that proxy creates an opaque inner App iframe
652
665
  and forwards the standard Apps bridge messages. The diagnostic explorer follows
653
666
  the same sandbox model. Only the App materializes and executes project resources.
654
667
 
668
+ Both ADS hosts allow native form validation and submission events through all
669
+ iframe layers. Client-side forms use their intended `submit` handlers and
670
+ `preventDefault()`. CSP `form-action 'none'` blocks native action requests;
671
+ `allow-forms` grants neither host DOM access nor top-level navigation. External
672
+ hosts choose their own permissions. See the portable
673
+ [scenario guide](../skills/ads-designer/references/scenarios.md#forms-inside-apps)
674
+ for verification and diagnosis.
675
+
655
676
  For inline documents without an explicit App base URL, ADS supplies
656
677
  `<base href="about:srcdoc">` and permits the local `about:` base scheme in CSP.
657
678
  Bare and named fragment links retain native in-document navigation and state.
@@ -1023,7 +1044,7 @@ instruction reads alone do not establish Apps/Skills activation.
1023
1044
  ### Token sample verification
1024
1045
 
1025
1046
  Token scenarios declare `samples: fixture.samples` and render a project-owned public
1026
- review pattern with that `samples` input. Each fixture record has `{ token, property,
1047
+ review renderer with that `samples` input. Each fixture record has `{ token, property,
1027
1048
  probe }`; the tool discovers the resulting token names. Plain token lists and empty
1028
1049
  covers do not satisfy review coverage. The same bindings travel in the compiled
1029
1050
  resource manifest or self-contained App seed.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reqvire-org/ads",
3
- "version": "0.3.18",
3
+ "version": "0.3.20",
4
4
  "type": "module",
5
5
  "description": "A design system your agent can see and shape. Your components. Your look. Your code.",
6
6
  "repository": {
@@ -1,4 +0,0 @@
1
- import { TokenPreview } from "@ds";
2
- import { fixture } from "./fixture";
3
- export const scenario = { title: fixture.title, covers: ["TokenPreview"] };
4
- export default function Scenario() { return <TokenPreview {...fixture} />; }
@@ -1,8 +0,0 @@
1
- export const fixture = {
2
- "title": "Token preview",
3
- "text": "Aa",
4
- samples: [
5
- {"token": "--accent", "property": "background-color", "probe": "rgb(31, 97, 163)"},
6
- {"token": "--space-4", "property": "width", "probe": "13.375px"},
7
- ]
8
- } as const;
@@ -1,4 +0,0 @@
1
- import { TokenPreview } from "@ds";
2
- import { fixture } from "./fixture";
3
- export const scenario = { title: fixture.title, covers: ["TokenPreview"] };
4
- export default function Scenario() { return <TokenPreview {...fixture} />; }
@@ -1,8 +0,0 @@
1
- export const fixture = {
2
- "title": "Token preview",
3
- "text": "Aa",
4
- samples: [
5
- {"token": "--accent", "property": "background-color", "probe": "rgb(31, 97, 163)"},
6
- {"token": "--space-4", "property": "width", "probe": "13.375px"},
7
- ]
8
- } as const;