basalt-ui 2.8.1 → 2.9.1

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 (153) hide show
  1. package/AGENTS.md +2 -2
  2. package/CHANGELOG.md +33 -0
  3. package/MIGRATING.md +81 -27
  4. package/README.md +7 -8
  5. package/agent/rules/basalt-controls.md +1 -1
  6. package/agent/rules/basalt-state.md +1 -1
  7. package/agent/skills/basalt-design/SKILL.md +1 -1
  8. package/agent/templates/AGENTS-block.md.tpl +2 -2
  9. package/configs/oxlint-plugin.js +25 -68
  10. package/configs/oxlint-plugin.test.ts +19 -27
  11. package/configs/oxlint.json +4 -0
  12. package/dist/charts/BandStrip.d.ts +1 -1
  13. package/dist/charts/BandStrip.d.ts.map +1 -1
  14. package/dist/charts/BandStrip.js +1 -10
  15. package/dist/charts/MirroredBars.d.ts.map +1 -1
  16. package/dist/charts/MirroredBars.js +2 -9
  17. package/dist/charts/band-fold.d.ts +15 -0
  18. package/dist/charts/band-fold.d.ts.map +1 -0
  19. package/dist/charts/band-fold.js +19 -0
  20. package/dist/charts/index.d.ts +1 -0
  21. package/dist/charts/index.d.ts.map +1 -1
  22. package/dist/charts/index.js +3 -1
  23. package/dist/cli/audit-allows.d.ts.map +1 -1
  24. package/dist/cli/audit-allows.js +1 -1
  25. package/dist/cli/check-theme.d.ts.map +1 -1
  26. package/dist/cli/check-theme.js +4 -1
  27. package/dist/cli/config.d.ts +14 -4
  28. package/dist/cli/config.d.ts.map +1 -1
  29. package/dist/cli/config.js +7 -2
  30. package/dist/cli/doctor-upgrade.d.ts +9 -0
  31. package/dist/cli/doctor-upgrade.d.ts.map +1 -1
  32. package/dist/cli/doctor-upgrade.js +14 -1
  33. package/dist/cli/doctor.d.ts.map +1 -1
  34. package/dist/cli/doctor.js +10 -12
  35. package/dist/cli/help.d.ts.map +1 -1
  36. package/dist/cli/help.js +2 -3
  37. package/dist/cli/index.d.ts +3 -2
  38. package/dist/cli/index.d.ts.map +1 -1
  39. package/dist/cli/index.js +4 -2
  40. package/dist/cli/init.d.ts.map +1 -1
  41. package/dist/cli/init.js +6 -0
  42. package/dist/cli/install-root.d.ts +10 -0
  43. package/dist/cli/install-root.d.ts.map +1 -0
  44. package/dist/cli/install-root.js +32 -0
  45. package/dist/cli/router-wiring.d.ts +4 -2
  46. package/dist/cli/router-wiring.d.ts.map +1 -1
  47. package/dist/cli/router-wiring.js +2 -0
  48. package/dist/cli/sync.d.ts +0 -2
  49. package/dist/cli/sync.d.ts.map +1 -1
  50. package/dist/cli/sync.js +19 -15
  51. package/dist/cli/tokens-css.d.ts.map +1 -1
  52. package/dist/cli/tokens-css.js +1 -6
  53. package/dist/common/errors.d.ts +1 -6
  54. package/dist/common/errors.d.ts.map +1 -1
  55. package/dist/common/errors.js +0 -7
  56. package/dist/common/index.d.ts +1 -1
  57. package/dist/common/index.d.ts.map +1 -1
  58. package/dist/common/index.js +1 -9
  59. package/dist/common/props.d.ts +2 -2
  60. package/dist/common/vx-family.d.ts +1 -1
  61. package/dist/content/toc-click-pin.d.ts +45 -0
  62. package/dist/content/toc-click-pin.d.ts.map +1 -0
  63. package/dist/content/toc-click-pin.js +111 -0
  64. package/dist/content/toc-spy.d.ts +25 -0
  65. package/dist/content/toc-spy.d.ts.map +1 -0
  66. package/dist/content/toc-spy.js +43 -0
  67. package/dist/content/toc.d.ts +1 -4
  68. package/dist/content/toc.d.ts.map +1 -1
  69. package/dist/content/toc.js +38 -49
  70. package/dist/controls/number-filter.d.ts.map +1 -1
  71. package/dist/controls/number-filter.js +1 -1
  72. package/dist/dashboard/index.d.ts +1 -1
  73. package/dist/dashboard/index.d.ts.map +1 -1
  74. package/dist/dashboard/index.js +1 -3
  75. package/dist/dashboard/section.d.ts +10 -2
  76. package/dist/dashboard/section.d.ts.map +1 -1
  77. package/dist/dashboard/section.js +20 -3
  78. package/dist/dashboard/stat-card.d.ts +2 -8
  79. package/dist/dashboard/stat-card.d.ts.map +1 -1
  80. package/dist/dashboard/stat-card.js +1 -1
  81. package/dist/guard/index.d.ts +13 -9
  82. package/dist/guard/index.d.ts.map +1 -1
  83. package/dist/guard/index.js +74 -37
  84. package/dist/guard/types.d.ts +8 -7
  85. package/dist/guard/types.d.ts.map +1 -1
  86. package/dist/guard/vx-names.d.ts +1 -1
  87. package/dist/guard/vx-names.d.ts.map +1 -1
  88. package/dist/guard/vx-names.js +1 -33
  89. package/dist/index.d.ts +2 -2
  90. package/dist/index.d.ts.map +1 -1
  91. package/dist/router-tanstack/search-store.d.ts +1 -11
  92. package/dist/router-tanstack/search-store.d.ts.map +1 -1
  93. package/dist/router-tanstack/search-store.js +1 -2
  94. package/dist/shell/index.d.ts +1 -0
  95. package/dist/shell/index.d.ts.map +1 -1
  96. package/dist/shell/index.js +3 -0
  97. package/dist/shell/nav-types.d.ts +1 -1
  98. package/dist/shell/page-bar.d.ts +6 -0
  99. package/dist/shell/page-bar.d.ts.map +1 -1
  100. package/dist/shell/page-bar.js +12 -2
  101. package/dist/state/fields.d.ts +1 -1
  102. package/dist/state/fields.d.ts.map +1 -1
  103. package/dist/state/fields.js +3 -1
  104. package/dist/surfaces.d.ts +1 -1
  105. package/dist/surfaces.d.ts.map +1 -1
  106. package/dist/surfaces.js +5 -11
  107. package/dist/table/data-table.d.ts +2 -2
  108. package/dist/tokens/core.d.ts +0 -10
  109. package/dist/tokens/core.d.ts.map +1 -1
  110. package/dist/tokens/core.js +6 -44
  111. package/llms.txt +24 -8
  112. package/package.json +8 -5
  113. package/src/charts/BandStrip.tsx +4 -16
  114. package/src/charts/MirroredBars.tsx +2 -11
  115. package/src/charts/band-fold.ts +26 -0
  116. package/src/charts/index.ts +1 -0
  117. package/src/cli/audit-allows.ts +1 -3
  118. package/src/cli/check-theme.ts +7 -1
  119. package/src/cli/config.ts +21 -5
  120. package/src/cli/doctor-upgrade.ts +23 -1
  121. package/src/cli/doctor.ts +10 -17
  122. package/src/cli/help.ts +1 -4
  123. package/src/cli/index.ts +9 -6
  124. package/src/cli/init.ts +7 -0
  125. package/src/cli/install-root.ts +40 -0
  126. package/src/cli/router-wiring.ts +6 -2
  127. package/src/cli/sync.ts +28 -17
  128. package/src/cli/tokens-css.ts +0 -5
  129. package/src/common/errors.ts +1 -18
  130. package/src/common/index.ts +1 -8
  131. package/src/common/props.ts +2 -2
  132. package/src/common/vx-family.ts +1 -1
  133. package/src/content/toc-click-pin.ts +156 -0
  134. package/src/content/toc-spy.ts +61 -0
  135. package/src/content/toc.tsx +47 -95
  136. package/src/controls/form-layout.tsx +1 -1
  137. package/src/controls/number-filter.tsx +6 -1
  138. package/src/dashboard/index.ts +1 -6
  139. package/src/dashboard/section.tsx +39 -8
  140. package/src/dashboard/stat-card.tsx +4 -11
  141. package/src/guard/index.ts +114 -89
  142. package/src/guard/types.ts +8 -7
  143. package/src/guard/vx-names.ts +1 -33
  144. package/src/index.ts +1 -2
  145. package/src/router-tanstack/search-store.ts +2 -14
  146. package/src/shell/index.tsx +2 -0
  147. package/src/shell/nav-types.ts +1 -1
  148. package/src/shell/page-bar.tsx +21 -2
  149. package/src/state/fields.ts +7 -2
  150. package/src/surfaces.ts +5 -11
  151. package/src/table/data-table.tsx +2 -2
  152. package/src/tokens/core.ts +6 -67
  153. package/dist/tokens.css +0 -331
@@ -1,11 +1,12 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { useEffect, useRef, useState } from "react";
2
+ import { useCallback, useEffect, useReducer, useRef, useState } from "react";
3
3
  import { useReducedMotion } from "@mantine/hooks";
4
4
  import { scrollParentOf } from "../common/scroll-parent.js";
5
5
  import classes from "./toc.module.css";
6
+ import { useClickPin } from "./toc-click-pin.js";
7
+ import { OBSERVER_ROOT_MARGIN, pickActive, scrollMetrics } from "./toc-spy.js";
6
8
  const DEFAULT_LEVELS = [2, 3];
7
9
  const DEFAULT_TITLE = "On this page";
8
- const CLICK_PIN_MAX_MS = 1e3;
9
10
  function headingLabel(node) {
10
11
  const clone = node.cloneNode(true);
11
12
  for (const anchor of clone.querySelectorAll("[data-heading-anchor]")) anchor.remove();
@@ -31,13 +32,16 @@ function TableOfContents({
31
32
  const [collected, setCollected] = useState([]);
32
33
  const [activeId, setActiveId] = useState(null);
33
34
  const reduceMotion = useReducedMotion();
34
- const pinnedRef = useRef(null);
35
- const releasePinRef = useRef(null);
36
35
  const navRef = useRef(null);
36
+ const elementsRef = useRef([]);
37
37
  const portRef = useRef(null);
38
- useEffect(() => {
39
- return () => releasePinRef.current?.();
40
- }, []);
38
+ const intersectingRef = useRef(/* @__PURE__ */ new Set());
39
+ const [idleTick, bumpIdle] = useReducer((n) => n + 1, 0);
40
+ const pin = useClickPin(bumpIdle);
41
+ const scrollerOf = useCallback(
42
+ () => scrollParentOf(containerRef?.current ?? navRef.current),
43
+ [containerRef]
44
+ );
41
45
  useEffect(() => {
42
46
  if (items !== void 0) return;
43
47
  const container = containerRef?.current;
@@ -49,33 +53,29 @@ function TableOfContents({
49
53
  return () => observer.disconnect();
50
54
  }, [items, containerRef, levels]);
51
55
  const resolvedItems = items ?? collected;
56
+ const resolve = useCallback(() => {
57
+ if (pin.activeId !== null) {
58
+ setActiveId(pin.activeId);
59
+ return;
60
+ }
61
+ const id = pickActive(
62
+ elementsRef.current,
63
+ intersectingRef.current,
64
+ scrollMetrics(portRef.current)
65
+ );
66
+ if (id !== void 0) setActiveId(id);
67
+ }, [pin]);
52
68
  useEffect(() => {
69
+ pin.prune(resolvedItems.map((item) => item.id));
53
70
  if (resolvedItems.length === 0) return;
54
71
  const elements = resolvedItems.map((item) => document.getElementById(item.id)).filter((el) => el !== null);
55
72
  if (elements.length === 0) return;
56
- const port = scrollParentOf(containerRef?.current ?? navRef.current);
57
- portRef.current = port;
73
+ const port = scrollerOf();
58
74
  const scroller = port ?? window;
59
- const intersecting = /* @__PURE__ */ new Set();
60
- const resolve = () => {
61
- if (pinnedRef.current !== null) return;
62
- const box = port ?? document.documentElement;
63
- const seen = port ? port.clientHeight + port.scrollTop : window.innerHeight + window.scrollY;
64
- if (seen >= box.scrollHeight - 2) {
65
- const last = elements[elements.length - 1];
66
- if (last) setActiveId(last.id);
67
- return;
68
- }
69
- if (intersecting.size > 0) {
70
- const topmost = elements.find((el) => intersecting.has(el.id));
71
- if (topmost) setActiveId(topmost.id);
72
- return;
73
- }
74
- const originTop = port ? port.getBoundingClientRect().top : 0;
75
- const passed = elements.filter((el) => el.getBoundingClientRect().top < originTop);
76
- const current = passed[passed.length - 1] ?? elements[0];
77
- if (current) setActiveId(current.id);
78
- };
75
+ const intersecting = intersectingRef.current;
76
+ intersecting.clear();
77
+ elementsRef.current = elements;
78
+ portRef.current = port;
79
79
  const observer = new IntersectionObserver(
80
80
  (entries) => {
81
81
  for (const entry of entries) {
@@ -86,38 +86,27 @@ function TableOfContents({
86
86
  },
87
87
  // `root: null` IS the viewport — the shell-less case, unchanged. Inside a shell the root has
88
88
  // to be the scrollport or the `-70%` dead zone is measured against a box nothing scrolls.
89
- { root: port, rootMargin: "-80px 0px -70% 0px" }
89
+ { root: port, rootMargin: OBSERVER_ROOT_MARGIN }
90
90
  );
91
91
  for (const el of elements) observer.observe(el);
92
92
  scroller.addEventListener("scroll", resolve, { passive: true });
93
93
  return () => {
94
94
  observer.disconnect();
95
95
  scroller.removeEventListener("scroll", resolve);
96
- portRef.current = null;
96
+ elementsRef.current = [];
97
97
  };
98
- }, [resolvedItems, containerRef]);
98
+ }, [resolvedItems, scrollerOf, pin, resolve]);
99
+ useEffect(() => {
100
+ const frame = requestAnimationFrame(resolve);
101
+ return () => cancelAnimationFrame(frame);
102
+ }, [idleTick, resolve]);
99
103
  if (resolvedItems.length === 0) return null;
100
- const pinActive = (id) => {
101
- releasePinRef.current?.();
102
- setActiveId(id);
103
- pinnedRef.current = id;
104
- const scroller = portRef.current ?? window;
105
- let timer = null;
106
- const release = () => {
107
- pinnedRef.current = null;
108
- if (timer !== null) clearTimeout(timer);
109
- scroller.removeEventListener("scrollend", release);
110
- releasePinRef.current = null;
111
- };
112
- timer = setTimeout(release, CLICK_PIN_MAX_MS);
113
- scroller.addEventListener("scrollend", release, { once: true });
114
- releasePinRef.current = release;
115
- };
116
104
  const handleClick = (id) => (event) => {
117
105
  event.preventDefault();
118
106
  const el = document.getElementById(id);
119
107
  if (el) {
120
- pinActive(id);
108
+ setActiveId(id);
109
+ pin.click(id, event.currentTarget, scrollerOf());
121
110
  el.scrollIntoView({ behavior: reduceMotion ? "auto" : "smooth" });
122
111
  history.replaceState(null, "", `#${id}`);
123
112
  }
@@ -1 +1 @@
1
- {"version":3,"file":"number-filter.d.ts","sourceRoot":"","sources":["../../src/controls/number-filter.tsx"],"names":[],"mappings":"AA8DA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAC3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAQlD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAEvD;6FAC6F;AAC7F,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,iBAAiB,GAAG;IAClD,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,WAAW,CAAC,CAAA;IACxC;yFACqF;IACrF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAA;IACzB,gEAAgE;IAChE,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAA;IAChD;;;;;;OAMG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB;kEAC8D;IAC9D,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;CAC7B,CAAA;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,SAAS,CAqChE"}
1
+ {"version":3,"file":"number-filter.d.ts","sourceRoot":"","sources":["../../src/controls/number-filter.tsx"],"names":[],"mappings":"AAkEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAC3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAQlD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAEvD;6FAC6F;AAC7F,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,iBAAiB,GAAG;IAClD,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,WAAW,CAAC,CAAA;IACxC;yFACqF;IACrF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAA;IACzB,gEAAgE;IAChE,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAA;IAChD;;;;;;OAMG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB;kEAC8D;IAC9D,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;CAC7B,CAAA;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,SAAS,CAqChE"}
@@ -133,7 +133,7 @@ function NumberStepper({
133
133
  return /* @__PURE__ */ jsx(
134
134
  FilterPill,
135
135
  {
136
- label: String(value),
136
+ label: field.options.find((option) => option.value === String(value))?.label ?? String(value),
137
137
  numeric: true,
138
138
  active: !isDefault,
139
139
  ...icon !== void 0 && { icon },
@@ -1,7 +1,7 @@
1
1
  export { WidgetHeader } from './widget-header.js';
2
2
  export { DeltaBadge } from './delta-badge.js';
3
3
  export { Section } from './section.js';
4
- export { StatCard, type StatCardBreakdownRow, type StatCardSparklineSize, type StatCardTone, } from './stat-card.js';
4
+ export { StatCard, type StatCardBreakdownRow, type StatCardSparklineSize } from './stat-card.js';
5
5
  export { StatGroup } from './stat-group.js';
6
6
  export { EmptyState } from './empty-state.js';
7
7
  export { SettingsSection, SettingsRow, DangerZone } from './settings-section.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dashboard/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EACL,QAAQ,EACR,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,YAAY,GAClB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dashboard/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,KAAK,oBAAoB,EAAE,KAAK,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAC7F,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA"}
@@ -1,9 +1,7 @@
1
1
  import { WidgetHeader } from "./widget-header.js";
2
2
  import { DeltaBadge } from "./delta-badge.js";
3
3
  import { Section } from "./section.js";
4
- import {
5
- StatCard
6
- } from "./stat-card.js";
4
+ import { StatCard } from "./stat-card.js";
7
5
  import { StatGroup } from "./stat-group.js";
8
6
  import { EmptyState } from "./empty-state.js";
9
7
  import { SettingsSection, SettingsRow, DangerZone } from "./settings-section.js";
@@ -41,6 +41,12 @@ export type SectionProps = Omit<WidgetHeaderProps, 'tier' | 'classNames' | 'acti
41
41
  /** Persists the fold state at `basalt:section:<persistKey>`. Omit for a local, unpersisted fold
42
42
  * (`useState`). */
43
43
  persistKey?: string;
44
+ /** Controlled fold state (Mantine naming). Given one, the section follows it — a click only
45
+ * calls `onOpenChange`, and the value is mirrored into the local/persisted fold so dropping
46
+ * `open` keeps what the reader last saw. Omit for the uncontrolled, optionally persisted fold. */
47
+ open?: boolean;
48
+ /** Called with the next fold state on every toggle, controlled or not. */
49
+ onOpenChange?: (open: boolean) => void;
44
50
  /** The fold state a section opens on, respected only while no persisted value exists — a section
45
51
  * a reader has closed stays closed. `false` is what a long secondary block wants. @default true */
46
52
  defaultOpen?: boolean;
@@ -48,9 +54,11 @@ export type SectionProps = Omit<WidgetHeaderProps, 'tier' | 'classNames' | 'acti
48
54
  * still states its headline figures, which is what makes collapsing it a real option. Keep it to
49
55
  * one row — the body is what `children` is for. */
50
56
  summary?: ReactNode;
51
- /** Turns the root into a scroll anchor (`id` + `scroll-margin-top` cleared for both sticky bars). */
57
+ /** Turns the root into a scroll anchor (`id` + `scroll-margin-top`). Inside `BasaltShell` the
58
+ * offset is the clearance token; without a shell it also clears `PageBar`, which assumes the
59
+ * document is the scrollport. */
52
60
  id?: string;
53
61
  children: ReactNode;
54
62
  };
55
- export declare function Section({ actions, query, empty, tabs, collapsible, persistKey, defaultOpen, summary, id, children, className, style, classNames, ...headerProps }: SectionProps): import("react").JSX.Element;
63
+ export declare function Section({ actions, query, empty, tabs, collapsible, persistKey, defaultOpen, open: openProp, onOpenChange, summary, id, children, className, style, classNames, ...headerProps }: SectionProps): import("react").JSX.Element;
56
64
  //# sourceMappingURL=section.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"section.d.ts","sourceRoot":"","sources":["../../src/dashboard/section.tsx"],"names":[],"mappings":"AAgDA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAKnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAGzD,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAGnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAGxD;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAA;AAMpD,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,iBAAiB,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAAC,GACnF,WAAW,GACX,eAAe,CAAC,WAAW,CAAC,GAAG;IAC7B;;;OAGG;IACH,OAAO,CAAC,EAAE,cAAc,CAAA;IACxB;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAA;IAC/B;;;;OAIG;IACH,KAAK,CAAC,EAAE,cAAc,CAAA;IACtB,gGAAgG;IAChG,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB;8CAC0C;IAC1C,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;uBACmB;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;uGACmG;IACnG,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;uDAEmD;IACnD,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,qGAA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CAAA;IACnB;;sGAEkG;IAClG,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,0EAA0E;IAC1E,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACtC;uGACmG;IACnG,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;uDAEmD;IACnD,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB;;qCAEiC;IACjC,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,SAAS,CAAA;CACpB,CAAA;AA6CH,wBAAgB,OAAO,CAAC,EACtB,OAAO,EACP,KAAK,EACL,KAAK,EACL,IAAI,EACJ,WAAmB,EACnB,UAAU,EACV,WAAkB,EAClB,IAAI,EAAE,QAAQ,EACd,YAAY,EACZ,OAAO,EACP,EAAE,EACF,QAAQ,EACR,SAAS,EACT,KAAK,EACL,UAAU,EACV,GAAG,WAAW,EACf,EAAE,YAAY,+BAmGd"}
@@ -1,5 +1,5 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
- import { useId } from "react";
2
+ import { useEffect, useId } from "react";
3
3
  import { cx } from "../common/props.js";
4
4
  import { BASALT_PREFIX } from "../common/errors.js";
5
5
  import { useValidateProps } from "../common/validate.js";
@@ -8,6 +8,7 @@ import { BarActionSlot } from "../controls/actions.js";
8
8
  import { useFilterSurface } from "../controls/filter-context.js";
9
9
  import { QueryState } from "./query-state.js";
10
10
  import { usePersistedOrLocal } from "../state/persisted-or-local.js";
11
+ import { PAGE_BAR_HEIGHT_VAR, useInPageBarShell } from "../shell/index.js";
11
12
  import { WidgetHeader } from "./widget-header.js";
12
13
  import classes from "./section.module.css";
13
14
  function ChevronToggle({
@@ -42,6 +43,11 @@ function ChevronToggle({
42
43
  }
43
44
  );
44
45
  }
46
+ const ANCHOR_CLEARANCE = "var(--vx-space-sticky-header-clearance)";
47
+ function anchorOffset(inShell) {
48
+ if (inShell) return ANCHOR_CLEARANCE;
49
+ return `calc(var(${PAGE_BAR_HEIGHT_VAR}, 0px) + ${ANCHOR_CLEARANCE})`;
50
+ }
45
51
  function Section({
46
52
  actions,
47
53
  query,
@@ -50,6 +56,8 @@ function Section({
50
56
  collapsible = false,
51
57
  persistKey,
52
58
  defaultOpen = true,
59
+ open: openProp,
60
+ onOpenChange,
53
61
  summary,
54
62
  id,
55
63
  children,
@@ -66,14 +74,23 @@ function Section({
66
74
  ],
67
75
  [persistKey, collapsible, title]
68
76
  );
69
- const [open, setOpen] = usePersistedOrLocal({
77
+ const [stateOpen, setStateOpen] = usePersistedOrLocal({
70
78
  scope: "section",
71
79
  persistKey,
72
80
  initial: defaultOpen
73
81
  });
82
+ const open = openProp ?? stateOpen;
83
+ useEffect(() => {
84
+ if (openProp !== void 0 && openProp !== stateOpen) setStateOpen(openProp);
85
+ }, [openProp, stateOpen, setStateOpen]);
86
+ const setOpen = (next) => {
87
+ if (openProp === void 0) setStateOpen(next);
88
+ onOpenChange?.(next);
89
+ };
74
90
  const bodyId = useId();
75
91
  const tier = useFilterSurface() === "pill" ? "section" : "group";
76
- const anchorStyle = id === void 0 ? void 0 : { scrollMarginTop: "var(--vx-space-sticky-header-clearance)" };
92
+ const inShell = useInPageBarShell();
93
+ const anchorStyle = id === void 0 ? void 0 : { scrollMarginTop: anchorOffset(inShell) };
77
94
  const rootStyle = anchorStyle === void 0 && style === void 0 ? void 0 : { ...anchorStyle, ...style };
78
95
  const headerActions = tabs !== void 0 || actions !== void 0 || collapsible ? /* @__PURE__ */ jsxs(Fragment, { children: [
79
96
  tabs !== void 0 && open && /* @__PURE__ */ jsx(CtlSlot, { children: tabs }),
@@ -2,12 +2,6 @@ import type { ReactNode } from 'react';
2
2
  import type { WidgetHeaderDeltaProps, WidgetHeaderMetricProps, WidgetHeaderTitleProps } from './widget-header.js';
3
3
  import type { BasaltProps, SlotStylesProps, Tone } from '../common/props.js';
4
4
  import type { QueryStateLike } from './query-state.js';
5
- /**
6
- * A threshold verdict on the card's value. `undefined` is never tinted — see the module docblock.
7
- * Alias of the common `Tone` vocabulary (audit A13) — byte-identical, kept as its own name so a
8
- * consumer's existing `StatCardTone` reference never breaks.
9
- */
10
- export type StatCardTone = Tone;
11
5
  /**
12
6
  * The four boxes `StatCard` paints, and the whole styling seam it offers (`common/props.ts`).
13
7
  * `value` is not its own slot: the hero number is painted by `WidgetHeader`'s internal metrics row,
@@ -25,7 +19,7 @@ export type StatCardSlot = 'root' | 'header' | 'body' | 'sparkline';
25
19
  export type StatCardBreakdownRow = {
26
20
  readonly label: string;
27
21
  readonly value: string;
28
- readonly tone?: StatCardTone;
22
+ readonly tone?: Tone;
29
23
  };
30
24
  /**
31
25
  * The measured box a `sparkline` render prop receives.
@@ -126,7 +120,7 @@ export type StatCardProps = BasaltProps & SlotStylesProps<StatCardSlot> & Widget
126
120
  * assistive tech. Omitting it is NOT `'good'`: omitted covers a reading that is fine AND one that
127
121
  * is absent, and stays untinted so a card with nothing measured can never render green. Pass
128
122
  * `'good'` only to assert a measured value that has earned the verdict. */
129
- tone?: StatCardTone;
123
+ tone?: Tone;
130
124
  };
131
125
  export declare function StatCard({ title, icon, subtitle, info, value, unit, breakdown, query, delta, deltaPeriod, deltaPolarity, deltaFormat, deltaGlyph, sparkline, sparklinePlacement, actions, tone, className, style, classNames, }: StatCardProps): import("react").JSX.Element;
132
126
  //# sourceMappingURL=stat-card.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stat-card.d.ts","sourceRoot":"","sources":["../../src/dashboard/stat-card.tsx"],"names":[],"mappings":"AAiGA,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAA;AAErD,OAAO,KAAK,EACV,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACvB,MAAM,iBAAiB,CAAA;AAIxB,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAEzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAInD;;;;G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AC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,CAAA;CAChE,CAAA;AA6DD;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,aAAa,GAAG,WAAW,GACrC,eAAe,CAAC,YAAY,CAAC,GAC7B,sBAAsB,GACtB,IAAI,CAAC,uBAAuB,EAAE,OAAO,CAAC,GACtC,sBAAsB,GAAG;IACvB;iEAC6D;IAC7D,KAAK,EAAE,MAAM,CAAA;IACb;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,EAAE,SAAS,oBAAoB,EAAE,CAAA;IAC3C;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAA;IAC/B;;;;;;;;;;;;;;;OAeG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,IAAI,EAAE,qBAAqB,KAAK,SAAS,CAAC,CAAA;IACpE;4GACwG;IACxG,kBAAkB,CAAC,EAAE,OAAO,GAAG,OAAO,CAAA;IACtC;mGAC+F;IAC/F,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB;;;+EAG2E;IAC3E,IAAI,CAAC,EAAE,IAAI,CAAA;CACZ,CAAA;AAEH,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,SAAS,EACT,KAAK,EACL,KAAK,EACL,WAAW,EACX,aAAa,EACb,WAAW,EACX,UAAU,EACV,SAAS,EACT,kBAA4B,EAC5B,OAAO,EACP,IAAI,EACJ,SAAS,EACT,KAAK,EACL,UAAU,GACX,EAAE,aAAa,+BA0Kf"}
@@ -159,7 +159,7 @@ function StatCard({
159
159
  insetBlock: 0,
160
160
  insetInlineStart: 0,
161
161
  width: TONE_RAIL_WIDTH,
162
- // `StatCardTone`'s members are `VX.status` keys by construction, so the rail reads the
162
+ // `Tone`'s members are `VX.status` keys by construction, so the rail reads the
163
163
  // per-scheme `--vx-status-*` solid directly — never a hex, so it re-resolves in both
164
164
  // schemes and under a consumer's `derive` retune. Contrast against
165
165
  // `--vx-surface-panel` is measured in `theme/contrast.test.ts`.
@@ -6,6 +6,13 @@
6
6
  */
7
7
  import type { Finding, GuardConfig, GuardKind, GuardSeverity } from './types.js';
8
8
  export type { Finding, GuardConfig, GuardKind, GuardSeverity };
9
+ /**
10
+ * `--vx-*` names basalt once emitted and no longer does, with the replacement MIGRATING names
11
+ * (`null`: deleted with no replacement). Hand-kept on purpose: it is history, it only grows, and
12
+ * `vx-names.test.ts` pins that none of these is live and every replacement is. Exported so tests
13
+ * derive their fixtures from it instead of keeping a second copy.
14
+ */
15
+ export declare const REMOVED_VX_NAMES: Readonly<Record<string, string | null>>;
9
16
  /** Shared default config — CLI and tests import this to avoid duplication. */
10
17
  export declare const DEFAULT_GUARD_CONFIG: GuardConfig;
11
18
  /**
@@ -257,7 +264,7 @@ export declare const GUARD_RULES: {
257
264
  readonly 'theme-allow-unscoped': {
258
265
  readonly kind: "theme-allow-unscoped";
259
266
  readonly pattern: RegExp;
260
- readonly message: "theme-allow without a usable rule id and a reason. Write `theme-allow <rule-id> — <why>`: the id scopes the exception to that one kind (a bare comment waives EVERY kind on the line, including ones added later), and the reason is what makes it reviewable in a diff. An id that names no rule is a typo, not a blanket waiver — it suppresses nothing. `theme-allow-file <rule-id> — <why>` declares the whole file, and must name its ids: a bare one waives nothing.";
267
+ readonly message: "theme-allow without a usable rule id and a reason. Write `theme-allow <rule-id> — <why>`: the id scopes the exception to that one kind (a bare comment waives nothing), and the reason is what makes it reviewable in a diff. An id that names no rule is a typo, not a blanket waiver — it suppresses nothing. `theme-allow-file <rule-id> — <why>` declares the whole file, and must name its ids: a bare one waives nothing.";
261
268
  };
262
269
  readonly 'surface-shadow-override': {
263
270
  readonly kind: "surface-shadow-override";
@@ -289,7 +296,7 @@ export declare const GUARD_RULES: {
289
296
  readonly kind: "raw-selection-control";
290
297
  readonly pattern: RegExp;
291
298
  readonly appliesTo: (relPath: string) => boolean;
292
- readonly message: "Raw selection control with no home — a filter or tab belongs in a PageBar / Section / WidgetHeader slot and takes a `field` (a FieldHandle), so it owns the URL write and the localStorage mirror instead of carrying value/onChange (docs/CONTROLS-SPEC.md laws C1–C3). Use the bound control from basalt-ui/controls. A settings row, a FormRow / FormGroup, an overlay and an @mantine/form file are the declared non-homes and never report. No shell? PageBar needs no BasaltShell: outside one it renders in flow, sticky, with its own title — so its slots are a reachable home for a provider-only app. This is the TEXT lane of basalt/control-outside-home, which answers the same question against the real AST — where the two disagree, the plugin is right.";
299
+ readonly message: "Raw selection control with no store field — bind its state to one: in a page slot (PageBar / Section / WidgetHeader) use the basalt filter with `field={store.field.x}` (`createSearchStore` for URL state); in a `SettingsRow control=` keep the Mantine control and take `[value, setValue]` from a `createLocalStore` field .use(), never useState. Rule: basalt-controls.md. No shell? PageBar needs no BasaltShell: outside one it renders in flow, sticky, with its own title — so its slots are a reachable home for a provider-only app.";
293
300
  };
294
301
  readonly 'inline-font-size': {
295
302
  readonly kind: "inline-font-size";
@@ -305,7 +312,7 @@ export declare const GUARD_RULES: {
305
312
  readonly 'unknown-vx-token': {
306
313
  readonly kind: "unknown-vx-token";
307
314
  readonly pattern: RegExp;
308
- readonly message: `var() names a --vx-* token basalt does not emit, so it resolves to its fallback (or to nothing) with no error anywhere. Judged: every name inside a basalt-owned family (${string}) \u2014 pick the token from basalt-ui/tokens.css; your own series belong in a family of their own (groupTokens throws on one inside basalt's, in dev builds). Removed names and their replacements: ${string}. A name in any other family is never judged, because groupTokens may declare it in a file this scan cannot see.`;
315
+ readonly message: `var() names a --vx-* token basalt does not emit, so it resolves to its fallback (or to nothing) with no error anywhere. Judged: every name inside a basalt-owned family (${string}), plus any name basalt used to emit in any family \u2014 pick the token from the stylesheet basalt-ui tokens:css emits; your own series belong in a family of their own (groupTokens throws on one inside basalt's, in dev builds). A removed name is reported with its replacement on the finding line (MIGRATING.md has the table). Any other name outside a basalt family is never judged, because groupTokens may declare it in a file this scan cannot see.`;
309
316
  };
310
317
  };
311
318
  /**
@@ -349,7 +356,7 @@ export declare function checkSource(text: string, relPath: string, cfg: GuardCon
349
356
  *
350
357
  * `guardKinds` is what `checkSource` can judge by re-running itself with the annotation
351
358
  * neutralized. `pluginRules` is what only an `oxlint` run can judge. `unknownRules` names no rule
352
- * at all. All three empty with `bare: true` is the legacy blanket form.
359
+ * at all. All three empty is a bare annotation, which waives nothing.
353
360
  */
354
361
  export type AllowAnnotationSite = {
355
362
  /** 1-based line the annotation is written on. */
@@ -366,17 +373,14 @@ export type AllowAnnotationSite = {
366
373
  * Every id an `oxlint` run can prove live: `pluginRules`, plus a guard kind that is ALSO a plugin
367
374
  * rule (`in-body-page-title`) or aliases one ({@link WAIVER_ID_ALIASES}). A waiver is live if
368
375
  * EITHER lane still needs it — judging only `pluginRules` called rb's live `in-body-page-title`
369
- * waivers dead, and deleting them made oxlint exit 1. A bare LINE-scope annotation covers every
370
- * plugin rule (the plugin's `allowCovers`), so it lists all of them; a bare file-scope one waives
371
- * nothing in either lane and lists none.
376
+ * waivers dead, and deleting them made oxlint exit 1. A bare annotation waives nothing in either
377
+ * lane and lists none.
372
378
  */
373
379
  readonly oxlintRules: readonly string[];
374
380
  /** Words that occupied the id slot but name no rule. Their presence makes the parse fail closed. */
375
381
  readonly unknownRules: readonly string[];
376
382
  /** A written reason follows the ids. */
377
383
  readonly hasReason: boolean;
378
- /** The legacy blanket form — no ids at all, known or unknown. Only covers anything at line scope. */
379
- readonly bare: boolean;
380
384
  /** The source line, verbatim. */
381
385
  readonly text: string;
382
386
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/guard/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAK7E,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,CAAA;A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