@thewhatmatters/wmds 0.4.9 → 0.4.27

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 (302) hide show
  1. package/CHANGELOG.md +253 -0
  2. package/README.md +1 -1
  3. package/dist/components/atoms/Badge/Badge.d.ts +13 -5
  4. package/dist/components/atoms/Badge/Badge.d.ts.map +1 -1
  5. package/dist/components/atoms/Badge/Badge.js +56 -48
  6. package/dist/components/atoms/Badge/badgeStyles.d.ts +15 -0
  7. package/dist/components/atoms/Badge/badgeStyles.d.ts.map +1 -1
  8. package/dist/components/atoms/Badge/badgeStyles.js +38 -16
  9. package/dist/components/atoms/Button/Button.d.ts +1 -1
  10. package/dist/components/atoms/Button/Button.d.ts.map +1 -1
  11. package/dist/components/atoms/Button/Button.js +67 -48
  12. package/dist/components/atoms/Button/buttonStatusMotion.d.ts.map +1 -1
  13. package/dist/components/atoms/Button/buttonStatusMotion.js +6 -1
  14. package/dist/components/atoms/Button/buttonStyles.d.ts +1 -1
  15. package/dist/components/atoms/Button/buttonStyles.d.ts.map +1 -1
  16. package/dist/components/atoms/Button/buttonStyles.js +14 -12
  17. package/dist/components/atoms/Input/Input.d.ts +3 -1
  18. package/dist/components/atoms/Input/Input.d.ts.map +1 -1
  19. package/dist/components/atoms/Input/Input.js +59 -59
  20. package/dist/components/atoms/Input/inputShellStyles.d.ts +9 -3
  21. package/dist/components/atoms/Input/inputShellStyles.d.ts.map +1 -1
  22. package/dist/components/atoms/Input/inputShellStyles.js +38 -38
  23. package/dist/components/atoms/RiveHand/RiveHand.d.ts.map +1 -1
  24. package/dist/components/atoms/RiveHand/RiveHand.js +83 -81
  25. package/dist/components/atoms/Table/Table.d.ts +54 -0
  26. package/dist/components/atoms/Table/Table.d.ts.map +1 -0
  27. package/dist/components/atoms/Table/Table.js +66 -0
  28. package/dist/components/atoms/Table/tableStyles.d.ts +18 -0
  29. package/dist/components/atoms/Table/tableStyles.d.ts.map +1 -0
  30. package/dist/components/atoms/Table/tableStyles.js +14 -0
  31. package/dist/components/atoms/TextArea/TextArea.d.ts +6 -0
  32. package/dist/components/atoms/TextArea/TextArea.d.ts.map +1 -1
  33. package/dist/components/atoms/TextArea/TextArea.js +86 -78
  34. package/dist/components/atoms/TextArea/textareaShellStyles.d.ts +2 -2
  35. package/dist/components/atoms/TextArea/textareaShellStyles.d.ts.map +1 -1
  36. package/dist/components/atoms/TextArea/textareaShellStyles.js +2 -2
  37. package/dist/components/molecules/Card/Card.d.ts +28 -6
  38. package/dist/components/molecules/Card/Card.d.ts.map +1 -1
  39. package/dist/components/molecules/Card/Card.js +83 -42
  40. package/dist/components/molecules/Card/cardStyles.d.ts +16 -1
  41. package/dist/components/molecules/Card/cardStyles.d.ts.map +1 -1
  42. package/dist/components/molecules/Card/cardStyles.js +18 -4
  43. package/dist/components/molecules/Chip/chipStyles.js +9 -9
  44. package/dist/components/molecules/CopyField/CopyField.d.ts +41 -0
  45. package/dist/components/molecules/CopyField/CopyField.d.ts.map +1 -0
  46. package/dist/components/molecules/CopyField/CopyField.js +120 -0
  47. package/dist/components/molecules/CopyField/copyFieldStyles.d.ts +28 -0
  48. package/dist/components/molecules/CopyField/copyFieldStyles.d.ts.map +1 -0
  49. package/dist/components/molecules/CopyField/copyFieldStyles.js +7 -0
  50. package/dist/components/molecules/DisplayControls/DisplayControls.d.ts +16 -7
  51. package/dist/components/molecules/DisplayControls/DisplayControls.d.ts.map +1 -1
  52. package/dist/components/molecules/DisplayControls/DisplayControls.js +41 -39
  53. package/dist/components/molecules/DisplayControls/displayControlsState.d.ts +21 -0
  54. package/dist/components/molecules/DisplayControls/displayControlsState.d.ts.map +1 -1
  55. package/dist/components/molecules/DisplayControls/displayControlsState.js +46 -4
  56. package/dist/components/molecules/LogView/LogView.d.ts +31 -0
  57. package/dist/components/molecules/LogView/LogView.d.ts.map +1 -0
  58. package/dist/components/molecules/LogView/LogView.js +109 -0
  59. package/dist/components/molecules/LogView/logViewStyles.d.ts +11 -0
  60. package/dist/components/molecules/LogView/logViewStyles.d.ts.map +1 -0
  61. package/dist/components/molecules/LogView/logViewStyles.js +6 -0
  62. package/dist/components/molecules/NavList/NavList.d.ts +23 -4
  63. package/dist/components/molecules/NavList/NavList.d.ts.map +1 -1
  64. package/dist/components/molecules/NavList/NavList.js +65 -52
  65. package/dist/components/molecules/NavList/navListStyles.d.ts +2 -0
  66. package/dist/components/molecules/NavList/navListStyles.d.ts.map +1 -1
  67. package/dist/components/molecules/NavList/navListStyles.js +3 -3
  68. package/dist/components/molecules/PageHeader/PageHeader.js +3 -3
  69. package/dist/components/molecules/SegmentedControl/segmentedControlStyles.js +7 -7
  70. package/dist/components/molecules/Stat/Stat.d.ts +31 -5
  71. package/dist/components/molecules/Stat/Stat.d.ts.map +1 -1
  72. package/dist/components/molecules/Stat/Stat.js +83 -49
  73. package/dist/components/molecules/Stat/statStyles.d.ts +23 -3
  74. package/dist/components/molecules/Stat/statStyles.d.ts.map +1 -1
  75. package/dist/components/molecules/Stat/statStyles.js +29 -12
  76. package/dist/components/molecules/TaskRows/TaskRows.d.ts +13 -3
  77. package/dist/components/molecules/TaskRows/TaskRows.d.ts.map +1 -1
  78. package/dist/components/molecules/TaskRows/TaskRows.js +81 -57
  79. package/dist/components/molecules/TaskRows/TaskRowsTable.d.ts +54 -0
  80. package/dist/components/molecules/TaskRows/TaskRowsTable.d.ts.map +1 -0
  81. package/dist/components/molecules/TaskRows/TaskRowsTable.js +200 -0
  82. package/dist/components/molecules/TaskRows/taskRowsStyles.d.ts +19 -1
  83. package/dist/components/molecules/TaskRows/taskRowsStyles.d.ts.map +1 -1
  84. package/dist/components/molecules/TaskRows/taskRowsStyles.js +7 -3
  85. package/dist/components/organisms/AppShell/AppShell.d.ts +82 -0
  86. package/dist/components/organisms/AppShell/AppShell.d.ts.map +1 -0
  87. package/dist/components/organisms/AppShell/AppShell.js +222 -0
  88. package/dist/components/organisms/AppShell/appShellStyles.d.ts +18 -0
  89. package/dist/components/organisms/AppShell/appShellStyles.d.ts.map +1 -0
  90. package/dist/components/organisms/AppShell/appShellStyles.js +8 -0
  91. package/dist/components/organisms/Carousel/Carousel.d.ts +9 -1
  92. package/dist/components/organisms/Carousel/Carousel.d.ts.map +1 -1
  93. package/dist/components/organisms/Carousel/Carousel.js +220 -182
  94. package/dist/components/organisms/Carousel/carouselMath.d.ts +5 -0
  95. package/dist/components/organisms/Carousel/carouselMath.d.ts.map +1 -1
  96. package/dist/components/organisms/Carousel/carouselMath.js +9 -1
  97. package/dist/components/organisms/Carousel/carouselStyles.d.ts +2 -0
  98. package/dist/components/organisms/Carousel/carouselStyles.d.ts.map +1 -1
  99. package/dist/components/organisms/Carousel/carouselStyles.js +8 -7
  100. package/dist/components/organisms/Chart/Chart.d.ts +5 -1
  101. package/dist/components/organisms/Chart/Chart.d.ts.map +1 -1
  102. package/dist/components/organisms/Chart/Chart.js +126 -62
  103. package/dist/components/organisms/Chart/ChartLegend.d.ts +8 -1
  104. package/dist/components/organisms/Chart/ChartLegend.d.ts.map +1 -1
  105. package/dist/components/organisms/Chart/ChartLegend.js +43 -13
  106. package/dist/components/organisms/Chart/ChartSegmentedRing.d.ts +52 -0
  107. package/dist/components/organisms/Chart/ChartSegmentedRing.d.ts.map +1 -0
  108. package/dist/components/organisms/Chart/ChartSegmentedRing.js +95 -0
  109. package/dist/components/organisms/Chart/chartStyles.d.ts +32 -0
  110. package/dist/components/organisms/Chart/chartStyles.d.ts.map +1 -1
  111. package/dist/components/organisms/Chart/chartStyles.js +15 -3
  112. package/dist/components/organisms/ChatDock/ChatDock.d.ts.map +1 -1
  113. package/dist/components/organisms/ChatDock/ChatDock.js +29 -25
  114. package/dist/components/organisms/Dialog/OverlayPanelHeader.d.ts.map +1 -1
  115. package/dist/components/organisms/Dialog/OverlayPanelHeader.js +1 -0
  116. package/dist/components/organisms/Sheet/Sheet.d.ts +3 -1
  117. package/dist/components/organisms/Sheet/Sheet.d.ts.map +1 -1
  118. package/dist/components/organisms/Sheet/Sheet.js +74 -68
  119. package/dist/components/organisms/Sheet/sheetStyles.d.ts +8 -2
  120. package/dist/components/organisms/Sheet/sheetStyles.d.ts.map +1 -1
  121. package/dist/components/organisms/Sheet/sheetStyles.js +16 -11
  122. package/dist/components/organisms/Tab/tabStyles.js +7 -7
  123. package/dist/index.d.ts +14 -8
  124. package/dist/index.d.ts.map +1 -1
  125. package/dist/index.js +148 -139
  126. package/dist/lib/chartTheme.d.ts +11 -0
  127. package/dist/lib/chartTheme.d.ts.map +1 -1
  128. package/dist/lib/compositionAudit.d.ts.map +1 -1
  129. package/dist/lib/dialogOverlay.d.ts +7 -0
  130. package/dist/lib/dialogOverlay.d.ts.map +1 -1
  131. package/dist/lib/dialogOverlay.js +16 -1
  132. package/dist/lib/sheetParam/index.d.ts +3 -0
  133. package/dist/lib/sheetParam/index.d.ts.map +1 -0
  134. package/dist/lib/sheetParam/sheetParam.d.ts +15 -0
  135. package/dist/lib/sheetParam/sheetParam.d.ts.map +1 -0
  136. package/dist/lib/sheetParam/sheetParam.js +26 -0
  137. package/dist/lib/sheetParam/useSheetParam.d.ts +25 -0
  138. package/dist/lib/sheetParam/useSheetParam.d.ts.map +1 -0
  139. package/dist/lib/sheetParam/useSheetParam.js +29 -0
  140. package/dist/styles.css +1 -1
  141. package/docs/README.md +1 -1
  142. package/docs/component-contracts.md +101 -0
  143. package/docs/components.md +16 -11
  144. package/docs/exports.json +88 -15
  145. package/docs/patterns/components-accordion--flush.tsx +1 -1
  146. package/docs/patterns/components-appshell--portal-dashboard-pattern.tsx +176 -0
  147. package/docs/patterns/components-avatar--dropdown-row.tsx +1 -1
  148. package/docs/patterns/components-badge--outline-tags.tsx +1 -1
  149. package/docs/patterns/components-badge--status-pill.tsx +31 -0
  150. package/docs/patterns/components-badge--with-avatar.tsx +1 -1
  151. package/docs/patterns/components-breadcrumb--editorial.tsx +1 -1
  152. package/docs/patterns/components-breadcrumb--long-path.tsx +1 -1
  153. package/docs/patterns/components-breadcrumb--path.tsx +1 -1
  154. package/docs/patterns/components-breadcrumb--router-links.tsx +1 -1
  155. package/docs/patterns/components-button-button--copy-button.tsx +1 -1
  156. package/docs/patterns/components-button-button--destructive-action.tsx +1 -1
  157. package/docs/patterns/components-button-button--external-link.tsx +1 -1
  158. package/docs/patterns/components-button-button--ghost-action.tsx +1 -1
  159. package/docs/patterns/components-button-button--inverse-action.tsx +1 -1
  160. package/docs/patterns/components-button-button--link-render.tsx +1 -1
  161. package/docs/patterns/components-button-button--multi-state-badge.tsx +1 -1
  162. package/docs/patterns/components-button-button--outline-mono.tsx +1 -1
  163. package/docs/patterns/components-button-button--primary-action.tsx +1 -1
  164. package/docs/patterns/components-button-button--row-hug.tsx +1 -1
  165. package/docs/patterns/components-button-button--row-layout.tsx +1 -1
  166. package/docs/patterns/components-button-button--secondary-action.tsx +1 -1
  167. package/docs/patterns/components-button-button--suggestion-pills.tsx +1 -1
  168. package/docs/patterns/components-button-button--with-count.tsx +1 -1
  169. package/docs/patterns/components-button-button--with-icon.tsx +1 -1
  170. package/docs/patterns/components-button-floatingactionbutton--vertical-actions.tsx +1 -1
  171. package/docs/patterns/components-calembed--pattern-skip-in-footer.tsx +1 -1
  172. package/docs/patterns/components-card-card--body-slot-occupancy-history.tsx +1 -1
  173. package/docs/patterns/components-card-card--headerless-media.tsx +1 -1
  174. package/docs/patterns/components-card-card--outlined-layout.tsx +1 -1
  175. package/docs/patterns/components-card-card--pinned-height.tsx +1 -1
  176. package/docs/patterns/components-card-card--terminal-frame.tsx +48 -0
  177. package/docs/patterns/components-card-selectablecard--selectable-cards-pattern.tsx +1 -1
  178. package/docs/patterns/components-carousel--image-carousel.tsx +1 -1
  179. package/docs/patterns/components-chart--audience-activity-heatmap.tsx +1 -1
  180. package/docs/patterns/components-chart--cartesian-no-data-gaps.tsx +1 -1
  181. package/docs/patterns/components-chart--occupancy-history-in-card.tsx +1 -1
  182. package/docs/patterns/components-chart--occupancy-in-card.tsx +1 -1
  183. package/docs/patterns/components-chart--post-reach-distribution.tsx +1 -1
  184. package/docs/patterns/components-chart--ranked-audience-breakdown.tsx +1 -1
  185. package/docs/patterns/components-chart--revenue-by-line.tsx +68 -0
  186. package/docs/patterns/components-chart--segmented-ring-pattern.tsx +144 -0
  187. package/docs/patterns/components-chart--unit-grid-composition.tsx +1 -1
  188. package/docs/patterns/components-chatdock--pattern-chat-dock.tsx +1 -1
  189. package/docs/patterns/components-chatdock--pattern-start-project-gate.tsx +1 -1
  190. package/docs/patterns/components-chatqa--pattern-qa-with-reply.tsx +1 -1
  191. package/docs/patterns/components-checkbox-checkbox--default.tsx +1 -1
  192. package/docs/patterns/components-checkbox-checkbox--with-count.tsx +1 -1
  193. package/docs/patterns/components-checkbox-checkbox--with-description.tsx +1 -1
  194. package/docs/patterns/components-checkbox-checkboxgroup--default.tsx +1 -1
  195. package/docs/patterns/components-checkbox-checkboxgroup--option-counts.tsx +1 -1
  196. package/docs/patterns/components-copyfield--clipboard-blocked.tsx +9 -0
  197. package/docs/patterns/components-copyfield--copied.tsx +9 -0
  198. package/docs/patterns/components-copyfield--copy-key.tsx +9 -0
  199. package/docs/patterns/components-copyfield--on-navy.tsx +29 -0
  200. package/docs/patterns/components-descriptionlist--details.tsx +1 -1
  201. package/docs/patterns/components-descriptionlist--post-metadata.tsx +1 -1
  202. package/docs/patterns/components-dialog--alert-dialog-destructive.tsx +1 -1
  203. package/docs/patterns/components-dialog--default-dialog.tsx +1 -1
  204. package/docs/patterns/components-dialog--form-dialog.tsx +1 -1
  205. package/docs/patterns/components-displaycontrols--page-utilities.tsx +1 -1
  206. package/docs/patterns/components-displaycontrols--theme-switch.tsx +35 -0
  207. package/docs/patterns/components-field--horizontal-input.tsx +1 -1
  208. package/docs/patterns/components-field--horizontal-text-area.tsx +1 -1
  209. package/docs/patterns/components-field--multi-control.tsx +1 -1
  210. package/docs/patterns/components-filterpanel--panel.tsx +1 -1
  211. package/docs/patterns/components-footerreveal--marketing-hero-pattern.tsx +1 -1
  212. package/docs/patterns/components-footerreveal--marketing-hero-ruled-pattern.tsx +1 -1
  213. package/docs/patterns/components-footerreveal--marketing-hero-with-gallery-intro.tsx +1 -1
  214. package/docs/patterns/components-footerreveal--marketing-page-pattern.tsx +1 -1
  215. package/docs/patterns/components-footerreveal--ruled-grid-footer-pattern.tsx +1 -1
  216. package/docs/patterns/components-footerreveal--sequenced-marketing-hero.tsx +1 -1
  217. package/docs/patterns/components-herointro--two-line-intro.tsx +1 -1
  218. package/docs/patterns/components-herotilestack--marketing-hero-pattern.tsx +1 -1
  219. package/docs/patterns/components-herotilestack--marketing-hero-text-sequence.tsx +1 -1
  220. package/docs/patterns/components-herotilestack--marketing-hero-with-gallery-intro.tsx +1 -1
  221. package/docs/patterns/components-indexlist--post-index.tsx +1 -1
  222. package/docs/patterns/components-intakeconfirmation--booked-pattern.tsx +1 -1
  223. package/docs/patterns/components-intakeconfirmation--emailed-pattern.tsx +1 -1
  224. package/docs/patterns/components-intakeform--about-you-pattern.tsx +1 -1
  225. package/docs/patterns/components-intakeform--short-form-pattern.tsx +1 -1
  226. package/docs/patterns/components-intakemodal--intake-modal-pattern.tsx +1 -1
  227. package/docs/patterns/components-kbd--command-row.tsx +1 -1
  228. package/docs/patterns/components-kbd--numbered-choices.tsx +1 -1
  229. package/docs/patterns/components-kbd--shortcut.tsx +1 -1
  230. package/docs/patterns/components-linktile--resource-tile.tsx +1 -1
  231. package/docs/patterns/components-linktile--router-link.tsx +1 -1
  232. package/docs/patterns/components-logview--detail-pane.tsx +80 -0
  233. package/docs/patterns/components-logview--log-viewer.tsx +20 -0
  234. package/docs/patterns/components-moremenu--action-menu.tsx +1 -1
  235. package/docs/patterns/components-moremenu--in-card-header.tsx +1 -1
  236. package/docs/patterns/components-navlist--app-sidebar.tsx +118 -0
  237. package/docs/patterns/components-navlist--side-nav-settings.tsx +1 -1
  238. package/docs/patterns/components-pageheader--app-header-pattern.tsx +1 -1
  239. package/docs/patterns/components-pageheader--page-section-header.tsx +1 -1
  240. package/docs/patterns/components-pageheader--toolbar-header.tsx +1 -1
  241. package/docs/patterns/components-panel--end-detail-rail.tsx +1 -1
  242. package/docs/patterns/components-pillgroup--pill-group-pattern.tsx +1 -1
  243. package/docs/patterns/components-promptbar--pattern-prompt-bar.tsx +1 -1
  244. package/docs/patterns/components-prose--article-body.tsx +1 -1
  245. package/docs/patterns/components-radio-radiogroup--default.tsx +1 -1
  246. package/docs/patterns/components-scrollhorizontal--project-gallery-pattern.tsx +1 -1
  247. package/docs/patterns/components-scrollhorizontal--with-intro.tsx +1 -1
  248. package/docs/patterns/components-sectioncaption--column-caption.tsx +1 -1
  249. package/docs/patterns/components-sectioncaption--with-action.tsx +1 -1
  250. package/docs/patterns/components-sheet--bottom-sheet.tsx +1 -1
  251. package/docs/patterns/components-sheet--end-sheet.tsx +1 -1
  252. package/docs/patterns/components-sheet--side-sheet-header-actions.tsx +50 -0
  253. package/docs/patterns/components-sheet--side-sheet-url-deep-link.tsx +51 -0
  254. package/docs/patterns/components-sheet--side-sheet.tsx +38 -0
  255. package/docs/patterns/components-sitenav--brand-and-cta.tsx +1 -1
  256. package/docs/patterns/components-sitenav--centered-links.tsx +1 -1
  257. package/docs/patterns/components-sitenav--compact.tsx +1 -1
  258. package/docs/patterns/components-sitenav--marketing-header.tsx +1 -1
  259. package/docs/patterns/components-sitenav--mega-menu.tsx +1 -1
  260. package/docs/patterns/components-stat--hero-stat.tsx +54 -0
  261. package/docs/patterns/components-stat--insights-row.tsx +1 -1
  262. package/docs/patterns/components-stepprogress--step-progress-pattern.tsx +1 -1
  263. package/docs/patterns/components-switch--default.tsx +1 -1
  264. package/docs/patterns/components-switch--settings-row.tsx +1 -1
  265. package/docs/patterns/components-tab--settings-pages.tsx +1 -1
  266. package/docs/patterns/components-table--approvals-with-sheet.tsx +81 -0
  267. package/docs/patterns/components-table--approvals.tsx +223 -0
  268. package/docs/patterns/components-table--basic.tsx +60 -0
  269. package/docs/patterns/components-taskrows--action-details.tsx +1 -1
  270. package/docs/patterns/components-taskrows--capsules.tsx +1 -1
  271. package/docs/patterns/components-taskrows--card-with-status-rows.tsx +1 -1
  272. package/docs/patterns/components-taskrows--controlled-expand.tsx +1 -1
  273. package/docs/patterns/components-taskrows--custom-slots.tsx +1 -1
  274. package/docs/patterns/components-taskrows--needs-you-table.tsx +62 -0
  275. package/docs/patterns/components-taskrows--status-list.tsx +1 -1
  276. package/docs/patterns/components-taskrows--tag-chips.tsx +1 -1
  277. package/docs/patterns/components-textarea--save-status.tsx +32 -0
  278. package/docs/patterns/components-textlink--external-destination.tsx +1 -1
  279. package/docs/patterns/components-textlink--inline-prose.tsx +1 -1
  280. package/docs/patterns/components-textlink--quiet-title.tsx +1 -1
  281. package/docs/patterns/components-textlink--supporting-copy.tsx +1 -1
  282. package/docs/patterns/components-textsequence--default.tsx +1 -1
  283. package/docs/patterns/components-textsequence--reduced-motion.tsx +1 -1
  284. package/docs/patterns/components-textsequence--shapes.tsx +1 -1
  285. package/docs/patterns/components-tilegrid--masonry.tsx +1 -1
  286. package/docs/patterns/components-toast--stacked-notifications.tsx +1 -1
  287. package/docs/patterns/components-tooltip--controlled.tsx +1 -1
  288. package/docs/patterns/components-tooltip--disabled-control.tsx +1 -1
  289. package/docs/patterns/components-tooltip--icon-action.tsx +1 -1
  290. package/docs/patterns/components-tooltip--keyboard-shortcut.tsx +1 -1
  291. package/docs/patterns/components-tooltip--placement.tsx +1 -1
  292. package/docs/patterns/foundations-scroll-fade--horizontal-rail.tsx +1 -1
  293. package/docs/patterns/foundations-scroll-fade--overflowing-list.tsx +1 -1
  294. package/docs/patterns/guides-chart-explorations--comparison-gallery.tsx +1 -1
  295. package/docs/patterns/guides-filter-panel--filtered-grid.tsx +1 -1
  296. package/docs/patterns/guides-filter-panel--filtered-index.tsx +1 -1
  297. package/docs/patterns/guides-overlay-flows--notification-preferences.tsx +1 -1
  298. package/docs/patterns/guides-post-page--post-page.tsx +1 -1
  299. package/docs/patterns/guides-profile-typography--editorial-profile.tsx +1 -1
  300. package/docs/patterns/guides-resource-detail--detail.tsx +1 -1
  301. package/docs/patterns/index.json +177 -1
  302. package/package.json +1 -1
@@ -1,23 +1,23 @@
1
1
  "use client";
2
- import { motionTransition as e } from "../../../lib/motion.js";
3
- import { clusterHeightClasses as t } from "../../../lib/clusterScale.js";
2
+ import { clusterHeightClasses as e } from "../../../lib/clusterScale.js";
3
+ import { motionTransition as t } from "../../../lib/motion.js";
4
4
  //#region src/components/molecules/Chip/chipStyles.ts
5
5
  var n = [
6
6
  "sm",
7
7
  "md",
8
8
  "lg"
9
- ], r = "inline-flex shrink-0 items-center justify-center rounded-full font-sans font-medium tracking-normal transition-[background-color,box-shadow,color] " + e("fast"), i = {
10
- sm: `${t.sm} gap-1 px-2.5 text-xs leading-none`,
11
- md: `${t.md} gap-1.5 px-3 text-sm leading-none`,
12
- lg: `${t.lg} gap-2 px-4 text-sm leading-none`
9
+ ], r = "inline-flex shrink-0 items-center justify-center rounded-full font-sans font-medium tracking-normal transition-[background-color,box-shadow,color] " + t("fast"), i = {
10
+ sm: `${e.sm} gap-1 px-2.5 text-xs leading-none`,
11
+ md: `${e.md} gap-1.5 px-3 text-sm leading-none`,
12
+ lg: `${e.lg} gap-2 px-4 text-sm leading-none`
13
13
  }, a = {
14
14
  sm: "gap-1",
15
15
  md: "gap-1.5",
16
16
  lg: "gap-2"
17
17
  }, o = "cursor-pointer bg-surface text-fg shadow-hairline", s = "cursor-pointer text-muted hover:bg-ghost-hover", c = "border border-border bg-secondary text-secondary-foreground", l = {
18
- sm: `${t.sm} gap-0.5 pl-2.5 pr-1 text-xs leading-none`,
19
- md: `${t.md} gap-1 pl-3 pr-2 text-sm leading-none`,
20
- lg: `${t.lg} gap-1 pl-4 pr-2.5 text-sm leading-none`
18
+ sm: `${e.sm} gap-0.5 pl-2.5 pr-1 text-xs leading-none`,
19
+ md: `${e.md} gap-1 pl-3 pr-2 text-sm leading-none`,
20
+ lg: `${e.lg} gap-1 pl-4 pr-2.5 text-sm leading-none`
21
21
  };
22
22
  //#endregion
23
23
  export { r as chipBaseClasses, a as chipIconGapClasses, c as chipReadOnlyClasses, l as chipRemovableGapClasses, o as chipSelectedClasses, i as chipSizeClasses, n as chipSizes, s as chipUnselectedClasses };
@@ -0,0 +1,41 @@
1
+ export declare const copyFieldStates: readonly ["idle", "copied", "fallback"];
2
+ export type CopyFieldState = (typeof copyFieldStates)[number];
3
+ /** Idle button label. */
4
+ export declare const copyFieldCopyLabel = "Copy key";
5
+ /** Confirmation label. Holds for {@link buttonStatusHoldMs}, then returns to idle. */
6
+ export declare const copyFieldCopiedLabel = "Copied";
7
+ /** Shown when the Clipboard API is missing or blocked. */
8
+ export declare const copyFieldFallbackHint = "Press Cmd/Ctrl+C to copy.";
9
+ /** Layout-only — width, margin, flex placement. Not for color or type. */
10
+ export type CopyFieldLayoutClassName = string;
11
+ export interface CopyFieldProps {
12
+ /** Read-only value to show and copy. Never logged. */
13
+ value: string;
14
+ /** Visible label. Provide this or `aria-label`. */
15
+ label?: string;
16
+ /** Accessible name when `label` is omitted. */
17
+ "aria-label"?: string;
18
+ /** Idle button label. @default "Copy key" */
19
+ copyLabel?: string;
20
+ /** Confirmation label. @default "Copied" */
21
+ copiedLabel?: string;
22
+ /**
23
+ * Hint when the Clipboard API is missing or blocked.
24
+ * @default "Press Cmd/Ctrl+C to copy."
25
+ */
26
+ fallbackHint?: string;
27
+ /**
28
+ * Pin the appearance. Omit so a click copies and "Copied" returns to idle
29
+ * after `buttonStatusHoldMs` (2s). `"copied"` and `"fallback"` are for specimens.
30
+ */
31
+ state?: CopyFieldState;
32
+ id?: string;
33
+ className?: CopyFieldLayoutClassName;
34
+ }
35
+ /**
36
+ * Read-only monospace value plus a button that copies it.
37
+ * The button sits inside the pill, at the trailing end, the way PromptBar seats send.
38
+ * The value is never written to the console.
39
+ */
40
+ export declare const CopyField: import("react").ForwardRefExoticComponent<CopyFieldProps & import("react").RefAttributes<HTMLInputElement>>;
41
+ //# sourceMappingURL=CopyField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CopyField.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/CopyField/CopyField.tsx"],"names":[],"mappings":"AAwBA,eAAO,MAAM,eAAe,yCAA0C,CAAC;AAEvE,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9D,yBAAyB;AACzB,eAAO,MAAM,kBAAkB,aAAa,CAAC;AAE7C,sFAAsF;AACtF,eAAO,MAAM,oBAAoB,WAAW,CAAC;AAE7C,0DAA0D;AAC1D,eAAO,MAAM,qBAAqB,8BAA8B,CAAC;AAEjE,0EAA0E;AAC1E,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC;AAE9C,MAAM,WAAW,cAAc;IAC7B,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,wBAAwB,CAAC;CACtC;AAmBD;;;;GAIG;AACH,eAAO,MAAM,SAAS,6GAwJpB,CAAC"}
@@ -0,0 +1,120 @@
1
+ "use client";
2
+ import { cn as e } from "../../../lib/cn.js";
3
+ import { buttonStatusHoldMs as t } from "../../atoms/Button/buttonStatusStyles.js";
4
+ import { Button as n } from "../../atoms/Button/Button.js";
5
+ import { Input as r } from "../../atoms/Input/Input.js";
6
+ import { copyFieldButtonClasses as i, copyFieldClasses as a, copyFieldHintClasses as o, copyFieldLabelClasses as s, copyFieldShellClasses as c, copyFieldValueClasses as l } from "./copyFieldStyles.js";
7
+ import { forwardRef as u, useCallback as d, useEffect as f, useId as p, useRef as m, useState as h } from "react";
8
+ import { Copy as g } from "lucide-react";
9
+ import { jsx as _, jsxs as v } from "react/jsx-runtime";
10
+ //#region src/components/molecules/CopyField/CopyField.tsx
11
+ var y = [
12
+ "idle",
13
+ "copied",
14
+ "fallback"
15
+ ], b = "Copy key", x = "Copied", S = "Press Cmd/Ctrl+C to copy.";
16
+ function C() {
17
+ if (typeof navigator > "u") return null;
18
+ let e = navigator.clipboard;
19
+ return e == null || typeof e.writeText != "function" ? null : (t) => e.writeText(t);
20
+ }
21
+ function w(e) {
22
+ e.select();
23
+ let t = e.value.length;
24
+ try {
25
+ e.setSelectionRange(0, t);
26
+ } catch {}
27
+ }
28
+ var T = u(function({ value: u, label: y, "aria-label": T, copyLabel: E = b, copiedLabel: D = x, fallbackHint: O = S, state: k, id: A, className: j }, M) {
29
+ let N = p(), P = p(), F = p(), I = A ?? F, L = m(null), R = m(!0), [z, B] = h("idle"), V = k !== void 0, H = k ?? z, U = d((e) => {
30
+ L.current = e, typeof M == "function" ? M(e) : M != null && (M.current = e);
31
+ }, [M]);
32
+ f(() => (R.current = !0, () => {
33
+ R.current = !1;
34
+ }), []), f(() => {
35
+ if (V || z !== "copied") return;
36
+ let e = window.setTimeout(() => B("idle"), t);
37
+ return () => window.clearTimeout(e);
38
+ }, [V, z]), f(() => {
39
+ if (H !== "fallback") return;
40
+ let e = L.current;
41
+ e != null && (e.focus(), w(e));
42
+ }, [H]);
43
+ let W = H === "copied" ? "success" : "idle";
44
+ async function G() {
45
+ let e = C();
46
+ if (e != null) try {
47
+ if (await e(u), !R.current || V) return;
48
+ B("copied");
49
+ return;
50
+ } catch {}
51
+ if (!R.current) return;
52
+ let t = L.current;
53
+ if (t != null) {
54
+ t.focus(), w(t);
55
+ try {
56
+ document.execCommand("copy");
57
+ } catch {}
58
+ }
59
+ !R.current || V || B("fallback");
60
+ }
61
+ return /* @__PURE__ */ v("div", {
62
+ className: e(a, j),
63
+ children: [
64
+ y == null ? null : /* @__PURE__ */ _("label", {
65
+ id: P,
66
+ htmlFor: I,
67
+ className: s,
68
+ children: y
69
+ }),
70
+ /* @__PURE__ */ v("div", {
71
+ className: c,
72
+ children: [/* @__PURE__ */ _(r, {
73
+ ref: U,
74
+ id: I,
75
+ inline: !0,
76
+ mono: !0,
77
+ readOnly: !0,
78
+ value: u,
79
+ "aria-labelledby": y == null ? void 0 : P,
80
+ "aria-label": y == null ? T : void 0,
81
+ spellCheck: !1,
82
+ autoComplete: "off",
83
+ "aria-describedby": H === "fallback" ? N : void 0,
84
+ className: l,
85
+ onFocus: () => {
86
+ let e = L.current;
87
+ e != null && w(e);
88
+ },
89
+ onMouseUp: (e) => {
90
+ e.preventDefault();
91
+ }
92
+ }), /* @__PURE__ */ _(n, {
93
+ type: "button",
94
+ role: "secondary",
95
+ size: "sm",
96
+ icon: /* @__PURE__ */ _(g, { strokeWidth: 2 }),
97
+ status: W,
98
+ statusLabels: { success: D },
99
+ className: i,
100
+ onKeyDown: (e) => {
101
+ e.repeat || (e.key === "Enter" || e.key === " ") && (e.metaKey || e.ctrlKey || e.altKey || (e.preventDefault(), e.currentTarget.click()));
102
+ },
103
+ onClick: () => {
104
+ G();
105
+ },
106
+ children: E
107
+ })]
108
+ }),
109
+ /* @__PURE__ */ _("p", {
110
+ id: N,
111
+ role: "status",
112
+ "aria-live": "polite",
113
+ className: e(o, H !== "fallback" && "sr-only"),
114
+ children: H === "fallback" ? O : ""
115
+ })
116
+ ]
117
+ });
118
+ });
119
+ //#endregion
120
+ export { T as CopyField, x as copyFieldCopiedLabel, b as copyFieldCopyLabel, S as copyFieldFallbackHint, y as copyFieldStates };
@@ -0,0 +1,28 @@
1
+ /** Label, pill, and the blocked-clipboard hint. */
2
+ export declare const copyFieldClasses = "flex w-full min-w-0 flex-col gap-2";
3
+ /**
4
+ * Same type step as an Input label (`type-label`). Color is inherited, not `text-fg`,
5
+ * so a parent `text-on-brand` paints the label on a navy field.
6
+ */
7
+ export declare const copyFieldLabelClasses = "type-label";
8
+ /**
9
+ * PromptBar's pill. The shell owns the border, radius, and the one inset focus ring.
10
+ * `pl-5` is the same leading inset as a PromptBar with no start slot.
11
+ */
12
+ export declare const copyFieldShellClasses: string;
13
+ /**
14
+ * Value track inside the shell. `min-w-0` + `truncate` keep a long key in the track
15
+ * so it never runs under the button, including at 390px.
16
+ */
17
+ export declare const copyFieldValueClasses = "h-9 min-h-9 w-full min-w-0 flex-1 truncate px-0 py-0";
18
+ /**
19
+ * Trailing seat — PromptBar's send control. `shrink-0` holds the button's width.
20
+ * The shell owns the focus ring, so the button drops its own.
21
+ */
22
+ export declare const copyFieldButtonClasses: string;
23
+ /**
24
+ * Blocked-clipboard hint. Supporting type, color inherited (same reason as the label).
25
+ * Hidden from layout until shown.
26
+ */
27
+ export declare const copyFieldHintClasses = "type-supporting";
28
+ //# sourceMappingURL=copyFieldStyles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copyFieldStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/CopyField/copyFieldStyles.ts"],"names":[],"mappings":"AAOA,mDAAmD;AACnD,eAAO,MAAM,gBAAgB,uCAAuC,CAAC;AAErE;;;GAGG;AACH,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAElD;;;GAGG;AACH,eAAO,MAAM,qBAAqB,QAAiE,CAAC;AAEpG;;;GAGG;AACH,eAAO,MAAM,qBAAqB,yDAAyD,CAAC;AAE5F;;;GAGG;AACH,eAAO,MAAM,sBAAsB,QAAuC,CAAC;AAE3E;;;GAGG;AACH,eAAO,MAAM,oBAAoB,oBAAoB,CAAC"}
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ import { cn as e } from "../../../lib/cn.js";
3
+ import { promptBarSendClasses as t, promptBarShellClasses as n, promptBarShellStartPadClasses as r } from "../PromptBar/promptBarStyles.js";
4
+ //#region src/components/molecules/CopyField/copyFieldStyles.ts
5
+ var i = "flex w-full min-w-0 flex-col gap-2", a = "type-label", o = e(n, r.field), s = "h-9 min-h-9 w-full min-w-0 flex-1 truncate px-0 py-0", c = e(t, "shrink-0"), l = "type-supporting";
6
+ //#endregion
7
+ export { c as copyFieldButtonClasses, i as copyFieldClasses, l as copyFieldHintClasses, a as copyFieldLabelClasses, o as copyFieldShellClasses, s as copyFieldValueClasses };
@@ -1,5 +1,5 @@
1
1
  import { type DisplayControlThemeMode } from "./displayControlsState";
2
- export { displayControlThemeModes, nextDisplayControlThemeMode, type DisplayControlThemeMode, } from "./displayControlsState";
2
+ export { applyDisplayTheme, commitDisplayTheme, displayControlThemeModes, displayThemeNoFlashScript, displayThemeStorageKey, nextDisplayControlThemeMode, persistDisplayTheme, readDisplayTheme, subscribeDisplayTheme, type DisplayControlThemeMode, } from "./displayControlsState";
3
3
  /** Layout-only — fixed/absolute placement and margin; not for re-theming. */
4
4
  export type DisplayControlsLayoutClassName = string;
5
5
  export interface DisplayControlsLabels {
@@ -11,17 +11,26 @@ export interface DisplayControlsLabels {
11
11
  light: string;
12
12
  dark: string;
13
13
  }
14
- export interface DisplayControlsProps {
15
- gridVisible: boolean;
16
- onGridVisibleChange: (visible: boolean) => void;
14
+ type DisplayControlsSharedProps = {
17
15
  theme: DisplayControlThemeMode;
18
16
  onThemeChange: (theme: DisplayControlThemeMode) => void;
19
- /** Enables global `g` and `t` shortcuts. Default: true. */
17
+ /** Enables global shortcuts. Default: true. `G` is only active for `controls="display"`. */
20
18
  keyboardShortcuts?: boolean;
21
19
  labels?: Partial<DisplayControlsLabels>;
22
20
  "aria-label"?: string;
23
21
  /** Layout-only: fixed/absolute placement and margin. */
24
22
  className?: DisplayControlsLayoutClassName;
25
- }
26
- export declare function DisplayControls({ gridVisible, onGridVisibleChange, theme, onThemeChange, keyboardShortcuts, labels: labelsProp, "aria-label": ariaLabel, className, }: DisplayControlsProps): import("react").JSX.Element;
23
+ };
24
+ export type DisplayControlsProps = DisplayControlsSharedProps & ({
25
+ /** Grid guide plus theme. Default. */
26
+ controls?: "display";
27
+ gridVisible: boolean;
28
+ onGridVisibleChange: (visible: boolean) => void;
29
+ } | {
30
+ /** Theme only — appearance in a sidebar footer. No grid button, no `G`. */
31
+ controls: "theme";
32
+ gridVisible?: boolean;
33
+ onGridVisibleChange?: (visible: boolean) => void;
34
+ });
35
+ export declare function DisplayControls({ controls, gridVisible, onGridVisibleChange, theme, onThemeChange, keyboardShortcuts, labels: labelsProp, "aria-label": ariaLabel, className, }: DisplayControlsProps): import("react").JSX.Element;
27
36
  //# sourceMappingURL=DisplayControls.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DisplayControls.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/DisplayControls/DisplayControls.tsx"],"names":[],"mappings":"AAIA,OAAO,EAGL,KAAK,uBAAuB,EAC7B,MAAM,wBAAwB,CAAC;AAOhC,OAAO,EACL,wBAAwB,EACxB,2BAA2B,EAC3B,KAAK,uBAAuB,GAC7B,MAAM,wBAAwB,CAAC;AAEhC,6EAA6E;AAC7E,MAAM,MAAM,8BAA8B,GAAG,MAAM,CAAC;AAEpD,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,OAAO,CAAC;IACrB,mBAAmB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,KAAK,EAAE,uBAAuB,CAAC;IAC/B,aAAa,EAAE,CAAC,KAAK,EAAE,uBAAuB,KAAK,IAAI,CAAC;IACxD,2DAA2D;IAC3D,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wDAAwD;IACxD,SAAS,CAAC,EAAE,8BAA8B,CAAC;CAC5C;AAYD,wBAAgB,eAAe,CAAC,EAC9B,WAAW,EACX,mBAAmB,EACnB,KAAK,EACL,aAAa,EACb,iBAAwB,EACxB,MAAM,EAAE,UAAU,EAClB,YAAY,EAAE,SAA8B,EAC5C,SAAS,GACV,EAAE,oBAAoB,+BA+DtB"}
1
+ {"version":3,"file":"DisplayControls.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/DisplayControls/DisplayControls.tsx"],"names":[],"mappings":"AAIA,OAAO,EAGL,KAAK,uBAAuB,EAC7B,MAAM,wBAAwB,CAAC;AAOhC,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,EACxB,yBAAyB,EACzB,sBAAsB,EACtB,2BAA2B,EAC3B,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,EACrB,KAAK,uBAAuB,GAC7B,MAAM,wBAAwB,CAAC;AAEhC,6EAA6E;AAC7E,MAAM,MAAM,8BAA8B,GAAG,MAAM,CAAC;AAEpD,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,KAAK,0BAA0B,GAAG;IAChC,KAAK,EAAE,uBAAuB,CAAC;IAC/B,aAAa,EAAE,CAAC,KAAK,EAAE,uBAAuB,KAAK,IAAI,CAAC;IACxD,4FAA4F;IAC5F,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wDAAwD;IACxD,SAAS,CAAC,EAAE,8BAA8B,CAAC;CAC5C,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,0BAA0B,GAC3D,CACI;IACE,sCAAsC;IACtC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IACrB,mBAAmB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CACjD,GACD;IACE,2EAA2E;IAC3E,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,mBAAmB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAClD,CACJ,CAAC;AAYJ,wBAAgB,eAAe,CAAC,EAC9B,QAAoB,EACpB,WAAmB,EACnB,mBAAmB,EACnB,KAAK,EACL,aAAa,EACb,iBAAwB,EACxB,MAAM,EAAE,UAAU,EAClB,YAAY,EAAE,SAA8B,EAC5C,SAAS,GACV,EAAE,oBAAoB,+BAoEtB"}
@@ -2,12 +2,12 @@
2
2
  import { cn as e } from "../../../lib/cn.js";
3
3
  import { Button as t } from "../../atoms/Button/Button.js";
4
4
  import { Kbd as n } from "../../atoms/Kbd/Kbd.js";
5
- import { displayControlShortcutFromEvent as r, displayControlThemeModes as i, nextDisplayControlThemeMode as a } from "./displayControlsState.js";
6
- import { displayControlsButtonContentClasses as o, displayControlsLabelClasses as s, displayControlsRootClasses as c } from "./displayControlsStyles.js";
7
- import { useEffect as l } from "react";
8
- import { jsx as u, jsxs as d } from "react/jsx-runtime";
5
+ import { applyDisplayTheme as r, commitDisplayTheme as i, displayControlShortcutFromEvent as a, displayControlThemeModes as o, displayThemeNoFlashScript as s, displayThemeStorageKey as c, nextDisplayControlThemeMode as l, persistDisplayTheme as u, readDisplayTheme as d, subscribeDisplayTheme as f } from "./displayControlsState.js";
6
+ import { displayControlsButtonContentClasses as p, displayControlsLabelClasses as m, displayControlsRootClasses as h } from "./displayControlsStyles.js";
7
+ import { useEffect as g } from "react";
8
+ import { jsx as _, jsxs as v } from "react/jsx-runtime";
9
9
  //#region src/components/molecules/DisplayControls/DisplayControls.tsx
10
- var f = {
10
+ var y = {
11
11
  grid: "Grid",
12
12
  showGrid: "Show grid",
13
13
  hideGrid: "Hide grid",
@@ -16,61 +16,63 @@ var f = {
16
16
  light: "Light",
17
17
  dark: "Dark"
18
18
  };
19
- function p({ gridVisible: i, onGridVisibleChange: p, theme: m, onThemeChange: h, keyboardShortcuts: g = !0, labels: _, "aria-label": v = "Display controls", className: y }) {
20
- let b = {
21
- ...f,
22
- ..._
23
- };
24
- return l(() => {
25
- if (!g) return;
19
+ function b({ controls: r = "display", gridVisible: i = !1, onGridVisibleChange: o, theme: s, onThemeChange: c, keyboardShortcuts: u = !0, labels: d, "aria-label": f = "Display controls", className: b }) {
20
+ let x = {
21
+ ...y,
22
+ ...d
23
+ }, S = r === "theme";
24
+ return g(() => {
25
+ if (!u) return;
26
26
  let e = (e) => {
27
- let t = r(e);
27
+ let t = a(e);
28
28
  if (t != null) {
29
- if (e.preventDefault(), t === "grid") {
30
- p(!i);
29
+ if (t === "grid") {
30
+ if (S || o == null) return;
31
+ e.preventDefault(), o(!i);
31
32
  return;
32
33
  }
33
- h(a(m));
34
+ e.preventDefault(), c(l(s));
34
35
  }
35
36
  };
36
37
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
37
38
  }, [
38
39
  i,
39
- g,
40
- p,
41
- h,
42
- m
43
- ]), /* @__PURE__ */ d("div", {
40
+ u,
41
+ o,
42
+ c,
43
+ s,
44
+ S
45
+ ]), /* @__PURE__ */ v("div", {
44
46
  role: "group",
45
- "aria-label": v,
46
- className: e(c, y),
47
- "data-theme-mode": m,
48
- children: [/* @__PURE__ */ u(t, {
47
+ "aria-label": f,
48
+ className: e(h, b),
49
+ "data-theme-mode": s,
50
+ children: [S ? null : /* @__PURE__ */ _(t, {
49
51
  role: "secondary",
50
52
  size: "sm",
51
- "aria-label": i ? b.hideGrid : b.showGrid,
53
+ "aria-label": i ? x.hideGrid : x.showGrid,
52
54
  "aria-pressed": i,
53
55
  "aria-keyshortcuts": "G",
54
- onClick: () => p(!i),
55
- children: /* @__PURE__ */ d("span", {
56
- className: o,
57
- children: [/* @__PURE__ */ u(n, { children: "G" }), /* @__PURE__ */ u("span", { children: b.grid })]
56
+ onClick: () => o?.(!i),
57
+ children: /* @__PURE__ */ v("span", {
58
+ className: p,
59
+ children: [/* @__PURE__ */ _(n, { children: "G" }), /* @__PURE__ */ _("span", { children: x.grid })]
58
60
  })
59
- }), /* @__PURE__ */ u(t, {
61
+ }), /* @__PURE__ */ _(t, {
60
62
  role: "secondary",
61
63
  size: "sm",
62
- "aria-label": `${b.theme}: ${b[m]}`,
64
+ "aria-label": `${x.theme}: ${x[s]}`,
63
65
  "aria-keyshortcuts": "T",
64
- onClick: () => h(a(m)),
65
- children: /* @__PURE__ */ d("span", {
66
- className: o,
67
- children: [/* @__PURE__ */ u(n, { children: "T" }), /* @__PURE__ */ u("span", {
68
- className: s,
69
- children: b[m]
66
+ onClick: () => c(l(s)),
67
+ children: /* @__PURE__ */ v("span", {
68
+ className: p,
69
+ children: [/* @__PURE__ */ _(n, { children: "T" }), /* @__PURE__ */ _("span", {
70
+ className: m,
71
+ children: x[s]
70
72
  })]
71
73
  })
72
74
  })]
73
75
  });
74
76
  }
75
77
  //#endregion
76
- export { p as DisplayControls, i as displayControlThemeModes, a as nextDisplayControlThemeMode };
78
+ export { b as DisplayControls, r as applyDisplayTheme, i as commitDisplayTheme, o as displayControlThemeModes, s as displayThemeNoFlashScript, c as displayThemeStorageKey, l as nextDisplayControlThemeMode, u as persistDisplayTheme, d as readDisplayTheme, f as subscribeDisplayTheme };
@@ -1,5 +1,26 @@
1
1
  export declare const displayControlThemeModes: readonly ["auto", "light", "dark"];
2
2
  export type DisplayControlThemeMode = (typeof displayControlThemeModes)[number];
3
+ /** `localStorage` key for the appearance choice. The no-flash snippet reads the same key. */
4
+ export declare const displayThemeStorageKey = "wmds-theme";
5
+ /**
6
+ * Paste into `<head>` before the stylesheet so the first paint matches the saved
7
+ * appearance. `auto` and a missing key follow `prefers-color-scheme`. `light` clears
8
+ * `data-theme`. `dark` sets it. No new color — the attribute swaps the existing tokens.
9
+ */
10
+ export declare const displayThemeNoFlashScript = "(function(){try{var t=localStorage.getItem(\"wmds-theme\");var dark=t===\"dark\"||(t!==\"light\"&&window.matchMedia(\"(prefers-color-scheme: dark)\").matches);var root=document.documentElement;if(dark)root.setAttribute(\"data-theme\",\"dark\");else root.removeAttribute(\"data-theme\");}catch(e){}})();";
11
+ /** Saved appearance. `auto` when nothing valid is stored or storage is blocked. */
12
+ export declare function readDisplayTheme(): DisplayControlThemeMode;
13
+ /** Remembers the appearance. Storage failures leave the attribute change intact. */
14
+ export declare function persistDisplayTheme(mode: DisplayControlThemeMode): void;
15
+ /**
16
+ * Sets or clears `data-theme` on `<html>`. `light` clears it (the default tokens).
17
+ * `dark` sets it. `auto` follows the system and keeps listening until the next call.
18
+ */
19
+ export declare function applyDisplayTheme(mode: DisplayControlThemeMode): void;
20
+ /** Subscribe to `commitDisplayTheme`. Pair with `useSyncExternalStore`. */
21
+ export declare function subscribeDisplayTheme(listener: () => void): () => void;
22
+ /** Saves the choice, applies it, and notifies subscribers. One call from a theme control. */
23
+ export declare function commitDisplayTheme(mode: DisplayControlThemeMode): void;
3
24
  export type DisplayControlShortcut = "grid" | "theme";
4
25
  export declare function nextDisplayControlThemeMode(current: DisplayControlThemeMode): DisplayControlThemeMode;
5
26
  export declare function displayControlShortcutFromEvent(event: Pick<KeyboardEvent, "key" | "metaKey" | "ctrlKey" | "altKey" | "target">): DisplayControlShortcut | null;
@@ -1 +1 @@
1
- {"version":3,"file":"displayControlsState.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/DisplayControls/displayControlsState.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,wBAAwB,oCAAqC,CAAC;AAE3E,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AAChF,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,OAAO,CAAC;AAEtD,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,uBAAuB,GAC/B,uBAAuB,CAKzB;AAED,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,KAAK,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC,GAC9E,sBAAsB,GAAG,IAAI,CAQ/B"}
1
+ {"version":3,"file":"displayControlsState.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/DisplayControls/displayControlsState.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,wBAAwB,oCAAqC,CAAC;AAE3E,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhF,6FAA6F;AAC7F,eAAO,MAAM,sBAAsB,eAAe,CAAC;AAEnD;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,mTAC8P,CAAC;AAMrS,mFAAmF;AACnF,wBAAgB,gBAAgB,IAAI,uBAAuB,CAQ1D;AAED,oFAAoF;AACpF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,uBAAuB,GAAG,IAAI,CAMvE;AAID;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,uBAAuB,GAAG,IAAI,CAuBrE;AAID,2EAA2E;AAC3E,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAKtE;AAED,6FAA6F;AAC7F,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,uBAAuB,GAAG,IAAI,CAItE;AAED,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,OAAO,CAAC;AAEtD,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,uBAAuB,GAC/B,uBAAuB,CAKzB;AAED,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,KAAK,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC,GAC9E,sBAAsB,GAAG,IAAI,CAQ/B"}
@@ -5,14 +5,56 @@ var t = [
5
5
  "auto",
6
6
  "light",
7
7
  "dark"
8
- ];
9
- function n(e) {
8
+ ], n = "wmds-theme", r = "(function(){try{var t=localStorage.getItem(\"wmds-theme\");var dark=t===\"dark\"||(t!==\"light\"&&window.matchMedia(\"(prefers-color-scheme: dark)\").matches);var root=document.documentElement;if(dark)root.setAttribute(\"data-theme\",\"dark\");else root.removeAttribute(\"data-theme\");}catch(e){}})();";
9
+ function i(e) {
10
+ return e === "auto" || e === "light" || e === "dark";
11
+ }
12
+ function a() {
13
+ try {
14
+ let e = localStorage.getItem(n);
15
+ if (i(e)) return e;
16
+ } catch {}
17
+ return "auto";
18
+ }
19
+ function o(e) {
20
+ try {
21
+ localStorage.setItem(n, e);
22
+ } catch {}
23
+ }
24
+ var s = null;
25
+ function c(e) {
26
+ if (s?.(), s = null, typeof document > "u") return;
27
+ let t = document.documentElement;
28
+ if (e === "dark") {
29
+ t.setAttribute("data-theme", "dark");
30
+ return;
31
+ }
32
+ if (e === "light") {
33
+ t.removeAttribute("data-theme");
34
+ return;
35
+ }
36
+ let n = window.matchMedia("(prefers-color-scheme: dark)"), r = () => {
37
+ n.matches ? t.setAttribute("data-theme", "dark") : t.removeAttribute("data-theme");
38
+ };
39
+ r(), n.addEventListener("change", r), s = () => n.removeEventListener("change", r);
40
+ }
41
+ var l = /* @__PURE__ */ new Set();
42
+ function u(e) {
43
+ return l.add(e), () => {
44
+ l.delete(e);
45
+ };
46
+ }
47
+ function d(e) {
48
+ o(e), c(e);
49
+ for (let e of l) e();
50
+ }
51
+ function f(e) {
10
52
  return t[(t.indexOf(e) + 1) % t.length];
11
53
  }
12
- function r(t) {
54
+ function p(t) {
13
55
  if (t.metaKey || t.ctrlKey || t.altKey || e(t.target)) return null;
14
56
  let n = t.key.toLowerCase();
15
57
  return n === "g" ? "grid" : n === "t" ? "theme" : null;
16
58
  }
17
59
  //#endregion
18
- export { r as displayControlShortcutFromEvent, t as displayControlThemeModes, n as nextDisplayControlThemeMode };
60
+ export { c as applyDisplayTheme, d as commitDisplayTheme, p as displayControlShortcutFromEvent, t as displayControlThemeModes, r as displayThemeNoFlashScript, n as displayThemeStorageKey, f as nextDisplayControlThemeMode, o as persistDisplayTheme, a as readDisplayTheme, u as subscribeDisplayTheme };
@@ -0,0 +1,31 @@
1
+ import { type ReactNode } from "react";
2
+ /** Layout-only — height and margin. Not for re-theming the log. */
3
+ export type LogViewLayoutClassName = string;
4
+ export interface LogViewLabels {
5
+ copy: string;
6
+ copied: string;
7
+ follow: string;
8
+ following: string;
9
+ empty: string;
10
+ }
11
+ export interface LogViewProps {
12
+ /** Log text, one entry per line. */
13
+ lines: readonly string[];
14
+ /** Accessible name of the log, for example "Scan log". */
15
+ label: string;
16
+ /** When true, the scroller stays on the last line. */
17
+ follow?: boolean;
18
+ onFollowChange?: (follow: boolean) => void;
19
+ /** Skeleton in the scroller. The line count stays hidden. */
20
+ loading?: boolean;
21
+ /** Replaces the lines when there are none. Default: "No log lines". */
22
+ empty?: ReactNode;
23
+ labels?: Partial<LogViewLabels>;
24
+ className?: LogViewLayoutClassName;
25
+ }
26
+ /**
27
+ * Scrolling log — line numbers, a tabular count, Copy, and Follow.
28
+ * Compose it inside a dark detail pane. The pane owns `data-theme`.
29
+ */
30
+ export declare function LogView({ lines, label, follow, onFollowChange, loading, empty, labels: labelsProp, className, }: LogViewProps): import("react").JSX.Element;
31
+ //# sourceMappingURL=LogView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LogView.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/LogView/LogView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAiB1E,mEAAmE;AACnE,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC;AAE5C,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,oCAAoC;IACpC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,0DAA0D;IAC1D,KAAK,EAAE,MAAM,CAAC;IACd,sDAAsD;IACtD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,6DAA6D;IAC7D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,uEAAuE;IACvE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IAChC,SAAS,CAAC,EAAE,sBAAsB,CAAC;CACpC;AAcD;;;GAGG;AACH,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,KAAK,EACL,MAAc,EACd,cAAc,EACd,OAAe,EACf,KAAK,EACL,MAAM,EAAE,UAAU,EAClB,SAAS,GACV,EAAE,YAAY,+BAsFd"}
@@ -0,0 +1,109 @@
1
+ "use client";
2
+ import { cn as e } from "../../../lib/cn.js";
3
+ import { buttonStatusHoldMs as t } from "../../atoms/Button/buttonStatusStyles.js";
4
+ import { Button as n } from "../../atoms/Button/Button.js";
5
+ import { Skeleton as r } from "../../atoms/Skeleton/Skeleton.js";
6
+ import { logViewActionsClasses as i, logViewCountClasses as a, logViewEmptyClasses as o, logViewLineClasses as s, logViewNumberClasses as c, logViewRootClasses as l, logViewScrollerClasses as u, logViewTextClasses as d, logViewToolbarClasses as f } from "./logViewStyles.js";
7
+ import { useLayoutEffect as p, useRef as m, useState as h } from "react";
8
+ import { jsx as g, jsxs as _ } from "react/jsx-runtime";
9
+ //#region src/components/molecules/LogView/LogView.tsx
10
+ var v = {
11
+ copy: "Copy",
12
+ copied: "Copied",
13
+ follow: "Follow",
14
+ following: "Following",
15
+ empty: "No log lines"
16
+ };
17
+ function y(e) {
18
+ return e === 1 ? "1 line" : `${e} lines`;
19
+ }
20
+ function b({ lines: b, label: x, follow: S = !1, onFollowChange: C, loading: w = !1, empty: T, labels: E, className: D }) {
21
+ let O = {
22
+ ...v,
23
+ ...E
24
+ }, k = m(null), [A, j] = h(!1), M = b.length, N = !w && M > 0;
25
+ p(() => {
26
+ if (!S || !N) return;
27
+ let e = k.current;
28
+ e != null && (e.scrollTop = e.scrollHeight);
29
+ }, [
30
+ S,
31
+ b,
32
+ N
33
+ ]), p(() => {
34
+ if (!A) return;
35
+ let e = window.setTimeout(() => j(!1), t);
36
+ return () => window.clearTimeout(e);
37
+ }, [A]);
38
+ async function P() {
39
+ let e = b.join("\n");
40
+ try {
41
+ await navigator.clipboard.writeText(e), j(!0);
42
+ } catch {
43
+ j(!1);
44
+ }
45
+ }
46
+ return /* @__PURE__ */ _("div", {
47
+ className: e(l, D),
48
+ "data-follow": S ? "" : void 0,
49
+ children: [/* @__PURE__ */ _("div", {
50
+ className: f,
51
+ children: [w ? null : /* @__PURE__ */ g("span", {
52
+ className: a,
53
+ children: y(M)
54
+ }), /* @__PURE__ */ _("div", {
55
+ className: i,
56
+ children: [/* @__PURE__ */ g(n, {
57
+ role: "secondary",
58
+ size: "xs",
59
+ type: "button",
60
+ disabled: w || M === 0,
61
+ onClick: () => {
62
+ P();
63
+ },
64
+ children: A ? O.copied : O.copy
65
+ }), /* @__PURE__ */ g(n, {
66
+ role: "ghost",
67
+ size: "xs",
68
+ type: "button",
69
+ "aria-pressed": S,
70
+ disabled: w,
71
+ onClick: () => C?.(!S),
72
+ children: S ? O.following : O.follow
73
+ })]
74
+ })]
75
+ }), /* @__PURE__ */ _("div", {
76
+ ref: k,
77
+ className: u,
78
+ role: "log",
79
+ "aria-label": x,
80
+ "aria-busy": w || void 0,
81
+ children: [
82
+ w ? /* @__PURE__ */ g(r, {
83
+ className: "m-3",
84
+ width: "100%",
85
+ height: 96,
86
+ radius: "inner"
87
+ }) : null,
88
+ !w && M === 0 ? /* @__PURE__ */ g("p", {
89
+ className: o,
90
+ role: "status",
91
+ children: T ?? O.empty
92
+ }) : null,
93
+ N ? b.map((e, t) => /* @__PURE__ */ _("div", {
94
+ className: s,
95
+ children: [/* @__PURE__ */ g("span", {
96
+ className: c,
97
+ "aria-hidden": "true",
98
+ children: t + 1
99
+ }), /* @__PURE__ */ g("span", {
100
+ className: d,
101
+ children: e
102
+ })]
103
+ }, `${t}-${e}`)) : null
104
+ ]
105
+ })]
106
+ });
107
+ }
108
+ //#endregion
109
+ export { b as LogView };