basalt-ui 2.27.2 → 2.28.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 (238) hide show
  1. package/CHANGELOG.md +99 -0
  2. package/MIGRATING.md +168 -12
  3. package/agent/rules/basalt-batteries.md +1 -1
  4. package/agent/rules/basalt-mantine.md +1 -1
  5. package/agent/rules/basalt-tokens.md +2 -2
  6. package/agent/skills/basalt-design/SKILL.md +1 -1
  7. package/agent/skills/basalt-design/references/catalogue.md +40 -36
  8. package/agent/skills/basalt-design/references/recipes.md +47 -0
  9. package/configs/oxlint-basalt.json +2 -1
  10. package/configs/oxlint-plugin.js +110 -2
  11. package/configs/oxlint-plugin.test.ts +99 -4
  12. package/dist/agent/chat/thread-message.d.ts +1 -160
  13. package/dist/agent/chat/thread-message.d.ts.map +1 -1
  14. package/dist/agent/chat/thread-message.js +7 -162
  15. package/dist/agent/chat/virtualize.d.ts +5 -5
  16. package/dist/charts/ChartCard.d.ts +5 -2
  17. package/dist/charts/ChartCard.d.ts.map +1 -1
  18. package/dist/charts/ChartCard.js +46 -13
  19. package/dist/charts/Lines.d.ts.map +1 -1
  20. package/dist/charts/Lines.js +11 -4
  21. package/dist/charts/Sparkline.d.ts +9 -2
  22. package/dist/charts/Sparkline.d.ts.map +1 -1
  23. package/dist/charts/Sparkline.js +104 -41
  24. package/dist/charts/chart-box.module.css +50 -0
  25. package/dist/charts/chart-box.module.css.d.ts +5 -0
  26. package/dist/charts/chart-card.module.css +12 -4
  27. package/dist/charts/chart-card.module.css.d.ts +1 -0
  28. package/dist/charts/compile.d.ts.map +1 -1
  29. package/dist/charts/compile.js +20 -18
  30. package/dist/charts/labels.d.ts +13 -3
  31. package/dist/charts/labels.d.ts.map +1 -1
  32. package/dist/charts/labels.js +131 -20
  33. package/dist/charts/legend.d.ts.map +1 -1
  34. package/dist/charts/legend.js +1 -1
  35. package/dist/charts/ref-label.d.ts +31 -8
  36. package/dist/charts/ref-label.d.ts.map +1 -1
  37. package/dist/charts/ref-label.js +40 -9
  38. package/dist/charts/sparkline.module.css +6 -0
  39. package/dist/charts/state.d.ts +3 -3
  40. package/dist/charts/state.d.ts.map +1 -1
  41. package/dist/charts/state.js +20 -2
  42. package/dist/cli/shot/capture.d.ts +6 -1
  43. package/dist/cli/shot/capture.d.ts.map +1 -1
  44. package/dist/cli/shot/capture.js +18 -5
  45. package/dist/common/empty-copy.d.ts +16 -0
  46. package/dist/common/empty-copy.d.ts.map +1 -0
  47. package/dist/common/empty-copy.js +9 -0
  48. package/dist/common/virtual-rows.d.ts +196 -0
  49. package/dist/common/virtual-rows.d.ts.map +1 -0
  50. package/dist/common/virtual-rows.js +290 -0
  51. package/dist/controls/controls.module.css +33 -1
  52. package/dist/controls/controls.module.css.d.ts +2 -0
  53. package/dist/controls/enum-filter.d.ts.map +1 -1
  54. package/dist/controls/enum-filter.js +8 -2
  55. package/dist/controls/filter-pill.d.ts +27 -3
  56. package/dist/controls/filter-pill.d.ts.map +1 -1
  57. package/dist/controls/filter-pill.js +15 -4
  58. package/dist/controls/form-layout.d.ts +9 -3
  59. package/dist/controls/form-layout.d.ts.map +1 -1
  60. package/dist/controls/form-layout.js +74 -12
  61. package/dist/controls/form-layout.module.css +112 -7
  62. package/dist/controls/form-layout.module.css.d.ts +1 -0
  63. package/dist/controls/multi-select-filter.d.ts +2 -2
  64. package/dist/controls/multi-select-filter.d.ts.map +1 -1
  65. package/dist/controls/multi-select-filter.js +12 -6
  66. package/dist/controls/range-filter.d.ts +1 -1
  67. package/dist/controls/range-filter.d.ts.map +1 -1
  68. package/dist/controls/range-filter.js +8 -2
  69. package/dist/dashboard/bar-list.d.ts +1 -1
  70. package/dist/dashboard/bar-list.d.ts.map +1 -1
  71. package/dist/dashboard/bar-list.js +6 -2
  72. package/dist/dashboard/bar-list.module.css +0 -2
  73. package/dist/dashboard/board-nav.d.ts +22 -0
  74. package/dist/dashboard/board-nav.d.ts.map +1 -0
  75. package/dist/dashboard/board-nav.js +49 -0
  76. package/dist/dashboard/board.d.ts +52 -0
  77. package/dist/dashboard/board.d.ts.map +1 -0
  78. package/dist/dashboard/board.js +228 -0
  79. package/dist/dashboard/board.module.css +160 -0
  80. package/dist/dashboard/board.module.css.d.ts +26 -0
  81. package/dist/dashboard/empty-state.d.ts +3 -3
  82. package/dist/dashboard/empty-state.d.ts.map +1 -1
  83. package/dist/dashboard/empty-state.js +13 -6
  84. package/dist/dashboard/event-list-model.d.ts +51 -0
  85. package/dist/dashboard/event-list-model.d.ts.map +1 -0
  86. package/dist/dashboard/event-list-model.js +72 -0
  87. package/dist/dashboard/event-list-rows.d.ts +23 -0
  88. package/dist/dashboard/event-list-rows.d.ts.map +1 -0
  89. package/dist/dashboard/event-list-rows.js +93 -0
  90. package/dist/dashboard/event-list-scroll.d.ts +27 -0
  91. package/dist/dashboard/event-list-scroll.d.ts.map +1 -0
  92. package/dist/dashboard/event-list-scroll.js +103 -0
  93. package/dist/dashboard/event-list-skeleton.d.ts +10 -0
  94. package/dist/dashboard/event-list-skeleton.d.ts.map +1 -0
  95. package/dist/dashboard/event-list-skeleton.js +36 -0
  96. package/dist/dashboard/event-list.d.ts +65 -0
  97. package/dist/dashboard/event-list.d.ts.map +1 -0
  98. package/dist/dashboard/event-list.js +178 -0
  99. package/dist/dashboard/event-list.module.css +283 -0
  100. package/dist/dashboard/event-list.module.css.d.ts +33 -0
  101. package/dist/dashboard/index.d.ts +2 -0
  102. package/dist/dashboard/index.d.ts.map +1 -1
  103. package/dist/dashboard/index.js +4 -0
  104. package/dist/dashboard/meter-parts.d.ts.map +1 -1
  105. package/dist/dashboard/meter-parts.js +5 -3
  106. package/dist/dashboard/meter.module.css +2 -1
  107. package/dist/dashboard/query-state.js +1 -1
  108. package/dist/dashboard/settings-section.d.ts +4 -1
  109. package/dist/dashboard/settings-section.d.ts.map +1 -1
  110. package/dist/dashboard/settings-section.js +1 -1
  111. package/dist/dashboard/settings-section.module.css +19 -4
  112. package/dist/dashboard/stat-card-parts.d.ts +5 -1
  113. package/dist/dashboard/stat-card-parts.d.ts.map +1 -1
  114. package/dist/dashboard/stat-card-parts.js +8 -3
  115. package/dist/dashboard/stat-card.d.ts.map +1 -1
  116. package/dist/dashboard/stat-card.js +25 -6
  117. package/dist/dashboard/stat-card.module.css +31 -7
  118. package/dist/dashboard/stat-card.module.css.d.ts +3 -0
  119. package/dist/dashboard/stat-strip.module.css +4 -1
  120. package/dist/dashboard/widget-header.module.css +17 -1
  121. package/dist/guard/index.d.ts.map +1 -1
  122. package/dist/guard/index.js +2 -0
  123. package/dist/index.d.ts +1 -1
  124. package/dist/index.d.ts.map +1 -1
  125. package/dist/index.js +4 -0
  126. package/dist/shell/app-main.module.css +18 -0
  127. package/dist/styles.css +46 -0
  128. package/dist/surfaces.d.ts +2 -2
  129. package/dist/surfaces.d.ts.map +1 -1
  130. package/dist/surfaces.js +8 -2
  131. package/dist/table/cell-kinds.d.ts +44 -0
  132. package/dist/table/cell-kinds.d.ts.map +1 -0
  133. package/dist/table/cell-kinds.js +169 -0
  134. package/dist/table/cell-kinds.module.css +55 -0
  135. package/dist/table/cell-kinds.module.css.d.ts +15 -0
  136. package/dist/table/data-table-fold.d.ts +147 -0
  137. package/dist/table/data-table-fold.d.ts.map +1 -0
  138. package/dist/table/data-table-fold.js +288 -0
  139. package/dist/table/data-table-state.d.ts +10 -3
  140. package/dist/table/data-table-state.d.ts.map +1 -1
  141. package/dist/table/data-table-state.js +11 -6
  142. package/dist/table/data-table.d.ts +11 -26
  143. package/dist/table/data-table.d.ts.map +1 -1
  144. package/dist/table/data-table.js +354 -254
  145. package/dist/table/data-table.module.css +210 -3
  146. package/dist/table/data-table.module.css.d.ts +12 -0
  147. package/dist/table/table-features.d.ts +34 -4
  148. package/dist/table/table-features.d.ts.map +1 -1
  149. package/dist/table/table-features.js +10 -0
  150. package/dist/theme/card-inset.module.css +35 -0
  151. package/dist/theme/controls.module.css +32 -0
  152. package/dist/theme/ctl-theme.d.ts.map +1 -1
  153. package/dist/theme/ctl-theme.js +5 -0
  154. package/dist/theme/index.d.ts.map +1 -1
  155. package/dist/theme/index.js +14 -10
  156. package/dist/tokens/core.d.ts +1 -0
  157. package/dist/tokens/core.d.ts.map +1 -1
  158. package/dist/tokens/core.js +1 -0
  159. package/dist/tokens/derive.js +1 -1
  160. package/dist/tokens/palette.d.ts +2 -1
  161. package/dist/tokens/palette.d.ts.map +1 -1
  162. package/llms.txt +34 -5
  163. package/package.json +1 -1
  164. package/src/agent/chat/thread-message.tsx +10 -403
  165. package/src/agent/chat/virtualize.ts +5 -5
  166. package/src/charts/ChartCard.tsx +79 -17
  167. package/src/charts/Lines.tsx +13 -4
  168. package/src/charts/Sparkline.tsx +131 -45
  169. package/src/charts/chart-box.module.css +50 -0
  170. package/src/charts/chart-box.module.css.d.ts +5 -0
  171. package/src/charts/chart-card.module.css +12 -4
  172. package/src/charts/chart-card.module.css.d.ts +1 -0
  173. package/src/charts/compile.ts +22 -18
  174. package/src/charts/labels.ts +175 -24
  175. package/src/charts/legend.tsx +3 -2
  176. package/src/charts/ref-label.ts +86 -17
  177. package/src/charts/sparkline.module.css +6 -0
  178. package/src/charts/state.tsx +36 -7
  179. package/src/cli/shot/capture.ts +29 -6
  180. package/src/common/empty-copy.ts +17 -0
  181. package/src/common/virtual-rows.tsx +682 -0
  182. package/src/controls/controls.module.css +33 -1
  183. package/src/controls/controls.module.css.d.ts +2 -0
  184. package/src/controls/enum-filter.tsx +8 -2
  185. package/src/controls/filter-pill.tsx +80 -27
  186. package/src/controls/form-layout.module.css +112 -7
  187. package/src/controls/form-layout.module.css.d.ts +1 -0
  188. package/src/controls/form-layout.tsx +115 -22
  189. package/src/controls/multi-select-filter.tsx +22 -11
  190. package/src/controls/range-filter.tsx +9 -3
  191. package/src/dashboard/bar-list.module.css +0 -2
  192. package/src/dashboard/bar-list.tsx +8 -5
  193. package/src/dashboard/board-nav.ts +67 -0
  194. package/src/dashboard/board.module.css +160 -0
  195. package/src/dashboard/board.module.css.d.ts +26 -0
  196. package/src/dashboard/board.tsx +394 -0
  197. package/src/dashboard/empty-state.tsx +16 -9
  198. package/src/dashboard/event-list-model.ts +113 -0
  199. package/src/dashboard/event-list-rows.tsx +120 -0
  200. package/src/dashboard/event-list-scroll.ts +145 -0
  201. package/src/dashboard/event-list-skeleton.tsx +58 -0
  202. package/src/dashboard/event-list.module.css +283 -0
  203. package/src/dashboard/event-list.module.css.d.ts +33 -0
  204. package/src/dashboard/event-list.tsx +309 -0
  205. package/src/dashboard/index.ts +2 -0
  206. package/src/dashboard/meter-parts.tsx +9 -2
  207. package/src/dashboard/meter.module.css +2 -1
  208. package/src/dashboard/query-state.tsx +1 -1
  209. package/src/dashboard/settings-section.module.css +19 -4
  210. package/src/dashboard/settings-section.tsx +7 -2
  211. package/src/dashboard/stat-card-parts.tsx +20 -3
  212. package/src/dashboard/stat-card.module.css +31 -7
  213. package/src/dashboard/stat-card.module.css.d.ts +3 -0
  214. package/src/dashboard/stat-card.tsx +24 -5
  215. package/src/dashboard/stat-strip.module.css +4 -1
  216. package/src/dashboard/widget-header.module.css +17 -1
  217. package/src/guard/index.ts +2 -0
  218. package/src/index.ts +4 -0
  219. package/src/shell/app-main.module.css +18 -0
  220. package/src/styles.css +46 -0
  221. package/src/surfaces.ts +7 -1
  222. package/src/table/cell-kinds.module.css +55 -0
  223. package/src/table/cell-kinds.module.css.d.ts +15 -0
  224. package/src/table/cell-kinds.tsx +234 -0
  225. package/src/table/data-table-fold.tsx +514 -0
  226. package/src/table/data-table-state.ts +24 -13
  227. package/src/table/data-table.module.css +210 -3
  228. package/src/table/data-table.module.css.d.ts +12 -0
  229. package/src/table/data-table.tsx +406 -359
  230. package/src/table/table-features.ts +44 -4
  231. package/src/theme/__snapshots__/plain-theme.test.ts.snap +2 -66
  232. package/src/theme/card-inset.module.css +35 -0
  233. package/src/theme/controls.module.css +32 -0
  234. package/src/theme/ctl-theme.tsx +8 -0
  235. package/src/theme/index.ts +12 -8
  236. package/src/tokens/core.ts +1 -0
  237. package/src/tokens/derive.ts +1 -1
  238. package/src/tokens/palette.ts +4 -1
@@ -378,15 +378,18 @@
378
378
  .footerCell {
379
379
  flex: 1 1 14rem;
380
380
  min-width: 0;
381
+ font-size: var(--vx-text-sm);
381
382
  padding: var(--vx-space-stack-md);
382
383
  border-inline-start: 1px solid var(--vx-divider);
383
384
  border-block-start: 1px solid var(--vx-divider);
384
385
  }
385
386
 
386
387
  /* A footer entry `under` a cell is part of that cell: it sits in the slot under the article, inset like
387
- * the article, split from the readings by the strip's own hairline. */
388
+ * the article, split from the readings by the strip's own hairline. Both footer slots take the strip's
389
+ * `sm` step, never the inherited body size (it would outrank the cell's own statement). */
388
390
  .underCell {
389
391
  min-width: 0;
392
+ font-size: var(--vx-text-sm);
390
393
  margin: var(--vx-space-stack-md) var(--vx-space-stack-md) 0;
391
394
  padding-block-start: var(--vx-space-stack-sm);
392
395
  border-block-start: 1px solid var(--vx-divider);
@@ -11,7 +11,7 @@
11
11
  *
12
12
  * Layout keys on the enclosing card's OWN width (`container: basalt-card`, declared by ChartCard /
13
13
  * StatCard / Section — docs/DESIGN-CORE.md § Layout, elevation, shapes), never the viewport: below 480px the subtitle folds
14
- * into the info glyph; from 480px (wave 8) `value` + `delta` move onto the title row. Wrapping and
14
+ * into the info glyph (a ChartCard keeps it, wrapped to two lines — wave 43); from 480px (wave 8) `value` + `delta` move onto the title row. Wrapping and
15
15
  * shrinking are unconditional. The subtitle ALSO folds (regardless of width) whenever the card's own
16
16
  * height is under 280px — see the `[data-basalt-card-short]` block below (wave 8's header-economy
17
17
  * law). No enclosing card, no container: the standard layout. Container conditions are px literals
@@ -394,6 +394,22 @@
394
394
  .foldNote {
395
395
  display: block;
396
396
  }
397
+
398
+ /* A chart card keeps its subtitle (argo's line/dot key) on its own line at every width: up to two
399
+ * lines, then an ellipsis; the full text stays in the DOM. StatCard and Section still fold. The
400
+ * short-height block below out-ranks this (its selector is one class heavier). */
401
+ [data-basalt-chart-header] .subtitle {
402
+ display: -webkit-box;
403
+ -webkit-box-orient: vertical;
404
+ -webkit-line-clamp: 2;
405
+ line-clamp: 2;
406
+ overflow: hidden;
407
+ }
408
+
409
+ [data-basalt-chart-header] .foldGlyph,
410
+ [data-basalt-chart-header] .foldNote {
411
+ display: none;
412
+ }
397
413
  }
398
414
 
399
415
  /*
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/guard/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAO7E,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,CAAA;AAgU9D;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CA8BpE,CAAA;AA8cD,8EAA8E;AAC9E,eAAO,MAAM,oBAAoB,EAAE,WAiBlC,CAAA;AAED;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAA;AAExE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,eAAO,MAAM,kBAAkB,EAAE,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,UAAU,CAAC,CAAM,CAAA;AAE5E,gGAAgG;AAChG,wBAAgB,UAAU,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,WAAW,GAAG,aAAa,CAE3E;AAiED;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,WAAW,CAAC,aAAa,CAAC,GACtC,OAAO,CAIT;AAED,sGAAsG;AACtG,M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AAM,mBAAmB,GAAG;IAChC,iDAAiD;IACjD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,gFAAgF;IAChF,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;IAC/B,6FAA6F;IAC7F,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;IACjC,gDAAgD;IAChD,QAAQ,CAAC,UAAU,EAAE,SAAS,SAAS,EAAE,CAAA;IACzC,oFAAoF;IACpF,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAA;IACvC;;;;;;OAMG;IACH,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAA;IACvC,oGAAoG;IACpG,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAA;IACxC,wCAAwC;IACxC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;IAC3B,iCAAiC;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,WAAW,GACf,mBAAmB,EAAE,CA+BvB;AAED,kGAAkG;AAClG,eAAO,MAAM,uBAAuB,6BAA6B,CAAA;AAEjE;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,GAAG,MAAM,CAM9F"}
@@ -348,6 +348,8 @@ const PLUGIN_RULE_IDS = /* @__PURE__ */ new Set([
348
348
  "no-dev-helper",
349
349
  // AST-only: a `<ViewTransition>` ancestor of `<Outlet>` is a JSX-ancestry claim over two import-resolved names.
350
350
  "route-view-transition",
351
+ // AST-only: a text-colour position (`c=`, a `style` object's `color`) is a JSX/property claim over a member chain.
352
+ "status-fill-as-text",
351
353
  // These two honour `basalt-agent-allow`, never `theme-allow` — but they are still REAL ids, so
352
354
  // a `theme-allow ai-sdk-major` must parse as a (useless) scoped annotation rather than as prose.
353
355
  "agent-no-raw-usechat",
package/dist/index.d.ts CHANGED
@@ -15,7 +15,7 @@ export { ThemeToggle } from './theme/theme-toggle.js';
15
15
  export { StatusDot, type StatusDotProps } from './theme/status-dot.js';
16
16
  export { StatusVerdict, type StatusVerdictProps } from './theme/status-verdict.js';
17
17
  export { BasaltShell, PageBar, PageAside, useSizeClass, PageTitle, type ShellBaseProps, type SidebarBlock, type SettingsMenuItem, } from './shell/index.js';
18
- export { WidgetHeader, DeltaBadge, Section, StatCard, type StatCardBreakdownRow, type StatCardSparklineSize, StatGroup, type StatStripCell, type StatStripRow, EmptyState, SettingsSection, SettingsRow, DangerZone, Meter, type MeterProps, type MeterSegment, type MeterTick, type MeterZone, BarList, type BarListProps, PageSummary, type PageSummaryProps, } from './dashboard/index.js';
18
+ export { WidgetHeader, DeltaBadge, Section, StatCard, type StatCardBreakdownRow, type StatCardSparklineSize, StatGroup, type StatStripCell, type StatStripRow, EmptyState, SettingsSection, SettingsRow, DangerZone, Meter, type MeterProps, type MeterSegment, type MeterTick, type MeterZone, BarList, type BarListProps, EventList, type EventListProps, Board, type BoardProps, PageSummary, type PageSummaryProps, } from './dashboard/index.js';
19
19
  export { unwrap } from './unwrap.js';
20
20
  export type { BasaltRegister, SeriesKey } from './register.js';
21
21
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,YAAY,CAAA;AACrE,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB,MAAM,0BAA0B,CAAA;AACjC,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,aAA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pB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAMjC,YAAY,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA"}
package/dist/index.js CHANGED
@@ -34,6 +34,8 @@ import {
34
34
  DangerZone,
35
35
  Meter,
36
36
  BarList,
37
+ EventList,
38
+ Board,
37
39
  PageSummary
38
40
  } from "./dashboard/index.js";
39
41
  import { unwrap } from "./unwrap.js";
@@ -41,9 +43,11 @@ export {
41
43
  BarList,
42
44
  BasaltProvider,
43
45
  BasaltShell,
46
+ Board,
44
47
  DangerZone,
45
48
  DeltaBadge,
46
49
  EmptyState,
50
+ EventList,
47
51
  Meter,
48
52
  PageAside,
49
53
  PageBar,
@@ -107,6 +107,24 @@
107
107
  * table's page-sticky offset reads it instead of repeating this module's `sm` switch.
108
108
  */
109
109
  --basalt-main-pad-block: var(--vx-space-stack-md);
110
+ /*
111
+ * PUBLIC `--basalt-main-content-h` — the height of Main's CONTENT box: what an element at
112
+ * `height: var(--basalt-main-content-h)` needs to fill the scrollport with nothing to scroll (a
113
+ * map, an editor, a full-page canvas). Descendants inherit the resolved length.
114
+ *
115
+ * It is the viewport minus the five things that are not content: the header offset, the footer
116
+ * offset PLUS the safe-area inset (same pair as `margin-bottom` above), the band, and Main's block
117
+ * padding twice. The band is `--basalt-page-bar-h` (its content box, published by `PageBar`) plus
118
+ * its own 1 px `border-bottom` the var never counts (`page-aside.module.css` explains the same
119
+ * pixel): `var(--basalt-page-bar-h, -1px) + 1px` adds it only while a band exists and nets to 0
120
+ * without one. `h="100%"` cannot do this job — Main sizes itself by flex, so a percentage height
121
+ * on a child does not resolve against it.
122
+ */
123
+ --basalt-main-content-h: calc(
124
+ 100dvh - var(--app-shell-header-offset, 0px) - var(--app-shell-footer-offset, 0px) -
125
+ env(safe-area-inset-bottom, 0px) - (var(--basalt-page-bar-h, -1px) + 1px) - 2 *
126
+ var(--basalt-main-pad-block)
127
+ );
110
128
  padding: var(--basalt-main-pad-block) var(--app-shell-padding);
111
129
  /* Without this a wide flex/grid child (a bare table, a nowrap control row) sizes Main to ITSELF. */
112
130
  min-width: 0;
package/dist/styles.css CHANGED
@@ -386,6 +386,52 @@
386
386
  }
387
387
  }
388
388
 
389
+ /* MapLibre's compact attribution (Wave 43, argo's astro Map tab). basalt has no maplibre dependency;
390
+ * this only restyles the control a consumer's map renders, onto the radius scale and the micro text
391
+ * size: the shipped 12 px radius on the box and its 24 px button is off the scale and, over a card,
392
+ * a nested step under 3 px. The box takes the control tier (4 px under a flush card), the button the
393
+ * Mantine `xs` step (4 px under the box).
394
+ *
395
+ * UNLAYERED on purpose: `maplibre-gl.css` is unlayered, and an unlayered rule beats every layered
396
+ * one whatever the specificity, so a `@layer basalt` block would lose to it. The doubled `:root`
397
+ * lifts each rule to (0,4,0), over maplibre's highest (0,3,0) (`.maplibregl-ctrl-bottom-left >
398
+ * .maplibregl-ctrl-attrib.maplibregl-compact-show`, which sets its own 12 px radius), whichever
399
+ * stylesheet loads last and in every corner and state. A consumer overrides with a longer selector,
400
+ * or an equal one later in source. `.maplibregl-ctrl-group` is not here: its 4 px radius is already
401
+ * a scale step. */
402
+ :root:root .maplibregl-ctrl.maplibregl-ctrl-attrib {
403
+ border-radius: var(--vx-radius-ctrl);
404
+ background-color: var(--vx-surface-panel);
405
+ color: var(--vx-muted);
406
+ font-size: var(--vx-text-micro);
407
+ }
408
+
409
+ :root:root .maplibregl-ctrl-attrib a {
410
+ color: inherit;
411
+ }
412
+
413
+ /* One step under the box, snapped onto the scale like the SegmentedControl indicator: 2 when the box
414
+ * leaves a 3 px step, else square. */
415
+ :root:root .maplibregl-ctrl-attrib-button {
416
+ /* theme-allow css-raw-surface — a snapped nested step: the scale's 2 px xs, or square under a small box */
417
+ border-radius: round(down, min(2px, max(0px, var(--vx-radius-ctrl) - 3px)), 2px);
418
+ }
419
+
420
+ /* The glyph is maplibre's dark SVG background-image, drawn again as a mask in the muted ink so it
421
+ * follows the scheme (a `filter` would also invert the button's own fill). */
422
+ :root:root .maplibregl-ctrl-attrib-button {
423
+ background-image: none;
424
+ }
425
+
426
+ :root:root .maplibregl-ctrl-attrib-button::after {
427
+ content: '';
428
+ position: absolute;
429
+ inset: 0;
430
+ background-color: var(--vx-muted);
431
+ mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0v-3'/%3E%3C/svg%3E")
432
+ center / 24px 24px no-repeat;
433
+ }
434
+
389
435
  /* chart-engine:start — generated by scripts/gen-chart-css.ts from chartEngineCss() */
390
436
  @layer basalt {
391
437
  :root {
@@ -32,7 +32,7 @@ export type RuleName = 'tokens' | 'charts' | 'mantine' | 'state' | 'controls' |
32
32
  * const id: PluginRuleId = 'hand-rolled-filter' // ok
33
33
  * // const bad: PluginRuleId = 'hand-rolled-filters' // tsc error
34
34
  */
35
- export declare const PLUGIN_RULE_ID_LIST: readonly ["no-raw-font-size", "raw-size-literal", "card-inset", "chart-in-raw-surface", "shadow-basalt-export", "hand-rolled-shell", "raw-scroll-container", "hand-rolled-filter", "control-outside-home", "bound-control-outside-home", "control-size-literal", "in-body-page-title", "responsive-twin", "search-literal-link", "use-search-from-literal", "query-fn-unwrap", "forms-field-key", "chart-engine-boundary", "chart-host-single", "token-layer-boundary", "agent-no-raw-usechat", "ai-sdk-major", "no-import-meta-env", "raw-breakpoint", "no-dev-helper", "route-view-transition"];
35
+ export declare const PLUGIN_RULE_ID_LIST: readonly ["no-raw-font-size", "raw-size-literal", "card-inset", "chart-in-raw-surface", "shadow-basalt-export", "hand-rolled-shell", "raw-scroll-container", "hand-rolled-filter", "control-outside-home", "bound-control-outside-home", "control-size-literal", "in-body-page-title", "responsive-twin", "search-literal-link", "use-search-from-literal", "query-fn-unwrap", "forms-field-key", "chart-engine-boundary", "chart-host-single", "token-layer-boundary", "agent-no-raw-usechat", "ai-sdk-major", "no-import-meta-env", "raw-breakpoint", "no-dev-helper", "route-view-transition", "status-fill-as-text"];
36
36
  /** One registered oxlint plugin rule id — the literal union of {@link PLUGIN_RULE_ID_LIST}. */
37
37
  export type PluginRuleId = (typeof PLUGIN_RULE_ID_LIST)[number];
38
38
  /** The 3 shipped skill names (agent/skills/basalt-{name}/SKILL.md, placed into a consumer's
@@ -205,7 +205,7 @@ export declare const SURFACES: {
205
205
  readonly rule: "tokens";
206
206
  readonly skill: readonly ["basalt-design", "basalt-charts"];
207
207
  readonly guardKinds: readonly ["raw-hex", "raw-color-fn", "off-identity-accent", "off-system-surface-var", "raw-font-family", "raw-radius", "raw-surface", "inline-font-size", "css-raw-surface", "surface-shadow-override", "unknown-vx-token", "series-palette", "theme-allow-unscoped"];
208
- readonly pluginRules: readonly ["no-raw-font-size", "raw-size-literal", "token-layer-boundary"];
208
+ readonly pluginRules: readonly ["no-raw-font-size", "raw-size-literal", "status-fill-as-text", "token-layer-boundary"];
209
209
  readonly description: "VX token refs, buildPaletteCss, defineSeries, seriesTokens, groupTokens, alpha (Mantine-free)";
210
210
  readonly globs: {
211
211
  readonly shipped: readonly ["**/tokens/**"];
@@ -1 +1 @@
1
- {"version":3,"file":"surfaces.d.ts","sourceRoot":"","sources":["../src/surfaces.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAI9C;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,GAAG,WAAW,CAAA;AAE3F;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,mBAAmB,mkBA2BtB,CAAA;AAEV,+FAA+F;AAC/F,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,mBAAmB,CAAC,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BAA+B,CAC7C,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GACzC,OAAO,CAET"}
package/dist/surfaces.js CHANGED
@@ -24,7 +24,8 @@ const PLUGIN_RULE_ID_LIST = [
24
24
  "no-import-meta-env",
25
25
  "raw-breakpoint",
26
26
  "no-dev-helper",
27
- "route-view-transition"
27
+ "route-view-transition",
28
+ "status-fill-as-text"
28
29
  ];
29
30
  const v = (spec, message, extra) => ({
30
31
  spec,
@@ -162,7 +163,12 @@ const SURFACES = {
162
163
  // The type-scale rules live with the tokens, not with `.`: both police a value that left the
163
164
  // `--vx-*` system, which is this surface's whole subject. `token-layer-boundary` is the
164
165
  // repo-local-only rule that keeps the layer upstream of Mantine (see below).
165
- pluginRules: ["no-raw-font-size", "raw-size-literal", "token-layer-boundary"],
166
+ pluginRules: [
167
+ "no-raw-font-size",
168
+ "raw-size-literal",
169
+ "status-fill-as-text",
170
+ "token-layer-boundary"
171
+ ],
166
172
  description: "VX token refs, buildPaletteCss, defineSeries, seriesTokens, groupTokens, alpha (Mantine-free)",
167
173
  globs: {
168
174
  shipped: ["**/tokens/**"],
@@ -0,0 +1,44 @@
1
+ import type { Cell, Column, RowData } from '@tanstack/react-table';
2
+ import type { ReactNode } from 'react';
3
+ import type { BasaltTableFeatures, DataTableAlign, DataTableColumnKind } from './table-features.js';
4
+ /**
5
+ * The table's own default `cell` (TanStack's, restated), installed as `defaultColumn.cell` so a
6
+ * column WITHOUT a renderer is identifiable by identity: v9 merges its default into every
7
+ * `columnDef`, so `columnDef.cell === undefined` can never be asked.
8
+ */
9
+ export declare function DEFAULT_CELL(props: {
10
+ renderValue(): unknown;
11
+ }): string | null;
12
+ /** Reads `meta.kind`, throwing on a value outside the seven — the check a type cannot make at runtime. */
13
+ export declare function resolveKind<T extends RowData>(column: Column<BasaltTableFeatures, T, unknown>): DataTableColumnKind | undefined;
14
+ /** Figures read right: the kind's default alignment, which an explicit `meta.align` overrides. */
15
+ export declare function kindAlign(kind: DataTableColumnKind | undefined): DataTableAlign | undefined;
16
+ /**
17
+ * Column sizing law (SPEC § 6.6): a data column is as wide as its header or widest cell (body cells
18
+ * hold one line), and the slack of a wide container goes to ONE place — the LAST `text` column (a
19
+ * notes/detail column that may wrap), else a trailing spacer after the last data column — so a name
20
+ * sits beside its figures, never a third of the table away. An `entity` column is content-sized.
21
+ * `fixedIds` (the checkbox and actions columns) fit too but are not data. An earlier `text` column
22
+ * keeps its auto share (it may wrap), and a table where no column opted into a kind renders as
23
+ * before: no fit marks, no spacer.
24
+ */
25
+ export declare function planColumnSizing<T extends RowData>(columns: readonly Column<BasaltTableFeatures, T, unknown>[], fixedIds: ReadonlySet<string>): {
26
+ fitIds: ReadonlySet<string>;
27
+ spacer: boolean;
28
+ };
29
+ /** A loading bar shaped like the kind's value: a figure short and flush right, a chip chip-sized. */
30
+ export declare function KindSkeleton({ kind, right, }: {
31
+ kind: DataTableColumnKind | undefined;
32
+ right: boolean;
33
+ }): ReactNode;
34
+ export declare function kindClass(kind: DataTableColumnKind): string;
35
+ /** The cell of a column with a `kind`: the column's own `cell` if it has one, else the kind's content. */
36
+ export declare function KindCell<T extends RowData>({ kind, cell, }: {
37
+ kind: DataTableColumnKind;
38
+ cell: Cell<BasaltTableFeatures, T, unknown>;
39
+ }): ReactNode;
40
+ /** A cell's content through its kind when it has one — the body cell and the fold disclosure share it. */
41
+ export declare function CellContent<T extends RowData>({ cell, }: {
42
+ cell: Cell<BasaltTableFeatures, T, unknown>;
43
+ }): ReactNode;
44
+ //# sourceMappingURL=cell-kinds.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cell-kinds.d.ts","sourceRoot":"","sources":["../../src/table/cell-kinds.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAElE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAMtC,OAAO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AAgB,WAAW,CAAC,CAAC,SAAS,OAAO,EAAE,EAC7C,IAAI,GACL,EAAE;IACD,IAAI,EAAE,IAAI,CAAC,mBAAmB,EAAE,CAAC,EAAE,OAAO,CAAC,CAAA;CAC5C,GAAG,SAAS,CAGZ"}
@@ -0,0 +1,169 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { Badge, Skeleton, Tooltip } from "@mantine/core";
3
+ import { FlexRender } from "@tanstack/react-table";
4
+ import { cx } from "../common/props.js";
5
+ import { Meter } from "../dashboard/meter.js";
6
+ import { dateTime, integer, relativeTime } from "../format/index.js";
7
+ import { numberFormat } from "../format/shared.js";
8
+ import { DATA_TABLE_COLUMN_KINDS } from "./table-features.js";
9
+ import classes from "./cell-kinds.module.css";
10
+ function DEFAULT_CELL(props) {
11
+ return props.renderValue()?.toString?.() ?? null;
12
+ }
13
+ const KINDS = new Set(DATA_TABLE_COLUMN_KINDS);
14
+ function resolveKind(column) {
15
+ const kind = column.columnDef.meta?.kind;
16
+ if (kind === void 0) return void 0;
17
+ if (!KINDS.has(kind)) {
18
+ throw new Error(
19
+ `BasaltDataTable: column "${column.id}" has meta.kind=${JSON.stringify(kind)} \u2014 expected ${DATA_TABLE_COLUMN_KINDS.map((k) => `'${k}'`).join(" | ")}.`
20
+ );
21
+ }
22
+ return kind;
23
+ }
24
+ function kindAlign(kind) {
25
+ return kind === "number" || kind === "money" ? "right" : void 0;
26
+ }
27
+ function planColumnSizing(columns, fixedIds) {
28
+ const data = columns.filter((column) => !fixedIds.has(column.id));
29
+ const kinds = new Map(data.map((column) => [column.id, resolveKind(column)]));
30
+ const fitIds = new Set(columns.filter((column) => fixedIds.has(column.id)).map((c) => c.id));
31
+ const hasKinds = data.some((column) => kinds.get(column.id) !== void 0);
32
+ if (!hasKinds) return { fitIds, spacer: false };
33
+ const slackId = data.findLast((column) => kinds.get(column.id) === "text")?.id;
34
+ for (const column of data) {
35
+ if (column.id === slackId || kinds.get(column.id) === "text") continue;
36
+ fitIds.add(column.id);
37
+ }
38
+ return { fitIds, spacer: slackId === void 0 };
39
+ }
40
+ const SKELETON_WIDTH = {
41
+ number: "3rem",
42
+ money: "3rem",
43
+ status: "4.5rem",
44
+ "relative-time": "4.5rem",
45
+ meter: "4rem",
46
+ entity: "100%",
47
+ text: "10rem",
48
+ kindless: "100%"
49
+ };
50
+ function KindSkeleton({
51
+ kind,
52
+ right
53
+ }) {
54
+ const chip = kind === "status";
55
+ const width = SKELETON_WIDTH[kind ?? "kindless"];
56
+ return /* @__PURE__ */ jsx(
57
+ Skeleton,
58
+ {
59
+ height: chip ? 20 : 16,
60
+ radius: "sm",
61
+ w: width,
62
+ maw: "100%",
63
+ ...right && { ml: "auto" }
64
+ }
65
+ );
66
+ }
67
+ const KIND_CLASS = {
68
+ entity: classes.entity,
69
+ status: classes.status,
70
+ number: classes.number,
71
+ money: classes.number,
72
+ "relative-time": classes.relativeTime,
73
+ meter: classes.meter,
74
+ text: classes.text
75
+ };
76
+ function kindClass(kind) {
77
+ return cx(KIND_CLASS[kind]);
78
+ }
79
+ function formatFigure(value) {
80
+ return Number.isInteger(value) ? integer(value) : numberFormat(void 0, { signDisplay: "negative", maximumFractionDigits: 20 }).format(value);
81
+ }
82
+ function formatMoney(value, currency) {
83
+ const digits = numberFormat(void 0, { style: "currency", currency }).resolvedOptions().maximumFractionDigits;
84
+ return numberFormat(void 0, {
85
+ signDisplay: "negative",
86
+ minimumFractionDigits: digits,
87
+ maximumFractionDigits: digits
88
+ }).format(value);
89
+ }
90
+ const chipColor = (color) => color === void 0 || color === "gray" ? "var(--vx-faint)" : color;
91
+ const Dash = () => /* @__PURE__ */ jsx("span", { className: classes.dash, children: "\u2014" });
92
+ function isAbsent(value) {
93
+ return value === null || value === void 0 || value === "";
94
+ }
95
+ function toDate(value) {
96
+ if (!(value instanceof Date) && typeof value !== "number" && typeof value !== "string") {
97
+ return void 0;
98
+ }
99
+ const date = new Date(value);
100
+ return Number.isNaN(date.getTime()) ? void 0 : date;
101
+ }
102
+ function columnLabel(column) {
103
+ const { header } = column.columnDef;
104
+ return typeof header === "string" ? header : column.id;
105
+ }
106
+ function RelativeTime({ value }) {
107
+ const date = toDate(value);
108
+ if (date === void 0) return /* @__PURE__ */ jsx(Dash, {});
109
+ const full = dateTime(date);
110
+ return (
111
+ // Below the cell and on keyboard focus: above it the tip covered the header's label on row one.
112
+ /* @__PURE__ */ jsx(Tooltip, { label: full, position: "bottom", events: { hover: true, focus: true, touch: false }, children: /* @__PURE__ */ jsxs("time", { dateTime: date.toISOString(), tabIndex: 0, children: [
113
+ relativeTime(date),
114
+ /* @__PURE__ */ jsx("span", { className: classes.srOnly, children: `, ${full}` })
115
+ ] }) })
116
+ );
117
+ }
118
+ function KindCell({
119
+ kind,
120
+ cell
121
+ }) {
122
+ const { column } = cell;
123
+ const { cell: render, meta } = column.columnDef;
124
+ if (render !== DEFAULT_CELL) return /* @__PURE__ */ jsx(FlexRender, { cell });
125
+ const value = cell.getValue();
126
+ switch (kind) {
127
+ case "number":
128
+ case "money": {
129
+ if (typeof value !== "number" || !Number.isFinite(value)) return /* @__PURE__ */ jsx(Dash, {});
130
+ return kind === "money" ? formatMoney(value, meta?.currency ?? "USD") : formatFigure(value);
131
+ }
132
+ case "relative-time":
133
+ return /* @__PURE__ */ jsx(RelativeTime, { value });
134
+ case "status":
135
+ if (isAbsent(value)) return /* @__PURE__ */ jsx(Dash, {});
136
+ return /* @__PURE__ */ jsx(Badge, { color: chipColor(meta?.statusColor?.(value)), children: String(value) });
137
+ case "meter":
138
+ return /* @__PURE__ */ jsx(
139
+ Meter,
140
+ {
141
+ size: "row",
142
+ label: columnLabel(column),
143
+ value: typeof value === "number" ? value : null,
144
+ max: meta?.meterMax ?? 1
145
+ }
146
+ );
147
+ case "entity":
148
+ case "text":
149
+ return isAbsent(value) ? /* @__PURE__ */ jsx(Dash, {}) : String(value);
150
+ default:
151
+ return kind;
152
+ }
153
+ }
154
+ function CellContent({
155
+ cell
156
+ }) {
157
+ const kind = resolveKind(cell.column);
158
+ return kind === void 0 ? /* @__PURE__ */ jsx(FlexRender, { cell }) : /* @__PURE__ */ jsx(KindCell, { kind, cell });
159
+ }
160
+ export {
161
+ CellContent,
162
+ DEFAULT_CELL,
163
+ KindCell,
164
+ KindSkeleton,
165
+ kindAlign,
166
+ kindClass,
167
+ planColumnSizing,
168
+ resolveKind
169
+ };
@@ -0,0 +1,55 @@
1
+ /*
2
+ * Cell kinds (`meta.kind`, SPEC § 6.6). Each class is the CHROME of one kind on its `<td>`; the font
3
+ * SIZE stays the theme's `sm` on `td`. Colours are tokens, never literals.
4
+ */
5
+ .entity {
6
+ max-width: 100%;
7
+ overflow: hidden;
8
+ font-weight: 500;
9
+ color: var(--vx-ink);
10
+ text-overflow: ellipsis;
11
+ white-space: nowrap;
12
+ }
13
+
14
+ .status {
15
+ white-space: nowrap;
16
+ }
17
+
18
+ /* SPEC D33: figures are the proportional sans with lining tabular numerals; only times are mono. */
19
+ .number {
20
+ font-variant-numeric: tabular-nums;
21
+ font-weight: 500;
22
+ color: var(--vx-ink);
23
+ white-space: nowrap;
24
+ }
25
+
26
+ .relativeTime {
27
+ font-family: var(--mantine-font-family-monospace);
28
+ font-variant-numeric: tabular-nums;
29
+ color: var(--vx-muted);
30
+ white-space: nowrap;
31
+ }
32
+
33
+ .meter {
34
+ min-width: calc(4rem * var(--mantine-scale));
35
+ }
36
+
37
+ .text {
38
+ color: var(--vx-ink);
39
+ white-space: normal;
40
+ }
41
+
42
+ /* An absent value: a muted em dash, never an empty cell. */
43
+ .dash {
44
+ color: var(--vx-faint);
45
+ }
46
+
47
+ /* The full date for assistive tech, inside the `<time>`: visually hidden, still announced. */
48
+ .srOnly {
49
+ position: absolute;
50
+ width: 1px;
51
+ height: 1px;
52
+ overflow: hidden;
53
+ clip-path: inset(50%);
54
+ white-space: nowrap;
55
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Typed CSS-module declaration (the S4 CSS-modules path). Named string props — not an index
3
+ * signature — so dot access stays verbatim under the package's strict flags.
4
+ */
5
+ declare const classes: {
6
+ readonly dash: string
7
+ readonly entity: string
8
+ readonly meter: string
9
+ readonly number: string
10
+ readonly relativeTime: string
11
+ readonly srOnly: string
12
+ readonly status: string
13
+ readonly text: string
14
+ }
15
+ export default classes