@sarjallab09/figma-intelligence 1.0.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +67 -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 -2363
- package/figma-bridge-plugin/chat-runner.js +0 -459
- package/figma-bridge-plugin/code.js +0 -1528
- 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 -604
- 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 -4467
- 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 -1408
- 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
package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/input.ts
DELETED
|
@@ -1,330 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Knowledge: Input / Text Field
|
|
3
|
-
*/
|
|
4
|
-
import type { ComponentKnowledge } from "../types.js";
|
|
5
|
-
|
|
6
|
-
export const inputKnowledge: ComponentKnowledge = {
|
|
7
|
-
description:
|
|
8
|
-
"Text entry field | Captures user input | Form data collection element",
|
|
9
|
-
|
|
10
|
-
stateSpecifications: [
|
|
11
|
-
{
|
|
12
|
-
state: "Default",
|
|
13
|
-
visualChange: "Neutral border, empty or placeholder text visible",
|
|
14
|
-
opacity: "1",
|
|
15
|
-
cursorWeb: "text",
|
|
16
|
-
usage: "Idle state awaiting user interaction",
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
state: "Hover",
|
|
20
|
-
visualChange: "Border color darkens slightly",
|
|
21
|
-
opacity: "1",
|
|
22
|
-
cursorWeb: "text",
|
|
23
|
-
usage: "Indicates the field is interactive on pointer hover",
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
state: "Focused",
|
|
27
|
-
visualChange: "Focus ring appears, border changes to primary color",
|
|
28
|
-
opacity: "1",
|
|
29
|
-
cursorWeb: "text",
|
|
30
|
-
usage: "Field is actively receiving keyboard input",
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
state: "Filled",
|
|
34
|
-
visualChange: "User-entered value replaces placeholder text",
|
|
35
|
-
opacity: "1",
|
|
36
|
-
cursorWeb: "text",
|
|
37
|
-
usage: "Field contains a user-supplied value",
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
state: "Error",
|
|
41
|
-
visualChange:
|
|
42
|
-
"Border turns error color, error message appears below field",
|
|
43
|
-
opacity: "1",
|
|
44
|
-
cursorWeb: "text",
|
|
45
|
-
usage: "Validation has failed; user must correct the value",
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
state: "Disabled",
|
|
49
|
-
visualChange: "Muted background and text, no interaction possible",
|
|
50
|
-
opacity: "0.4",
|
|
51
|
-
cursorWeb: "not-allowed",
|
|
52
|
-
usage: "Field is non-interactive due to form logic or permissions",
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
state: "Read-only",
|
|
56
|
-
visualChange:
|
|
57
|
-
"Value is visible but field chrome is reduced; no editable caret",
|
|
58
|
-
opacity: "1",
|
|
59
|
-
cursorWeb: "default",
|
|
60
|
-
usage: "Displays a value the user cannot modify",
|
|
61
|
-
},
|
|
62
|
-
],
|
|
63
|
-
|
|
64
|
-
propertyDescriptions: {
|
|
65
|
-
value: "Current text content of the input",
|
|
66
|
-
placeholder: "Hint text shown when the field is empty",
|
|
67
|
-
label: "Visible label rendered above or beside the field",
|
|
68
|
-
helperText:
|
|
69
|
-
"Supplementary guidance displayed below the field (e.g. format hint)",
|
|
70
|
-
error: "Boolean flag indicating the field is in an error state",
|
|
71
|
-
errorMessage: "Descriptive text explaining the validation failure",
|
|
72
|
-
disabled: "Prevents all user interaction when true",
|
|
73
|
-
readOnly: "Displays the value but disallows editing",
|
|
74
|
-
required: "Marks the field as mandatory for form submission",
|
|
75
|
-
type: "HTML input type attribute (text, email, password, number, etc.)",
|
|
76
|
-
maxLength: "Maximum number of characters the field will accept",
|
|
77
|
-
prefix: "Static content rendered inside the field before the value (e.g. $)",
|
|
78
|
-
suffix:
|
|
79
|
-
"Static content rendered inside the field after the value (e.g. kg)",
|
|
80
|
-
icon: "Optional icon displayed inside the field for contextual meaning",
|
|
81
|
-
},
|
|
82
|
-
|
|
83
|
-
sizeSpecifications: [
|
|
84
|
-
{
|
|
85
|
-
size: "Small",
|
|
86
|
-
height: "32px",
|
|
87
|
-
paddingLR: "8px",
|
|
88
|
-
fontSize: "12px",
|
|
89
|
-
iconSize: "16px",
|
|
90
|
-
borderRadius: "4px",
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
size: "Medium",
|
|
94
|
-
height: "40px",
|
|
95
|
-
paddingLR: "12px",
|
|
96
|
-
fontSize: "14px",
|
|
97
|
-
iconSize: "20px",
|
|
98
|
-
borderRadius: "6px",
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
size: "Large",
|
|
102
|
-
height: "48px",
|
|
103
|
-
paddingLR: "16px",
|
|
104
|
-
fontSize: "16px",
|
|
105
|
-
iconSize: "24px",
|
|
106
|
-
borderRadius: "8px",
|
|
107
|
-
},
|
|
108
|
-
],
|
|
109
|
-
|
|
110
|
-
designTokenBindings: [
|
|
111
|
-
{
|
|
112
|
-
property: "border-color",
|
|
113
|
-
tokenName: "input/border/default",
|
|
114
|
-
role: "Default border surrounding the field",
|
|
115
|
-
fallback: "#C6C6C6",
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
property: "background-color",
|
|
119
|
-
tokenName: "input/bg/default",
|
|
120
|
-
role: "Field background fill",
|
|
121
|
-
fallback: "#FFFFFF",
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
property: "color",
|
|
125
|
-
tokenName: "input/text/default",
|
|
126
|
-
role: "Entered text color",
|
|
127
|
-
fallback: "#161616",
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
property: "color (placeholder)",
|
|
131
|
-
tokenName: "input/text/placeholder",
|
|
132
|
-
role: "Placeholder hint text color",
|
|
133
|
-
fallback: "#A8A8A8",
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
property: "color (label)",
|
|
137
|
-
tokenName: "input/label/default",
|
|
138
|
-
role: "Label text color above the field",
|
|
139
|
-
fallback: "#525252",
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
property: "box-shadow (focus)",
|
|
143
|
-
tokenName: "input/focus-ring",
|
|
144
|
-
role: "Focus ring outline on keyboard focus",
|
|
145
|
-
fallback: "0 0 0 2px #0F62FE",
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
property: "border-color (error)",
|
|
149
|
-
tokenName: "input/border/error",
|
|
150
|
-
role: "Border color when validation fails",
|
|
151
|
-
fallback: "#DA1E28",
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
property: "color (error text)",
|
|
155
|
-
tokenName: "input/text/error",
|
|
156
|
-
role: "Error message text color",
|
|
157
|
-
fallback: "#DA1E28",
|
|
158
|
-
},
|
|
159
|
-
],
|
|
160
|
-
|
|
161
|
-
structureRules: [
|
|
162
|
-
"Label is always a separate element positioned above the field",
|
|
163
|
-
"Helper text and error message occupy the same slot below the field — only one is visible at a time",
|
|
164
|
-
"Prefix and suffix are inline elements inside the field container, before/after the editable area",
|
|
165
|
-
"Icon is placed at the leading or trailing edge inside the field, never both simultaneously",
|
|
166
|
-
"A clear button appears at the trailing edge when the field contains a value and is not disabled or read-only",
|
|
167
|
-
],
|
|
168
|
-
|
|
169
|
-
typeHierarchyRules: [
|
|
170
|
-
"Label uses the component's base font size at semibold weight",
|
|
171
|
-
"Input value text uses the component's base font size at regular weight",
|
|
172
|
-
"Placeholder text matches the value font size but uses placeholder color",
|
|
173
|
-
"Helper text and error message use a font size one step smaller than the value text",
|
|
174
|
-
],
|
|
175
|
-
|
|
176
|
-
interactionRules: [
|
|
177
|
-
{
|
|
178
|
-
event: "click",
|
|
179
|
-
trigger: "User clicks anywhere inside the field area",
|
|
180
|
-
action: "Field gains focus and displays the text caret",
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
event: "keydown",
|
|
184
|
-
trigger: "User types while field is focused",
|
|
185
|
-
action:
|
|
186
|
-
"Characters are inserted at the caret position; value updates in real time",
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
event: "blur",
|
|
190
|
-
trigger: "Field loses focus (user clicks elsewhere or tabs away)",
|
|
191
|
-
action:
|
|
192
|
-
"Validation fires; error state is applied if the value is invalid",
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
event: "click (clear)",
|
|
196
|
-
trigger: "User clicks the clear button inside the field",
|
|
197
|
-
action:
|
|
198
|
-
"Value is emptied, field retains focus, and onChange callback fires",
|
|
199
|
-
},
|
|
200
|
-
],
|
|
201
|
-
|
|
202
|
-
contentGuidance: [
|
|
203
|
-
"Labels should be placed above the field, not inside it",
|
|
204
|
-
"Use placeholder text to show an example value, never as a replacement for the label",
|
|
205
|
-
"Helper text should describe the expected format or constraints (e.g. 'Must be at least 8 characters')",
|
|
206
|
-
"Error messages must be specific and actionable — avoid generic phrases like 'Invalid input'",
|
|
207
|
-
"Keep labels concise: one to three words when possible",
|
|
208
|
-
],
|
|
209
|
-
|
|
210
|
-
responsiveBehaviour: [
|
|
211
|
-
{
|
|
212
|
-
breakpoint: "< 480px",
|
|
213
|
-
behavior:
|
|
214
|
-
"Field stretches to full container width; label stacks above the field",
|
|
215
|
-
},
|
|
216
|
-
{
|
|
217
|
-
breakpoint: "480px – 1024px",
|
|
218
|
-
behavior:
|
|
219
|
-
"Field width follows the grid column span; side-by-side labels are acceptable",
|
|
220
|
-
},
|
|
221
|
-
{
|
|
222
|
-
breakpoint: "> 1024px",
|
|
223
|
-
behavior:
|
|
224
|
-
"Field width may be constrained to a max-width for readability; inline labels permitted",
|
|
225
|
-
},
|
|
226
|
-
],
|
|
227
|
-
|
|
228
|
-
accessibilitySpec: {
|
|
229
|
-
intro:
|
|
230
|
-
"The text input must be operable via keyboard and correctly announce its label, state, and errors to assistive technology.",
|
|
231
|
-
requirements: [
|
|
232
|
-
{
|
|
233
|
-
requirement:
|
|
234
|
-
"Field has role=\"textbox\" (implicit via <input>) and a visible <label> element linked by htmlFor/id",
|
|
235
|
-
level: "A",
|
|
236
|
-
notes: "WCAG 1.3.1 – Info and Relationships",
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
requirement:
|
|
240
|
-
"When the field is required, aria-required=\"true\" is set and the label includes a visual required indicator",
|
|
241
|
-
level: "A",
|
|
242
|
-
notes: "WCAG 3.3.2 – Labels or Instructions",
|
|
243
|
-
},
|
|
244
|
-
{
|
|
245
|
-
requirement:
|
|
246
|
-
"When validation fails, aria-invalid=\"true\" is set on the input",
|
|
247
|
-
level: "A",
|
|
248
|
-
notes: "WCAG 3.3.1 – Error Identification",
|
|
249
|
-
},
|
|
250
|
-
{
|
|
251
|
-
requirement:
|
|
252
|
-
"Error message element is linked to the input via aria-describedby so screen readers announce the error on focus",
|
|
253
|
-
level: "A",
|
|
254
|
-
notes: "WCAG 3.3.1 – Error Identification",
|
|
255
|
-
},
|
|
256
|
-
{
|
|
257
|
-
requirement:
|
|
258
|
-
"Text and border meet WCAG AA contrast ratio (4.5:1 for text, 3:1 for non-text UI)",
|
|
259
|
-
level: "AA",
|
|
260
|
-
notes: "WCAG 1.4.3 / 1.4.11",
|
|
261
|
-
},
|
|
262
|
-
{
|
|
263
|
-
requirement:
|
|
264
|
-
"Focus indicator is visible with at least 3:1 contrast against adjacent colors",
|
|
265
|
-
level: "AA",
|
|
266
|
-
notes: "WCAG 2.4.7 – Focus Visible",
|
|
267
|
-
},
|
|
268
|
-
],
|
|
269
|
-
outro: [
|
|
270
|
-
"Test with VoiceOver (macOS/iOS) and NVDA (Windows) to verify label, required, and error announcements",
|
|
271
|
-
"Ensure Tab moves focus into the field and Shift+Tab moves it out",
|
|
272
|
-
"Verify that autocomplete attributes (autocomplete) are present for common fields (name, email, address)",
|
|
273
|
-
],
|
|
274
|
-
},
|
|
275
|
-
|
|
276
|
-
qaAcceptanceCriteria: [
|
|
277
|
-
{
|
|
278
|
-
check: "Focus behavior",
|
|
279
|
-
platform: "Web / Mobile",
|
|
280
|
-
expectedResult:
|
|
281
|
-
"Clicking or tapping the field shows a visible focus ring and text caret",
|
|
282
|
-
},
|
|
283
|
-
{
|
|
284
|
-
check: "Validation on blur",
|
|
285
|
-
platform: "Web",
|
|
286
|
-
expectedResult:
|
|
287
|
-
"Leaving an invalid required field displays the error message and sets the error border",
|
|
288
|
-
},
|
|
289
|
-
{
|
|
290
|
-
check: "Character count",
|
|
291
|
-
platform: "Web / Mobile",
|
|
292
|
-
expectedResult:
|
|
293
|
-
"When maxLength is set, the user cannot type beyond the limit and a counter is displayed",
|
|
294
|
-
},
|
|
295
|
-
{
|
|
296
|
-
check: "Paste handling",
|
|
297
|
-
platform: "Web",
|
|
298
|
-
expectedResult:
|
|
299
|
-
"Pasting text that exceeds maxLength truncates to the limit; value updates correctly",
|
|
300
|
-
},
|
|
301
|
-
{
|
|
302
|
-
check: "RTL support",
|
|
303
|
-
platform: "Web",
|
|
304
|
-
expectedResult:
|
|
305
|
-
"In RTL locales the label, value, and helper text are right-aligned; prefix/suffix positions are mirrored",
|
|
306
|
-
},
|
|
307
|
-
{
|
|
308
|
-
check: "Screen reader announcement",
|
|
309
|
-
platform: "Web",
|
|
310
|
-
expectedResult:
|
|
311
|
-
"VoiceOver/NVDA reads: label, required status, current value, and any error message on focus",
|
|
312
|
-
},
|
|
313
|
-
],
|
|
314
|
-
|
|
315
|
-
dos: [
|
|
316
|
-
"Always pair the input with a visible label element",
|
|
317
|
-
"Use helper text to clarify expected format or constraints",
|
|
318
|
-
"Provide real-time character count when maxLength is enforced",
|
|
319
|
-
"Show the clear button only when the field has a value",
|
|
320
|
-
"Match the input size variant to surrounding form controls for visual harmony",
|
|
321
|
-
],
|
|
322
|
-
|
|
323
|
-
donts: [
|
|
324
|
-
"Do not use placeholder text as a substitute for a label",
|
|
325
|
-
"Do not disable the field without explaining why to the user",
|
|
326
|
-
"Do not validate on every keystroke — wait for blur or explicit submission",
|
|
327
|
-
"Do not show both helper text and error message simultaneously",
|
|
328
|
-
"Do not remove the focus ring for sighted keyboard users",
|
|
329
|
-
],
|
|
330
|
-
};
|
package/figma-intelligence-layer/src/tools/phase5-governance/component-spec/knowledge/link.ts
DELETED
|
@@ -1,247 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* link.ts — Gold-standard design knowledge for Link / Anchor components
|
|
3
|
-
*/
|
|
4
|
-
import type { ComponentKnowledge } from "../types.js";
|
|
5
|
-
|
|
6
|
-
export const linkKnowledge: ComponentKnowledge = {
|
|
7
|
-
description:
|
|
8
|
-
"Navigational text element | Inline anchor | Standalone hyperlink — distinct from Button",
|
|
9
|
-
|
|
10
|
-
stateSpecifications: [
|
|
11
|
-
{
|
|
12
|
-
state: "Default",
|
|
13
|
-
visualChange: "Text rendered in link color with underline style per configuration (always, hover-only, or none)",
|
|
14
|
-
opacity: "1",
|
|
15
|
-
cursorWeb: "pointer",
|
|
16
|
-
usage: "Link is interactive and available for navigation — default resting appearance",
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
state: "Hover",
|
|
20
|
-
visualChange: "Underline appears (if hover-only) and text color shifts to hover token; cursor remains pointer",
|
|
21
|
-
opacity: "1",
|
|
22
|
-
cursorWeb: "pointer",
|
|
23
|
-
usage: "User's pointer is over the link — visual feedback indicates interactivity",
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
state: "Visited",
|
|
27
|
-
visualChange: "Text color changes to visited token — typically a muted or purple-shifted variant",
|
|
28
|
-
opacity: "1",
|
|
29
|
-
cursorWeb: "pointer",
|
|
30
|
-
usage: "User has previously navigated to this link's destination — provides wayfinding context",
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
state: "Active",
|
|
34
|
-
visualChange: "Text color darkens or shifts to active token during the press — momentary visual feedback",
|
|
35
|
-
opacity: "1",
|
|
36
|
-
cursorWeb: "pointer",
|
|
37
|
-
usage: "User is pressing the link — provides tactile feedback before navigation",
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
state: "Focus",
|
|
41
|
-
visualChange: "2px focus ring appears around the link text with 2px offset; link color unchanged",
|
|
42
|
-
opacity: "1",
|
|
43
|
-
cursorWeb: "pointer",
|
|
44
|
-
usage: "Link is focused via keyboard navigation — visible focus indicator required for accessibility",
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
state: "Disabled",
|
|
48
|
-
visualChange: "Text color shifts to disabled token; underline removed; no href attribute rendered",
|
|
49
|
-
opacity: "0.5",
|
|
50
|
-
cursorWeb: "not-allowed",
|
|
51
|
-
usage: "Link is temporarily unavailable — navigation is prevented and visual affordance is removed",
|
|
52
|
-
},
|
|
53
|
-
],
|
|
54
|
-
|
|
55
|
-
propertyDescriptions: {
|
|
56
|
-
label: "Visible text content of the link — must be descriptive of the destination, never generic",
|
|
57
|
-
href: "Navigation target URL — when omitted or empty, the link renders in disabled state",
|
|
58
|
-
external: "Boolean — when true, adds target='_blank', rel='noopener noreferrer', and an external link icon",
|
|
59
|
-
underline: "Underline display mode — 'always' (default), 'hover' (shows on hover only), or 'none' (no underline)",
|
|
60
|
-
size: "Dimensional preset controlling font-size and line-height — sm, md, or lg",
|
|
61
|
-
inline: "Boolean — when true, link renders inline within paragraph text; when false, renders as standalone block-level element",
|
|
62
|
-
iconEnd: "Optional trailing icon slot — typically used for external link indicator or download icon",
|
|
63
|
-
color: "Color variant override — defaults to the primary link token; can be set to inherit for body text styling",
|
|
64
|
-
disabled: "Boolean — when true, removes href, sets aria-disabled, and applies disabled visual styling",
|
|
65
|
-
rel: "Relationship attribute — automatically set to 'noopener noreferrer' for external links; can be manually overridden",
|
|
66
|
-
target: "Link target — automatically set to '_blank' for external links; defaults to '_self' for internal navigation",
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
sizeSpecifications: [
|
|
70
|
-
{
|
|
71
|
-
size: "Small (sm)",
|
|
72
|
-
height: "16px",
|
|
73
|
-
paddingLR: "0px",
|
|
74
|
-
fontSize: "12px",
|
|
75
|
-
iconSize: "12px",
|
|
76
|
-
borderRadius: "0px",
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
size: "Medium (md)",
|
|
80
|
-
height: "20px",
|
|
81
|
-
paddingLR: "0px",
|
|
82
|
-
fontSize: "14px",
|
|
83
|
-
iconSize: "14px",
|
|
84
|
-
borderRadius: "0px",
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
size: "Large (lg)",
|
|
88
|
-
height: "24px",
|
|
89
|
-
paddingLR: "0px",
|
|
90
|
-
fontSize: "16px",
|
|
91
|
-
iconSize: "16px",
|
|
92
|
-
borderRadius: "0px",
|
|
93
|
-
},
|
|
94
|
-
],
|
|
95
|
-
|
|
96
|
-
designTokenBindings: [
|
|
97
|
-
{
|
|
98
|
-
property: "Default Text",
|
|
99
|
-
tokenName: "$link-text-default",
|
|
100
|
-
role: "Primary link text color in default resting state",
|
|
101
|
-
fallback: "#2563EB",
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
property: "Hover Text",
|
|
105
|
-
tokenName: "$link-text-hover",
|
|
106
|
-
role: "Link text color on pointer hover — slightly darker or shifted for feedback",
|
|
107
|
-
fallback: "#1D4ED8",
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
property: "Visited Text",
|
|
111
|
-
tokenName: "$link-text-visited",
|
|
112
|
-
role: "Link text color after the destination has been visited",
|
|
113
|
-
fallback: "#7C3AED",
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
property: "Active Text",
|
|
117
|
-
tokenName: "$link-text-active",
|
|
118
|
-
role: "Link text color during the active/pressed state",
|
|
119
|
-
fallback: "#1E40AF",
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
property: "Disabled Text",
|
|
123
|
-
tokenName: "$link-text-disabled",
|
|
124
|
-
role: "Muted link text color when the link is disabled",
|
|
125
|
-
fallback: "#D0D5DD",
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
property: "Underline",
|
|
129
|
-
tokenName: "$link-underline",
|
|
130
|
-
role: "Underline color — typically matches the text color or a lighter variant",
|
|
131
|
-
fallback: "currentColor",
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
property: "Focus Ring",
|
|
135
|
-
tokenName: "$focus-ring",
|
|
136
|
-
role: "Visible focus indicator color for keyboard navigation — shared across all focusable components",
|
|
137
|
-
fallback: "#2563EB",
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
property: "Font Family",
|
|
141
|
-
tokenName: "$font-family-sans",
|
|
142
|
-
role: "Link typeface — inherits from body text; does not introduce a separate font stack",
|
|
143
|
-
fallback: "Inter, system-ui, sans-serif",
|
|
144
|
-
},
|
|
145
|
-
],
|
|
146
|
-
|
|
147
|
-
structureRules: [
|
|
148
|
-
"Links render as native <a> elements with an href attribute — never as <span> or <div> with click handlers",
|
|
149
|
-
"Inline links flow naturally within paragraph text and inherit the parent's font-size and line-height",
|
|
150
|
-
"Standalone links render as block-level flex containers with their own size preset applied",
|
|
151
|
-
"External link icon (if present) is placed after the label text with a 4px gap, sized to match the font",
|
|
152
|
-
"Underline is rendered via text-decoration (not border-bottom) for correct baseline alignment",
|
|
153
|
-
"Focus ring uses outline with 2px width and 2px offset — not box-shadow — for High Contrast Mode compatibility",
|
|
154
|
-
"Disabled links render as <a> without an href attribute (not a <span>) to preserve semantic structure",
|
|
155
|
-
],
|
|
156
|
-
|
|
157
|
-
typeHierarchyRules: [
|
|
158
|
-
"Link font-size follows the size prop (12/14/16px) and inherits font-weight from surrounding text",
|
|
159
|
-
"Inline links must match the parent paragraph's font-size and line-height exactly — they do not introduce size breaks",
|
|
160
|
-
"Link text is never bold or uppercase — it relies on color and underline for visual differentiation",
|
|
161
|
-
"Standalone links may use font-weight: 500 (medium) for subtle emphasis without disrupting body text hierarchy",
|
|
162
|
-
"External link icon is vertically centered with the text baseline using inline-flex alignment",
|
|
163
|
-
],
|
|
164
|
-
|
|
165
|
-
interactionRules: [
|
|
166
|
-
{ event: "Click", trigger: "pointerup on link", action: "Navigate to href destination; if external, open in new tab with noopener noreferrer" },
|
|
167
|
-
{ event: "Hover", trigger: "pointerenter on link", action: "Apply hover text color; show underline if underline='hover'; cursor remains pointer" },
|
|
168
|
-
{ event: "Hover Out", trigger: "pointerleave on link", action: "Revert to default text color; hide underline if underline='hover'" },
|
|
169
|
-
{ event: "Focus", trigger: "keyboard focus via Tab", action: "Display 2px focus ring around link text with 2px offset" },
|
|
170
|
-
{ event: "Active", trigger: "pointerdown on link", action: "Apply active text color for press feedback; revert on pointerup" },
|
|
171
|
-
{ event: "Disabled Click", trigger: "pointerup on disabled link", action: "No navigation occurs; event is suppressed; no href is present" },
|
|
172
|
-
{ event: "External Navigation", trigger: "Click on external link", action: "Screen reader announces 'opens in new window' before navigation" },
|
|
173
|
-
{ event: "Context Menu", trigger: "Right-click on link", action: "Browser context menu shows link-specific options (open in new tab, copy URL)" },
|
|
174
|
-
],
|
|
175
|
-
|
|
176
|
-
contentGuidance: [
|
|
177
|
-
"Write descriptive link text that conveys the destination — never use 'click here', 'read more', or 'learn more' alone",
|
|
178
|
-
"Link text should make sense out of context — screen readers may navigate links in isolation via rotor/elements list",
|
|
179
|
-
"Keep link text concise (2-5 words for inline links) — long links are harder to scan and click",
|
|
180
|
-
"Do not embed entire sentences as links — link only the meaningful destination phrase",
|
|
181
|
-
"External links should indicate they open in a new window, either via icon or explicit text like '(opens in new tab)'",
|
|
182
|
-
"Use links for navigation to a new page or resource; use buttons for in-page actions that do not change the URL",
|
|
183
|
-
"Avoid adjacent links without visual separation — use list markup or sufficient spacing between link groups",
|
|
184
|
-
],
|
|
185
|
-
|
|
186
|
-
responsiveBehaviour: [
|
|
187
|
-
{ breakpoint: "Mobile (<768px)", behavior: "Links maintain minimum 44px touch target via line-height and spacing; font-size may increase to 16px for tap friendliness" },
|
|
188
|
-
{ breakpoint: "Tablet (768-1023px)", behavior: "Same link sizing as desktop; touch targets ensured by adequate line-height" },
|
|
189
|
-
{ breakpoint: "Desktop (1024-1439px)", behavior: "Standard link rendering at specified size presets with pointer-based interactions" },
|
|
190
|
-
{ breakpoint: "Ultra-wide (>=1440px)", behavior: "No scaling — links follow content width and do not stretch or reposition with viewport" },
|
|
191
|
-
],
|
|
192
|
-
|
|
193
|
-
accessibilitySpec: {
|
|
194
|
-
intro:
|
|
195
|
-
"Links must use native <a> elements with descriptive text, proper focus management, and clear indication of navigation behavior.",
|
|
196
|
-
requirements: [
|
|
197
|
-
{ requirement: "Semantic <a> element", level: "A", notes: "Links must use <a href> — if a non-anchor element is used, it must have role='link' and tabindex='0' with Enter/Space key handling" },
|
|
198
|
-
{ requirement: "Descriptive link text", level: "A", notes: "Link text must describe the destination — 'click here' or 'read more' alone fails this requirement" },
|
|
199
|
-
{ requirement: "External link announcement", level: "A", notes: "External links (target='_blank') must announce 'opens in new window' via aria-label or visually hidden text" },
|
|
200
|
-
{ requirement: "Focus visible", level: "AA", notes: "Links must display a visible focus indicator (2px outline, 2px offset) meeting 3:1 contrast against adjacent colors" },
|
|
201
|
-
{ requirement: "Color independence", level: "A", notes: "Links within body text must be distinguishable by more than color alone — underline or other non-color indicator required" },
|
|
202
|
-
{ requirement: "Contrast", level: "AA", notes: "Link text must meet 4.5:1 contrast against background; underline must meet 3:1 non-text contrast" },
|
|
203
|
-
{ requirement: "Touch target", level: "AAA", notes: "On touch devices, link tap target must be at least 44x44px — achieved via line-height and padding" },
|
|
204
|
-
],
|
|
205
|
-
outro: [
|
|
206
|
-
"Screen readers announce link text followed by 'link' role — ensure the text is meaningful in isolation",
|
|
207
|
-
"Visited link color change provides wayfinding but must not be the only indicator of visited state for colorblind users",
|
|
208
|
-
],
|
|
209
|
-
},
|
|
210
|
-
|
|
211
|
-
qaAcceptanceCriteria: [
|
|
212
|
-
{ check: "Navigation", platform: "All", expectedResult: "Clicking a link navigates to the specified href destination" },
|
|
213
|
-
{ check: "External Link", platform: "All", expectedResult: "External links open in a new tab with rel='noopener noreferrer' and display an external icon" },
|
|
214
|
-
{ check: "Hover Underline", platform: "Web", expectedResult: "Links with underline='hover' show underline on hover and hide it on pointer leave" },
|
|
215
|
-
{ check: "Visited Color", platform: "Web", expectedResult: "Previously visited links display the visited color token; unvisited links use default token" },
|
|
216
|
-
{ check: "Focus Ring", platform: "Web", expectedResult: "Tab-focused links display a 2px outline with 2px offset meeting 3:1 contrast" },
|
|
217
|
-
{ check: "Disabled State", platform: "All", expectedResult: "Disabled links have no href, show muted color, and prevent navigation on click" },
|
|
218
|
-
{ check: "Inline Rendering", platform: "All", expectedResult: "Inline links flow within paragraph text and inherit the parent's font-size and line-height" },
|
|
219
|
-
{ check: "Standalone Rendering", platform: "All", expectedResult: "Standalone links render with their own size preset and display as flex block elements" },
|
|
220
|
-
{ check: "Screen Reader", platform: "Web", expectedResult: "Links announce descriptive text with 'link' role; external links announce 'opens in new window'" },
|
|
221
|
-
{ check: "Keyboard Navigation", platform: "Web", expectedResult: "Links are reachable via Tab and activated with Enter key; Space does not trigger navigation" },
|
|
222
|
-
{ check: "Touch Target", platform: "Mobile", expectedResult: "Link tap target is at least 44x44px on touch devices via line-height and spacing" },
|
|
223
|
-
{ check: "Dark Mode", platform: "All", expectedResult: "All link color tokens resolve correctly in dark mode with sufficient contrast" },
|
|
224
|
-
],
|
|
225
|
-
|
|
226
|
-
dos: [
|
|
227
|
-
"Use native <a> elements with a valid href for all navigational links",
|
|
228
|
-
"Write descriptive link text that conveys the destination clearly",
|
|
229
|
-
"Add rel='noopener noreferrer' and target='_blank' for external links automatically",
|
|
230
|
-
"Include a visible external link icon for links that open in a new window",
|
|
231
|
-
"Ensure links are visually distinguishable from body text by underline — not color alone",
|
|
232
|
-
"Provide visited link styling to give users wayfinding context",
|
|
233
|
-
"Use links for navigation and buttons for actions — do not conflate the two patterns",
|
|
234
|
-
"Test link text in isolation (via screen reader link list) to verify it is self-descriptive",
|
|
235
|
-
],
|
|
236
|
-
|
|
237
|
-
donts: [
|
|
238
|
-
"Do not use 'click here', 'read more', or 'learn more' as standalone link text",
|
|
239
|
-
"Do not use <button> or <span> with an onClick handler when an <a> with href is appropriate",
|
|
240
|
-
"Do not open internal links in a new tab — reserve target='_blank' for external destinations only",
|
|
241
|
-
"Do not remove the underline from inline links in body text — it is the primary non-color indicator",
|
|
242
|
-
"Do not disable links by simply hiding them — render them with aria-disabled and no href instead",
|
|
243
|
-
"Do not use link styling for non-navigational actions — use a button component instead",
|
|
244
|
-
"Do not nest interactive elements inside links — no buttons, inputs, or other links within an <a>",
|
|
245
|
-
"Do not rely on color alone to differentiate links from surrounding text — always pair with underline or icon",
|
|
246
|
-
],
|
|
247
|
-
};
|