@sarjallab09/figma-intelligence 1.1.0 → 1.2.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/README.md +69 -36
- package/dist/bin/cli.js +2 -0
- package/dist/design-bridge/bridge.js +2 -0
- package/dist/figma-bridge-plugin/bridge-relay.js +2 -0
- package/dist/figma-bridge-plugin/code.js +1 -0
- package/{figma-bridge-plugin → dist/figma-bridge-plugin}/package-lock.json +0 -3
- package/dist/figma-bridge-plugin/ui.html +4970 -0
- package/dist/figma-intelligence-layer/dist/index.js +2 -0
- package/dist/scripts/clean-existing-chunks.js +2 -0
- package/dist/scripts/connect-ai-tool.js +2 -0
- package/dist/scripts/convert-hub-pdfs.js +2 -0
- package/dist/scripts/figma-mcp-status.js +2 -0
- package/dist/scripts/register-codex-mcp.js +2 -0
- package/dist/scripts/test-copilot-chat.js +2 -0
- package/package.json +11 -8
- package/bin/cli.js +0 -859
- package/design-bridge/bridge.js +0 -196
- package/design-bridge/lib/assets.js +0 -367
- package/design-bridge/lib/prompt.js +0 -85
- package/design-bridge/lib/server.js +0 -66
- package/design-bridge/lib/stitch.js +0 -37
- package/design-bridge/lib/tokens.js +0 -82
- package/design-bridge/package-lock.json +0 -579
- package/figma-bridge-plugin/README.md +0 -97
- package/figma-bridge-plugin/anthropic-chat-runner.js +0 -192
- package/figma-bridge-plugin/bridge-relay.js +0 -2505
- package/figma-bridge-plugin/chat-runner.js +0 -485
- package/figma-bridge-plugin/code.js +0 -1534
- package/figma-bridge-plugin/codex-runner.js +0 -505
- package/figma-bridge-plugin/component-schemas.js +0 -110
- package/figma-bridge-plugin/content-context.js +0 -869
- package/figma-bridge-plugin/create-button.js +0 -216
- package/figma-bridge-plugin/gemini-cli-runner.js +0 -291
- package/figma-bridge-plugin/gemini-runner.js +0 -187
- package/figma-bridge-plugin/html-to-figma.js +0 -927
- package/figma-bridge-plugin/knowledge-hub/.gitkeep +0 -0
- package/figma-bridge-plugin/knowledge-hub/uspec-references/anatomy-spec.md +0 -159
- package/figma-bridge-plugin/knowledge-hub/uspec-references/api-spec.md +0 -162
- package/figma-bridge-plugin/knowledge-hub/uspec-references/color-spec.md +0 -148
- package/figma-bridge-plugin/knowledge-hub/uspec-references/full-spec-template.md +0 -314
- package/figma-bridge-plugin/knowledge-hub/uspec-references/property-spec.md +0 -175
- package/figma-bridge-plugin/knowledge-hub/uspec-references/screen-reader-spec.md +0 -180
- package/figma-bridge-plugin/knowledge-hub/uspec-references/structure-spec.md +0 -165
- package/figma-bridge-plugin/perplexity-runner.js +0 -188
- package/figma-bridge-plugin/references/SKILL.md +0 -178
- package/figma-bridge-plugin/references/anatomy-spec.md +0 -159
- package/figma-bridge-plugin/references/api-spec.md +0 -162
- package/figma-bridge-plugin/references/color-spec.md +0 -148
- package/figma-bridge-plugin/references/full-spec-template.md +0 -314
- package/figma-bridge-plugin/references/property-spec.md +0 -175
- package/figma-bridge-plugin/references/screen-reader-spec.md +0 -180
- package/figma-bridge-plugin/references/structure-spec.md +0 -165
- package/figma-bridge-plugin/shared-prompt-config.js +0 -645
- package/figma-bridge-plugin/spec-helpers/build-table.js +0 -269
- package/figma-bridge-plugin/spec-helpers/classify-elements.js +0 -189
- package/figma-bridge-plugin/spec-helpers/index.js +0 -35
- package/figma-bridge-plugin/spec-helpers/parse-figma-link.js +0 -49
- package/figma-bridge-plugin/spec-helpers/position-markers.js +0 -158
- package/figma-bridge-plugin/stitch-auth.js +0 -322
- package/figma-bridge-plugin/stitch-runner.js +0 -1427
- package/figma-bridge-plugin/token-resolver.js +0 -107
- package/figma-bridge-plugin/ui.html +0 -4542
- package/figma-intelligence-layer/.env.example +0 -39
- package/figma-intelligence-layer/docs/local-image-generation.md +0 -60
- package/figma-intelligence-layer/examples/comfyui-workflow-template.example.json +0 -101
- package/figma-intelligence-layer/jest.config.js +0 -14
- package/figma-intelligence-layer/mcp-config.json +0 -19
- package/figma-intelligence-layer/package-lock.json +0 -5892
- package/figma-intelligence-layer/scripts/setup-comfyui-local.sh +0 -67
- package/figma-intelligence-layer/scripts/start-comfyui.sh +0 -33
- package/figma-intelligence-layer/src/index.ts +0 -2233
- package/figma-intelligence-layer/src/shared/auto-layout-validator.ts +0 -404
- package/figma-intelligence-layer/src/shared/cache.ts +0 -187
- package/figma-intelligence-layer/src/shared/color-operations.ts +0 -533
- package/figma-intelligence-layer/src/shared/color-utils.ts +0 -138
- package/figma-intelligence-layer/src/shared/component-script-builder.ts +0 -413
- package/figma-intelligence-layer/src/shared/component-templates.ts +0 -2767
- package/figma-intelligence-layer/src/shared/concept-taxonomy.ts +0 -694
- package/figma-intelligence-layer/src/shared/decision-log.ts +0 -128
- package/figma-intelligence-layer/src/shared/design-system-context.ts +0 -568
- package/figma-intelligence-layer/src/shared/design-system-intelligence.ts +0 -131
- package/figma-intelligence-layer/src/shared/design-system-matcher.ts +0 -184
- package/figma-intelligence-layer/src/shared/design-system-normalizers.ts +0 -196
- package/figma-intelligence-layer/src/shared/design-system-tokens.ts +0 -295
- package/figma-intelligence-layer/src/shared/dtcg-validator.ts +0 -530
- package/figma-intelligence-layer/src/shared/enrichment-pipeline.ts +0 -671
- package/figma-intelligence-layer/src/shared/figma-bridge.ts +0 -1418
- package/figma-intelligence-layer/src/shared/font-config.ts +0 -126
- package/figma-intelligence-layer/src/shared/icon-catalog.ts +0 -360
- package/figma-intelligence-layer/src/shared/icon-fetch.ts +0 -80
- package/figma-intelligence-layer/src/shared/prototype-script-builder.ts +0 -162
- package/figma-intelligence-layer/src/shared/response-compression.ts +0 -440
- package/figma-intelligence-layer/src/shared/semantic-token-catalog.ts +0 -324
- package/figma-intelligence-layer/src/shared/token-binder.ts +0 -505
- package/figma-intelligence-layer/src/shared/token-math.ts +0 -427
- package/figma-intelligence-layer/src/shared/token-naming.ts +0 -468
- package/figma-intelligence-layer/src/shared/token-utils.ts +0 -420
- package/figma-intelligence-layer/src/shared/types.ts +0 -346
- package/figma-intelligence-layer/src/shared/typography-presets.ts +0 -94
- package/figma-intelligence-layer/src/shared/unsplash.ts +0 -165
- package/figma-intelligence-layer/src/shared/vision-client.ts +0 -607
- package/figma-intelligence-layer/src/shared/vision-provider-anthropic.ts +0 -334
- package/figma-intelligence-layer/src/shared/vision-provider-openai.ts +0 -446
- package/figma-intelligence-layer/src/tools/phase1-vision/a11y-audit/a11y-annotate-handler.ts +0 -782
- package/figma-intelligence-layer/src/tools/phase1-vision/a11y-audit/a11y-annotate-renderer.ts +0 -496
- package/figma-intelligence-layer/src/tools/phase1-vision/a11y-audit/a11y-annotation-kit.ts +0 -230
- package/figma-intelligence-layer/src/tools/phase1-vision/a11y-audit/colorblind-sim.ts +0 -66
- package/figma-intelligence-layer/src/tools/phase1-vision/a11y-audit/index.ts +0 -810
- package/figma-intelligence-layer/src/tools/phase1-vision/a11y-audit/keyboard-sr-order-analyzer.ts +0 -1191
- package/figma-intelligence-layer/src/tools/phase1-vision/a11y-audit/keyboard-sr-order-figma-page.ts +0 -1346
- package/figma-intelligence-layer/src/tools/phase1-vision/a11y-audit/keyboard-sr-order-handler.ts +0 -148
- package/figma-intelligence-layer/src/tools/phase1-vision/a11y-audit/vpat-figma-page.ts +0 -499
- package/figma-intelligence-layer/src/tools/phase1-vision/a11y-audit/vpat-report.ts +0 -910
- package/figma-intelligence-layer/src/tools/phase1-vision/a11y-audit/wcag-checker.ts +0 -989
- package/figma-intelligence-layer/src/tools/phase1-vision/a11y-audit/wcag-criteria.ts +0 -1160
- package/figma-intelligence-layer/src/tools/phase1-vision/design-from-ref/index.ts +0 -424
- package/figma-intelligence-layer/src/tools/phase1-vision/screen-cloner/component-recognizer.ts +0 -38
- package/figma-intelligence-layer/src/tools/phase1-vision/screen-cloner/ds-matcher.ts +0 -111
- package/figma-intelligence-layer/src/tools/phase1-vision/screen-cloner/font-matcher.ts +0 -114
- package/figma-intelligence-layer/src/tools/phase1-vision/screen-cloner/icon-resolver.ts +0 -103
- package/figma-intelligence-layer/src/tools/phase1-vision/screen-cloner/index.ts +0 -1060
- package/figma-intelligence-layer/src/tools/phase1-vision/screen-cloner/layout-segmenter.ts +0 -18
- package/figma-intelligence-layer/src/tools/phase1-vision/screen-cloner/token-inferencer.ts +0 -39
- package/figma-intelligence-layer/src/tools/phase1-vision/screen-cloner/vision-pipeline.ts +0 -58
- package/figma-intelligence-layer/src/tools/phase1-vision/sketch-to-design/index.ts +0 -298
- package/figma-intelligence-layer/src/tools/phase1-vision/visual-audit/index.ts +0 -197
- package/figma-intelligence-layer/src/tools/phase2-accuracy/component-audit/index.ts +0 -494
- package/figma-intelligence-layer/src/tools/phase2-accuracy/intent-translator/index.ts +0 -356
- package/figma-intelligence-layer/src/tools/phase2-accuracy/layout-intelligence/container-patterns.ts +0 -123
- package/figma-intelligence-layer/src/tools/phase2-accuracy/layout-intelligence/index.ts +0 -663
- package/figma-intelligence-layer/src/tools/phase2-accuracy/lint-rules/built-in-rules.yaml +0 -56
- package/figma-intelligence-layer/src/tools/phase2-accuracy/lint-rules/index.ts +0 -614
- package/figma-intelligence-layer/src/tools/phase2-accuracy/lint-rules/rule-engine.ts +0 -113
- package/figma-intelligence-layer/src/tools/phase2-accuracy/theme-generator/color-theory.ts +0 -178
- package/figma-intelligence-layer/src/tools/phase2-accuracy/theme-generator/index.ts +0 -470
- package/figma-intelligence-layer/src/tools/phase2-accuracy/variant-expander/index.ts +0 -429
- package/figma-intelligence-layer/src/tools/phase2-accuracy/variant-expander/token-override-maps.ts +0 -226
- package/figma-intelligence-layer/src/tools/phase3-generation/ai-image-insert/index.ts +0 -535
- package/figma-intelligence-layer/src/tools/phase3-generation/component-archaeologist/index.ts +0 -660
- package/figma-intelligence-layer/src/tools/phase3-generation/component-archaeologist/pattern-fingerprints.ts +0 -209
- package/figma-intelligence-layer/src/tools/phase3-generation/composition-builder/index.ts +0 -540
- package/figma-intelligence-layer/src/tools/phase3-generation/figma-animated-build.ts +0 -391
- package/figma-intelligence-layer/src/tools/phase3-generation/page-architect/index.ts +0 -2019
- package/figma-intelligence-layer/src/tools/phase3-generation/page-architect/screen-templates.ts +0 -131
- package/figma-intelligence-layer/src/tools/phase3-generation/prototype-map/index.ts +0 -381
- package/figma-intelligence-layer/src/tools/phase3-generation/prototype-wire/index.ts +0 -565
- package/figma-intelligence-layer/src/tools/phase3-generation/swarm-build/index.ts +0 -764
- package/figma-intelligence-layer/src/tools/phase3-generation/system-drift/index.ts +0 -535
- package/figma-intelligence-layer/src/tools/phase3-generation/unsplash-search/index.ts +0 -84
- package/figma-intelligence-layer/src/tools/phase3-generation/url-to-frame/index.ts +0 -401
- package/figma-intelligence-layer/src/tools/phase4-sync/animation-specifier/code-generators/css-animations.ts +0 -68
- package/figma-intelligence-layer/src/tools/phase4-sync/animation-specifier/code-generators/framer-motion.ts +0 -78
- package/figma-intelligence-layer/src/tools/phase4-sync/animation-specifier/code-generators/swift-animations.ts +0 -93
- package/figma-intelligence-layer/src/tools/phase4-sync/animation-specifier/index.ts +0 -596
- package/figma-intelligence-layer/src/tools/phase4-sync/ci-check/index.ts +0 -462
- package/figma-intelligence-layer/src/tools/phase4-sync/export-tokens/index.ts +0 -1470
- package/figma-intelligence-layer/src/tools/phase4-sync/generate-component-code/index.ts +0 -829
- package/figma-intelligence-layer/src/tools/phase4-sync/handoff-spec/index.ts +0 -702
- package/figma-intelligence-layer/src/tools/phase4-sync/icon-library-sync/index.ts +0 -483
- package/figma-intelligence-layer/src/tools/phase4-sync/sync-from-code/index.ts +0 -501
- package/figma-intelligence-layer/src/tools/phase4-sync/sync-from-code/storybook-parser.ts +0 -106
- package/figma-intelligence-layer/src/tools/phase4-sync/watch-docs/index.ts +0 -676
- package/figma-intelligence-layer/src/tools/phase4-sync/webhook-listener/index.ts +0 -560
- package/figma-intelligence-layer/src/tools/phase5-governance/apg-doc/index.ts +0 -1043
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/component-detection.ts +0 -620
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/extractors/anatomy.ts +0 -331
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/extractors/color-tokens.ts +0 -77
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/extractors/properties.ts +0 -54
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/extractors/snapshot.ts +0 -287
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/extractors/spacing.ts +0 -71
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/extractors/states.ts +0 -43
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/extractors/typography.ts +0 -71
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/index.ts +0 -221
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/_default.ts +0 -166
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/accordion.ts +0 -232
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/alert.ts +0 -234
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/avatar-group.ts +0 -270
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/avatar.ts +0 -249
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/badge.ts +0 -231
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/banner.ts +0 -293
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/breadcrumb.ts +0 -240
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/button.ts +0 -243
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/calendar.ts +0 -307
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/card.ts +0 -143
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/checkbox.ts +0 -227
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/chip.ts +0 -233
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/combobox.ts +0 -282
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/datepicker.ts +0 -276
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/divider.ts +0 -223
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/drawer.ts +0 -255
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/dropdown-menu.ts +0 -289
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/empty-state.ts +0 -261
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/file-uploader.ts +0 -290
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/form.ts +0 -265
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/grid.ts +0 -238
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/icon.ts +0 -255
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/index.ts +0 -128
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/inline-edit.ts +0 -286
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/inline-message.ts +0 -255
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/input.ts +0 -330
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/link.ts +0 -247
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/list.ts +0 -250
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/menu.ts +0 -247
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/modal.ts +0 -144
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/navbar.ts +0 -264
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/navigation.ts +0 -251
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/number-input.ts +0 -261
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/pagination.ts +0 -248
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/popover.ts +0 -270
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/progress.ts +0 -251
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/radio.ts +0 -142
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/range-slider.ts +0 -282
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/rating.ts +0 -250
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/search.ts +0 -258
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/segmented-control.ts +0 -265
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/select.ts +0 -319
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/skeleton.ts +0 -256
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/slider.ts +0 -232
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/spinner.ts +0 -239
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/status-dot.ts +0 -252
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/stepper.ts +0 -270
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/table.ts +0 -244
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/tabs.ts +0 -143
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/tag.ts +0 -243
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/textarea.ts +0 -259
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/time-picker.ts +0 -293
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/toast.ts +0 -144
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/toggle.ts +0 -289
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/toolbar.ts +0 -267
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/tooltip.ts +0 -232
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/treeview.ts +0 -257
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/typography.ts +0 -319
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/legacy-compat.ts +0 -121
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/renderers/anatomy-diagram.ts +0 -430
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/renderers/figma-page.ts +0 -312
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/renderers/json.ts +0 -129
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/renderers/markdown.ts +0 -78
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/renderers/visual-doc.ts +0 -2333
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/accessibility.ts +0 -100
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/anatomy.ts +0 -32
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/color-tokens.ts +0 -59
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/content-guidance.ts +0 -18
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/design-tokens.ts +0 -53
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/interaction-rules.ts +0 -19
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/overview.ts +0 -91
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/properties-api.ts +0 -71
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/qa-criteria.ts +0 -19
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/related-components.ts +0 -110
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/responsive.ts +0 -19
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/size-specs.ts +0 -67
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/spacing-structure.ts +0 -58
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/state-specs.ts +0 -79
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/states.ts +0 -50
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/type-hierarchy.ts +0 -33
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/typography.ts +0 -55
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/usage-guidelines.ts +0 -73
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/sections/variants.ts +0 -81
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/types.ts +0 -409
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec-sheet/index.ts +0 -198
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec-sheet/renderer.ts +0 -701
- package/figma-intelligence-layer/src/tools/phase5-governance/component-spec-sheet/types.ts +0 -88
- package/figma-intelligence-layer/src/tools/phase5-governance/decision-log/index.ts +0 -135
- package/figma-intelligence-layer/src/tools/phase5-governance/design-decision-log/index.ts +0 -491
- package/figma-intelligence-layer/src/tools/phase5-governance/ds-primitives/index.ts +0 -416
- package/figma-intelligence-layer/src/tools/phase5-governance/ds-scaffolder/index.ts +0 -722
- package/figma-intelligence-layer/src/tools/phase5-governance/ds-variables/index.ts +0 -449
- package/figma-intelligence-layer/src/tools/phase5-governance/health-report/index.ts +0 -393
- package/figma-intelligence-layer/src/tools/phase5-governance/taxonomy-docs/index.ts +0 -406
- package/figma-intelligence-layer/src/tools/phase5-governance/taxonomy-docs/renderers/figma-page.ts +0 -292
- package/figma-intelligence-layer/src/tools/phase5-governance/taxonomy-docs/renderers/json.ts +0 -24
- package/figma-intelligence-layer/src/tools/phase5-governance/taxonomy-docs/renderers/markdown.ts +0 -172
- package/figma-intelligence-layer/src/tools/phase5-governance/taxonomy-docs/renderers/naming-guide.ts +0 -409
- package/figma-intelligence-layer/src/tools/phase5-governance/token-analytics/index.ts +0 -594
- package/figma-intelligence-layer/src/tools/phase5-governance/token-docs/index.ts +0 -710
- package/figma-intelligence-layer/src/tools/phase5-governance/token-migrate/index.ts +0 -458
- package/figma-intelligence-layer/src/tools/phase5-governance/token-naming/index.ts +0 -134
- package/figma-intelligence-layer/tests/apg-doc.test.ts +0 -101
- package/figma-intelligence-layer/tests/design-system-context.test.ts +0 -152
- package/figma-intelligence-layer/tests/design-system-matcher.test.ts +0 -144
- package/figma-intelligence-layer/tests/figma-bridge.test.ts +0 -83
- package/figma-intelligence-layer/tests/generate-image-and-insert.test.ts +0 -56
- package/figma-intelligence-layer/tests/screen-cloner-regression.test.ts +0 -69
- package/figma-intelligence-layer/tests/smoke.test.ts +0 -174
- package/figma-intelligence-layer/tests/spec-generator.test.ts +0 -127
- package/figma-intelligence-layer/tests/token-migrate.test.ts +0 -21
- package/figma-intelligence-layer/tests/token-naming.test.ts +0 -30
- package/figma-intelligence-layer/tsconfig.json +0 -19
- package/scripts/clean-existing-chunks.js +0 -179
- package/scripts/connect-ai-tool.js +0 -490
- package/scripts/convert-hub-pdfs.js +0 -425
- package/scripts/figma-mcp-status.js +0 -349
- package/scripts/register-codex-mcp.js +0 -96
- /package/{design-bridge → dist/design-bridge}/.env.example +0 -0
- /package/{design-bridge → dist/design-bridge}/package.json +0 -0
- /package/{figma-bridge-plugin → dist/figma-bridge-plugin}/manifest.json +0 -0
- /package/{figma-bridge-plugin → dist/figma-bridge-plugin}/package.json +0 -0
- /package/{figma-intelligence-layer → dist/figma-intelligence-layer}/package.json +0 -0
|
@@ -1,324 +0,0 @@
|
|
|
1
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
2
|
-
// Semantic Token Catalog
|
|
3
|
-
// Pure data module defining semantic tokens organized by category.
|
|
4
|
-
// Each token maps to light/dark primitive references for automatic alias
|
|
5
|
-
// creation by ds-scaffolder, ds-variables, and token-binder.
|
|
6
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
7
|
-
|
|
8
|
-
export interface SemanticTokenEntry {
|
|
9
|
-
name: string;
|
|
10
|
-
category: string;
|
|
11
|
-
type: "COLOR" | "FLOAT" | "STRING";
|
|
12
|
-
description: string;
|
|
13
|
-
/** Primitive token name for light mode */
|
|
14
|
-
lightRef: string;
|
|
15
|
-
/** Primitive token name for dark mode */
|
|
16
|
-
darkRef: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// ─── Color semantic tokens ──────────────────────────────────────────────────
|
|
20
|
-
|
|
21
|
-
const ACTIONS: SemanticTokenEntry[] = [
|
|
22
|
-
{ name: "color/semantic/actions/primary/bg/default", category: "actions", type: "COLOR", description: "Primary action background", lightRef: "color/primitive/brand/500", darkRef: "color/primitive/brand/400" },
|
|
23
|
-
{ name: "color/semantic/actions/primary/bg/hover", category: "actions", type: "COLOR", description: "Primary action hover background", lightRef: "color/primitive/brand/600", darkRef: "color/primitive/brand/300" },
|
|
24
|
-
{ name: "color/semantic/actions/primary/bg/pressed", category: "actions", type: "COLOR", description: "Primary action pressed background", lightRef: "color/primitive/brand/700", darkRef: "color/primitive/brand/200" },
|
|
25
|
-
{ name: "color/semantic/actions/primary/bg/disabled", category: "actions", type: "COLOR", description: "Primary action disabled background", lightRef: "color/primitive/brand/200", darkRef: "color/primitive/brand/800" },
|
|
26
|
-
{ name: "color/semantic/actions/primary/text/default", category: "actions", type: "COLOR", description: "Text on primary action", lightRef: "color/primitive/neutral/50", darkRef: "color/primitive/neutral/950" },
|
|
27
|
-
{ name: "color/semantic/actions/secondary/bg/default", category: "actions", type: "COLOR", description: "Secondary action background", lightRef: "color/primitive/neutral/100", darkRef: "color/primitive/neutral/800" },
|
|
28
|
-
{ name: "color/semantic/actions/secondary/bg/hover", category: "actions", type: "COLOR", description: "Secondary action hover background", lightRef: "color/primitive/neutral/200", darkRef: "color/primitive/neutral/700" },
|
|
29
|
-
{ name: "color/semantic/actions/secondary/bg/pressed", category: "actions", type: "COLOR", description: "Secondary action pressed background", lightRef: "color/primitive/neutral/300", darkRef: "color/primitive/neutral/600" },
|
|
30
|
-
{ name: "color/semantic/actions/secondary/bg/disabled", category: "actions", type: "COLOR", description: "Secondary action disabled background", lightRef: "color/primitive/neutral/100", darkRef: "color/primitive/neutral/800" },
|
|
31
|
-
{ name: "color/semantic/actions/secondary/border/default", category: "actions", type: "COLOR", description: "Secondary action border", lightRef: "color/primitive/neutral/300", darkRef: "color/primitive/neutral/600" },
|
|
32
|
-
{ name: "color/semantic/actions/destructive/bg/default", category: "actions", type: "COLOR", description: "Destructive action background", lightRef: "color/primitive/danger/500", darkRef: "color/primitive/danger/400" },
|
|
33
|
-
{ name: "color/semantic/actions/destructive/bg/hover", category: "actions", type: "COLOR", description: "Destructive action hover background", lightRef: "color/primitive/danger/600", darkRef: "color/primitive/danger/300" },
|
|
34
|
-
];
|
|
35
|
-
|
|
36
|
-
const SURFACE: SemanticTokenEntry[] = [
|
|
37
|
-
{ name: "color/semantic/surface/default", category: "surface", type: "COLOR", description: "Default surface background", lightRef: "color/primitive/neutral/50", darkRef: "color/primitive/neutral/950" },
|
|
38
|
-
{ name: "color/semantic/surface/subtle", category: "surface", type: "COLOR", description: "Subtle surface background", lightRef: "color/primitive/neutral/100", darkRef: "color/primitive/neutral/900" },
|
|
39
|
-
{ name: "color/semantic/surface/raised", category: "surface", type: "COLOR", description: "Raised/card surface", lightRef: "color/primitive/neutral/50", darkRef: "color/primitive/neutral/900" },
|
|
40
|
-
{ name: "color/semantic/surface/overlay", category: "surface", type: "COLOR", description: "Overlay/modal surface", lightRef: "color/primitive/neutral/50", darkRef: "color/primitive/neutral/800" },
|
|
41
|
-
{ name: "color/semantic/surface/inverse", category: "surface", type: "COLOR", description: "Inverse surface (dark on light)", lightRef: "color/primitive/neutral/900", darkRef: "color/primitive/neutral/50" },
|
|
42
|
-
{ name: "color/semantic/surface/disabled", category: "surface", type: "COLOR", description: "Disabled surface background", lightRef: "color/primitive/neutral/100", darkRef: "color/primitive/neutral/800" },
|
|
43
|
-
];
|
|
44
|
-
|
|
45
|
-
const TEXT: SemanticTokenEntry[] = [
|
|
46
|
-
{ name: "color/semantic/text/primary", category: "text", type: "COLOR", description: "Primary text color", lightRef: "color/primitive/neutral/900", darkRef: "color/primitive/neutral/50" },
|
|
47
|
-
{ name: "color/semantic/text/secondary", category: "text", type: "COLOR", description: "Secondary text color", lightRef: "color/primitive/neutral/600", darkRef: "color/primitive/neutral/300" },
|
|
48
|
-
{ name: "color/semantic/text/tertiary", category: "text", type: "COLOR", description: "Tertiary/muted text color", lightRef: "color/primitive/neutral/500", darkRef: "color/primitive/neutral/400" },
|
|
49
|
-
{ name: "color/semantic/text/disabled", category: "text", type: "COLOR", description: "Disabled text color", lightRef: "color/primitive/neutral/400", darkRef: "color/primitive/neutral/600" },
|
|
50
|
-
{ name: "color/semantic/text/inverse", category: "text", type: "COLOR", description: "Inverse text (light on dark)", lightRef: "color/primitive/neutral/50", darkRef: "color/primitive/neutral/900" },
|
|
51
|
-
{ name: "color/semantic/text/on-color", category: "text", type: "COLOR", description: "Text on colored background", lightRef: "color/primitive/neutral/50", darkRef: "color/primitive/neutral/50" },
|
|
52
|
-
];
|
|
53
|
-
|
|
54
|
-
const BORDER: SemanticTokenEntry[] = [
|
|
55
|
-
{ name: "color/semantic/border/default", category: "border", type: "COLOR", description: "Default border color", lightRef: "color/primitive/neutral/200", darkRef: "color/primitive/neutral/700" },
|
|
56
|
-
{ name: "color/semantic/border/strong", category: "border", type: "COLOR", description: "Strong/emphasis border", lightRef: "color/primitive/neutral/400", darkRef: "color/primitive/neutral/500" },
|
|
57
|
-
{ name: "color/semantic/border/subtle", category: "border", type: "COLOR", description: "Subtle border", lightRef: "color/primitive/neutral/100", darkRef: "color/primitive/neutral/800" },
|
|
58
|
-
{ name: "color/semantic/border/disabled", category: "border", type: "COLOR", description: "Disabled border", lightRef: "color/primitive/neutral/200", darkRef: "color/primitive/neutral/800" },
|
|
59
|
-
{ name: "color/semantic/border/focus", category: "border", type: "COLOR", description: "Focus ring border", lightRef: "color/primitive/brand/500", darkRef: "color/primitive/brand/400" },
|
|
60
|
-
];
|
|
61
|
-
|
|
62
|
-
const FIELD: SemanticTokenEntry[] = [
|
|
63
|
-
{ name: "color/semantic/field/bg/default", category: "field", type: "COLOR", description: "Field background default", lightRef: "color/primitive/neutral/50", darkRef: "color/primitive/neutral/900" },
|
|
64
|
-
{ name: "color/semantic/field/bg/disabled", category: "field", type: "COLOR", description: "Field background disabled", lightRef: "color/primitive/neutral/100", darkRef: "color/primitive/neutral/800" },
|
|
65
|
-
{ name: "color/semantic/field/border/default", category: "field", type: "COLOR", description: "Field border default", lightRef: "color/primitive/neutral/300", darkRef: "color/primitive/neutral/600" },
|
|
66
|
-
{ name: "color/semantic/field/border/focus", category: "field", type: "COLOR", description: "Field border focus", lightRef: "color/primitive/brand/500", darkRef: "color/primitive/brand/400" },
|
|
67
|
-
];
|
|
68
|
-
|
|
69
|
-
const FEEDBACK: SemanticTokenEntry[] = [
|
|
70
|
-
{ name: "color/semantic/feedback/success/bg", category: "feedback", type: "COLOR", description: "Success background", lightRef: "color/primitive/success/100", darkRef: "color/primitive/success/900" },
|
|
71
|
-
{ name: "color/semantic/feedback/success/text", category: "feedback", type: "COLOR", description: "Success text", lightRef: "color/primitive/success/700", darkRef: "color/primitive/success/300" },
|
|
72
|
-
{ name: "color/semantic/feedback/warning/bg", category: "feedback", type: "COLOR", description: "Warning background", lightRef: "color/primitive/warning/100", darkRef: "color/primitive/warning/900" },
|
|
73
|
-
{ name: "color/semantic/feedback/warning/text", category: "feedback", type: "COLOR", description: "Warning text", lightRef: "color/primitive/warning/700", darkRef: "color/primitive/warning/300" },
|
|
74
|
-
{ name: "color/semantic/feedback/danger/bg", category: "feedback", type: "COLOR", description: "Danger background", lightRef: "color/primitive/danger/100", darkRef: "color/primitive/danger/900" },
|
|
75
|
-
{ name: "color/semantic/feedback/danger/text", category: "feedback", type: "COLOR", description: "Danger text", lightRef: "color/primitive/danger/700", darkRef: "color/primitive/danger/300" },
|
|
76
|
-
{ name: "color/semantic/feedback/info/bg", category: "feedback", type: "COLOR", description: "Info background", lightRef: "color/primitive/info/100", darkRef: "color/primitive/info/900" },
|
|
77
|
-
{ name: "color/semantic/feedback/info/text", category: "feedback", type: "COLOR", description: "Info text", lightRef: "color/primitive/info/700", darkRef: "color/primitive/info/300" },
|
|
78
|
-
];
|
|
79
|
-
|
|
80
|
-
const FOCUS: SemanticTokenEntry[] = [
|
|
81
|
-
{ name: "color/semantic/focus/ring", category: "focus", type: "COLOR", description: "Focus ring color", lightRef: "color/primitive/brand/500", darkRef: "color/primitive/brand/400" },
|
|
82
|
-
];
|
|
83
|
-
|
|
84
|
-
const INTERACTIVE: SemanticTokenEntry[] = [
|
|
85
|
-
{ name: "color/semantic/interactive/hover-overlay", category: "interactive", type: "COLOR", description: "Hover overlay tint", lightRef: "color/primitive/neutral/100", darkRef: "color/primitive/neutral/800" },
|
|
86
|
-
{ name: "color/semantic/interactive/pressed-overlay", category: "interactive", type: "COLOR", description: "Pressed overlay tint", lightRef: "color/primitive/neutral/200", darkRef: "color/primitive/neutral/700" },
|
|
87
|
-
{ name: "color/semantic/interactive/selected-bg", category: "interactive", type: "COLOR", description: "Selected item background", lightRef: "color/primitive/brand/50", darkRef: "color/primitive/brand/900" },
|
|
88
|
-
{ name: "color/semantic/interactive/selected-text", category: "interactive", type: "COLOR", description: "Selected item text", lightRef: "color/primitive/brand/700", darkRef: "color/primitive/brand/200" },
|
|
89
|
-
];
|
|
90
|
-
|
|
91
|
-
// ─── Float semantic tokens ──────────────────────────────────────────────────
|
|
92
|
-
|
|
93
|
-
const SPACING_SEMANTIC: SemanticTokenEntry[] = [
|
|
94
|
-
{ name: "space/semantic/inset/control/sm", category: "spacing", type: "FLOAT", description: "Control inset padding small", lightRef: "space/1", darkRef: "space/1" },
|
|
95
|
-
{ name: "space/semantic/inset/control/md", category: "spacing", type: "FLOAT", description: "Control inset padding medium", lightRef: "space/4", darkRef: "space/4" },
|
|
96
|
-
{ name: "space/semantic/inset/control/lg", category: "spacing", type: "FLOAT", description: "Control inset padding large", lightRef: "space/6", darkRef: "space/6" },
|
|
97
|
-
{ name: "space/semantic/inset/page", category: "spacing", type: "FLOAT", description: "Page-level inset padding", lightRef: "space/6", darkRef: "space/6" },
|
|
98
|
-
{ name: "space/semantic/inset/page/compact", category: "spacing", type: "FLOAT", description: "Compact page inset padding", lightRef: "space/4", darkRef: "space/4" },
|
|
99
|
-
{ name: "space/semantic/gap/stack/sm", category: "spacing", type: "FLOAT", description: "Vertical stack gap small", lightRef: "space/2", darkRef: "space/2" },
|
|
100
|
-
{ name: "space/semantic/gap/stack/md", category: "spacing", type: "FLOAT", description: "Vertical stack gap medium", lightRef: "space/4", darkRef: "space/4" },
|
|
101
|
-
{ name: "space/semantic/gap/stack/lg", category: "spacing", type: "FLOAT", description: "Vertical stack gap large", lightRef: "space/8", darkRef: "space/8" },
|
|
102
|
-
{ name: "space/semantic/gap/inline/sm", category: "spacing", type: "FLOAT", description: "Horizontal inline gap small", lightRef: "space/1", darkRef: "space/1" },
|
|
103
|
-
{ name: "space/semantic/gap/inline/md", category: "spacing", type: "FLOAT", description: "Horizontal inline gap medium", lightRef: "space/3", darkRef: "space/3" },
|
|
104
|
-
{ name: "space/semantic/gap/inline/lg", category: "spacing", type: "FLOAT", description: "Horizontal inline gap large", lightRef: "space/6", darkRef: "space/6" },
|
|
105
|
-
{ name: "space/semantic/gap/section", category: "spacing", type: "FLOAT", description: "Section-level vertical gap", lightRef: "space/12", darkRef: "space/12" },
|
|
106
|
-
];
|
|
107
|
-
|
|
108
|
-
const RADIUS_SEMANTIC: SemanticTokenEntry[] = [
|
|
109
|
-
{ name: "radius/semantic/field/default", category: "radius", type: "FLOAT", description: "Field border radius", lightRef: "radius/sm", darkRef: "radius/sm" },
|
|
110
|
-
{ name: "radius/semantic/surface/default", category: "radius", type: "FLOAT", description: "Surface border radius", lightRef: "radius/lg", darkRef: "radius/lg" },
|
|
111
|
-
{ name: "radius/semantic/pill", category: "radius", type: "FLOAT", description: "Pill / full radius", lightRef: "radius/full", darkRef: "radius/full" },
|
|
112
|
-
{ name: "radius/semantic/control/default", category: "radius", type: "FLOAT", description: "Control border radius", lightRef: "radius/md", darkRef: "radius/md" },
|
|
113
|
-
];
|
|
114
|
-
|
|
115
|
-
// ─── Elevation / Shadow tokens ──────────────────────────────────────────────
|
|
116
|
-
|
|
117
|
-
const ELEVATION: SemanticTokenEntry[] = [
|
|
118
|
-
{ name: "elevation/semantic/shadow/xs", category: "elevation", type: "STRING", description: "Extra-small shadow for subtle depth", lightRef: "0 1px 2px rgba(0,0,0,0.05)", darkRef: "0 1px 2px rgba(0,0,0,0.20)" },
|
|
119
|
-
{ name: "elevation/semantic/shadow/sm", category: "elevation", type: "STRING", description: "Small shadow for cards and raised elements", lightRef: "0 2px 8px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04)", darkRef: "0 2px 8px rgba(0,0,0,0.24), 0 1px 2px rgba(0,0,0,0.16)" },
|
|
120
|
-
{ name: "elevation/semantic/shadow/md", category: "elevation", type: "STRING", description: "Medium shadow for dropdowns and popovers", lightRef: "0 4px 16px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04)", darkRef: "0 4px 16px rgba(0,0,0,0.32), 0 2px 4px rgba(0,0,0,0.16)" },
|
|
121
|
-
{ name: "elevation/semantic/shadow/lg", category: "elevation", type: "STRING", description: "Large shadow for modals and dialogs", lightRef: "0 8px 32px rgba(0,0,0,0.10), 0 4px 8px rgba(0,0,0,0.04)", darkRef: "0 8px 32px rgba(0,0,0,0.40), 0 4px 8px rgba(0,0,0,0.16)" },
|
|
122
|
-
{ name: "elevation/semantic/shadow/xl", category: "elevation", type: "STRING", description: "Extra-large shadow for notifications", lightRef: "0 24px 64px rgba(0,0,0,0.14)", darkRef: "0 24px 64px rgba(0,0,0,0.56)" },
|
|
123
|
-
];
|
|
124
|
-
|
|
125
|
-
// ─── Motion / Animation tokens ──────────────────────────────────────────────
|
|
126
|
-
|
|
127
|
-
const MOTION: SemanticTokenEntry[] = [
|
|
128
|
-
// Durations
|
|
129
|
-
{ name: "motion/duration/instant", category: "motion", type: "FLOAT", description: "Instant feedback (0ms)", lightRef: "0", darkRef: "0" },
|
|
130
|
-
{ name: "motion/duration/fast", category: "motion", type: "FLOAT", description: "Micro-interactions (100ms)", lightRef: "100", darkRef: "100" },
|
|
131
|
-
{ name: "motion/duration/normal", category: "motion", type: "FLOAT", description: "Standard transitions (200ms)", lightRef: "200", darkRef: "200" },
|
|
132
|
-
{ name: "motion/duration/slow", category: "motion", type: "FLOAT", description: "Emphasis transitions (300ms)", lightRef: "300", darkRef: "300" },
|
|
133
|
-
{ name: "motion/duration/slower", category: "motion", type: "FLOAT", description: "Complex animations (500ms)", lightRef: "500", darkRef: "500" },
|
|
134
|
-
// Easing curves
|
|
135
|
-
{ name: "motion/easing/productive", category: "motion", type: "STRING", description: "Productive motion curve", lightRef: "cubic-bezier(0.2, 0, 0.38, 0.9)", darkRef: "cubic-bezier(0.2, 0, 0.38, 0.9)" },
|
|
136
|
-
{ name: "motion/easing/expressive", category: "motion", type: "STRING", description: "Expressive motion curve", lightRef: "cubic-bezier(0.4, 0.14, 0.3, 1)", darkRef: "cubic-bezier(0.4, 0.14, 0.3, 1)" },
|
|
137
|
-
{ name: "motion/easing/enter", category: "motion", type: "STRING", description: "Enter/appear easing", lightRef: "cubic-bezier(0, 0, 0.3, 1)", darkRef: "cubic-bezier(0, 0, 0.3, 1)" },
|
|
138
|
-
{ name: "motion/easing/exit", category: "motion", type: "STRING", description: "Exit/disappear easing", lightRef: "cubic-bezier(0.4, 0, 1, 1)", darkRef: "cubic-bezier(0.4, 0, 1, 1)" },
|
|
139
|
-
{ name: "motion/easing/linear", category: "motion", type: "STRING", description: "Linear motion (no easing)", lightRef: "cubic-bezier(0, 0, 1, 1)", darkRef: "cubic-bezier(0, 0, 1, 1)" },
|
|
140
|
-
];
|
|
141
|
-
|
|
142
|
-
// ─── Z-index tokens ─────────────────────────────────────────────────────────
|
|
143
|
-
|
|
144
|
-
const Z_INDEX: SemanticTokenEntry[] = [
|
|
145
|
-
{ name: "z-index/semantic/base", category: "z-index", type: "FLOAT", description: "Base stacking level", lightRef: "0", darkRef: "0" },
|
|
146
|
-
{ name: "z-index/semantic/dropdown", category: "z-index", type: "FLOAT", description: "Dropdown menu layer", lightRef: "1000", darkRef: "1000" },
|
|
147
|
-
{ name: "z-index/semantic/sticky", category: "z-index", type: "FLOAT", description: "Sticky header layer", lightRef: "1100", darkRef: "1100" },
|
|
148
|
-
{ name: "z-index/semantic/modal", category: "z-index", type: "FLOAT", description: "Modal/dialog layer", lightRef: "1300", darkRef: "1300" },
|
|
149
|
-
{ name: "z-index/semantic/popover", category: "z-index", type: "FLOAT", description: "Popover layer", lightRef: "1400", darkRef: "1400" },
|
|
150
|
-
{ name: "z-index/semantic/toast", category: "z-index", type: "FLOAT", description: "Toast notification layer", lightRef: "1500", darkRef: "1500" },
|
|
151
|
-
{ name: "z-index/semantic/tooltip", category: "z-index", type: "FLOAT", description: "Tooltip layer", lightRef: "1600", darkRef: "1600" },
|
|
152
|
-
];
|
|
153
|
-
|
|
154
|
-
// ─── Opacity tokens ─────────────────────────────────────────────────────────
|
|
155
|
-
|
|
156
|
-
const OPACITY: SemanticTokenEntry[] = [
|
|
157
|
-
{ name: "opacity/semantic/disabled", category: "opacity", type: "FLOAT", description: "Disabled element opacity", lightRef: "0.4", darkRef: "0.4" },
|
|
158
|
-
{ name: "opacity/semantic/hover-overlay", category: "opacity", type: "FLOAT", description: "Hover overlay opacity", lightRef: "0.08", darkRef: "0.08" },
|
|
159
|
-
{ name: "opacity/semantic/backdrop", category: "opacity", type: "FLOAT", description: "Modal backdrop opacity", lightRef: "0.5", darkRef: "0.5" },
|
|
160
|
-
{ name: "opacity/semantic/loading", category: "opacity", type: "FLOAT", description: "Loading state opacity", lightRef: "0.6", darkRef: "0.6" },
|
|
161
|
-
];
|
|
162
|
-
|
|
163
|
-
// ─── Border-width tokens ────────────────────────────────────────────────────
|
|
164
|
-
|
|
165
|
-
const BORDER_WIDTH: SemanticTokenEntry[] = [
|
|
166
|
-
{ name: "border-width/semantic/thin", category: "border-width", type: "FLOAT", description: "Thin border (1px)", lightRef: "1", darkRef: "1" },
|
|
167
|
-
{ name: "border-width/semantic/medium", category: "border-width", type: "FLOAT", description: "Medium border (2px)", lightRef: "2", darkRef: "2" },
|
|
168
|
-
{ name: "border-width/semantic/thick", category: "border-width", type: "FLOAT", description: "Thick border (3px)", lightRef: "3", darkRef: "3" },
|
|
169
|
-
];
|
|
170
|
-
|
|
171
|
-
// ─── Typography detail tokens ───────────────────────────────────────────────
|
|
172
|
-
|
|
173
|
-
const TYPOGRAPHY: SemanticTokenEntry[] = [
|
|
174
|
-
// Font weights
|
|
175
|
-
{ name: "typography/font-weight/regular", category: "typography", type: "FLOAT", description: "Regular weight (400)", lightRef: "400", darkRef: "400" },
|
|
176
|
-
{ name: "typography/font-weight/medium", category: "typography", type: "FLOAT", description: "Medium weight (500)", lightRef: "500", darkRef: "500" },
|
|
177
|
-
{ name: "typography/font-weight/semibold", category: "typography", type: "FLOAT", description: "Semibold weight (600)", lightRef: "600", darkRef: "600" },
|
|
178
|
-
{ name: "typography/font-weight/bold", category: "typography", type: "FLOAT", description: "Bold weight (700)", lightRef: "700", darkRef: "700" },
|
|
179
|
-
// Line heights
|
|
180
|
-
{ name: "typography/line-height/tight", category: "typography", type: "FLOAT", description: "Tight line height (1.1)", lightRef: "1.1", darkRef: "1.1" },
|
|
181
|
-
{ name: "typography/line-height/snug", category: "typography", type: "FLOAT", description: "Snug line height (1.3)", lightRef: "1.3", darkRef: "1.3" },
|
|
182
|
-
{ name: "typography/line-height/normal", category: "typography", type: "FLOAT", description: "Normal line height (1.5)", lightRef: "1.5", darkRef: "1.5" },
|
|
183
|
-
{ name: "typography/line-height/relaxed", category: "typography", type: "FLOAT", description: "Relaxed line height (1.6)", lightRef: "1.6", darkRef: "1.6" },
|
|
184
|
-
// Letter spacing
|
|
185
|
-
{ name: "typography/letter-spacing/tight", category: "typography", type: "FLOAT", description: "Tight letter spacing (-0.03em)", lightRef: "-0.03", darkRef: "-0.03" },
|
|
186
|
-
{ name: "typography/letter-spacing/normal", category: "typography", type: "FLOAT", description: "Normal letter spacing (0)", lightRef: "0", darkRef: "0" },
|
|
187
|
-
{ name: "typography/letter-spacing/wide", category: "typography", type: "FLOAT", description: "Wide letter spacing (0.05em)", lightRef: "0.05", darkRef: "0.05" },
|
|
188
|
-
{ name: "typography/letter-spacing/widest", category: "typography", type: "FLOAT", description: "Widest letter spacing (0.1em)", lightRef: "0.1", darkRef: "0.1" },
|
|
189
|
-
];
|
|
190
|
-
|
|
191
|
-
// ─── Icon size tokens ───────────────────────────────────────────────────────
|
|
192
|
-
|
|
193
|
-
const ICON_SIZE: SemanticTokenEntry[] = [
|
|
194
|
-
{ name: "icon-size/semantic/xs", category: "icon-size", type: "FLOAT", description: "Extra-small icon (16px)", lightRef: "16", darkRef: "16" },
|
|
195
|
-
{ name: "icon-size/semantic/sm", category: "icon-size", type: "FLOAT", description: "Small icon (20px)", lightRef: "20", darkRef: "20" },
|
|
196
|
-
{ name: "icon-size/semantic/md", category: "icon-size", type: "FLOAT", description: "Medium icon (24px)", lightRef: "24", darkRef: "24" },
|
|
197
|
-
{ name: "icon-size/semantic/lg", category: "icon-size", type: "FLOAT", description: "Large icon (32px)", lightRef: "32", darkRef: "32" },
|
|
198
|
-
{ name: "icon-size/semantic/xl", category: "icon-size", type: "FLOAT", description: "Extra-large icon (40px)", lightRef: "40", darkRef: "40" },
|
|
199
|
-
];
|
|
200
|
-
|
|
201
|
-
// ─── Icon color tokens ─────────────────────────────────────────────────────
|
|
202
|
-
|
|
203
|
-
const ICON_COLOR: SemanticTokenEntry[] = [
|
|
204
|
-
{ name: "color/semantic/icon/default", category: "icon", type: "COLOR", description: "Default icon color (inherits text)", lightRef: "color/primitive/neutral/900", darkRef: "color/primitive/neutral/50" },
|
|
205
|
-
{ name: "color/semantic/icon/primary", category: "icon", type: "COLOR", description: "Brand primary icon color", lightRef: "color/primitive/brand/500", darkRef: "color/primitive/brand/400" },
|
|
206
|
-
{ name: "color/semantic/icon/secondary", category: "icon", type: "COLOR", description: "Muted/supporting icon color", lightRef: "color/primitive/neutral/500", darkRef: "color/primitive/neutral/400" },
|
|
207
|
-
{ name: "color/semantic/icon/disabled", category: "icon", type: "COLOR", description: "Disabled icon color", lightRef: "color/primitive/neutral/300", darkRef: "color/primitive/neutral/600" },
|
|
208
|
-
{ name: "color/semantic/icon/inverse", category: "icon", type: "COLOR", description: "Icon on dark/inverse backgrounds", lightRef: "color/primitive/neutral/50", darkRef: "color/primitive/neutral/900" },
|
|
209
|
-
{ name: "color/semantic/icon/error", category: "icon", type: "COLOR", description: "Error/destructive icon color", lightRef: "color/primitive/danger/500", darkRef: "color/primitive/danger/400" },
|
|
210
|
-
{ name: "color/semantic/icon/success", category: "icon", type: "COLOR", description: "Success/positive icon color", lightRef: "color/primitive/success/500", darkRef: "color/primitive/success/400" },
|
|
211
|
-
];
|
|
212
|
-
|
|
213
|
-
// ─── Breakpoint tokens ──────────────────────────────────────────────────────
|
|
214
|
-
|
|
215
|
-
const BREAKPOINT: SemanticTokenEntry[] = [
|
|
216
|
-
{ name: "breakpoint/mobile", category: "breakpoint", type: "FLOAT", description: "Mobile breakpoint (480px)", lightRef: "480", darkRef: "480" },
|
|
217
|
-
{ name: "breakpoint/tablet", category: "breakpoint", type: "FLOAT", description: "Tablet breakpoint (768px)", lightRef: "768", darkRef: "768" },
|
|
218
|
-
{ name: "breakpoint/desktop", category: "breakpoint", type: "FLOAT", description: "Desktop breakpoint (1024px)", lightRef: "1024", darkRef: "1024" },
|
|
219
|
-
{ name: "breakpoint/wide", category: "breakpoint", type: "FLOAT", description: "Wide breakpoint (1440px)", lightRef: "1440", darkRef: "1440" },
|
|
220
|
-
];
|
|
221
|
-
|
|
222
|
-
// ─── Grid / Layout tokens ───────────────────────────────────────────────────
|
|
223
|
-
|
|
224
|
-
const GRID: SemanticTokenEntry[] = [
|
|
225
|
-
{ name: "grid/columns/mobile", category: "grid", type: "FLOAT", description: "Grid columns on mobile (4)", lightRef: "4", darkRef: "4" },
|
|
226
|
-
{ name: "grid/columns/tablet", category: "grid", type: "FLOAT", description: "Grid columns on tablet (8)", lightRef: "8", darkRef: "8" },
|
|
227
|
-
{ name: "grid/columns/desktop", category: "grid", type: "FLOAT", description: "Grid columns on desktop (12)", lightRef: "12", darkRef: "12" },
|
|
228
|
-
{ name: "grid/gutter/mobile", category: "grid", type: "FLOAT", description: "Grid gutter on mobile (16px)", lightRef: "16", darkRef: "16" },
|
|
229
|
-
{ name: "grid/gutter/tablet", category: "grid", type: "FLOAT", description: "Grid gutter on tablet (24px)", lightRef: "24", darkRef: "24" },
|
|
230
|
-
{ name: "grid/gutter/desktop", category: "grid", type: "FLOAT", description: "Grid gutter on desktop (32px)", lightRef: "32", darkRef: "32" },
|
|
231
|
-
{ name: "grid/margin/mobile", category: "grid", type: "FLOAT", description: "Grid margin on mobile (16px)", lightRef: "16", darkRef: "16" },
|
|
232
|
-
{ name: "grid/margin/tablet", category: "grid", type: "FLOAT", description: "Grid margin on tablet (32px)", lightRef: "32", darkRef: "32" },
|
|
233
|
-
{ name: "grid/margin/desktop", category: "grid", type: "FLOAT", description: "Grid margin on desktop (64px)", lightRef: "64", darkRef: "64" },
|
|
234
|
-
];
|
|
235
|
-
|
|
236
|
-
// ─── Density tokens ─────────────────────────────────────────────────────────
|
|
237
|
-
|
|
238
|
-
const DENSITY: SemanticTokenEntry[] = [
|
|
239
|
-
{ name: "density/compact", category: "density", type: "FLOAT", description: "Compact control height (32px)", lightRef: "32", darkRef: "32" },
|
|
240
|
-
{ name: "density/normal", category: "density", type: "FLOAT", description: "Normal control height (40px)", lightRef: "40", darkRef: "40" },
|
|
241
|
-
{ name: "density/spacious", category: "density", type: "FLOAT", description: "Spacious control height (48px)", lightRef: "48", darkRef: "48" },
|
|
242
|
-
];
|
|
243
|
-
|
|
244
|
-
// ─── Aggregate catalog ──────────────────────────────────────────────────────
|
|
245
|
-
|
|
246
|
-
export const SEMANTIC_TOKEN_CATALOG: SemanticTokenEntry[] = [
|
|
247
|
-
...ACTIONS,
|
|
248
|
-
...SURFACE,
|
|
249
|
-
...TEXT,
|
|
250
|
-
...BORDER,
|
|
251
|
-
...FIELD,
|
|
252
|
-
...FEEDBACK,
|
|
253
|
-
...FOCUS,
|
|
254
|
-
...INTERACTIVE,
|
|
255
|
-
...SPACING_SEMANTIC,
|
|
256
|
-
...RADIUS_SEMANTIC,
|
|
257
|
-
...ELEVATION,
|
|
258
|
-
...MOTION,
|
|
259
|
-
...Z_INDEX,
|
|
260
|
-
...OPACITY,
|
|
261
|
-
...BORDER_WIDTH,
|
|
262
|
-
...TYPOGRAPHY,
|
|
263
|
-
...ICON_SIZE,
|
|
264
|
-
...ICON_COLOR,
|
|
265
|
-
...BREAKPOINT,
|
|
266
|
-
...GRID,
|
|
267
|
-
...DENSITY,
|
|
268
|
-
];
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* Filter catalog entries by category.
|
|
272
|
-
*/
|
|
273
|
-
export function getTokensByCategory(category: string): SemanticTokenEntry[] {
|
|
274
|
-
return SEMANTIC_TOKEN_CATALOG.filter((t) => t.category === category);
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
/**
|
|
278
|
-
* Get all unique categories in the catalog.
|
|
279
|
-
*/
|
|
280
|
-
export function getCategories(): string[] {
|
|
281
|
-
return [...new Set(SEMANTIC_TOKEN_CATALOG.map((t) => t.category))];
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
/**
|
|
285
|
-
* Get only COLOR-type semantic tokens.
|
|
286
|
-
*/
|
|
287
|
-
export function getColorSemanticTokens(): SemanticTokenEntry[] {
|
|
288
|
-
return SEMANTIC_TOKEN_CATALOG.filter((t) => t.type === "COLOR");
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
/**
|
|
292
|
-
* Get only FLOAT-type semantic tokens (spacing, radius, z-index, etc.).
|
|
293
|
-
*/
|
|
294
|
-
export function getFloatSemanticTokens(): SemanticTokenEntry[] {
|
|
295
|
-
return SEMANTIC_TOKEN_CATALOG.filter((t) => t.type === "FLOAT");
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
/**
|
|
299
|
-
* Get only STRING-type semantic tokens (shadows, easing curves).
|
|
300
|
-
*/
|
|
301
|
-
export function getStringSemanticTokens(): SemanticTokenEntry[] {
|
|
302
|
-
return SEMANTIC_TOKEN_CATALOG.filter((t) => t.type === "STRING");
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
/**
|
|
306
|
-
* Get elevation/shadow tokens.
|
|
307
|
-
*/
|
|
308
|
-
export function getElevationTokens(): SemanticTokenEntry[] {
|
|
309
|
-
return SEMANTIC_TOKEN_CATALOG.filter((t) => t.category === "elevation");
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
/**
|
|
313
|
-
* Get motion tokens (durations and easing curves).
|
|
314
|
-
*/
|
|
315
|
-
export function getMotionTokens(): SemanticTokenEntry[] {
|
|
316
|
-
return SEMANTIC_TOKEN_CATALOG.filter((t) => t.category === "motion");
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
/**
|
|
320
|
-
* Get typography detail tokens (weights, line-heights, letter-spacing).
|
|
321
|
-
*/
|
|
322
|
-
export function getTypographyTokens(): SemanticTokenEntry[] {
|
|
323
|
-
return SEMANTIC_TOKEN_CATALOG.filter((t) => t.category === "typography");
|
|
324
|
-
}
|