@behavioral-agentic-design-system/core 0.48.0 → 0.49.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 (212) hide show
  1. package/package.json +1 -1
  2. package/scripts/build-tokens.cjs +24 -3
  3. package/scripts/ux-smoke.mjs +5 -1
  4. package/src/api/save-tokens.ts +170 -24
  5. package/src/app/layout.tsx +12 -1
  6. package/src/app/preview/components/page.tsx +25 -18
  7. package/src/app/preview/global-font-client.tsx +2 -0
  8. package/src/app/providers.tsx +2 -0
  9. package/src/app/shell.tsx +50 -156
  10. package/src/components/customize/brand-mark-section.tsx +65 -95
  11. package/src/components/customize/font-pickers.tsx +25 -2
  12. package/src/components/customize/save-bar.tsx +120 -7
  13. package/src/components/customize/theme-io.tsx +62 -21
  14. package/src/components/customize-tab.tsx +3 -1
  15. package/src/components/home-recent.tsx +58 -25
  16. package/src/components/motion/reveal.tsx +168 -12
  17. package/src/components/studio/control-panel.tsx +98 -19
  18. package/src/components/studio/import-theme-dialog.tsx +167 -0
  19. package/src/components/studio/tokens-panel.tsx +215 -0
  20. package/src/components/studio/types.ts +5 -2
  21. package/src/components/studio/use-studio-tweaks.ts +36 -4
  22. package/src/components/studio/use-token-edits.ts +160 -0
  23. package/src/components/ui/toggle-tip.tsx +38 -29
  24. package/src/data/component-stories.json +1214 -0
  25. package/src/data/docs-index.ts +7 -2
  26. package/src/data/hidden-views.ts +22 -0
  27. package/src/data/history.json +32 -32
  28. package/src/data/sticker-sheet.json +1878 -1821
  29. package/src/fonts/Figtree-OFL.txt +93 -0
  30. package/src/fonts/figtree-latin-ext-wght-normal.woff2 +0 -0
  31. package/src/fonts/figtree-latin-wght-italic.woff2 +0 -0
  32. package/src/fonts/figtree-latin-wght-normal.woff2 +0 -0
  33. package/src/fonts-cdn.css +3 -1
  34. package/src/fonts.css +44 -0
  35. package/src/hooks/use-global-heading-font.ts +104 -0
  36. package/src/hooks/use-global-sans-font.ts +8 -3
  37. package/src/hooks/use-global-theme.ts +2 -2
  38. package/src/hooks/use-token-overrides.ts +62 -14
  39. package/src/lib/css-color.ts +42 -0
  40. package/src/lib/storybook-url.ts +28 -0
  41. package/src/lib/theme-editor.ts +7 -1
  42. package/src/lib/theme-import.ts +99 -0
  43. package/src/lib/theme-transition.ts +93 -0
  44. package/src/lib/token-list.ts +133 -0
  45. package/src/lib/token-value.ts +31 -0
  46. package/src/stories/Accordion.stories.tsx +1 -1
  47. package/src/stories/Affix.stories.tsx +1 -1
  48. package/src/stories/AiBadge.stories.tsx +1 -1
  49. package/src/stories/Alert.stories.tsx +1 -1
  50. package/src/stories/AlertDialog.stories.tsx +1 -1
  51. package/src/stories/AngleSlider.stories.tsx +1 -1
  52. package/src/stories/AnnouncementBar.stories.tsx +2 -2
  53. package/src/stories/AspectRatio.stories.tsx +1 -1
  54. package/src/stories/Attachment.stories.tsx +1 -1
  55. package/src/stories/Autocomplete.stories.tsx +1 -1
  56. package/src/stories/Avatar.stories.tsx +1 -1
  57. package/src/stories/Badge.stories.tsx +1 -1
  58. package/src/stories/Blockquote.stories.tsx +1 -1
  59. package/src/stories/Burger.stories.tsx +1 -1
  60. package/src/stories/Button.stories.tsx +1 -1
  61. package/src/stories/ButtonGroup.stories.tsx +1 -1
  62. package/src/stories/Calendar.stories.tsx +1 -1
  63. package/src/stories/Callout.stories.tsx +1 -1
  64. package/src/stories/Canvas.stories.tsx +1 -1
  65. package/src/stories/Card.stories.tsx +1 -1
  66. package/src/stories/Carousel.stories.tsx +1 -1
  67. package/src/stories/Cascader.stories.tsx +1 -1
  68. package/src/stories/Chart.stories.tsx +1 -1
  69. package/src/stories/ChatBubble.stories.tsx +1 -1
  70. package/src/stories/ChatMarker.stories.tsx +1 -1
  71. package/src/stories/Checkbox.stories.tsx +1 -1
  72. package/src/stories/CheckboxCard.stories.tsx +1 -1
  73. package/src/stories/CheckboxGroup.stories.tsx +1 -1
  74. package/src/stories/Chip.stories.tsx +1 -1
  75. package/src/stories/CircularProgress.stories.tsx +1 -1
  76. package/src/stories/Clipboard.stories.tsx +1 -1
  77. package/src/stories/CloseButton.stories.tsx +1 -1
  78. package/src/stories/Code.stories.tsx +1 -1
  79. package/src/stories/Collapsible.stories.tsx +1 -1
  80. package/src/stories/ColorPicker.stories.tsx +1 -1
  81. package/src/stories/ColorSwatch.stories.tsx +1 -1
  82. package/src/stories/Combobox.stories.tsx +1 -1
  83. package/src/stories/Container.stories.tsx +1 -1
  84. package/src/stories/ContextMenu.stories.tsx +1 -1
  85. package/src/stories/CopyButton.stories.tsx +1 -1
  86. package/src/stories/DataList.stories.tsx +1 -1
  87. package/src/stories/DataTable.stories.tsx +1 -1
  88. package/src/stories/DateField.stories.tsx +1 -1
  89. package/src/stories/DatePicker.stories.tsx +1 -1
  90. package/src/stories/DateRangePicker.stories.tsx +1 -1
  91. package/src/stories/Dialog.stories.tsx +1 -1
  92. package/src/stories/Drawer.stories.tsx +1 -1
  93. package/src/stories/DropdownMenu.stories.tsx +1 -1
  94. package/src/stories/Editable.stories.tsx +1 -1
  95. package/src/stories/EmptyState.stories.tsx +1 -1
  96. package/src/stories/FacetedFilter.stories.tsx +1 -1
  97. package/src/stories/Field.stories.tsx +1 -1
  98. package/src/stories/Fieldset.stories.tsx +1 -1
  99. package/src/stories/FileButton.stories.tsx +1 -1
  100. package/src/stories/FileUpload.stories.tsx +1 -1
  101. package/src/stories/FloatLabel.stories.tsx +1 -1
  102. package/src/stories/FloatingActionButton.stories.tsx +1 -1
  103. package/src/stories/FloatingIndicator.stories.tsx +1 -1
  104. package/src/stories/FloatingPanel.stories.tsx +1 -1
  105. package/src/stories/FocusTrap.stories.tsx +1 -1
  106. package/src/stories/FormatByte.stories.tsx +1 -1
  107. package/src/stories/FormatDate.stories.tsx +1 -1
  108. package/src/stories/FormatNumber.stories.tsx +1 -1
  109. package/src/stories/FormatRelativeTime.stories.tsx +1 -1
  110. package/src/stories/GaugeChart.stories.tsx +1 -1
  111. package/src/stories/Grid.stories.tsx +1 -1
  112. package/src/stories/Heatmap.stories.tsx +1 -1
  113. package/src/stories/Highlight.stories.tsx +1 -1
  114. package/src/stories/HoverCard.stories.tsx +1 -1
  115. package/src/stories/Icon.stories.tsx +1 -1
  116. package/src/stories/Image.stories.tsx +1 -1
  117. package/src/stories/Indicator.stories.tsx +1 -1
  118. package/src/stories/InfiniteScroll.stories.tsx +1 -1
  119. package/src/stories/InlineEdit.stories.tsx +1 -1
  120. package/src/stories/Input.stories.tsx +1 -1
  121. package/src/stories/InputClearButton.stories.tsx +1 -1
  122. package/src/stories/InputGroup.stories.tsx +1 -1
  123. package/src/stories/JsonInput.stories.tsx +1 -1
  124. package/src/stories/Kbd.stories.tsx +1 -1
  125. package/src/stories/KeyboardShortcut.stories.tsx +1 -1
  126. package/src/stories/Label.stories.tsx +1 -1
  127. package/src/stories/List.stories.tsx +1 -1
  128. package/src/stories/Listbox.stories.tsx +1 -1
  129. package/src/stories/LoadingDots.stories.tsx +1 -1
  130. package/src/stories/LoadingOverlay.stories.tsx +1 -1
  131. package/src/stories/Mark.stories.tsx +1 -1
  132. package/src/stories/MarkdownPreview.stories.tsx +1 -1
  133. package/src/stories/Marquee.stories.tsx +1 -1
  134. package/src/stories/Masonry.stories.tsx +1 -1
  135. package/src/stories/Meter.stories.tsx +1 -1
  136. package/src/stories/MonthPicker.stories.tsx +1 -1
  137. package/src/stories/MotionToggle.stories.tsx +1 -1
  138. package/src/stories/MultiSelect.stories.tsx +1 -1
  139. package/src/stories/NativeSelect.stories.tsx +1 -1
  140. package/src/stories/NavigationProgress.stories.tsx +1 -1
  141. package/src/stories/Notification.stories.tsx +1 -1
  142. package/src/stories/NumberField.stories.tsx +1 -1
  143. package/src/stories/NumberInput.stories.tsx +1 -1
  144. package/src/stories/OtpInput.stories.tsx +1 -1
  145. package/src/stories/Overlay.stories.tsx +1 -1
  146. package/src/stories/PageHeader.stories.tsx +1 -1
  147. package/src/stories/PasswordInput.stories.tsx +1 -1
  148. package/src/stories/PasswordStrengthInput.stories.tsx +1 -1
  149. package/src/stories/PhoneInput.stories.tsx +1 -1
  150. package/src/stories/Pill.stories.tsx +1 -1
  151. package/src/stories/PinInput.stories.tsx +1 -1
  152. package/src/stories/Popover.stories.tsx +1 -1
  153. package/src/stories/Portal.stories.tsx +1 -1
  154. package/src/stories/Presence.stories.tsx +1 -1
  155. package/src/stories/Progress.stories.tsx +1 -1
  156. package/src/stories/ProgressStack.stories.tsx +1 -1
  157. package/src/stories/Prose.stories.tsx +1 -1
  158. package/src/stories/QrCode.stories.tsx +1 -1
  159. package/src/stories/Questionnaire.stories.tsx +1 -1
  160. package/src/stories/RadioGroup.stories.tsx +1 -1
  161. package/src/stories/RatingGroup.stories.tsx +1 -1
  162. package/src/stories/Resizable.stories.tsx +1 -1
  163. package/src/stories/Result.stories.tsx +1 -1
  164. package/src/stories/Reveal.stories.tsx +1 -1
  165. package/src/stories/RollingNumber.stories.tsx +1 -1
  166. package/src/stories/ScrollArea.stories.tsx +1 -1
  167. package/src/stories/ScrollProgress.stories.tsx +1 -1
  168. package/src/stories/SearchInput.stories.tsx +1 -1
  169. package/src/stories/SegmentedControl.stories.tsx +1 -1
  170. package/src/stories/Select.stories.tsx +1 -1
  171. package/src/stories/Separator.stories.tsx +1 -1
  172. package/src/stories/Sheet.stories.tsx +1 -1
  173. package/src/stories/SignaturePad.stories.tsx +1 -1
  174. package/src/stories/SimpleGrid.stories.tsx +1 -1
  175. package/src/stories/Skeleton.stories.tsx +1 -1
  176. package/src/stories/SkeletonTable.stories.tsx +1 -1
  177. package/src/stories/Slider.stories.tsx +1 -1
  178. package/src/stories/Snackbar.stories.tsx +1 -1
  179. package/src/stories/Sonner.stories.tsx +1 -1
  180. package/src/stories/SortableList.stories.tsx +1 -1
  181. package/src/stories/Sparkline.stories.tsx +1 -1
  182. package/src/stories/Spinner.stories.tsx +1 -1
  183. package/src/stories/Spoiler.stories.tsx +1 -1
  184. package/src/stories/Squircle.stories.tsx +1 -1
  185. package/src/stories/Stack.stories.tsx +1 -1
  186. package/src/stories/StatusBadge.stories.tsx +1 -1
  187. package/src/stories/Switch.stories.tsx +1 -1
  188. package/src/stories/Table.stories.tsx +1 -1
  189. package/src/stories/Tag.stories.tsx +1 -1
  190. package/src/stories/TagsInput.stories.tsx +1 -1
  191. package/src/stories/Text.stories.tsx +1 -1
  192. package/src/stories/Textarea.stories.tsx +1 -1
  193. package/src/stories/ThemeIcon.stories.tsx +1 -1
  194. package/src/stories/TimePicker.stories.tsx +1 -1
  195. package/src/stories/Timeline.stories.tsx +1 -1
  196. package/src/stories/Timer.stories.tsx +1 -1
  197. package/src/stories/Toggle.stories.tsx +1 -1
  198. package/src/stories/ToggleGroup.stories.tsx +1 -1
  199. package/src/stories/ToggleTip.stories.tsx +106 -1
  200. package/src/stories/Tooltip.stories.tsx +56 -1
  201. package/src/stories/TransferList.stories.tsx +1 -1
  202. package/src/stories/TreeSelect.stories.tsx +1 -1
  203. package/src/stories/TypingIndicator.stories.tsx +1 -1
  204. package/src/stories/VisuallyHidden.stories.tsx +1 -1
  205. package/src/stories/Watermark.stories.tsx +1 -1
  206. package/src/stories/WeekPicker.stories.tsx +1 -1
  207. package/src/stories/WordRotate.stories.tsx +1 -1
  208. package/src/stories/YearPicker.stories.tsx +1 -1
  209. package/src/stories/story-groups.json +216 -224
  210. package/src/styles.css +20 -3
  211. package/src/tokens.default.json +6 -1
  212. package/src/tokens.json +7 -2
@@ -1,3 +1,4 @@
1
+ import { isDocHidden } from "./hidden-views";
1
2
  // Curated reading order for the Docs tab. Keep this in sync with what lives
2
3
  // on disk — if you add a doc, add a row here. The /api/layers/file allowlist
3
4
  // also needs to cover the path (see packages/core/src/api/layers/file.ts).
@@ -145,6 +146,7 @@ export const DOCS_INDEX: DocGroup[] = [
145
146
  { title: "Prompt — design directions", path: "prompts/design-directions.md" },
146
147
  { title: "Prompt — color ramp", path: "prompts/color-ramp.md", summary: "Build a 9-shade ramp from the single brand hex a client hands you: place 500, find the edges, fill inward, and move with hue rotation (capped 20-30°) rather than lightness alone so dark shades don't go grey. Adapted to BADS's AAA floor, which is stricter than the source and pushes the dark end further than it looks." },
147
148
  { title: "Prompt — plan & spec", path: "prompts/plan-and-spec.md", summary: "Lightweight per-feature convention: a matched plan (how you'll build it) + spec (the durable contract, in RFC-2119 language) under docs/plans/ and docs/specs/, dated and slugged the same. The trail that lets the next agent — or the client's team after the engagement — reconstruct why. Adapted from web-common's superpowers/plans + specs." },
149
+ { title: "Plan template — executable", path: "docs/plans/executable-plan.template.md", summary: "A plan a cheaper model or a fresh session can follow with no other context: inlined current state, a verification command on every step, out-of-scope list, STOP conditions, and the commit it was planned against." },
148
150
  { title: "Prompt — macrostructures", path: "prompts/macrostructures.md", summary: "Named menu of ~16 structural paradigms (the positive counterpart to the anti-defaults) with when-it-fits / what-it-costs each, plus a diversification rule so a fork's screens don't converge on one shape. Consumed at design-exploration step 3.7. Adapted BADS-native from Nutlope's Hallmark." },
149
151
  { title: "Prompt — design critique", path: "prompts/design-critique.md" },
150
152
  { title: "Prompt — design DNA", path: "prompts/design-dna.md", summary: "Extract a single admired reference's DNA along three axes (macrostructure + type-pairing + colour anchor), refuse templates/marketplaces, and seed it into the fork's exemplars as a portable visual target. The single-reference counterpart to art-direction's gallery sweep. Adapted BADS-native from Hallmark's study verb." },
@@ -308,8 +310,11 @@ export const DOCS_TOTAL = DOCS_INDEX.reduce((sum, g) => sum + g.entries.length,
308
310
  * and the sidebar doesn't flash a group it is about to remove.
309
311
  */
310
312
  export function visibleDocGroups(isClientFork: boolean): DocGroup[] {
311
- if (!isClientFork) return DOCS_INDEX;
312
- return DOCS_INDEX.filter((g) => !g.retireAfterRename);
313
+ const groups = isClientFork ? DOCS_INDEX.filter((g) => !g.retireAfterRename) : DOCS_INDEX;
314
+ // Docs for a hidden view (data/hidden-views.ts) are dropped from the tab and its search; the files stay.
315
+ return groups
316
+ .map((g) => ({ ...g, entries: g.entries.filter((e) => !isDocHidden(e.path)) }))
317
+ .filter((g) => g.entries.length > 0);
313
318
  }
314
319
 
315
320
  /** Entry count for whichever set of groups you're rendering. */
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Views hidden from navigation. One list, one place.
3
+ *
4
+ * A hidden view is removed from the rail tabs (DEFAULT_TABS in app/shell.tsx) and from the Docs tab index and its
5
+ * search (visibleDocGroups in data/docs-index.ts). Its code, data, story, generated files and checks stay as they
6
+ * are, and its preview route still renders if you open the URL directly, like every other /preview/* page that is
7
+ * not linked from the rail. A restored `?tab=` for a hidden view falls back to the default tab.
8
+ *
9
+ * hidden 2026-11-11 by Matthew, flip to show again: delete the id from this list.
10
+ */
11
+ export const HIDDEN_VIEWS: readonly string[] = [
12
+ "sticker-sheet",
13
+ // hidden 2026-11-11 by Matthew, flip to show again: Typography and its rail group, Foundations. Icons moved
14
+ // under Build (group: "build" in app/shell.tsx), so the Foundations group is empty and stays out of the rail.
15
+ "typography",
16
+ "foundations",
17
+ ];
18
+
19
+ export const isViewHidden = (id: string): boolean => HIDDEN_VIEWS.includes(id);
20
+
21
+ /** The doc that explains a view lives at docs/<id>.md, so it is hidden with the view. */
22
+ export const isDocHidden = (path: string): boolean => HIDDEN_VIEWS.some((id) => path === `docs/${id}.md`);
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "$comment": "GENERATED by scripts/build-history.mjs — do not edit. Regenerate with `pnpm build:history`.",
3
- "generatedAt": "2026-11-11",
3
+ "generatedAt": "2026-11-13",
4
4
  "stats": [
5
5
  {
6
6
  "label": "commits",
7
- "value": 1766
7
+ "value": 1803
8
8
  },
9
9
  {
10
10
  "label": "components",
@@ -25,6 +25,36 @@
25
25
  "subject": "Initial commit: BADS template v0.1.0"
26
26
  },
27
27
  "milestones": [
28
+ {
29
+ "sha": "ef21205f",
30
+ "date": "2026-11-12",
31
+ "scope": "showcase",
32
+ "title": "declare the BADS brand mark as the tab icon"
33
+ },
34
+ {
35
+ "sha": "32edc1e3",
36
+ "date": "2026-11-11",
37
+ "scope": null,
38
+ "title": "scroll-in animation for the Components tab [skip ci] (#798)"
39
+ },
40
+ {
41
+ "sha": "997e8e9f",
42
+ "date": "2026-11-11",
43
+ "scope": null,
44
+ "title": "Figtree headings, Studio tokens tab, Recently added Storybook links, iris toggle, tooltip arrow fix, release tag job [skip ci] (#797)"
45
+ },
46
+ {
47
+ "sha": "77301e61",
48
+ "date": "2026-11-11",
49
+ "scope": "prototype-repo",
50
+ "title": "a Component map overlay for the prototype viewer"
51
+ },
52
+ {
53
+ "sha": "ca7dd2d3",
54
+ "date": "2026-11-11",
55
+ "scope": "comments",
56
+ "title": "a page's conversation with Claude, through the @claude runner (#796)"
57
+ },
28
58
  {
29
59
  "sha": "09122e27",
30
60
  "date": "2026-11-11",
@@ -234,36 +264,6 @@
234
264
  "date": "2026-10-20",
235
265
  "scope": "skills",
236
266
  "title": "/next always ends with an outstanding item (#690)"
237
- },
238
- {
239
- "sha": "925b4334",
240
- "date": "2026-10-20",
241
- "scope": "skills",
242
- "title": "/next, one backlog item at a time, recommend, act at 80% confidence (#689)"
243
- },
244
- {
245
- "sha": "c49c1886",
246
- "date": "2026-10-19",
247
- "scope": "[Night Shift]",
248
- "title": "feat([Night Shift]) Add OTPInput component"
249
- },
250
- {
251
- "sha": "d1c32588",
252
- "date": "2026-10-19",
253
- "scope": "primitives",
254
- "title": "add InlineEdit primitive (T1) [night-shift]"
255
- },
256
- {
257
- "sha": "a7fdfb01",
258
- "date": "2026-10-19",
259
- "scope": "compositions",
260
- "title": "add FileTree composition (T3)"
261
- },
262
- {
263
- "sha": "5405280a",
264
- "date": "2026-10-18",
265
- "scope": "composition",
266
- "title": "add MembersTable — night shift 2026-10-18"
267
267
  }
268
268
  ]
269
269
  }