handoff-app-next 2.0.0-canary.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Changelog.md +2069 -0
- package/License.md +19 -0
- package/README.md +461 -0
- package/components.json +21 -0
- package/config/config.template.js +95 -0
- package/config/config.template.ts +54 -0
- package/config/docs/design.md +14 -0
- package/config/docs/foundations/border-radius.md +6 -0
- package/config/docs/foundations/colors.md +7 -0
- package/config/docs/foundations/effects.md +8 -0
- package/config/docs/foundations/elevation.md +6 -0
- package/config/docs/foundations/focus.md +6 -0
- package/config/docs/foundations/fonts.md +7 -0
- package/config/docs/foundations/grid.md +21 -0
- package/config/docs/foundations/icon.md +6 -0
- package/config/docs/foundations/icons.md +6 -0
- package/config/docs/foundations/logo.md +7 -0
- package/config/docs/foundations/logos.md +7 -0
- package/config/docs/foundations/motion.md +6 -0
- package/config/docs/foundations/spacing.md +7 -0
- package/config/docs/foundations/typography.md +8 -0
- package/config/docs/foundations.md +44 -0
- package/config/docs/guidelines.md +11 -0
- package/config/docs/index.md +9 -0
- package/config/docs/playground.md +14 -0
- package/config/docs/system/figma-sync.md +14 -0
- package/config/docs/system/tokens/foundations/colors.md +24 -0
- package/config/docs/system/tokens/foundations/effects.md +21 -0
- package/config/docs/system/tokens/foundations/spacing.md +22 -0
- package/config/docs/system/tokens/foundations/typography.md +24 -0
- package/config/docs/system.md +13 -0
- package/config/templates/component/template.hbs +6 -0
- package/config/templates/component/template.js +0 -0
- package/config/templates/component/template.json +45 -0
- package/config/templates/component/template.scss +2 -0
- package/config/templates/page.md +11 -0
- package/config/templates/page.mdx +49 -0
- package/config/templates/template.html +7 -0
- package/dist/app/components/Component/Cards.d.ts +25 -0
- package/dist/app/components/Component/Cards.jsx +27 -0
- package/dist/app/lib/adapter-kit/types.d.ts +581 -0
- package/dist/app/lib/adapter-kit/types.js +36 -0
- package/dist/app/lib/hubspot-field-map.d.ts +170 -0
- package/dist/app/lib/hubspot-field-map.js +538 -0
- package/dist/app/lib/hubspot-module/build-module.d.ts +136 -0
- package/dist/app/lib/hubspot-module/build-module.js +122 -0
- package/dist/app/lib/hubspot-module/context.d.ts +111 -0
- package/dist/app/lib/hubspot-module/context.js +228 -0
- package/dist/app/lib/hubspot-module/fields/boolean.d.ts +8 -0
- package/dist/app/lib/hubspot-module/fields/boolean.js +22 -0
- package/dist/app/lib/hubspot-module/fields/button.d.ts +19 -0
- package/dist/app/lib/hubspot-module/fields/button.js +66 -0
- package/dist/app/lib/hubspot-module/fields/fields.d.ts +20 -0
- package/dist/app/lib/hubspot-module/fields/fields.js +93 -0
- package/dist/app/lib/hubspot-module/fields/generic.d.ts +33 -0
- package/dist/app/lib/hubspot-module/fields/generic.js +150 -0
- package/dist/app/lib/hubspot-module/fields/hubdb.d.ts +14 -0
- package/dist/app/lib/hubspot-module/fields/hubdb.js +155 -0
- package/dist/app/lib/hubspot-module/fields/image.d.ts +27 -0
- package/dist/app/lib/hubspot-module/fields/image.js +59 -0
- package/dist/app/lib/hubspot-module/fields/menu.d.ts +8 -0
- package/dist/app/lib/hubspot-module/fields/menu.js +12 -0
- package/dist/app/lib/hubspot-module/fields/object.d.ts +11 -0
- package/dist/app/lib/hubspot-module/fields/object.js +31 -0
- package/dist/app/lib/hubspot-module/fields/select.d.ts +17 -0
- package/dist/app/lib/hubspot-module/fields/select.js +37 -0
- package/dist/app/lib/hubspot-module/fields/text.d.ts +15 -0
- package/dist/app/lib/hubspot-module/fields/text.js +63 -0
- package/dist/app/lib/hubspot-module/fields/url.d.ts +35 -0
- package/dist/app/lib/hubspot-module/fields/url.js +57 -0
- package/dist/app/lib/hubspot-module/fields/utils.d.ts +20 -0
- package/dist/app/lib/hubspot-module/fields/utils.js +33 -0
- package/dist/app/lib/hubspot-module/fields/video.d.ts +21 -0
- package/dist/app/lib/hubspot-module/fields/video.js +70 -0
- package/dist/app/lib/hubspot-module/index.d.ts +20 -0
- package/dist/app/lib/hubspot-module/index.js +17 -0
- package/dist/app/lib/hubspot-module/transpile.d.ts +27 -0
- package/dist/app/lib/hubspot-module/transpile.js +658 -0
- package/dist/app/lib/hubspot-module/types.d.ts +204 -0
- package/dist/app/lib/hubspot-module/types.js +47 -0
- package/dist/app/lib/hubspot-module-build.d.ts +33 -0
- package/dist/app/lib/hubspot-module-build.js +41 -0
- package/dist/app-builder/build.d.ts +21 -0
- package/dist/app-builder/build.js +649 -0
- package/dist/app-builder/client-config.d.ts +17 -0
- package/dist/app-builder/client-config.js +106 -0
- package/dist/app-builder/config-diff/index.d.ts +4 -0
- package/dist/app-builder/config-diff/index.js +3 -0
- package/dist/app-builder/config-diff/registry.d.ts +9 -0
- package/dist/app-builder/config-diff/registry.js +15 -0
- package/dist/app-builder/config-diff/snapshot.d.ts +13 -0
- package/dist/app-builder/config-diff/snapshot.js +38 -0
- package/dist/app-builder/config-diff/strategies/pattern.d.ts +2 -0
- package/dist/app-builder/config-diff/strategies/pattern.js +66 -0
- package/dist/app-builder/config-diff/types.d.ts +33 -0
- package/dist/app-builder/config-diff/types.js +1 -0
- package/dist/app-builder/index.d.ts +6 -0
- package/dist/app-builder/index.js +4 -0
- package/dist/app-builder/path-contract.d.ts +23 -0
- package/dist/app-builder/path-contract.js +60 -0
- package/dist/app-builder/paths.d.ts +24 -0
- package/dist/app-builder/paths.js +82 -0
- package/dist/app-builder/watchers/component.d.ts +15 -0
- package/dist/app-builder/watchers/component.js +58 -0
- package/dist/app-builder/watchers/utils.d.ts +14 -0
- package/dist/app-builder/watchers/utils.js +31 -0
- package/dist/app-builder/watchers.d.ts +44 -0
- package/dist/app-builder/watchers.js +299 -0
- package/dist/app-builder/websocket.d.ts +12 -0
- package/dist/app-builder/websocket.js +56 -0
- package/dist/cache/build-cache.d.ts +169 -0
- package/dist/cache/build-cache.js +421 -0
- package/dist/cache/file-state.d.ts +58 -0
- package/dist/cache/file-state.js +122 -0
- package/dist/cache/index.d.ts +3 -0
- package/dist/cache/index.js +6 -0
- package/dist/cache/push-state.d.ts +69 -0
- package/dist/cache/push-state.js +156 -0
- package/dist/cli/create.d.ts +5 -0
- package/dist/cli/create.js +301 -0
- package/dist/cli/eject.d.ts +17 -0
- package/dist/cli/eject.js +82 -0
- package/dist/cli/fetch-design-md.d.ts +14 -0
- package/dist/cli/fetch-design-md.js +62 -0
- package/dist/cli/figma-audit.d.ts +7 -0
- package/dist/cli/figma-audit.js +55 -0
- package/dist/cli/init-claude-core.d.ts +26 -0
- package/dist/cli/init-claude-core.js +81 -0
- package/dist/cli/make.d.ts +12 -0
- package/dist/cli/make.js +178 -0
- package/dist/cli/scaffold.d.ts +5 -0
- package/dist/cli/scaffold.js +504 -0
- package/dist/cli/sync/apply-declaration-pull.d.ts +14 -0
- package/dist/cli/sync/apply-declaration-pull.js +184 -0
- package/dist/cli/sync/apply-pull.d.ts +24 -0
- package/dist/cli/sync/apply-pull.js +174 -0
- package/dist/cli/sync/cli-auth-store.d.ts +12 -0
- package/dist/cli/sync/cli-auth-store.js +44 -0
- package/dist/cli/sync/collect-build-artifacts.d.ts +17 -0
- package/dist/cli/sync/collect-build-artifacts.js +143 -0
- package/dist/cli/sync/collect-referenced-images.d.ts +36 -0
- package/dist/cli/sync/collect-referenced-images.js +165 -0
- package/dist/cli/sync/declaration-patch.d.ts +9 -0
- package/dist/cli/sync/declaration-patch.js +196 -0
- package/dist/cli/sync/hash.d.ts +2 -0
- package/dist/cli/sync/hash.js +11 -0
- package/dist/cli/sync/open-browser.d.ts +5 -0
- package/dist/cli/sync/open-browser.js +37 -0
- package/dist/cli/sync/push-provenance.d.ts +25 -0
- package/dist/cli/sync/push-provenance.js +82 -0
- package/dist/cli/sync/push-registry-content.d.ts +132 -0
- package/dist/cli/sync/push-registry-content.js +854 -0
- package/dist/cli/sync/push-shared-assets.d.ts +26 -0
- package/dist/cli/sync/push-shared-assets.js +33 -0
- package/dist/cli/sync/resolve-declaration-payload.d.ts +8 -0
- package/dist/cli/sync/resolve-declaration-payload.js +208 -0
- package/dist/cli/sync/resolve-declaration.d.ts +5 -0
- package/dist/cli/sync/resolve-declaration.js +12 -0
- package/dist/cli/sync/run-cli-login.d.ts +9 -0
- package/dist/cli/sync/run-cli-login.js +81 -0
- package/dist/cli/sync/run-history-purge.d.ts +19 -0
- package/dist/cli/sync/run-history-purge.js +112 -0
- package/dist/cli/sync/run-pull.d.ts +9 -0
- package/dist/cli/sync/run-pull.js +92 -0
- package/dist/cli/sync/run-push.d.ts +47 -0
- package/dist/cli/sync/run-push.js +585 -0
- package/dist/cli/sync/run-sync-status.d.ts +2 -0
- package/dist/cli/sync/run-sync-status.js +30 -0
- package/dist/cli/sync/sync-remote-env.d.ts +14 -0
- package/dist/cli/sync/sync-remote-env.js +52 -0
- package/dist/cli/sync/sync-state.d.ts +15 -0
- package/dist/cli/sync/sync-state.js +26 -0
- package/dist/cli/tokens/ensure-default-brand.d.ts +18 -0
- package/dist/cli/tokens/ensure-default-brand.js +95 -0
- package/dist/cli/tokens/migrate-legacy.d.ts +23 -0
- package/dist/cli/tokens/migrate-legacy.js +213 -0
- package/dist/cli/tokens/parse-css-brands.d.ts +25 -0
- package/dist/cli/tokens/parse-css-brands.js +148 -0
- package/dist/cli/tokens/transform.d.ts +12 -0
- package/dist/cli/tokens/transform.js +126 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +56 -0
- package/dist/commands/audit/figma-components.d.ts +8 -0
- package/dist/commands/audit/figma-components.js +27 -0
- package/dist/commands/build/app.d.ts +8 -0
- package/dist/commands/build/app.js +22 -0
- package/dist/commands/build/components.d.ts +7 -0
- package/dist/commands/build/components.js +17 -0
- package/dist/commands/build/hubspot.d.ts +56 -0
- package/dist/commands/build/hubspot.js +177 -0
- package/dist/commands/dev/index.d.ts +6 -0
- package/dist/commands/dev/index.js +14 -0
- package/dist/commands/eject/config.d.ts +6 -0
- package/dist/commands/eject/config.js +14 -0
- package/dist/commands/eject/pages.d.ts +6 -0
- package/dist/commands/eject/pages.js +14 -0
- package/dist/commands/eject/theme.d.ts +6 -0
- package/dist/commands/eject/theme.js +14 -0
- package/dist/commands/fetch/index.d.ts +6 -0
- package/dist/commands/fetch/index.js +14 -0
- package/dist/commands/history-purge.d.ts +19 -0
- package/dist/commands/history-purge.js +52 -0
- package/dist/commands/index.d.ts +1 -0
- package/dist/commands/index.js +66 -0
- package/dist/commands/init/index.d.ts +5 -0
- package/dist/commands/init/index.js +12 -0
- package/dist/commands/init/vercel.d.ts +6 -0
- package/dist/commands/init/vercel.js +99 -0
- package/dist/commands/init-claude.d.ts +9 -0
- package/dist/commands/init-claude.js +47 -0
- package/dist/commands/login.d.ts +9 -0
- package/dist/commands/login.js +28 -0
- package/dist/commands/logout.d.ts +6 -0
- package/dist/commands/logout.js +16 -0
- package/dist/commands/make/component.d.ts +7 -0
- package/dist/commands/make/component.js +23 -0
- package/dist/commands/make/page.d.ts +8 -0
- package/dist/commands/make/page.js +33 -0
- package/dist/commands/make/template.d.ts +8 -0
- package/dist/commands/make/template.js +33 -0
- package/dist/commands/mcp-init.d.ts +12 -0
- package/dist/commands/mcp-init.js +94 -0
- package/dist/commands/mcp-token.d.ts +7 -0
- package/dist/commands/mcp-token.js +23 -0
- package/dist/commands/prepare-runtime.d.ts +7 -0
- package/dist/commands/prepare-runtime.js +28 -0
- package/dist/commands/pull.d.ts +7 -0
- package/dist/commands/pull.js +18 -0
- package/dist/commands/push-all.d.ts +23 -0
- package/dist/commands/push-all.js +146 -0
- package/dist/commands/push-assets.d.ts +8 -0
- package/dist/commands/push-assets.js +40 -0
- package/dist/commands/push-tokens.d.ts +8 -0
- package/dist/commands/push-tokens.js +40 -0
- package/dist/commands/push.d.ts +14 -0
- package/dist/commands/push.js +75 -0
- package/dist/commands/scaffold/index.d.ts +6 -0
- package/dist/commands/scaffold/index.js +15 -0
- package/dist/commands/start/index.d.ts +6 -0
- package/dist/commands/start/index.js +14 -0
- package/dist/commands/sync-status.d.ts +6 -0
- package/dist/commands/sync-status.js +14 -0
- package/dist/commands/tokens-build.d.ts +7 -0
- package/dist/commands/tokens-build.js +104 -0
- package/dist/commands/types.d.ts +5 -0
- package/dist/commands/types.js +1 -0
- package/dist/commands/utils.d.ts +18 -0
- package/dist/commands/utils.js +19 -0
- package/dist/commands/validate/components.d.ts +7 -0
- package/dist/commands/validate/components.js +19 -0
- package/dist/commands/validate.d.ts +11 -0
- package/dist/commands/validate.js +163 -0
- package/dist/commands/vercel-build.d.ts +7 -0
- package/dist/commands/vercel-build.js +81 -0
- package/dist/config/declaration-module-load.d.ts +6 -0
- package/dist/config/declaration-module-load.js +68 -0
- package/dist/config/defaults.d.ts +16 -0
- package/dist/config/defaults.js +60 -0
- package/dist/config/helpers.d.ts +7 -0
- package/dist/config/helpers.js +29 -0
- package/dist/config/index.d.ts +7 -0
- package/dist/config/index.js +11 -0
- package/dist/config/loader.d.ts +20 -0
- package/dist/config/loader.js +107 -0
- package/dist/config/normalizers/declaration.d.ts +11 -0
- package/dist/config/normalizers/declaration.js +122 -0
- package/dist/config/normalizers/pattern.d.ts +8 -0
- package/dist/config/normalizers/pattern.js +31 -0
- package/dist/config/runtime.d.ts +42 -0
- package/dist/config/runtime.js +337 -0
- package/dist/config/validator.d.ts +9 -0
- package/dist/config/validator.js +22 -0
- package/dist/declarations/codegen.d.ts +57 -0
- package/dist/declarations/codegen.js +279 -0
- package/dist/declarations/helpers.d.ts +6 -0
- package/dist/declarations/helpers.js +20 -0
- package/dist/declarations/index.d.ts +2 -0
- package/dist/declarations/index.js +1 -0
- package/dist/declarations/types.d.ts +193 -0
- package/dist/declarations/types.js +1 -0
- package/dist/figma/component-linking.d.ts +164 -0
- package/dist/figma/component-linking.js +1080 -0
- package/dist/figma/image-fills.d.ts +32 -0
- package/dist/figma/image-fills.js +211 -0
- package/dist/generated/build-meta.d.ts +4 -0
- package/dist/generated/build-meta.js +6 -0
- package/dist/index.d.ts +115 -0
- package/dist/index.js +301 -0
- package/dist/pipeline/archive.d.ts +19 -0
- package/dist/pipeline/archive.js +62 -0
- package/dist/pipeline/components.d.ts +5 -0
- package/dist/pipeline/components.js +7 -0
- package/dist/pipeline/documentation.d.ts +3 -0
- package/dist/pipeline/documentation.js +64 -0
- package/dist/pipeline/figma.d.ts +11 -0
- package/dist/pipeline/figma.js +142 -0
- package/dist/pipeline/hubspot/config.d.ts +179 -0
- package/dist/pipeline/hubspot/config.js +171 -0
- package/dist/pipeline/hubspot/emit.d.ts +101 -0
- package/dist/pipeline/hubspot/emit.js +283 -0
- package/dist/pipeline/index.d.ts +14 -0
- package/dist/pipeline/index.js +34 -0
- package/dist/pipeline/patterns.d.ts +8 -0
- package/dist/pipeline/patterns.js +8 -0
- package/dist/pipeline/styles.d.ts +10 -0
- package/dist/pipeline/styles.js +127 -0
- package/dist/pipeline/validation.d.ts +6 -0
- package/dist/pipeline/validation.js +23 -0
- package/dist/transformers/docgen/index.d.ts +24 -0
- package/dist/transformers/docgen/index.js +244 -0
- package/dist/transformers/plugins/csf-render.d.ts +5 -0
- package/dist/transformers/plugins/csf-render.js +406 -0
- package/dist/transformers/plugins/handlebars-previews.d.ts +12 -0
- package/dist/transformers/plugins/handlebars-previews.js +128 -0
- package/dist/transformers/plugins/index.d.ts +11 -0
- package/dist/transformers/plugins/index.js +10 -0
- package/dist/transformers/plugins/slot-probe-candidates.d.ts +159 -0
- package/dist/transformers/plugins/slot-probe-candidates.js +279 -0
- package/dist/transformers/plugins/slot-probe.d.ts +66 -0
- package/dist/transformers/plugins/slot-probe.js +298 -0
- package/dist/transformers/plugins/ssr-render.d.ts +33 -0
- package/dist/transformers/plugins/ssr-render.js +531 -0
- package/dist/transformers/plugins.d.ts +14 -0
- package/dist/transformers/plugins.js +15 -0
- package/dist/transformers/preview/component/api.d.ts +22 -0
- package/dist/transformers/preview/component/api.js +146 -0
- package/dist/transformers/preview/component/artifacts.d.ts +3 -0
- package/dist/transformers/preview/component/artifacts.js +103 -0
- package/dist/transformers/preview/component/build-shared-bundles.d.ts +83 -0
- package/dist/transformers/preview/component/build-shared-bundles.js +400 -0
- package/dist/transformers/preview/component/builder.d.ts +29 -0
- package/dist/transformers/preview/component/builder.js +638 -0
- package/dist/transformers/preview/component/css.d.ts +68 -0
- package/dist/transformers/preview/component/css.js +219 -0
- package/dist/transformers/preview/component/field-annotations.d.ts +129 -0
- package/dist/transformers/preview/component/field-annotations.js +325 -0
- package/dist/transformers/preview/component/html.d.ts +21 -0
- package/dist/transformers/preview/component/html.js +80 -0
- package/dist/transformers/preview/component/javascript.d.ts +24 -0
- package/dist/transformers/preview/component/javascript.js +162 -0
- package/dist/transformers/preview/component/normalizer.d.ts +35 -0
- package/dist/transformers/preview/component/normalizer.js +56 -0
- package/dist/transformers/preview/component/playwright-shared.d.ts +70 -0
- package/dist/transformers/preview/component/playwright-shared.js +164 -0
- package/dist/transformers/preview/component/preview-assets.d.ts +55 -0
- package/dist/transformers/preview/component/preview-assets.js +144 -0
- package/dist/transformers/preview/component/preview-merge.d.ts +53 -0
- package/dist/transformers/preview/component/preview-merge.js +50 -0
- package/dist/transformers/preview/component/preview-select.d.ts +86 -0
- package/dist/transformers/preview/component/preview-select.js +150 -0
- package/dist/transformers/preview/component/preview-server.d.ts +41 -0
- package/dist/transformers/preview/component/preview-server.js +112 -0
- package/dist/transformers/preview/component/preview-validation.d.ts +64 -0
- package/dist/transformers/preview/component/preview-validation.js +194 -0
- package/dist/transformers/preview/component/previews.d.ts +9 -0
- package/dist/transformers/preview/component/previews.js +6 -0
- package/dist/transformers/preview/component/screenshot.d.ts +90 -0
- package/dist/transformers/preview/component/screenshot.js +282 -0
- package/dist/transformers/preview/component/serialized-elements.d.ts +86 -0
- package/dist/transformers/preview/component/serialized-elements.js +118 -0
- package/dist/transformers/preview/component/summary.d.ts +6 -0
- package/dist/transformers/preview/component/summary.js +41 -0
- package/dist/transformers/preview/component.d.ts +13 -0
- package/dist/transformers/preview/component.js +26 -0
- package/dist/transformers/preview/height-reporter.d.ts +27 -0
- package/dist/transformers/preview/height-reporter.js +32 -0
- package/dist/transformers/preview/pattern/api.d.ts +11 -0
- package/dist/transformers/preview/pattern/api.js +58 -0
- package/dist/transformers/preview/pattern/builder.d.ts +17 -0
- package/dist/transformers/preview/pattern/builder.js +149 -0
- package/dist/transformers/preview/pattern/html.d.ts +25 -0
- package/dist/transformers/preview/pattern/html.js +95 -0
- package/dist/transformers/preview/slots.d.ts +109 -0
- package/dist/transformers/preview/slots.js +13 -0
- package/dist/transformers/preview/types.d.ts +292 -0
- package/dist/transformers/preview/types.js +7 -0
- package/dist/transformers/types.d.ts +60 -0
- package/dist/transformers/types.js +1 -0
- package/dist/transformers/utils/build.d.ts +27 -0
- package/dist/transformers/utils/build.js +77 -0
- package/dist/transformers/utils/csf.d.ts +16 -0
- package/dist/transformers/utils/csf.js +29 -0
- package/dist/transformers/utils/handlebars.d.ts +32 -0
- package/dist/transformers/utils/handlebars.js +73 -0
- package/dist/transformers/utils/html.d.ts +18 -0
- package/dist/transformers/utils/html.js +40 -0
- package/dist/transformers/utils/index.d.ts +13 -0
- package/dist/transformers/utils/index.js +20 -0
- package/dist/transformers/utils/module.d.ts +13 -0
- package/dist/transformers/utils/module.js +41 -0
- package/dist/transformers/utils/schema-loader.d.ts +19 -0
- package/dist/transformers/utils/schema-loader.js +61 -0
- package/dist/transformers/utils/schema.d.ts +33 -0
- package/dist/transformers/utils/schema.js +517 -0
- package/dist/transformers/utils/string.d.ts +36 -0
- package/dist/transformers/utils/string.js +52 -0
- package/dist/transformers/utils/svg-sprite.d.ts +16 -0
- package/dist/transformers/utils/svg-sprite.js +114 -0
- package/dist/transformers/utils/usage.d.ts +23 -0
- package/dist/transformers/utils/usage.js +282 -0
- package/dist/transformers/utils/vite-logger.d.ts +2 -0
- package/dist/transformers/utils/vite-logger.js +30 -0
- package/dist/transformers/validation/runner.d.ts +67 -0
- package/dist/transformers/validation/runner.js +277 -0
- package/dist/transformers/vite-config.d.ts +3 -0
- package/dist/transformers/vite-config.js +18 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/config.d.ts +472 -0
- package/dist/types/config.js +1 -0
- package/dist/types/font.d.ts +3 -0
- package/dist/types/font.js +1 -0
- package/dist/types/handoff-sync.d.ts +132 -0
- package/dist/types/handoff-sync.js +5 -0
- package/dist/types/history-purge.d.ts +112 -0
- package/dist/types/history-purge.js +18 -0
- package/dist/types/icon.d.ts +8 -0
- package/dist/types/icon.js +1 -0
- package/dist/types/preview.d.ts +138 -0
- package/dist/types/preview.js +1 -0
- package/dist/types/validation.d.ts +200 -0
- package/dist/types/validation.js +11 -0
- package/dist/utils/asset-upload-limits.d.ts +87 -0
- package/dist/utils/asset-upload-limits.js +129 -0
- package/dist/utils/design-md.d.ts +55 -0
- package/dist/utils/design-md.js +107 -0
- package/dist/utils/duration.d.ts +2 -0
- package/dist/utils/duration.js +2 -0
- package/dist/utils/filter.d.ts +31 -0
- package/dist/utils/filter.js +109 -0
- package/dist/utils/fs.d.ts +8 -0
- package/dist/utils/fs.js +31 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/index.js +6 -0
- package/dist/utils/line-diff.d.ts +25 -0
- package/dist/utils/line-diff.js +74 -0
- package/dist/utils/logger.d.ts +50 -0
- package/dist/utils/logger.js +158 -0
- package/dist/utils/path.d.ts +21 -0
- package/dist/utils/path.js +50 -0
- package/dist/utils/port.d.ts +15 -0
- package/dist/utils/port.js +38 -0
- package/dist/utils/rich-text.d.ts +228 -0
- package/dist/utils/rich-text.js +1087 -0
- package/dist/validators/axe.d.ts +47 -0
- package/dist/validators/axe.js +222 -0
- package/dist/validators/contrast.d.ts +33 -0
- package/dist/validators/contrast.js +235 -0
- package/dist/validators/index.d.ts +30 -0
- package/dist/validators/index.js +26 -0
- package/dist/validators/schema.d.ts +34 -0
- package/dist/validators/schema.js +138 -0
- package/docs/DEPENDENCIES.md +26 -0
- package/docs/DEPLOYMENT.md +110 -0
- package/docs/LOCAL-RIG.md +305 -0
- package/docs/README.md +15 -0
- package/docs/REGISTRY-SETUP.md +353 -0
- package/docs/STANDALONE-INSTALL.md +70 -0
- package/docs/WORKSPACE-PACKAGE-JSON.md +125 -0
- package/docs/api.md +657 -0
- package/docs/api_spec.yaml +450 -0
- package/docs/cli.md +86 -0
- package/docs/schemas/component.schema.json +167 -0
- package/docs/schemas/examples/button.json +83 -0
- package/drizzle.config.ts +10 -0
- package/package.json +271 -0
- package/postcss.config.mjs +8 -0
- package/scripts/assert-standalone-install.mjs +60 -0
- package/src/app/app/[...slug]/DocCatchAllClient.tsx +103 -0
- package/src/app/app/[...slug]/page.tsx +101 -0
- package/src/app/app/account/AccountClient.tsx +116 -0
- package/src/app/app/account/IntegrationsSection.tsx +273 -0
- package/src/app/app/account/SanityCard.tsx +473 -0
- package/src/app/app/account/ai-cost/page.tsx +141 -0
- package/src/app/app/account/appearance/AppearanceClient.tsx +433 -0
- package/src/app/app/account/appearance/page.tsx +52 -0
- package/src/app/app/account/integrations/page.tsx +37 -0
- package/src/app/app/account/layout.tsx +82 -0
- package/src/app/app/account/page.tsx +41 -0
- package/src/app/app/account/users/UsersClient.tsx +244 -0
- package/src/app/app/account/users/page.tsx +36 -0
- package/src/app/app/actions/ai-generate.ts +25 -0
- package/src/app/app/actions/components.ts +126 -0
- package/src/app/app/actions/patterns.ts +289 -0
- package/src/app/app/admin/ai-cost/AiCostClient.tsx +236 -0
- package/src/app/app/admin/ai-cost/page.tsx +56 -0
- package/src/app/app/admin/builds/BuildsClient.tsx +527 -0
- package/src/app/app/admin/builds/page.tsx +41 -0
- package/src/app/app/admin/integrations/page.tsx +32 -0
- package/src/app/app/admin/pages/PagesClient.tsx +282 -0
- package/src/app/app/admin/pages/edit/PageEditorClient.tsx +157 -0
- package/src/app/app/admin/pages/edit/page.tsx +48 -0
- package/src/app/app/admin/pages/page.tsx +31 -0
- package/src/app/app/admin/protection/ProtectionClient.tsx +235 -0
- package/src/app/app/admin/protection/page.tsx +33 -0
- package/src/app/app/admin/reference/ReferenceClient.tsx +150 -0
- package/src/app/app/admin/reference/page.tsx +38 -0
- package/src/app/app/admin/users/page.tsx +11 -0
- package/src/app/app/api/account/route.ts +36 -0
- package/src/app/app/api/admin/builds/status/route.ts +34 -0
- package/src/app/app/api/admin/cleanup-versions/route.ts +64 -0
- package/src/app/app/api/admin/contract-limit-audit/route.ts +126 -0
- package/src/app/app/api/admin/contract-render-audit/route.ts +116 -0
- package/src/app/app/api/admin/field-bridge-audit/route.ts +152 -0
- package/src/app/app/api/admin/migrate/route.ts +47 -0
- package/src/app/app/api/admin/playground-turns/route.ts +85 -0
- package/src/app/app/api/admin/purge-history/route.ts +119 -0
- package/src/app/app/api/auth/[...nextauth]/route.ts +30 -0
- package/src/app/app/api/component/[...path]/route.ts +141 -0
- package/src/app/app/api/component-artifact/[...path]/route.ts +18 -0
- package/src/app/app/api/components/route.ts +78 -0
- package/src/app/app/api/figma-plugin/auth/device/route.ts +40 -0
- package/src/app/app/api/figma-plugin/auth/revoke/route.ts +15 -0
- package/src/app/app/api/figma-plugin/auth/token/route.ts +50 -0
- package/src/app/app/api/figma-plugin/foundations/commit/route.ts +111 -0
- package/src/app/app/api/figma-plugin/foundations/preview/route.ts +69 -0
- package/src/app/app/api/figma-plugin/foundations/route.ts +49 -0
- package/src/app/app/api/handoff/admin/appearance/route.ts +80 -0
- package/src/app/app/api/handoff/admin/backfill-artifact-blobs/route.ts +48 -0
- package/src/app/app/api/handoff/admin/build-tasks/kill/route.ts +43 -0
- package/src/app/app/api/handoff/admin/build-tasks/route.ts +21 -0
- package/src/app/app/api/handoff/admin/invite/route.ts +18 -0
- package/src/app/app/api/handoff/admin/normalize-previews/route.ts +107 -0
- package/src/app/app/api/handoff/admin/reference-materials/route.ts +69 -0
- package/src/app/app/api/handoff/admin/remove/route.ts +18 -0
- package/src/app/app/api/handoff/admin/resend-invite/route.ts +18 -0
- package/src/app/app/api/handoff/admin/role/route.ts +18 -0
- package/src/app/app/api/handoff/admin/users/route.ts +16 -0
- package/src/app/app/api/handoff/ai/analyze-layout-guide/route.ts +172 -0
- package/src/app/app/api/handoff/ai/analyze-layout-guide/wireframe-style/wireframe-example-1.png +0 -0
- package/src/app/app/api/handoff/ai/analyze-layout-guide/wireframe-style/wireframe-example-2.png +0 -0
- package/src/app/app/api/handoff/ai/chat/route.ts +217 -0
- package/src/app/app/api/handoff/ai/component-screenshot/route.ts +43 -0
- package/src/app/app/api/handoff/ai/debug-foundation-raster/route.ts +162 -0
- package/src/app/app/api/handoff/ai/design-artifact/[id]/clone/route.ts +68 -0
- package/src/app/app/api/handoff/ai/design-artifact/[id]/public/route.ts +37 -0
- package/src/app/app/api/handoff/ai/design-artifact/[id]/route.ts +99 -0
- package/src/app/app/api/handoff/ai/design-artifact/[id]/status/route.ts +44 -0
- package/src/app/app/api/handoff/ai/design-artifact/route.ts +405 -0
- package/src/app/app/api/handoff/ai/design-artifact-extract/route.ts +37 -0
- package/src/app/app/api/handoff/ai/design-generation-job/[id]/route.ts +67 -0
- package/src/app/app/api/handoff/ai/design-generation-jobs/route.ts +23 -0
- package/src/app/app/api/handoff/ai/design-jobs/run/route.ts +102 -0
- package/src/app/app/api/handoff/ai/extract-url/route.ts +34 -0
- package/src/app/app/api/handoff/ai/foundation-preview/route.ts +44 -0
- package/src/app/app/api/handoff/ai/generate-component/route.ts +137 -0
- package/src/app/app/api/handoff/ai/generate-design/route.ts +210 -0
- package/src/app/app/api/handoff/ai/generate-image/route.ts +72 -0
- package/src/app/app/api/handoff/ai/generate-pattern/route.ts +86 -0
- package/src/app/app/api/handoff/ai/playground-chat/refine/route.ts +52 -0
- package/src/app/app/api/handoff/ai/playground-chat/route.ts +102 -0
- package/src/app/app/api/handoff/ai/status/route.ts +14 -0
- package/src/app/app/api/handoff/artifact-asset/route.ts +88 -0
- package/src/app/app/api/handoff/assets/[id]/raw/route.ts +49 -0
- package/src/app/app/api/handoff/assets/[id]/route.ts +76 -0
- package/src/app/app/api/handoff/assets/collections/route.ts +54 -0
- package/src/app/app/api/handoff/assets/confirm/route.ts +80 -0
- package/src/app/app/api/handoff/assets/icon-sets/route.ts +47 -0
- package/src/app/app/api/handoff/assets/presign/route.ts +41 -0
- package/src/app/app/api/handoff/assets/route.ts +89 -0
- package/src/app/app/api/handoff/assets/upload/route.ts +152 -0
- package/src/app/app/api/handoff/assets/usages/[id]/route.ts +21 -0
- package/src/app/app/api/handoff/assets/usages/route.ts +69 -0
- package/src/app/app/api/handoff/auth/request-reset/route.ts +9 -0
- package/src/app/app/api/handoff/auth/reset-password/route.ts +17 -0
- package/src/app/app/api/handoff/capture/health/route.ts +86 -0
- package/src/app/app/api/handoff/capture/jobs/route.ts +75 -0
- package/src/app/app/api/handoff/capture/run/route.ts +112 -0
- package/src/app/app/api/handoff/changelog/pushes/route.ts +49 -0
- package/src/app/app/api/handoff/changelog/route.ts +28 -0
- package/src/app/app/api/handoff/changes/why/route.ts +41 -0
- package/src/app/app/api/handoff/cms/connections/route.ts +182 -0
- package/src/app/app/api/handoff/cms/sanity/callback/route.ts +18 -0
- package/src/app/app/api/handoff/cms/sanity/categories/route.ts +146 -0
- package/src/app/app/api/handoff/cms/sanity/connect/route.ts +15 -0
- package/src/app/app/api/handoff/cms/sanity/publish/route.ts +161 -0
- package/src/app/app/api/handoff/cms/sanity/token/route.ts +87 -0
- package/src/app/app/api/handoff/components/[id]/screenshot.png/route.ts +101 -0
- package/src/app/app/api/handoff/components/[id]/thumbnail.svg/route.ts +158 -0
- package/src/app/app/api/handoff/components/build/route.ts +26 -0
- package/src/app/app/api/handoff/components/history/contract/route.ts +33 -0
- package/src/app/app/api/handoff/components/history/route.ts +35 -0
- package/src/app/app/api/handoff/components/history/version/route.ts +36 -0
- package/src/app/app/api/handoff/components/route.ts +56 -0
- package/src/app/app/api/handoff/components/validation/route.ts +36 -0
- package/src/app/app/api/handoff/design/workspace/brand-imagery-image/route.ts +75 -0
- package/src/app/app/api/handoff/design/workspace/route.ts +163 -0
- package/src/app/app/api/handoff/figma/component-properties/route.ts +34 -0
- package/src/app/app/api/handoff/figma/components/route.ts +21 -0
- package/src/app/app/api/handoff/figma/components/sync/route.ts +50 -0
- package/src/app/app/api/handoff/figma/fetch/route.ts +126 -0
- package/src/app/app/api/handoff/guest/assets/route.ts +52 -0
- package/src/app/app/api/handoff/guest/enter/route.ts +169 -0
- package/src/app/app/api/handoff/guest/submission/route.ts +209 -0
- package/src/app/app/api/handoff/guest/submission/submit/route.ts +63 -0
- package/src/app/app/api/handoff/image-slots/route.ts +24 -0
- package/src/app/app/api/handoff/navigation/prune/route.ts +106 -0
- package/src/app/app/api/handoff/pages/route.ts +90 -0
- package/src/app/app/api/handoff/patterns/[id]/clone/route.ts +69 -0
- package/src/app/app/api/handoff/patterns/[id]/manifest/route.ts +102 -0
- package/src/app/app/api/handoff/patterns/[id]/notes/route.ts +101 -0
- package/src/app/app/api/handoff/patterns/[id]/route.ts +41 -0
- package/src/app/app/api/handoff/patterns/[id]/thumbnail.svg/route.ts +70 -0
- package/src/app/app/api/handoff/patterns/route.ts +77 -0
- package/src/app/app/api/handoff/reference-materials/route.ts +40 -0
- package/src/app/app/api/handoff/review/[id]/route.ts +172 -0
- package/src/app/app/api/handoff/review/[id]/voice/route.ts +58 -0
- package/src/app/app/api/handoff/review/route.ts +31 -0
- package/src/app/app/api/handoff/share/[token]/route.ts +82 -0
- package/src/app/app/api/handoff/share/links/route.ts +48 -0
- package/src/app/app/api/handoff/share/route.ts +172 -0
- package/src/app/app/api/handoff/site-protection/route.ts +85 -0
- package/src/app/app/api/handoff/site-protection/unlock/route.ts +62 -0
- package/src/app/app/api/handoff/templates/[id]/submissions/route.ts +41 -0
- package/src/app/app/api/mcp/route.ts +39 -0
- package/src/app/app/api/oauth/authorization-server-metadata/route.ts +30 -0
- package/src/app/app/api/oauth/authorize/route.ts +158 -0
- package/src/app/app/api/oauth/device/approve/route.ts +32 -0
- package/src/app/app/api/oauth/device/route.ts +34 -0
- package/src/app/app/api/oauth/protected-resource-metadata/route.ts +26 -0
- package/src/app/app/api/oauth/register/route.ts +43 -0
- package/src/app/app/api/oauth/token/route.ts +94 -0
- package/src/app/app/api/openapi/route.ts +38 -0
- package/src/app/app/api/patterns/route.ts +8 -0
- package/src/app/app/api/registry/assets/ingest/route.ts +204 -0
- package/src/app/app/api/registry/assets/ingest-figma-fills/route.ts +81 -0
- package/src/app/app/api/registry/components/[id]/previews/[previewId]/route.ts +56 -0
- package/src/app/app/api/registry/components/[id]/previews/route.ts +66 -0
- package/src/app/app/api/registry/config/route.ts +50 -0
- package/src/app/app/api/registry/dtcg/download/route.ts +78 -0
- package/src/app/app/api/registry/dtcg/route.ts +133 -0
- package/src/app/app/api/registry/fonts/route.ts +67 -0
- package/src/app/app/api/registry/icons/download/route.ts +52 -0
- package/src/app/app/api/registry/icons/route.ts +47 -0
- package/src/app/app/api/registry/image-slots/route.ts +68 -0
- package/src/app/app/api/registry/logo.svg/route.ts +45 -0
- package/src/app/app/api/registry/logos/route.ts +47 -0
- package/src/app/app/api/registry/navigation/route.ts +52 -0
- package/src/app/app/api/registry/pages/route.ts +67 -0
- package/src/app/app/api/registry/theme/route.ts +51 -0
- package/src/app/app/api/registry/theme.css/route.ts +34 -0
- package/src/app/app/api/registry/tokens/route.ts +59 -0
- package/src/app/app/api/sync/changes/route.ts +24 -0
- package/src/app/app/api/sync/shared-assets/route.ts +79 -0
- package/src/app/app/api/sync/status/route.ts +12 -0
- package/src/app/app/api/sync/upload/route.ts +109 -0
- package/src/app/app/assets/AssetsClient.tsx +670 -0
- package/src/app/app/assets/[id]/AssetDetailClient.tsx +319 -0
- package/src/app/app/assets/[id]/page.tsx +8 -0
- package/src/app/app/assets/fonts/page.tsx +5 -0
- package/src/app/app/assets/logos/page.tsx +5 -0
- package/src/app/app/assets/page.tsx +5 -0
- package/src/app/app/cli/device/CliDeviceClient.tsx +104 -0
- package/src/app/app/cli/device/page.tsx +45 -0
- package/src/app/app/design/DesignClient.tsx +1682 -0
- package/src/app/app/design/SessionHistoryPanel.tsx +116 -0
- package/src/app/app/design/assets/[id]/page.tsx +11 -0
- package/src/app/app/design/assets/icons/page.tsx +8 -0
- package/src/app/app/design/assets/page.tsx +8 -0
- package/src/app/app/design/library/[id]/SavedDesignDetailClient.tsx +892 -0
- package/src/app/app/design/library/[id]/page.tsx +40 -0
- package/src/app/app/design/library/[id]/share/SharePublicClient.tsx +107 -0
- package/src/app/app/design/library/[id]/share/page.tsx +22 -0
- package/src/app/app/design/library/page.tsx +12 -0
- package/src/app/app/design/page.tsx +158 -0
- package/src/app/app/design/settings/SettingsClient.tsx +648 -0
- package/src/app/app/design/settings/page.tsx +41 -0
- package/src/app/app/design/settings/settings-constants.ts +96 -0
- package/src/app/app/design/v1/DesignClient.tsx +1316 -0
- package/src/app/app/design/v1/page.tsx +103 -0
- package/src/app/app/design/workbench-session.ts +54 -0
- package/src/app/app/design/workbench-types.ts +72 -0
- package/src/app/app/dev/local-setup/LocalSetupClient.tsx +119 -0
- package/src/app/app/dev/local-setup/McpSetupSection.tsx +174 -0
- package/src/app/app/dev/local-setup/page.tsx +5 -0
- package/src/app/app/developer/api/route.ts +13 -0
- package/src/app/app/developer/cli/page.tsx +192 -0
- package/src/app/app/developer/layout.tsx +57 -0
- package/src/app/app/developer/local-setup/page.tsx +37 -0
- package/src/app/app/developer/mcp/page.tsx +74 -0
- package/src/app/app/developer/page.tsx +111 -0
- package/src/app/app/developer/push-pull/page.tsx +130 -0
- package/src/app/app/fonts/[filename]/route.ts +41 -0
- package/src/app/app/foundations/[...slug]/page.tsx +83 -0
- package/src/app/app/foundations/assets/[id]/page.tsx +35 -0
- package/src/app/app/foundations/assets/page.tsx +31 -0
- package/src/app/app/foundations/border-radius/page.tsx +179 -0
- package/src/app/app/foundations/colors/page.tsx +166 -0
- package/src/app/app/foundations/effects/page.tsx +124 -0
- package/src/app/app/foundations/elevation/page.tsx +209 -0
- package/src/app/app/foundations/error.tsx +22 -0
- package/src/app/app/foundations/grid/page.tsx +315 -0
- package/src/app/app/foundations/icons/IconsPageClient.tsx +100 -0
- package/src/app/app/foundations/icons/[name]/SingleIconClient.tsx +231 -0
- package/src/app/app/foundations/icons/[name]/page.tsx +44 -0
- package/src/app/app/foundations/icons/page.tsx +58 -0
- package/src/app/app/foundations/logo/page.tsx +213 -0
- package/src/app/app/foundations/motion/page.tsx +228 -0
- package/src/app/app/foundations/page.tsx +65 -0
- package/src/app/app/foundations/spacing/page.tsx +171 -0
- package/src/app/app/foundations/typography/page.tsx +115 -0
- package/src/app/app/layout.tsx +131 -0
- package/src/app/app/library/LibraryClient.tsx +567 -0
- package/src/app/app/library/page.tsx +46 -0
- package/src/app/app/login/LoginClient.tsx +75 -0
- package/src/app/app/login/page.tsx +33 -0
- package/src/app/app/page.tsx +178 -0
- package/src/app/app/patterns/PatternBrowserClient.tsx +263 -0
- package/src/app/app/patterns/page.tsx +14 -0
- package/src/app/app/playground/PlaygroundClient.tsx +84 -0
- package/src/app/app/playground/[id]/page.tsx +215 -0
- package/src/app/app/playground/page.tsx +79 -0
- package/src/app/app/providers.tsx +72 -0
- package/src/app/app/reset-password/ResetPasswordClient.tsx +89 -0
- package/src/app/app/reset-password/page.tsx +24 -0
- package/src/app/app/review/ReviewClient.tsx +31 -0
- package/src/app/app/review/page.tsx +56 -0
- package/src/app/app/s/[token]/page.tsx +317 -0
- package/src/app/app/setup/SetupClient.tsx +87 -0
- package/src/app/app/setup/actions.ts +53 -0
- package/src/app/app/setup/page.tsx +28 -0
- package/src/app/app/system/FigmaFetchControls.tsx +163 -0
- package/src/app/app/system/FigmaSyncPanel.tsx +357 -0
- package/src/app/app/system/NewComponentForm.tsx +272 -0
- package/src/app/app/system/SystemPageClient.tsx +137 -0
- package/src/app/app/system/changelog/ChangelogClient.tsx +608 -0
- package/src/app/app/system/changelog/page.tsx +28 -0
- package/src/app/app/system/component/[component]/ComponentAssetsPanel.tsx +108 -0
- package/src/app/app/system/component/[component]/ComponentDetailClient.tsx +420 -0
- package/src/app/app/system/component/[component]/ComponentImageSlotsPanel.tsx +163 -0
- package/src/app/app/system/component/[component]/ComponentVersionHistory.tsx +430 -0
- package/src/app/app/system/component/[component]/VersionCompare.tsx +267 -0
- package/src/app/app/system/component/[component]/page.tsx +68 -0
- package/src/app/app/system/component/page.tsx +5 -0
- package/src/app/app/system/figma-sync/FigmaSyncPageClient.tsx +35 -0
- package/src/app/app/system/figma-sync/page.tsx +21 -0
- package/src/app/app/system/health/ComponentHealthTable.tsx +217 -0
- package/src/app/app/system/health/HealthDashboardClient.tsx +141 -0
- package/src/app/app/system/health/RuleBreakdownTable.tsx +123 -0
- package/src/app/app/system/health/ScoreBadge.tsx +58 -0
- package/src/app/app/system/health/TrendChart.tsx +76 -0
- package/src/app/app/system/health/ValidatorBreakdownBars.tsx +35 -0
- package/src/app/app/system/health/health-types.ts +7 -0
- package/src/app/app/system/health/page.tsx +100 -0
- package/src/app/app/system/page.tsx +21 -0
- package/src/app/app/system/pattern/[pattern]/PatternDetailClient.tsx +216 -0
- package/src/app/app/system/pattern/[pattern]/page.tsx +53 -0
- package/src/app/app/system/pattern/page.tsx +5 -0
- package/src/app/app/unlock/UnlockClient.tsx +100 -0
- package/src/app/app/unlock/page.tsx +40 -0
- package/src/app/components/Auth/AuthControls.tsx +146 -0
- package/src/app/components/Brief/BuildList.tsx +78 -0
- package/src/app/components/Brief/BuildPanel.tsx +460 -0
- package/src/app/components/Brief/export-blocks.ts +47 -0
- package/src/app/components/Chat/ChatActionCard.tsx +97 -0
- package/src/app/components/Chat/ChatChangelogFeed.tsx +252 -0
- package/src/app/components/Chat/ChatComponentGrid.tsx +144 -0
- package/src/app/components/Chat/ChatContext.tsx +192 -0
- package/src/app/components/Chat/ChatDrawer.tsx +162 -0
- package/src/app/components/Chat/ChatFab.tsx +41 -0
- package/src/app/components/Chat/ChatInput.tsx +150 -0
- package/src/app/components/Chat/ChatMessage.tsx +125 -0
- package/src/app/components/Chat/ChatValidationPanel.tsx +161 -0
- package/src/app/components/CloudFeatureGate.tsx +27 -0
- package/src/app/components/Component/BestPracticesCard.tsx +36 -0
- package/src/app/components/Component/Cards.tsx +76 -0
- package/src/app/components/Component/ComponentLists.tsx +279 -0
- package/src/app/components/Component/ComponentWorkbenchDialog.tsx +230 -0
- package/src/app/components/Component/InlineComponentEditor.tsx +163 -0
- package/src/app/components/Component/PageSliceResolver.tsx +81 -0
- package/src/app/components/Component/Preview.tsx +1091 -0
- package/src/app/components/Component/slices/BestPracticesSlice.tsx +14 -0
- package/src/app/components/Component/slices/CardsSlice.tsx +17 -0
- package/src/app/components/Component/slices/ComponentDisplaySlice.tsx +101 -0
- package/src/app/components/Component/slices/PropertiesSlice.tsx +24 -0
- package/src/app/components/Component/slices/TextSlice.tsx +23 -0
- package/src/app/components/Component/slices/ValidationResultsSlice.tsx +31 -0
- package/src/app/components/Component/slices/index.ts +14 -0
- package/src/app/components/Component/usePreviews.ts +97 -0
- package/src/app/components/ComponentDesignTokens.tsx +271 -0
- package/src/app/components/ComponentGuidelines.tsx +21 -0
- package/src/app/components/ComponentNotFound.tsx +35 -0
- package/src/app/components/ComponentSearch.tsx +96 -0
- package/src/app/components/CopyCode.tsx +59 -0
- package/src/app/components/CopyToClipboard.tsx +63 -0
- package/src/app/components/Design/DevHandoffPanel.tsx +481 -0
- package/src/app/components/DownloadTokens.tsx +78 -0
- package/src/app/components/Footer.tsx +46 -0
- package/src/app/components/Foundations/BrandColorSwatches.tsx +151 -0
- package/src/app/components/Foundations/ColorContrast.tsx +179 -0
- package/src/app/components/Foundations/ColorGrid.tsx +199 -0
- package/src/app/components/Foundations/ColorInfo.tsx +64 -0
- package/src/app/components/Foundations/ColorSpaces.tsx +119 -0
- package/src/app/components/Foundations/ColorTailwind.tsx +58 -0
- package/src/app/components/Foundations/ColorsDisplay.tsx +136 -0
- package/src/app/components/Foundations/DisplayLogo.tsx +16 -0
- package/src/app/components/Foundations/IconCatalogGrid.tsx +145 -0
- package/src/app/components/Foundations/ProvenanceBadge.tsx +40 -0
- package/src/app/components/Foundations/RulesSheet.tsx +204 -0
- package/src/app/components/Foundations/TokenOutputTabs.tsx +88 -0
- package/src/app/components/Foundations/TypographyExample.tsx +275 -0
- package/src/app/components/Guest/GuestAuthoring.tsx +589 -0
- package/src/app/components/Guest/GuestEditor.tsx +157 -0
- package/src/app/components/Hero.tsx +42 -0
- package/src/app/components/InlineEdit/InlineEditField.tsx +162 -0
- package/src/app/components/InlineEdit/InlineEditHeader.tsx +98 -0
- package/src/app/components/Layout/BuildBadge.tsx +90 -0
- package/src/app/components/Layout/Header.tsx +54 -0
- package/src/app/components/Layout/Main.tsx +84 -0
- package/src/app/components/Markdown/CodeHighlight.tsx +328 -0
- package/src/app/components/Markdown/MarkdownComponents.tsx +270 -0
- package/src/app/components/Markdown/MarkdownEditor.tsx +153 -0
- package/src/app/components/Markdown/WysiwygEditor.tsx +364 -0
- package/src/app/components/Markdown/wysiwyg.css +89 -0
- package/src/app/components/ModeSwitcher.tsx +29 -0
- package/src/app/components/NavLink.tsx +26 -0
- package/src/app/components/Navigation/AnchorNav.tsx +94 -0
- package/src/app/components/Navigation/AnchorNavLink.tsx +41 -0
- package/src/app/components/Navigation/AnchorNavNew.tsx +27 -0
- package/src/app/components/Navigation/MainNav.tsx +84 -0
- package/src/app/components/Navigation/MobileNav.tsx +123 -0
- package/src/app/components/Navigation/PrevNextNav.tsx +53 -0
- package/src/app/components/Navigation/SideNav.tsx +336 -0
- package/src/app/components/Navigation/anchor-slugify.ts +6 -0
- package/src/app/components/Playground/AiChatPanel.tsx +1483 -0
- package/src/app/components/Playground/ComponentCard.tsx +65 -0
- package/src/app/components/Playground/ComponentLibrary.tsx +228 -0
- package/src/app/components/Playground/CoverImagePicker.tsx +281 -0
- package/src/app/components/Playground/EditContext.tsx +247 -0
- package/src/app/components/Playground/EditSheet.tsx +82 -0
- package/src/app/components/Playground/FieldGuardrailsContext.ts +31 -0
- package/src/app/components/Playground/FieldLinkContext.ts +138 -0
- package/src/app/components/Playground/FieldMediaContext.ts +50 -0
- package/src/app/components/Playground/FindingsList.tsx +149 -0
- package/src/app/components/Playground/MediaBrowser.tsx +397 -0
- package/src/app/components/Playground/PageChecks.tsx +71 -0
- package/src/app/components/Playground/PageTitle.tsx +93 -0
- package/src/app/components/Playground/PlaygroundBuilder.tsx +1271 -0
- package/src/app/components/Playground/PlaygroundContext.tsx +990 -0
- package/src/app/components/Playground/PlaygroundWorkbench.tsx +260 -0
- package/src/app/components/Playground/Preview.tsx +1465 -0
- package/src/app/components/Playground/PublishToSanityDialog.tsx +468 -0
- package/src/app/components/Playground/SavePatternDialog.tsx +231 -0
- package/src/app/components/Playground/ShareTemplate.tsx +503 -0
- package/src/app/components/Playground/SortableItem.tsx +94 -0
- package/src/app/components/Playground/Wizard/ApiKeySettings.tsx +139 -0
- package/src/app/components/Playground/Wizard/PageImporter.tsx +384 -0
- package/src/app/components/Playground/Wizard/WizardDialog.tsx +329 -0
- package/src/app/components/Playground/Wizard/llm-client.ts +87 -0
- package/src/app/components/Playground/Wizard/prompt-builder.ts +134 -0
- package/src/app/components/Playground/Wizard/response-parser.ts +80 -0
- package/src/app/components/Playground/fields/ButtonField.tsx +24 -0
- package/src/app/components/Playground/fields/Field.tsx +344 -0
- package/src/app/components/Playground/fields/FieldLabel.tsx +9 -0
- package/src/app/components/Playground/fields/FunctionField.tsx +19 -0
- package/src/app/components/Playground/fields/ImageField.tsx +239 -0
- package/src/app/components/Playground/fields/LinkField.tsx +24 -0
- package/src/app/components/Playground/fields/RawJsonField.tsx +60 -0
- package/src/app/components/Playground/fields/RichTextField.tsx +220 -0
- package/src/app/components/Playground/fields/SelectField.tsx +55 -0
- package/src/app/components/Playground/fields/SlotField.tsx +40 -0
- package/src/app/components/Playground/fields/TextField.tsx +125 -0
- package/src/app/components/Playground/fields/VideoFileField.tsx +67 -0
- package/src/app/components/Playground/fields/content-only.ts +121 -0
- package/src/app/components/Playground/fields/field-type.ts +84 -0
- package/src/app/components/Playground/fields/reseed.ts +140 -0
- package/src/app/components/Playground/inline-edit-script.ts +596 -0
- package/src/app/components/Playground/link-guard-script.ts +50 -0
- package/src/app/components/Playground/types.ts +76 -0
- package/src/app/components/Playground/usePublishToSanity.ts +153 -0
- package/src/app/components/Review/ReviewQueueClient.tsx +288 -0
- package/src/app/components/SideNav/Custom.tsx +40 -0
- package/src/app/components/SideNavNew.tsx +280 -0
- package/src/app/components/Typography/Headers.tsx +50 -0
- package/src/app/components/Validation/ValidationFrameworkResults.tsx +208 -0
- package/src/app/components/Validation/ValidationResults.tsx +60 -0
- package/src/app/components/cards/CardsWithIcons.tsx +38 -0
- package/src/app/components/context/AuthUiContext.tsx +13 -0
- package/src/app/components/context/ConfigContext.tsx +43 -0
- package/src/app/components/context/HandoffCapabilitiesContext.tsx +40 -0
- package/src/app/components/context/HotReloadProvider.tsx +38 -0
- package/src/app/components/context/PreviewContext.tsx +135 -0
- package/src/app/components/library/AssetCard.tsx +166 -0
- package/src/app/components/library/KindPicker.tsx +66 -0
- package/src/app/components/library/LaneTabs.tsx +54 -0
- package/src/app/components/library/LifecycleBadge.tsx +28 -0
- package/src/app/components/library/LifecyclePicker.tsx +53 -0
- package/src/app/components/library/MetaControl.tsx +294 -0
- package/src/app/components/library/OwnerAttribution.tsx +106 -0
- package/src/app/components/library/PageNotes.tsx +191 -0
- package/src/app/components/library/PageOrigin.tsx +124 -0
- package/src/app/components/library/VisibilityBadge.tsx +25 -0
- package/src/app/components/library/VisibilityPicker.tsx +56 -0
- package/src/app/components/library/index.ts +7 -0
- package/src/app/components/ui/accordion.tsx +49 -0
- package/src/app/components/ui/alert.tsx +39 -0
- package/src/app/components/ui/attachment.tsx +204 -0
- package/src/app/components/ui/badge.tsx +32 -0
- package/src/app/components/ui/breadcrumb.tsx +68 -0
- package/src/app/components/ui/bubble.tsx +125 -0
- package/src/app/components/ui/button.tsx +45 -0
- package/src/app/components/ui/card.tsx +76 -0
- package/src/app/components/ui/collapsible.tsx +9 -0
- package/src/app/components/ui/dialog.tsx +80 -0
- package/src/app/components/ui/drawer.tsx +103 -0
- package/src/app/components/ui/dropdown-menu.tsx +176 -0
- package/src/app/components/ui/input.tsx +22 -0
- package/src/app/components/ui/json-tree-view.tsx +250 -0
- package/src/app/components/ui/label.tsx +24 -0
- package/src/app/components/ui/marker.tsx +69 -0
- package/src/app/components/ui/message-scroller.tsx +130 -0
- package/src/app/components/ui/message.tsx +92 -0
- package/src/app/components/ui/mobile-nav.tsx +95 -0
- package/src/app/components/ui/navigation-menu.tsx +116 -0
- package/src/app/components/ui/popover.tsx +31 -0
- package/src/app/components/ui/radio-group.tsx +36 -0
- package/src/app/components/ui/select.tsx +132 -0
- package/src/app/components/ui/separator.tsx +29 -0
- package/src/app/components/ui/sheet.tsx +140 -0
- package/src/app/components/ui/sidebar.tsx +609 -0
- package/src/app/components/ui/skeleton.tsx +15 -0
- package/src/app/components/ui/switch.tsx +29 -0
- package/src/app/components/ui/table.tsx +60 -0
- package/src/app/components/ui/tabs.tsx +53 -0
- package/src/app/components/ui/textarea.tsx +19 -0
- package/src/app/components/ui/toggle-group.tsx +51 -0
- package/src/app/components/ui/toggle.tsx +39 -0
- package/src/app/components/ui/tooltip.tsx +30 -0
- package/src/app/components/util/colors.ts +93 -0
- package/src/app/components/util/dtcg.ts +50 -0
- package/src/app/components/util/index.ts +963 -0
- package/src/app/components/util/theme-provider.tsx +11 -0
- package/src/app/components/util/token.ts +70 -0
- package/src/app/components.json +21 -0
- package/src/app/css/index.css +275 -0
- package/src/app/css/theme.css +14 -0
- package/src/app/css.d.ts +1 -0
- package/src/app/hooks/use-mobile.tsx +17 -0
- package/src/app/instrumentation.ts +39 -0
- package/src/app/lib/adapter-kit/errors.ts +141 -0
- package/src/app/lib/adapter-kit/types.ts +637 -0
- package/src/app/lib/admin-build-tasks-types.ts +41 -0
- package/src/app/lib/api-path.ts +12 -0
- package/src/app/lib/asset-search.ts +167 -0
- package/src/app/lib/asset-types.ts +88 -0
- package/src/app/lib/asset-upload-source.ts +314 -0
- package/src/app/lib/auth.ts +244 -0
- package/src/app/lib/authoring-guardrails.ts +591 -0
- package/src/app/lib/authoring-shapes.ts +261 -0
- package/src/app/lib/authz/guest.ts +131 -0
- package/src/app/lib/authz/notes.ts +102 -0
- package/src/app/lib/authz/policy.ts +228 -0
- package/src/app/lib/authz/review.ts +180 -0
- package/src/app/lib/authz/vocab.ts +175 -0
- package/src/app/lib/brief-components.ts +212 -0
- package/src/app/lib/build-audits.ts +239 -0
- package/src/app/lib/capture-chromium-plan.ts +123 -0
- package/src/app/lib/capture-determinism.ts +397 -0
- package/src/app/lib/capture-kinds.ts +207 -0
- package/src/app/lib/change-digest.ts +108 -0
- package/src/app/lib/chat-turn-guards.ts +149 -0
- package/src/app/lib/cli-sync-jwt.ts +110 -0
- package/src/app/lib/client/poll-generation-job.ts +85 -0
- package/src/app/lib/client-name.ts +29 -0
- package/src/app/lib/cms-migration-prompt.ts +99 -0
- package/src/app/lib/component-capture.ts +156 -0
- package/src/app/lib/component-id.ts +14 -0
- package/src/app/lib/component-thumbnail.ts +200 -0
- package/src/app/lib/composition-summary.ts +84 -0
- package/src/app/lib/content-length-plan.ts +512 -0
- package/src/app/lib/contract-limit-audit.ts +228 -0
- package/src/app/lib/contract-render-audit.ts +208 -0
- package/src/app/lib/data/component-row.ts +121 -0
- package/src/app/lib/data/components-digest.ts +116 -0
- package/src/app/lib/data/dynamic-provider.ts +765 -0
- package/src/app/lib/data/has-payload.ts +18 -0
- package/src/app/lib/data/hybrid-provider.ts +6 -0
- package/src/app/lib/data/index.ts +45 -0
- package/src/app/lib/data/menu-merge.ts +417 -0
- package/src/app/lib/data/page-metadata.ts +85 -0
- package/src/app/lib/data/pattern-merge.ts +78 -0
- package/src/app/lib/data/static-provider.ts +237 -0
- package/src/app/lib/data/types.ts +125 -0
- package/src/app/lib/db/auto-migrate.ts +205 -0
- package/src/app/lib/db/bootstrap-admin.ts +45 -0
- package/src/app/lib/db/capture-job-queries.ts +333 -0
- package/src/app/lib/db/changelog-queries.ts +623 -0
- package/src/app/lib/db/cms-connection-config.ts +21 -0
- package/src/app/lib/db/cms-connection-queries.ts +218 -0
- package/src/app/lib/db/component-artifact-queries.ts +115 -0
- package/src/app/lib/db/component-facets.ts +535 -0
- package/src/app/lib/db/component-preview-queries.ts +224 -0
- package/src/app/lib/db/component-version-queries.ts +682 -0
- package/src/app/lib/db/dialect.ts +15 -0
- package/src/app/lib/db/event-log-store.ts +47 -0
- package/src/app/lib/db/grant-queries.ts +827 -0
- package/src/app/lib/db/history-purge-plan.ts +446 -0
- package/src/app/lib/db/history-purge.ts +233 -0
- package/src/app/lib/db/index.ts +92 -0
- package/src/app/lib/db/migrations/0000_init.sql +226 -0
- package/src/app/lib/db/migrations/0001_design_workspace.sql +12 -0
- package/src/app/lib/db/migrations/0002_boring_ricochet.sql +50 -0
- package/src/app/lib/db/migrations/0003_demonic_flatman.sql +41 -0
- package/src/app/lib/db/migrations/0004_validation_runs.sql +18 -0
- package/src/app/lib/db/migrations/0005_component_versions.sql +21 -0
- package/src/app/lib/db/migrations/0006_token_and_page_changes.sql +40 -0
- package/src/app/lib/db/migrations/0007_design_spec.sql +9 -0
- package/src/app/lib/db/migrations/0008_design_generation_jobs.sql +22 -0
- package/src/app/lib/db/migrations/0009_assets.sql +80 -0
- package/src/app/lib/db/migrations/0010_registry_dtcg.sql +13 -0
- package/src/app/lib/db/migrations/0011_dtcg_brands.sql +5 -0
- package/src/app/lib/db/migrations/0012_icon_logo_registry.sql +13 -0
- package/src/app/lib/db/migrations/0013_registry_fonts.sql +13 -0
- package/src/app/lib/db/migrations/0014_asset_blobs.sql +9 -0
- package/src/app/lib/db/migrations/0015_appearance.sql +7 -0
- package/src/app/lib/db/migrations/0016_image_slots.sql +16 -0
- package/src/app/lib/db/migrations/0017_component_preview.sql +20 -0
- package/src/app/lib/db/migrations/0018_token_change_details.sql +26 -0
- package/src/app/lib/db/migrations/0019_change_why.sql +18 -0
- package/src/app/lib/db/migrations/0020_pattern_change.sql +17 -0
- package/src/app/lib/db/migrations/0021_mcp_oauth_connector.sql +37 -0
- package/src/app/lib/db/migrations/0022_dtcg_source.sql +21 -0
- package/src/app/lib/db/migrations/0023_perf_indexes.sql +30 -0
- package/src/app/lib/db/migrations/0024_phase_b_visibility.sql +40 -0
- package/src/app/lib/db/migrations/0027_guest_authoring.sql +49 -0
- package/src/app/lib/db/migrations/0028_invite_to_build.sql +99 -0
- package/src/app/lib/db/migrations/0029_pages_templates_reflow.sql +121 -0
- package/src/app/lib/db/migrations/0030_retire_briefs.sql +71 -0
- package/src/app/lib/db/migrations/0031_drop_brief_columns.sql +32 -0
- package/src/app/lib/db/migrations/0033_site_protection.sql +45 -0
- package/src/app/lib/db/migrations/0034_brand_imagery.sql +8 -0
- package/src/app/lib/db/migrations/0035_history_provenance.sql +42 -0
- package/src/app/lib/db/migrations/0036_cms_connections.sql +68 -0
- package/src/app/lib/db/migrations/0037_component_preview_purpose.sql +17 -0
- package/src/app/lib/db/migrations/0038_capture_job.sql +87 -0
- package/src/app/lib/db/migrations/meta/0000_snapshot.json +1424 -0
- package/src/app/lib/db/migrations/meta/0002_snapshot.json +1644 -0
- package/src/app/lib/db/migrations/meta/0003_snapshot.json +1820 -0
- package/src/app/lib/db/migrations/meta/_journal.json +258 -0
- package/src/app/lib/db/note-queries.ts +184 -0
- package/src/app/lib/db/pattern-write.ts +1094 -0
- package/src/app/lib/db/property-delta.ts +117 -0
- package/src/app/lib/db/push-grouping.ts +256 -0
- package/src/app/lib/db/queries.ts +2426 -0
- package/src/app/lib/db/registry-queries.ts +607 -0
- package/src/app/lib/db/schema-active.ts +2 -0
- package/src/app/lib/db/schema-pg.ts +1201 -0
- package/src/app/lib/db/schema.ts +2 -0
- package/src/app/lib/db/seed.ts +117 -0
- package/src/app/lib/db/sync-queries.ts +542 -0
- package/src/app/lib/db/token-flatten.ts +95 -0
- package/src/app/lib/db/validation-queries.ts +82 -0
- package/src/app/lib/db/version-baseline.ts +42 -0
- package/src/app/lib/design-workspace-client.ts +194 -0
- package/src/app/lib/design-workspace-format.ts +294 -0
- package/src/app/lib/docx-copy.ts +279 -0
- package/src/app/lib/dtcg-axes.ts +138 -0
- package/src/app/lib/dtcg-normalizer.ts +370 -0
- package/src/app/lib/edit-operations.ts +275 -0
- package/src/app/lib/email.ts +199 -0
- package/src/app/lib/error-summary.ts +79 -0
- package/src/app/lib/evals/cases.ts +678 -0
- package/src/app/lib/evals/copy-coverage.ts +147 -0
- package/src/app/lib/evals/copy-decks.ts +296 -0
- package/src/app/lib/field-lens.ts +308 -0
- package/src/app/lib/field-marks.ts +206 -0
- package/src/app/lib/figma-plugin-contract.ts +104 -0
- package/src/app/lib/figma-sync-types.ts +56 -0
- package/src/app/lib/generated/build-meta.ts +8 -0
- package/src/app/lib/guest-editable.ts +371 -0
- package/src/app/lib/handoff-capabilities.ts +91 -0
- package/src/app/lib/health-types.ts +324 -0
- package/src/app/lib/hubspot-field-map.ts +770 -0
- package/src/app/lib/hubspot-module/build-module.ts +238 -0
- package/src/app/lib/hubspot-module/context.ts +259 -0
- package/src/app/lib/hubspot-module/fields/boolean.ts +24 -0
- package/src/app/lib/hubspot-module/fields/button.ts +70 -0
- package/src/app/lib/hubspot-module/fields/fields.ts +104 -0
- package/src/app/lib/hubspot-module/fields/generic.ts +183 -0
- package/src/app/lib/hubspot-module/fields/hubdb.ts +168 -0
- package/src/app/lib/hubspot-module/fields/image.ts +65 -0
- package/src/app/lib/hubspot-module/fields/menu.ts +14 -0
- package/src/app/lib/hubspot-module/fields/object.ts +42 -0
- package/src/app/lib/hubspot-module/fields/select.ts +43 -0
- package/src/app/lib/hubspot-module/fields/text.ts +68 -0
- package/src/app/lib/hubspot-module/fields/url.ts +57 -0
- package/src/app/lib/hubspot-module/fields/utils.ts +36 -0
- package/src/app/lib/hubspot-module/fields/video.ts +75 -0
- package/src/app/lib/hubspot-module/index.ts +30 -0
- package/src/app/lib/hubspot-module/transpile.ts +727 -0
- package/src/app/lib/hubspot-module/types.ts +238 -0
- package/src/app/lib/hubspot-module-build.ts +50 -0
- package/src/app/lib/image-bytes.ts +133 -0
- package/src/app/lib/image-dimensions.ts +214 -0
- package/src/app/lib/image-field-write.ts +51 -0
- package/src/app/lib/image-generation-request.ts +142 -0
- package/src/app/lib/image-target.ts +175 -0
- package/src/app/lib/json-shape.ts +121 -0
- package/src/app/lib/library-image-seed.ts +236 -0
- package/src/app/lib/login-required-messages.ts +17 -0
- package/src/app/lib/mcp/apps/component-gallery.bundle.ts +2 -0
- package/src/app/lib/mcp/apps/component-gallery.client.ts +208 -0
- package/src/app/lib/mcp/apps/component-preview.bundle.ts +2 -0
- package/src/app/lib/mcp/apps/component-preview.client.ts +140 -0
- package/src/app/lib/mcp/apps/token-palette.bundle.ts +2 -0
- package/src/app/lib/mcp/apps/token-palette.client.ts +199 -0
- package/src/app/lib/mcp/contract-report.ts +200 -0
- package/src/app/lib/mcp/create-server.ts +2622 -0
- package/src/app/lib/mcp/history-shapes.ts +72 -0
- package/src/app/lib/mcp/project-profile.ts +82 -0
- package/src/app/lib/mcp/scaffold-helpers.ts +93 -0
- package/src/app/lib/mcp/stack-guides/bootstrap-handlebars.md +62 -0
- package/src/app/lib/mcp/stack-guides/react-scss.md +7 -0
- package/src/app/lib/mcp/stack-guides/react-tailwind.md +9 -0
- package/src/app/lib/mcp/stack-guides/tailwind-handlebars.md +142 -0
- package/src/app/lib/mcp/stack-guides.ts +68 -0
- package/src/app/lib/mcp/tool-catalog.ts +132 -0
- package/src/app/lib/mcp-auth.ts +85 -0
- package/src/app/lib/merge-block-values.ts +868 -0
- package/src/app/lib/normalize-preview-values.ts +244 -0
- package/src/app/lib/notify.ts +213 -0
- package/src/app/lib/oauth-scopes.ts +33 -0
- package/src/app/lib/page-exemplars.ts +112 -0
- package/src/app/lib/page-manifest.ts +162 -0
- package/src/app/lib/page-provenance.ts +231 -0
- package/src/app/lib/page-slug.ts +68 -0
- package/src/app/lib/page-title.ts +44 -0
- package/src/app/lib/page-urls.ts +41 -0
- package/src/app/lib/passwords.ts +33 -0
- package/src/app/lib/pattern-payload.ts +122 -0
- package/src/app/lib/pattern-thumbnail.ts +234 -0
- package/src/app/lib/placeholder-audit.ts +196 -0
- package/src/app/lib/placeholder-copy.ts +370 -0
- package/src/app/lib/playground-prompt-link.ts +46 -0
- package/src/app/lib/preview-groups.ts +107 -0
- package/src/app/lib/preview-purpose-labels.ts +37 -0
- package/src/app/lib/preview-purpose.ts +37 -0
- package/src/app/lib/preview-render-target.ts +27 -0
- package/src/app/lib/preview-url.ts +15 -0
- package/src/app/lib/publish-to-sanity-state.ts +605 -0
- package/src/app/lib/rate-limit.ts +75 -0
- package/src/app/lib/remote-handoff-client.ts +33 -0
- package/src/app/lib/sanity-assets.ts +211 -0
- package/src/app/lib/sanity-categories.ts +178 -0
- package/src/app/lib/sanity-config.ts +266 -0
- package/src/app/lib/sanity-integration-state.ts +235 -0
- package/src/app/lib/sanity-mapping.ts +3284 -0
- package/src/app/lib/sanity-portable-text.ts +640 -0
- package/src/app/lib/sanity-publish.ts +337 -0
- package/src/app/lib/sanity-references.ts +295 -0
- package/src/app/lib/server/admin-users.ts +162 -0
- package/src/app/lib/server/ai-client.ts +633 -0
- package/src/app/lib/server/ai-proxy.ts +70 -0
- package/src/app/lib/server/api-gate.ts +148 -0
- package/src/app/lib/server/appearance.ts +169 -0
- package/src/app/lib/server/asset-generation-worker.ts +133 -0
- package/src/app/lib/server/asset-ingest-store.ts +55 -0
- package/src/app/lib/server/asset-ingest.ts +347 -0
- package/src/app/lib/server/auth-reset.ts +107 -0
- package/src/app/lib/server/capture-browser.ts +130 -0
- package/src/app/lib/server/capture-harness.ts +319 -0
- package/src/app/lib/server/capture-worker.ts +178 -0
- package/src/app/lib/server/change-why.ts +195 -0
- package/src/app/lib/server/cli-device-oauth.ts +159 -0
- package/src/app/lib/server/cms-providers.ts +53 -0
- package/src/app/lib/server/component-build-preload.cjs +3 -0
- package/src/app/lib/server/component-build-worker.ts +196 -0
- package/src/app/lib/server/component-builder.ts +96 -0
- package/src/app/lib/server/component-capture-reads.ts +172 -0
- package/src/app/lib/server/component-generation-context.ts +165 -0
- package/src/app/lib/server/component-generation-images.ts +40 -0
- package/src/app/lib/server/component-generation-llm.ts +232 -0
- package/src/app/lib/server/component-generation-run.ts +289 -0
- package/src/app/lib/server/component-generation-schedule.ts +12 -0
- package/src/app/lib/server/component-preview-screenshot.ts +111 -0
- package/src/app/lib/server/component-scaffold.ts +88 -0
- package/src/app/lib/server/component-visual-compare.ts +90 -0
- package/src/app/lib/server/design-artifact-persist.ts +49 -0
- package/src/app/lib/server/design-asset-extractor.ts +414 -0
- package/src/app/lib/server/design-asset-schedule.ts +36 -0
- package/src/app/lib/server/design-asset-worker-spawn.ts +64 -0
- package/src/app/lib/server/design-asset-worker.ts +24 -0
- package/src/app/lib/server/design-generation-worker.ts +281 -0
- package/src/app/lib/server/design-prompt-builder.ts +322 -0
- package/src/app/lib/server/design-spec-generator.ts +739 -0
- package/src/app/lib/server/design-spec-types.ts +219 -0
- package/src/app/lib/server/design-system-context.ts +141 -0
- package/src/app/lib/server/design-token-summary.ts +133 -0
- package/src/app/lib/server/design-workspace.ts +230 -0
- package/src/app/lib/server/dev-handoff.ts +334 -0
- package/src/app/lib/server/doc-pages.ts +442 -0
- package/src/app/lib/server/event-log.ts +138 -0
- package/src/app/lib/server/fetch-asset-bytes.ts +161 -0
- package/src/app/lib/server/figma-audit-api.ts +188 -0
- package/src/app/lib/server/figma-auth.ts +113 -0
- package/src/app/lib/server/figma-fetch-runner.ts +241 -0
- package/src/app/lib/server/figma-fetch-worker.ts +130 -0
- package/src/app/lib/server/figma-fetch.ts +90 -0
- package/src/app/lib/server/figma-fills-ingest.ts +201 -0
- package/src/app/lib/server/figma-plugin-properties-sync.ts +438 -0
- package/src/app/lib/server/figma-sync-service.ts +1076 -0
- package/src/app/lib/server/find-assets.ts +53 -0
- package/src/app/lib/server/foundation-image.tsx +671 -0
- package/src/app/lib/server/generation-queue-health.ts +108 -0
- package/src/app/lib/server/guest-context.ts +62 -0
- package/src/app/lib/server/guest-session.ts +153 -0
- package/src/app/lib/server/handoff-app-paths.ts +77 -0
- package/src/app/lib/server/handoff-component-patch.ts +123 -0
- package/src/app/lib/server/handoff-config-load.ts +29 -0
- package/src/app/lib/server/handoff-config-project.ts +104 -0
- package/src/app/lib/server/mcp-oauth-connector.ts +269 -0
- package/src/app/lib/server/node-tsx-worker-launcher.cjs +32 -0
- package/src/app/lib/server/oauth-state.ts +83 -0
- package/src/app/lib/server/passphrase.ts +121 -0
- package/src/app/lib/server/pattern-api-map.ts +123 -0
- package/src/app/lib/server/playground-chat.ts +1890 -0
- package/src/app/lib/server/public-api-paths.ts +34 -0
- package/src/app/lib/server/reference-material-generator.ts +341 -0
- package/src/app/lib/server/reference-material-ids.ts +8 -0
- package/src/app/lib/server/reference-material-persist.ts +25 -0
- package/src/app/lib/server/reference-material-schedule.ts +13 -0
- package/src/app/lib/server/registry-cache.ts +110 -0
- package/src/app/lib/server/request-public-url.ts +19 -0
- package/src/app/lib/server/runtime-config.ts +43 -0
- package/src/app/lib/server/s3-assets.ts +188 -0
- package/src/app/lib/server/sanity-connection.ts +176 -0
- package/src/app/lib/server/sanity-oauth.ts +34 -0
- package/src/app/lib/server/scaffold-args.ts +392 -0
- package/src/app/lib/server/secret-box.ts +85 -0
- package/src/app/lib/server/serverless-chromium.ts +93 -0
- package/src/app/lib/server/share-link-token.ts +106 -0
- package/src/app/lib/server/site-protection.ts +145 -0
- package/src/app/lib/server/spawn-tsx-worker.ts +47 -0
- package/src/app/lib/server/store-image-asset.ts +220 -0
- package/src/app/lib/server/token-freshness.ts +23 -0
- package/src/app/lib/server/unlock-cookie.ts +70 -0
- package/src/app/lib/server/upload-asset-to-library.ts +128 -0
- package/src/app/lib/server/url-extract.ts +117 -0
- package/src/app/lib/server/voice-audit.ts +209 -0
- package/src/app/lib/set-at-args-path.ts +36 -0
- package/src/app/lib/site-gate.ts +374 -0
- package/src/app/lib/slot-capabilities.ts +487 -0
- package/src/app/lib/source-copy.ts +295 -0
- package/src/app/lib/storage/artifact-images.ts +225 -0
- package/src/app/lib/storage/capture-artifacts.ts +109 -0
- package/src/app/lib/swap-image-src.ts +121 -0
- package/src/app/lib/sync-auth.ts +124 -0
- package/src/app/lib/tool-payload.ts +101 -0
- package/src/app/lib/turn-log.ts +78 -0
- package/src/app/lib/url-safety.ts +46 -0
- package/src/app/lib/utils.ts +35 -0
- package/src/app/lib/workbench-level.ts +56 -0
- package/src/app/middleware-hook.mjs +2 -0
- package/src/app/next-env.d.ts +6 -0
- package/src/app/next.config.mjs +355 -0
- package/src/app/postcss.config.mjs +8 -0
- package/src/app/proxy.ts +133 -0
- package/src/app/public/assets/css/preview.css +27 -0
- package/src/app/public/assets/design/blocks/callout-cta.jpg +0 -0
- package/src/app/public/assets/design/blocks/carousel.png +0 -0
- package/src/app/public/assets/design/blocks/container.png +0 -0
- package/src/app/public/assets/design/blocks/customer-stories.jpg +0 -0
- package/src/app/public/assets/design/blocks/faq.jpg +0 -0
- package/src/app/public/assets/design/blocks/features-comparison.jpg +0 -0
- package/src/app/public/assets/design/blocks/table.jpg +0 -0
- package/src/app/public/assets/images/blocks.svg +150 -0
- package/src/app/public/assets/images/check-circle.svg +10 -0
- package/src/app/public/assets/images/colors.svg +186 -0
- package/src/app/public/assets/images/components.png +0 -0
- package/src/app/public/assets/images/components.svg +183 -0
- package/src/app/public/assets/images/illustration-sample-2.svg +102 -0
- package/src/app/public/assets/images/illustration-sample-3.svg +124 -0
- package/src/app/public/assets/images/illustration-sample-bw-1.svg +84 -0
- package/src/app/public/assets/images/illustration-sample-bw-2.svg +88 -0
- package/src/app/public/assets/images/illustration-sample-bw-3.svg +125 -0
- package/src/app/public/assets/images/illustration-sample.svg +110 -0
- package/src/app/public/assets/images/typography.svg +279 -0
- package/src/app/public/assets/images/usage-correct.png +0 -0
- package/src/app/public/assets/images/usage-wrong.png +0 -0
- package/src/app/public/assets/images/x-circle.svg +10 -0
- package/src/app/public/assets/js/preview.js +90 -0
- package/src/app/public/assets/svg/activity.svg +1 -0
- package/src/app/public/assets/svg/add.svg +1 -0
- package/src/app/public/assets/svg/airplay.svg +1 -0
- package/src/app/public/assets/svg/alert-circle.svg +1 -0
- package/src/app/public/assets/svg/alert-octagon.svg +1 -0
- package/src/app/public/assets/svg/alert-triangle.svg +1 -0
- package/src/app/public/assets/svg/align-center.svg +1 -0
- package/src/app/public/assets/svg/align-justify.svg +1 -0
- package/src/app/public/assets/svg/align-left.svg +1 -0
- package/src/app/public/assets/svg/arrow-down-circle.svg +1 -0
- package/src/app/public/assets/svg/arrow-left-circle.svg +1 -0
- package/src/app/public/assets/svg/arrow-right-circle.svg +1 -0
- package/src/app/public/assets/svg/arrow-right.svg +4 -0
- package/src/app/public/assets/svg/arrow-up-circle.svg +1 -0
- package/src/app/public/assets/svg/bell-off.svg +1 -0
- package/src/app/public/assets/svg/bell.svg +1 -0
- package/src/app/public/assets/svg/camera.svg +1 -0
- package/src/app/public/assets/svg/cast.svg +1 -0
- package/src/app/public/assets/svg/check.svg +1 -0
- package/src/app/public/assets/svg/clock.svg +1 -0
- package/src/app/public/assets/svg/code.svg +1 -0
- package/src/app/public/assets/svg/component-accordion.svg +56 -0
- package/src/app/public/assets/svg/component-alert.svg +34 -0
- package/src/app/public/assets/svg/component-button.svg +63 -0
- package/src/app/public/assets/svg/component-checkbox.svg +41 -0
- package/src/app/public/assets/svg/component-input.svg +30 -0
- package/src/app/public/assets/svg/component-modal.svg +63 -0
- package/src/app/public/assets/svg/component-pagination.svg +82 -0
- package/src/app/public/assets/svg/component-radio.svg +15 -0
- package/src/app/public/assets/svg/component-select.svg +48 -0
- package/src/app/public/assets/svg/component-switch.svg +6 -0
- package/src/app/public/assets/svg/component-table.svg +45 -0
- package/src/app/public/assets/svg/component-tabs.svg +34 -0
- package/src/app/public/assets/svg/component-tooltip.svg +60 -0
- package/src/app/public/assets/svg/component.svg +48 -0
- package/src/app/public/assets/svg/copy.svg +1 -0
- package/src/app/public/assets/svg/delivery.svg +1 -0
- package/src/app/public/assets/svg/download.svg +1 -0
- package/src/app/public/assets/svg/file-jpg.svg +20 -0
- package/src/app/public/assets/svg/file-svg.svg +31 -0
- package/src/app/public/assets/svg/file-zip.svg +24 -0
- package/src/app/public/assets/svg/hero-brand-assets.svg +44 -0
- package/src/app/public/assets/svg/hero-colors.svg +10 -0
- package/src/app/public/assets/svg/hero-components.svg +68 -0
- package/src/app/public/assets/svg/hero-design.svg +20 -0
- package/src/app/public/assets/svg/hero-effects.svg +1 -0
- package/src/app/public/assets/svg/illustration-sample.svg +82 -0
- package/src/app/public/assets/svg/image.svg +8 -0
- package/src/app/public/assets/svg/link.svg +1 -0
- package/src/app/public/assets/svg/logo.svg +8 -0
- package/src/app/public/assets/svg/moon.svg +1 -0
- package/src/app/public/assets/svg/motiv-logo-dark-example.svg +11 -0
- package/src/app/public/assets/svg/motiv-logo-example.svg +11 -0
- package/src/app/public/assets/svg/plus-circle.svg +1 -0
- package/src/app/public/assets/svg/react.svg +10 -0
- package/src/app/public/assets/svg/search-laptop.svg +20 -0
- package/src/app/public/assets/svg/search.svg +1 -0
- package/src/app/public/assets/svg/send.svg +10 -0
- package/src/app/public/assets/svg/share.svg +1 -0
- package/src/app/public/assets/svg/small-accordion.svg +9 -0
- package/src/app/public/assets/svg/small-button.svg +9 -0
- package/src/app/public/assets/svg/small-pagination.svg +14 -0
- package/src/app/public/assets/svg/small-radio.svg +15 -0
- package/src/app/public/assets/svg/small-select.svg +9 -0
- package/src/app/public/assets/svg/small-table.svg +16 -0
- package/src/app/public/assets/svg/small-toggle.svg +9 -0
- package/src/app/public/assets/svg/sun.svg +1 -0
- package/src/app/public/assets/svg/token-alignment.svg +5 -0
- package/src/app/public/assets/svg/token-border-radius.svg +3 -0
- package/src/app/public/assets/svg/token-border-width.svg +10 -0
- package/src/app/public/assets/svg/token-spacing-horizontal.svg +8 -0
- package/src/app/public/assets/svg/token-spacing-vertical.svg +8 -0
- package/src/app/public/assets/svg/token-type-small.svg +5 -0
- package/src/app/public/assets/svg/x.svg +1 -0
- package/src/app/public/assets/svg/zap.svg +1 -0
- package/src/app/public/favicon.ico +0 -0
- package/src/app/public/fonts/readme.md +4 -0
- package/src/app/public/handoff-logo.svg +38 -0
- package/src/app/public/logo.svg +13 -0
- package/src/app/public/openapi.yaml +1818 -0
- package/src/app/public/robots.txt +0 -0
- package/src/app/tsconfig.json +53 -0
- package/src/app/types/middleware-hook.d.ts +10 -0
- package/src/app/types/next-auth-augmentation.d.ts +20 -0
- package/src/app-builder/README.md +43 -0
- package/src/app-builder/build.ts +741 -0
- package/src/app-builder/client-config.ts +124 -0
- package/src/app-builder/config-diff/index.ts +4 -0
- package/src/app-builder/config-diff/registry.ts +23 -0
- package/src/app-builder/config-diff/snapshot.ts +51 -0
- package/src/app-builder/config-diff/strategies/pattern.ts +80 -0
- package/src/app-builder/config-diff/types.ts +36 -0
- package/src/app-builder/index.ts +7 -0
- package/src/app-builder/path-contract.ts +81 -0
- package/src/app-builder/paths.ts +90 -0
- package/src/app-builder/watchers/component.ts +72 -0
- package/src/app-builder/watchers/utils.ts +44 -0
- package/src/app-builder/watchers.ts +345 -0
- package/src/app-builder/websocket.ts +72 -0
- package/src/cache/README.md +49 -0
- package/src/cache/build-cache.ts +567 -0
- package/src/cache/file-state.ts +170 -0
- package/src/cache/index.ts +46 -0
- package/src/cache/push-state.ts +201 -0
- package/src/cli/README.md +12 -0
- package/src/cli/create.ts +366 -0
- package/src/cli/eject.ts +93 -0
- package/src/cli/fetch-design-md.ts +60 -0
- package/src/cli/figma-audit.ts +76 -0
- package/src/cli/init-claude-core.ts +111 -0
- package/src/cli/make.ts +203 -0
- package/src/cli/scaffold.ts +651 -0
- package/src/cli/sync/apply-declaration-pull.ts +257 -0
- package/src/cli/sync/apply-pull.ts +223 -0
- package/src/cli/sync/cli-auth-store.ts +51 -0
- package/src/cli/sync/collect-build-artifacts.ts +159 -0
- package/src/cli/sync/collect-referenced-images.ts +204 -0
- package/src/cli/sync/declaration-patch.ts +192 -0
- package/src/cli/sync/hash.ts +12 -0
- package/src/cli/sync/open-browser.ts +37 -0
- package/src/cli/sync/push-provenance.ts +109 -0
- package/src/cli/sync/push-registry-content.ts +1025 -0
- package/src/cli/sync/push-shared-assets.ts +62 -0
- package/src/cli/sync/resolve-declaration-payload.ts +231 -0
- package/src/cli/sync/resolve-declaration.ts +18 -0
- package/src/cli/sync/run-cli-login.ts +110 -0
- package/src/cli/sync/run-history-purge.ts +142 -0
- package/src/cli/sync/run-pull.ts +112 -0
- package/src/cli/sync/run-push.ts +702 -0
- package/src/cli/sync/run-sync-status.ts +37 -0
- package/src/cli/sync/sync-remote-env.ts +64 -0
- package/src/cli/sync/sync-state.ts +42 -0
- package/src/cli/tokens/ensure-default-brand.ts +115 -0
- package/src/cli/tokens/migrate-legacy.ts +261 -0
- package/src/cli/tokens/parse-css-brands.ts +208 -0
- package/src/cli/tokens/transform.ts +134 -0
- package/src/cli.ts +62 -0
- package/src/commands/README.md +25 -0
- package/src/commands/audit/figma-components.ts +37 -0
- package/src/commands/build/app.ts +32 -0
- package/src/commands/build/components.ts +25 -0
- package/src/commands/build/hubspot.ts +267 -0
- package/src/commands/dev/index.ts +20 -0
- package/src/commands/eject/config.ts +20 -0
- package/src/commands/eject/pages.ts +20 -0
- package/src/commands/eject/theme.ts +20 -0
- package/src/commands/fetch/index.ts +20 -0
- package/src/commands/history-purge.ts +67 -0
- package/src/commands/index.ts +67 -0
- package/src/commands/init/index.ts +17 -0
- package/src/commands/init/vercel.ts +112 -0
- package/src/commands/init-claude.ts +61 -0
- package/src/commands/login.ts +39 -0
- package/src/commands/logout.ts +22 -0
- package/src/commands/make/component.ts +34 -0
- package/src/commands/make/page.ts +47 -0
- package/src/commands/make/template.ts +47 -0
- package/src/commands/mcp-init.ts +111 -0
- package/src/commands/mcp-token.ts +32 -0
- package/src/commands/prepare-runtime.ts +39 -0
- package/src/commands/pull.ts +28 -0
- package/src/commands/push-all.ts +202 -0
- package/src/commands/push-assets.ts +52 -0
- package/src/commands/push-tokens.ts +52 -0
- package/src/commands/push.ts +91 -0
- package/src/commands/scaffold/index.ts +22 -0
- package/src/commands/start/index.ts +20 -0
- package/src/commands/sync-status.ts +21 -0
- package/src/commands/tokens-build.ts +118 -0
- package/src/commands/types.ts +6 -0
- package/src/commands/utils.ts +21 -0
- package/src/commands/validate/components.ts +27 -0
- package/src/commands/validate.ts +189 -0
- package/src/commands/vercel-build.ts +96 -0
- package/src/config/README.md +32 -0
- package/src/config/declaration-module-load.ts +74 -0
- package/src/config/defaults.ts +78 -0
- package/src/config/helpers.ts +43 -0
- package/src/config/index.ts +16 -0
- package/src/config/loader.ts +131 -0
- package/src/config/normalizers/declaration.ts +180 -0
- package/src/config/normalizers/pattern.ts +56 -0
- package/src/config/runtime.ts +426 -0
- package/src/config/validator.ts +24 -0
- package/src/declarations/codegen.ts +367 -0
- package/src/declarations/helpers.ts +36 -0
- package/src/declarations/index.ts +20 -0
- package/src/declarations/types.ts +214 -0
- package/src/figma/component-linking.ts +1415 -0
- package/src/figma/image-fills.ts +247 -0
- package/src/generated/build-meta.ts +8 -0
- package/src/index.d.ts +13 -0
- package/src/index.ts +369 -0
- package/src/pipeline/README.md +21 -0
- package/src/pipeline/archive.ts +75 -0
- package/src/pipeline/components.ts +9 -0
- package/src/pipeline/documentation.ts +77 -0
- package/src/pipeline/figma.ts +173 -0
- package/src/pipeline/hubspot/config.ts +288 -0
- package/src/pipeline/hubspot/emit.ts +385 -0
- package/src/pipeline/index.ts +38 -0
- package/src/pipeline/patterns.ts +12 -0
- package/src/pipeline/styles.ts +154 -0
- package/src/pipeline/validation.ts +25 -0
- package/src/stacks/bootstrap-handlebars.md +117 -0
- package/src/stacks/react-scss.md +126 -0
- package/src/stacks/react-tailwind.md +123 -0
- package/src/stacks/tailwind-handlebars.md +142 -0
- package/src/transformers/README.md +19 -0
- package/src/transformers/docgen/index.ts +305 -0
- package/src/transformers/plugins/csf-render.ts +485 -0
- package/src/transformers/plugins/handlebars-previews.ts +194 -0
- package/src/transformers/plugins/index.ts +14 -0
- package/src/transformers/plugins/slot-probe-candidates.ts +386 -0
- package/src/transformers/plugins/slot-probe.ts +366 -0
- package/src/transformers/plugins/ssr-render.ts +622 -0
- package/src/transformers/plugins.ts +17 -0
- package/src/transformers/preview/component/api.ts +175 -0
- package/src/transformers/preview/component/artifacts.ts +112 -0
- package/src/transformers/preview/component/build-shared-bundles.ts +453 -0
- package/src/transformers/preview/component/builder.ts +754 -0
- package/src/transformers/preview/component/css.ts +253 -0
- package/src/transformers/preview/component/field-annotations.ts +400 -0
- package/src/transformers/preview/component/html.ts +96 -0
- package/src/transformers/preview/component/javascript.ts +182 -0
- package/src/transformers/preview/component/normalizer.ts +83 -0
- package/src/transformers/preview/component/playwright-shared.ts +183 -0
- package/src/transformers/preview/component/preview-assets.ts +158 -0
- package/src/transformers/preview/component/preview-merge.ts +95 -0
- package/src/transformers/preview/component/preview-select.ts +184 -0
- package/src/transformers/preview/component/preview-server.ts +128 -0
- package/src/transformers/preview/component/preview-validation.ts +255 -0
- package/src/transformers/preview/component/previews.ts +12 -0
- package/src/transformers/preview/component/screenshot.ts +306 -0
- package/src/transformers/preview/component/serialized-elements.ts +124 -0
- package/src/transformers/preview/component/summary.ts +54 -0
- package/src/transformers/preview/component.ts +31 -0
- package/src/transformers/preview/height-reporter.ts +37 -0
- package/src/transformers/preview/pattern/api.ts +83 -0
- package/src/transformers/preview/pattern/builder.ts +192 -0
- package/src/transformers/preview/pattern/html.ts +115 -0
- package/src/transformers/preview/slots.ts +105 -0
- package/src/transformers/preview/types.ts +302 -0
- package/src/transformers/types.ts +68 -0
- package/src/transformers/utils/build.ts +85 -0
- package/src/transformers/utils/csf.ts +48 -0
- package/src/transformers/utils/handlebars.ts +92 -0
- package/src/transformers/utils/html.ts +44 -0
- package/src/transformers/utils/index.ts +27 -0
- package/src/transformers/utils/module.ts +54 -0
- package/src/transformers/utils/schema-loader.ts +68 -0
- package/src/transformers/utils/schema.ts +569 -0
- package/src/transformers/utils/string.ts +55 -0
- package/src/transformers/utils/svg-sprite.ts +139 -0
- package/src/transformers/utils/usage.ts +317 -0
- package/src/transformers/utils/vite-logger.ts +33 -0
- package/src/transformers/validation/runner.ts +351 -0
- package/src/transformers/vite-config.ts +21 -0
- package/src/types/README.md +12 -0
- package/src/types/config.ts +482 -0
- package/src/types/font.ts +3 -0
- package/src/types/handoff-sync.ts +145 -0
- package/src/types/history-purge.ts +141 -0
- package/src/types/icon.ts +8 -0
- package/src/types/preview.ts +136 -0
- package/src/types/validation.ts +213 -0
- package/src/utils/README.md +14 -0
- package/src/utils/asset-upload-limits.ts +157 -0
- package/src/utils/design-md.ts +152 -0
- package/src/utils/duration.ts +3 -0
- package/src/utils/filter.ts +134 -0
- package/src/utils/fs.ts +35 -0
- package/src/utils/index.ts +6 -0
- package/src/utils/line-diff.ts +80 -0
- package/src/utils/logger.ts +176 -0
- package/src/utils/path.ts +61 -0
- package/src/utils/port.ts +46 -0
- package/src/utils/rich-text.ts +1202 -0
- package/src/validators/axe.ts +288 -0
- package/src/validators/contrast.ts +270 -0
- package/src/validators/index.ts +42 -0
- package/src/validators/schema.ts +191 -0
- package/tailwind.config.ts +96 -0
- package/templates/default/README.md.tpl +15 -0
- package/templates/default/components/button/Button.jsx.tpl +64 -0
- package/templates/default/components/button/Button.tsx.tpl +92 -0
- package/templates/default/components/button/button.react.handoff.js.tpl +31 -0
- package/templates/default/components/button/button.react.handoff.ts.tpl +31 -0
- package/templates/default/env.tpl +2 -0
- package/templates/default/gitignore.tpl +7 -0
- package/templates/default/handoff.config.js.tpl +216 -0
- package/templates/default/handoff.config.ts.tpl +196 -0
- package/templates/default/handoff.config.with-examples.js.tpl +215 -0
- package/templates/default/handoff.config.with-examples.ts.tpl +208 -0
- package/templates/default/package.json.tpl +19 -0
- package/templates/default/tsconfig.json.tpl +24 -0
- package/templates/workflows/hubspot-deploy.yml +134 -0
- package/tsconfig.json +30 -0
|
@@ -0,0 +1,1818 @@
|
|
|
1
|
+
openapi: 3.1.0
|
|
2
|
+
info:
|
|
3
|
+
title: Handoff Registry API
|
|
4
|
+
version: 2.0.0-alpha
|
|
5
|
+
description: |
|
|
6
|
+
The Handoff REST API gives programmatic access to every design-system
|
|
7
|
+
artifact stored in a Handoff registry: tokens, components, patterns,
|
|
8
|
+
pages, icons, logos, assets, changelog, and more.
|
|
9
|
+
|
|
10
|
+
## Authentication
|
|
11
|
+
|
|
12
|
+
Three credential types are used across the API:
|
|
13
|
+
|
|
14
|
+
| Type | Header | Used by |
|
|
15
|
+
|------|--------|---------|
|
|
16
|
+
| **Sync Bearer** | `Authorization: Bearer <token>` | CLI `push:all` / `pull`; token is either the `HANDOFF_SYNC_SECRET` env var or a short-lived CLI OAuth JWT |
|
|
17
|
+
| **Session Cookie** | NextAuth session (`__Secure-next-auth.session-token`) | Browser UI; all `/api/handoff/*` endpoints |
|
|
18
|
+
| **API Key** | `X-Handoff-Api-Key: <key>` | MCP endpoint and machine-to-machine calls |
|
|
19
|
+
|
|
20
|
+
Public read endpoints require no credentials.
|
|
21
|
+
|
|
22
|
+
## Versioning
|
|
23
|
+
|
|
24
|
+
This spec tracks the **2.0 pre-release** series (`feature/mcp-prototype`
|
|
25
|
+
branch). Endpoint shapes are stable within minor versions; breaking changes
|
|
26
|
+
will increment the major version.
|
|
27
|
+
|
|
28
|
+
contact:
|
|
29
|
+
name: Handoff by Convertiv
|
|
30
|
+
url: https://www.handoff.com/
|
|
31
|
+
|
|
32
|
+
servers:
|
|
33
|
+
- url: /
|
|
34
|
+
description: Same-origin (relative paths work for all clients)
|
|
35
|
+
|
|
36
|
+
tags:
|
|
37
|
+
- name: Registry — Read
|
|
38
|
+
description: >
|
|
39
|
+
Public, unauthenticated reads of design-system singletons. All registry
|
|
40
|
+
reads are served directly from the database singleton row and are safe
|
|
41
|
+
to call from any client.
|
|
42
|
+
- name: Registry — Write
|
|
43
|
+
description: >
|
|
44
|
+
Authenticated push endpoints consumed by the `handoff-app push:all` CLI
|
|
45
|
+
command. Require a sync:write bearer token.
|
|
46
|
+
- name: Sync
|
|
47
|
+
description: >
|
|
48
|
+
Low-level workspace sync protocol. Used by the CLI for incremental
|
|
49
|
+
component push/pull. Requires a sync bearer token.
|
|
50
|
+
- name: Components
|
|
51
|
+
description: Public component list and artifact file serving.
|
|
52
|
+
- name: Changelog
|
|
53
|
+
description: Unified change history across all entity types.
|
|
54
|
+
- name: Pages
|
|
55
|
+
description: Documentation page CRUD (session-authenticated).
|
|
56
|
+
- name: Patterns
|
|
57
|
+
description: Reusable design patterns (session-authenticated).
|
|
58
|
+
- name: Assets
|
|
59
|
+
description: Media asset management — logos, icons, images, fonts, videos.
|
|
60
|
+
- name: OAuth
|
|
61
|
+
description: RFC 8628 Device Authorization Grant for CLI login.
|
|
62
|
+
- name: MCP
|
|
63
|
+
description: Model Context Protocol server endpoint for AI agents.
|
|
64
|
+
- name: Admin
|
|
65
|
+
description: User management and build-queue inspection (admin session).
|
|
66
|
+
- name: AI
|
|
67
|
+
description: AI-powered generation features (session-authenticated).
|
|
68
|
+
- name: Figma
|
|
69
|
+
description: Figma integration — fetch and audit (admin session).
|
|
70
|
+
- name: Account
|
|
71
|
+
description: Authenticated user profile management.
|
|
72
|
+
|
|
73
|
+
# ---------------------------------------------------------------------------
|
|
74
|
+
# Security scheme definitions
|
|
75
|
+
# ---------------------------------------------------------------------------
|
|
76
|
+
components:
|
|
77
|
+
securitySchemes:
|
|
78
|
+
syncBearer:
|
|
79
|
+
type: http
|
|
80
|
+
scheme: bearer
|
|
81
|
+
description: >
|
|
82
|
+
JWT issued by the Handoff OAuth device flow, or the raw
|
|
83
|
+
`HANDOFF_SYNC_SECRET` env var value when using a shared-secret setup.
|
|
84
|
+
sessionCookie:
|
|
85
|
+
type: apiKey
|
|
86
|
+
in: cookie
|
|
87
|
+
name: __Secure-next-auth.session-token
|
|
88
|
+
description: NextAuth session cookie set after browser login.
|
|
89
|
+
apiKey:
|
|
90
|
+
type: apiKey
|
|
91
|
+
in: header
|
|
92
|
+
name: X-Handoff-Api-Key
|
|
93
|
+
description: Long-lived API key for machine-to-machine access (MCP, CI).
|
|
94
|
+
|
|
95
|
+
# -------------------------------------------------------------------------
|
|
96
|
+
# Reusable schemas
|
|
97
|
+
# -------------------------------------------------------------------------
|
|
98
|
+
schemas:
|
|
99
|
+
|
|
100
|
+
# --- Tokens / DTCG ---
|
|
101
|
+
DtcgManifest:
|
|
102
|
+
type: object
|
|
103
|
+
description: Metadata about the compiled DTCG token bundle.
|
|
104
|
+
properties:
|
|
105
|
+
project: { type: string }
|
|
106
|
+
generatedAt: { type: string, format: date-time }
|
|
107
|
+
sources: { type: array, items: { type: string } }
|
|
108
|
+
counts: { type: object, additionalProperties: { type: number } }
|
|
109
|
+
|
|
110
|
+
DtcgPayload:
|
|
111
|
+
type: object
|
|
112
|
+
description: Compiled DTCG token output.
|
|
113
|
+
properties:
|
|
114
|
+
manifest: { $ref: '#/components/schemas/DtcgManifest' }
|
|
115
|
+
css: { type: string, description: CSS custom-property output }
|
|
116
|
+
scss: { type: string, description: SCSS variable output }
|
|
117
|
+
tailwind: { type: string, description: Tailwind config output }
|
|
118
|
+
dtcg: { type: object, description: Raw W3C DTCG JSON }
|
|
119
|
+
brands: { type: object, description: Per-brand token maps, keyed by brand slug }
|
|
120
|
+
|
|
121
|
+
TokensSnapshot:
|
|
122
|
+
type: object
|
|
123
|
+
description: >
|
|
124
|
+
IDocumentationObject emitted by handoff-core after a Figma fetch.
|
|
125
|
+
Contains raw local-style data used to render typography and effects pages.
|
|
126
|
+
properties:
|
|
127
|
+
localStyles:
|
|
128
|
+
type: object
|
|
129
|
+
properties:
|
|
130
|
+
typography: { type: array, items: { type: object } }
|
|
131
|
+
effect: { type: array, items: { type: object } }
|
|
132
|
+
color: { type: array, items: { type: object } }
|
|
133
|
+
additionalProperties: true
|
|
134
|
+
|
|
135
|
+
# --- Icons ---
|
|
136
|
+
IconSource:
|
|
137
|
+
type: object
|
|
138
|
+
description: Where to resolve an icon's SVG.
|
|
139
|
+
required: [type]
|
|
140
|
+
discriminator:
|
|
141
|
+
propertyName: type
|
|
142
|
+
oneOf:
|
|
143
|
+
- title: Library icon (Iconify)
|
|
144
|
+
properties:
|
|
145
|
+
type: { type: string, const: library }
|
|
146
|
+
iconifyId: { type: string, example: lucide:chevron-down, description: "Iconify canonical ID in {prefix}:{name} format" }
|
|
147
|
+
required: [type, iconifyId]
|
|
148
|
+
- title: Custom SVG
|
|
149
|
+
properties:
|
|
150
|
+
type: { type: string, const: custom }
|
|
151
|
+
svg: { type: string, description: Inline SVG string }
|
|
152
|
+
required: [type, svg]
|
|
153
|
+
- title: Font Awesome Pro
|
|
154
|
+
properties:
|
|
155
|
+
type: { type: string, const: fa-pro }
|
|
156
|
+
iconifyId: { type: string, description: Iconify-style ID for metadata }
|
|
157
|
+
svg: { type: string, description: Inline SVG (required; FA Pro is not on Iconify CDN) }
|
|
158
|
+
required: [type, iconifyId, svg]
|
|
159
|
+
|
|
160
|
+
IconCatalogEntry:
|
|
161
|
+
type: object
|
|
162
|
+
required: [id, name, source, category]
|
|
163
|
+
properties:
|
|
164
|
+
id: { type: string, example: lucide:chevron-down }
|
|
165
|
+
name: { type: string, example: Chevron Down }
|
|
166
|
+
source: { $ref: '#/components/schemas/IconSource' }
|
|
167
|
+
category: { type: string, example: Navigation }
|
|
168
|
+
tags: { type: array, items: { type: string } }
|
|
169
|
+
usage: { type: string }
|
|
170
|
+
|
|
171
|
+
# --- Logos ---
|
|
172
|
+
LogoVariant:
|
|
173
|
+
type: object
|
|
174
|
+
required: [id, name, variant, form, svg]
|
|
175
|
+
properties:
|
|
176
|
+
id: { type: string }
|
|
177
|
+
name: { type: string }
|
|
178
|
+
brand: { type: string, description: Brand this variant belongs to (multi-brand workspaces) }
|
|
179
|
+
variant: { type: string, enum: [color, dark, light, monochrome] }
|
|
180
|
+
form: { type: string, enum: [primary, wordmark, icon, stacked] }
|
|
181
|
+
svg: { type: string, description: Inline SVG string }
|
|
182
|
+
background: { type: string, description: Recommended background color or 'dark'/'white' }
|
|
183
|
+
width: { type: integer }
|
|
184
|
+
height: { type: integer }
|
|
185
|
+
colors: { type: object, additionalProperties: { type: string } }
|
|
186
|
+
usage: { type: string }
|
|
187
|
+
doNotUse: { type: array, items: { type: string } }
|
|
188
|
+
|
|
189
|
+
LogoSet:
|
|
190
|
+
type: object
|
|
191
|
+
required: [name, variants]
|
|
192
|
+
properties:
|
|
193
|
+
name: { type: string }
|
|
194
|
+
description: { type: string }
|
|
195
|
+
clearspace: { type: string }
|
|
196
|
+
minWidth: { type: string }
|
|
197
|
+
doNot: { type: array, items: { type: string } }
|
|
198
|
+
variants: { type: array, items: { $ref: '#/components/schemas/LogoVariant' } }
|
|
199
|
+
|
|
200
|
+
# --- Navigation ---
|
|
201
|
+
NavigationNode:
|
|
202
|
+
type: object
|
|
203
|
+
required: [slug, title, type]
|
|
204
|
+
properties:
|
|
205
|
+
slug: { type: string }
|
|
206
|
+
title: { type: string }
|
|
207
|
+
type: { type: string, enum: [markdown, mdx, html, plugin, category] }
|
|
208
|
+
children: { type: array, items: { $ref: '#/components/schemas/NavigationNode' } }
|
|
209
|
+
|
|
210
|
+
# --- Pages ---
|
|
211
|
+
PageSummary:
|
|
212
|
+
type: object
|
|
213
|
+
required: [slug]
|
|
214
|
+
properties:
|
|
215
|
+
slug: { type: string }
|
|
216
|
+
frontmatter: { type: object, additionalProperties: true }
|
|
217
|
+
updatedAt: { type: string, format: date-time }
|
|
218
|
+
|
|
219
|
+
PageFull:
|
|
220
|
+
allOf:
|
|
221
|
+
- $ref: '#/components/schemas/PageSummary'
|
|
222
|
+
- type: object
|
|
223
|
+
properties:
|
|
224
|
+
markdown: { type: string }
|
|
225
|
+
|
|
226
|
+
# --- Components ---
|
|
227
|
+
ComponentSummary:
|
|
228
|
+
type: object
|
|
229
|
+
properties:
|
|
230
|
+
id: { type: string }
|
|
231
|
+
title: { type: string }
|
|
232
|
+
group: { type: string }
|
|
233
|
+
description: { type: string }
|
|
234
|
+
version: { type: string }
|
|
235
|
+
updatedAt: { type: string, format: date-time }
|
|
236
|
+
|
|
237
|
+
ValidationResult:
|
|
238
|
+
type: object
|
|
239
|
+
properties:
|
|
240
|
+
ruleId: { type: string }
|
|
241
|
+
severity: { type: string, enum: [error, warning, info] }
|
|
242
|
+
message: { type: string }
|
|
243
|
+
selector: { type: string }
|
|
244
|
+
|
|
245
|
+
VersionRecord:
|
|
246
|
+
type: object
|
|
247
|
+
properties:
|
|
248
|
+
version: { type: string }
|
|
249
|
+
pushedAt: { type: string, format: date-time }
|
|
250
|
+
pushedBy: { type: string }
|
|
251
|
+
changeType: { type: string, enum: [create, update, delete] }
|
|
252
|
+
|
|
253
|
+
# --- Changelog ---
|
|
254
|
+
ChangeRecord:
|
|
255
|
+
type: object
|
|
256
|
+
properties:
|
|
257
|
+
id: { type: integer }
|
|
258
|
+
entityType: { type: string, enum: [component, token, page] }
|
|
259
|
+
entityId: { type: string }
|
|
260
|
+
entityName: { type: string }
|
|
261
|
+
changeType: { type: string, enum: [create, update, delete] }
|
|
262
|
+
changedAt: { type: string, format: date-time }
|
|
263
|
+
changedBy: { type: string }
|
|
264
|
+
summary: { type: string }
|
|
265
|
+
|
|
266
|
+
# --- Patterns ---
|
|
267
|
+
PatternListEntry:
|
|
268
|
+
type: object
|
|
269
|
+
properties:
|
|
270
|
+
id: { type: string }
|
|
271
|
+
title: { type: string }
|
|
272
|
+
group: { type: string }
|
|
273
|
+
source: { type: string }
|
|
274
|
+
description: { type: string }
|
|
275
|
+
updatedAt: { type: string, format: date-time }
|
|
276
|
+
|
|
277
|
+
# --- Assets ---
|
|
278
|
+
Asset:
|
|
279
|
+
type: object
|
|
280
|
+
properties:
|
|
281
|
+
id: { type: string }
|
|
282
|
+
title: { type: string }
|
|
283
|
+
description: { type: string }
|
|
284
|
+
altText: { type: string }
|
|
285
|
+
assetType: { type: string, enum: [logo, icon, image, video, font] }
|
|
286
|
+
mimeType: { type: string }
|
|
287
|
+
storageUrl: { type: string, format: uri }
|
|
288
|
+
thumbnailUrl: { type: string, format: uri }
|
|
289
|
+
collectionId: { type: string }
|
|
290
|
+
tags: { type: array, items: { type: string } }
|
|
291
|
+
sourceType: { type: string, enum: [figma, upload, url, wordpress, cloudinary] }
|
|
292
|
+
status: { type: string, enum: [pending, active] }
|
|
293
|
+
createdAt: { type: string, format: date-time }
|
|
294
|
+
updatedAt: { type: string, format: date-time }
|
|
295
|
+
|
|
296
|
+
AssetCollection:
|
|
297
|
+
type: object
|
|
298
|
+
properties:
|
|
299
|
+
id: { type: string }
|
|
300
|
+
name: { type: string }
|
|
301
|
+
slug: { type: string }
|
|
302
|
+
description: { type: string }
|
|
303
|
+
sourceType: { type: string }
|
|
304
|
+
figmaSectionId: { type: string }
|
|
305
|
+
figmaFileKey: { type: string }
|
|
306
|
+
|
|
307
|
+
# --- Sync ---
|
|
308
|
+
SyncEntityType:
|
|
309
|
+
type: string
|
|
310
|
+
enum: [component, component_source, component_artifact, component_screenshot]
|
|
311
|
+
|
|
312
|
+
SyncChange:
|
|
313
|
+
type: object
|
|
314
|
+
required: [entityType, entityId, action]
|
|
315
|
+
properties:
|
|
316
|
+
entityType: { $ref: '#/components/schemas/SyncEntityType' }
|
|
317
|
+
entityId: { type: string }
|
|
318
|
+
action: { type: string, enum: [create, update, delete] }
|
|
319
|
+
data: { type: object, nullable: true }
|
|
320
|
+
|
|
321
|
+
# --- OAuth ---
|
|
322
|
+
DeviceAuthorizationResponse:
|
|
323
|
+
type: object
|
|
324
|
+
required: [device_code, user_code, verification_uri, expires_in, interval]
|
|
325
|
+
properties:
|
|
326
|
+
device_code: { type: string }
|
|
327
|
+
user_code: { type: string }
|
|
328
|
+
verification_uri: { type: string, format: uri }
|
|
329
|
+
verification_uri_complete: { type: string, format: uri }
|
|
330
|
+
expires_in: { type: integer, description: Seconds until codes expire }
|
|
331
|
+
interval: { type: integer, description: Polling interval in seconds }
|
|
332
|
+
|
|
333
|
+
TokenResponse:
|
|
334
|
+
type: object
|
|
335
|
+
required: [access_token, token_type, expires_in]
|
|
336
|
+
properties:
|
|
337
|
+
access_token: { type: string }
|
|
338
|
+
token_type: { type: string, example: bearer }
|
|
339
|
+
expires_in: { type: integer }
|
|
340
|
+
|
|
341
|
+
OAuthError:
|
|
342
|
+
type: object
|
|
343
|
+
required: [error]
|
|
344
|
+
properties:
|
|
345
|
+
error: { type: string, example: authorization_pending }
|
|
346
|
+
error_description: { type: string }
|
|
347
|
+
|
|
348
|
+
# --- Users ---
|
|
349
|
+
User:
|
|
350
|
+
type: object
|
|
351
|
+
properties:
|
|
352
|
+
id: { type: string }
|
|
353
|
+
name: { type: string }
|
|
354
|
+
email: { type: string, format: email }
|
|
355
|
+
role: { type: string, enum: [admin, member] }
|
|
356
|
+
image: { type: string, format: uri }
|
|
357
|
+
createdAt: { type: string, format: date-time }
|
|
358
|
+
|
|
359
|
+
# --- Error ---
|
|
360
|
+
Error:
|
|
361
|
+
type: object
|
|
362
|
+
required: [error]
|
|
363
|
+
properties:
|
|
364
|
+
error: { type: string }
|
|
365
|
+
|
|
366
|
+
# ===========================================================================
|
|
367
|
+
# Paths
|
|
368
|
+
# ===========================================================================
|
|
369
|
+
paths:
|
|
370
|
+
|
|
371
|
+
# =========================================================================
|
|
372
|
+
# REGISTRY — READ (public)
|
|
373
|
+
# =========================================================================
|
|
374
|
+
|
|
375
|
+
/api/registry/config:
|
|
376
|
+
get:
|
|
377
|
+
tags: [Registry — Read]
|
|
378
|
+
summary: Get registry config
|
|
379
|
+
description: >
|
|
380
|
+
Returns the singleton configuration row: app title, client name,
|
|
381
|
+
color-mode settings, type sort order, breakpoints, and any custom
|
|
382
|
+
fields pushed from the workspace `handoff.config.js`.
|
|
383
|
+
operationId: getRegistryConfig
|
|
384
|
+
responses:
|
|
385
|
+
'200':
|
|
386
|
+
description: Registry config
|
|
387
|
+
content:
|
|
388
|
+
application/json:
|
|
389
|
+
schema:
|
|
390
|
+
type: object
|
|
391
|
+
properties:
|
|
392
|
+
data: { type: object, additionalProperties: true }
|
|
393
|
+
post:
|
|
394
|
+
tags: [Registry — Write]
|
|
395
|
+
summary: Push registry config
|
|
396
|
+
operationId: pushRegistryConfig
|
|
397
|
+
security: [{syncBearer: []}]
|
|
398
|
+
requestBody:
|
|
399
|
+
required: true
|
|
400
|
+
content:
|
|
401
|
+
application/json:
|
|
402
|
+
schema:
|
|
403
|
+
type: object
|
|
404
|
+
required: [data]
|
|
405
|
+
properties:
|
|
406
|
+
data: { type: object, additionalProperties: true }
|
|
407
|
+
responses:
|
|
408
|
+
'200':
|
|
409
|
+
description: Accepted
|
|
410
|
+
content:
|
|
411
|
+
application/json:
|
|
412
|
+
schema:
|
|
413
|
+
type: object
|
|
414
|
+
properties:
|
|
415
|
+
ok: { type: boolean }
|
|
416
|
+
'401': { description: Unauthorized, content: { application/json: { schema: { $ref: '#/components/schemas/Error' } } } }
|
|
417
|
+
|
|
418
|
+
/api/registry/tokens:
|
|
419
|
+
get:
|
|
420
|
+
tags: [Registry — Read]
|
|
421
|
+
summary: Get latest tokens snapshot
|
|
422
|
+
description: >
|
|
423
|
+
Returns the most recent `IDocumentationObject` emitted by handoff-core
|
|
424
|
+
after a Figma fetch. Contains `localStyles.typography`,
|
|
425
|
+
`localStyles.effect`, and `localStyles.color` — the source for the
|
|
426
|
+
visual type/effects/color pages.
|
|
427
|
+
operationId: getTokensSnapshot
|
|
428
|
+
responses:
|
|
429
|
+
'200':
|
|
430
|
+
description: Tokens snapshot
|
|
431
|
+
content:
|
|
432
|
+
application/json:
|
|
433
|
+
schema:
|
|
434
|
+
type: object
|
|
435
|
+
properties:
|
|
436
|
+
payload: { $ref: '#/components/schemas/TokensSnapshot', nullable: true }
|
|
437
|
+
post:
|
|
438
|
+
tags: [Registry — Write]
|
|
439
|
+
summary: Push tokens snapshot
|
|
440
|
+
description: Appends a new snapshot row. Reads always return the latest by ID.
|
|
441
|
+
operationId: pushTokensSnapshot
|
|
442
|
+
security: [{syncBearer: []}]
|
|
443
|
+
requestBody:
|
|
444
|
+
required: true
|
|
445
|
+
content:
|
|
446
|
+
application/json:
|
|
447
|
+
schema:
|
|
448
|
+
type: object
|
|
449
|
+
required: [payload]
|
|
450
|
+
properties:
|
|
451
|
+
payload: { $ref: '#/components/schemas/TokensSnapshot' }
|
|
452
|
+
responses:
|
|
453
|
+
'200':
|
|
454
|
+
description: Accepted
|
|
455
|
+
content:
|
|
456
|
+
application/json:
|
|
457
|
+
schema:
|
|
458
|
+
type: object
|
|
459
|
+
properties:
|
|
460
|
+
ok: { type: boolean }
|
|
461
|
+
'401': { description: Unauthorized, content: { application/json: { schema: { $ref: '#/components/schemas/Error' } } } }
|
|
462
|
+
|
|
463
|
+
/api/registry/dtcg:
|
|
464
|
+
get:
|
|
465
|
+
tags: [Registry — Read]
|
|
466
|
+
summary: Get compiled DTCG token output
|
|
467
|
+
description: >
|
|
468
|
+
Returns the latest compiled W3C DTCG token bundle including CSS custom
|
|
469
|
+
properties, SCSS variables, Tailwind config, and raw DTCG JSON.
|
|
470
|
+
Optional per-brand maps are included when `brands` is populated.
|
|
471
|
+
operationId: getDtcgPayload
|
|
472
|
+
responses:
|
|
473
|
+
'200':
|
|
474
|
+
description: DTCG payload
|
|
475
|
+
content:
|
|
476
|
+
application/json:
|
|
477
|
+
schema:
|
|
478
|
+
type: object
|
|
479
|
+
properties:
|
|
480
|
+
payload: { $ref: '#/components/schemas/DtcgPayload', nullable: true }
|
|
481
|
+
post:
|
|
482
|
+
tags: [Registry — Write]
|
|
483
|
+
summary: Push compiled DTCG output
|
|
484
|
+
operationId: pushDtcgPayload
|
|
485
|
+
security: [{syncBearer: []}]
|
|
486
|
+
requestBody:
|
|
487
|
+
required: true
|
|
488
|
+
content:
|
|
489
|
+
application/json:
|
|
490
|
+
schema: { $ref: '#/components/schemas/DtcgPayload' }
|
|
491
|
+
responses:
|
|
492
|
+
'200':
|
|
493
|
+
description: Accepted
|
|
494
|
+
content:
|
|
495
|
+
application/json:
|
|
496
|
+
schema:
|
|
497
|
+
type: object
|
|
498
|
+
properties:
|
|
499
|
+
ok: { type: boolean }
|
|
500
|
+
|
|
501
|
+
/api/registry/icons:
|
|
502
|
+
get:
|
|
503
|
+
tags: [Registry — Read]
|
|
504
|
+
summary: Get icon catalog
|
|
505
|
+
description: >
|
|
506
|
+
Returns the singleton icon catalog. Each entry has an `iconifyId`
|
|
507
|
+
(e.g. `lucide:chevron-down`) for library icons or an inline `svg`
|
|
508
|
+
string for custom icons. Library icons should be rendered via the
|
|
509
|
+
Iconify CDN at `https://api.iconify.design/{prefix}/{name}.svg`.
|
|
510
|
+
operationId: getIconCatalog
|
|
511
|
+
responses:
|
|
512
|
+
'200':
|
|
513
|
+
description: Icon catalog
|
|
514
|
+
content:
|
|
515
|
+
application/json:
|
|
516
|
+
schema:
|
|
517
|
+
type: object
|
|
518
|
+
properties:
|
|
519
|
+
catalog:
|
|
520
|
+
type: array
|
|
521
|
+
items: { $ref: '#/components/schemas/IconCatalogEntry' }
|
|
522
|
+
post:
|
|
523
|
+
tags: [Registry — Write]
|
|
524
|
+
summary: Push icon catalog
|
|
525
|
+
description: Replaces the icon catalog singleton via upsert.
|
|
526
|
+
operationId: pushIconCatalog
|
|
527
|
+
security: [{syncBearer: []}]
|
|
528
|
+
requestBody:
|
|
529
|
+
required: true
|
|
530
|
+
content:
|
|
531
|
+
application/json:
|
|
532
|
+
schema:
|
|
533
|
+
type: object
|
|
534
|
+
required: [catalog]
|
|
535
|
+
properties:
|
|
536
|
+
catalog:
|
|
537
|
+
type: array
|
|
538
|
+
items: { $ref: '#/components/schemas/IconCatalogEntry' }
|
|
539
|
+
responses:
|
|
540
|
+
'200':
|
|
541
|
+
description: Accepted
|
|
542
|
+
content:
|
|
543
|
+
application/json:
|
|
544
|
+
schema:
|
|
545
|
+
type: object
|
|
546
|
+
properties:
|
|
547
|
+
ok: { type: boolean }
|
|
548
|
+
count: { type: integer }
|
|
549
|
+
|
|
550
|
+
/api/registry/logos:
|
|
551
|
+
get:
|
|
552
|
+
tags: [Registry — Read]
|
|
553
|
+
summary: Get logo set
|
|
554
|
+
description: >
|
|
555
|
+
Returns the singleton logo set containing all brand marks and their
|
|
556
|
+
approved variants. Multi-brand workspaces store all brands in a single
|
|
557
|
+
set with a `brand` discriminator on each variant.
|
|
558
|
+
operationId: getLogoSet
|
|
559
|
+
responses:
|
|
560
|
+
'200':
|
|
561
|
+
description: Logo set
|
|
562
|
+
content:
|
|
563
|
+
application/json:
|
|
564
|
+
schema:
|
|
565
|
+
type: object
|
|
566
|
+
properties:
|
|
567
|
+
logoSet: { $ref: '#/components/schemas/LogoSet', nullable: true }
|
|
568
|
+
post:
|
|
569
|
+
tags: [Registry — Write]
|
|
570
|
+
summary: Push logo set
|
|
571
|
+
operationId: pushLogoSet
|
|
572
|
+
security: [{syncBearer: []}]
|
|
573
|
+
requestBody:
|
|
574
|
+
required: true
|
|
575
|
+
content:
|
|
576
|
+
application/json:
|
|
577
|
+
schema:
|
|
578
|
+
type: object
|
|
579
|
+
required: [logoSet]
|
|
580
|
+
properties:
|
|
581
|
+
logoSet: { $ref: '#/components/schemas/LogoSet' }
|
|
582
|
+
responses:
|
|
583
|
+
'200':
|
|
584
|
+
description: Accepted
|
|
585
|
+
content:
|
|
586
|
+
application/json:
|
|
587
|
+
schema:
|
|
588
|
+
type: object
|
|
589
|
+
properties:
|
|
590
|
+
ok: { type: boolean }
|
|
591
|
+
|
|
592
|
+
/api/registry/navigation:
|
|
593
|
+
get:
|
|
594
|
+
tags: [Registry — Read]
|
|
595
|
+
summary: Get navigation tree
|
|
596
|
+
description: >
|
|
597
|
+
Returns the full sidebar navigation tree used to render the registry UI.
|
|
598
|
+
Node types: `markdown` (prose doc), `mdx`, `html`, `plugin` (dynamic
|
|
599
|
+
section), `category` (non-linking header).
|
|
600
|
+
operationId: getNavigation
|
|
601
|
+
responses:
|
|
602
|
+
'200':
|
|
603
|
+
description: Navigation tree
|
|
604
|
+
content:
|
|
605
|
+
application/json:
|
|
606
|
+
schema:
|
|
607
|
+
type: object
|
|
608
|
+
properties:
|
|
609
|
+
tree:
|
|
610
|
+
type: array
|
|
611
|
+
items: { $ref: '#/components/schemas/NavigationNode' }
|
|
612
|
+
post:
|
|
613
|
+
tags: [Registry — Write]
|
|
614
|
+
summary: Push navigation tree
|
|
615
|
+
operationId: pushNavigation
|
|
616
|
+
security: [{syncBearer: []}]
|
|
617
|
+
requestBody:
|
|
618
|
+
required: true
|
|
619
|
+
content:
|
|
620
|
+
application/json:
|
|
621
|
+
schema:
|
|
622
|
+
type: object
|
|
623
|
+
required: [tree]
|
|
624
|
+
properties:
|
|
625
|
+
tree:
|
|
626
|
+
type: array
|
|
627
|
+
items: { $ref: '#/components/schemas/NavigationNode' }
|
|
628
|
+
responses:
|
|
629
|
+
'200':
|
|
630
|
+
description: Accepted
|
|
631
|
+
content:
|
|
632
|
+
application/json:
|
|
633
|
+
schema:
|
|
634
|
+
type: object
|
|
635
|
+
properties:
|
|
636
|
+
ok: { type: boolean }
|
|
637
|
+
nodes: { type: integer }
|
|
638
|
+
|
|
639
|
+
/api/registry/pages:
|
|
640
|
+
get:
|
|
641
|
+
tags: [Registry — Read]
|
|
642
|
+
summary: List all pages
|
|
643
|
+
description: Returns summaries of all documentation pages for workspace pull.
|
|
644
|
+
operationId: listRegistryPages
|
|
645
|
+
responses:
|
|
646
|
+
'200':
|
|
647
|
+
description: Page list
|
|
648
|
+
content:
|
|
649
|
+
application/json:
|
|
650
|
+
schema:
|
|
651
|
+
type: object
|
|
652
|
+
properties:
|
|
653
|
+
pages:
|
|
654
|
+
type: array
|
|
655
|
+
items: { $ref: '#/components/schemas/PageSummary' }
|
|
656
|
+
post:
|
|
657
|
+
tags: [Registry — Write]
|
|
658
|
+
summary: Bulk push pages
|
|
659
|
+
description: Upserts all pages from a workspace push in a single batch.
|
|
660
|
+
operationId: pushPages
|
|
661
|
+
security: [{syncBearer: []}]
|
|
662
|
+
requestBody:
|
|
663
|
+
required: true
|
|
664
|
+
content:
|
|
665
|
+
application/json:
|
|
666
|
+
schema:
|
|
667
|
+
type: object
|
|
668
|
+
required: [pages]
|
|
669
|
+
properties:
|
|
670
|
+
pages:
|
|
671
|
+
type: array
|
|
672
|
+
items: { $ref: '#/components/schemas/PageFull' }
|
|
673
|
+
responses:
|
|
674
|
+
'200':
|
|
675
|
+
description: Accepted
|
|
676
|
+
content:
|
|
677
|
+
application/json:
|
|
678
|
+
schema:
|
|
679
|
+
type: object
|
|
680
|
+
properties:
|
|
681
|
+
ok: { type: boolean }
|
|
682
|
+
count: { type: integer }
|
|
683
|
+
|
|
684
|
+
/api/registry/theme:
|
|
685
|
+
get:
|
|
686
|
+
tags: [Registry — Read]
|
|
687
|
+
summary: Get theme metadata
|
|
688
|
+
description: >
|
|
689
|
+
Returns CSS byte-length and last-updated timestamp for the theme
|
|
690
|
+
singleton. To retrieve the actual CSS, use `GET /api/registry/theme.css`.
|
|
691
|
+
operationId: getThemeMeta
|
|
692
|
+
responses:
|
|
693
|
+
'200':
|
|
694
|
+
description: Theme metadata
|
|
695
|
+
content:
|
|
696
|
+
application/json:
|
|
697
|
+
schema:
|
|
698
|
+
type: object
|
|
699
|
+
properties:
|
|
700
|
+
length: { type: integer, description: CSS byte length }
|
|
701
|
+
updatedAt: { type: string, format: date-time, nullable: true }
|
|
702
|
+
post:
|
|
703
|
+
tags: [Registry — Write]
|
|
704
|
+
summary: Push theme CSS
|
|
705
|
+
operationId: pushTheme
|
|
706
|
+
security: [{syncBearer: []}]
|
|
707
|
+
requestBody:
|
|
708
|
+
required: true
|
|
709
|
+
content:
|
|
710
|
+
application/json:
|
|
711
|
+
schema:
|
|
712
|
+
type: object
|
|
713
|
+
required: [css]
|
|
714
|
+
properties:
|
|
715
|
+
css: { type: string }
|
|
716
|
+
responses:
|
|
717
|
+
'200':
|
|
718
|
+
description: Accepted
|
|
719
|
+
content:
|
|
720
|
+
application/json:
|
|
721
|
+
schema:
|
|
722
|
+
type: object
|
|
723
|
+
properties:
|
|
724
|
+
ok: { type: boolean }
|
|
725
|
+
length: { type: integer }
|
|
726
|
+
|
|
727
|
+
/api/registry/theme.css:
|
|
728
|
+
get:
|
|
729
|
+
tags: [Registry — Read]
|
|
730
|
+
summary: Get theme CSS
|
|
731
|
+
description: Returns the singleton theme CSS file with `text/css` content type.
|
|
732
|
+
operationId: getThemeCss
|
|
733
|
+
responses:
|
|
734
|
+
'200':
|
|
735
|
+
description: Theme CSS
|
|
736
|
+
content:
|
|
737
|
+
text/css:
|
|
738
|
+
schema:
|
|
739
|
+
type: string
|
|
740
|
+
|
|
741
|
+
# =========================================================================
|
|
742
|
+
# SYNC
|
|
743
|
+
# =========================================================================
|
|
744
|
+
|
|
745
|
+
/api/sync/status:
|
|
746
|
+
get:
|
|
747
|
+
tags: [Sync]
|
|
748
|
+
summary: Get sync status
|
|
749
|
+
description: Returns connection health and current registry statistics.
|
|
750
|
+
operationId: getSyncStatus
|
|
751
|
+
security: [{syncBearer: []}]
|
|
752
|
+
responses:
|
|
753
|
+
'200':
|
|
754
|
+
description: Sync status
|
|
755
|
+
content:
|
|
756
|
+
application/json:
|
|
757
|
+
schema:
|
|
758
|
+
type: object
|
|
759
|
+
additionalProperties: true
|
|
760
|
+
|
|
761
|
+
/api/sync/changes:
|
|
762
|
+
get:
|
|
763
|
+
tags: [Sync]
|
|
764
|
+
summary: Get changes since a checkpoint
|
|
765
|
+
description: >
|
|
766
|
+
Returns all sync events recorded after `since`. Used by `handoff-app
|
|
767
|
+
pull` to compute what has changed since the last pull. Passing `since=0`
|
|
768
|
+
(default) returns the full history.
|
|
769
|
+
operationId: getSyncChanges
|
|
770
|
+
security: [{syncBearer: []}]
|
|
771
|
+
parameters:
|
|
772
|
+
- name: since
|
|
773
|
+
in: query
|
|
774
|
+
description: Sync event ID to start from (exclusive)
|
|
775
|
+
schema: { type: integer, default: 0 }
|
|
776
|
+
responses:
|
|
777
|
+
'200':
|
|
778
|
+
description: Changeset
|
|
779
|
+
content:
|
|
780
|
+
application/json:
|
|
781
|
+
schema:
|
|
782
|
+
type: object
|
|
783
|
+
additionalProperties: true
|
|
784
|
+
|
|
785
|
+
/api/sync/upload:
|
|
786
|
+
post:
|
|
787
|
+
tags: [Sync]
|
|
788
|
+
summary: Upload component changes
|
|
789
|
+
description: >
|
|
790
|
+
Applies a batch of create/update/delete sync events for components,
|
|
791
|
+
source files, artifacts, and screenshots. Triggers an async validation
|
|
792
|
+
snapshot when component data changes. Errors on individual events do
|
|
793
|
+
not abort the batch — partial success is reported.
|
|
794
|
+
operationId: uploadSyncChanges
|
|
795
|
+
security: [{syncBearer: []}]
|
|
796
|
+
requestBody:
|
|
797
|
+
required: true
|
|
798
|
+
content:
|
|
799
|
+
application/json:
|
|
800
|
+
schema:
|
|
801
|
+
type: object
|
|
802
|
+
required: [changes]
|
|
803
|
+
properties:
|
|
804
|
+
changes:
|
|
805
|
+
type: array
|
|
806
|
+
items: { $ref: '#/components/schemas/SyncChange' }
|
|
807
|
+
responses:
|
|
808
|
+
'200':
|
|
809
|
+
description: Applied
|
|
810
|
+
content:
|
|
811
|
+
application/json:
|
|
812
|
+
schema:
|
|
813
|
+
type: object
|
|
814
|
+
properties:
|
|
815
|
+
ok: { type: boolean }
|
|
816
|
+
appliedCount: { type: integer }
|
|
817
|
+
applied: { type: array, items: { type: string } }
|
|
818
|
+
'207':
|
|
819
|
+
description: Partial success
|
|
820
|
+
content:
|
|
821
|
+
application/json:
|
|
822
|
+
schema:
|
|
823
|
+
type: object
|
|
824
|
+
properties:
|
|
825
|
+
error: { type: string }
|
|
826
|
+
applied: { type: array, items: { type: string } }
|
|
827
|
+
|
|
828
|
+
# =========================================================================
|
|
829
|
+
# COMPONENTS (public)
|
|
830
|
+
# =========================================================================
|
|
831
|
+
|
|
832
|
+
/api/components:
|
|
833
|
+
get:
|
|
834
|
+
tags: [Components]
|
|
835
|
+
summary: List all components
|
|
836
|
+
description: Returns a flat list of all component summaries from the registry.
|
|
837
|
+
operationId: listComponents
|
|
838
|
+
responses:
|
|
839
|
+
'200':
|
|
840
|
+
description: Component list
|
|
841
|
+
content:
|
|
842
|
+
application/json:
|
|
843
|
+
schema:
|
|
844
|
+
type: array
|
|
845
|
+
items: { $ref: '#/components/schemas/ComponentSummary' }
|
|
846
|
+
|
|
847
|
+
/api/component/{path}:
|
|
848
|
+
get:
|
|
849
|
+
tags: [Components]
|
|
850
|
+
summary: Serve component artifact file
|
|
851
|
+
description: >
|
|
852
|
+
Serves a single component artifact (HTML preview, CSS, JS, JSON
|
|
853
|
+
metadata, screenshot, etc.) identified by its path within the component
|
|
854
|
+
bundle. Resolves from the database in registry mode or from disk in
|
|
855
|
+
workspace mode.
|
|
856
|
+
operationId: getComponentArtifact
|
|
857
|
+
parameters:
|
|
858
|
+
- name: path
|
|
859
|
+
in: path
|
|
860
|
+
required: true
|
|
861
|
+
description: Catch-all path within the component artifact tree (e.g. `button/primary/index.html`)
|
|
862
|
+
schema: { type: string }
|
|
863
|
+
responses:
|
|
864
|
+
'200':
|
|
865
|
+
description: Artifact file
|
|
866
|
+
content:
|
|
867
|
+
text/html:
|
|
868
|
+
schema: { type: string }
|
|
869
|
+
text/css:
|
|
870
|
+
schema: { type: string }
|
|
871
|
+
application/javascript:
|
|
872
|
+
schema: { type: string }
|
|
873
|
+
application/json:
|
|
874
|
+
schema: { type: object }
|
|
875
|
+
image/png:
|
|
876
|
+
schema: { type: string, format: binary }
|
|
877
|
+
'404': { description: Not found }
|
|
878
|
+
|
|
879
|
+
/api/handoff/components:
|
|
880
|
+
get:
|
|
881
|
+
tags: [Components]
|
|
882
|
+
summary: Get component by ID
|
|
883
|
+
description: Fetch full component record including metadata and latest artifact URLs.
|
|
884
|
+
operationId: getComponent
|
|
885
|
+
security: [{sessionCookie: []}]
|
|
886
|
+
parameters:
|
|
887
|
+
- name: id
|
|
888
|
+
in: query
|
|
889
|
+
required: true
|
|
890
|
+
schema: { type: string }
|
|
891
|
+
responses:
|
|
892
|
+
'200':
|
|
893
|
+
description: Component
|
|
894
|
+
content:
|
|
895
|
+
application/json:
|
|
896
|
+
schema: { $ref: '#/components/schemas/ComponentSummary' }
|
|
897
|
+
'401': { description: Unauthorized }
|
|
898
|
+
'404': { description: Not found }
|
|
899
|
+
patch:
|
|
900
|
+
tags: [Components]
|
|
901
|
+
summary: Patch component metadata
|
|
902
|
+
description: Update component fields (admin only).
|
|
903
|
+
operationId: patchComponent
|
|
904
|
+
security: [{sessionCookie: []}]
|
|
905
|
+
requestBody:
|
|
906
|
+
required: true
|
|
907
|
+
content:
|
|
908
|
+
application/json:
|
|
909
|
+
schema:
|
|
910
|
+
type: object
|
|
911
|
+
properties:
|
|
912
|
+
id: { type: string }
|
|
913
|
+
title: { type: string }
|
|
914
|
+
description: { type: string }
|
|
915
|
+
group: { type: string }
|
|
916
|
+
responses:
|
|
917
|
+
'200':
|
|
918
|
+
description: Updated component
|
|
919
|
+
'401': { description: Unauthorized }
|
|
920
|
+
'403': { description: Admin role required }
|
|
921
|
+
|
|
922
|
+
/api/handoff/components/validation:
|
|
923
|
+
get:
|
|
924
|
+
tags: [Components]
|
|
925
|
+
summary: Get component validation results
|
|
926
|
+
description: >
|
|
927
|
+
Returns the latest validation snapshot for a component. Only available
|
|
928
|
+
on PostgreSQL registries; returns an empty array on SQLite.
|
|
929
|
+
operationId: getComponentValidation
|
|
930
|
+
security: [{sessionCookie: []}]
|
|
931
|
+
parameters:
|
|
932
|
+
- name: id
|
|
933
|
+
in: query
|
|
934
|
+
required: true
|
|
935
|
+
schema: { type: string }
|
|
936
|
+
responses:
|
|
937
|
+
'200':
|
|
938
|
+
description: Validation results
|
|
939
|
+
content:
|
|
940
|
+
application/json:
|
|
941
|
+
schema:
|
|
942
|
+
type: object
|
|
943
|
+
properties:
|
|
944
|
+
id: { type: string }
|
|
945
|
+
results:
|
|
946
|
+
type: array
|
|
947
|
+
items: { $ref: '#/components/schemas/ValidationResult' }
|
|
948
|
+
|
|
949
|
+
/api/handoff/components/history:
|
|
950
|
+
get:
|
|
951
|
+
tags: [Components]
|
|
952
|
+
summary: Get component version history
|
|
953
|
+
description: >
|
|
954
|
+
Returns push history for a component. Only available on PostgreSQL.
|
|
955
|
+
operationId: getComponentHistory
|
|
956
|
+
parameters:
|
|
957
|
+
- name: id
|
|
958
|
+
in: query
|
|
959
|
+
required: true
|
|
960
|
+
schema: { type: string }
|
|
961
|
+
- name: limit
|
|
962
|
+
in: query
|
|
963
|
+
schema: { type: integer, default: 50, maximum: 200 }
|
|
964
|
+
responses:
|
|
965
|
+
'200':
|
|
966
|
+
description: Version history
|
|
967
|
+
content:
|
|
968
|
+
application/json:
|
|
969
|
+
schema:
|
|
970
|
+
type: object
|
|
971
|
+
properties:
|
|
972
|
+
versions:
|
|
973
|
+
type: array
|
|
974
|
+
items: { $ref: '#/components/schemas/VersionRecord' }
|
|
975
|
+
total: { type: integer }
|
|
976
|
+
|
|
977
|
+
# =========================================================================
|
|
978
|
+
# CHANGELOG
|
|
979
|
+
# =========================================================================
|
|
980
|
+
|
|
981
|
+
/api/handoff/changelog:
|
|
982
|
+
get:
|
|
983
|
+
tags: [Changelog]
|
|
984
|
+
summary: Get unified changelog
|
|
985
|
+
description: >
|
|
986
|
+
Returns a time-ordered feed of changes across components, tokens, and
|
|
987
|
+
pages. Only available on PostgreSQL registries.
|
|
988
|
+
operationId: getChangelog
|
|
989
|
+
parameters:
|
|
990
|
+
- name: limit
|
|
991
|
+
in: query
|
|
992
|
+
schema: { type: integer, default: 50, maximum: 200 }
|
|
993
|
+
- name: since
|
|
994
|
+
in: query
|
|
995
|
+
description: ISO 8601 date-time; return changes after this timestamp
|
|
996
|
+
schema: { type: string, format: date-time }
|
|
997
|
+
responses:
|
|
998
|
+
'200':
|
|
999
|
+
description: Changelog feed
|
|
1000
|
+
content:
|
|
1001
|
+
application/json:
|
|
1002
|
+
schema:
|
|
1003
|
+
type: object
|
|
1004
|
+
properties:
|
|
1005
|
+
changes:
|
|
1006
|
+
type: array
|
|
1007
|
+
items: { $ref: '#/components/schemas/ChangeRecord' }
|
|
1008
|
+
total: { type: integer }
|
|
1009
|
+
|
|
1010
|
+
# =========================================================================
|
|
1011
|
+
# PAGES
|
|
1012
|
+
# =========================================================================
|
|
1013
|
+
|
|
1014
|
+
/api/handoff/pages:
|
|
1015
|
+
get:
|
|
1016
|
+
tags: [Pages]
|
|
1017
|
+
summary: Get page(s)
|
|
1018
|
+
description: >
|
|
1019
|
+
If `slug` is provided, returns a single full page (frontmatter +
|
|
1020
|
+
markdown). Without `slug`, returns all page summaries for the page
|
|
1021
|
+
manager UI.
|
|
1022
|
+
operationId: getPage
|
|
1023
|
+
security: [{sessionCookie: []}]
|
|
1024
|
+
parameters:
|
|
1025
|
+
- name: slug
|
|
1026
|
+
in: query
|
|
1027
|
+
schema: { type: string }
|
|
1028
|
+
responses:
|
|
1029
|
+
'200':
|
|
1030
|
+
description: Page or page list
|
|
1031
|
+
content:
|
|
1032
|
+
application/json:
|
|
1033
|
+
schema:
|
|
1034
|
+
oneOf:
|
|
1035
|
+
- $ref: '#/components/schemas/PageFull'
|
|
1036
|
+
- type: object
|
|
1037
|
+
properties:
|
|
1038
|
+
pages:
|
|
1039
|
+
type: array
|
|
1040
|
+
items: { $ref: '#/components/schemas/PageSummary' }
|
|
1041
|
+
post:
|
|
1042
|
+
tags: [Pages]
|
|
1043
|
+
summary: Create or update page
|
|
1044
|
+
description: >
|
|
1045
|
+
Upserts a documentation page by slug. Fires an async nav sync
|
|
1046
|
+
(non-fatal) to update the sidebar after save.
|
|
1047
|
+
operationId: upsertPage
|
|
1048
|
+
security: [{sessionCookie: []}]
|
|
1049
|
+
requestBody:
|
|
1050
|
+
required: true
|
|
1051
|
+
content:
|
|
1052
|
+
application/json:
|
|
1053
|
+
schema:
|
|
1054
|
+
type: object
|
|
1055
|
+
required: [slug]
|
|
1056
|
+
properties:
|
|
1057
|
+
slug: { type: string }
|
|
1058
|
+
frontmatter: { type: object, additionalProperties: true }
|
|
1059
|
+
markdown: { type: string }
|
|
1060
|
+
responses:
|
|
1061
|
+
'200':
|
|
1062
|
+
description: Saved page
|
|
1063
|
+
content:
|
|
1064
|
+
application/json:
|
|
1065
|
+
schema: { $ref: '#/components/schemas/PageFull' }
|
|
1066
|
+
delete:
|
|
1067
|
+
tags: [Pages]
|
|
1068
|
+
summary: Delete page
|
|
1069
|
+
operationId: deletePage
|
|
1070
|
+
security: [{sessionCookie: []}]
|
|
1071
|
+
parameters:
|
|
1072
|
+
- name: slug
|
|
1073
|
+
in: query
|
|
1074
|
+
required: true
|
|
1075
|
+
schema: { type: string }
|
|
1076
|
+
responses:
|
|
1077
|
+
'200':
|
|
1078
|
+
description: Deleted
|
|
1079
|
+
content:
|
|
1080
|
+
application/json:
|
|
1081
|
+
schema:
|
|
1082
|
+
type: object
|
|
1083
|
+
properties:
|
|
1084
|
+
ok: { type: boolean }
|
|
1085
|
+
|
|
1086
|
+
# =========================================================================
|
|
1087
|
+
# PATTERNS
|
|
1088
|
+
# =========================================================================
|
|
1089
|
+
|
|
1090
|
+
/api/handoff/patterns:
|
|
1091
|
+
get:
|
|
1092
|
+
tags: [Patterns]
|
|
1093
|
+
summary: List patterns
|
|
1094
|
+
operationId: listPatterns
|
|
1095
|
+
security: [{sessionCookie: []}]
|
|
1096
|
+
parameters:
|
|
1097
|
+
- name: q
|
|
1098
|
+
in: query
|
|
1099
|
+
description: Full-text search query
|
|
1100
|
+
schema: { type: string }
|
|
1101
|
+
- name: group
|
|
1102
|
+
in: query
|
|
1103
|
+
schema: { type: string }
|
|
1104
|
+
- name: source
|
|
1105
|
+
in: query
|
|
1106
|
+
schema: { type: string }
|
|
1107
|
+
responses:
|
|
1108
|
+
'200':
|
|
1109
|
+
description: Pattern list
|
|
1110
|
+
content:
|
|
1111
|
+
application/json:
|
|
1112
|
+
schema:
|
|
1113
|
+
type: object
|
|
1114
|
+
properties:
|
|
1115
|
+
patterns:
|
|
1116
|
+
type: array
|
|
1117
|
+
items: { $ref: '#/components/schemas/PatternListEntry' }
|
|
1118
|
+
|
|
1119
|
+
/api/handoff/patterns/{id}:
|
|
1120
|
+
get:
|
|
1121
|
+
tags: [Patterns]
|
|
1122
|
+
summary: Get pattern by ID
|
|
1123
|
+
operationId: getPattern
|
|
1124
|
+
security: [{sessionCookie: []}]
|
|
1125
|
+
parameters:
|
|
1126
|
+
- name: id
|
|
1127
|
+
in: path
|
|
1128
|
+
required: true
|
|
1129
|
+
schema: { type: string }
|
|
1130
|
+
responses:
|
|
1131
|
+
'200':
|
|
1132
|
+
description: Pattern detail
|
|
1133
|
+
content:
|
|
1134
|
+
application/json:
|
|
1135
|
+
schema:
|
|
1136
|
+
type: object
|
|
1137
|
+
properties:
|
|
1138
|
+
pattern: { type: object }
|
|
1139
|
+
'404': { description: Not found }
|
|
1140
|
+
|
|
1141
|
+
# =========================================================================
|
|
1142
|
+
# ASSETS
|
|
1143
|
+
# =========================================================================
|
|
1144
|
+
|
|
1145
|
+
/api/handoff/assets:
|
|
1146
|
+
get:
|
|
1147
|
+
tags: [Assets]
|
|
1148
|
+
summary: List assets
|
|
1149
|
+
operationId: listAssets
|
|
1150
|
+
security: [{sessionCookie: []}]
|
|
1151
|
+
parameters:
|
|
1152
|
+
- name: assetType
|
|
1153
|
+
in: query
|
|
1154
|
+
schema: { type: string, enum: [logo, icon, image, video, font] }
|
|
1155
|
+
- name: collectionId
|
|
1156
|
+
in: query
|
|
1157
|
+
schema: { type: string }
|
|
1158
|
+
- name: iconSetId
|
|
1159
|
+
in: query
|
|
1160
|
+
schema: { type: string }
|
|
1161
|
+
- name: status
|
|
1162
|
+
in: query
|
|
1163
|
+
schema: { type: string, enum: [pending, active] }
|
|
1164
|
+
- name: search
|
|
1165
|
+
in: query
|
|
1166
|
+
schema: { type: string }
|
|
1167
|
+
- name: tags
|
|
1168
|
+
in: query
|
|
1169
|
+
description: Comma-separated tag list
|
|
1170
|
+
schema: { type: string }
|
|
1171
|
+
- name: limit
|
|
1172
|
+
in: query
|
|
1173
|
+
schema: { type: integer }
|
|
1174
|
+
- name: offset
|
|
1175
|
+
in: query
|
|
1176
|
+
schema: { type: integer }
|
|
1177
|
+
responses:
|
|
1178
|
+
'200':
|
|
1179
|
+
description: Asset list
|
|
1180
|
+
content:
|
|
1181
|
+
application/json:
|
|
1182
|
+
schema:
|
|
1183
|
+
type: array
|
|
1184
|
+
items: { $ref: '#/components/schemas/Asset' }
|
|
1185
|
+
post:
|
|
1186
|
+
tags: [Assets]
|
|
1187
|
+
summary: Create asset
|
|
1188
|
+
description: >
|
|
1189
|
+
Creates a new asset record. The `storageUrl` must point to an already-
|
|
1190
|
+
uploaded file (use `/api/handoff/assets/presign` → `/api/handoff/assets/confirm`
|
|
1191
|
+
for the S3 upload flow, or supply an external URL directly).
|
|
1192
|
+
operationId: createAsset
|
|
1193
|
+
security: [{sessionCookie: []}]
|
|
1194
|
+
requestBody:
|
|
1195
|
+
required: true
|
|
1196
|
+
content:
|
|
1197
|
+
application/json:
|
|
1198
|
+
schema:
|
|
1199
|
+
type: object
|
|
1200
|
+
required: [title, assetType, storageUrl]
|
|
1201
|
+
properties:
|
|
1202
|
+
title: { type: string }
|
|
1203
|
+
description: { type: string }
|
|
1204
|
+
altText: { type: string }
|
|
1205
|
+
assetType: { type: string, enum: [logo, icon, image, video, font] }
|
|
1206
|
+
mimeType: { type: string }
|
|
1207
|
+
storageUrl: { type: string, format: uri }
|
|
1208
|
+
collectionId: { type: string }
|
|
1209
|
+
tags: { type: array, items: { type: string } }
|
|
1210
|
+
sourceType: { type: string, enum: [figma, upload, url, wordpress, cloudinary] }
|
|
1211
|
+
sourceUrl: { type: string, format: uri }
|
|
1212
|
+
sourceMetadata: { type: object }
|
|
1213
|
+
responses:
|
|
1214
|
+
'201':
|
|
1215
|
+
description: Created
|
|
1216
|
+
content:
|
|
1217
|
+
application/json:
|
|
1218
|
+
schema: { $ref: '#/components/schemas/Asset' }
|
|
1219
|
+
|
|
1220
|
+
/api/handoff/assets/{id}:
|
|
1221
|
+
get:
|
|
1222
|
+
tags: [Assets]
|
|
1223
|
+
summary: Get asset
|
|
1224
|
+
operationId: getAsset
|
|
1225
|
+
security: [{sessionCookie: []}]
|
|
1226
|
+
parameters:
|
|
1227
|
+
- name: id
|
|
1228
|
+
in: path
|
|
1229
|
+
required: true
|
|
1230
|
+
schema: { type: string }
|
|
1231
|
+
responses:
|
|
1232
|
+
'200':
|
|
1233
|
+
description: Asset with usages
|
|
1234
|
+
content:
|
|
1235
|
+
application/json:
|
|
1236
|
+
schema:
|
|
1237
|
+
allOf:
|
|
1238
|
+
- $ref: '#/components/schemas/Asset'
|
|
1239
|
+
- type: object
|
|
1240
|
+
properties:
|
|
1241
|
+
usages: { type: array, items: { type: object } }
|
|
1242
|
+
put:
|
|
1243
|
+
tags: [Assets]
|
|
1244
|
+
summary: Update asset metadata
|
|
1245
|
+
operationId: updateAsset
|
|
1246
|
+
security: [{sessionCookie: []}]
|
|
1247
|
+
parameters:
|
|
1248
|
+
- name: id
|
|
1249
|
+
in: path
|
|
1250
|
+
required: true
|
|
1251
|
+
schema: { type: string }
|
|
1252
|
+
requestBody:
|
|
1253
|
+
required: true
|
|
1254
|
+
content:
|
|
1255
|
+
application/json:
|
|
1256
|
+
schema:
|
|
1257
|
+
type: object
|
|
1258
|
+
properties:
|
|
1259
|
+
title: { type: string }
|
|
1260
|
+
description: { type: string }
|
|
1261
|
+
altText: { type: string }
|
|
1262
|
+
thumbnailUrl: { type: string, format: uri }
|
|
1263
|
+
collectionId: { type: string }
|
|
1264
|
+
tags: { type: array, items: { type: string } }
|
|
1265
|
+
status: { type: string, enum: [pending, active] }
|
|
1266
|
+
nativeWidth: { type: integer }
|
|
1267
|
+
nativeHeight: { type: integer }
|
|
1268
|
+
sourceUrl: { type: string, format: uri }
|
|
1269
|
+
sourceMetadata: { type: object }
|
|
1270
|
+
responses:
|
|
1271
|
+
'200':
|
|
1272
|
+
description: Updated asset
|
|
1273
|
+
content:
|
|
1274
|
+
application/json:
|
|
1275
|
+
schema: { $ref: '#/components/schemas/Asset' }
|
|
1276
|
+
delete:
|
|
1277
|
+
tags: [Assets]
|
|
1278
|
+
summary: Delete asset
|
|
1279
|
+
operationId: deleteAsset
|
|
1280
|
+
security: [{sessionCookie: []}]
|
|
1281
|
+
parameters:
|
|
1282
|
+
- name: id
|
|
1283
|
+
in: path
|
|
1284
|
+
required: true
|
|
1285
|
+
schema: { type: string }
|
|
1286
|
+
responses:
|
|
1287
|
+
'204': { description: Deleted }
|
|
1288
|
+
|
|
1289
|
+
/api/handoff/assets/presign:
|
|
1290
|
+
post:
|
|
1291
|
+
tags: [Assets]
|
|
1292
|
+
summary: Generate S3 presigned upload URL
|
|
1293
|
+
description: >
|
|
1294
|
+
Returns a short-lived presigned PUT URL for direct-to-S3 upload.
|
|
1295
|
+
After upload completes, call `/api/handoff/assets/confirm` to
|
|
1296
|
+
create the asset record.
|
|
1297
|
+
operationId: presignAssetUpload
|
|
1298
|
+
security: [{sessionCookie: []}]
|
|
1299
|
+
requestBody:
|
|
1300
|
+
content:
|
|
1301
|
+
application/json:
|
|
1302
|
+
schema:
|
|
1303
|
+
type: object
|
|
1304
|
+
properties:
|
|
1305
|
+
filename: { type: string }
|
|
1306
|
+
mimeType: { type: string }
|
|
1307
|
+
ttlSecs: { type: integer, description: URL TTL in seconds }
|
|
1308
|
+
responses:
|
|
1309
|
+
'200':
|
|
1310
|
+
description: Presigned URL + asset ID
|
|
1311
|
+
content:
|
|
1312
|
+
application/json:
|
|
1313
|
+
schema:
|
|
1314
|
+
type: object
|
|
1315
|
+
properties:
|
|
1316
|
+
assetId: { type: string }
|
|
1317
|
+
uploadUrl: { type: string, format: uri }
|
|
1318
|
+
publicUrl: { type: string, format: uri }
|
|
1319
|
+
storageKey: { type: string }
|
|
1320
|
+
expiresAt: { type: string, format: date-time }
|
|
1321
|
+
|
|
1322
|
+
/api/handoff/assets/confirm:
|
|
1323
|
+
post:
|
|
1324
|
+
tags: [Assets]
|
|
1325
|
+
summary: Confirm S3 upload and create asset record
|
|
1326
|
+
operationId: confirmAssetUpload
|
|
1327
|
+
security: [{sessionCookie: []}]
|
|
1328
|
+
requestBody:
|
|
1329
|
+
required: true
|
|
1330
|
+
content:
|
|
1331
|
+
application/json:
|
|
1332
|
+
schema:
|
|
1333
|
+
type: object
|
|
1334
|
+
required: [assetId, storageKey, publicUrl, assetType]
|
|
1335
|
+
properties:
|
|
1336
|
+
assetId: { type: string }
|
|
1337
|
+
storageKey: { type: string }
|
|
1338
|
+
publicUrl: { type: string, format: uri }
|
|
1339
|
+
title: { type: string }
|
|
1340
|
+
description: { type: string }
|
|
1341
|
+
altText: { type: string }
|
|
1342
|
+
assetType: { type: string, enum: [logo, icon, image, video, font] }
|
|
1343
|
+
mimeType: { type: string }
|
|
1344
|
+
fileSizeBytes: { type: integer }
|
|
1345
|
+
nativeWidth: { type: integer }
|
|
1346
|
+
nativeHeight: { type: integer }
|
|
1347
|
+
collectionId: { type: string }
|
|
1348
|
+
tags: { type: array, items: { type: string } }
|
|
1349
|
+
sourceType: { type: string }
|
|
1350
|
+
sourceUrl: { type: string, format: uri }
|
|
1351
|
+
sourceMetadata: { type: object }
|
|
1352
|
+
responses:
|
|
1353
|
+
'201':
|
|
1354
|
+
description: Created asset
|
|
1355
|
+
content:
|
|
1356
|
+
application/json:
|
|
1357
|
+
schema: { $ref: '#/components/schemas/Asset' }
|
|
1358
|
+
|
|
1359
|
+
/api/handoff/assets/collections:
|
|
1360
|
+
get:
|
|
1361
|
+
tags: [Assets]
|
|
1362
|
+
summary: List asset collections
|
|
1363
|
+
operationId: listAssetCollections
|
|
1364
|
+
security: [{sessionCookie: []}]
|
|
1365
|
+
responses:
|
|
1366
|
+
'200':
|
|
1367
|
+
description: Collections
|
|
1368
|
+
content:
|
|
1369
|
+
application/json:
|
|
1370
|
+
schema:
|
|
1371
|
+
type: array
|
|
1372
|
+
items: { $ref: '#/components/schemas/AssetCollection' }
|
|
1373
|
+
post:
|
|
1374
|
+
tags: [Assets]
|
|
1375
|
+
summary: Create asset collection
|
|
1376
|
+
operationId: createAssetCollection
|
|
1377
|
+
security: [{sessionCookie: []}]
|
|
1378
|
+
requestBody:
|
|
1379
|
+
required: true
|
|
1380
|
+
content:
|
|
1381
|
+
application/json:
|
|
1382
|
+
schema:
|
|
1383
|
+
type: object
|
|
1384
|
+
required: [name]
|
|
1385
|
+
properties:
|
|
1386
|
+
name: { type: string }
|
|
1387
|
+
slug: { type: string }
|
|
1388
|
+
description: { type: string }
|
|
1389
|
+
sourceType: { type: string }
|
|
1390
|
+
figmaSectionId: { type: string }
|
|
1391
|
+
figmaFileKey: { type: string }
|
|
1392
|
+
metadata: { type: object }
|
|
1393
|
+
responses:
|
|
1394
|
+
'201':
|
|
1395
|
+
description: Created collection
|
|
1396
|
+
content:
|
|
1397
|
+
application/json:
|
|
1398
|
+
schema: { $ref: '#/components/schemas/AssetCollection' }
|
|
1399
|
+
|
|
1400
|
+
# =========================================================================
|
|
1401
|
+
# OAUTH — Device Authorization Grant (RFC 8628)
|
|
1402
|
+
# =========================================================================
|
|
1403
|
+
|
|
1404
|
+
/api/oauth/device:
|
|
1405
|
+
post:
|
|
1406
|
+
tags: [OAuth]
|
|
1407
|
+
summary: Request device authorization
|
|
1408
|
+
description: >
|
|
1409
|
+
Initiates the CLI device authorization flow. The CLI displays
|
|
1410
|
+
`verification_uri` and `user_code` to the user, then polls
|
|
1411
|
+
`/api/oauth/token` until approved or expired.
|
|
1412
|
+
operationId: requestDeviceAuthorization
|
|
1413
|
+
responses:
|
|
1414
|
+
'200':
|
|
1415
|
+
description: Device and user codes
|
|
1416
|
+
content:
|
|
1417
|
+
application/json:
|
|
1418
|
+
schema: { $ref: '#/components/schemas/DeviceAuthorizationResponse' }
|
|
1419
|
+
|
|
1420
|
+
/api/oauth/token:
|
|
1421
|
+
post:
|
|
1422
|
+
tags: [OAuth]
|
|
1423
|
+
summary: Exchange device code for access token
|
|
1424
|
+
description: >
|
|
1425
|
+
Exchanges an approved device code for a short-lived JWT bearer token.
|
|
1426
|
+
Returns `authorization_pending` while the user hasn't approved yet, or
|
|
1427
|
+
`expired_token` once the device code TTL has elapsed.
|
|
1428
|
+
operationId: exchangeDeviceCode
|
|
1429
|
+
requestBody:
|
|
1430
|
+
required: true
|
|
1431
|
+
content:
|
|
1432
|
+
application/json:
|
|
1433
|
+
schema:
|
|
1434
|
+
type: object
|
|
1435
|
+
required: [grant_type, device_code]
|
|
1436
|
+
properties:
|
|
1437
|
+
grant_type: { type: string, const: 'urn:ietf:params:oauth:grant-type:device_code' }
|
|
1438
|
+
device_code: { type: string }
|
|
1439
|
+
application/x-www-form-urlencoded:
|
|
1440
|
+
schema:
|
|
1441
|
+
type: object
|
|
1442
|
+
required: [grant_type, device_code]
|
|
1443
|
+
properties:
|
|
1444
|
+
grant_type: { type: string }
|
|
1445
|
+
device_code: { type: string }
|
|
1446
|
+
responses:
|
|
1447
|
+
'200':
|
|
1448
|
+
description: Access token
|
|
1449
|
+
content:
|
|
1450
|
+
application/json:
|
|
1451
|
+
schema: { $ref: '#/components/schemas/TokenResponse' }
|
|
1452
|
+
'400':
|
|
1453
|
+
description: Pending or error
|
|
1454
|
+
content:
|
|
1455
|
+
application/json:
|
|
1456
|
+
schema: { $ref: '#/components/schemas/OAuthError' }
|
|
1457
|
+
|
|
1458
|
+
# =========================================================================
|
|
1459
|
+
# MCP
|
|
1460
|
+
# =========================================================================
|
|
1461
|
+
|
|
1462
|
+
/api/mcp:
|
|
1463
|
+
get:
|
|
1464
|
+
tags: [MCP]
|
|
1465
|
+
summary: MCP server (SSE transport)
|
|
1466
|
+
description: >
|
|
1467
|
+
Server-Sent Events endpoint for the Model Context Protocol server.
|
|
1468
|
+
Connect with an MCP client (e.g. Claude Desktop, Claude Code) using
|
|
1469
|
+
`X-Handoff-Api-Key` or `X-Handoff-Api-Token`. Only available on
|
|
1470
|
+
PostgreSQL registries.
|
|
1471
|
+
operationId: mcpSse
|
|
1472
|
+
security: [{apiKey: []}]
|
|
1473
|
+
responses:
|
|
1474
|
+
'200':
|
|
1475
|
+
description: SSE stream
|
|
1476
|
+
content:
|
|
1477
|
+
text/event-stream:
|
|
1478
|
+
schema: { type: string }
|
|
1479
|
+
post:
|
|
1480
|
+
tags: [MCP]
|
|
1481
|
+
summary: MCP server (HTTP transport)
|
|
1482
|
+
operationId: mcpHttp
|
|
1483
|
+
security: [{apiKey: []}]
|
|
1484
|
+
requestBody:
|
|
1485
|
+
content:
|
|
1486
|
+
application/json:
|
|
1487
|
+
schema: { type: object }
|
|
1488
|
+
responses:
|
|
1489
|
+
'200':
|
|
1490
|
+
description: MCP response
|
|
1491
|
+
content:
|
|
1492
|
+
application/json:
|
|
1493
|
+
schema: { type: object }
|
|
1494
|
+
delete:
|
|
1495
|
+
tags: [MCP]
|
|
1496
|
+
summary: MCP server (close session)
|
|
1497
|
+
operationId: mcpClose
|
|
1498
|
+
security: [{apiKey: []}]
|
|
1499
|
+
responses:
|
|
1500
|
+
'200': { description: Session closed }
|
|
1501
|
+
|
|
1502
|
+
# =========================================================================
|
|
1503
|
+
# ADMIN
|
|
1504
|
+
# =========================================================================
|
|
1505
|
+
|
|
1506
|
+
/api/handoff/admin/users:
|
|
1507
|
+
get:
|
|
1508
|
+
tags: [Admin]
|
|
1509
|
+
summary: List users
|
|
1510
|
+
operationId: listUsers
|
|
1511
|
+
security: [{sessionCookie: []}]
|
|
1512
|
+
responses:
|
|
1513
|
+
'200':
|
|
1514
|
+
description: User list
|
|
1515
|
+
content:
|
|
1516
|
+
application/json:
|
|
1517
|
+
schema:
|
|
1518
|
+
type: array
|
|
1519
|
+
items: { $ref: '#/components/schemas/User' }
|
|
1520
|
+
|
|
1521
|
+
/api/handoff/admin/invite:
|
|
1522
|
+
post:
|
|
1523
|
+
tags: [Admin]
|
|
1524
|
+
summary: Invite user
|
|
1525
|
+
operationId: inviteUser
|
|
1526
|
+
security: [{sessionCookie: []}]
|
|
1527
|
+
requestBody:
|
|
1528
|
+
required: true
|
|
1529
|
+
content:
|
|
1530
|
+
application/json:
|
|
1531
|
+
schema:
|
|
1532
|
+
type: object
|
|
1533
|
+
properties:
|
|
1534
|
+
email: { type: string, format: email }
|
|
1535
|
+
role: { type: string, enum: [admin, member] }
|
|
1536
|
+
responses:
|
|
1537
|
+
'200':
|
|
1538
|
+
description: Invite result
|
|
1539
|
+
content:
|
|
1540
|
+
application/json:
|
|
1541
|
+
schema: { type: object }
|
|
1542
|
+
|
|
1543
|
+
/api/handoff/admin/role:
|
|
1544
|
+
post:
|
|
1545
|
+
tags: [Admin]
|
|
1546
|
+
summary: Update user role
|
|
1547
|
+
operationId: updateUserRole
|
|
1548
|
+
security: [{sessionCookie: []}]
|
|
1549
|
+
requestBody:
|
|
1550
|
+
required: true
|
|
1551
|
+
content:
|
|
1552
|
+
application/json:
|
|
1553
|
+
schema:
|
|
1554
|
+
type: object
|
|
1555
|
+
properties:
|
|
1556
|
+
userId: { type: string }
|
|
1557
|
+
role: { type: string, enum: [admin, member] }
|
|
1558
|
+
responses:
|
|
1559
|
+
'200':
|
|
1560
|
+
description: Updated
|
|
1561
|
+
content:
|
|
1562
|
+
application/json:
|
|
1563
|
+
schema: { type: object }
|
|
1564
|
+
|
|
1565
|
+
/api/handoff/admin/remove:
|
|
1566
|
+
post:
|
|
1567
|
+
tags: [Admin]
|
|
1568
|
+
summary: Remove user
|
|
1569
|
+
operationId: removeUser
|
|
1570
|
+
security: [{sessionCookie: []}]
|
|
1571
|
+
requestBody:
|
|
1572
|
+
required: true
|
|
1573
|
+
content:
|
|
1574
|
+
application/json:
|
|
1575
|
+
schema:
|
|
1576
|
+
type: object
|
|
1577
|
+
properties:
|
|
1578
|
+
userId: { type: string }
|
|
1579
|
+
responses:
|
|
1580
|
+
'200':
|
|
1581
|
+
description: Removed
|
|
1582
|
+
content:
|
|
1583
|
+
application/json:
|
|
1584
|
+
schema: { type: object }
|
|
1585
|
+
|
|
1586
|
+
/api/handoff/admin/build-tasks:
|
|
1587
|
+
get:
|
|
1588
|
+
tags: [Admin]
|
|
1589
|
+
summary: Get build queue
|
|
1590
|
+
description: Returns the merged component Vite build + design asset extraction job queue.
|
|
1591
|
+
operationId: getBuildTasks
|
|
1592
|
+
security: [{sessionCookie: []}]
|
|
1593
|
+
responses:
|
|
1594
|
+
'200':
|
|
1595
|
+
description: Build task list
|
|
1596
|
+
content:
|
|
1597
|
+
application/json:
|
|
1598
|
+
schema:
|
|
1599
|
+
type: object
|
|
1600
|
+
properties:
|
|
1601
|
+
tasks: { type: array, items: { type: object } }
|
|
1602
|
+
|
|
1603
|
+
/api/handoff/admin/reference-materials:
|
|
1604
|
+
get:
|
|
1605
|
+
tags: [Admin]
|
|
1606
|
+
summary: Get AI reference materials
|
|
1607
|
+
operationId: getReferencesMaterials
|
|
1608
|
+
security: [{sessionCookie: []}]
|
|
1609
|
+
parameters:
|
|
1610
|
+
- name: id
|
|
1611
|
+
in: query
|
|
1612
|
+
description: If provided, return full content for this material
|
|
1613
|
+
schema: { type: string }
|
|
1614
|
+
responses:
|
|
1615
|
+
'200':
|
|
1616
|
+
description: Reference materials
|
|
1617
|
+
content:
|
|
1618
|
+
application/json:
|
|
1619
|
+
schema: { type: object }
|
|
1620
|
+
post:
|
|
1621
|
+
tags: [Admin]
|
|
1622
|
+
summary: Regenerate reference materials
|
|
1623
|
+
operationId: regenerateReferenceMaterials
|
|
1624
|
+
security: [{sessionCookie: []}]
|
|
1625
|
+
requestBody:
|
|
1626
|
+
content:
|
|
1627
|
+
application/json:
|
|
1628
|
+
schema:
|
|
1629
|
+
type: object
|
|
1630
|
+
properties:
|
|
1631
|
+
id: { type: string }
|
|
1632
|
+
all: { type: boolean }
|
|
1633
|
+
skipLlm: { type: boolean }
|
|
1634
|
+
responses:
|
|
1635
|
+
'200':
|
|
1636
|
+
description: Accepted
|
|
1637
|
+
content:
|
|
1638
|
+
application/json:
|
|
1639
|
+
schema:
|
|
1640
|
+
type: object
|
|
1641
|
+
properties:
|
|
1642
|
+
ok: { type: boolean }
|
|
1643
|
+
scope: { type: string }
|
|
1644
|
+
|
|
1645
|
+
# =========================================================================
|
|
1646
|
+
# AI
|
|
1647
|
+
# =========================================================================
|
|
1648
|
+
|
|
1649
|
+
/api/handoff/ai/chat:
|
|
1650
|
+
post:
|
|
1651
|
+
tags: [AI]
|
|
1652
|
+
summary: Chat with the design system assistant
|
|
1653
|
+
description: >
|
|
1654
|
+
Streaming chat endpoint. Returns Server-Sent Events with the assistant's
|
|
1655
|
+
responses and tool calls (show_components, navigate_component,
|
|
1656
|
+
get_recent_changes, check_validation, etc.). Pass a `pageContext`
|
|
1657
|
+
to surface component- or pattern-specific tools.
|
|
1658
|
+
operationId: aiChat
|
|
1659
|
+
security: [{sessionCookie: []}]
|
|
1660
|
+
requestBody:
|
|
1661
|
+
required: true
|
|
1662
|
+
content:
|
|
1663
|
+
application/json:
|
|
1664
|
+
schema:
|
|
1665
|
+
type: object
|
|
1666
|
+
required: [messages]
|
|
1667
|
+
properties:
|
|
1668
|
+
messages:
|
|
1669
|
+
type: array
|
|
1670
|
+
items:
|
|
1671
|
+
type: object
|
|
1672
|
+
required: [role, content]
|
|
1673
|
+
properties:
|
|
1674
|
+
role: { type: string, enum: [system, user, assistant] }
|
|
1675
|
+
content: { type: string }
|
|
1676
|
+
pageContext:
|
|
1677
|
+
type: object
|
|
1678
|
+
properties:
|
|
1679
|
+
type: { type: string, enum: [component, pattern] }
|
|
1680
|
+
id: { type: string }
|
|
1681
|
+
responses:
|
|
1682
|
+
'200':
|
|
1683
|
+
description: SSE stream
|
|
1684
|
+
content:
|
|
1685
|
+
text/event-stream:
|
|
1686
|
+
schema: { type: string }
|
|
1687
|
+
|
|
1688
|
+
/api/handoff/ai/generate-component:
|
|
1689
|
+
post:
|
|
1690
|
+
tags: [AI]
|
|
1691
|
+
summary: Schedule component generation
|
|
1692
|
+
description: Enqueues an AI component generation job from a design artifact.
|
|
1693
|
+
operationId: generateComponent
|
|
1694
|
+
security: [{sessionCookie: []}]
|
|
1695
|
+
requestBody:
|
|
1696
|
+
content:
|
|
1697
|
+
application/json:
|
|
1698
|
+
schema:
|
|
1699
|
+
type: object
|
|
1700
|
+
properties:
|
|
1701
|
+
artifactId: { type: string }
|
|
1702
|
+
componentName: { type: string }
|
|
1703
|
+
renderer: { type: string }
|
|
1704
|
+
behaviorPrompt: { type: string }
|
|
1705
|
+
a11yStandard: { type: string }
|
|
1706
|
+
useExtractedAssets: { type: boolean }
|
|
1707
|
+
maxIterations: { type: integer }
|
|
1708
|
+
responses:
|
|
1709
|
+
'200':
|
|
1710
|
+
description: Job queued
|
|
1711
|
+
content:
|
|
1712
|
+
application/json:
|
|
1713
|
+
schema:
|
|
1714
|
+
type: object
|
|
1715
|
+
properties:
|
|
1716
|
+
jobId: { type: string }
|
|
1717
|
+
get:
|
|
1718
|
+
tags: [AI]
|
|
1719
|
+
summary: Get generation job status
|
|
1720
|
+
operationId: getGenerationJob
|
|
1721
|
+
security: [{sessionCookie: []}]
|
|
1722
|
+
parameters:
|
|
1723
|
+
- name: jobId
|
|
1724
|
+
in: query
|
|
1725
|
+
schema: { type: string }
|
|
1726
|
+
- name: artifactId
|
|
1727
|
+
in: query
|
|
1728
|
+
schema: { type: string }
|
|
1729
|
+
responses:
|
|
1730
|
+
'200':
|
|
1731
|
+
description: Job details
|
|
1732
|
+
content:
|
|
1733
|
+
application/json:
|
|
1734
|
+
schema:
|
|
1735
|
+
type: object
|
|
1736
|
+
properties:
|
|
1737
|
+
job: { type: object, nullable: true }
|
|
1738
|
+
|
|
1739
|
+
# =========================================================================
|
|
1740
|
+
# FIGMA
|
|
1741
|
+
# =========================================================================
|
|
1742
|
+
|
|
1743
|
+
/api/handoff/figma/fetch:
|
|
1744
|
+
post:
|
|
1745
|
+
tags: [Figma]
|
|
1746
|
+
summary: Enqueue Figma fetch job
|
|
1747
|
+
description: >
|
|
1748
|
+
Rate-limited to 3 requests/minute with max 2 concurrent jobs.
|
|
1749
|
+
Returns a `jobId` to poll with `GET /api/handoff/figma/fetch?jobId=...`.
|
|
1750
|
+
operationId: enqueueFigmaFetch
|
|
1751
|
+
security: [{sessionCookie: []}]
|
|
1752
|
+
responses:
|
|
1753
|
+
'200':
|
|
1754
|
+
description: Job queued
|
|
1755
|
+
content:
|
|
1756
|
+
application/json:
|
|
1757
|
+
schema:
|
|
1758
|
+
type: object
|
|
1759
|
+
properties:
|
|
1760
|
+
jobId: { type: string }
|
|
1761
|
+
status: { type: string, example: queued }
|
|
1762
|
+
get:
|
|
1763
|
+
tags: [Figma]
|
|
1764
|
+
summary: Get Figma fetch status or connection info
|
|
1765
|
+
operationId: getFigmaFetchStatus
|
|
1766
|
+
security: [{sessionCookie: []}]
|
|
1767
|
+
parameters:
|
|
1768
|
+
- name: jobId
|
|
1769
|
+
in: query
|
|
1770
|
+
description: If omitted, returns connection status
|
|
1771
|
+
schema: { type: string }
|
|
1772
|
+
responses:
|
|
1773
|
+
'200':
|
|
1774
|
+
description: Job status or connection info
|
|
1775
|
+
content:
|
|
1776
|
+
application/json:
|
|
1777
|
+
schema: { type: object }
|
|
1778
|
+
|
|
1779
|
+
/api/handoff/figma/components:
|
|
1780
|
+
get:
|
|
1781
|
+
tags: [Figma]
|
|
1782
|
+
summary: Get Figma component audit
|
|
1783
|
+
operationId: getFigmaComponentAudit
|
|
1784
|
+
security: [{sessionCookie: []}]
|
|
1785
|
+
responses:
|
|
1786
|
+
'200':
|
|
1787
|
+
description: Figma audit results
|
|
1788
|
+
content:
|
|
1789
|
+
application/json:
|
|
1790
|
+
schema: { type: object }
|
|
1791
|
+
|
|
1792
|
+
# =========================================================================
|
|
1793
|
+
# ACCOUNT
|
|
1794
|
+
# =========================================================================
|
|
1795
|
+
|
|
1796
|
+
/api/account:
|
|
1797
|
+
put:
|
|
1798
|
+
tags: [Account]
|
|
1799
|
+
summary: Update profile
|
|
1800
|
+
operationId: updateAccount
|
|
1801
|
+
security: [{sessionCookie: []}]
|
|
1802
|
+
requestBody:
|
|
1803
|
+
content:
|
|
1804
|
+
application/json:
|
|
1805
|
+
schema:
|
|
1806
|
+
type: object
|
|
1807
|
+
properties:
|
|
1808
|
+
name: { type: string }
|
|
1809
|
+
image: { type: string, format: uri }
|
|
1810
|
+
responses:
|
|
1811
|
+
'200':
|
|
1812
|
+
description: Updated
|
|
1813
|
+
content:
|
|
1814
|
+
application/json:
|
|
1815
|
+
schema:
|
|
1816
|
+
type: object
|
|
1817
|
+
properties:
|
|
1818
|
+
ok: { type: boolean }
|