@usesketchbook/cli 0.0.0-stage → 0.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.
- package/.claude/commands/add.md +15 -0
- package/.claude/commands/check.md +5 -0
- package/.claude/commands/explain.md +6 -0
- package/.claude/commands/foundations.md +11 -0
- package/.claude/commands/import-tokens.md +15 -0
- package/.claude/commands/init.md +10 -0
- package/.claude/commands/kits.md +6 -0
- package/.claude/commands/roast-foundations.md +10 -0
- package/.claude/commands/start.md +6 -0
- package/.claude/commands/swap.md +6 -0
- package/.claude/commands/sync.md +6 -0
- package/.claude/commands/tour.md +5 -0
- package/.claude/hooks/guard-decisions.mjs +51 -0
- package/.claude/hooks/guard-generated.mjs +63 -0
- package/.claude/hooks/page-outline.mjs +41 -0
- package/.claude/hooks/run.mjs +36 -0
- package/.claude/rules/comment-minimalism.md +7 -0
- package/.claude/rules/contract-first.md +29 -0
- package/.claude/rules/figma-fidelity.md +42 -0
- package/.claude/rules/form-associated-controls.md +87 -0
- package/.claude/rules/no-ai-attribution.md +3 -0
- package/.claude/rules/planning-gate.md +13 -0
- package/.claude/rules/spec-is-source.md +6 -0
- package/.claude/rules/test-first.md +16 -0
- package/.claude/rules/tokens-through-the-harness.md +8 -0
- package/.claude/skills/a11y-checker/SKILL.md +301 -0
- package/.claude/skills/a11y-checker/agents/a11y-auditor.md +18 -0
- package/.claude/skills/a11y-checker/references/self-validation-checklist.md +180 -0
- package/.claude/skills/a11y-checker/references/wcag-checklist.md +141 -0
- package/.claude/skills/component-builder/SKILL.md +124 -0
- package/.claude/skills/component-builder/agents/parity-auditor.md +50 -0
- package/.claude/skills/contract-author/SKILL.md +156 -0
- package/.claude/skills/contract-author/agents/drafter.md +80 -0
- package/.claude/skills/contract-author/agents/extractor.md +62 -0
- package/.claude/skills/contract-author/agents/validator.md +50 -0
- package/.claude/skills/design-figma/SKILL.md +120 -0
- package/.claude/skills/design-figma/references/screenshots/01-guide.png +0 -0
- package/.claude/skills/design-figma/references/screenshots/02-foundations.png +0 -0
- package/.claude/skills/design-figma/references/screenshots/03-icons.png +0 -0
- package/.claude/skills/design-figma/references/screenshots/04-components-actions.png +0 -0
- package/.claude/skills/design-figma/references/screenshots/05-components-toggles-and-selection.png +0 -0
- package/.claude/skills/design-figma/references/screenshots/06-components-text-controls.png +0 -0
- package/.claude/skills/design-figma/references/screenshots/07-components-surfaces.png +0 -0
- package/.claude/skills/design-figma/references/screenshots/08-components-feedback-and-display.png +0 -0
- package/.claude/skills/design-figma/references/screenshots/09-components-navigation-and-disclosure.png +0 -0
- package/.claude/skills/design-figma/references/screenshots/10-components-data-and-layout.png +0 -0
- package/.claude/skills/design-figma/references/screenshots/11-library.png +0 -0
- package/.claude/skills/design-figma/references/screenshots/12-theme-matrix.png +0 -0
- package/.claude/skills/design-figma/references/screenshots/13-patterns.png +0 -0
- package/.claude/skills/design-figma/references/screenshots/README.md +34 -0
- package/.claude/skills/design-figma/references/screenshots/detail/doc-accessibility.png +0 -0
- package/.claude/skills/design-figma/references/screenshots/detail/doc-anatomy-tree.png +0 -0
- package/.claude/skills/design-figma/references/screenshots/detail/doc-header.png +0 -0
- package/.claude/skills/design-figma/references/screenshots/detail/doc-states-grid.png +0 -0
- package/.claude/skills/design-figma/references/screenshots/detail/doc-tokens.png +0 -0
- package/.claude/skills/design-figma/references/screenshots/detail/doc-variants-grid.png +0 -0
- package/.claude/skills/design-figma/references/screenshots/detail/foundation-color.png +0 -0
- package/.claude/skills/design-figma/references/working-method.md +94 -0
- package/.claude/skills/forge-me-a-skill/SKILL.md +178 -0
- package/.claude/skills/forge-me-a-skill/assets/SKILL-TEMPLATE.md +56 -0
- package/.claude/skills/foundations/SKILL.md +216 -0
- package/.claude/skills/foundations/agents/foundations-critic.md +37 -0
- package/.claude/skills/foundations/agents/token-mapper.md +40 -0
- package/.claude/skills/foundations/references/border-width.md +49 -0
- package/.claude/skills/foundations/references/color.md +86 -0
- package/.claude/skills/foundations/references/contrast.md +49 -0
- package/.claude/skills/foundations/references/density.md +44 -0
- package/.claude/skills/foundations/references/elevation.md +44 -0
- package/.claude/skills/foundations/references/iconography.md +44 -0
- package/.claude/skills/foundations/references/layout-grid.md +49 -0
- package/.claude/skills/foundations/references/motion.md +62 -0
- package/.claude/skills/foundations/references/opacity.md +48 -0
- package/.claude/skills/foundations/references/radius.md +48 -0
- package/.claude/skills/foundations/references/semantic-naming.md +58 -0
- package/.claude/skills/foundations/references/spacing-grid.md +64 -0
- package/.claude/skills/foundations/references/typography.md +74 -0
- package/.claude/skills/foundations/references/z-index.md +43 -0
- package/.claude/skills/hammock/SKILL.md +261 -0
- package/.claude/skills/hammock/assets/DEBT-LOG-TEMPLATE.md +11 -0
- package/.claude/skills/hammock/assets/DECISION-LADDER.md +27 -0
- package/.claude/skills/hammock/hooks/hammock-activate.mjs +33 -0
- package/.claude/skills/hammock/hooks/hammock-audit-runner.mjs +38 -0
- package/.claude/skills/hammock/hooks/hammock-config.mjs +78 -0
- package/.claude/skills/hammock/hooks/hammock-gate.mjs +43 -0
- package/.claude/skills/hammock/hooks/hammock-instructions.mjs +37 -0
- package/.claude/skills/hammock/hooks/hammock-mode-tracker.mjs +66 -0
- package/.claude/skills/hammock/hooks/hammock-runtime.mjs +59 -0
- package/.claude/skills/hammock/hooks/hammock-stop-gate.mjs +20 -0
- package/.claude/skills/hammock/hooks/hammock-subagent.mjs +23 -0
- package/.claude/skills/hammock/scripts/audit-simplicity.sh +91 -0
- package/.claude/skills/kits/SKILL.md +120 -0
- package/.claude/skills/onboarding/SKILL.md +171 -0
- package/.claude/skills/playwright-worker/SKILL.md +266 -0
- package/.claude/skills/review-rangers/SKILL.md +343 -0
- package/.claude/skills/review-rangers/assets/committee-member-template.md +44 -0
- package/.claude/skills/review-rangers/assets/mender-template.md +78 -0
- package/.claude/skills/review-rangers/assets/safety-guard-template.md +43 -0
- package/.claude/skills/security-guardian/SKILL.md +215 -0
- package/.claude/skills/security-guardian/assets/SECURE-CONTRIBUTING-CHECKLIST.md +67 -0
- package/.claude/skills/security-guardian/scripts/security-scan.sh +126 -0
- package/.claude/skills/web-components-best-practices/SKILL.md +154 -0
- package/.claude/skills/web-components-best-practices/references/api-and-interop-conventions.md +137 -0
- package/.claude/skills/web-components-best-practices/references/composition-patterns.md +178 -0
- package/.claude/skills/web-components-best-practices/references/performance-rules.md +196 -0
- package/.claude/skills/web-components-best-practices/references/platform-fundamentals.md +308 -0
- package/.githooks/commit-msg +9 -0
- package/.githooks/pre-commit +23 -0
- package/.githooks/pre-push +25 -0
- package/LICENSE +21 -0
- package/README.md +205 -2
- package/THIRD_PARTY_NOTICES.md +28 -0
- package/brand/sketchbook-icon.png +0 -0
- package/brand/sketchbook-icon.svg +2839 -0
- package/dist/index.d.ts +2226 -0
- package/dist/index.js +10589 -0
- package/dist/sketchbook.js +4798 -0
- package/docs/agent-compatibility.md +142 -0
- package/docs/cli.md +715 -0
- package/generated/css/fonts.css +2 -0
- package/generated/css/tokens.css +1245 -0
- package/generated/types/api.d.ts +138 -0
- package/generated/types/brand-config.d.ts +254 -0
- package/generated/types/contract.d.ts +197 -0
- package/generated/types/figma-practices.d.ts +26 -0
- package/generated/types/harness-config.d.ts +104 -0
- package/generated/types/registry.d.ts +16 -0
- package/harness/adapters/design/figma/compare.d.mts +1 -0
- package/harness/adapters/design/figma/compare.mjs +42 -0
- package/harness/adapters/design/figma/docs.d.mts +62 -0
- package/harness/adapters/design/figma/docs.mjs +679 -0
- package/harness/adapters/design/figma/icons.d.mts +3 -0
- package/harness/adapters/design/figma/icons.mjs +92 -0
- package/harness/adapters/design/figma/library.d.mts +51 -0
- package/harness/adapters/design/figma/library.mjs +595 -0
- package/harness/adapters/design/figma/patterns.d.mts +2 -0
- package/harness/adapters/design/figma/patterns.mjs +351 -0
- package/harness/adapters/design/figma/sync.d.mts +24 -0
- package/harness/adapters/design/figma/sync.mjs +216 -0
- package/harness/adapters/design/figma/variables.d.mts +136 -0
- package/harness/adapters/design/figma/variables.mjs +532 -0
- package/harness/adapters/design/figma/verify-runtime.mjs +19 -0
- package/harness/adapters/design/figma/zero.d.mts +9 -0
- package/harness/adapters/design/figma/zero.mjs +37 -0
- package/harness/agent/gemini-guard.d.mts +2 -0
- package/harness/agent/gemini-guard.mjs +95 -0
- package/harness/build/fonts.d.mts +14 -0
- package/harness/build/fonts.mjs +69 -0
- package/harness/build/index.d.mts +11 -0
- package/harness/build/index.mjs +35 -0
- package/harness/build/tokens-plain.d.mts +9 -0
- package/harness/build/tokens-plain.mjs +59 -0
- package/harness/build/tokens.d.mts +9 -0
- package/harness/build/tokens.mjs +76 -0
- package/harness/catalog/accordion/files/3386f68432b4c28277bb +8 -0
- package/harness/catalog/accordion/files/458f73bbdb2280a93792 +280 -0
- package/harness/catalog/accordion/files/4d7c5147b9926261b70a +41 -0
- package/harness/catalog/accordion/files/592212fb5c728cb562af +6 -0
- package/harness/catalog/accordion/files/5ae431f76cae09a91d25 +4 -0
- package/harness/catalog/accordion/files/5bbb11e9f8095ed054ff +96 -0
- package/harness/catalog/accordion/files/5fab7a341aef28356da3 +6 -0
- package/harness/catalog/accordion/files/736c8824f1022b4df6c8 +69 -0
- package/harness/catalog/accordion/files/76b5f3980a78fedb3311 +59 -0
- package/harness/catalog/accordion/files/76c16a81d99e363e956b +22 -0
- package/harness/catalog/accordion/files/7c3465ac910eaf16830a +6 -0
- package/harness/catalog/accordion/files/a025a789d6e548428b3b +47 -0
- package/harness/catalog/accordion/files/a632d819d1fa6422ca28 +108 -0
- package/harness/catalog/accordion/files/af4fe412342068d19100 +96 -0
- package/harness/catalog/accordion/files/b5152e94f69d686f66d4 +464 -0
- package/harness/catalog/accordion/files/c27cf9f1ab09bec315aa +8 -0
- package/harness/catalog/accordion/files/d404485af0224293b2d6 +69 -0
- package/harness/catalog/accordion/files/ec36cfafc8906915188a +8 -0
- package/harness/catalog/accordion/files/fe2916946450260c403a +23 -0
- package/harness/catalog/accordion/files/fe37ab65a9323b9b828b +10 -0
- package/harness/catalog/accordion/manifest.json +93 -0
- package/harness/catalog/alert/files/16a43bc5189d44e14292 +299 -0
- package/harness/catalog/alert/files/16eb63459233148e6a59 +42 -0
- package/harness/catalog/alert/files/47cebb310b907f59b96f +2 -0
- package/harness/catalog/alert/files/52150c86b71449888f16 +3 -0
- package/harness/catalog/alert/files/52cc35ea0d55324a9212 +4 -0
- package/harness/catalog/alert/files/5c30877339f63c1098e7 +3 -0
- package/harness/catalog/alert/files/67630242c9c940463652 +4 -0
- package/harness/catalog/alert/files/6ae7cb35ae4d69883a3b +79 -0
- package/harness/catalog/alert/files/6b631857d33e60b3b59e +177 -0
- package/harness/catalog/alert/files/919ddd492eb1fa90aadc +21 -0
- package/harness/catalog/alert/files/9cf980ba345db73d493b +41 -0
- package/harness/catalog/alert/files/a24ca0bc70f381d50059 +8 -0
- package/harness/catalog/alert/files/acbff53556d78aa71c4a +17 -0
- package/harness/catalog/alert/files/b1f8249847af028c520e +49 -0
- package/harness/catalog/alert/files/be66155fe522eb0f75e4 +80 -0
- package/harness/catalog/alert/files/d9376dbfc0c412d43f02 +21 -0
- package/harness/catalog/alert/files/e392d4a74e9d1b717ee1 +21 -0
- package/harness/catalog/alert/manifest.json +91 -0
- package/harness/catalog/aspect-ratio/files/19788b65a76cdaec18bf +1 -0
- package/harness/catalog/aspect-ratio/files/209c5411dde91bdcc849 +40 -0
- package/harness/catalog/aspect-ratio/files/2591d39bae9388ba807b +74 -0
- package/harness/catalog/aspect-ratio/files/4402c050863e9c25c737 +1 -0
- package/harness/catalog/aspect-ratio/files/836f9ffafb34278fe961 +73 -0
- package/harness/catalog/aspect-ratio/files/9078421b339ea5791f40 +32 -0
- package/harness/catalog/aspect-ratio/files/9f8655de70ea15e3229d +1 -0
- package/harness/catalog/aspect-ratio/files/b1beccd5cb1056d38428 +33 -0
- package/harness/catalog/aspect-ratio/files/d6fdd5d41eb32b1d9fd3 +159 -0
- package/harness/catalog/aspect-ratio/files/de9fd92e0ba9ea351caf +11 -0
- package/harness/catalog/aspect-ratio/files/fdf6f2d2beefd1d1dbe3 +19 -0
- package/harness/catalog/aspect-ratio/manifest.json +65 -0
- package/harness/catalog/avatar/files/014a11e7ae821825d703 +136 -0
- package/harness/catalog/avatar/files/0790f7bde37e48018f0c +6 -0
- package/harness/catalog/avatar/files/31b79bb9dfa043d497be +47 -0
- package/harness/catalog/avatar/files/51b9201acb088b52f64e +36 -0
- package/harness/catalog/avatar/files/539b1f887a74e5bcf719 +425 -0
- package/harness/catalog/avatar/files/5715cc2214da4f2d82aa +2 -0
- package/harness/catalog/avatar/files/5d1303dddb9208b8a106 +275 -0
- package/harness/catalog/avatar/files/65cc7536672c4026ea82 +10 -0
- package/harness/catalog/avatar/files/7054042709566df6d007 +46 -0
- package/harness/catalog/avatar/files/7384dd119b51fe23c6b6 +40 -0
- package/harness/catalog/avatar/files/89469dcd24022d7663b5 +18 -0
- package/harness/catalog/avatar/files/9029ce733b07f6335348 +61 -0
- package/harness/catalog/avatar/files/9d2ba42e187abe3a8145 +3 -0
- package/harness/catalog/avatar/files/9f6b4305e38cec8b8e14 +7 -0
- package/harness/catalog/avatar/files/a0bb48cb59aeb92c3810 +39 -0
- package/harness/catalog/avatar/files/a451ea354f9f77d8987d +8 -0
- package/harness/catalog/avatar/files/a9379bafbdd4b5b5d695 +67 -0
- package/harness/catalog/avatar/files/bff4bf72e38de7673f8e +1 -0
- package/harness/catalog/avatar/files/d3f78e882bc36f721115 +2 -0
- package/harness/catalog/avatar/files/d7e47a33b128e0e03ab7 +41 -0
- package/harness/catalog/avatar/files/e40b957b14019e761505 +80 -0
- package/harness/catalog/avatar/manifest.json +97 -0
- package/harness/catalog/badge/files/0018ed707d23b776b3b9 +346 -0
- package/harness/catalog/badge/files/28005cb14bde099080db +101 -0
- package/harness/catalog/badge/files/2a11f46e7524cfc8099b +38 -0
- package/harness/catalog/badge/files/2d62b3998a30444f4ebe +6 -0
- package/harness/catalog/badge/files/36c7e1d9da83aff58801 +1 -0
- package/harness/catalog/badge/files/58f7c66681cbe255fe9f +188 -0
- package/harness/catalog/badge/files/67b07d31508de5e0bb09 +6 -0
- package/harness/catalog/badge/files/8c4e02e4ba38e936bcc9 +1 -0
- package/harness/catalog/badge/files/920ec5021787522eafbb +1 -0
- package/harness/catalog/badge/files/9a8a242933ea67a605c2 +1 -0
- package/harness/catalog/badge/files/ae17c9db8f67fddf17e4 +92 -0
- package/harness/catalog/badge/files/b4fd13485d1010240f16 +43 -0
- package/harness/catalog/badge/files/cf52421cee4f018981d3 +37 -0
- package/harness/catalog/badge/files/ddac5819e1ed88cb2e03 +12 -0
- package/harness/catalog/badge/manifest.json +69 -0
- package/harness/catalog/breadcrumb/files/10c965db958092f69cca +26 -0
- package/harness/catalog/breadcrumb/files/17521ad2cbc3514221af +7 -0
- package/harness/catalog/breadcrumb/files/24012e0492e093ddee3f +21 -0
- package/harness/catalog/breadcrumb/files/269b4f59060369e2689d +10 -0
- package/harness/catalog/breadcrumb/files/2991c2998d868bde74af +50 -0
- package/harness/catalog/breadcrumb/files/551a25d7280214170b8c +93 -0
- package/harness/catalog/breadcrumb/files/78f75efba91a8ad5f90f +24 -0
- package/harness/catalog/breadcrumb/files/8083e6bfcb1cebb4f9af +26 -0
- package/harness/catalog/breadcrumb/files/810adc630d7d7d41f42d +8 -0
- package/harness/catalog/breadcrumb/files/90712a337d693eacb94d +415 -0
- package/harness/catalog/breadcrumb/files/9bdd89a2adc4b6878b6f +27 -0
- package/harness/catalog/breadcrumb/files/a8692cf836f911223481 +79 -0
- package/harness/catalog/breadcrumb/files/ae82c56d4144711f9ab5 +207 -0
- package/harness/catalog/breadcrumb/files/b5c54c838715e9cd134a +6 -0
- package/harness/catalog/breadcrumb/files/b8b4c12d89f8ab647b5e +30 -0
- package/harness/catalog/breadcrumb/files/c2e3f8f6e4cb9fc735a8 +21 -0
- package/harness/catalog/breadcrumb/files/d713aa4dccbb037a0e12 +26 -0
- package/harness/catalog/breadcrumb/files/f47fc1574cfce8f9448b +66 -0
- package/harness/catalog/breadcrumb/files/f5cc0c4e34882f901b1a +8 -0
- package/harness/catalog/breadcrumb/manifest.json +89 -0
- package/harness/catalog/button/files/0cff7f90b517fc2c5a87 +5 -0
- package/harness/catalog/button/files/0d1f72f94e7ce318e921 +76 -0
- package/harness/catalog/button/files/1a21ad2c3bcaad6b4114 +1 -0
- package/harness/catalog/button/files/1b6ed7bb8c564c65bbaa +107 -0
- package/harness/catalog/button/files/23017794095f7b922f0b +1 -0
- package/harness/catalog/button/files/2460af04d1ef41c23154 +246 -0
- package/harness/catalog/button/files/284457fc8187e1fdbf44 +40 -0
- package/harness/catalog/button/files/506cb8a95609ba0d2d3a +1 -0
- package/harness/catalog/button/files/5803b77577535ac55a89 +44 -0
- package/harness/catalog/button/files/5854b02c74605818b042 +1 -0
- package/harness/catalog/button/files/5e1469fe306037cd9573 +1 -0
- package/harness/catalog/button/files/609be73e1c7a8bcdc550 +1 -0
- package/harness/catalog/button/files/66bb1fb61fe6aad35c1c +1 -0
- package/harness/catalog/button/files/6b986f514e833629d08a +56 -0
- package/harness/catalog/button/files/962687149a672a920383 +197 -0
- package/harness/catalog/button/files/d61eff9f7bd5360fe661 +1 -0
- package/harness/catalog/button/files/d6888f505d4934c73e87 +573 -0
- package/harness/catalog/button/files/e6f6ca2db758ab78f21d +1 -0
- package/harness/catalog/button/files/f328806fe07f25cdd07a +177 -0
- package/harness/catalog/button/manifest.json +93 -0
- package/harness/catalog/button-group/files/0044c16e6d6408d70f97 +21 -0
- package/harness/catalog/button-group/files/322bb11b902b9b5e38f4 +3 -0
- package/harness/catalog/button-group/files/47d4b9403faec8dec952 +78 -0
- package/harness/catalog/button-group/files/4bda2f3cc2a97b49bf59 +51 -0
- package/harness/catalog/button-group/files/6afe96e91fc22fd70152 +4 -0
- package/harness/catalog/button-group/files/7474213871cfec7877de +61 -0
- package/harness/catalog/button-group/files/7c7ad2130eddf9a1513b +16 -0
- package/harness/catalog/button-group/files/80dc20a145bf1531dba0 +270 -0
- package/harness/catalog/button-group/files/91da6c854f746349f833 +4 -0
- package/harness/catalog/button-group/files/a33602cbe19396ffaeed +4 -0
- package/harness/catalog/button-group/files/b8999a731d121b733b2a +21 -0
- package/harness/catalog/button-group/files/c3af09f47753a0346516 +2 -0
- package/harness/catalog/button-group/files/d27c685fdbf67bd48901 +118 -0
- package/harness/catalog/button-group/files/d7e1964ea5ad56231d79 +155 -0
- package/harness/catalog/button-group/files/f01251791f5d7d6c788f +59 -0
- package/harness/catalog/button-group/manifest.json +85 -0
- package/harness/catalog/card/files/06ad3458251f83352e77 +5 -0
- package/harness/catalog/card/files/18fbc68e099aee86c684 +10 -0
- package/harness/catalog/card/files/216f192af043ae2ff617 +12 -0
- package/harness/catalog/card/files/3017f6933cd6283eb287 +27 -0
- package/harness/catalog/card/files/34e2673bc64b4a8ff39b +21 -0
- package/harness/catalog/card/files/3a96ab06d75a85124b5c +26 -0
- package/harness/catalog/card/files/3e54fb5eea171a3ceaad +21 -0
- package/harness/catalog/card/files/4aa88fa70afaceb9a9c7 +129 -0
- package/harness/catalog/card/files/51aab65ffd59c813f578 +1 -0
- package/harness/catalog/card/files/54df6b8d56bd1617895c +21 -0
- package/harness/catalog/card/files/58d44e64ec398d29b56f +7 -0
- package/harness/catalog/card/files/5ef69696b5505bcb1141 +4 -0
- package/harness/catalog/card/files/6d671f1ec19ae75aa88c +73 -0
- package/harness/catalog/card/files/96d54fab0818dfa63590 +21 -0
- package/harness/catalog/card/files/9e14107badcfb8170367 +40 -0
- package/harness/catalog/card/files/a2d5bf1b906370fca975 +21 -0
- package/harness/catalog/card/files/d1ac11b32e7096b3a30c +77 -0
- package/harness/catalog/card/files/d6e226f85f6fc54b0843 +280 -0
- package/harness/catalog/card/files/f31279c9c4b076d443e4 +45 -0
- package/harness/catalog/card/manifest.json +95 -0
- package/harness/catalog/checkbox/files/0283c841689d3ff22707 +2 -0
- package/harness/catalog/checkbox/files/032a72d3b72243fb1727 +131 -0
- package/harness/catalog/checkbox/files/081ef8a0412aab604edd +200 -0
- package/harness/catalog/checkbox/files/094fcc1fb431fef1a872 +2 -0
- package/harness/catalog/checkbox/files/0bf1d698bdc46c1d48d7 +3 -0
- package/harness/catalog/checkbox/files/1c5b1af093b60c82b66f +128 -0
- package/harness/catalog/checkbox/files/3c6f39c5e3fb569afef1 +1 -0
- package/harness/catalog/checkbox/files/46d2afe4c15499ae96e9 +449 -0
- package/harness/catalog/checkbox/files/544c5ff7f9890dad205e +4 -0
- package/harness/catalog/checkbox/files/61cfac6c6dc653b57285 +2 -0
- package/harness/catalog/checkbox/files/6b5bfa718a15d2057b59 +4 -0
- package/harness/catalog/checkbox/files/6cbd9776d028f943b331 +4 -0
- package/harness/catalog/checkbox/files/73a07a998134dacd7693 +19 -0
- package/harness/catalog/checkbox/files/7d229530ecebdd879488 +60 -0
- package/harness/catalog/checkbox/files/865113d4527ee380dd0e +3 -0
- package/harness/catalog/checkbox/files/8a74f72a3a84af71476b +92 -0
- package/harness/catalog/checkbox/files/8b37e9d23015ab5cfe0d +2 -0
- package/harness/catalog/checkbox/files/95c5c2505dd092c9f742 +2 -0
- package/harness/catalog/checkbox/files/b86afb2a41ded28f69cb +62 -0
- package/harness/catalog/checkbox/files/d08b3c8bc03cafe6db78 +2 -0
- package/harness/catalog/checkbox/manifest.json +97 -0
- package/harness/catalog/collapsible/files/0ef860186a5d77f0a02c +19 -0
- package/harness/catalog/collapsible/files/10acfcd2eebb1f54921e +62 -0
- package/harness/catalog/collapsible/files/1ecfe2f1f1d99815477f +7 -0
- package/harness/catalog/collapsible/files/30c5ce1473315a1690d8 +154 -0
- package/harness/catalog/collapsible/files/4d256e6719507cfe8374 +4 -0
- package/harness/catalog/collapsible/files/563ee7ce5fce1f77ee5f +4 -0
- package/harness/catalog/collapsible/files/80a66bc01fbd7557bc5c +7 -0
- package/harness/catalog/collapsible/files/902584654862eec8d0f0 +56 -0
- package/harness/catalog/collapsible/files/90fb6b218f5837e2b9af +4 -0
- package/harness/catalog/collapsible/files/91d5114689dc3d3813fc +31 -0
- package/harness/catalog/collapsible/files/93f866f818a699d0d579 +88 -0
- package/harness/catalog/collapsible/files/996628c9381baa5dd9a2 +42 -0
- package/harness/catalog/collapsible/files/a38a70b8f5bd307fb7ec +3 -0
- package/harness/catalog/collapsible/files/b1d517e0bb72963d6efe +63 -0
- package/harness/catalog/collapsible/files/bc6adfb746c3e16ed828 +1 -0
- package/harness/catalog/collapsible/files/e8da0cd63c0b7de97808 +50 -0
- package/harness/catalog/collapsible/files/ea39495978fcf333dbc3 +10 -0
- package/harness/catalog/collapsible/files/f26dc650128b402e1f3e +308 -0
- package/harness/catalog/collapsible/manifest.json +85 -0
- package/harness/catalog/command/files/0045480291f5bcda1ed0 +134 -0
- package/harness/catalog/command/files/0921b5a7161362e4aa0b +8 -0
- package/harness/catalog/command/files/1760a0a4a6d9b15611fb +27 -0
- package/harness/catalog/command/files/388b9f83faadc3d8a362 +27 -0
- package/harness/catalog/command/files/38d604b586eb1cbe1097 +11 -0
- package/harness/catalog/command/files/3a0c6f69905ab1130fdf +11 -0
- package/harness/catalog/command/files/456e5a0414963d6ad66c +599 -0
- package/harness/catalog/command/files/64edd35c308b3381280b +30 -0
- package/harness/catalog/command/files/6c02d111b386d13fb42a +81 -0
- package/harness/catalog/command/files/732b73ef77332148d537 +11 -0
- package/harness/catalog/command/files/78882bb1d7f63990f8f3 +34 -0
- package/harness/catalog/command/files/7919eff639d8d4a7a256 +11 -0
- package/harness/catalog/command/files/7b73f21bcb5aeebb9d03 +1 -0
- package/harness/catalog/command/files/7b947271b77c5c2e6cbe +60 -0
- package/harness/catalog/command/files/7e6923a2a26e59263a69 +131 -0
- package/harness/catalog/command/files/7f21e62085004b5eb6c9 +161 -0
- package/harness/catalog/command/files/81ccfcb263444082e797 +716 -0
- package/harness/catalog/command/files/825c406546cdca148c9e +177 -0
- package/harness/catalog/command/files/92c96df2ebb179f5316c +29 -0
- package/harness/catalog/command/files/95ffd3cdb86f53120c3a +63 -0
- package/harness/catalog/command/files/a193dbe4cee5f63a29b7 +33 -0
- package/harness/catalog/command/files/b932ab68d82bce66de9c +56 -0
- package/harness/catalog/command/files/d301eb28bc3eb9808c69 +7 -0
- package/harness/catalog/command/files/e2f22dbe376ac580dd4f +11 -0
- package/harness/catalog/command/files/ff05f6bdc626c33bff6d +3 -0
- package/harness/catalog/command/manifest.json +121 -0
- package/harness/catalog/dialog/files/033143a3f05a03f9f557 +21 -0
- package/harness/catalog/dialog/files/0ba6cb9c741f4d6cc29f +1 -0
- package/harness/catalog/dialog/files/14e66fa2f397d81a4b5a +6 -0
- package/harness/catalog/dialog/files/15288bbad2fe7f0623e6 +557 -0
- package/harness/catalog/dialog/files/1607fa09941fa5b61b53 +1 -0
- package/harness/catalog/dialog/files/1ed1da7f60f54af79479 +21 -0
- package/harness/catalog/dialog/files/225b9e06f0defd4497a0 +151 -0
- package/harness/catalog/dialog/files/2eeaa795a0cfde395eb0 +30 -0
- package/harness/catalog/dialog/files/308156c5a7b6cfd183c7 +12 -0
- package/harness/catalog/dialog/files/3d71ca97986f4a6aa575 +29 -0
- package/harness/catalog/dialog/files/52461a94deafc1ddbb9e +1 -0
- package/harness/catalog/dialog/files/6595bcd27d3f2570d8fe +8 -0
- package/harness/catalog/dialog/files/6d2764adad162ecaf567 +1 -0
- package/harness/catalog/dialog/files/6f633326e4a606394eb9 +1 -0
- package/harness/catalog/dialog/files/73841e4e2d52a9ce1739 +99 -0
- package/harness/catalog/dialog/files/95a098053c36283f35ba +706 -0
- package/harness/catalog/dialog/files/96b143a067ceb693bbc2 +1 -0
- package/harness/catalog/dialog/files/a7247129c0b4c3f2809a +10 -0
- package/harness/catalog/dialog/files/ae31f52c79fac0a4a415 +21 -0
- package/harness/catalog/dialog/files/b0df9c2c22c03da30f17 +12 -0
- package/harness/catalog/dialog/files/bb1d44dcb521ae95d625 +30 -0
- package/harness/catalog/dialog/files/be32860a4c355d40cba1 +169 -0
- package/harness/catalog/dialog/files/beb1ca0148c74df4adae +79 -0
- package/harness/catalog/dialog/files/c14b3ca0336a4dfd750c +53 -0
- package/harness/catalog/dialog/files/d1612776ba9473008a59 +1 -0
- package/harness/catalog/dialog/files/ea2b7035753857ef50b3 +88 -0
- package/harness/catalog/dialog/files/f844b44e34e2bbd10ce8 +148 -0
- package/harness/catalog/dialog/manifest.json +127 -0
- package/harness/catalog/direction/files/02506a3763c0825c1b2e +4 -0
- package/harness/catalog/direction/files/02cfc0e8be9401edca36 +76 -0
- package/harness/catalog/direction/files/103e6063fccaaf929d1b +26 -0
- package/harness/catalog/direction/files/255fe8b7f16e99e2b8dd +91 -0
- package/harness/catalog/direction/files/75f8f89d2292a8284167 +1 -0
- package/harness/catalog/direction/files/8b99e167ec2c974cc2a9 +7 -0
- package/harness/catalog/direction/files/8fca474498a374fe7da7 +18 -0
- package/harness/catalog/direction/files/c69ce45deb5ff6ef0953 +155 -0
- package/harness/catalog/direction/files/e953ad5071ef37e0b922 +16 -0
- package/harness/catalog/direction/files/ee8a89015d44a06d8310 +51 -0
- package/harness/catalog/direction/files/f4dcc74509fba14c2f9b +32 -0
- package/harness/catalog/direction/manifest.json +64 -0
- package/harness/catalog/empty/files/12d5b75e9a7e69f7ebf3 +21 -0
- package/harness/catalog/empty/files/26c34047865703e941ae +21 -0
- package/harness/catalog/empty/files/584ac0d314cc5b04bd28 +75 -0
- package/harness/catalog/empty/files/61ec4e1f6bf74d4ea2e1 +3 -0
- package/harness/catalog/empty/files/69428ce8fd6924fe5c93 +4 -0
- package/harness/catalog/empty/files/6adc280f5247c6c59c04 +21 -0
- package/harness/catalog/empty/files/8bfb9f9a62a0adc52b29 +35 -0
- package/harness/catalog/empty/files/93bd9aa2a51cd2be900a +128 -0
- package/harness/catalog/empty/files/94eb6f0ebcb67e5ff82e +12 -0
- package/harness/catalog/empty/files/97c8f20352efd114453f +6 -0
- package/harness/catalog/empty/files/a36428ac1e039fa1ac08 +3 -0
- package/harness/catalog/empty/files/ad3c27417ff9f17d29c5 +21 -0
- package/harness/catalog/empty/files/b26b9b829d659c172afa +21 -0
- package/harness/catalog/empty/files/b531aec20772267bb1f0 +1 -0
- package/harness/catalog/empty/files/bf9f7c6d54893538934d +26 -0
- package/harness/catalog/empty/files/cc3b7ef917a187686d23 +92 -0
- package/harness/catalog/empty/files/efeb91d03e24e277c4a1 +299 -0
- package/harness/catalog/empty/files/f27a2ed4bc56de043dbd +55 -0
- package/harness/catalog/empty/manifest.json +87 -0
- package/harness/catalog/field/files/14f219e6b80e72e5c3bb +34 -0
- package/harness/catalog/field/files/1b59c2405c87e7172caa +4 -0
- package/harness/catalog/field/files/1de85848606fad492a52 +534 -0
- package/harness/catalog/field/files/245f94156a26a4f69b7d +9 -0
- package/harness/catalog/field/files/2b3cd42da8f154db221c +4 -0
- package/harness/catalog/field/files/35b3f29fc98483b4c80f +38 -0
- package/harness/catalog/field/files/475a598be605bbadb769 +4 -0
- package/harness/catalog/field/files/4a38ec4400cf7d298644 +21 -0
- package/harness/catalog/field/files/4ff10d27a916182c1738 +9 -0
- package/harness/catalog/field/files/652049b91be028101cf9 +21 -0
- package/harness/catalog/field/files/6adeae4eb58d78ea9f30 +95 -0
- package/harness/catalog/field/files/6e692b7158a826bbb947 +4 -0
- package/harness/catalog/field/files/7d6b6a3ab1daebba7cb8 +97 -0
- package/harness/catalog/field/files/98f5ffd7c690677bb092 +5 -0
- package/harness/catalog/field/files/ab27c00164159d57b0dd +30 -0
- package/harness/catalog/field/files/afa021fa0a297ad1fe23 +21 -0
- package/harness/catalog/field/files/aff6e70b48d33ce18356 +58 -0
- package/harness/catalog/field/files/b17a1e6ee355f3a6196f +21 -0
- package/harness/catalog/field/files/b4cce9970056872f98aa +39 -0
- package/harness/catalog/field/files/bb70812c4e051c4d318c +101 -0
- package/harness/catalog/field/files/cf526a36ce845c550978 +6 -0
- package/harness/catalog/field/files/d413eed2b0a4706d87dd +9 -0
- package/harness/catalog/field/files/d55783ea6832f7a48404 +183 -0
- package/harness/catalog/field/files/de723d33b8f3cc3a1ae6 +17 -0
- package/harness/catalog/field/files/f386f1400a0c1d04e219 +125 -0
- package/harness/catalog/field/manifest.json +115 -0
- package/harness/catalog/index.json +54 -0
- package/harness/catalog/input/files/01c8e9c337c9d9ec3b56 +157 -0
- package/harness/catalog/input/files/0374ecc1c70cfbeb5477 +94 -0
- package/harness/catalog/input/files/130029580ebe2410854d +62 -0
- package/harness/catalog/input/files/2e4f4f932ac53b3ed0f8 +92 -0
- package/harness/catalog/input/files/3928022bc657cfd275c8 +473 -0
- package/harness/catalog/input/files/45aea55aede567795da6 +38 -0
- package/harness/catalog/input/files/5d05203ba89dfffc5672 +5 -0
- package/harness/catalog/input/files/63785352f2e1083afad0 +3 -0
- package/harness/catalog/input/files/74013a390a4a820194f2 +56 -0
- package/harness/catalog/input/files/7f39502d3fb907d14714 +3 -0
- package/harness/catalog/input/files/9a072aedd4835d8302d0 +3 -0
- package/harness/catalog/input/files/a310eb8a50ef91f63464 +5 -0
- package/harness/catalog/input/files/ab7eccdc1ed0cf9e8d2a +3 -0
- package/harness/catalog/input/files/b8f3934a052b4cb749da +1 -0
- package/harness/catalog/input/files/bfe480c8577cbf45dd5e +142 -0
- package/harness/catalog/input/files/c7482318af88664d7dcc +4 -0
- package/harness/catalog/input/files/f3896b6e9d2f4b53cc9c +3 -0
- package/harness/catalog/input/manifest.json +85 -0
- package/harness/catalog/input-group/files/00e50817aba414d9cd26 +3 -0
- package/harness/catalog/input-group/files/076784d5a4d149a44604 +3 -0
- package/harness/catalog/input-group/files/1d30879d1a4a72c33976 +3 -0
- package/harness/catalog/input-group/files/25d5b296213c3ac34b13 +2 -0
- package/harness/catalog/input-group/files/2da272dd920815dd5684 +447 -0
- package/harness/catalog/input-group/files/2e421f3362b888bab4d0 +5 -0
- package/harness/catalog/input-group/files/31c747b37bb6426dbbb7 +5 -0
- package/harness/catalog/input-group/files/41ec212906edd2e8e5f6 +98 -0
- package/harness/catalog/input-group/files/4f58492af1ce660b817b +34 -0
- package/harness/catalog/input-group/files/50448668b22389f37e97 +3 -0
- package/harness/catalog/input-group/files/6dbdcc0f9ff4528070b8 +97 -0
- package/harness/catalog/input-group/files/736d8c18cf1f33b5a7d5 +2 -0
- package/harness/catalog/input-group/files/7a3f6facbfe0d6195355 +3 -0
- package/harness/catalog/input-group/files/89ff063e7666df8098d8 +83 -0
- package/harness/catalog/input-group/files/ac985a386a91e19f9bbd +2 -0
- package/harness/catalog/input-group/files/b28e3e20d39324fd7f46 +93 -0
- package/harness/catalog/input-group/files/d5410b5113479f8b7f5a +21 -0
- package/harness/catalog/input-group/files/d99f61d638ee95464394 +186 -0
- package/harness/catalog/input-group/files/dbcb5f1aaac679c86a53 +173 -0
- package/harness/catalog/input-group/files/e6305cb8959817cf07fc +18 -0
- package/harness/catalog/input-group/files/ee589db1ea581d588e63 +4 -0
- package/harness/catalog/input-group/files/f83225fa83f2339011cb +64 -0
- package/harness/catalog/input-group/manifest.json +109 -0
- package/harness/catalog/item/files/04bdde2b5e1615d12955 +322 -0
- package/harness/catalog/item/files/09e2e736a8375f63fcf0 +19 -0
- package/harness/catalog/item/files/0dcc0cfc1e2a47e99544 +26 -0
- package/harness/catalog/item/files/21166b7276e7422f4972 +163 -0
- package/harness/catalog/item/files/35c23f28a6a9400e68c6 +26 -0
- package/harness/catalog/item/files/3e55d032c524ad0b1754 +12 -0
- package/harness/catalog/item/files/46382bf1b58c54e07592 +6 -0
- package/harness/catalog/item/files/491e8d8a0c271e52640e +80 -0
- package/harness/catalog/item/files/4d77cb5e587c6a028b13 +521 -0
- package/harness/catalog/item/files/4f2a05a2ac90709e7ff7 +10 -0
- package/harness/catalog/item/files/56ba8284f9cb60bb1053 +21 -0
- package/harness/catalog/item/files/6b6cd3a9537fdf1354ea +3 -0
- package/harness/catalog/item/files/6c7bf2dfbdd32fe8f83a +21 -0
- package/harness/catalog/item/files/708ec3155d305b04654b +21 -0
- package/harness/catalog/item/files/79290f32b79c661a51d9 +26 -0
- package/harness/catalog/item/files/7d2530628a9e032f8bd6 +3 -0
- package/harness/catalog/item/files/a08b24c7c2fb10cad015 +46 -0
- package/harness/catalog/item/files/a47cfe69078455a32fbe +21 -0
- package/harness/catalog/item/files/a710a25ff17451cbdd00 +21 -0
- package/harness/catalog/item/files/b017a0cb71b5d5e73ab4 +11 -0
- package/harness/catalog/item/files/bcafcd71b96bae09e7e5 +21 -0
- package/harness/catalog/item/files/bf28d448b752a46831a0 +2 -0
- package/harness/catalog/item/files/c15f9be937068f7e1304 +1 -0
- package/harness/catalog/item/files/cb016b0cef50fdd305b1 +74 -0
- package/harness/catalog/item/files/cc7eec49d7f8f8c405b9 +3 -0
- package/harness/catalog/item/files/f5a8ad3f67b72a12fc48 +89 -0
- package/harness/catalog/item/manifest.json +119 -0
- package/harness/catalog/kbd/files/0ac105576d98be3d9e38 +3 -0
- package/harness/catalog/kbd/files/16d922c45b58989ddc86 +209 -0
- package/harness/catalog/kbd/files/1961ef478e61504f5c56 +1 -0
- package/harness/catalog/kbd/files/1a00b9bc0991be4b3318 +42 -0
- package/harness/catalog/kbd/files/255034504e8b67636ac2 +3 -0
- package/harness/catalog/kbd/files/268b00d6dcba45995ab3 +73 -0
- package/harness/catalog/kbd/files/2e7b2a85ecc2605cfe09 +16 -0
- package/harness/catalog/kbd/files/4d3887237a475f16d9f4 +22 -0
- package/harness/catalog/kbd/files/6f02f0895e7dd3bb032d +1 -0
- package/harness/catalog/kbd/files/8c47d035d84342a21cc4 +7 -0
- package/harness/catalog/kbd/files/97e104896e092af6b35b +22 -0
- package/harness/catalog/kbd/files/9b4ed30c2c7457a659b5 +2 -0
- package/harness/catalog/kbd/files/ba6e45ce6b38bf9c70e8 +40 -0
- package/harness/catalog/kbd/files/bf22ec90d5d876dffc8c +123 -0
- package/harness/catalog/kbd/files/cc42ed656bc00ebb6c52 +35 -0
- package/harness/catalog/kbd/manifest.json +73 -0
- package/harness/catalog/kits/dashboard/files/11a5797c4c9189b59fbe +134 -0
- package/harness/catalog/kits/dashboard/files/1aef0eaaad65d944a99f +98 -0
- package/harness/catalog/kits/dashboard/files/63cde4f28d1c141c401d +840 -0
- package/harness/catalog/kits/dashboard/files/864acc7ce20f541cf67c +17 -0
- package/harness/catalog/kits/dashboard/files/9cf4417e1eb89438b975 +49 -0
- package/harness/catalog/kits/dashboard/files/f84f0cf6a41afc21b64f +49 -0
- package/harness/catalog/kits/dashboard/files/ff7f571bbb2487b3ec23 +77 -0
- package/harness/catalog/kits/dashboard/manifest.json +52 -0
- package/harness/catalog/kits/data-table/files/1786ba4d3e0dba1d6a1f +19 -0
- package/harness/catalog/kits/data-table/files/36bac8f8e53119768b2e +154 -0
- package/harness/catalog/kits/data-table/files/460135fc626b5c2e7c33 +21 -0
- package/harness/catalog/kits/data-table/files/4cb7b4e9113b8414562f +106 -0
- package/harness/catalog/kits/data-table/files/5bafa7b36216f575d9cd +61 -0
- package/harness/catalog/kits/data-table/files/9cbb532f9f52b5b1b1cb +128 -0
- package/harness/catalog/kits/data-table/files/b5d5d7f18347734138e0 +607 -0
- package/harness/catalog/kits/data-table/files/d5dd11475a87206462f1 +95 -0
- package/harness/catalog/kits/data-table/manifest.json +56 -0
- package/harness/catalog/kits/docs-article/files/4cc9189b0d6a2bd7f59a +67 -0
- package/harness/catalog/kits/docs-article/files/642e7bd0b80a4a207c44 +73 -0
- package/harness/catalog/kits/docs-article/files/7f36cb5f0d4f5e103bde +18 -0
- package/harness/catalog/kits/docs-article/files/be0fb62d1c30dee65c74 +86 -0
- package/harness/catalog/kits/docs-article/files/c2018b502a8094818d8f +113 -0
- package/harness/catalog/kits/docs-article/files/dbc2840f315f672e1d74 +594 -0
- package/harness/catalog/kits/docs-article/manifest.json +50 -0
- package/harness/catalog/kits/form-states/files/0ef2ffae9d6f232f45e9 +124 -0
- package/harness/catalog/kits/form-states/files/437cb4c87ea365713cdd +68 -0
- package/harness/catalog/kits/form-states/files/88252259f19ed675a0dc +2099 -0
- package/harness/catalog/kits/form-states/files/96f75e622f16e97f3ea4 +62 -0
- package/harness/catalog/kits/form-states/files/b0b51ebf587b21fd89a1 +137 -0
- package/harness/catalog/kits/form-states/files/b52fb2fc480f0c6352bd +14 -0
- package/harness/catalog/kits/form-states/manifest.json +52 -0
- package/harness/catalog/kits/onboarding/files/322cf4dfc2ee0a035d85 +18 -0
- package/harness/catalog/kits/onboarding/files/3468d9690d9a781191ec +20 -0
- package/harness/catalog/kits/onboarding/files/6b468153260c66cd0413 +16 -0
- package/harness/catalog/kits/onboarding/files/7921743050eaf6de1a3d +73 -0
- package/harness/catalog/kits/onboarding/files/ae75e02daf70b4c8592f +105 -0
- package/harness/catalog/kits/onboarding/files/ce466020247ecf1ff5fe +119 -0
- package/harness/catalog/kits/onboarding/files/e669d75a65f4d15d8289 +352 -0
- package/harness/catalog/kits/onboarding/files/ea5a042d41c4a9418b24 +4 -0
- package/harness/catalog/kits/onboarding/manifest.json +53 -0
- package/harness/catalog/kits/profile/files/0fdd3c14afbdadcf1969 +16 -0
- package/harness/catalog/kits/profile/files/4a3c9a0031274cf07290 +43 -0
- package/harness/catalog/kits/profile/files/4aeca453e4792abf29de +520 -0
- package/harness/catalog/kits/profile/files/5b58bb5f93ecf12d69ff +96 -0
- package/harness/catalog/kits/profile/files/75b211244911b7cc480a +49 -0
- package/harness/catalog/kits/profile/files/881ef28864ed23ed93c8 +64 -0
- package/harness/catalog/kits/profile/files/cefb8073e21695cbf74b +42 -0
- package/harness/catalog/kits/profile/manifest.json +48 -0
- package/harness/catalog/kits/settings/files/0383a2564061dcf126a5 +70 -0
- package/harness/catalog/kits/settings/files/1a5d639c6803e7d03acc +119 -0
- package/harness/catalog/kits/settings/files/4344224a795d1beca0e8 +36 -0
- package/harness/catalog/kits/settings/files/6d38306218413c650752 +45 -0
- package/harness/catalog/kits/settings/files/9c61262f2fcf7346afce +43 -0
- package/harness/catalog/kits/settings/files/b4a7a4ccdc59465b8de5 +486 -0
- package/harness/catalog/kits/settings/files/d2ebbd6e94570b2c6434 +17 -0
- package/harness/catalog/kits/settings/files/ec7bce34a9f863882799 +33 -0
- package/harness/catalog/kits/settings/manifest.json +55 -0
- package/harness/catalog/kits/sign-in/files/0457945d67f57a0956b0 +22 -0
- package/harness/catalog/kits/sign-in/files/1778d506d6768426a33a +22 -0
- package/harness/catalog/kits/sign-in/files/276055c567cb979af600 +19 -0
- package/harness/catalog/kits/sign-in/files/361745a3ed43c753c615 +444 -0
- package/harness/catalog/kits/sign-in/files/552bdad5ce7559849e81 +17 -0
- package/harness/catalog/kits/sign-in/files/5ccdff5683e7c3fc7b66 +110 -0
- package/harness/catalog/kits/sign-in/files/5f8c4d12ea47ece52a44 +38 -0
- package/harness/catalog/kits/sign-in/files/ca224349b746c530f922 +110 -0
- package/harness/catalog/kits/sign-in/files/e50f092f7e5fa4ef4c22 +19 -0
- package/harness/catalog/kits/sign-in/manifest.json +55 -0
- package/harness/catalog/label/files/0d724d49f7d1d2ec7efc +1 -0
- package/harness/catalog/label/files/178c6bba6c9e90425d21 +2 -0
- package/harness/catalog/label/files/18342988a5792fb0bcad +170 -0
- package/harness/catalog/label/files/211d54defefbe5e94796 +37 -0
- package/harness/catalog/label/files/5340c9b911a7a4a11c69 +28 -0
- package/harness/catalog/label/files/59f0a37653f1e78ed28b +1 -0
- package/harness/catalog/label/files/6121a0a7157378c0fa2d +104 -0
- package/harness/catalog/label/files/905f249fb255abf67c32 +2 -0
- package/harness/catalog/label/files/92ba7e766a8e1b5a3cf0 +64 -0
- package/harness/catalog/label/files/977a534f8794467a47f2 +219 -0
- package/harness/catalog/label/files/aab49456f22f22d12017 +85 -0
- package/harness/catalog/label/files/c54411858ebf34a8cb54 +2 -0
- package/harness/catalog/label/files/c77857f888aab7f682af +3 -0
- package/harness/catalog/label/files/edf861c1fdb33efb3d2d +2 -0
- package/harness/catalog/label/files/eeafe176d4d778cc9380 +2 -0
- package/harness/catalog/label/files/f422c1d852b88024b703 +14 -0
- package/harness/catalog/label/manifest.json +79 -0
- package/harness/catalog/native-select/files/04dd3d3b7e52db816e7a +94 -0
- package/harness/catalog/native-select/files/0d1a9ad329393ddab564 +121 -0
- package/harness/catalog/native-select/files/13dbbc7bf43082986000 +10 -0
- package/harness/catalog/native-select/files/1da077d928618138c4b8 +200 -0
- package/harness/catalog/native-select/files/2113975ac7413cb45a61 +47 -0
- package/harness/catalog/native-select/files/744dbce3cb9ffb538c60 +83 -0
- package/harness/catalog/native-select/files/77300579b27d8b8dbfb8 +10 -0
- package/harness/catalog/native-select/files/9974bd4a983ce6e468ec +12 -0
- package/harness/catalog/native-select/files/c0626646c03aeb3ad93c +189 -0
- package/harness/catalog/native-select/files/c16f89dd4efac798101b +10 -0
- package/harness/catalog/native-select/files/c4b2e491bc54d6525edd +10 -0
- package/harness/catalog/native-select/files/cc71e265ac8c728163a0 +10 -0
- package/harness/catalog/native-select/files/ccc07dd1b217b5f634f0 +472 -0
- package/harness/catalog/native-select/files/d2f8e83f878359d164ec +10 -0
- package/harness/catalog/native-select/files/d6d4ee4692af5da60764 +19 -0
- package/harness/catalog/native-select/files/dafc51f382ef061a8113 +1 -0
- package/harness/catalog/native-select/files/ed3efff65cc3a8fb38e5 +12 -0
- package/harness/catalog/native-select/files/efb122a6a12da738c520 +10 -0
- package/harness/catalog/native-select/files/f3ce547f443bdf09f4ba +10 -0
- package/harness/catalog/native-select/files/fd1ad0d903b8ef4bacf7 +11 -0
- package/harness/catalog/native-select/manifest.json +97 -0
- package/harness/catalog/pagination/files/04910095041172b5656d +25 -0
- package/harness/catalog/pagination/files/13f03f9f29240862e939 +56 -0
- package/harness/catalog/pagination/files/18d235614c5082754f87 +90 -0
- package/harness/catalog/pagination/files/2772d7dca5a9b736fa27 +129 -0
- package/harness/catalog/pagination/files/2d6272cfbd3cd586ab9a +41 -0
- package/harness/catalog/pagination/files/393ce6151781df4f73b1 +7 -0
- package/harness/catalog/pagination/files/4178ae22ed24b8b0b2e3 +61 -0
- package/harness/catalog/pagination/files/60027b10f4f6405b078b +14 -0
- package/harness/catalog/pagination/files/60e0a8630f1f1b0c9860 +14 -0
- package/harness/catalog/pagination/files/636bdc45e5b52eb2fc36 +45 -0
- package/harness/catalog/pagination/files/73cef46d42733ef6d11b +41 -0
- package/harness/catalog/pagination/files/932e0ff1f3e4e70c7664 +19 -0
- package/harness/catalog/pagination/files/95f794d2b6a64320b411 +196 -0
- package/harness/catalog/pagination/files/a7618526ce3fc0595aa8 +46 -0
- package/harness/catalog/pagination/files/af2f75c1c60f40148e41 +30 -0
- package/harness/catalog/pagination/files/dc3354029b3743fa4607 +34 -0
- package/harness/catalog/pagination/files/f737799eba73ede286c6 +505 -0
- package/harness/catalog/pagination/manifest.json +81 -0
- package/harness/catalog/progress/files/06cd5195c1465d18cf67 +1 -0
- package/harness/catalog/progress/files/124314b4921167293987 +1 -0
- package/harness/catalog/progress/files/3f37f1d3cb4dfc6c6fe2 +1 -0
- package/harness/catalog/progress/files/46b8ec7859c9c59094a8 +1 -0
- package/harness/catalog/progress/files/52bb3ada2f1d1325d95a +43 -0
- package/harness/catalog/progress/files/683d8646b127ec5dd66e +2 -0
- package/harness/catalog/progress/files/98f3165379840778060d +129 -0
- package/harness/catalog/progress/files/9d3d72f2c3df4816a72f +38 -0
- package/harness/catalog/progress/files/ac4c4532f20085614826 +220 -0
- package/harness/catalog/progress/files/b1cf02fc7ecba00d0a5d +57 -0
- package/harness/catalog/progress/files/b9d67aae522deb2f2874 +82 -0
- package/harness/catalog/progress/files/ba1f86715e56b9d87904 +1 -0
- package/harness/catalog/progress/files/c0f9aa5c1b828ae95458 +21 -0
- package/harness/catalog/progress/files/cce615b40b94edc2bd0a +75 -0
- package/harness/catalog/progress/files/fbdbab9c99c0e52e7e93 +1 -0
- package/harness/catalog/progress/manifest.json +73 -0
- package/harness/catalog/radio-group/files/0524023470cd6e82adc8 +79 -0
- package/harness/catalog/radio-group/files/105409e5b8bba6c04d90 +9 -0
- package/harness/catalog/radio-group/files/15d87655c6fce7cbdd87 +7 -0
- package/harness/catalog/radio-group/files/1ab7aeaf41bd11881118 +8 -0
- package/harness/catalog/radio-group/files/1ac26e4aaaf55d172a29 +140 -0
- package/harness/catalog/radio-group/files/1f92eedd59d862a251bc +89 -0
- package/harness/catalog/radio-group/files/2e172c357c5ad16851b0 +7 -0
- package/harness/catalog/radio-group/files/2f70078682b30a266fdb +279 -0
- package/harness/catalog/radio-group/files/3ba2bc3ba6f029b80ca0 +7 -0
- package/harness/catalog/radio-group/files/6a5408af78fb93544257 +11 -0
- package/harness/catalog/radio-group/files/6d46f6c13443b681492a +87 -0
- package/harness/catalog/radio-group/files/85a4b3266a6a1d28e98e +17 -0
- package/harness/catalog/radio-group/files/8bc1af58d460a1f08417 +7 -0
- package/harness/catalog/radio-group/files/924c3130eda5e6a89b8c +85 -0
- package/harness/catalog/radio-group/files/965cd8ee2804c8db885f +2 -0
- package/harness/catalog/radio-group/files/9aed7c5fa69a16e32877 +7 -0
- package/harness/catalog/radio-group/files/b517f83f11efd06cecc6 +9 -0
- package/harness/catalog/radio-group/files/b5794de89d7617056bd7 +7 -0
- package/harness/catalog/radio-group/files/cf90166db3ba9acc2194 +52 -0
- package/harness/catalog/radio-group/files/df1cd5a2eb01d19cbecf +394 -0
- package/harness/catalog/radio-group/files/f0716924e08378be93db +7 -0
- package/harness/catalog/radio-group/manifest.json +101 -0
- package/harness/catalog/scroll-area/files/0609007de03faf1c3d0f +46 -0
- package/harness/catalog/scroll-area/files/1908a334d6f3a4dbf6c0 +21 -0
- package/harness/catalog/scroll-area/files/1e8f68bf069a5f387c34 +83 -0
- package/harness/catalog/scroll-area/files/41b80c94f170ea511175 +44 -0
- package/harness/catalog/scroll-area/files/4a42e479847375dcc3f9 +25 -0
- package/harness/catalog/scroll-area/files/4ca03842475a792cb0c1 +40 -0
- package/harness/catalog/scroll-area/files/55e014a395adc19f6cef +265 -0
- package/harness/catalog/scroll-area/files/60bc5ea08ee21de46d13 +123 -0
- package/harness/catalog/scroll-area/files/85a4352c5d2fceab3803 +19 -0
- package/harness/catalog/scroll-area/files/a3cd2f01d235d82495fb +2 -0
- package/harness/catalog/scroll-area/files/ade2527a8f6accd9b730 +6 -0
- package/harness/catalog/scroll-area/files/b2e8b1702898b8ca3833 +93 -0
- package/harness/catalog/scroll-area/files/da73cf074c32dc1be5f1 +61 -0
- package/harness/catalog/scroll-area/files/ebca80ece3c535585b1d +41 -0
- package/harness/catalog/scroll-area/files/f6fc569d113d49be8d9b +61 -0
- package/harness/catalog/scroll-area/manifest.json +73 -0
- package/harness/catalog/separator/files/374b9df00179421eddf2 +3 -0
- package/harness/catalog/separator/files/4e8122ded69b8f101fb2 +43 -0
- package/harness/catalog/separator/files/6d7eafd5d259b4a18d8c +168 -0
- package/harness/catalog/separator/files/84cb34e3692a988ae594 +27 -0
- package/harness/catalog/separator/files/9290cde82ff35a18d670 +3 -0
- package/harness/catalog/separator/files/a9afc792add2b428f1e8 +3 -0
- package/harness/catalog/separator/files/b35a57ea93c2a3cb70f8 +77 -0
- package/harness/catalog/separator/files/cf582f7054769bcef6eb +5 -0
- package/harness/catalog/separator/files/d1d489b25ae8086dd004 +11 -0
- package/harness/catalog/separator/files/d8a31d391f75f3a61fb3 +37 -0
- package/harness/catalog/separator/files/dd83a998ab6abc4d4a62 +1 -0
- package/harness/catalog/separator/files/eb2517d531a9906643d7 +47 -0
- package/harness/catalog/separator/files/f9759af59a3ba93dae9b +127 -0
- package/harness/catalog/separator/manifest.json +65 -0
- package/harness/catalog/sidebar/files/02c393cb36580af098d9 +23 -0
- package/harness/catalog/sidebar/files/0baeb5c4c8b7893d5fcf +756 -0
- package/harness/catalog/sidebar/files/1703dc3e2ad661ccbf64 +744 -0
- package/harness/catalog/sidebar/files/184473a92ca8fb31600e +29 -0
- package/harness/catalog/sidebar/files/1a887b38be934ce59719 +55 -0
- package/harness/catalog/sidebar/files/33842af58a18280c36aa +57 -0
- package/harness/catalog/sidebar/files/3e189ffc0c2682c10cf2 +187 -0
- package/harness/catalog/sidebar/files/42912dae260a1877fca7 +7 -0
- package/harness/catalog/sidebar/files/4e5ba4ef0af42f6a7adb +249 -0
- package/harness/catalog/sidebar/files/4ecc4d8ff1bf3d164a8b +21 -0
- package/harness/catalog/sidebar/files/508f864b7864c8394ca3 +27 -0
- package/harness/catalog/sidebar/files/5e75aef8fec95baad132 +90 -0
- package/harness/catalog/sidebar/files/68079b1aea589468b91b +21 -0
- package/harness/catalog/sidebar/files/7fc791d49df7f259257b +155 -0
- package/harness/catalog/sidebar/files/88cc94ff5db8b8216376 +7 -0
- package/harness/catalog/sidebar/files/91d221fdce2c9e43bd8c +16 -0
- package/harness/catalog/sidebar/files/a80295e689cbd36a473f +84 -0
- package/harness/catalog/sidebar/files/a84bff2047ae8764783d +29 -0
- package/harness/catalog/sidebar/files/b82a3010959395a48e1a +49 -0
- package/harness/catalog/sidebar/files/bc1e527aadf296b8d0ff +21 -0
- package/harness/catalog/sidebar/files/bcbd1ae5b1fd97c72c53 +11 -0
- package/harness/catalog/sidebar/files/c964f937cad048b84944 +92 -0
- package/harness/catalog/sidebar/files/daaaa332bc0d9d13ed98 +21 -0
- package/harness/catalog/sidebar/files/e4218aaf235e989cbd53 +21 -0
- package/harness/catalog/sidebar/files/ee8db7c1694c46686557 +26 -0
- package/harness/catalog/sidebar/files/f673ab38a8d4ae19f321 +31 -0
- package/harness/catalog/sidebar/manifest.json +129 -0
- package/harness/catalog/skeleton/files/01ba4719c80b6fe911b0 +1 -0
- package/harness/catalog/skeleton/files/0e6d882ff78e3beba2d6 +30 -0
- package/harness/catalog/skeleton/files/376c8cba27f74bac0cb9 +39 -0
- package/harness/catalog/skeleton/files/4612f603a58593ca55e0 +11 -0
- package/harness/catalog/skeleton/files/4d046332fd9d8d606983 +163 -0
- package/harness/catalog/skeleton/files/96d701044834f6a5836a +111 -0
- package/harness/catalog/skeleton/files/a634338190d8728efc1c +1 -0
- package/harness/catalog/skeleton/files/bbaabfa0b8dc2e8ea11a +74 -0
- package/harness/catalog/skeleton/files/c67fd2e5aaaba5a9d580 +28 -0
- package/harness/catalog/skeleton/files/cbccb00a131579632ae9 +27 -0
- package/harness/catalog/skeleton/manifest.json +57 -0
- package/harness/catalog/slider/files/055538028b3345e43a11 +214 -0
- package/harness/catalog/slider/files/0cb5c203dad3b98de5e0 +1 -0
- package/harness/catalog/slider/files/1ae10a01eb873280ce12 +4 -0
- package/harness/catalog/slider/files/1f79672390fd6db74fee +21 -0
- package/harness/catalog/slider/files/25dc6781375bc2c2df6d +482 -0
- package/harness/catalog/slider/files/393ec10fdb971be991de +72 -0
- package/harness/catalog/slider/files/424492d24591aef531e6 +4 -0
- package/harness/catalog/slider/files/42e0ad202b32731e7a02 +3 -0
- package/harness/catalog/slider/files/4cb5517efb58b1879afd +59 -0
- package/harness/catalog/slider/files/659100cf11a1d05b2c89 +3 -0
- package/harness/catalog/slider/files/668e93dad3504e8ef610 +95 -0
- package/harness/catalog/slider/files/71e517cb9c92a75885f5 +3 -0
- package/harness/catalog/slider/files/7657bd9ab41538c35120 +3 -0
- package/harness/catalog/slider/files/81017d93f3ad7c324811 +5 -0
- package/harness/catalog/slider/files/8b0655afa86f8d9dc2bc +177 -0
- package/harness/catalog/slider/files/a7488bb1ada74ac621e6 +3 -0
- package/harness/catalog/slider/files/b45d4e5cb309bcc465a5 +285 -0
- package/harness/catalog/slider/files/c9a088fbd66f42f4564d +4 -0
- package/harness/catalog/slider/files/ce3046c912906d11badf +6 -0
- package/harness/catalog/slider/files/d5508e45254809067beb +3 -0
- package/harness/catalog/slider/files/ee1caf9ef1db1c4f926e +3 -0
- package/harness/catalog/slider/files/f764bc666d741a7bf39f +3 -0
- package/harness/catalog/slider/manifest.json +101 -0
- package/harness/catalog/spinner/files/01ba4719c80b6fe911b0 +1 -0
- package/harness/catalog/spinner/files/0fee74c552acfcd09b79 +77 -0
- package/harness/catalog/spinner/files/2a5417a598cfa5c61d41 +77 -0
- package/harness/catalog/spinner/files/38ff39afe202b65ee51b +32 -0
- package/harness/catalog/spinner/files/56c45ae3c12de700ab2e +30 -0
- package/harness/catalog/spinner/files/6df67fa7b71cc2d5a264 +1 -0
- package/harness/catalog/spinner/files/6f49277820d19b30bf3e +30 -0
- package/harness/catalog/spinner/files/72eebb972f647017cb66 +161 -0
- package/harness/catalog/spinner/files/a21c624000065c68760a +1 -0
- package/harness/catalog/spinner/files/bf8438f942deebfd1eb1 +59 -0
- package/harness/catalog/spinner/files/c8addaaad7e52c7db0ae +34 -0
- package/harness/catalog/spinner/files/e445cd25a2db6a2e2a8b +1 -0
- package/harness/catalog/spinner/manifest.json +65 -0
- package/harness/catalog/switch/files/00386133e411f7f9f2b6 +4 -0
- package/harness/catalog/switch/files/0c1c3cb6e26d717784fc +2 -0
- package/harness/catalog/switch/files/3fc789ad053403f6c0a9 +20 -0
- package/harness/catalog/switch/files/44df1872eb49ea4e1e08 +483 -0
- package/harness/catalog/switch/files/49d0024b39574e56612f +3 -0
- package/harness/catalog/switch/files/592404eea89d590aca7a +2 -0
- package/harness/catalog/switch/files/6805184e8897c82550c4 +65 -0
- package/harness/catalog/switch/files/7a9c672629fef0bd0dec +2 -0
- package/harness/catalog/switch/files/8733d3a60ffcb6ade494 +210 -0
- package/harness/catalog/switch/files/910ca4e571bb756e4687 +4 -0
- package/harness/catalog/switch/files/92d0e744cb47aecc36bc +126 -0
- package/harness/catalog/switch/files/a195aa181ef4d92ffe20 +47 -0
- package/harness/catalog/switch/files/a6b8c28ba62b79ec987d +2 -0
- package/harness/catalog/switch/files/c365a534cf1a1122900d +2 -0
- package/harness/catalog/switch/files/df46601cb34ccf35b908 +1 -0
- package/harness/catalog/switch/files/e65b2ec11fa9a263d727 +153 -0
- package/harness/catalog/switch/files/ea1e13f86f2d9ea47d84 +93 -0
- package/harness/catalog/switch/files/eff1c0d843da2d594748 +4 -0
- package/harness/catalog/switch/files/f7eb67e0d31b393f05ae +3 -0
- package/harness/catalog/switch/files/fa365adda5b6c224f55f +4 -0
- package/harness/catalog/switch/manifest.json +101 -0
- package/harness/catalog/table/files/06a72c7ea0badb1cdb70 +83 -0
- package/harness/catalog/table/files/0c9127bfdbcb6b684d41 +9 -0
- package/harness/catalog/table/files/11aa2b5da6eff1bc677e +481 -0
- package/harness/catalog/table/files/218ac7260a0b3b039f4a +26 -0
- package/harness/catalog/table/files/4a4cf995bf282ff92770 +26 -0
- package/harness/catalog/table/files/4eb3d1edab7042aa14fe +36 -0
- package/harness/catalog/table/files/63d442facdfea1c86c66 +8 -0
- package/harness/catalog/table/files/7793bcf9af64c209d082 +59 -0
- package/harness/catalog/table/files/847886ae5dea29b33a82 +159 -0
- package/harness/catalog/table/files/9256f0a7cd82969c9563 +26 -0
- package/harness/catalog/table/files/a2c392393c5570977487 +98 -0
- package/harness/catalog/table/files/c3c72c2b5b63f99435d6 +32 -0
- package/harness/catalog/table/files/c7052cd9cf1d37957359 +26 -0
- package/harness/catalog/table/files/cf536589682b899cbbc8 +36 -0
- package/harness/catalog/table/files/e066a67b247e4ff773ed +72 -0
- package/harness/catalog/table/files/e64bfc90653d920c40cf +26 -0
- package/harness/catalog/table/files/ee2c6aa6812c21964fc3 +37 -0
- package/harness/catalog/table/files/efc084da8f3e1ca4bb1e +20 -0
- package/harness/catalog/table/files/f63191bea2943e7e8646 +26 -0
- package/harness/catalog/table/manifest.json +95 -0
- package/harness/catalog/tabs/files/07313e4500aa9db5bea9 +295 -0
- package/harness/catalog/tabs/files/0e09bb234c2d987563c5 +44 -0
- package/harness/catalog/tabs/files/21d28a1591efd7f95f0c +7 -0
- package/harness/catalog/tabs/files/3af8b9df88190e5769e3 +179 -0
- package/harness/catalog/tabs/files/417c2aab1ac8fc02bea8 +97 -0
- package/harness/catalog/tabs/files/5a911ebff6c576edf6e2 +7 -0
- package/harness/catalog/tabs/files/648e7828551135a79fe0 +506 -0
- package/harness/catalog/tabs/files/695a8dbd85e48a6df664 +7 -0
- package/harness/catalog/tabs/files/6baa7760f7e987f3ef6a +21 -0
- package/harness/catalog/tabs/files/73e91381aa7e8daf88a7 +49 -0
- package/harness/catalog/tabs/files/7aae2037e305f96b0b32 +12 -0
- package/harness/catalog/tabs/files/84a3fabd049bcd7acfdc +7 -0
- package/harness/catalog/tabs/files/a5164ae6a24abaec4ac6 +57 -0
- package/harness/catalog/tabs/files/a6bbaee4752f6c2390e2 +82 -0
- package/harness/catalog/tabs/files/ba5b8143d45ad81e1c60 +55 -0
- package/harness/catalog/tabs/files/bf00a8f1a90c35508882 +7 -0
- package/harness/catalog/tabs/files/c0984c7ad455c6b0cc4c +7 -0
- package/harness/catalog/tabs/files/ccdbaeb3df0390b93d29 +6 -0
- package/harness/catalog/tabs/files/cdea93ffff588335d13f +7 -0
- package/harness/catalog/tabs/files/edec052d6f4e11eb127b +4 -0
- package/harness/catalog/tabs/files/f3d876e31487d62c6b73 +72 -0
- package/harness/catalog/tabs/manifest.json +101 -0
- package/harness/catalog/textarea/files/0a144b3a4ff8b760723f +3 -0
- package/harness/catalog/textarea/files/1179ca65c96f2c4c7a62 +20 -0
- package/harness/catalog/textarea/files/3823c388f816fde1b42a +4 -0
- package/harness/catalog/textarea/files/3a82f5bd2f742c0e128c +1 -0
- package/harness/catalog/textarea/files/3b4902e2330b9e9e9cab +3 -0
- package/harness/catalog/textarea/files/43436aab74885a39c202 +5 -0
- package/harness/catalog/textarea/files/4d71c9cadff18e09886a +91 -0
- package/harness/catalog/textarea/files/62d0c969f21365d6b1b1 +5 -0
- package/harness/catalog/textarea/files/669e6acaa0b92e26f625 +3 -0
- package/harness/catalog/textarea/files/7045c50006094d7fc509 +60 -0
- package/harness/catalog/textarea/files/7077fee35ef05f1bbe4a +94 -0
- package/harness/catalog/textarea/files/814e737b0611c5065988 +445 -0
- package/harness/catalog/textarea/files/bc3570e5272f5184ad9e +3 -0
- package/harness/catalog/textarea/files/ce80d7e5afc76abd4959 +59 -0
- package/harness/catalog/textarea/files/cf73481c223c131e6c11 +3 -0
- package/harness/catalog/textarea/files/ece8fd9c92b58896f533 +187 -0
- package/harness/catalog/textarea/files/fa6d6b7547b43d802c91 +149 -0
- package/harness/catalog/textarea/manifest.json +85 -0
- package/harness/catalog/toggle/files/06e728076ff3708d9731 +1 -0
- package/harness/catalog/toggle/files/101275fbf8e9a92f05bd +350 -0
- package/harness/catalog/toggle/files/25c5c34ba3643df243fe +1 -0
- package/harness/catalog/toggle/files/4ff925b4bd7f7a54adbf +53 -0
- package/harness/catalog/toggle/files/552756c181edbe2ea36e +1 -0
- package/harness/catalog/toggle/files/7ca72db6ef05e84c818d +2 -0
- package/harness/catalog/toggle/files/86a49ecdda597c2abc1f +96 -0
- package/harness/catalog/toggle/files/c69429348ba9b2349c41 +1 -0
- package/harness/catalog/toggle/files/caa7211387429abff9ad +1 -0
- package/harness/catalog/toggle/files/cc3e62779d904733edbb +18 -0
- package/harness/catalog/toggle/files/d29935b92deece7918e8 +1 -0
- package/harness/catalog/toggle/files/dc0582c85be71895b397 +102 -0
- package/harness/catalog/toggle/files/e1dd7f07ac462c85e350 +1 -0
- package/harness/catalog/toggle/files/e50481803ad0d9f7c606 +1 -0
- package/harness/catalog/toggle/files/e5de72e6307749961d2b +50 -0
- package/harness/catalog/toggle/files/e98252325970f8f0de47 +6 -0
- package/harness/catalog/toggle/files/ebd668effb5c2ec9b74f +85 -0
- package/harness/catalog/toggle/files/ecd68b4d77b8b659e0cd +192 -0
- package/harness/catalog/toggle/manifest.json +89 -0
- package/harness/catalog/toggle-group/files/0fa34763f042c43ce73b +4 -0
- package/harness/catalog/toggle-group/files/190b8f8c8a7ae50ab17d +88 -0
- package/harness/catalog/toggle-group/files/19433a77dc520968adc7 +82 -0
- package/harness/catalog/toggle-group/files/2962515e0df1a6578234 +2 -0
- package/harness/catalog/toggle-group/files/599a5a04bc484ca3b63a +4 -0
- package/harness/catalog/toggle-group/files/5a8079fac7a37e9643e4 +3 -0
- package/harness/catalog/toggle-group/files/65b5cdec43bfefa463f5 +5 -0
- package/harness/catalog/toggle-group/files/6f6c143c8a199c913076 +4 -0
- package/harness/catalog/toggle-group/files/838108eb3fe1ef7caf97 +172 -0
- package/harness/catalog/toggle-group/files/9871546bf65ecfd8194e +85 -0
- package/harness/catalog/toggle-group/files/a43866348a36242e2b4e +17 -0
- package/harness/catalog/toggle-group/files/b39b752eca28b0def9f6 +4 -0
- package/harness/catalog/toggle-group/files/bd424f103ce11b4028bf +24 -0
- package/harness/catalog/toggle-group/files/c6d49c47cbca3721c6e0 +14 -0
- package/harness/catalog/toggle-group/files/cb207321ae902ad2316b +4 -0
- package/harness/catalog/toggle-group/files/d0677f0dfb61de88dd9e +278 -0
- package/harness/catalog/toggle-group/files/e1c72518f6c3a4cb47f6 +130 -0
- package/harness/catalog/toggle-group/files/ebcee45fa104cfa89d4f +55 -0
- package/harness/catalog/toggle-group/files/ed9cb4818db1e6341ad9 +565 -0
- package/harness/catalog/toggle-group/files/f846b21b23d9e132fded +4 -0
- package/harness/catalog/toggle-group/manifest.json +111 -0
- package/harness/catalog/typography/files/0a4d3686784349f2a671 +2 -0
- package/harness/catalog/typography/files/1004765ed611a2862d32 +1 -0
- package/harness/catalog/typography/files/2db24ae6bcb2f89eb7b6 +99 -0
- package/harness/catalog/typography/files/4b963f90bb762c552cf8 +2 -0
- package/harness/catalog/typography/files/4fb45c7c4e74d67c5bf5 +38 -0
- package/harness/catalog/typography/files/677a3d8e4ce6c2ac5f7f +28 -0
- package/harness/catalog/typography/files/6eb835a9f4bcf45c33f1 +2 -0
- package/harness/catalog/typography/files/70c577bc4141d2234973 +23 -0
- package/harness/catalog/typography/files/71af48bf10a9799ce540 +2 -0
- package/harness/catalog/typography/files/7dbdb256dedc6d4e8c42 +56 -0
- package/harness/catalog/typography/files/abe12ca3a7a166b0b4fb +222 -0
- package/harness/catalog/typography/files/b3b312ffd5ecb243853a +13 -0
- package/harness/catalog/typography/files/c47ff3172fe052fda28f +134 -0
- package/harness/catalog/typography/files/ea5ccd6abd4866523ab5 +335 -0
- package/harness/catalog/typography/files/ebb2f1791031cad5c2fc +70 -0
- package/harness/catalog/typography/manifest.json +73 -0
- package/harness/checks/a1-api.d.mts +4 -0
- package/harness/checks/a1-api.mjs +97 -0
- package/harness/checks/c1-contracts.d.mts +4 -0
- package/harness/checks/c1-contracts.mjs +92 -0
- package/harness/checks/c2-contract-tokens.d.mts +4 -0
- package/harness/checks/c2-contract-tokens.mjs +28 -0
- package/harness/checks/c3-parity.d.mts +4 -0
- package/harness/checks/c3-parity.mjs +68 -0
- package/harness/checks/d1-design-drift.d.mts +4 -0
- package/harness/checks/d1-design-drift.mjs +51 -0
- package/harness/checks/d3-design-docs.d.mts +4 -0
- package/harness/checks/d3-design-docs.mjs +66 -0
- package/harness/checks/d4-design-realization.d.mts +4 -0
- package/harness/checks/d4-design-realization.mjs +38 -0
- package/harness/checks/data/reference-phrases.json +35 -0
- package/harness/checks/f1-foundations.d.mts +4 -0
- package/harness/checks/f1-foundations.mjs +70 -0
- package/harness/checks/g1-generated.d.mts +4 -0
- package/harness/checks/g1-generated.mjs +156 -0
- package/harness/checks/h1-claude-layer.d.mts +4 -0
- package/harness/checks/h1-claude-layer.mjs +40 -0
- package/harness/checks/h2-typescript-sources.d.mts +5 -0
- package/harness/checks/h2-typescript-sources.mjs +33 -0
- package/harness/checks/k1-patterns.d.mts +4 -0
- package/harness/checks/k1-patterns.mjs +183 -0
- package/harness/checks/m1-docs-coverage.d.mts +4 -0
- package/harness/checks/m1-docs-coverage.mjs +63 -0
- package/harness/checks/o1-propagation.d.mts +4 -0
- package/harness/checks/o1-propagation.mjs +34 -0
- package/harness/checks/p1-prefix.d.mts +4 -0
- package/harness/checks/p1-prefix.mjs +55 -0
- package/harness/checks/r1-registry.d.mts +4 -0
- package/harness/checks/r1-registry.mjs +54 -0
- package/harness/checks/run.d.mts +10 -0
- package/harness/checks/run.mjs +122 -0
- package/harness/checks/s1-screen-reader.d.mts +4 -0
- package/harness/checks/s1-screen-reader.mjs +44 -0
- package/harness/checks/t1-tokens-valid.d.mts +9 -0
- package/harness/checks/t1-tokens-valid.mjs +77 -0
- package/harness/checks/t2-aliases.d.mts +4 -0
- package/harness/checks/t2-aliases.mjs +39 -0
- package/harness/checks/t3-modes.d.mts +4 -0
- package/harness/checks/t3-modes.mjs +21 -0
- package/harness/checks/t4-usage.d.mts +4 -0
- package/harness/checks/t4-usage.mjs +51 -0
- package/harness/checks/t5-literals.d.mts +4 -0
- package/harness/checks/t5-literals.mjs +24 -0
- package/harness/checks/t6-contrast.d.mts +14 -0
- package/harness/checks/t6-contrast.mjs +110 -0
- package/harness/checks/t7-interface.d.mts +4 -0
- package/harness/checks/t7-interface.mjs +96 -0
- package/harness/checks/types.d.mts +61 -0
- package/harness/checks/types.mjs +6 -0
- package/harness/checks/w1-white-label.d.mts +4 -0
- package/harness/checks/w1-white-label.mjs +143 -0
- package/harness/checks/x1-decisions.d.mts +15 -0
- package/harness/checks/x1-decisions.mjs +63 -0
- package/harness/cli/commands/add.d.mts +134 -0
- package/harness/cli/commands/add.mjs +53 -0
- package/harness/cli/commands/api.d.mts +87 -0
- package/harness/cli/commands/api.mjs +110 -0
- package/harness/cli/commands/audit-css.d.mts +108 -0
- package/harness/cli/commands/audit-css.mjs +23 -0
- package/harness/cli/commands/audit-decisions.d.mts +49 -0
- package/harness/cli/commands/audit-decisions.mjs +71 -0
- package/harness/cli/commands/audit-page.d.mts +34 -0
- package/harness/cli/commands/audit-page.mjs +28 -0
- package/harness/cli/commands/brand.d.mts +124 -0
- package/harness/cli/commands/brand.mjs +65 -0
- package/harness/cli/commands/check.d.mts +81 -0
- package/harness/cli/commands/check.mjs +36 -0
- package/harness/cli/commands/docs.d.mts +20 -0
- package/harness/cli/commands/docs.mjs +24 -0
- package/harness/cli/commands/doctor.d.mts +73 -0
- package/harness/cli/commands/doctor.mjs +113 -0
- package/harness/cli/commands/explain.d.mts +21 -0
- package/harness/cli/commands/explain.mjs +16 -0
- package/harness/cli/commands/generate.d.mts +16 -0
- package/harness/cli/commands/generate.mjs +17 -0
- package/harness/cli/commands/help.d.mts +50 -0
- package/harness/cli/commands/help.mjs +54 -0
- package/harness/cli/commands/icons.d.mts +61 -0
- package/harness/cli/commands/icons.mjs +45 -0
- package/harness/cli/commands/init.d.mts +236 -0
- package/harness/cli/commands/init.mjs +184 -0
- package/harness/cli/commands/kits.d.mts +91 -0
- package/harness/cli/commands/kits.mjs +65 -0
- package/harness/cli/commands/list.d.mts +48 -0
- package/harness/cli/commands/list.mjs +38 -0
- package/harness/cli/commands/prefix.d.mts +32 -0
- package/harness/cli/commands/prefix.mjs +24 -0
- package/harness/cli/commands/presets.d.mts +49 -0
- package/harness/cli/commands/presets.mjs +30 -0
- package/harness/cli/commands/propagate.d.mts +25 -0
- package/harness/cli/commands/propagate.mjs +66 -0
- package/harness/cli/commands/remove.d.mts +66 -0
- package/harness/cli/commands/remove.mjs +32 -0
- package/harness/cli/commands/selftest.d.mts +20 -0
- package/harness/cli/commands/selftest.mjs +21 -0
- package/harness/cli/commands/status.d.mts +51 -0
- package/harness/cli/commands/status.mjs +70 -0
- package/harness/cli/commands/swap.d.mts +40 -0
- package/harness/cli/commands/swap.mjs +29 -0
- package/harness/cli/commands/sync.d.mts +280 -0
- package/harness/cli/commands/sync.mjs +194 -0
- package/harness/cli/commands/tokens.d.mts +270 -0
- package/harness/cli/commands/tokens.mjs +342 -0
- package/harness/cli/commands/upgrade.d.mts +99 -0
- package/harness/cli/commands/upgrade.mjs +78 -0
- package/harness/cli/docs.d.mts +1 -0
- package/harness/cli/docs.mjs +53 -0
- package/harness/cli/interactive.d.mts +22 -0
- package/harness/cli/interactive.mjs +125 -0
- package/harness/cli/known-commands.json +150 -0
- package/harness/cli/known.d.mts +9 -0
- package/harness/cli/known.mjs +31 -0
- package/harness/cli/planned-commands.json +20 -0
- package/harness/cli/registry.d.mts +5 -0
- package/harness/cli/registry.mjs +34 -0
- package/harness/cli/run.d.mts +22 -0
- package/harness/cli/run.mjs +108 -0
- package/harness/cli/types.d.mts +88 -0
- package/harness/cli/types.mjs +1 -0
- package/harness/cli.d.mts +2 -0
- package/harness/cli.mjs +22 -0
- package/harness/commands/add.d.mts +11 -0
- package/harness/commands/add.mjs +71 -0
- package/harness/commands/audit-css.d.mts +70 -0
- package/harness/commands/audit-css.mjs +171 -0
- package/harness/commands/bootstrap.d.mts +163 -0
- package/harness/commands/bootstrap.mjs +517 -0
- package/harness/commands/brand.d.mts +70 -0
- package/harness/commands/brand.mjs +220 -0
- package/harness/commands/catalog.d.mts +149 -0
- package/harness/commands/catalog.mjs +521 -0
- package/harness/commands/explain.d.mts +1 -0
- package/harness/commands/explain.mjs +76 -0
- package/harness/commands/init.d.mts +44 -0
- package/harness/commands/init.mjs +77 -0
- package/harness/commands/prefix.d.mts +19 -0
- package/harness/commands/prefix.mjs +139 -0
- package/harness/commands/start.d.mts +75 -0
- package/harness/commands/start.mjs +154 -0
- package/harness/commands/swap.d.mts +23 -0
- package/harness/commands/swap.mjs +30 -0
- package/harness/commands/tokens-import.d.mts +105 -0
- package/harness/commands/tokens-import.mjs +598 -0
- package/harness/commands/tokens.d.mts +175 -0
- package/harness/commands/tokens.mjs +989 -0
- package/harness/commands/upgrade.d.mts +45 -0
- package/harness/commands/upgrade.mjs +181 -0
- package/harness/generators/foundation.d.mts +52 -0
- package/harness/generators/foundation.mjs +275 -0
- package/harness/generators/links.d.mts +42 -0
- package/harness/generators/links.mjs +203 -0
- package/harness/generators/overrides.d.mts +10 -0
- package/harness/generators/overrides.mjs +40 -0
- package/harness/kits/index.json +158 -0
- package/harness/lib/agent-config.d.mts +23 -0
- package/harness/lib/agent-config.mjs +109 -0
- package/harness/lib/agent-diagnostics.d.mts +25 -0
- package/harness/lib/agent-diagnostics.mjs +139 -0
- package/harness/lib/api.d.mts +166 -0
- package/harness/lib/api.mjs +222 -0
- package/harness/lib/audits.d.mts +3 -0
- package/harness/lib/audits.mjs +14 -0
- package/harness/lib/claude-layer.d.mts +59 -0
- package/harness/lib/claude-layer.mjs +312 -0
- package/harness/lib/color.d.mts +17 -0
- package/harness/lib/color.mjs +89 -0
- package/harness/lib/css.d.mts +25 -0
- package/harness/lib/css.mjs +64 -0
- package/harness/lib/decisions.d.mts +14 -0
- package/harness/lib/decisions.mjs +65 -0
- package/harness/lib/design/compare-runtime.mjs +58 -0
- package/harness/lib/design/compare.d.mts +57 -0
- package/harness/lib/design/compare.mjs +153 -0
- package/harness/lib/design/components.d.mts +29 -0
- package/harness/lib/design/components.mjs +52 -0
- package/harness/lib/design/description.d.mts +25 -0
- package/harness/lib/design/description.mjs +57 -0
- package/harness/lib/design/doc-text.d.mts +137 -0
- package/harness/lib/design/doc-text.mjs +63 -0
- package/harness/lib/design/docs.d.mts +80 -0
- package/harness/lib/design/docs.mjs +343 -0
- package/harness/lib/design/library.d.mts +91 -0
- package/harness/lib/design/library.mjs +248 -0
- package/harness/lib/design/parity.d.mts +8 -0
- package/harness/lib/design/parity.mjs +42 -0
- package/harness/lib/design/patterns.d.mts +48 -0
- package/harness/lib/design/patterns.mjs +90 -0
- package/harness/lib/design/plan.d.mts +20 -0
- package/harness/lib/design/plan.mjs +120 -0
- package/harness/lib/design/realize.d.mts +51 -0
- package/harness/lib/design/realize.mjs +86 -0
- package/harness/lib/design/recipes-more.d.mts +2 -0
- package/harness/lib/design/recipes-more.mjs +461 -0
- package/harness/lib/design/recipes.d.mts +12 -0
- package/harness/lib/design/recipes.mjs +285 -0
- package/harness/lib/design/sync.d.mts +80 -0
- package/harness/lib/design/sync.mjs +163 -0
- package/harness/lib/design/tokens.d.mts +55 -0
- package/harness/lib/design/tokens.mjs +243 -0
- package/harness/lib/design/verify.d.mts +84 -0
- package/harness/lib/design/verify.mjs +158 -0
- package/harness/lib/design-docs.d.mts +73 -0
- package/harness/lib/design-docs.mjs +38 -0
- package/harness/lib/files.d.mts +21 -0
- package/harness/lib/files.mjs +99 -0
- package/harness/lib/icons.d.mts +24 -0
- package/harness/lib/icons.mjs +67 -0
- package/harness/lib/installed.d.mts +16 -0
- package/harness/lib/installed.mjs +121 -0
- package/harness/lib/interface.d.mts +62 -0
- package/harness/lib/interface.mjs +201 -0
- package/harness/lib/page-outline.d.mts +2 -0
- package/harness/lib/page-outline.mjs +19 -0
- package/harness/lib/propagation.d.mts +20 -0
- package/harness/lib/propagation.mjs +91 -0
- package/harness/lib/renames.d.mts +22 -0
- package/harness/lib/renames.mjs +78 -0
- package/harness/lib/schema.d.mts +16 -0
- package/harness/lib/schema.mjs +63 -0
- package/harness/lib/tokens.d.mts +56 -0
- package/harness/lib/tokens.mjs +136 -0
- package/harness/manifest.json +65 -0
- package/harness/standards/borderWidth.json +20 -0
- package/harness/standards/breakpoints.json +36 -0
- package/harness/standards/contrast.json +53 -0
- package/harness/standards/density.json +85 -0
- package/harness/standards/elevation.json +118 -0
- package/harness/standards/iconSizes.json +33 -0
- package/harness/standards/layoutGrid.json +31 -0
- package/harness/standards/letterSpacing.json +35 -0
- package/harness/standards/lineHeight.json +39 -0
- package/harness/standards/motion.json +281 -0
- package/harness/standards/neutrals.json +62 -0
- package/harness/standards/opacity.json +24 -0
- package/harness/standards/radius.json +50 -0
- package/harness/standards/rampMethods.json +126 -0
- package/harness/standards/resolve.d.mts +154 -0
- package/harness/standards/resolve.mjs +209 -0
- package/harness/standards/semanticRoles.json +76 -0
- package/harness/standards/spacing.json +141 -0
- package/harness/standards/typeScale.json +119 -0
- package/harness/standards/weights.json +39 -0
- package/harness/standards/zIndex.json +58 -0
- package/harness/starters/blank.json +9 -0
- package/harness/starters/foundations.json +9 -0
- package/harness/starters/from-codebase.json +12 -0
- package/harness/starters/import.json +11 -0
- package/harness/starters/library+kits.json +9 -0
- package/harness/starters/library.json +9 -0
- package/harness/starters/pick.json +9 -0
- package/harness/templates/CLAUDE.md +30 -0
- package/harness/templates/brand-links.json +234 -0
- package/harness/templates/move-to-claude-INSTALL.md +43 -0
- package/harness/templates/project/.agents/skills/sketchbook/SKILL.md +10 -0
- package/harness/templates/project/.aiassistant/rules/sketchbook.md +7 -0
- package/harness/templates/project/.claude/settings.json +104 -0
- package/harness/templates/project/.codex/hooks.json +19 -0
- package/harness/templates/project/.codex/sketchbook-guard.mjs +57 -0
- package/harness/templates/project/.gemini/settings.json +16 -0
- package/harness/templates/project/.gemini/sketchbook-guard.mjs +15 -0
- package/harness/templates/project/.github/copilot-instructions.md +3 -0
- package/harness/templates/project/.github/hooks/sketchbook-guard.mjs +68 -0
- package/harness/templates/project/.github/hooks/sketchbook.json +12 -0
- package/harness/templates/project/.storybook/main.ts +12 -0
- package/harness/templates/project/.storybook/preview.ts +38 -0
- package/harness/templates/project/.trae/rules/sketchbook.md +7 -0
- package/harness/templates/project/AGENT-WORKFLOWS.md +53 -0
- package/harness/templates/project/AGENTS.md +10 -0
- package/harness/templates/project/GEMINI.md +3 -0
- package/harness/templates/project/THIRD_PARTY_NOTICES.md +28 -0
- package/harness/templates/project/docs/getting-started.md +64 -0
- package/harness/templates/project/eslint-plugins.d.ts +7 -0
- package/harness/templates/project/eslint.config.js +44 -0
- package/harness/templates/project/gitignore +47 -0
- package/harness/templates/project/harness.config.json +50 -0
- package/harness/templates/project/package-lock.json +8400 -0
- package/harness/templates/project/playwright/fixtures.ts +2 -0
- package/harness/templates/project/playwright/helpers/a11y.ts +165 -0
- package/harness/templates/project/playwright/helpers/elements.ts +1 -0
- package/harness/templates/project/playwright/helpers/events.ts +51 -0
- package/harness/templates/project/playwright/helpers/forms.ts +53 -0
- package/harness/templates/project/playwright/helpers/foundations.ts +36 -0
- package/harness/templates/project/playwright/helpers/patterns.ts +89 -0
- package/harness/templates/project/playwright/helpers/storybook.ts +24 -0
- package/harness/templates/project/playwright/helpers/styles.ts +18 -0
- package/harness/templates/project/playwright/helpers/tokens.ts +70 -0
- package/harness/templates/project/playwright/playwright.config.ts +28 -0
- package/harness/templates/project/playwright/tests/foundations/color.behavior.spec.ts +59 -0
- package/harness/templates/project/playwright/tests/foundations/families.behavior.spec.ts +28 -0
- package/harness/templates/project/playwright/tests/foundations/motion.behavior.spec.ts +32 -0
- package/harness/templates/project/playwright/tests/foundations/pages.behavior.spec.ts +54 -0
- package/harness/templates/project/playwright/tests/foundations/samples.behavior.spec.ts +36 -0
- package/harness/templates/project/playwright/tests/screen-reader/stories.spec.ts +95 -0
- package/harness/templates/project/prettier.config.ts +16 -0
- package/harness/templates/project/spec/api.json +319 -0
- package/harness/templates/project/spec/decisions/DECISIONS.md +854 -0
- package/harness/templates/project/spec/registry.json +272 -0
- package/harness/templates/project/spec/schemas/api.schema.json +158 -0
- package/harness/templates/project/spec/schemas/brand-config.schema.json +753 -0
- package/harness/templates/project/spec/schemas/contract.schema.json +678 -0
- package/harness/templates/project/spec/schemas/figma-practices.schema.json +49 -0
- package/harness/templates/project/spec/schemas/harness-config.schema.json +89 -0
- package/harness/templates/project/spec/schemas/registry.schema.json +29 -0
- package/harness/templates/project/spec/tokens/contrast.json +90 -0
- package/harness/templates/project/spec/tokens/overrides.json +4 -0
- package/harness/templates/project/src/controllers/labelled-by.ts +56 -0
- package/harness/templates/project/src/controllers/name-warning.ts +28 -0
- package/harness/templates/project/src/controllers/relink.ts +46 -0
- package/harness/templates/project/src/controllers/roving-focus.ts +88 -0
- package/harness/templates/project/src/mixins/form-associated.ts +117 -0
- package/harness/templates/project/src/mixins/native-control.ts +111 -0
- package/harness/templates/project/src/stories/contract.ts +61 -0
- package/harness/templates/project/src/stories/foundations/BorderWidth.stories.ts +19 -0
- package/harness/templates/project/src/stories/foundations/Color.stories.ts +126 -0
- package/harness/templates/project/src/stories/foundations/Density.stories.ts +35 -0
- package/harness/templates/project/src/stories/foundations/Elevation.stories.ts +19 -0
- package/harness/templates/project/src/stories/foundations/IconSizes.stories.ts +28 -0
- package/harness/templates/project/src/stories/foundations/LayoutGrid.stories.ts +52 -0
- package/harness/templates/project/src/stories/foundations/Motion.stories.ts +105 -0
- package/harness/templates/project/src/stories/foundations/Opacity.stories.ts +19 -0
- package/harness/templates/project/src/stories/foundations/Radius.stories.ts +21 -0
- package/harness/templates/project/src/stories/foundations/Spacing.stories.ts +66 -0
- package/harness/templates/project/src/stories/foundations/Typography.stories.ts +94 -0
- package/harness/templates/project/src/stories/foundations/ZIndex.stories.ts +40 -0
- package/harness/templates/project/src/stories/foundations/families.ts +35 -0
- package/harness/templates/project/src/stories/foundations/page.ts +150 -0
- package/harness/templates/project/src/stories/foundations/tokens.ts +126 -0
- package/harness/templates/project/src/stories/glob.d.ts +6 -0
- package/harness/templates/project/src/stories/raw.d.ts +4 -0
- package/harness/templates/project/src/styles/_a11y.scss +33 -0
- package/harness/templates/project/src/utils/focus-wrap.ts +33 -0
- package/harness/templates/project/src/utils/safe-href.ts +16 -0
- package/harness/templates/project/tsconfig.json +24 -0
- package/harness/templates/project/tsconfig.stories.json +6 -0
- package/harness/templates/project/tsconfig.tools.json +12 -0
- package/harness/templates/project/tsup.config.ts +22 -0
- package/harness/templates/semantic/base.tokens.json +570 -0
- package/harness/templates/semantic/dark.tokens.json +98 -0
- package/harness/templates/semantic/light.tokens.json +99 -0
- package/harness/test/TEST.md +256 -0
- package/harness/test/agent-config.test.d.mts +1 -0
- package/harness/test/agent-config.test.mjs +80 -0
- package/harness/test/agent-diagnostics.test.d.mts +1 -0
- package/harness/test/agent-diagnostics.test.mjs +86 -0
- package/harness/test/agent-guidance.test.d.mts +1 -0
- package/harness/test/agent-guidance.test.mjs +25 -0
- package/harness/test/bootstrap.test.d.mts +1 -0
- package/harness/test/bootstrap.test.mjs +835 -0
- package/harness/test/build.test.d.mts +1 -0
- package/harness/test/build.test.mjs +217 -0
- package/harness/test/checks.test.d.mts +1 -0
- package/harness/test/checks.test.mjs +711 -0
- package/harness/test/claude-layer.test.d.mts +1 -0
- package/harness/test/claude-layer.test.mjs +125 -0
- package/harness/test/claude-live.test.d.mts +1 -0
- package/harness/test/claude-live.test.mjs +160 -0
- package/harness/test/cli.test.d.mts +1 -0
- package/harness/test/cli.test.mjs +236 -0
- package/harness/test/codex-guard.test.d.mts +1 -0
- package/harness/test/codex-guard.test.mjs +111 -0
- package/harness/test/codex-instructions.test.d.mts +1 -0
- package/harness/test/codex-instructions.test.mjs +43 -0
- package/harness/test/codex-live.test.d.mts +1 -0
- package/harness/test/codex-live.test.mjs +90 -0
- package/harness/test/copilot-guard.test.d.mts +1 -0
- package/harness/test/copilot-guard.test.mjs +117 -0
- package/harness/test/copilot-live.test.d.mts +1 -0
- package/harness/test/copilot-live.test.mjs +113 -0
- package/harness/test/design.test.d.mts +1 -0
- package/harness/test/design.test.mjs +1023 -0
- package/harness/test/docs-reference.test.d.mts +1 -0
- package/harness/test/docs-reference.test.mjs +83 -0
- package/harness/test/fixtures/import/shadcn-theme.css +51 -0
- package/harness/test/fixtures/import/tokens-studio.json +83 -0
- package/harness/test/fonts.test.d.mts +1 -0
- package/harness/test/fonts.test.mjs +48 -0
- package/harness/test/foundations.test.d.mts +1 -0
- package/harness/test/foundations.test.mjs +238 -0
- package/harness/test/gemini-guard.test.d.mts +1 -0
- package/harness/test/gemini-guard.test.mjs +124 -0
- package/harness/test/gemini-live.test.d.mts +1 -0
- package/harness/test/gemini-live.test.mjs +116 -0
- package/harness/test/golden/brand.default.json +18 -0
- package/harness/test/golden/tokens.default.css +407 -0
- package/harness/test/helpers.d.mts +28 -0
- package/harness/test/helpers.mjs +43 -0
- package/harness/test/hooks.test.d.mts +1 -0
- package/harness/test/hooks.test.mjs +192 -0
- package/harness/test/opencode-live.test.d.mts +1 -0
- package/harness/test/opencode-live.test.mjs +93 -0
- package/harness/test/package-lifecycle.test.d.mts +1 -0
- package/harness/test/package-lifecycle.test.mjs +73 -0
- package/harness/test/package.test.d.mts +1 -0
- package/harness/test/package.test.mjs +69 -0
- package/harness/test/portable-decisions.test.d.mts +1 -0
- package/harness/test/portable-decisions.test.mjs +99 -0
- package/harness/test/portable-outline.test.d.mts +1 -0
- package/harness/test/portable-outline.test.mjs +39 -0
- package/harness/test/prefix.test.d.mts +1 -0
- package/harness/test/prefix.test.mjs +66 -0
- package/harness/test/preset-docs.test.d.mts +8 -0
- package/harness/test/preset-docs.test.mjs +217 -0
- package/harness/test/propagate.test.d.mts +1 -0
- package/harness/test/propagate.test.mjs +108 -0
- package/harness/test/reference.d.mts +6 -0
- package/harness/test/reference.mjs +62 -0
- package/harness/test/safety.test.d.mts +1 -0
- package/harness/test/safety.test.mjs +479 -0
- package/harness/test/starters.test.d.mts +1 -0
- package/harness/test/starters.test.mjs +504 -0
- package/harness/test/sync-reference.d.mts +9 -0
- package/harness/test/sync-reference.mjs +50 -0
- package/harness/test/tokens.test.d.mts +1 -0
- package/harness/test/tokens.test.mjs +549 -0
- package/harness/test/wall.d.mts +1 -0
- package/harness/test/wall.mjs +57 -0
- package/package.json +150 -4
- package/scripts/audit.mjs +25 -0
- package/scripts/build-barrel.mjs +16 -0
- package/scripts/build-catalog.mjs +7 -0
- package/scripts/build-harness.mjs +107 -0
- package/scripts/build-schema-types.mjs +21 -0
- package/scripts/build-styles.mjs +61 -0
- package/scripts/discover-components.mjs +63 -0
- package/spec/schemas/api.schema.json +158 -0
- package/spec/schemas/brand-config.schema.json +753 -0
- package/spec/schemas/contract.schema.json +678 -0
- package/spec/schemas/figma-practices.schema.json +49 -0
- package/spec/schemas/harness-config.schema.json +89 -0
- package/spec/schemas/registry.schema.json +29 -0
|
@@ -0,0 +1,989 @@
|
|
|
1
|
+
// sketchbook tokens …: change foundations and semantic tokens through the harness. Every mutating operation is a plan
|
|
2
|
+
// (the files it writes, or an apply(dir) step) run by runPlan on a temporary stage: write → regenerate (foundation +
|
|
3
|
+
// links) → build → brands → interface → token checks; a real run copies the changed files back only when they pass.
|
|
4
|
+
import { readFile, writeFile, mkdtemp, rm, mkdir, access, stat, readdir } from 'node:fs/promises';
|
|
5
|
+
import { spawnSync } from 'node:child_process';
|
|
6
|
+
import { createHash } from 'node:crypto';
|
|
7
|
+
import { tmpdir } from 'node:os';
|
|
8
|
+
import { join, dirname } from 'node:path';
|
|
9
|
+
import { runGenerator, generate, buildFoundation } from '../generators/foundation.mjs';
|
|
10
|
+
import { computeLinks, foundationMap } from '../generators/links.mjs';
|
|
11
|
+
import { buildTokens } from '../build/index.mjs';
|
|
12
|
+
import { validate } from '../lib/schema.mjs';
|
|
13
|
+
import { engineSchema, errorMessage, parseJson } from '../lib/files.mjs';
|
|
14
|
+
import { flatten, loadAll, ALIAS } from '../lib/tokens.mjs';
|
|
15
|
+
import { cssVarName } from '../lib/css.mjs';
|
|
16
|
+
import { KNOWN as TYPES, VALUE } from '../checks/t1-tokens-valid.mjs';
|
|
17
|
+
import { buildCatalog, readConfig } from './catalog.mjs';
|
|
18
|
+
import { buildBrands } from './brand.mjs';
|
|
19
|
+
import { buildInterface, loadInterfaceInputs, collectReferences, varIndex, referenceFiles, INTERFACE_FILE } from '../lib/interface.mjs';
|
|
20
|
+
import { renameJsonText, renameCodeText } from '../lib/renames.mjs';
|
|
21
|
+
import { patternFiles } from '../lib/design-docs.mjs';
|
|
22
|
+
import { resolveBrand, families, family, presetsOf, getPreset, FAMILY_KEYS, modesOf } from '../standards/resolve.mjs';
|
|
23
|
+
const CSS = 'generated/css/tokens.css';
|
|
24
|
+
const BRAND = 'brand.config.json';
|
|
25
|
+
const CONTRAST = 'spec/tokens/contrast.json';
|
|
26
|
+
const LINKS = 'spec/tokens/brand-links.json';
|
|
27
|
+
export const RENAMES = 'spec/tokens/renames.json';
|
|
28
|
+
const RENAMES_DESCRIPTION = 'Semantic token renames, oldest first. Catalog installs apply them to incoming components and kits (SB-0059..62).';
|
|
29
|
+
const semanticFile = (name) => `spec/tokens/semantic/${name}.tokens.json`;
|
|
30
|
+
const readText = async (root, rel) => { try {
|
|
31
|
+
return await readFile(join(root, rel), 'utf8');
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
return null;
|
|
35
|
+
} };
|
|
36
|
+
const readJson = async (root, rel) => {
|
|
37
|
+
const t = await readText(root, rel);
|
|
38
|
+
if (t === null)
|
|
39
|
+
return null;
|
|
40
|
+
try {
|
|
41
|
+
return parseJson(t);
|
|
42
|
+
}
|
|
43
|
+
catch (e) {
|
|
44
|
+
throw fail(`${rel} is not valid JSON (${errorMessage(e)}). Nothing was written.`, 'Fix the file (git diff shows what changed), then run the command again.');
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
const exists = async (p) => { try {
|
|
48
|
+
await access(p);
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
return false;
|
|
53
|
+
} };
|
|
54
|
+
export const serialize = (doc) => JSON.stringify(doc, null, 2) + '\n';
|
|
55
|
+
export const fail = (msg, fix) => Object.assign(new Error(msg), { fix });
|
|
56
|
+
const isObj = (v) => v !== null && typeof v === 'object' && !Array.isArray(v);
|
|
57
|
+
// String() taken while the value is still unknown: the same coercion a template literal did in the untyped code.
|
|
58
|
+
const show = (v) => String(v);
|
|
59
|
+
const isIndexable = (v) => typeof v === 'object' && v !== null;
|
|
60
|
+
// Dot-path walks over parsed JSON: where the untyped property access threw a TypeError (a missing or non-object
|
|
61
|
+
// brand.config.json), this throws the same error.
|
|
62
|
+
function indexable(v, k, op) {
|
|
63
|
+
if (isIndexable(v))
|
|
64
|
+
return v;
|
|
65
|
+
if (v === null || v === undefined)
|
|
66
|
+
throw new TypeError(`Cannot ${op} properties of ${String(v)} (${op === 'read' ? 'reading' : 'setting'} '${k}')`);
|
|
67
|
+
throw new TypeError(`Cannot create property '${k}' on ${typeof v} '${show(v)}'`);
|
|
68
|
+
}
|
|
69
|
+
const lastOf = (parts) => parts.at(-1) ?? '';
|
|
70
|
+
// ---------- CSS diff ----------
|
|
71
|
+
// tokens.css -> { mode: Map(var -> value) }. ":root" holds mode-less values; the prefers-color-scheme copy is skipped.
|
|
72
|
+
export function parseCssVars(text) {
|
|
73
|
+
const modes = {};
|
|
74
|
+
const stack = [];
|
|
75
|
+
for (const line of (text ?? '').split('\n')) {
|
|
76
|
+
const open = /^\s*(.+?)\s*\{\s*$/.exec(line);
|
|
77
|
+
if (open) {
|
|
78
|
+
stack.push(open[1] ?? '');
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
if (/^\s*\}\s*$/.test(line)) {
|
|
82
|
+
stack.pop();
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
const decl = /^\s*(--[A-Za-z0-9_-]+)\s*:\s*(.*?);?\s*$/.exec(line);
|
|
86
|
+
if (!decl || !stack.length || stack.some((s) => s.startsWith('@media')))
|
|
87
|
+
continue;
|
|
88
|
+
const theme = /\[data-theme="([^"]+)"\]/.exec(stack.at(-1) ?? '');
|
|
89
|
+
const mode = theme ? (theme[1] ?? '') : ':root';
|
|
90
|
+
(modes[mode] ??= new Map()).set(decl[1] ?? '', decl[2] ?? '');
|
|
91
|
+
}
|
|
92
|
+
return modes;
|
|
93
|
+
}
|
|
94
|
+
export function cssDiff(before, after) {
|
|
95
|
+
const a = parseCssVars(before);
|
|
96
|
+
const b = parseCssVars(after);
|
|
97
|
+
const out = {};
|
|
98
|
+
for (const mode of [...new Set([...Object.keys(a), ...Object.keys(b)])].sort()) {
|
|
99
|
+
const x = a[mode] ?? new Map();
|
|
100
|
+
const y = b[mode] ?? new Map();
|
|
101
|
+
const d = { added: [], removed: [], changed: [] };
|
|
102
|
+
for (const [k, v] of y)
|
|
103
|
+
if (!x.has(k))
|
|
104
|
+
d.added.push({ name: k, after: v });
|
|
105
|
+
else if (x.get(k) !== v)
|
|
106
|
+
d.changed.push({ name: k, before: x.get(k), after: v });
|
|
107
|
+
for (const [k, v] of x)
|
|
108
|
+
if (!y.has(k))
|
|
109
|
+
d.removed.push({ name: k, before: v });
|
|
110
|
+
if (d.added.length || d.removed.length || d.changed.length)
|
|
111
|
+
out[mode] = d;
|
|
112
|
+
}
|
|
113
|
+
return out;
|
|
114
|
+
}
|
|
115
|
+
export function formatDiff(diff, limit = 12) {
|
|
116
|
+
const lines = [];
|
|
117
|
+
const modes = Object.entries(diff);
|
|
118
|
+
if (!modes.length)
|
|
119
|
+
return ['CSS: no custom property changed.'];
|
|
120
|
+
for (const [m, d] of modes) {
|
|
121
|
+
lines.push(`CSS ${m}: ${d.changed.length} changed, ${d.added.length} added, ${d.removed.length} removed`);
|
|
122
|
+
const rows = [...d.changed.map((c) => ` ~ ${c.name}: ${c.before} -> ${c.after}`), ...d.added.map((c) => ` + ${c.name}: ${c.after}`), ...d.removed.map((c) => ` - ${c.name}`)];
|
|
123
|
+
lines.push(...rows.slice(0, limit), ...(rows.length > limit ? [` … ${rows.length - limit} more (sketchbook tokens diff)`] : []));
|
|
124
|
+
}
|
|
125
|
+
return lines;
|
|
126
|
+
}
|
|
127
|
+
export function gitCss(root, ref = 'HEAD') {
|
|
128
|
+
const r = spawnSync('git', ['-C', root, 'show', `${ref}:./${CSS}`], { encoding: 'utf8', maxBuffer: 64 * 1024 * 1024 });
|
|
129
|
+
if (r.status !== 0)
|
|
130
|
+
throw fail(`Cannot read ${CSS} at ${ref}: ${(r.stderr || '').trim().split('\n')[0] || 'not a git repository'}`, 'Run inside a git repository with the file committed, or pass --against <ref>.');
|
|
131
|
+
return r.stdout;
|
|
132
|
+
}
|
|
133
|
+
export async function diffAgainst(root, ref = 'HEAD') {
|
|
134
|
+
const now = await readText(root, CSS);
|
|
135
|
+
if (now === null)
|
|
136
|
+
throw fail(`${CSS} not found.`, 'Run npm run tokens.');
|
|
137
|
+
return cssDiff(gitCss(root, ref), now);
|
|
138
|
+
}
|
|
139
|
+
// ---------- impact ----------
|
|
140
|
+
const aliasOf = (v) => (typeof v === 'string' ? ALIAS.exec(v)?.[1] ?? null : null);
|
|
141
|
+
export async function impact(root, target) {
|
|
142
|
+
const inputs = await loadInterfaceInputs(root);
|
|
143
|
+
const { all, prefix } = inputs;
|
|
144
|
+
const index = varIndex(all, prefix);
|
|
145
|
+
const path = target.startsWith('--') ? index.get(target)?.path : target;
|
|
146
|
+
const where = all.sets.flatMap((s) => s.tokens.filter((t) => t.path === path).map((t) => ({ layer: s.layer, mode: s.mode, value: t.value, type: t.type, file: t.file })));
|
|
147
|
+
const first = where[0];
|
|
148
|
+
if (!path || !first) {
|
|
149
|
+
const known = [...index.values()].map((v) => v.path);
|
|
150
|
+
const near = known.filter((p) => p.includes(String(target).replace(/^--[a-z0-9]+-/, '').split(/[.-]/).filter(Boolean).at(-1) ?? '')).slice(0, 8);
|
|
151
|
+
throw fail(`No token ${target}.`, near.length ? `Did you mean: ${near.join(', ')}?` : 'Pass a token path (color.primary) or a CSS variable (--sb-color-primary).');
|
|
152
|
+
}
|
|
153
|
+
const layer = first.layer;
|
|
154
|
+
// Semantic tokens that alias it (for a foundation token), per mode.
|
|
155
|
+
const aliasedBy = [];
|
|
156
|
+
for (const s of all.sets.filter((x) => x.layer === 'semantic'))
|
|
157
|
+
for (const t of s.tokens)
|
|
158
|
+
if (aliasOf(t.value) === path)
|
|
159
|
+
aliasedBy.push({ path: t.path, mode: s.mode ?? 'base' });
|
|
160
|
+
const paths = new Set([path, ...aliasedBy.map((a) => a.path)]);
|
|
161
|
+
const refs = collectReferences(inputs).filter((r) => paths.has(r.path));
|
|
162
|
+
const contracts = {};
|
|
163
|
+
for (const r of refs.filter((x) => x.source.startsWith('contract:')))
|
|
164
|
+
(contracts[r.source.slice(9)] ??= []).push(`${r.detail}${r.path !== path ? ` (via ${r.path})` : ''}`);
|
|
165
|
+
for (const { name, contract } of all.contracts) {
|
|
166
|
+
for (const [tp, def] of Object.entries(contract?.tokens ?? {})) {
|
|
167
|
+
const use = `component token ${tp}`;
|
|
168
|
+
if (tp === path || aliasOf(typeof def === 'string' ? def : def?.value) === path) {
|
|
169
|
+
const uses = (contracts[name] ??= []);
|
|
170
|
+
if (!uses.includes(use))
|
|
171
|
+
uses.push(use);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
const iface = (await readJson(root, INTERFACE_FILE))?.tokens?.[path] ?? null;
|
|
176
|
+
return {
|
|
177
|
+
token: path, layer, cssVar: cssVarName(prefix, path),
|
|
178
|
+
values: Object.fromEntries(where.map((w) => [w.mode ?? (w.layer === 'semantic' ? 'base' : w.layer), w.value])),
|
|
179
|
+
aliasedBy: [...new Map(aliasedBy.map((a) => [a.path, { path: a.path, modes: aliasedBy.filter((b) => b.path === a.path).map((b) => b.mode) }])).values()],
|
|
180
|
+
links: refs.filter((r) => r.source === 'brand-links').map((r) => `${r.path}: ${r.detail}`),
|
|
181
|
+
contracts: Object.entries(contracts).sort(([a], [b]) => a.localeCompare(b)).map(([name, uses]) => ({ name, uses: [...new Set(uses)] })),
|
|
182
|
+
contrast: refs.filter((r) => r.source === 'contrast').map((r) => r.detail),
|
|
183
|
+
files: refs.filter((r) => Boolean(r.file)).map((r) => ({ file: r.file, category: r.source, ref: r.detail.split(' ')[0] ?? '', via: r.path })),
|
|
184
|
+
interface: iface,
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
export function formatImpact(i) {
|
|
188
|
+
const out = [`${i.token} (${i.layer}, ${i.cssVar})`];
|
|
189
|
+
out.push(` values: ${Object.entries(i.values).map(([m, v]) => `${m} ${JSON.stringify(v)}`).join(', ')}`);
|
|
190
|
+
if (i.interface)
|
|
191
|
+
out.push(` interface token (used by ${i.interface.usedBy.join(', ')}): rename only with sketchbook tokens rename`);
|
|
192
|
+
if (i.aliasedBy.length)
|
|
193
|
+
out.push(` aliased by ${i.aliasedBy.length} semantic token(s): ${i.aliasedBy.map((a) => `${a.path} [${a.modes.join(', ')}]`).join(', ')}`);
|
|
194
|
+
if (i.links.length)
|
|
195
|
+
out.push(` brand links: ${i.links.join('; ')}`);
|
|
196
|
+
out.push(` contracts: ${i.contracts.length ? i.contracts.map((c) => c.name).join(', ') : 'none'}`);
|
|
197
|
+
if (i.contrast.length)
|
|
198
|
+
out.push(` contrast pairs: ${i.contrast.length}`);
|
|
199
|
+
if (i.files.length)
|
|
200
|
+
out.push(` files: ${[...new Set(i.files.map((f) => f.ref))].join(', ')}`);
|
|
201
|
+
return out;
|
|
202
|
+
}
|
|
203
|
+
export const dependents = (i) => [
|
|
204
|
+
...i.aliasedBy.filter((a) => a.path !== i.token).map((a) => `semantic ${a.path}`),
|
|
205
|
+
...i.links.map((l) => `brand link ${l}`),
|
|
206
|
+
...i.contracts.map((c) => `contract ${c.name} (${c.uses.join('; ')})`),
|
|
207
|
+
...i.contrast.map((c) => `contrast ${c}`),
|
|
208
|
+
...i.files.map((f) => `${f.category} ${f.ref}`),
|
|
209
|
+
];
|
|
210
|
+
// ---------- running a plan ----------
|
|
211
|
+
// Every plan runs on a temporary stage: the token sources and outputs (COPY) plus what the token checks read (stories,
|
|
212
|
+
// specs, patterns, CLI docs, catalog, brands). The stage is regenerated, rebuilt and checked; a real run copies back
|
|
213
|
+
// only the files whose content changed, and only when the checks pass, so a refused change leaves the tree untouched.
|
|
214
|
+
// The stage records the hash of every file it copies in (the snapshot). What changed is the stage against that
|
|
215
|
+
// snapshot, never against the live tree, so files saved or created in the project while a command runs (an editor's
|
|
216
|
+
// autosave, another agent) are not the command's to revert or delete. Before copying back, every target must still
|
|
217
|
+
// hold its snapshot content; otherwise the command refuses and writes nothing (SB-0070).
|
|
218
|
+
const COPY = ['spec', BRAND, 'harness.config.json', 'generated/css', 'generated/tokens', 'generated/foundation.snapshot.json'];
|
|
219
|
+
const STAGE = [...COPY, 'brands', 'src', 'playwright', '.storybook', 'docs', 'harness/cli/known-commands.json', 'harness/kits', 'harness/catalog'];
|
|
220
|
+
const SKIP = new Set(['node_modules', 'dist', 'storybook-static', '.git', 'test-results', 'playwright-report', '.tmp']);
|
|
221
|
+
const hash = (buf) => createHash('sha256').update(buf).digest('hex');
|
|
222
|
+
// Test seam: called with (root, stage) after the checks and before the conflict check and copy-back.
|
|
223
|
+
export const stageHooks = { beforeCopyBack: null };
|
|
224
|
+
async function writeFiles(dir, files) {
|
|
225
|
+
for (const [rel, content] of Object.entries(files ?? {})) {
|
|
226
|
+
await mkdir(dirname(join(dir, rel)), { recursive: true });
|
|
227
|
+
await writeFile(join(dir, rel), content);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
// Relative path -> absolute path of every file under the staged paths (same skip list on both sides).
|
|
231
|
+
async function filesUnder(root) {
|
|
232
|
+
const out = new Map();
|
|
233
|
+
const walk = async (rel) => {
|
|
234
|
+
let st;
|
|
235
|
+
try {
|
|
236
|
+
st = await stat(join(root, rel));
|
|
237
|
+
}
|
|
238
|
+
catch {
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
if (st.isFile()) {
|
|
242
|
+
out.set(rel, join(root, rel));
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
if (!st.isDirectory())
|
|
246
|
+
return;
|
|
247
|
+
for (const e of await readdir(join(root, rel), { withFileTypes: true }))
|
|
248
|
+
if (!SKIP.has(e.name))
|
|
249
|
+
await walk(`${rel}/${e.name}`);
|
|
250
|
+
};
|
|
251
|
+
for (const p of STAGE)
|
|
252
|
+
await walk(p);
|
|
253
|
+
return out;
|
|
254
|
+
}
|
|
255
|
+
// Copies the staged paths into the stage, file by file, and returns rel -> content hash of what was copied.
|
|
256
|
+
async function stageIn(root, stage) {
|
|
257
|
+
const snapshot = new Map();
|
|
258
|
+
for (const [rel, abs] of await filesUnder(root)) {
|
|
259
|
+
const buf = await readFile(abs);
|
|
260
|
+
await mkdir(dirname(join(stage, rel)), { recursive: true });
|
|
261
|
+
await writeFile(join(stage, rel), buf);
|
|
262
|
+
snapshot.set(rel, hash(buf));
|
|
263
|
+
}
|
|
264
|
+
return snapshot;
|
|
265
|
+
}
|
|
266
|
+
// Files the plan changed: stage content against the snapshot (added, changed, or a snapshot file the stage removed).
|
|
267
|
+
async function changedFiles(snapshot, stage) {
|
|
268
|
+
const now = await filesUnder(stage);
|
|
269
|
+
const out = [];
|
|
270
|
+
for (const [rel, abs] of now)
|
|
271
|
+
if (snapshot.get(rel) !== hash(await readFile(abs)))
|
|
272
|
+
out.push(rel);
|
|
273
|
+
for (const rel of snapshot.keys())
|
|
274
|
+
if (!now.has(rel))
|
|
275
|
+
out.push(rel);
|
|
276
|
+
return out.sort();
|
|
277
|
+
}
|
|
278
|
+
const liveHash = async (root, rel) => { try {
|
|
279
|
+
return hash(await readFile(join(root, rel)));
|
|
280
|
+
}
|
|
281
|
+
catch {
|
|
282
|
+
return null;
|
|
283
|
+
} };
|
|
284
|
+
// Targets whose live content no longer matches the snapshot (edited, created or deleted since staging).
|
|
285
|
+
async function conflicts(root, snapshot, files) {
|
|
286
|
+
const out = [];
|
|
287
|
+
for (const rel of files)
|
|
288
|
+
if ((await liveHash(root, rel)) !== (snapshot.get(rel) ?? null))
|
|
289
|
+
out.push(rel);
|
|
290
|
+
return out;
|
|
291
|
+
}
|
|
292
|
+
// Writes the stage's version of each file (deleting the ones the stage removed; only snapshot files reach here as
|
|
293
|
+
// deletions). Every target is backed up first; any error restores them all and rethrows.
|
|
294
|
+
async function copyBack(root, stage, files) {
|
|
295
|
+
const backup = [];
|
|
296
|
+
try {
|
|
297
|
+
for (const rel of files) {
|
|
298
|
+
const to = join(root, rel);
|
|
299
|
+
let prev = null;
|
|
300
|
+
try {
|
|
301
|
+
prev = await readFile(to);
|
|
302
|
+
}
|
|
303
|
+
catch { /* absent */ }
|
|
304
|
+
backup.push([to, prev]);
|
|
305
|
+
const from = join(stage, rel);
|
|
306
|
+
if (await exists(from)) {
|
|
307
|
+
await mkdir(dirname(to), { recursive: true });
|
|
308
|
+
await writeFile(to, await readFile(from));
|
|
309
|
+
}
|
|
310
|
+
else
|
|
311
|
+
await rm(to, { force: true });
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
catch (e) {
|
|
315
|
+
for (const [to, prev] of backup.reverse()) {
|
|
316
|
+
try {
|
|
317
|
+
if (prev === null)
|
|
318
|
+
await rm(to, { force: true });
|
|
319
|
+
else {
|
|
320
|
+
await mkdir(dirname(to), { recursive: true });
|
|
321
|
+
await writeFile(to, prev);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
catch { /* best effort */ }
|
|
325
|
+
}
|
|
326
|
+
throw e;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
const firstLine = (e) => String((typeof e === 'object' && e !== null && 'message' in e ? e.message : undefined) ?? e).split('\n').map((l) => l.trim()).filter(Boolean).slice(0, 3).join(' ');
|
|
330
|
+
// check: async (dir) => runChecks report (the CLI passes the token checks); a failing report applies nothing.
|
|
331
|
+
export async function runPlan(root, plan, { dryRun = false, check } = {}) {
|
|
332
|
+
const before = await readText(root, CSS);
|
|
333
|
+
const apply = plan.apply ?? ((dir) => writeFiles(dir, plan.files));
|
|
334
|
+
const tmp = await mkdtemp(join(tmpdir(), 'sketchbook-stage-'));
|
|
335
|
+
try {
|
|
336
|
+
const snapshot = await stageIn(root, tmp);
|
|
337
|
+
await apply(tmp);
|
|
338
|
+
let gen = { links: { changed: [], missing: [] }, overrides: { kept: [], added: [], dropped: [] } };
|
|
339
|
+
let buildError = null;
|
|
340
|
+
try {
|
|
341
|
+
gen = await rebuild(tmp);
|
|
342
|
+
await buildBrands(tmp);
|
|
343
|
+
await buildInterface(tmp);
|
|
344
|
+
// In the catalog's source repo, edits to stories and specs (rename) must reach the catalog too (G1).
|
|
345
|
+
if (readConfig(tmp).catalog?.source === true && (await exists(join(tmp, 'src/components'))))
|
|
346
|
+
buildCatalog(tmp);
|
|
347
|
+
}
|
|
348
|
+
catch (e) {
|
|
349
|
+
buildError = e;
|
|
350
|
+
}
|
|
351
|
+
const after = await readText(tmp, CSS);
|
|
352
|
+
const report = check ? await check(tmp) : null;
|
|
353
|
+
const errors = report ? report.results.flatMap((r) => r.errors.map((e) => ({ ...e, id: r.id }))) : [];
|
|
354
|
+
if (buildError) {
|
|
355
|
+
const cause = errors.filter((e) => ['T1', 'T2', 'T3'].includes(e.id)).slice(0, 3).map((e) => `${e.id} ${e.file}${e.token ? ` ${e.token}` : ''}: ${e.msg}`);
|
|
356
|
+
errors.unshift({ file: CSS, id: 'build', msg: `the rebuild failed: ${firstLine(buildError)}`, fix: cause.length ? `Underlying: ${cause.join('; ')}.` : 'Run sketchbook check --only=T1,T2,T3 on the change; each error names its fix.' });
|
|
357
|
+
}
|
|
358
|
+
let failed = Boolean(buildError) || report?.exitCode === 1;
|
|
359
|
+
const changed = await changedFiles(snapshot, tmp);
|
|
360
|
+
let conflict = [];
|
|
361
|
+
if (!dryRun && !failed) {
|
|
362
|
+
if (stageHooks.beforeCopyBack)
|
|
363
|
+
await stageHooks.beforeCopyBack(root, tmp);
|
|
364
|
+
conflict = await conflicts(root, snapshot, changed);
|
|
365
|
+
if (conflict.length) {
|
|
366
|
+
failed = true;
|
|
367
|
+
errors.unshift({ file: conflict[0], id: 'conflict', msg: `${conflict.length} file(s) changed in the project while the command ran, and the command would overwrite them: ${conflict.slice(0, 6).join(', ')}${conflict.length > 6 ? ', …' : ''}. Nothing was written.`, fix: 'Save or commit those edits, then run the command again (it starts from the files as they are then).' });
|
|
368
|
+
}
|
|
369
|
+
else
|
|
370
|
+
await copyBack(root, tmp, changed);
|
|
371
|
+
}
|
|
372
|
+
return {
|
|
373
|
+
diff: buildError ? {} : cssDiff(before, after), changed, applied: !dryRun && !failed, failed, errors, conflict,
|
|
374
|
+
warnings: report ? report.results.flatMap((r) => r.warnings.map((w) => ({ ...w, id: r.id }))) : [],
|
|
375
|
+
report, linkWarnings: gen.links.missing, linked: gen.links.changed, overrides: gen.overrides,
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
finally {
|
|
379
|
+
await rm(tmp, { recursive: true, force: true });
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
async function rebuild(dir) {
|
|
383
|
+
const gen = await runGenerator(dir, { quiet: true });
|
|
384
|
+
await buildTokens({ root: dir });
|
|
385
|
+
return gen;
|
|
386
|
+
}
|
|
387
|
+
// Linked semantic tokens whose value differs from what their brand link computes: a hand edit the next
|
|
388
|
+
// regenerate would silently revert (G1 calls them stale). Token commands refuse to run over them without --yes.
|
|
389
|
+
export async function staleLinks(root) {
|
|
390
|
+
const brand = await readJson(root, BRAND);
|
|
391
|
+
const links = (await readJson(root, LINKS))?.links;
|
|
392
|
+
if (!brand || !links)
|
|
393
|
+
return [];
|
|
394
|
+
let built;
|
|
395
|
+
try {
|
|
396
|
+
built = buildFoundation(brand, (await readJson(root, 'spec/tokens/overrides.json'))?.overrides ?? {});
|
|
397
|
+
}
|
|
398
|
+
catch {
|
|
399
|
+
return [];
|
|
400
|
+
}
|
|
401
|
+
const semantic = {};
|
|
402
|
+
for (const name of ['base', ...built.resolved.modes.map((m) => m.name)]) {
|
|
403
|
+
const d = await readJson(root, semanticFile(name));
|
|
404
|
+
if (d)
|
|
405
|
+
semantic[name] = d;
|
|
406
|
+
}
|
|
407
|
+
return computeLinks({ links, semantic, resolved: built.resolved, anchors: built.anchors, fmap: foundationMap(built.files) }).changed;
|
|
408
|
+
}
|
|
409
|
+
// Semantic tokens whose CSS variable changed, with the contracts that use them.
|
|
410
|
+
export async function impactOfDiff(root, diff) {
|
|
411
|
+
const { all, prefix } = await loadInterfaceInputs(root);
|
|
412
|
+
const index = varIndex(all, prefix);
|
|
413
|
+
const names = new Set(Object.values(diff).flatMap((d) => [...d.changed, ...d.added, ...d.removed].map((x) => x.name)));
|
|
414
|
+
const semantic = [...names].map((n) => index.get(n)).filter((x) => x?.layer === 'semantic').map((x) => x.path);
|
|
415
|
+
const uses = new Map();
|
|
416
|
+
for (const { name, contract } of all.contracts) {
|
|
417
|
+
for (const def of Object.values(contract?.tokens ?? {})) {
|
|
418
|
+
const t = aliasOf(typeof def === 'string' ? def : def?.value);
|
|
419
|
+
if (t && semantic.includes(t))
|
|
420
|
+
uses.set(name, [...new Set([...(uses.get(name) ?? []), t])]);
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
return { semantic: [...new Set(semantic)].sort(), components: [...uses.keys()].sort() };
|
|
424
|
+
}
|
|
425
|
+
// ---------- brand.config: set and preset ----------
|
|
426
|
+
const TOKEN_ALIAS = /^\{[A-Za-z0-9_-]+(\.[A-Za-z0-9_-]+)*\}$/;
|
|
427
|
+
export function parseValue(raw) {
|
|
428
|
+
if (typeof raw !== 'string')
|
|
429
|
+
return raw;
|
|
430
|
+
const s = raw.trim();
|
|
431
|
+
if (/^-?\d+(\.\d+)?$/.test(s))
|
|
432
|
+
return Number(s);
|
|
433
|
+
if (['true', 'false', 'null'].includes(s))
|
|
434
|
+
return parseJson(s);
|
|
435
|
+
// JSON first: a flat object ({"hue":250}) has no nested braces either; only a bare {dot.path} is a token alias.
|
|
436
|
+
if (/^[[{]/.test(s)) {
|
|
437
|
+
try {
|
|
438
|
+
return parseJson(s);
|
|
439
|
+
}
|
|
440
|
+
catch {
|
|
441
|
+
if (TOKEN_ALIAS.test(s))
|
|
442
|
+
return s;
|
|
443
|
+
throw fail(`Value ${raw} is not valid JSON.`, 'Quote JSON values, e.g. \'[4, 8, 12]\' or \'{"hue":250}\'; a token alias is {group.token}.');
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
return s;
|
|
447
|
+
}
|
|
448
|
+
// Path segments that would reach Object.prototype through a plain object walk.
|
|
449
|
+
const UNSAFE = new Set(['__proto__', 'prototype', 'constructor']);
|
|
450
|
+
export function safeParts(path) {
|
|
451
|
+
const parts = String(path).split('.');
|
|
452
|
+
const bad = parts.find((p) => UNSAFE.has(p));
|
|
453
|
+
if (bad)
|
|
454
|
+
throw fail(`"${path}" has the segment "${bad}", which is not allowed in a key or token path.`, 'Use a plain name (letters, digits, dashes).');
|
|
455
|
+
return parts;
|
|
456
|
+
}
|
|
457
|
+
// Object(n): a primitive along the path is read like the untyped n[k] read it (a string's length, say).
|
|
458
|
+
const getIn = (obj, parts) => parts.reduce((n, k) => (n === undefined || n === null ? undefined : Reflect.get(Object(n), k)), obj);
|
|
459
|
+
export async function validateBrand(root, brand) {
|
|
460
|
+
const schema = engineSchema('brand-config', root);
|
|
461
|
+
const errs = schema ? validate(schema, brand) : [];
|
|
462
|
+
if (errs.length)
|
|
463
|
+
throw fail(`brand.config.json would be invalid: ${errs.slice(0, 3).join('; ')}`, 'Match spec/schemas/brand-config.schema.json (sketchbook presets <family> for ids).');
|
|
464
|
+
try {
|
|
465
|
+
resolveBrand(brand);
|
|
466
|
+
}
|
|
467
|
+
catch (e) {
|
|
468
|
+
throw fail(errorMessage(e), 'See sketchbook tokens presets <foundation> for the ids that exist.');
|
|
469
|
+
}
|
|
470
|
+
// The new foundation must still hold every token the semantic layer aliases (a partial custom scale drops steps),
|
|
471
|
+
// judged after the brand links re-point their tokens to the new preset's roles (as tokens:generate will): a motion
|
|
472
|
+
// or z preset with other step names moves motion.* and layer.* with it instead of losing {duration.200} or {z.10}.
|
|
473
|
+
const overrides = (await readJson(root, 'spec/tokens/overrides.json'))?.overrides ?? {};
|
|
474
|
+
const { docs } = await semanticDocs(root, brand);
|
|
475
|
+
const links = (await readJson(root, LINKS))?.links ?? {};
|
|
476
|
+
const relink = (b) => {
|
|
477
|
+
const { files, anchors, resolved } = generate(b);
|
|
478
|
+
const fmap = foundationMap(files);
|
|
479
|
+
for (const [p, o] of Object.entries(overrides))
|
|
480
|
+
if (!fmap.has(p))
|
|
481
|
+
fmap.set(p, o.value);
|
|
482
|
+
const semantic = structuredClone(docs);
|
|
483
|
+
const { missing } = computeLinks({ links, semantic, resolved, anchors, fmap });
|
|
484
|
+
return { made: fmap, semantic, missing };
|
|
485
|
+
};
|
|
486
|
+
const next = relink(brand);
|
|
487
|
+
let before = new Set();
|
|
488
|
+
try {
|
|
489
|
+
before = new Set(relink(await readJson(root, BRAND)).missing.map((m) => m.token));
|
|
490
|
+
}
|
|
491
|
+
catch { /* no valid brand on disk */ }
|
|
492
|
+
const broken = next.missing.filter((m) => !before.has(m.token));
|
|
493
|
+
const own = new Set(Object.values(next.semantic).flatMap((d) => flatten(d).map((t) => t.path)));
|
|
494
|
+
const lost = [...new Set(Object.values(next.semantic).flatMap((d) => flatten(d).map((t) => aliasOf(t.value)).filter((a) => a !== null && a !== '' && !own.has(a) && !next.made.has(a))))];
|
|
495
|
+
const fix = 'Give the whole scale (a preset, or custom with every step or a base), or a fine override of one step (e.g. radius.scale.lg instead of radius.custom.lg).';
|
|
496
|
+
if (lost.length)
|
|
497
|
+
throw fail(`The foundation would lose ${lost.length} token(s) the semantic layer aliases: ${lost.slice(0, 6).join(', ')}${lost.length > 6 ? ', …' : ''}.`, fix);
|
|
498
|
+
if (broken.length)
|
|
499
|
+
throw fail(`${broken.length} brand link(s) could not follow the new values: ${broken.slice(0, 3).map((m) => m.msg).join('; ')}${broken.length > 3 ? '; …' : ''}.`, `Every role ${LINKS} uses must point at a step that exists: keep the role on an existing step, add the step next to it (e.g. z.values.600), or remove the link to own the token by hand.`);
|
|
500
|
+
}
|
|
501
|
+
// Family ids, their config keys, and plain area names (the foundations skill's words) -> families.
|
|
502
|
+
const AREAS = {
|
|
503
|
+
color: ['rampMethods', 'neutrals'], typography: ['typeScale', 'lineHeight', 'letterSpacing', 'weights'], type: ['typeScale'],
|
|
504
|
+
'type-scale': ['typeScale'], 'line-height': ['lineHeight'], 'letter-spacing': ['letterSpacing'], neutral: ['neutrals'], ramp: ['rampMethods'],
|
|
505
|
+
'layout-grid': ['layoutGrid'], grid: ['layoutGrid'], icons: ['iconSizes'], 'z-index': ['zIndex'], z: ['zIndex'], border: ['borderWidth'],
|
|
506
|
+
};
|
|
507
|
+
export function familiesFor(name) {
|
|
508
|
+
if (families().includes(name))
|
|
509
|
+
return [name];
|
|
510
|
+
const area = AREAS[name];
|
|
511
|
+
if (area)
|
|
512
|
+
return area;
|
|
513
|
+
const byKey = Object.entries(FAMILY_KEYS).filter(([, k]) => k === name).map(([f]) => f);
|
|
514
|
+
if (byKey.length)
|
|
515
|
+
return byKey;
|
|
516
|
+
throw fail(`Unknown foundation "${name}".`, `Use a family (${families().join(', ')}) or an area (${Object.keys(AREAS).join(', ')}).`);
|
|
517
|
+
}
|
|
518
|
+
// Keys kept when a foundation switches preset (they configure, they do not override values).
|
|
519
|
+
const KEEP_ON_PRESET = { contrast: ['apca'], 'color.ramp': ['steps'] };
|
|
520
|
+
function setPreset(brand, keyPath, id) {
|
|
521
|
+
const parts = safeParts(keyPath);
|
|
522
|
+
const old = getIn(brand, parts);
|
|
523
|
+
const keep = KEEP_ON_PRESET[keyPath] ?? [];
|
|
524
|
+
const next = { preset: id };
|
|
525
|
+
const dropped = [];
|
|
526
|
+
if (isObj(old)) {
|
|
527
|
+
for (const [k, v] of Object.entries(old)) {
|
|
528
|
+
if (k === '$description' || keep.includes(k))
|
|
529
|
+
next[k] = v;
|
|
530
|
+
else if (k !== 'preset')
|
|
531
|
+
dropped.push(k);
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
let node = brand;
|
|
535
|
+
for (const k of parts.slice(0, -1)) {
|
|
536
|
+
const n = indexable(node, k, 'read');
|
|
537
|
+
const child = n[k];
|
|
538
|
+
node = n[k] = isObj(child) ? child : {};
|
|
539
|
+
}
|
|
540
|
+
indexable(node, lastOf(parts), 'set')[lastOf(parts)] = next;
|
|
541
|
+
return { old, dropped };
|
|
542
|
+
}
|
|
543
|
+
export async function planSet(root, key, raw) {
|
|
544
|
+
const brand = await readJson(root, BRAND);
|
|
545
|
+
if (!brand)
|
|
546
|
+
throw fail('brand.config.json not found.', 'Run sketchbook init or sketchbook tokens scratch.');
|
|
547
|
+
let parts = safeParts(key);
|
|
548
|
+
const head = parts[0] ?? '';
|
|
549
|
+
const mapped = Object.hasOwn(FAMILY_KEYS, head) ? FAMILY_KEYS[head] : undefined;
|
|
550
|
+
if (mapped !== undefined && mapped !== head)
|
|
551
|
+
parts = [...mapped.split('.'), ...parts.slice(1)];
|
|
552
|
+
if (parts.some((p) => !p) || parts[0]?.startsWith('$'))
|
|
553
|
+
throw fail(`Bad key "${key}".`, 'Use a dot path into brand.config.json, e.g. typography.family.');
|
|
554
|
+
const value = parseValue(raw);
|
|
555
|
+
const next = structuredClone(brand);
|
|
556
|
+
const warnings = [];
|
|
557
|
+
const old = getIn(brand, parts);
|
|
558
|
+
if (lastOf(parts) === 'preset' && parts.length > 1) {
|
|
559
|
+
const { dropped } = setPreset(next, parts.slice(0, -1).join('.'), value);
|
|
560
|
+
if (dropped.length)
|
|
561
|
+
warnings.push(`${parts.slice(0, -1).join('.')}: the preset replaces ${dropped.join(', ')} (fine overrides of the old values).`);
|
|
562
|
+
}
|
|
563
|
+
else {
|
|
564
|
+
let node = next;
|
|
565
|
+
for (const k of parts.slice(0, -1)) {
|
|
566
|
+
const n = indexable(node, k, 'read');
|
|
567
|
+
const child = n[k];
|
|
568
|
+
if (typeof child === 'string')
|
|
569
|
+
n[k] = { preset: child };
|
|
570
|
+
else if (!isObj(child))
|
|
571
|
+
n[k] = {};
|
|
572
|
+
node = n[k];
|
|
573
|
+
}
|
|
574
|
+
indexable(node, lastOf(parts), 'set')[lastOf(parts)] = value;
|
|
575
|
+
}
|
|
576
|
+
await validateBrand(root, next);
|
|
577
|
+
const path = parts.join('.');
|
|
578
|
+
return {
|
|
579
|
+
files: { [BRAND]: serialize(next) }, warnings,
|
|
580
|
+
summary: [`${path}: ${JSON.stringify(old)} -> ${JSON.stringify(value)}`],
|
|
581
|
+
data: { key: path, before: old ?? null, after: value },
|
|
582
|
+
decision: { title: `${path} set to ${typeof value === 'string' ? value : JSON.stringify(value)}`, decision: `brand.config.json ${path} = ${JSON.stringify(value)} (sketchbook tokens set ${path} ${typeof value === 'string' ? value : JSON.stringify(value)}).` },
|
|
583
|
+
};
|
|
584
|
+
}
|
|
585
|
+
export async function planPreset(root, foundation, id) {
|
|
586
|
+
const fams = familiesFor(foundation);
|
|
587
|
+
const hits = fams.filter((f) => presetsOf(f).some((p) => p.id === id || p.aliases?.includes(id)));
|
|
588
|
+
const [familyId] = hits;
|
|
589
|
+
if (familyId === undefined)
|
|
590
|
+
throw fail(`No preset "${id}" for ${foundation}.`, `Known: ${fams.map((f) => `${f}: ${presetsOf(f).map((p) => p.id).join(', ')}`).join('; ')}.`);
|
|
591
|
+
const key = FAMILY_KEYS[familyId];
|
|
592
|
+
if (!key)
|
|
593
|
+
throw fail(`${familyId} is not chosen in brand.config.json.`, 'Pick a family that has a config key (sketchbook tokens presets).');
|
|
594
|
+
const p = getPreset(familyId, id);
|
|
595
|
+
const brand = await readJson(root, BRAND);
|
|
596
|
+
const next = structuredClone(brand);
|
|
597
|
+
const { old, dropped } = setPreset(next, key, p.id);
|
|
598
|
+
if (!next)
|
|
599
|
+
throw new TypeError(`Cannot set properties of null (setting '${key}')`);
|
|
600
|
+
await validateBrand(root, next);
|
|
601
|
+
return {
|
|
602
|
+
files: { [BRAND]: serialize(next) },
|
|
603
|
+
warnings: dropped.length ? [`${key}: the preset replaces ${dropped.join(', ')}.`] : [],
|
|
604
|
+
summary: [`${key}: ${JSON.stringify(old)} -> { "preset": "${p.id}" } (${p.label}${p.source ? `, ${show(p.source)}` : ''})`],
|
|
605
|
+
data: { family: familyId, key, preset: p.id, source: p.source ?? null },
|
|
606
|
+
decision: { title: `${key} uses the ${p.id} preset`, decision: `brand.config.json ${key} = { "preset": "${p.id}" } (${p.label}) via sketchbook tokens preset ${foundation} ${p.id}. Source: ${show(p.source ?? 'none (our own)')}.` },
|
|
607
|
+
};
|
|
608
|
+
}
|
|
609
|
+
// ---------- semantic tokens: add, remove, rename ----------
|
|
610
|
+
async function semanticDocs(root, brand) {
|
|
611
|
+
brand ??= await readJson(root, BRAND);
|
|
612
|
+
const modes = modesOf(brand);
|
|
613
|
+
const docs = {};
|
|
614
|
+
for (const name of ['base', ...modes.map((m) => m.name)]) {
|
|
615
|
+
const d = await readJson(root, semanticFile(name));
|
|
616
|
+
if (d)
|
|
617
|
+
docs[name] = d;
|
|
618
|
+
}
|
|
619
|
+
return { docs, modes };
|
|
620
|
+
}
|
|
621
|
+
const nodeAt = (doc, path) => safeParts(path).reduce((n, k) => (isObj(n) && Object.hasOwn(n, k) ? n[k] : undefined), doc);
|
|
622
|
+
const isToken = (n) => isObj(n) && '$value' in n;
|
|
623
|
+
// The $type a token at `path` would inherit from its groups.
|
|
624
|
+
function inheritedType(doc, parts) {
|
|
625
|
+
let n = doc;
|
|
626
|
+
let t = doc.$type;
|
|
627
|
+
for (const k of parts) {
|
|
628
|
+
n = isObj(n) ? n[k] : undefined;
|
|
629
|
+
if (!isObj(n))
|
|
630
|
+
break;
|
|
631
|
+
if (n.$type)
|
|
632
|
+
t = n.$type;
|
|
633
|
+
}
|
|
634
|
+
return t;
|
|
635
|
+
}
|
|
636
|
+
function insert(doc, path, node, type) {
|
|
637
|
+
const parts = safeParts(path);
|
|
638
|
+
let n = doc;
|
|
639
|
+
for (const k of parts.slice(0, -1)) {
|
|
640
|
+
const g = indexable(n, k, 'read');
|
|
641
|
+
if (isToken(g[k]))
|
|
642
|
+
throw fail(`${parts.slice(0, parts.indexOf(k) + 1).join('.')} is a token, so ${path} can't be added under it.`, 'Pick a path whose parents are groups.');
|
|
643
|
+
n = g[k] ??= {};
|
|
644
|
+
}
|
|
645
|
+
const inh = inheritedType(doc, parts.slice(0, -1));
|
|
646
|
+
const { $type: _t, ...rest } = node;
|
|
647
|
+
indexable(n, lastOf(parts), 'set')[lastOf(parts)] = type && type !== inh ? { ...rest, $type: type } : rest;
|
|
648
|
+
}
|
|
649
|
+
function detach(doc, path) {
|
|
650
|
+
const parts = safeParts(path);
|
|
651
|
+
const chain = [doc];
|
|
652
|
+
let cur = doc;
|
|
653
|
+
for (const k of parts.slice(0, -1)) {
|
|
654
|
+
const n = cur[k];
|
|
655
|
+
if (!isObj(n))
|
|
656
|
+
return null;
|
|
657
|
+
chain.push(n);
|
|
658
|
+
cur = n;
|
|
659
|
+
}
|
|
660
|
+
const last = lastOf(parts);
|
|
661
|
+
const node = cur[last];
|
|
662
|
+
if (!isObj(node))
|
|
663
|
+
return null;
|
|
664
|
+
const type = node.$type ?? inheritedType(doc, parts.slice(0, -1));
|
|
665
|
+
delete cur[last];
|
|
666
|
+
for (let i = chain.length - 1; i > 0; i--) {
|
|
667
|
+
const group = chain[i];
|
|
668
|
+
const parent = chain[i - 1];
|
|
669
|
+
const key = parts[i - 1];
|
|
670
|
+
if (group && parent && key !== undefined && !Object.keys(group).some((k) => !k.startsWith('$')))
|
|
671
|
+
delete parent[key];
|
|
672
|
+
}
|
|
673
|
+
return { node, type };
|
|
674
|
+
}
|
|
675
|
+
// Every path the generator can make, whatever brand.config says today: a semantic token there collides as soon as
|
|
676
|
+
// the brand changes (color.brand.* appears with a hex primary). Color ramps are reserved as whole groups.
|
|
677
|
+
const ROLE_RAMPS = () => presetsOf('semanticRoles').map((p) => p.values.accent).filter(Boolean);
|
|
678
|
+
function reservedPaths(brand) {
|
|
679
|
+
const ramps = new Set(['brand', 'neutral', 'white', 'black', ...ROLE_RAMPS(), ...Object.keys(brand?.color?.accents ?? {})]);
|
|
680
|
+
const paths = new Set();
|
|
681
|
+
const add = (b) => { try {
|
|
682
|
+
for (const doc of Object.values(generate(b).files))
|
|
683
|
+
for (const t of flatten(doc))
|
|
684
|
+
if (!t.path.startsWith('color.'))
|
|
685
|
+
paths.add(t.path);
|
|
686
|
+
}
|
|
687
|
+
catch { /* a preset that does not resolve on this brand */ } };
|
|
688
|
+
add(brand ?? {});
|
|
689
|
+
for (const fam of families()) {
|
|
690
|
+
const key = FAMILY_KEYS[fam];
|
|
691
|
+
if (!key || fam === 'rampMethods' || fam === 'neutrals')
|
|
692
|
+
continue;
|
|
693
|
+
for (const p of presetsOf(fam)) {
|
|
694
|
+
if (p.implemented === false)
|
|
695
|
+
continue;
|
|
696
|
+
const b = structuredClone(brand ?? {});
|
|
697
|
+
setPreset(b, key, p.id);
|
|
698
|
+
add(b);
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
return { ramps, paths };
|
|
702
|
+
}
|
|
703
|
+
// Why `path` can't be a semantic token: the generator can make it (or a group around it), or another token in any
|
|
704
|
+
// layer already builds its CSS variable. `ignore` holds paths that are moving away (a rename's own tokens).
|
|
705
|
+
async function refuseName(root, path, { ignore = new Set() } = {}) {
|
|
706
|
+
const brand = await readJson(root, BRAND);
|
|
707
|
+
const { ramps, paths } = reservedPaths(brand);
|
|
708
|
+
const parts = path.split('.');
|
|
709
|
+
const ramp = parts[1] ?? '';
|
|
710
|
+
if (parts[0] === 'color' && ramps.has(parts[1]))
|
|
711
|
+
throw fail(`${path} is reserved: the generator makes color.${ramp}${['white', 'black'].includes(ramp) ? '' : '.*'} (a foundation ramp${ramps.has(parts[1]) && !['brand', 'neutral', 'white', 'black'].includes(ramp) ? ' for an accent or color role' : ''}), now or when brand.config changes.`, 'Pick a semantic name outside the foundation ramps, e.g. color.highlight.');
|
|
712
|
+
const hit = [...paths].find((p) => p === path || p.startsWith(path + '.') || path.startsWith(p + '.'));
|
|
713
|
+
if (hit)
|
|
714
|
+
throw fail(`${path} is reserved: the generator can make ${hit} (a foundation token of some preset).`, 'Pick a semantic name outside the foundation families, e.g. a role name like space.section.');
|
|
715
|
+
// String(): a missing prefix built "--undefined-…" here before it was typed; kept so the comparison does not change.
|
|
716
|
+
const prefix = String((await readJson(root, 'harness.config.json'))?.prefix);
|
|
717
|
+
const all = await loadAll(root);
|
|
718
|
+
const v = cssVarName(prefix, path);
|
|
719
|
+
const clash = all.sets.flatMap((s) => s.tokens).find((t) => !ignore.has(t.path) && t.path !== path && cssVarName(prefix, t.path) === v);
|
|
720
|
+
if (clash)
|
|
721
|
+
throw fail(`${path} would build ${v}, the CSS variable of ${clash.path} (${clash.file}).`, 'Pick a name whose CSS variable is free: dots and dashes both become "-".');
|
|
722
|
+
}
|
|
723
|
+
const PAIR = /^([^:/\s]+)[:/]([^:/\s]+)$/;
|
|
724
|
+
function inferType(value, all) {
|
|
725
|
+
const a = aliasOf(value);
|
|
726
|
+
if (a) {
|
|
727
|
+
const t = all.sets.flatMap((s) => s.tokens).find((x) => x.path === a);
|
|
728
|
+
return t?.type ?? null;
|
|
729
|
+
}
|
|
730
|
+
if (typeof value === 'number')
|
|
731
|
+
return 'number';
|
|
732
|
+
const s = String(value);
|
|
733
|
+
if (/^#([0-9a-f]{6}|[0-9a-f]{8})$/i.test(s))
|
|
734
|
+
return 'color';
|
|
735
|
+
if (/^-?\d*\.?\d+(px|rem|em)$/.test(s))
|
|
736
|
+
return 'dimension';
|
|
737
|
+
if (/^\d+(\.\d+)?m?s$/.test(s))
|
|
738
|
+
return 'duration';
|
|
739
|
+
return null;
|
|
740
|
+
}
|
|
741
|
+
const VALIDATORS = VALUE;
|
|
742
|
+
export async function planAdd(root, path, { value, light, dark, type, pair, kind } = {}) {
|
|
743
|
+
const { docs, modes } = await semanticDocs(root);
|
|
744
|
+
const all = await loadAll(root);
|
|
745
|
+
if (!/^[a-z][a-z0-9-]*(\.[a-z0-9][a-z0-9-]*)+$/.test(path))
|
|
746
|
+
throw fail(`"${path}" is not a semantic token path.`, 'Use category.role[-modifier], e.g. color.highlight.');
|
|
747
|
+
for (const [name, doc] of Object.entries(docs)) {
|
|
748
|
+
const n = nodeAt(doc, path);
|
|
749
|
+
if (n !== undefined)
|
|
750
|
+
throw fail(`${path} already exists in ${semanticFile(name)}${isToken(n) ? '' : ' (as a group)'}.`, `Change its value in the semantic file, or pick a new name (sketchbook tokens impact ${path}).`);
|
|
751
|
+
}
|
|
752
|
+
if (all.sets.some((s) => s.layer !== 'semantic' && s.tokens.some((t) => t.path === path || t.path.startsWith(path + '.'))))
|
|
753
|
+
throw fail(`${path} is already a foundation or component path.`, 'Pick a name in the semantic layer\'s own pattern.');
|
|
754
|
+
if (value === undefined && light === undefined && dark === undefined)
|
|
755
|
+
throw fail('Give --value v (mode-less) or --light v --dark v.', 'e.g. sketchbook tokens add color.highlight --light "{color.neutral.100}" --dark "{color.neutral.800}"');
|
|
756
|
+
if (value !== undefined && (light !== undefined || dark !== undefined))
|
|
757
|
+
throw fail('Use either --value or --light/--dark, not both.', 'Mode-less tokens take --value; color tokens usually take --light and --dark.');
|
|
758
|
+
const values = {};
|
|
759
|
+
if (value !== undefined)
|
|
760
|
+
values.base = parseValue(value);
|
|
761
|
+
else
|
|
762
|
+
for (const m of modes) {
|
|
763
|
+
const v = m.role === 'dark' ? dark : light;
|
|
764
|
+
if (v === undefined)
|
|
765
|
+
throw fail(`No value for mode ${m.name} (role ${m.role}).`, `Pass --${m.role} v.`);
|
|
766
|
+
values[m.name] = parseValue(v);
|
|
767
|
+
}
|
|
768
|
+
await refuseName(root, path);
|
|
769
|
+
if (type !== undefined && !TYPES.includes(type))
|
|
770
|
+
throw fail(`--type ${type} is not a token type.`, `Use one of: ${TYPES.join(', ')}.`);
|
|
771
|
+
const known = new Set([...all.sets.flatMap((s) => s.tokens.map((x) => x.path)), path]);
|
|
772
|
+
for (const [m, v] of Object.entries(values)) {
|
|
773
|
+
const a = aliasOf(v);
|
|
774
|
+
if (a && !known.has(a))
|
|
775
|
+
throw fail(`${m}: ${JSON.stringify(v)} names no token (unresolved reference).`, `Point it at an existing token (sketchbook tokens impact ${a.split('.').slice(0, -1).join('.') || a}).`);
|
|
776
|
+
if (a === path)
|
|
777
|
+
throw fail(`${path} cannot alias itself.`, 'Point it at another token.');
|
|
778
|
+
}
|
|
779
|
+
const t = type ?? inferType(Object.values(values)[0], all);
|
|
780
|
+
if (!t)
|
|
781
|
+
throw fail(`Cannot infer the type of ${JSON.stringify(Object.values(values)[0])}.`, `Pass --type ${TYPES.join('|')}.`);
|
|
782
|
+
for (const [m, v] of Object.entries(values)) {
|
|
783
|
+
if (aliasOf(v))
|
|
784
|
+
continue;
|
|
785
|
+
const valid = VALIDATORS[t];
|
|
786
|
+
if (!valid)
|
|
787
|
+
throw new TypeError('VALUE[t] is not a function');
|
|
788
|
+
if (!valid(v))
|
|
789
|
+
throw fail(`${m}: ${JSON.stringify(v)} is not a valid ${t}.`, t === 'color' ? 'Use #RRGGBB or #RRGGBBAA, or an alias {color.…}.' : `Use a valid ${t} value, or an alias to a ${t} token.`);
|
|
790
|
+
}
|
|
791
|
+
const files = {};
|
|
792
|
+
for (const [name, v] of Object.entries(values)) {
|
|
793
|
+
const source = docs[name];
|
|
794
|
+
if (!source)
|
|
795
|
+
throw fail(`${semanticFile(name)} does not exist.`, 'Run npm run tokens:generate.');
|
|
796
|
+
const doc = structuredClone(source);
|
|
797
|
+
insert(doc, path, { $value: v }, t);
|
|
798
|
+
files[semanticFile(name)] = serialize(doc);
|
|
799
|
+
}
|
|
800
|
+
const summary = [`${path} (${t}): ${Object.entries(values).map(([m, v]) => `${m} ${JSON.stringify(v)}`).join(', ')}`];
|
|
801
|
+
if (pair) {
|
|
802
|
+
const m = PAIR.exec(pair);
|
|
803
|
+
if (!m)
|
|
804
|
+
throw fail(`--pair "${pair}" is not fg:bg.`, 'e.g. --pair color.highlight-foreground:color.highlight');
|
|
805
|
+
const [, fg = '', bg = ''] = m;
|
|
806
|
+
const known = new Set([path, ...Object.values(docs).flatMap((d) => flatten(d).map((x) => x.path))]);
|
|
807
|
+
for (const p of [fg, bg])
|
|
808
|
+
if (!known.has(p))
|
|
809
|
+
throw fail(`Pair token ${p} is not a semantic token.`, 'Add it first, or fix the name.');
|
|
810
|
+
if (![fg, bg].includes(path))
|
|
811
|
+
summary.push(`(the pair does not name ${path}; added anyway)`);
|
|
812
|
+
const k = kind ?? 'text';
|
|
813
|
+
if (!['text', 'large-text', 'ui'].includes(k))
|
|
814
|
+
throw fail(`--kind ${k}`, 'Use text, large-text or ui.');
|
|
815
|
+
const contrast = await readJson(root, CONTRAST);
|
|
816
|
+
if (!contrast)
|
|
817
|
+
throw new TypeError("Cannot read properties of null (reading 'pairs')");
|
|
818
|
+
if (!contrast.pairs.some((p) => p.fg === fg && p.bg === bg)) {
|
|
819
|
+
contrast.pairs.push({ fg, bg, kind: k });
|
|
820
|
+
files[CONTRAST] = serialize(contrast);
|
|
821
|
+
summary.push(`contrast pair ${fg} on ${bg} (${k})`);
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
return { files, summary, warnings: [], data: { token: path, type: t, values, pair: pair ?? null }, decision: { title: `New semantic token ${path}`, decision: `Add ${path} (${t}) with ${(summary[0] ?? '').split(': ').slice(1).join(': ')}${pair ? `, contrast pair ${pair}` : ''} (sketchbook tokens add).` } };
|
|
825
|
+
}
|
|
826
|
+
export async function planRemove(root, path) {
|
|
827
|
+
safeParts(path);
|
|
828
|
+
const { docs } = await semanticDocs(root);
|
|
829
|
+
const where = Object.entries(docs).filter(([, d]) => isToken(nodeAt(d, path))).map(([n]) => n);
|
|
830
|
+
if (!where.length)
|
|
831
|
+
throw fail(`${path} is not a semantic token.`, 'sketchbook tokens impact <path> shows where a token lives; only semantic tokens are removed here.');
|
|
832
|
+
const i = await impact(root, path);
|
|
833
|
+
const deps = dependents(i);
|
|
834
|
+
if (deps.length)
|
|
835
|
+
throw Object.assign(fail(`${path} is still used: ${deps.slice(0, 6).join('; ')}${deps.length > 6 ? `; … ${deps.length - 6} more` : ''}.`, `Point those at another token first (or rename with sketchbook tokens rename ${path} <new>), then remove it.`), { data: { impact: i } });
|
|
836
|
+
const files = {};
|
|
837
|
+
for (const name of where) {
|
|
838
|
+
const doc = structuredClone(docs[name] ?? {});
|
|
839
|
+
detach(doc, path);
|
|
840
|
+
files[semanticFile(name)] = serialize(doc);
|
|
841
|
+
}
|
|
842
|
+
return { files, summary: [`${path} removed from ${where.join(', ')}`], warnings: [], data: { token: path, from: where }, decision: { title: `Remove semantic token ${path}`, decision: `Remove ${path} from the semantic layer (${where.join(', ')}); nothing used it (sketchbook tokens remove).` } };
|
|
843
|
+
}
|
|
844
|
+
// Renames a semantic token (or a group of them) everywhere it is named.
|
|
845
|
+
export async function planRename(root, from, to) {
|
|
846
|
+
const { docs } = await semanticDocs(root);
|
|
847
|
+
const config = await readJson(root, 'harness.config.json');
|
|
848
|
+
if (!config)
|
|
849
|
+
throw new TypeError("Cannot read properties of null (reading 'prefix')");
|
|
850
|
+
const prefix = config.prefix;
|
|
851
|
+
if (from === to)
|
|
852
|
+
throw fail('Old and new names are the same.', 'Pick a new name.');
|
|
853
|
+
safeParts(from);
|
|
854
|
+
if (!/^[a-z][a-z0-9-]*(\.[a-z0-9][a-z0-9-]*)+$/.test(to))
|
|
855
|
+
throw fail(`"${to}" is not a token path.`, 'Use category.role[-modifier].');
|
|
856
|
+
if (to.startsWith(from + '.'))
|
|
857
|
+
throw fail(`${to} is inside ${from}.`, 'Rename to a sibling path.');
|
|
858
|
+
const paths = [...new Set(Object.values(docs).flatMap((d) => flatten(d).map((t) => t.path)).filter((p) => p === from || p.startsWith(from + '.')))];
|
|
859
|
+
if (!paths.length)
|
|
860
|
+
throw fail(`${from} is not a semantic token or group.`, 'sketchbook tokens impact <path> shows where a token lives.');
|
|
861
|
+
for (const [name, doc] of Object.entries(docs))
|
|
862
|
+
if (nodeAt(doc, to) !== undefined)
|
|
863
|
+
throw fail(`${to} already exists in ${semanticFile(name)}.`, 'Pick a free name, or remove that token first.');
|
|
864
|
+
const all = await loadAll(root);
|
|
865
|
+
if (all.sets.some((s) => s.layer !== 'semantic' && s.tokens.some((t) => t.path === to || t.path.startsWith(to + '.'))))
|
|
866
|
+
throw fail(`${to} is a foundation or component path.`, 'Pick a free semantic name.');
|
|
867
|
+
const map = new Map(paths.map((p) => [p, to + p.slice(from.length)]));
|
|
868
|
+
for (const p of map.values())
|
|
869
|
+
await refuseName(root, p, { ignore: new Set(paths) });
|
|
870
|
+
const rn = (p) => map.get(p) ?? p;
|
|
871
|
+
const files = {};
|
|
872
|
+
const touched = [];
|
|
873
|
+
// Semantic files: move the nodes, then re-point aliases.
|
|
874
|
+
for (const [name, original] of Object.entries(docs)) {
|
|
875
|
+
const doc = structuredClone(original);
|
|
876
|
+
const moved = [];
|
|
877
|
+
for (const p of paths) {
|
|
878
|
+
const d = detach(doc, p);
|
|
879
|
+
if (d)
|
|
880
|
+
moved.push([p, d]);
|
|
881
|
+
}
|
|
882
|
+
for (const [p, d] of moved)
|
|
883
|
+
insert(doc, rn(p), d.node, d.type);
|
|
884
|
+
const walk = (n) => { if (!isObj(n))
|
|
885
|
+
return; if (isToken(n)) {
|
|
886
|
+
const a = aliasOf(n.$value);
|
|
887
|
+
if (a && map.has(a))
|
|
888
|
+
n.$value = `{${rn(a)}}`;
|
|
889
|
+
return;
|
|
890
|
+
} for (const [k, v] of Object.entries(n))
|
|
891
|
+
if (!k.startsWith('$'))
|
|
892
|
+
walk(v); };
|
|
893
|
+
walk(doc);
|
|
894
|
+
if (serialize(doc) !== serialize(original))
|
|
895
|
+
files[semanticFile(name)] = serialize(doc);
|
|
896
|
+
}
|
|
897
|
+
// Brand links: keys and alsoOn.
|
|
898
|
+
const links = await readJson(root, LINKS);
|
|
899
|
+
if (links?.links) {
|
|
900
|
+
const next = { ...links, links: Object.fromEntries(Object.entries(links.links).map(([k, v]) => [rn(k), v.alsoOn ? { ...v, alsoOn: v.alsoOn.map(rn) } : v])) };
|
|
901
|
+
if (serialize(next) !== serialize(links))
|
|
902
|
+
files[LINKS] = serialize(next);
|
|
903
|
+
}
|
|
904
|
+
// JSON files that name semantic paths as whole strings: contracts (tokens, contrast pairs) and contrast.json.
|
|
905
|
+
const jsonText = (text) => renameJsonText(text, map);
|
|
906
|
+
for (const c of all.contracts) {
|
|
907
|
+
const text = await readText(root, c.file);
|
|
908
|
+
const out = text && jsonText(text);
|
|
909
|
+
if (out && out !== text)
|
|
910
|
+
files[c.file] = out;
|
|
911
|
+
}
|
|
912
|
+
const ct = await readText(root, CONTRAST);
|
|
913
|
+
if (ct && jsonText(ct) !== ct)
|
|
914
|
+
files[CONTRAST] = jsonText(ct);
|
|
915
|
+
for (const file of patternFiles(root)) {
|
|
916
|
+
const text = await readText(root, file);
|
|
917
|
+
if (text && jsonText(text) !== text)
|
|
918
|
+
files[file] = jsonText(text);
|
|
919
|
+
}
|
|
920
|
+
// CSS variables (and exact quoted token paths) in stories, specs, .storybook and patterns.
|
|
921
|
+
for (const { file } of referenceFiles(root)) {
|
|
922
|
+
const text = await readText(root, file);
|
|
923
|
+
if (!text)
|
|
924
|
+
continue;
|
|
925
|
+
const out = renameCodeText(text, map, prefix);
|
|
926
|
+
if (out !== text) {
|
|
927
|
+
files[file] = out;
|
|
928
|
+
touched.push(file);
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
// The rename log: catalog installs translate incoming components and kits through it (SB-0066).
|
|
932
|
+
const log = (await readJson(root, RENAMES)) ?? { $description: RENAMES_DESCRIPTION, renames: [] };
|
|
933
|
+
log.renames = [...(log.renames ?? []), { from, to, date: new Date().toISOString().slice(0, 10) }];
|
|
934
|
+
files[RENAMES] = serialize(log);
|
|
935
|
+
return {
|
|
936
|
+
files, warnings: [],
|
|
937
|
+
summary: [`${from} -> ${to}: ${paths.length} token(s); ${Object.keys(files).length} file(s) rewritten`, ...Object.keys(files).map((f) => ` ${f}`)],
|
|
938
|
+
data: { from, to, tokens: Object.fromEntries(map), files: Object.keys(files) },
|
|
939
|
+
decision: { title: `Rename ${from} to ${to}`, decision: `Rename the semantic token${paths.length > 1 ? 's under' : ''} ${from} to ${to} in semantic files, brand links, contracts, contrast pairs, stories, specs, patterns and .storybook (sketchbook tokens rename).` },
|
|
940
|
+
};
|
|
941
|
+
}
|
|
942
|
+
// ---------- scratch ----------
|
|
943
|
+
export const SCRATCH_QUESTIONS = [
|
|
944
|
+
{ key: 'name', q: 'System name', default: 'my-system' },
|
|
945
|
+
{ key: 'primary', q: 'Primary color (#RRGGBB, or "neutral" for a monochrome start)', default: 'neutral' },
|
|
946
|
+
{ key: 'neutral', q: 'Neutral gray', family: 'neutrals' },
|
|
947
|
+
{ key: 'font', q: 'Font family (a name, or ui-sans-serif for the system font)', default: 'ui-sans-serif' },
|
|
948
|
+
{ key: 'scale', q: 'Type scale', family: 'typeScale' },
|
|
949
|
+
{ key: 'spacing', q: 'Spacing grid', family: 'spacing' },
|
|
950
|
+
{ key: 'radius', q: 'Corner radius', family: 'radius' },
|
|
951
|
+
{ key: 'density', q: 'Density', family: 'density' },
|
|
952
|
+
{ key: 'motion', q: 'Motion', family: 'motion' },
|
|
953
|
+
{ key: 'elevation', q: 'Elevation', family: 'elevation' },
|
|
954
|
+
{ key: 'contrast', q: 'Contrast standard', family: 'contrast' },
|
|
955
|
+
];
|
|
956
|
+
// String(q.family): a question without a family looks up "undefined", as the untyped lookup did.
|
|
957
|
+
export const questionDefault = (q) => q.default ?? family(String(q.family)).default ?? presetsOf(String(q.family))[0]?.id;
|
|
958
|
+
const SCRATCH_PRESETS = ['spacing', 'radius', 'density', 'motion', 'elevation', 'contrast'];
|
|
959
|
+
// Pure: a minimal brand.config from answers. Unanswered foundations stay out (the catalog default applies).
|
|
960
|
+
export function scratchBrand(answers, modes) {
|
|
961
|
+
const known = new Set(SCRATCH_QUESTIONS.map((q) => q.key));
|
|
962
|
+
for (const k of Object.keys(answers))
|
|
963
|
+
if (!known.has(k))
|
|
964
|
+
throw fail(`Unknown answer "${k}".`, `Answers: ${[...known].join(', ')}.`);
|
|
965
|
+
const b = { $schema: './spec/schemas/brand-config.schema.json', name: answers.name ?? 'my-system', $description: 'Started from scratch (sketchbook tokens scratch): only the answered foundations are set; the rest use the catalog defaults. The semantic interface was kept.' };
|
|
966
|
+
if (answers.primary || answers.neutral)
|
|
967
|
+
b.color = { ...(answers.primary ? { primary: answers.primary } : {}), ...(answers.neutral ? { neutral: { preset: answers.neutral } } : {}) };
|
|
968
|
+
if (modes)
|
|
969
|
+
b.modes = modes;
|
|
970
|
+
if (answers.font || answers.scale)
|
|
971
|
+
b.typography = { ...(answers.font ? { family: answers.font } : {}), ...(answers.scale ? { scale: { preset: answers.scale } } : {}) };
|
|
972
|
+
for (const k of SCRATCH_PRESETS) {
|
|
973
|
+
const id = answers[k];
|
|
974
|
+
if (id)
|
|
975
|
+
Object.assign(b, { [k]: { preset: id } });
|
|
976
|
+
}
|
|
977
|
+
return b;
|
|
978
|
+
}
|
|
979
|
+
export async function planScratch(root, answers) {
|
|
980
|
+
const old = await readJson(root, BRAND);
|
|
981
|
+
const brand = scratchBrand(answers, old?.modes);
|
|
982
|
+
await validateBrand(root, brand);
|
|
983
|
+
return {
|
|
984
|
+
files: { [BRAND]: serialize(brand) }, warnings: [],
|
|
985
|
+
summary: [`brand.config.json reset to ${Object.keys(answers).length} answer(s): ${Object.entries(answers).map(([k, v]) => `${k}=${v}`).join(', ') || 'catalog defaults'}`, 'Semantic tokens and the interface are kept; links re-point them.'],
|
|
986
|
+
data: { brand },
|
|
987
|
+
decision: { title: 'Foundations restarted from scratch', decision: `brand.config.json rewritten from a questionnaire (${Object.entries(answers).map(([k, v]) => `${k} ${v}`).join(', ') || 'catalog defaults'}) with sketchbook tokens scratch; the semantic interface was kept.` },
|
|
988
|
+
};
|
|
989
|
+
}
|