basalt-ui 1.34.1 → 1.36.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.
- package/AGENTS.md +21 -21
- package/CHANGELOG.md +24 -0
- package/MIGRATING.md +89 -12
- package/agent/rules/basalt-controls.md +1 -1
- package/agent/rules/basalt-mantine.md +1 -1
- package/configs/oxlint-plugin.js +51 -4
- package/configs/oxlint-plugin.test.ts +58 -15
- package/dist/charts/primitives/ChartFrame.d.ts.map +1 -1
- package/dist/charts/primitives/ChartFrame.js +2 -1
- package/dist/charts/primitives/ChartLegend.d.ts.map +1 -1
- package/dist/charts/primitives/ChartLegend.js +2 -1
- package/dist/charts/primitives/chart-tier.d.ts +0 -2
- package/dist/charts/primitives/chart-tier.d.ts.map +1 -1
- package/dist/charts/primitives/chart-tier.js +0 -5
- package/dist/common/index.d.ts +1 -0
- package/dist/common/index.d.ts.map +1 -1
- package/dist/common/index.js +2 -0
- package/dist/common/use-media-query.d.ts +7 -0
- package/dist/common/use-media-query.d.ts.map +1 -1
- package/dist/common/use-media-query.js +4 -0
- package/dist/common/vx-families.d.ts +1 -1
- package/dist/{forms → controls}/form-layout.d.ts +1 -1
- package/dist/controls/form-layout.d.ts.map +1 -0
- package/dist/{forms → controls}/form-layout.js +2 -2
- package/dist/controls/index.d.ts +1 -0
- package/dist/controls/index.d.ts.map +1 -1
- package/dist/controls/index.js +10 -0
- package/dist/forms/index.d.ts +37 -7
- package/dist/forms/index.d.ts.map +1 -1
- package/dist/forms/index.js +10 -2
- package/dist/guard/index.d.ts +3 -1
- package/dist/guard/index.d.ts.map +1 -1
- package/dist/guard/index.js +16 -12
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/provider/index.d.ts +5 -4
- package/dist/provider/index.d.ts.map +1 -1
- package/dist/shell/app-mobile-nav.d.ts.map +1 -1
- package/dist/shell/app-mobile-nav.js +19 -10
- package/dist/shell/app-sidebar-account.d.ts.map +1 -1
- package/dist/shell/app-sidebar-account.js +1 -0
- package/dist/shell/app-sidebar.d.ts.map +1 -1
- package/dist/shell/app-sidebar.js +11 -6
- package/dist/shell/app-sidebar.module.css +39 -0
- package/dist/shell/app-sidebar.module.css.d.ts +3 -0
- package/dist/shell/index.d.ts +12 -5
- package/dist/shell/index.d.ts.map +1 -1
- package/dist/shell/nav-types.d.ts +19 -3
- package/dist/shell/nav-types.d.ts.map +1 -1
- package/dist/shell/sidebar-block-model.d.ts +3 -3
- package/dist/shell/sidebar-block-model.d.ts.map +1 -1
- package/dist/shell/sidebar-block-model.js +6 -2
- package/dist/shell/sidebar-blocks.d.ts +2 -1
- package/dist/shell/sidebar-blocks.d.ts.map +1 -1
- package/dist/shell/sidebar-blocks.js +13 -5
- package/dist/shell/use-size-class.d.ts.map +1 -1
- package/dist/surfaces.d.ts +4 -4
- package/dist/surfaces.d.ts.map +1 -1
- package/dist/surfaces.js +13 -5
- package/dist/tokens/index.d.ts.map +1 -1
- package/dist/tokens/index.js +5 -7
- package/llms.txt +5 -5
- package/package.json +1 -1
- package/src/charts/primitives/ChartFrame.tsx +2 -1
- package/src/charts/primitives/ChartLegend.tsx +2 -1
- package/src/charts/primitives/chart-tier.tsx +0 -6
- package/src/common/index.ts +1 -0
- package/src/common/use-media-query.ts +10 -0
- package/src/common/vx-families.ts +1 -1
- package/src/{forms → controls}/form-layout.tsx +7 -5
- package/src/controls/index.ts +16 -0
- package/src/forms/index.ts +36 -9
- package/src/guard/index.ts +35 -29
- package/src/index.ts +1 -0
- package/src/provider/index.tsx +5 -4
- package/src/shell/app-mobile-nav.tsx +34 -15
- package/src/shell/app-sidebar-account.tsx +3 -0
- package/src/shell/app-sidebar.module.css +39 -0
- package/src/shell/app-sidebar.module.css.d.ts +3 -0
- package/src/shell/app-sidebar.tsx +13 -6
- package/src/shell/index.tsx +12 -5
- package/src/shell/nav-types.ts +19 -3
- package/src/shell/sidebar-block-model.ts +13 -5
- package/src/shell/sidebar-blocks.tsx +30 -5
- package/src/shell/use-size-class.ts +6 -4
- package/src/surfaces.ts +13 -5
- package/src/tokens/index.ts +12 -15
- package/dist/forms/form-layout.d.ts.map +0 -1
- /package/dist/{forms → controls}/form-layout.module.css +0 -0
- /package/dist/{forms → controls}/form-layout.module.css.d.ts +0 -0
- /package/src/{forms → controls}/form-layout.module.css +0 -0
- /package/src/{forms → controls}/form-layout.module.css.d.ts +0 -0
|
@@ -78,6 +78,10 @@ function hasActiveDescendant(item) {
|
|
|
78
78
|
if (item.active) return true;
|
|
79
79
|
return item.children?.some((c) => hasActiveDescendant(c)) ?? false;
|
|
80
80
|
}
|
|
81
|
+
function settingsCurrent(entry) {
|
|
82
|
+
if (!entry.active) return void 0;
|
|
83
|
+
return entry.current === "page" ? "page" : "true";
|
|
84
|
+
}
|
|
81
85
|
function NavLinkBody({
|
|
82
86
|
item,
|
|
83
87
|
active,
|
|
@@ -267,12 +271,12 @@ function AppSidebar(props) {
|
|
|
267
271
|
className: classes.footerBtn,
|
|
268
272
|
onClick: entry.onClick,
|
|
269
273
|
"aria-label": entry.label,
|
|
270
|
-
"aria-current": entry
|
|
274
|
+
"aria-current": settingsCurrent(entry),
|
|
271
275
|
children: [
|
|
272
276
|
/* @__PURE__ */ jsx("span", { className: classes.footerIconSlot, children: entry.icon ?? /* @__PURE__ */ jsx(IconGear, {}) }),
|
|
273
277
|
/* @__PURE__ */ jsx(Text, { className: classes.footerText, fz: VX.text.md, children: entry.label }),
|
|
274
278
|
index === 0 ? ringMark : null,
|
|
275
|
-
entry.active ? /* @__PURE__ */ jsx(IconCheck, {}) : null
|
|
279
|
+
entry.active && entry.current !== "page" ? /* @__PURE__ */ jsx(IconCheck, {}) : null
|
|
276
280
|
]
|
|
277
281
|
},
|
|
278
282
|
entry.key
|
|
@@ -288,10 +292,11 @@ function AppSidebar(props) {
|
|
|
288
292
|
settingsItems.map((entry) => /* @__PURE__ */ jsx(
|
|
289
293
|
Menu.Item,
|
|
290
294
|
{
|
|
295
|
+
className: classes.settingsMenuItem,
|
|
291
296
|
leftSection: entry.icon,
|
|
292
|
-
rightSection: entry.active ? /* @__PURE__ */ jsx(IconCheck, {}) : void 0,
|
|
297
|
+
rightSection: entry.active && entry.current !== "page" ? /* @__PURE__ */ jsx(IconCheck, {}) : void 0,
|
|
293
298
|
onClick: entry.onClick,
|
|
294
|
-
"aria-current": entry
|
|
299
|
+
"aria-current": settingsCurrent(entry),
|
|
295
300
|
children: entry.label
|
|
296
301
|
},
|
|
297
302
|
entry.key
|
|
@@ -322,12 +327,12 @@ function AppSidebar(props) {
|
|
|
322
327
|
classNames: { viewport: classes.navViewport },
|
|
323
328
|
children: /* @__PURE__ */ jsxs(Stack, { gap: 0, className: classes.nav, children: [
|
|
324
329
|
sections.map((section) => /* @__PURE__ */ jsx(NavSection, { section, collapsed }, section.label)),
|
|
325
|
-
navBlocks.map((block) => /* @__PURE__ */ jsx(SidebarBlockView, { block }, block.key))
|
|
330
|
+
navBlocks.map((block) => /* @__PURE__ */ jsx(SidebarBlockView, { block, collapsed }, block.key))
|
|
326
331
|
] })
|
|
327
332
|
}
|
|
328
333
|
),
|
|
329
334
|
(bottomBlocks.length > 0 || settingsRow !== null || account !== void 0) && /* @__PURE__ */ jsxs(Stack, { gap: 0, className: classes.footer, children: [
|
|
330
|
-
bottomBlocks.map((block) => /* @__PURE__ */ jsx(SidebarBlockView, { block }, block.key)),
|
|
335
|
+
bottomBlocks.map((block) => /* @__PURE__ */ jsx(SidebarBlockView, { block, collapsed }, block.key)),
|
|
331
336
|
settingsRow,
|
|
332
337
|
account !== void 0 && /* @__PURE__ */ jsx(
|
|
333
338
|
SidebarAccount,
|
|
@@ -249,6 +249,21 @@
|
|
|
249
249
|
color: var(--vx-ink);
|
|
250
250
|
}
|
|
251
251
|
|
|
252
|
+
/* A settings entry that IS the current page (`SettingsMenuItem.current: 'page'`) — the nav row's
|
|
253
|
+
* active treatment (theme/nav-link.module.css): accent fill, weight 600, accent icon. */
|
|
254
|
+
.footerBtn[aria-current='page'],
|
|
255
|
+
.settingsMenuItem[aria-current='page'] {
|
|
256
|
+
background-color: color-mix(in srgb, var(--vx-accent) 12%, transparent);
|
|
257
|
+
color: var(--vx-ink);
|
|
258
|
+
font-weight: 600;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.footerBtn[aria-current='page'] > svg,
|
|
262
|
+
.footerBtn[aria-current='page'] .footerIconSlot > svg,
|
|
263
|
+
.settingsMenuItem[aria-current='page'] [data-position='left'] {
|
|
264
|
+
color: var(--vx-accent);
|
|
265
|
+
}
|
|
266
|
+
|
|
252
267
|
.footerText {
|
|
253
268
|
flex: 1;
|
|
254
269
|
text-align: left;
|
|
@@ -399,6 +414,25 @@
|
|
|
399
414
|
color: var(--vx-ink);
|
|
400
415
|
}
|
|
401
416
|
|
|
417
|
+
/* A custom block's rail trigger (`rail: 'icon'`) — a footer-row-sized icon target. */
|
|
418
|
+
.blockRailTrigger {
|
|
419
|
+
display: flex;
|
|
420
|
+
align-items: center;
|
|
421
|
+
justify-content: center;
|
|
422
|
+
padding: var(--vx-space-row-inset-y) var(--vx-space-row-inset-x);
|
|
423
|
+
border-radius: var(--vx-radius-ctrl);
|
|
424
|
+
color: var(--vx-faint);
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
.blockRailTrigger:hover {
|
|
428
|
+
background-color: color-mix(in srgb, var(--vx-ink) 6%, transparent);
|
|
429
|
+
color: var(--vx-ink);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
.blockRailPopover {
|
|
433
|
+
min-width: 220px;
|
|
434
|
+
}
|
|
435
|
+
|
|
402
436
|
.blockIcon {
|
|
403
437
|
position: relative;
|
|
404
438
|
display: flex;
|
|
@@ -717,6 +751,11 @@
|
|
|
717
751
|
display: none;
|
|
718
752
|
}
|
|
719
753
|
|
|
754
|
+
.root[data-collapsed] .block[data-rail='icon'] {
|
|
755
|
+
display: flex;
|
|
756
|
+
justify-content: center;
|
|
757
|
+
}
|
|
758
|
+
|
|
720
759
|
.root[data-collapsed] .block[data-rail='dot'] .blockHeader {
|
|
721
760
|
justify-content: center;
|
|
722
761
|
padding: 0;
|
|
@@ -42,5 +42,8 @@ declare const classes: {
|
|
|
42
42
|
readonly footerLinks: string
|
|
43
43
|
readonly footerIconSlot: string
|
|
44
44
|
readonly footerVersion: string
|
|
45
|
+
readonly settingsMenuItem: string
|
|
46
|
+
readonly blockRailTrigger: string
|
|
47
|
+
readonly blockRailPopover: string
|
|
45
48
|
}
|
|
46
49
|
export default classes
|
package/dist/shell/index.d.ts
CHANGED
|
@@ -39,10 +39,16 @@ export type SettingsMenuItem = {
|
|
|
39
39
|
label: string;
|
|
40
40
|
icon?: ReactNode;
|
|
41
41
|
onClick?: (e: MouseEvent) => void;
|
|
42
|
-
/** This entry is the current
|
|
43
|
-
*
|
|
44
|
-
* More-sheet row) and the row carries `aria-current="true"`. */
|
|
42
|
+
/** This entry is the current one (e.g. the active theme radio, the open dev tool, the open
|
|
43
|
+
* settings page) — how it shows is `current`. */
|
|
45
44
|
active?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* What `active` means. `'selection'` (default) is a chosen value: a trailing check glyph in every
|
|
47
|
+
* form (flat footer row, gear `Menu.Item`, the mobile More-sheet row) and `aria-current="true"`.
|
|
48
|
+
* `'page'` is a navigation destination: no check, the nav-item active style, and
|
|
49
|
+
* `aria-current="page"` — what a router-backed settings entry wants.
|
|
50
|
+
*/
|
|
51
|
+
current?: 'selection' | 'page';
|
|
46
52
|
};
|
|
47
53
|
export type BasaltShellProps = BasaltProps & {
|
|
48
54
|
/**
|
|
@@ -77,8 +83,9 @@ export type BasaltShellProps = BasaltProps & {
|
|
|
77
83
|
* Because they are data, basalt owns the projections the two `ReactNode` slots could not express:
|
|
78
84
|
* a `list` with a `count` becomes a dot on its icon in the collapsed rail, a `progress` block
|
|
79
85
|
* becomes a ring on the settings row, and a block with `mobile: 'more'` becomes one More-sheet
|
|
80
|
-
* row opening a nested sheet of its items. A `kind: 'custom'` block is desktop-only, exactly
|
|
81
|
-
* `sidebarNavExtra` was
|
|
86
|
+
* row opening a nested sheet of its items. A `kind: 'custom'` block is desktop-only and hidden in the rail, exactly
|
|
87
|
+
* as `sidebarNavExtra` was, unless it opts in with `icon` + `label` (a rail icon opening it in a
|
|
88
|
+
* popover) and `mobile: 'more'` (a More row opening it in a sheet).
|
|
82
89
|
*/
|
|
83
90
|
sidebarBlocks?: SidebarBlock[];
|
|
84
91
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shell/index.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAiB,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAYlD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAC1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AACjF,OAAO,KAAK,EACV,eAAe,EAEf,YAAY,EAEZ,cAAc,EACf,MAAM,aAAa,CAAA;AASpB,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAA;AAChE,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAC1E,OAAO,EACL,aAAa,EACb,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,GAC1B,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,YAAY,EACV,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,UAAU,EACV,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,i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,MAAM,gBAAgB,GAAG,WAAW,GAAG;IAC3C;;;OAGG;IACH,KAAK,EAAE,WAAW,GAAG;QAAE,IAAI,CAAC,EAAE,eAAe,EAAE,CAAA;KAAE,CAAA;IACjD,mGAAmG;IACnG,QAAQ,EAAE,cAAc,EAAE,CAAA;IAC1B;;;OAGG;IACH,SAAS,CAAC,EAAE,eAAe,CAAA;IAC3B;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,YAAY,EAAE,CAAA;IAC9B;;;;;;;;;;;;OAYG;IACH,aAAa,CAAC,EAAE,YAAY,EAAE,CAAA;IAC9B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,gBAAgB,EAAE,CAAA;IACtC;;;;;;;;OAQG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;IACvC;;;OAGG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAA;IAC5B;;;;OAIG;IACH,MAAM,CAAC,EAAE,mBAAmB,GAAG;QAAE,OAAO,CAAC,EAAE,oBAAoB,CAAA;KAAE,CAAA;IACjE;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAA;IAChD,oBAAoB;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB,CAAA;AAgFD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,+BASlD"}
|
|
@@ -129,9 +129,10 @@ export type SidebarProgressBlock = {
|
|
|
129
129
|
mobile?: 'more' | 'hidden';
|
|
130
130
|
};
|
|
131
131
|
/**
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
132
|
+
* Arbitrary consumer content (a tree, a filter panel) that no set of rows can express. Replaced
|
|
133
|
+
* `BasaltShellProps.sidebarNavExtra`. By default desktop-only and hidden on the collapsed rail,
|
|
134
|
+
* exactly as that prop was; `icon` + `label` opt it into the rail (as an icon opening the node in a
|
|
135
|
+
* popover) and `mobile: 'more'` into the More sheet.
|
|
135
136
|
*/
|
|
136
137
|
export type SidebarCustomBlock = {
|
|
137
138
|
kind: 'custom';
|
|
@@ -139,6 +140,21 @@ export type SidebarCustomBlock = {
|
|
|
139
140
|
node: ReactNode;
|
|
140
141
|
/** @default 'nav' */
|
|
141
142
|
placement?: 'nav' | 'bottom';
|
|
143
|
+
/** The rail icon. Needs `label` too: an icon-only trigger must be nameable. */
|
|
144
|
+
icon?: ReactNode;
|
|
145
|
+
/** The rail icon's accessible name, the popover heading and the More row / sheet title. */
|
|
146
|
+
label?: string;
|
|
147
|
+
/**
|
|
148
|
+
* Collapsed-rail projection: `'icon'` swaps the node for `icon`, which opens it in a popover.
|
|
149
|
+
* @default 'icon' when both `icon` and `label` are set, `'hidden'` otherwise
|
|
150
|
+
*/
|
|
151
|
+
rail?: 'icon' | 'hidden';
|
|
152
|
+
/**
|
|
153
|
+
* Below `sm` there is no sidebar: `'more'` makes one More row, labelled `label`, that opens the
|
|
154
|
+
* node in a sheet. Needs `label`.
|
|
155
|
+
* @default 'hidden'
|
|
156
|
+
*/
|
|
157
|
+
mobile?: 'more' | 'hidden';
|
|
142
158
|
};
|
|
143
159
|
/**
|
|
144
160
|
* A sidebar block — DECLARED DATA, never a `ReactNode` slot (law C13, `docs/CONTROLS-SPEC.md`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nav-types.d.ts","sourceRoot":"","sources":["../../src/shell/nav-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAElD,6FAA6F;AAC7F,MAAM,MAAM,kBAAkB,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAA;AAE1D;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG;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AO,CAAA;IACf,MAAM,EAAE,cAAc,EAAE,CAAA;IACxB,MAAM,EAAE,OAAO,CAAA;CAChB,CAAA;AAEL,6EAA6E;AAC7E,MAAM,MAAM,cAAc,GAAG;IAAE,KAAK,EAAE,aAAa,EAAE,CAAA;CAAE,CAAA;AAEvD,MAAM,MAAM,eAAe,GAAG;IAC5B,wFAAwF;IACxF,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACxB,wDAAwD;IACxD,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,mFAAmF;IACnF,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,sBAAsB;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,MAAM,WAAW,GAAG,IAAI,CAAA;CAC5C,CAAA"}
|
|
@@ -20,10 +20,10 @@ export declare function sidebarBlockPlacement(block: SidebarBlock): 'nav' | 'bot
|
|
|
20
20
|
/**
|
|
21
21
|
* The collapsed-rail projection. A list block earns a dot only when it carries a `count` — a rail
|
|
22
22
|
* icon with no number behind it is a dot that means nothing — and a progress block a ring on the
|
|
23
|
-
* settings row. A `custom` block has
|
|
24
|
-
*
|
|
23
|
+
* settings row. A `custom` block has a rail form only when it opts in (see below), which is
|
|
24
|
+
* `sidebarNavExtra`'s old hidden-in-the-rail behaviour otherwise.
|
|
25
25
|
*/
|
|
26
|
-
export declare function sidebarBlockRail(block: SidebarBlock): 'dot' | 'ring' | 'hidden';
|
|
26
|
+
export declare function sidebarBlockRail(block: SidebarBlock): 'dot' | 'ring' | 'icon' | 'hidden';
|
|
27
27
|
/**
|
|
28
28
|
* The mobile projection. A list is reachable from More by default — below `sm` the sidebar does
|
|
29
29
|
* not render at all, so a hidden list is unreachable, not merely unshown. A progress row defaults
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar-block-model.d.ts","sourceRoot":"","sources":["../../src/shell/sidebar-block-model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE/C,gGAAgG;AAChG,eAAO,MAAM,YAAY,IAAI,CAAA;AAE7B;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,YAAY,GAAG,KAAK,GAAG,QAAQ,CAG3E;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,YAAY,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,
|
|
1
|
+
{"version":3,"file":"sidebar-block-model.d.ts","sourceRoot":"","sources":["../../src/shell/sidebar-block-model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE/C,gGAAgG;AAChG,eAAO,MAAM,YAAY,IAAI,CAAA;AAE7B;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,YAAY,GAAG,KAAK,GAAG,QAAQ,CAG3E;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,YAAY,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAexF;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,GAAG,QAAQ,CAMzE;AAED,gGAAgG;AAChG,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAG3F;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKlD;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE3D"}
|
|
@@ -4,13 +4,17 @@ function sidebarBlockPlacement(block) {
|
|
|
4
4
|
return block.placement ?? "nav";
|
|
5
5
|
}
|
|
6
6
|
function sidebarBlockRail(block) {
|
|
7
|
-
if (block.kind === "custom")
|
|
7
|
+
if (block.kind === "custom") {
|
|
8
|
+
if (block.icon === void 0 || block.label === void 0) return "hidden";
|
|
9
|
+
return block.rail ?? "icon";
|
|
10
|
+
}
|
|
8
11
|
if (block.kind === "progress") return block.rail ?? "ring";
|
|
9
12
|
if (block.icon === void 0 || block.count === void 0) return "hidden";
|
|
10
13
|
return block.rail ?? "dot";
|
|
11
14
|
}
|
|
12
15
|
function sidebarBlockMobile(block) {
|
|
13
|
-
if (block.kind === "custom")
|
|
16
|
+
if (block.kind === "custom")
|
|
17
|
+
return block.mobile === "more" && block.label !== void 0 ? "more" : "hidden";
|
|
14
18
|
if (block.kind === "progress") return block.mobile ?? "hidden";
|
|
15
19
|
return block.mobile ?? "more";
|
|
16
20
|
}
|
|
@@ -26,7 +26,8 @@ export declare function SidebarProgressRing({ value, total }: {
|
|
|
26
26
|
total: number;
|
|
27
27
|
}): import("react").JSX.Element;
|
|
28
28
|
/** One block, whichever kind it is. `AppSidebar` places it; this decides nothing but the paint. */
|
|
29
|
-
export declare function SidebarBlockView({ block, }: {
|
|
29
|
+
export declare function SidebarBlockView({ block, collapsed, }: {
|
|
30
30
|
block: SidebarListBlock | SidebarProgressBlock | SidebarCustomBlock;
|
|
31
|
+
collapsed?: boolean;
|
|
31
32
|
}): import("react").JSX.Element;
|
|
32
33
|
//# sourceMappingURL=sidebar-blocks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar-blocks.d.ts","sourceRoot":"","sources":["../../src/shell/sidebar-blocks.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAEV,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,aAAa,CAAA;AAYpB;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,EAAE;IA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,mGAAmG;AACnG,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,SAAiB,GAClB,EAAE;IACD,KAAK,EAAE,gBAAgB,GAAG,oBAAoB,GAAG,kBAAkB,CAAA;IACnE,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,+BAIA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Collapse, NavLink, Progress, Text, UnstyledButton } from "@mantine/core";
|
|
2
|
+
import { Collapse, NavLink, Popover, Progress, Text, UnstyledButton } from "@mantine/core";
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import { NavCountBadge } from "./nav-count-badge.js";
|
|
5
5
|
import { createPersistedState } from "../state.js";
|
|
@@ -150,15 +150,23 @@ function ProgressBlock({ block }) {
|
|
|
150
150
|
] });
|
|
151
151
|
return /* @__PURE__ */ jsx("div", { className: classes.block, "data-rail": sidebarBlockRail(block), children: block.onClick !== void 0 ? /* @__PURE__ */ jsx(UnstyledButton, { className: classes.blockProgress, onClick: block.onClick, children: inner }) : /* @__PURE__ */ jsx("div", { className: classes.blockProgress, children: inner }) });
|
|
152
152
|
}
|
|
153
|
-
function CustomBlock({ block }) {
|
|
154
|
-
|
|
153
|
+
function CustomBlock({ block, collapsed }) {
|
|
154
|
+
const rail = sidebarBlockRail(block);
|
|
155
|
+
if (collapsed && rail === "icon") {
|
|
156
|
+
return /* @__PURE__ */ jsx("div", { className: classes.block, "data-rail": "icon", children: /* @__PURE__ */ jsxs(Popover, { position: "right-start", withArrow: false, offset: 4, withinPortal: true, zIndex: 400, children: [
|
|
157
|
+
/* @__PURE__ */ jsx(Popover.Target, { children: /* @__PURE__ */ jsx(UnstyledButton, { className: classes.blockRailTrigger, "aria-label": block.label, children: /* @__PURE__ */ jsx(IconSlot, { children: block.icon }) }) }),
|
|
158
|
+
/* @__PURE__ */ jsx(Popover.Dropdown, { p: "xs", className: classes.blockRailPopover, children: block.node })
|
|
159
|
+
] }) });
|
|
160
|
+
}
|
|
161
|
+
return /* @__PURE__ */ jsx("div", { className: classes.block, "data-rail": rail, children: block.node });
|
|
155
162
|
}
|
|
156
163
|
function SidebarBlockView({
|
|
157
|
-
block
|
|
164
|
+
block,
|
|
165
|
+
collapsed = false
|
|
158
166
|
}) {
|
|
159
167
|
if (block.kind === "list") return /* @__PURE__ */ jsx(ListBlock, { block });
|
|
160
168
|
if (block.kind === "progress") return /* @__PURE__ */ jsx(ProgressBlock, { block });
|
|
161
|
-
return /* @__PURE__ */ jsx(CustomBlock, { block });
|
|
169
|
+
return /* @__PURE__ */ jsx(CustomBlock, { block, collapsed });
|
|
162
170
|
}
|
|
163
171
|
export {
|
|
164
172
|
IconChevron,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-size-class.d.ts","sourceRoot":"","sources":["../../src/shell/use-size-class.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-size-class.d.ts","sourceRoot":"","sources":["../../src/shell/use-size-class.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,YAAY,EAAQ,MAAM,wBAAwB,CAAA;AAE3D,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,YAAY,CAAA;AAEjD,sGAAsG;AACtG,eAAO,MAAM,oBAAoB,wEAAkD,CAAA;AAEnF,wBAAgB,YAAY,IAAI,SAAS,CAUxC"}
|
package/dist/surfaces.d.ts
CHANGED
|
@@ -175,7 +175,7 @@ export declare const SURFACES: {
|
|
|
175
175
|
readonly guardKinds: readonly ["raw-motion-value", "card-with-border", "raw-form-control", "sub-16-input-font", "mantine-shade-index", "in-body-page-title", "raw-spacing", "inline-spacing", "inline-display", "raw-html-layout", "hidden-inline-style", "raw-media-query"];
|
|
176
176
|
readonly pluginRules: readonly ["hand-rolled-shell", "raw-breakpoint", "card-inset", "in-body-page-title", "raw-scroll-container", "page-bar-budget", "shadow-basalt-export", "provider-above-router", "deprecated-export", "no-import-meta-env"];
|
|
177
177
|
readonly advisoryLaws: readonly ["no second cssVariablesResolver — don't hand-build createTheme or re-add the resolver basalt already installs"];
|
|
178
|
-
readonly description: "BasaltProvider, createBasaltTheme, BasaltShell + sidebar/mobile-nav/breadcrumbs, PageBar, PageAside, useSizeClass, NavCountBadge, ThemeToggle, ThreadWorkspace + thread-chat components, WidgetHeader, dashboard composites (DeltaBadge, StatCard with threshold tone, EmptyState, QueryState/LoadingState/ErrorState, SettingsSection/SettingsRow/DangerZone), ConnectivityProvider/useConnectivity/ConnectivityIndicator (auto-mounted, C1: absorbed from the dropped ./connectivity), createBasaltQueryClient/unwrap/BasaltQueryDevtools (C1: absorbed from the dropped ./query), BasaltDevDock (C5: lazy Router/Query devtools + theme lab in one dock)";
|
|
178
|
+
readonly description: "BasaltProvider, createBasaltTheme, BasaltShell + sidebar/mobile-nav/breadcrumbs, PageBar, PageAside, useSizeClass, useCoarsePointer, NavCountBadge, ThemeToggle, ThreadWorkspace + thread-chat components, WidgetHeader, dashboard composites (DeltaBadge, StatCard with threshold tone, EmptyState, QueryState/LoadingState/ErrorState, SettingsSection/SettingsRow/DangerZone), ConnectivityProvider/useConnectivity/ConnectivityIndicator (auto-mounted, C1: absorbed from the dropped ./connectivity), createBasaltQueryClient/unwrap/BasaltQueryDevtools (C1: absorbed from the dropped ./query), BasaltDevDock (C5: lazy Router/Query devtools + theme lab in one dock)";
|
|
179
179
|
readonly optionalPeers: readonly ["react-markdown", "remark-gfm", "rehype-sanitize", "remend", "shiki", "beautiful-mermaid", "@tanstack/react-router-devtools"];
|
|
180
180
|
readonly forbiddenImports: readonly [];
|
|
181
181
|
};
|
|
@@ -267,7 +267,7 @@ export declare const SURFACES: {
|
|
|
267
267
|
readonly skill: readonly ["basalt-design"];
|
|
268
268
|
readonly guardKinds: readonly [];
|
|
269
269
|
readonly pluginRules: readonly ["forms-field-key"];
|
|
270
|
-
readonly description: "Mantine form layer: useBasaltForm + inputProps/fieldKey (two calls — a spread `key` is a React 19 warning; the deprecated `field` alias for `inputProps` was removed in 1.29.0, C1 consolidation),
|
|
270
|
+
readonly description: "Mantine form layer: useBasaltForm + inputProps/fieldKey (two calls — a spread `key` is a React 19 warning; the deprecated `field` alias for `inputProps` was removed in 1.29.0, C1 consolidation), useFormSubmit (submit state, decoded errors, server fieldErrors, focus-first-error, validateAsync), FormStateProvider disable propagation, useFieldArray, FormErrorSummary, useFormDraft with autosave (Standard Schema). The FormSection/FormRow/FormGroup/FormActions layout moved to ./controls in 1.36.0 and the useForm/schemaResolver re-exports are deprecated (import from @mantine/form); all six stay here until 1.37.0";
|
|
271
271
|
readonly optionalPeers: readonly ["@mantine/form"];
|
|
272
272
|
readonly forbiddenImports: readonly [];
|
|
273
273
|
};
|
|
@@ -360,13 +360,13 @@ export declare const SURFACES: {
|
|
|
360
360
|
readonly guardKinds: readonly ["raw-selection-control"];
|
|
361
361
|
readonly pluginRules: readonly ["hand-rolled-filter", "control-outside-home", "bound-control-outside-home", "control-size-literal", "responsive-twin"];
|
|
362
362
|
readonly advisoryLaws: readonly ["C1 as a cross-file law (a control placed in one file, its home declared in another)", "hand-rolled section headings (argo writes `<Text fw={600} size=\"sm\">` + children, which no AST heuristic matches without false positives)", "C11 — a table/list stating its count when it is not a BasaltDataTable", "C12 — one shape for refresh/sync (SyncButton); only the alias table sees a renamed copy"];
|
|
363
|
-
readonly description: "The control tier (docs/CONTROLS-SPEC.md §3): FilterSet (nowrap row + measured +N fold + the mobile Filters (n) sheet), RangeFilter/CompareFilter/SelectFilter/MultiSelectFilter/NumberFilter/SearchFilter/ToggleFilter (each bound to a FieldHandle — no value/onChange/size, law C2/C5; NumberFilter is the field.number lane, a radio list over `options` or a stepper without), ViewTabs,
|
|
363
|
+
readonly description: "The control tier (docs/CONTROLS-SPEC.md §3): FilterSet (nowrap row + measured +N fold + the mobile Filters (n) sheet), RangeFilter/CompareFilter/SelectFilter/MultiSelectFilter/NumberFilter/SearchFilter/ToggleFilter (each bound to a FieldHandle — no value/onChange/size, law C2/C5; NumberFilter is the field.number lane, a radio list over `options` or a stepper without), ViewTabs, the action/sync family (ActionGroup, OverflowMenu, SyncButton, BarAction/GlobalAction), and the form layout FormSection/FormRow/FormGroup/FormActions (moved here from ./forms in 1.36.0 — FormRow is law C1’s form row and needs no @mantine/form). THREE surfaces, picked by the home and never by a prop (useFilterSurface): pill in a PageBar row, sheet in the mobile Filters (n) drawer, panel in a PageAside body — where every control renders an inspector/facet ROW instead of a chip (docs/ASIDE-SPEC.md §3). PanelRow is that row primitive (label above, hint, mono readout, an `end` control on the label line) and SliderControl is the one bound control with no pill form at all; the counts/max props on MultiSelectFilter render the Foundry facet list there. Every control owns its own desktop/mobile swap in CSS (C9) and renders size=\"ctl\" internally. Resolves and renders with NO @mantine/dates installed — the custom date picker is injected through RangeFilter.customPicker from ./controls-dates.";
|
|
364
364
|
readonly optionalPeers: readonly [];
|
|
365
365
|
readonly globs: {
|
|
366
366
|
readonly shipped: readonly [];
|
|
367
367
|
readonly repo: readonly ["packages/basalt-ui/src/controls/**"];
|
|
368
368
|
};
|
|
369
|
-
readonly forbiddenImports: readonly [ForbiddenImport, ForbiddenImport];
|
|
369
|
+
readonly forbiddenImports: readonly [ForbiddenImport, ForbiddenImport, ForbiddenImport, ForbiddenImport];
|
|
370
370
|
};
|
|
371
371
|
readonly './controls-dates': {
|
|
372
372
|
readonly kind: "doctrine";
|
package/dist/surfaces.d.ts.map
CHANGED
|
@@ -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,+oBA+BtB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 don't hand-build createTheme or re-add the resolver basalt already installs"
|
|
106
106
|
],
|
|
107
|
-
description: "BasaltProvider, createBasaltTheme, BasaltShell + sidebar/mobile-nav/breadcrumbs, PageBar, PageAside, useSizeClass, NavCountBadge, ThemeToggle, ThreadWorkspace + thread-chat components, WidgetHeader, dashboard composites (DeltaBadge, StatCard with threshold tone, EmptyState, QueryState/LoadingState/ErrorState, SettingsSection/SettingsRow/DangerZone), ConnectivityProvider/useConnectivity/ConnectivityIndicator (auto-mounted, C1: absorbed from the dropped ./connectivity), createBasaltQueryClient/unwrap/BasaltQueryDevtools (C1: absorbed from the dropped ./query), BasaltDevDock (C5: lazy Router/Query devtools + theme lab in one dock)",
|
|
107
|
+
description: "BasaltProvider, createBasaltTheme, BasaltShell + sidebar/mobile-nav/breadcrumbs, PageBar, PageAside, useSizeClass, useCoarsePointer, NavCountBadge, ThemeToggle, ThreadWorkspace + thread-chat components, WidgetHeader, dashboard composites (DeltaBadge, StatCard with threshold tone, EmptyState, QueryState/LoadingState/ErrorState, SettingsSection/SettingsRow/DangerZone), ConnectivityProvider/useConnectivity/ConnectivityIndicator (auto-mounted, C1: absorbed from the dropped ./connectivity), createBasaltQueryClient/unwrap/BasaltQueryDevtools (C1: absorbed from the dropped ./query), BasaltDevDock (C5: lazy Router/Query devtools + theme lab in one dock)",
|
|
108
108
|
optionalPeers: [
|
|
109
109
|
"react-markdown",
|
|
110
110
|
"remark-gfm",
|
|
@@ -243,7 +243,7 @@ const SURFACES = {
|
|
|
243
243
|
// only stops resetting. `warn` through the 1.30.0 grace because it fires on what every
|
|
244
244
|
// consumer ships today (`PLUGIN_RULE_GRACE`).
|
|
245
245
|
pluginRules: ["forms-field-key"],
|
|
246
|
-
description: "Mantine form layer: useBasaltForm + inputProps/fieldKey (two calls \u2014 a spread `key` is a React 19 warning; the deprecated `field` alias for `inputProps` was removed in 1.29.0, C1 consolidation),
|
|
246
|
+
description: "Mantine form layer: useBasaltForm + inputProps/fieldKey (two calls \u2014 a spread `key` is a React 19 warning; the deprecated `field` alias for `inputProps` was removed in 1.29.0, C1 consolidation), useFormSubmit (submit state, decoded errors, server fieldErrors, focus-first-error, validateAsync), FormStateProvider disable propagation, useFieldArray, FormErrorSummary, useFormDraft with autosave (Standard Schema). The FormSection/FormRow/FormGroup/FormActions layout moved to ./controls in 1.36.0 and the useForm/schemaResolver re-exports are deprecated (import from @mantine/form); all six stay here until 1.37.0",
|
|
247
247
|
optionalPeers: ["@mantine/form"],
|
|
248
248
|
forbiddenImports: []
|
|
249
249
|
},
|
|
@@ -357,8 +357,8 @@ const SURFACES = {
|
|
|
357
357
|
layer: "mantine-coupled",
|
|
358
358
|
rule: "controls",
|
|
359
359
|
skill: ["basalt-design"],
|
|
360
|
-
// The text lane of law C1 — the plugin's `control-outside-home` seen through a
|
|
361
|
-
//
|
|
360
|
+
// The text lane of law C1 — the plugin's `control-outside-home` seen through a host-tag nesting
|
|
361
|
+
// count, since a regex scan has no AST. Same law, same wave, same promotion.
|
|
362
362
|
guardKinds: ["raw-selection-control"],
|
|
363
363
|
// The control tier itself (laws C1/C3/C5/C9). `hand-rolled-filter`, `control-size-literal` and
|
|
364
364
|
// `responsive-twin` all ship `error`; the two C1 placement rules are the grace entries in
|
|
@@ -381,7 +381,7 @@ const SURFACES = {
|
|
|
381
381
|
"C11 \u2014 a table/list stating its count when it is not a BasaltDataTable",
|
|
382
382
|
"C12 \u2014 one shape for refresh/sync (SyncButton); only the alias table sees a renamed copy"
|
|
383
383
|
],
|
|
384
|
-
description: 'The control tier (docs/CONTROLS-SPEC.md \xA73): FilterSet (nowrap row + measured +N fold + the mobile Filters (n) sheet), RangeFilter/CompareFilter/SelectFilter/MultiSelectFilter/NumberFilter/SearchFilter/ToggleFilter (each bound to a FieldHandle \u2014 no value/onChange/size, law C2/C5; NumberFilter is the field.number lane, a radio list over `options` or a stepper without), ViewTabs,
|
|
384
|
+
description: 'The control tier (docs/CONTROLS-SPEC.md \xA73): FilterSet (nowrap row + measured +N fold + the mobile Filters (n) sheet), RangeFilter/CompareFilter/SelectFilter/MultiSelectFilter/NumberFilter/SearchFilter/ToggleFilter (each bound to a FieldHandle \u2014 no value/onChange/size, law C2/C5; NumberFilter is the field.number lane, a radio list over `options` or a stepper without), ViewTabs, the action/sync family (ActionGroup, OverflowMenu, SyncButton, BarAction/GlobalAction), and the form layout FormSection/FormRow/FormGroup/FormActions (moved here from ./forms in 1.36.0 \u2014 FormRow is law C1\u2019s form row and needs no @mantine/form). THREE surfaces, picked by the home and never by a prop (useFilterSurface): pill in a PageBar row, sheet in the mobile Filters (n) drawer, panel in a PageAside body \u2014 where every control renders an inspector/facet ROW instead of a chip (docs/ASIDE-SPEC.md \xA73). PanelRow is that row primitive (label above, hint, mono readout, an `end` control on the label line) and SliderControl is the one bound control with no pill form at all; the counts/max props on MultiSelectFilter render the Foundry facet list there. Every control owns its own desktop/mobile swap in CSS (C9) and renders size="ctl" internally. Resolves and renders with NO @mantine/dates installed \u2014 the custom date picker is injected through RangeFilter.customPicker from ./controls-dates.',
|
|
385
385
|
optionalPeers: [],
|
|
386
386
|
// `@mantine/dates` is an optional peer basaltViteConfig pre-bundles the whole @mantine scope
|
|
387
387
|
// for — a consumer without the peer (linewatch) must never resolve it through this surface.
|
|
@@ -399,6 +399,14 @@ const SURFACES = {
|
|
|
399
399
|
vg(
|
|
400
400
|
"@mantine/dates/*",
|
|
401
401
|
"@mantine/dates is an OPTIONAL peer (docs/CONTROLS-SPEC.md \xA73) \u2014 ./controls must resolve with no @mantine/dates installed. The one reach lives in src/controls-dates/, injected into range-filter.tsx\u2019s customPicker seam."
|
|
402
|
+
),
|
|
403
|
+
v(
|
|
404
|
+
"@mantine/form",
|
|
405
|
+
"@mantine/form is an OPTIONAL peer \u2014 ./controls (which owns the form layout since 1.36.0) must resolve with no @mantine/form installed. Only ./forms needs it."
|
|
406
|
+
),
|
|
407
|
+
vg(
|
|
408
|
+
"@mantine/form/*",
|
|
409
|
+
"@mantine/form is an OPTIONAL peer \u2014 ./controls (which owns the form layout since 1.36.0) must resolve with no @mantine/form installed. Only ./forms needs it."
|
|
402
410
|
)
|
|
403
411
|
]
|
|
404
412
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tokens/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAYH,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAUvE,OAAO,EAAE,EAAE,EAAE,CAAC,EAAE,MAAM,WAAW,CAAA;AAOjC,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AACnF,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAM5D,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACxC,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAO7C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AACzC,YAAY,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAI5C,OAAO,EACL,iBAAiB,EACjB,0BAA0B,EAC1B,cAAc,EACd,qBAAqB,EACrB,YAAY,GACb,MAAM,gBAAgB,CAAA;AACvB,YAAY,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAEpD,wFAAwF;AACxF,MAAM,MAAM,SAAS,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAEvD,8FAA8F;AAC9F,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;AAEjD;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,GAAI,OAAO,MAAM,EAAE,GAAG,MAAM,KAAG,MACoB,CAAA;AA6DrE,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;OAOG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,CAAA;AA8DD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,eAAe,CAC7B,IAAI,GAAE,gBAAqB,EAC3B,IAAI,GAAE,WAAgC,GACrC,MAAM,CA6DR;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AASD;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,iBAAiB,GAAG,SAAS,GAAG,MAAM,CAkB1E;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,YAAY,GAAG,SAAS,GAAG,MAAM,CASvE;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,GAAG,MAAM,CAMtE"}
|
package/dist/tokens/index.js
CHANGED
|
@@ -551,19 +551,17 @@ function frameworkDerived(data, only, legacyAliases) {
|
|
|
551
551
|
return legacyAliases ? `${canonical}
|
|
552
552
|
${frameworkDerivedAliases(data)}` : canonical;
|
|
553
553
|
}
|
|
554
|
-
|
|
555
|
-
function warnConsumerVxName(name) {
|
|
554
|
+
function assertConsumerVxName(name) {
|
|
556
555
|
const family = vxFamilyOf(name);
|
|
557
|
-
if (!BASALT_VX_FAMILIES.includes(family)
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
`[basalt] ${name} is inside basalt's own --vx-${family} family \u2014 name your series group something basalt does not own (groupTokens('app', \u2026)). Throws from 1.35.0.`
|
|
556
|
+
if (!BASALT_VX_FAMILIES.includes(family)) return;
|
|
557
|
+
throw new Error(
|
|
558
|
+
`[basalt] ${name} is inside basalt's own --vx-${family} family \u2014 name your series group something basalt does not own (groupTokens('app', \u2026)).`
|
|
561
559
|
);
|
|
562
560
|
}
|
|
563
561
|
function seriesTokens(map, prefix = "") {
|
|
564
562
|
const out = {};
|
|
565
563
|
for (const key of Object.keys(map)) {
|
|
566
|
-
if (process.env.NODE_ENV !== "production")
|
|
564
|
+
if (process.env.NODE_ENV !== "production") assertConsumerVxName(`--vx-${prefix}${String(key)}`);
|
|
567
565
|
out[key] = `var(--vx-${prefix}${String(key)})`;
|
|
568
566
|
}
|
|
569
567
|
return out;
|
package/llms.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# basalt-ui v1.
|
|
1
|
+
# basalt-ui v1.36.0
|
|
2
2
|
# Opinionated framework for Mantine-based React apps — theme, app shell, visx charts, toolchain presets
|
|
3
3
|
#
|
|
4
4
|
# basalt-ui is an opinionated framework for Mantine-based React apps.
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
# ./tokens.css subpath. Guide: docs/FRAMEWORK-FREE.md in the repo.
|
|
20
20
|
|
|
21
21
|
Package: basalt-ui
|
|
22
|
-
Version: 1.
|
|
22
|
+
Version: 1.36.0
|
|
23
23
|
|
|
24
24
|
## basalt-ui
|
|
25
25
|
Import: import { ... } from 'basalt-ui'
|
|
26
|
-
Description: BasaltProvider, createBasaltTheme, BasaltShell + sidebar/mobile-nav/breadcrumbs, PageBar, PageAside, useSizeClass, NavCountBadge, ThemeToggle, ThreadWorkspace + thread-chat components, WidgetHeader, dashboard composites (DeltaBadge, StatCard with threshold tone, EmptyState, QueryState/LoadingState/ErrorState, SettingsSection/SettingsRow/DangerZone), ConnectivityProvider/useConnectivity/ConnectivityIndicator (auto-mounted, C1: absorbed from the dropped ./connectivity), createBasaltQueryClient/unwrap/BasaltQueryDevtools (C1: absorbed from the dropped ./query), BasaltDevDock (C5: lazy Router/Query devtools + theme lab in one dock)
|
|
26
|
+
Description: BasaltProvider, createBasaltTheme, BasaltShell + sidebar/mobile-nav/breadcrumbs, PageBar, PageAside, useSizeClass, useCoarsePointer, NavCountBadge, ThemeToggle, ThreadWorkspace + thread-chat components, WidgetHeader, dashboard composites (DeltaBadge, StatCard with threshold tone, EmptyState, QueryState/LoadingState/ErrorState, SettingsSection/SettingsRow/DangerZone), ConnectivityProvider/useConnectivity/ConnectivityIndicator (auto-mounted, C1: absorbed from the dropped ./connectivity), createBasaltQueryClient/unwrap/BasaltQueryDevtools (C1: absorbed from the dropped ./query), BasaltDevDock (C5: lazy Router/Query devtools + theme lab in one dock)
|
|
27
27
|
Layer: mantine-coupled
|
|
28
28
|
Rule: basalt-mantine
|
|
29
29
|
OptionalPeers: react-markdown@^10.1.0, remark-gfm@^4.0.1, rehype-sanitize@^6.0.0, remend@1.3.0, shiki@^4.3.0, beautiful-mermaid@^1.1.0, @tanstack/react-router-devtools@^1.166.13
|
|
@@ -70,7 +70,7 @@ OptionalPeers: @tanstack/react-router@^1.170.0
|
|
|
70
70
|
|
|
71
71
|
## basalt-ui/forms
|
|
72
72
|
Import: import { ... } from 'basalt-ui/forms'
|
|
73
|
-
Description: Mantine form layer: useBasaltForm + inputProps/fieldKey (two calls — a spread `key` is a React 19 warning; the deprecated `field` alias for `inputProps` was removed in 1.29.0, C1 consolidation),
|
|
73
|
+
Description: Mantine form layer: useBasaltForm + inputProps/fieldKey (two calls — a spread `key` is a React 19 warning; the deprecated `field` alias for `inputProps` was removed in 1.29.0, C1 consolidation), useFormSubmit (submit state, decoded errors, server fieldErrors, focus-first-error, validateAsync), FormStateProvider disable propagation, useFieldArray, FormErrorSummary, useFormDraft with autosave (Standard Schema). The FormSection/FormRow/FormGroup/FormActions layout moved to ./controls in 1.36.0 and the useForm/schemaResolver re-exports are deprecated (import from @mantine/form); all six stay here until 1.37.0
|
|
74
74
|
Layer: mantine-coupled
|
|
75
75
|
Rule: basalt-batteries
|
|
76
76
|
OptionalPeers: @mantine/form@^9.3.0
|
|
@@ -126,7 +126,7 @@ OptionalPeers: shiki@^4.3.0, @shikijs/langs@^4.3.1, @shikijs/themes@^4.3.1, beau
|
|
|
126
126
|
|
|
127
127
|
## basalt-ui/controls
|
|
128
128
|
Import: import { ... } from 'basalt-ui/controls'
|
|
129
|
-
Description: The control tier (docs/CONTROLS-SPEC.md §3): FilterSet (nowrap row + measured +N fold + the mobile Filters (n) sheet), RangeFilter/CompareFilter/SelectFilter/MultiSelectFilter/NumberFilter/SearchFilter/ToggleFilter (each bound to a FieldHandle — no value/onChange/size, law C2/C5; NumberFilter is the field.number lane, a radio list over `options` or a stepper without), ViewTabs,
|
|
129
|
+
Description: The control tier (docs/CONTROLS-SPEC.md §3): FilterSet (nowrap row + measured +N fold + the mobile Filters (n) sheet), RangeFilter/CompareFilter/SelectFilter/MultiSelectFilter/NumberFilter/SearchFilter/ToggleFilter (each bound to a FieldHandle — no value/onChange/size, law C2/C5; NumberFilter is the field.number lane, a radio list over `options` or a stepper without), ViewTabs, the action/sync family (ActionGroup, OverflowMenu, SyncButton, BarAction/GlobalAction), and the form layout FormSection/FormRow/FormGroup/FormActions (moved here from ./forms in 1.36.0 — FormRow is law C1’s form row and needs no @mantine/form). THREE surfaces, picked by the home and never by a prop (useFilterSurface): pill in a PageBar row, sheet in the mobile Filters (n) drawer, panel in a PageAside body — where every control renders an inspector/facet ROW instead of a chip (docs/ASIDE-SPEC.md §3). PanelRow is that row primitive (label above, hint, mono readout, an `end` control on the label line) and SliderControl is the one bound control with no pill form at all; the counts/max props on MultiSelectFilter render the Foundry facet list there. Every control owns its own desktop/mobile swap in CSS (C9) and renders size="ctl" internally. Resolves and renders with NO @mantine/dates installed — the custom date picker is injected through RangeFilter.customPicker from ./controls-dates.
|
|
130
130
|
Layer: mantine-coupled
|
|
131
131
|
Rule: basalt-controls
|
|
132
132
|
|
package/package.json
CHANGED
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
legendSlotContention,
|
|
9
9
|
plotBelowFloor,
|
|
10
10
|
} from '../../common/errors'
|
|
11
|
+
import { useCoarsePointer } from '../../common/use-media-query'
|
|
11
12
|
import { reportOnce, useValidateProps } from '../../common/validate'
|
|
12
13
|
import { SizeClassHintContext, useSizeClass } from '../../shell/use-size-class'
|
|
13
14
|
import { VX } from '../../tokens'
|
|
@@ -18,7 +19,7 @@ import { ChartCardContext } from './chart-card-context'
|
|
|
18
19
|
import { resolveChartLayout, resolveFrameClass } from './chart-layout'
|
|
19
20
|
import { resolveFrameHeight, resolveLegendRollup, resolvePlotRect } from './chart-frame-layout'
|
|
20
21
|
import type { ResponsiveChartHeight } from './chart-frame-layout'
|
|
21
|
-
import { ChartTierProvider,
|
|
22
|
+
import { ChartTierProvider, useViewportHeight } from './chart-tier'
|
|
22
23
|
import { ChartLegend } from './ChartLegend'
|
|
23
24
|
import { ChartEmpty, ChartError, ChartPending, resolveChartState } from './ChartPending'
|
|
24
25
|
import type { ChartState } from './ChartPending'
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { CSSProperties, MouseEvent, ReactNode } from 'react'
|
|
2
2
|
import type { BasaltProps } from '../../common/props'
|
|
3
|
+
import { useCoarsePointer } from '../../common/use-media-query'
|
|
3
4
|
import { alpha, VX } from '../../tokens'
|
|
4
5
|
import type { SeriesRole, LegendPlacement } from '../series'
|
|
5
6
|
import { DOTS_HIT_GAP, LEGEND_DOT_SIZE, LEGEND_ROW_GAP, orderEntries } from './chart-frame-layout'
|
|
6
|
-
import { useChartMetrics
|
|
7
|
+
import { useChartMetrics } from './chart-tier'
|
|
7
8
|
import { LegendDisclosure, useLegendDisclosure } from './legend-disclosure'
|
|
8
9
|
|
|
9
10
|
export type LegendEntry = {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { createContext, useContext, useSyncExternalStore } from 'react'
|
|
2
2
|
import type { ReactNode } from 'react'
|
|
3
|
-
import { useMediaQuery } from '../../common/use-media-query'
|
|
4
3
|
import type { ContainerClass } from '../../tokens/size-classes'
|
|
5
4
|
import { chartMetrics } from './chart-frame-layout'
|
|
6
5
|
import type { ChartTierMetrics } from './chart-frame-layout'
|
|
@@ -42,11 +41,6 @@ export function useChartMetrics(): ChartTierMetrics {
|
|
|
42
41
|
|
|
43
42
|
const subscribeNothing = (): (() => void) => () => {}
|
|
44
43
|
|
|
45
|
-
/** Whether the primary pointer is coarse. Server snapshot `false`: hydration agrees, then updates. */
|
|
46
|
-
export function useCoarsePointer(): boolean {
|
|
47
|
-
return useMediaQuery('(pointer: coarse)', false)
|
|
48
|
-
}
|
|
49
|
-
|
|
50
44
|
/** Viewport height is quantized so a mobile URL bar collapsing does not re-lay-out every chart. */
|
|
51
45
|
const VIEWPORT_H_STEP = 50
|
|
52
46
|
|