@behavioral-agentic-design-system/core 0.42.0 → 0.45.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.
Files changed (104) hide show
  1. package/LICENSE +21 -0
  2. package/package.json +25 -9
  3. package/scripts/a11y-lint.cjs +25 -1
  4. package/scripts/check-spec.mjs +73 -0
  5. package/scripts/deal-directions.mjs +186 -0
  6. package/scripts/health-report.mjs +20 -14
  7. package/scripts/lib/counted-lint.mjs +100 -0
  8. package/scripts/lib/marketing-library.mjs +129 -0
  9. package/scripts/lib/on-system.mjs +249 -0
  10. package/scripts/lib/random.mjs +22 -0
  11. package/scripts/lib/spec-parse.d.mts +25 -0
  12. package/scripts/lib/spec-parse.mjs +188 -0
  13. package/scripts/lib/tells.mjs +128 -0
  14. package/scripts/lint-css-vars.mjs +175 -0
  15. package/scripts/lint-html-nesting.mjs +116 -0
  16. package/scripts/lint-live-ctas.mjs +138 -0
  17. package/scripts/on-system-score.mjs +95 -0
  18. package/scripts/slop-rules.mjs +1 -1
  19. package/scripts/source-images.mjs +180 -0
  20. package/scripts/ux-tells.mjs +78 -0
  21. package/src/api/brand-colors.ts +3 -0
  22. package/src/api/brand-fonts.ts +3 -0
  23. package/src/api/brand-mark.ts +6 -1
  24. package/src/api/dev-write-guard.ts +53 -0
  25. package/src/api/layers/file.ts +7 -4
  26. package/src/api/onboarding-extract.ts +85 -30
  27. package/src/api/onboarding.ts +3 -0
  28. package/src/api/save-tokens.ts +3 -0
  29. package/src/app/layout.tsx +6 -0
  30. package/src/app/preview/canvas/page.tsx +12 -0
  31. package/src/app/preview/components/page.tsx +734 -0
  32. package/src/app/preview/studio/blank-screen.tsx +143 -0
  33. package/src/app/preview/studio/page.tsx +7 -0
  34. package/src/app/shell.tsx +160 -44
  35. package/src/components/canvas/canvas.tsx +458 -0
  36. package/src/components/canvas/layout.ts +72 -0
  37. package/src/components/canvas/parse-canvas.ts +32 -0
  38. package/src/components/canvas/sample.ts +90 -0
  39. package/src/components/canvas/spec-frame.tsx +43 -0
  40. package/src/components/canvas/types.ts +33 -0
  41. package/src/components/docs-tab.tsx +7 -7
  42. package/src/components/home-recent.tsx +73 -0
  43. package/src/components/home-tab.tsx +13 -13
  44. package/src/components/layers-tab.tsx +2 -2
  45. package/src/components/markdown-preview.tsx +60 -12
  46. package/src/components/studio/control-panel.tsx +299 -0
  47. package/src/components/studio/control-row.tsx +77 -0
  48. package/src/components/studio/preview-frame.tsx +165 -0
  49. package/src/components/studio/preview-pane.tsx +247 -0
  50. package/src/components/studio/studio.tsx +133 -128
  51. package/src/components/studio/types.ts +218 -0
  52. package/src/components/studio/use-studio-tweaks.ts +128 -0
  53. package/src/components/studio/use-studio-view-state.ts +72 -0
  54. package/src/components/ui/autocomplete.tsx +1 -1
  55. package/src/components/ui/color-picker.tsx +20 -4
  56. package/src/components/ui/data-table.tsx +64 -3
  57. package/src/components/ui/date-field.tsx +1 -1
  58. package/src/components/ui/editable.tsx +1 -0
  59. package/src/components/ui/faceted-filter.tsx +187 -0
  60. package/src/components/ui/gauge-chart.tsx +18 -4
  61. package/src/components/ui/inline-edit.tsx +175 -0
  62. package/src/components/ui/month-picker.tsx +1 -1
  63. package/src/components/ui/number-input.tsx +28 -5
  64. package/src/components/ui/otp-input.tsx +208 -0
  65. package/src/components/ui/phone-input.tsx +274 -0
  66. package/src/components/ui/search-input.tsx +1 -1
  67. package/src/components/ui/tags-input.tsx +1 -1
  68. package/src/components/ui/timer.tsx +1 -0
  69. package/src/components/ui/transfer-list.tsx +13 -26
  70. package/src/components/ui/week-picker.tsx +1 -1
  71. package/src/components/ui/year-picker.tsx +1 -1
  72. package/src/data/component-added.json +958 -0
  73. package/src/data/docs-index.ts +13 -1
  74. package/src/hooks/use-global-mono-font.ts +1 -0
  75. package/src/hooks/use-global-primary-color.ts +1 -0
  76. package/src/hooks/use-global-sans-font.ts +1 -0
  77. package/src/hooks/use-global-serif-font.ts +1 -0
  78. package/src/hooks/use-global-type-scale.ts +17 -2
  79. package/src/hooks/use-mobile.ts +2 -0
  80. package/src/hooks/use-sync-type-scale.ts +7 -11
  81. package/src/lib/spec-parse.ts +4 -0
  82. package/src/lib/svg-sanitize.ts +19 -9
  83. package/src/stories/Autocomplete.stories.tsx +2 -0
  84. package/src/stories/Canvas.stories.tsx +45 -0
  85. package/src/stories/ColorPicker.stories.tsx +40 -0
  86. package/src/stories/DataTable.stories.tsx +30 -0
  87. package/src/stories/DateField.stories.tsx +21 -0
  88. package/src/stories/Editable.stories.tsx +2 -0
  89. package/src/stories/FacetedFilter.stories.tsx +197 -0
  90. package/src/stories/GaugeChart.stories.tsx +9 -3
  91. package/src/stories/InlineEdit.stories.tsx +106 -0
  92. package/src/stories/MarkdownPreview.stories.tsx +53 -0
  93. package/src/stories/MonthPicker.stories.tsx +21 -0
  94. package/src/stories/NumberInput.stories.tsx +25 -0
  95. package/src/stories/OtpInput.stories.tsx +110 -0
  96. package/src/stories/PhoneInput.stories.tsx +127 -0
  97. package/src/stories/SearchInput.stories.tsx +2 -0
  98. package/src/stories/TagsInput.stories.tsx +2 -0
  99. package/src/stories/Timer.stories.tsx +26 -0
  100. package/src/stories/TransferList.stories.tsx +4 -0
  101. package/src/stories/WeekPicker.stories.tsx +21 -0
  102. package/src/stories/YearPicker.stories.tsx +21 -0
  103. package/src/stories/story-groups.json +22 -16
  104. package/src/tokens.json +82 -54
@@ -0,0 +1,12 @@
1
+ "use client";
2
+
3
+ import { Canvas } from "../../../components/canvas/canvas";
4
+ import { SAMPLE_CANVAS, SAMPLE_SPEC, sampleResolveView } from "../../../components/canvas/sample";
5
+
6
+ export default function CanvasPreviewPage() {
7
+ return (
8
+ <main className="h-screen p-4">
9
+ <Canvas doc={SAMPLE_CANVAS} docs={{ "spec.md": SAMPLE_SPEC }} resolveView={sampleResolveView} />
10
+ </main>
11
+ );
12
+ }