basalt-ui 1.31.0 → 1.32.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.
- package/CHANGELOG.md +34 -0
- package/MIGRATING.md +212 -20
- package/agent/rules/basalt-mantine.md +4 -4
- package/configs/oxlint-plugin.js +240 -59
- package/configs/oxlint-plugin.test.ts +329 -1
- package/dist/charts/kinds/BandStrip.d.ts.map +1 -1
- package/dist/charts/kinds/BandStrip.js +18 -66
- package/dist/charts/kinds/DualPanel.d.ts.map +1 -1
- package/dist/charts/kinds/DualPanel.js +5 -26
- package/dist/charts/kinds/MirroredBars.d.ts.map +1 -1
- package/dist/charts/kinds/MirroredBars.js +10 -68
- package/dist/charts/kinds/band-chrome.d.ts +31 -0
- package/dist/charts/kinds/band-chrome.d.ts.map +1 -0
- package/dist/charts/kinds/band-chrome.js +71 -0
- package/dist/charts/primitives/CartesianChart.d.ts.map +1 -1
- package/dist/charts/primitives/CartesianChart.js +49 -76
- package/dist/charts/primitives/ChartCard.d.ts.map +1 -1
- package/dist/charts/primitives/ChartCard.js +5 -23
- package/dist/charts/primitives/ChartFrame.d.ts.map +1 -1
- package/dist/charts/primitives/ChartFrame.js +23 -40
- package/dist/charts/primitives/ChartLegend.d.ts.map +1 -1
- package/dist/charts/primitives/ChartLegend.js +5 -133
- package/dist/charts/primitives/ChartTooltip.d.ts +5 -0
- package/dist/charts/primitives/ChartTooltip.d.ts.map +1 -1
- package/dist/charts/primitives/ChartTooltip.js +16 -1
- package/dist/charts/primitives/HoverOverlay.d.ts +24 -9
- package/dist/charts/primitives/HoverOverlay.d.ts.map +1 -1
- package/dist/charts/primitives/HoverOverlay.js +17 -1
- package/dist/charts/primitives/chart-card-context.d.ts +17 -13
- package/dist/charts/primitives/chart-card-context.d.ts.map +1 -1
- package/dist/charts/primitives/chart-card-context.js +10 -5
- package/dist/charts/primitives/chart-frame-layout.d.ts.map +1 -1
- package/dist/charts/primitives/chart-frame-layout.js +25 -31
- package/dist/charts/primitives/legend-disclosure.d.ts +27 -0
- package/dist/charts/primitives/legend-disclosure.d.ts.map +1 -0
- package/dist/charts/primitives/legend-disclosure.js +153 -0
- package/dist/controls/controls.module.css +5 -0
- package/dist/controls/sync-button.module.css +1 -0
- package/dist/dashboard/stat-group.module.css +19 -64
- package/dist/dashboard/widget-grid.module.css +11 -38
- package/dist/data/data-table-state.d.ts +83 -0
- package/dist/data/data-table-state.d.ts.map +1 -0
- package/dist/data/data-table-state.js +139 -0
- package/dist/data/data-table.d.ts +40 -2
- package/dist/data/data-table.d.ts.map +1 -1
- package/dist/data/data-table.js +179 -277
- package/dist/forms/form-layout.d.ts +6 -1
- package/dist/forms/form-layout.d.ts.map +1 -1
- package/dist/forms/form-layout.module.css +6 -13
- package/dist/guard/index.d.ts +2 -2
- package/dist/guard/index.d.ts.map +1 -1
- package/dist/guard/index.js +10 -14
- package/dist/notifications/center.d.ts.map +1 -1
- package/dist/provider/index.d.ts.map +1 -1
- package/dist/provider/index.js +12 -10
- package/dist/shell/aside-docking.d.ts +31 -0
- package/dist/shell/aside-docking.d.ts.map +1 -0
- package/dist/shell/aside-docking.js +19 -0
- package/dist/shell/index.d.ts +0 -11
- package/dist/shell/index.d.ts.map +1 -1
- package/dist/shell/index.js +13 -14
- package/dist/shell/page-bar.d.ts +24 -0
- package/dist/shell/page-bar.d.ts.map +1 -1
- package/dist/shell/use-breakpoint.d.ts +1 -1
- package/dist/theme/floating.module.css +1 -0
- package/dist/theme-lab/derive-controls.d.ts.map +1 -1
- package/dist/tokens/index.d.ts +2 -0
- package/dist/tokens/index.d.ts.map +1 -1
- package/dist/tokens/index.js +4 -0
- package/llms.txt +2 -2
- package/package.json +2 -1
- package/src/charts/kinds/BandStrip.tsx +18 -64
- package/src/charts/kinds/DualPanel.tsx +4 -24
- package/src/charts/kinds/MirroredBars.tsx +12 -66
- package/src/charts/kinds/band-chrome.tsx +91 -0
- package/src/charts/primitives/CartesianChart.tsx +79 -122
- package/src/charts/primitives/ChartCard.tsx +5 -27
- package/src/charts/primitives/ChartFrame.tsx +37 -76
- package/src/charts/primitives/ChartLegend.tsx +7 -154
- package/src/charts/primitives/ChartTooltip.tsx +16 -0
- package/src/charts/primitives/HoverOverlay.tsx +52 -21
- package/src/charts/primitives/chart-card-context.ts +25 -16
- package/src/charts/primitives/chart-frame-layout.ts +44 -56
- package/src/charts/primitives/legend-disclosure.tsx +177 -0
- package/src/controls/controls.module.css +5 -0
- package/src/controls/sync-button.module.css +1 -0
- package/src/dashboard/stat-group.module.css +19 -64
- package/src/dashboard/widget-grid.module.css +11 -38
- package/src/data/data-table-state.ts +218 -0
- package/src/data/data-table.tsx +134 -218
- package/src/forms/form-layout.module.css +6 -13
- package/src/forms/form-layout.tsx +6 -1
- package/src/guard/index.ts +38 -34
- package/src/notifications/center.tsx +3 -0
- package/src/provider/index.tsx +18 -17
- package/src/shell/aside-docking.ts +54 -0
- package/src/shell/index.tsx +15 -37
- package/src/shell/page-bar.tsx +24 -0
- package/src/shell/use-breakpoint.ts +2 -2
- package/src/theme/floating.module.css +1 -0
- package/src/theme-lab/derive-controls.tsx +2 -0
- package/src/tokens/index.ts +5 -0
|
@@ -14,9 +14,10 @@
|
|
|
14
14
|
* containment and `.grid` is the queried child, the same split `StatGroup`'s `.container`/`.root`
|
|
15
15
|
* uses — a container cannot reliably query ITSELF for a layout-affecting property (measured here:
|
|
16
16
|
* Chrome silently keeps the un-queried value even once the container's own width crosses the
|
|
17
|
-
* condition), only a descendant. The `599.9px
|
|
17
|
+
* condition), only a descendant. The `599.9px` literal: 600px is roughly the point
|
|
18
18
|
* two ~250px+ cells stop feeling cramped; `@container`/`@media` conditions cannot read a custom
|
|
19
|
-
* property, so
|
|
19
|
+
* property, so it is a written number, not a `--vx-*` ref. No viewport fallback — see
|
|
20
|
+
* `stat-group.module.css`: nothing that renders basalt lacks `@container`.
|
|
20
21
|
*/
|
|
21
22
|
|
|
22
23
|
/* ── FormSection ─────────────────────────────────────────────────────────────────────────────── */
|
|
@@ -102,17 +103,6 @@
|
|
|
102
103
|
}
|
|
103
104
|
}
|
|
104
105
|
|
|
105
|
-
/* Pre-container-query fallback (Safari < 16, Chrome < 106, Firefox < 110) — the old viewport law,
|
|
106
|
-
* reachable only where `@container` itself cannot parse (same reasoning as `stat-group.module.css`). */
|
|
107
|
-
@supports not (container-type: inline-size) {
|
|
108
|
-
@media (max-width: 47.99375em) {
|
|
109
|
-
.grid {
|
|
110
|
-
grid-template-columns: minmax(0, 1fr);
|
|
111
|
-
gap: var(--vx-space-stack-xs);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
106
|
/* ── FormGroup ───────────────────────────────────────────────────────────────────────────────── */
|
|
117
107
|
|
|
118
108
|
/* Same UA reset as `.control`, same reason. */
|
|
@@ -148,9 +138,12 @@
|
|
|
148
138
|
gap: var(--vx-space-stack-xs);
|
|
149
139
|
}
|
|
150
140
|
|
|
141
|
+
/* Bottom-aligned, not stretched: a trailing button beside a labelled FormRow keeps its own height
|
|
142
|
+
and lines up with the input, not with the label above it. */
|
|
151
143
|
.groupControls[data-direction='row'] {
|
|
152
144
|
flex-direction: row;
|
|
153
145
|
flex-wrap: wrap;
|
|
146
|
+
align-items: flex-end;
|
|
154
147
|
gap: var(--vx-space-control-gap);
|
|
155
148
|
}
|
|
156
149
|
|
package/dist/guard/index.d.ts
CHANGED
|
@@ -302,7 +302,7 @@ export declare const GUARD_RULES: {
|
|
|
302
302
|
readonly kind: "raw-selection-control";
|
|
303
303
|
readonly pattern: RegExp;
|
|
304
304
|
readonly appliesTo: (relPath: string) => boolean;
|
|
305
|
-
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, 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.";
|
|
305
|
+
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.";
|
|
306
306
|
};
|
|
307
307
|
readonly 'inline-font-size': {
|
|
308
308
|
readonly kind: "inline-font-size";
|
|
@@ -313,7 +313,7 @@ export declare const GUARD_RULES: {
|
|
|
313
313
|
readonly kind: "raw-media-query";
|
|
314
314
|
readonly pattern: RegExp;
|
|
315
315
|
readonly appliesTo: (relPath: string) => boolean;
|
|
316
|
-
readonly message: `Raw viewport/container breakpoint in CSS \u2014 a width @media belongs to shell/** against SIZE_CLASSES (useSizeClass() is the JS seam); an @container name must be one of ${string} at a boundary in ${string}; and a pointer query other than (pointer: coarse) or (pointer: fine) has no framework meaning. Same law the oxlint plugin enforces as basalt/raw-breakpoint over JSX; this is the CSS half.`;
|
|
316
|
+
readonly message: `Raw viewport/container breakpoint in CSS \u2014 a width @media belongs to shell/** against SIZE_CLASSES (useSizeClass() is the JS seam); an @container name must be one of ${string}, and a basalt-card or unnamed @container query must sit at a boundary in ${string} (the other declared names have no numeric table yet, so their literals are not judged); and a pointer query other than (pointer: coarse) or (pointer: fine) has no framework meaning. Same law the oxlint plugin enforces as basalt/raw-breakpoint over JSX; this is the CSS half.`;
|
|
317
317
|
};
|
|
318
318
|
};
|
|
319
319
|
/**
|
|
@@ -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;AAE7E,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,CAAA;
|
|
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;AAE7E,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,CAAA;AAixB9D,8EAA8E;AAC9E,eAAO,MAAM,oBAAoB,EAAE,WAmBlC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,eAAO,MAAM,kBAAkB,EAAE,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,UAAU,CAAC,CAkCrE,CAAA;AA0GD,sGAAsG;AACtG,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,UAAU,CAAA;CAC7C,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,WAAW,EAChB,eAAe,EAAE,SAAS,MAAM,EAAE,GACjC,sBAAsB,EAAE,CAc1B;AAID;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EA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AgF;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,oGAAoG;IACpG,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAA;IACxC,wCAAwC;IACxC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;IAC3B,qGAAqG;IACrG,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;IACtB,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,CAuBvB;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"}
|
package/dist/guard/index.js
CHANGED
|
@@ -22,18 +22,14 @@ const CSS_WIDTH_MEDIA_QUERY = new RegExp(
|
|
|
22
22
|
const CSS_CONTAINER_QUERY = /@container(?:\s+([\w-]+))?\s*((?:\([^)]*\)\s*(?:and\s*)?)+)/g;
|
|
23
23
|
const CSS_CONTAINER_LITERAL = /(?:min-width|max-width|width)\s*(?:[<>]=?|:)\s*([\d.]+)(px|em)?/g;
|
|
24
24
|
const CSS_NON_COARSE_POINTER_QUERY = /\(\s*(?:any-)?pointer\s*:\s*(?!(?:coarse|fine)\b)[a-z-]+\s*\)/g;
|
|
25
|
-
const DECLARED_CONTAINER_NAMES = /* @__PURE__ */ new Set([
|
|
26
|
-
"basalt-card",
|
|
27
|
-
"basalt-form",
|
|
28
|
-
"basalt-main",
|
|
29
|
-
"basalt-grid"
|
|
30
|
-
]);
|
|
25
|
+
const DECLARED_CONTAINER_NAMES = /* @__PURE__ */ new Set(["basalt-card", "basalt-form", "basalt-grid"]);
|
|
31
26
|
const CONTAINER_CLASS_LITERALS_PX = /* @__PURE__ */ new Set([0, 240, 239.9, 480, 479.9, 800, 799.9]);
|
|
32
27
|
const SIZE_CLASS_LITERALS = /* @__PURE__ */ new Set(["52.5em", "75em", "52.49375em", "74.99375em"]);
|
|
33
28
|
const SHELL_CSS_PATH = /(?:^|\/)shell\//;
|
|
34
29
|
function isSanctionedShellMediaQuery(relPath, query) {
|
|
35
30
|
if (!SHELL_CSS_PATH.test(relPath)) return false;
|
|
36
|
-
const
|
|
31
|
+
const widthClauses = query.match(/\([^()]*\bwidth\b[^()]*\)/g) ?? [];
|
|
32
|
+
const widths = widthClauses.flatMap((c) => c.match(new RegExp(CSS_WIDTH_NUM, "g")) ?? []);
|
|
37
33
|
return widths.length > 0 && widths.every((w) => SIZE_CLASS_LITERALS.has(w));
|
|
38
34
|
}
|
|
39
35
|
const MICRO_RADIUS_CEILING_PX = 3;
|
|
@@ -192,7 +188,7 @@ function titleBodyNamesThePage(body) {
|
|
|
192
188
|
}
|
|
193
189
|
const RAW_SELECTION_CONTROL_TAG = /<(SegmentedControl|Select|MultiSelect|NativeSelect|DatePickerInput|DateInput|TagsInput|Chip\.Group)(?![\w])(?:=>|[^>])*?>/g;
|
|
194
190
|
const PROSE_CONTEXT_TAG = /<(?:Prose|ArticleLayout|Modal|Drawer)(?![\w])/;
|
|
195
|
-
const CONTROL_HOST_TAG = /<(?:SettingsRow|Modal|Drawer|Popover\.Dropdown|Menu\.Dropdown|Composer|FilterSet|PageAside|PanelRow)(?![\w])/;
|
|
191
|
+
const CONTROL_HOST_TAG = /<(?:SettingsRow|FormRow|FormGroup|Modal|Drawer|Popover\.Dropdown|Menu\.Dropdown|Composer|FilterSet|PageAside|PanelRow)(?![\w])/;
|
|
196
192
|
const CONTROL_HOST_WINDOW_LINES = 12;
|
|
197
193
|
const OVERLAY_CONVENTION_KEBAB = /^[^/]*-(?:modal|drawer|popover|panel|form)\.[jt]sx$/;
|
|
198
194
|
const OVERLAY_CONVENTION_PASCAL = /^[A-Z]\w*(?:Modal|Drawer|Popover|Panel|Form)\.[jt]sx$/;
|
|
@@ -230,13 +226,13 @@ const DEFAULT_GUARD_CONFIG = {
|
|
|
230
226
|
const GRACE_PERIOD_KINDS = {
|
|
231
227
|
"raw-selection-control": {
|
|
232
228
|
since: "1.26.0",
|
|
233
|
-
promote: "1.
|
|
234
|
-
why: 'Extended 1.31.0 -> 1.32.0 at the 1.31.0 release: the basalt tree still carries incumbents (data-table, notifications center, theme-lab) and the argo sweep has not run. new in the wave-6 control guards (docs/CONTROLS-SPEC.md \xA76, law C1). The text lane cannot see ancestry, so "no home" is approximated by a 12-line host-tag window \u2014 the loosest reading in the guard, and the reason this one lands warn rather than error even though its law is settled. ONE LAW, TWO LANES, ONE PROMOTION: it moves with its AST twin, `basalt/control-outside-home`, whose PLUGIN_RULE_GRACE entry carries the full argument and the measurement, and it must never be promoted or extended alone \u2014 a consumer waiving one spelling and failing the other is the exact confusion `WAIVER_ID_ALIASES` exists to close. RE-MEASURED 2026-09-09 across the whole fleet on 1.29.2: 29 AST-lane incumbents in five repos, plus three of basalt
|
|
229
|
+
promote: "1.33.0",
|
|
230
|
+
why: "Extended 1.32.0 -> 1.33.0 at the 1.32.0 release, the last extension: basalt's own tree is at 0 (consumer-loop r1 dogfood) and argo is at 2, but RE-MEASURED 2026-09-30 the fleet carries ~33 (image-gen 11, rb 7, image-share 6, weatherorb 5, email-gateway 4, argo 2). The 1.32.0 fleet upgrade clears them while they warn, together with raw-breakpoint, so 1.33.0 promotes all four ids against a measured-clean fleet. Extended 1.31.0 -> 1.32.0 at the 1.31.0 release: the basalt tree still carries incumbents (data-table, notifications center, theme-lab) and the argo sweep has not run. new in the wave-6 control guards (docs/CONTROLS-SPEC.md \xA76, law C1). The text lane cannot see ancestry, so \"no home\" is approximated by a 12-line host-tag window \u2014 the loosest reading in the guard, and the reason this one lands warn rather than error even though its law is settled. ONE LAW, TWO LANES, ONE PROMOTION: it moves with its AST twin, `basalt/control-outside-home`, whose PLUGIN_RULE_GRACE entry carries the full argument and the measurement, and it must never be promoted or extended alone \u2014 a consumer waiving one spelling and failing the other is the exact confusion `WAIVER_ID_ALIASES` exists to close. RE-MEASURED 2026-09-09 across the whole fleet on 1.29.2: 29 AST-lane incumbents in five repos, plus three of basalt's own (data-table, notifications/center, theme-lab). Extended to 1.31.0 because 1.30.0 is the FIRST release in which either lane names a home a provider-only consumer can reach \u2014 every home both messages listed was a shell slot, and the shell-less `PageBar` sentence ships in this minor. Promoting in the same minor that makes a rule satisfiable gives nobody a window to act. 1.31.0 is when the 29 are re-measured against that number."
|
|
235
231
|
},
|
|
236
232
|
"raw-media-query": {
|
|
237
233
|
since: "1.31.0",
|
|
238
|
-
promote: "1.
|
|
239
|
-
why: "
|
|
234
|
+
promote: "1.33.0",
|
|
235
|
+
why: "The CSS-text twin of the oxlint plugin's `basalt/raw-breakpoint` \u2014 ONE LAW, TWO LANES, ONE PROMOTION, so it moves with that rule and never alone (`configs/oxlint-plugin.test.ts` \u203A twin lanes share one promotion pins the pair). New in the wave-11 responsive/touch guards; reaching CSS is a NEW file type for this check, same reasoning as `css-raw-surface`, with incumbents in basalt's own tree at ship time, so it shipped warn. Extended 1.32.0 -> 1.33.0 with its twin: 1.31.0 named no reachable container primitive, and 1.32.0 is the first minor that documents one (`CONTAINER_CLASSES` + the declared `@container` names, MIGRATING \xA7 `basalt/raw-breakpoint`)."
|
|
240
236
|
}
|
|
241
237
|
};
|
|
242
238
|
function severityOf(kind, cfg) {
|
|
@@ -922,7 +918,7 @@ const GUARD_RULES = {
|
|
|
922
918
|
// handled inline (full-text tag-scoped scan + host window)
|
|
923
919
|
// JSX-tag-shaped (`<Select …>`) — never appears in CSS text.
|
|
924
920
|
appliesTo: (relPath) => !relPath.endsWith(".css"),
|
|
925
|
-
message: "Raw selection control with no home \u2014 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\u2013C3). Use the bound control from basalt-ui/controls. A settings row, 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 \u2014 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 \u2014 where the two disagree, the plugin is right."
|
|
921
|
+
message: "Raw selection control with no home \u2014 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\u2013C3). 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 \u2014 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 \u2014 where the two disagree, the plugin is right."
|
|
926
922
|
},
|
|
927
923
|
"inline-font-size": {
|
|
928
924
|
kind: "inline-font-size",
|
|
@@ -936,7 +932,7 @@ const GUARD_RULES = {
|
|
|
936
932
|
// CSS-only: a width @media, an @container name/literal or a non-coarse pointer query has no JSX
|
|
937
933
|
// spelling — the AST-side twin of this law is the oxlint plugin's basalt/raw-breakpoint.
|
|
938
934
|
appliesTo: (relPath) => relPath.endsWith(".css"),
|
|
939
|
-
message: `Raw viewport/container breakpoint in CSS \u2014 a width @media belongs to shell/** against SIZE_CLASSES (useSizeClass() is the JS seam); an @container name must be one of ${[...DECLARED_CONTAINER_NAMES].join(" / ")} at a boundary in ${[...CONTAINER_CLASS_LITERALS_PX].map((px) => `${px}px`).join(" / ")}; and a pointer query other than (pointer: coarse) or (pointer: fine) has no framework meaning. Same law the oxlint plugin enforces as basalt/raw-breakpoint over JSX; this is the CSS half.`
|
|
935
|
+
message: `Raw viewport/container breakpoint in CSS \u2014 a width @media belongs to shell/** against SIZE_CLASSES (useSizeClass() is the JS seam); an @container name must be one of ${[...DECLARED_CONTAINER_NAMES].join(" / ")}, and a basalt-card or unnamed @container query must sit at a boundary in ${[...CONTAINER_CLASS_LITERALS_PX].map((px) => `${px}px`).join(" / ")} (the other declared names have no numeric table yet, so their literals are not judged); and a pointer query other than (pointer: coarse) or (pointer: fine) has no framework meaning. Same law the oxlint plugin enforces as basalt/raw-breakpoint over JSX; this is the CSS half.`
|
|
940
936
|
}
|
|
941
937
|
};
|
|
942
938
|
function guardKindRemedy(kind) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"center.d.ts","sourceRoot":"","sources":["../../src/notifications/center.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAyClD;;4CAE4C;AAC5C,eAAO,MAAM,0BAA0B,MAAM,CAAA;AAwF7C,MAAM,MAAM,uBAAuB,GAAG,WAAW,GAAG;IAClD,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAC5B,CAAA;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,SAAe,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,uBAAuB,+
|
|
1
|
+
{"version":3,"file":"center.d.ts","sourceRoot":"","sources":["../../src/notifications/center.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAyClD;;4CAE4C;AAC5C,eAAO,MAAM,0BAA0B,MAAM,CAAA;AAwF7C,MAAM,MAAM,uBAAuB,GAAG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,KAAK,EACL,aAAoB,EACpB,cAAc,EACd,kBAA2B,EAC3B,OAAO,EACP,KAAK,EACL,YAAY,EACZ,aAAyB,EACzB,GAAG,IAAI,EACR,EAAE,mBAAmB,+BAsCrB"}
|
package/dist/provider/index.js
CHANGED
|
@@ -70,17 +70,22 @@ class BasaltErrorBoundary extends Component {
|
|
|
70
70
|
function composeInjectedCss(base, fontsCss, radiusCss, densityCss) {
|
|
71
71
|
return [base, fontsCss, radiusCss, densityCss].filter(Boolean).join("\n");
|
|
72
72
|
}
|
|
73
|
-
|
|
73
|
+
function createMountCounter() {
|
|
74
|
+
let count = 0;
|
|
75
|
+
return { mount: () => ++count, unmount: () => --count };
|
|
76
|
+
}
|
|
77
|
+
const hostAttributeMounts = createMountCounter();
|
|
74
78
|
function useHostAttribute() {
|
|
75
79
|
const isPwa = useMediaQuery("(display-mode: standalone)", false);
|
|
76
80
|
useIsomorphicLayoutEffect(() => {
|
|
77
81
|
document.documentElement.setAttribute("data-basalt-host", isPwa ? "pwa" : "web");
|
|
78
82
|
}, [isPwa]);
|
|
79
83
|
useIsomorphicLayoutEffect(() => {
|
|
80
|
-
|
|
84
|
+
hostAttributeMounts.mount();
|
|
81
85
|
return () => {
|
|
82
|
-
|
|
83
|
-
|
|
86
|
+
if (hostAttributeMounts.unmount() === 0) {
|
|
87
|
+
document.documentElement.removeAttribute("data-basalt-host");
|
|
88
|
+
}
|
|
84
89
|
};
|
|
85
90
|
}, []);
|
|
86
91
|
}
|
|
@@ -134,18 +139,15 @@ function BasaltBridge({
|
|
|
134
139
|
children
|
|
135
140
|
] });
|
|
136
141
|
}
|
|
137
|
-
|
|
142
|
+
const providerMounts = createMountCounter();
|
|
138
143
|
function useDuplicateProviderGuard() {
|
|
139
144
|
useEffect(() => {
|
|
140
|
-
|
|
141
|
-
if (mountedProviderCount > 1 && isDev()) {
|
|
145
|
+
if (providerMounts.mount() > 1 && isDev()) {
|
|
142
146
|
console.warn(
|
|
143
147
|
"[basalt] BasaltProvider: more than one instance is mounted at once \u2014 nested/duplicate BasaltProviders double-mount MantineProvider, the palette <style> and ConnectivityProvider. Mount exactly one, at the app root."
|
|
144
148
|
);
|
|
145
149
|
}
|
|
146
|
-
return () =>
|
|
147
|
-
mountedProviderCount--;
|
|
148
|
-
};
|
|
150
|
+
return () => void providerMounts.unmount();
|
|
149
151
|
}, []);
|
|
150
152
|
}
|
|
151
153
|
function BasaltProvider({
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { SizeClass } from './use-size-class.js';
|
|
2
|
+
export type AsideDockingInput = {
|
|
3
|
+
claimed: boolean;
|
|
4
|
+
folded: boolean;
|
|
5
|
+
sizeClass: SizeClass;
|
|
6
|
+
/** The `asideDockQuery` media query's result. */
|
|
7
|
+
roomToDock: boolean;
|
|
8
|
+
asideWidth: number;
|
|
9
|
+
asideRailWidth: number;
|
|
10
|
+
};
|
|
11
|
+
export type AsideDocking = {
|
|
12
|
+
/** An open aside pushes main rather than overlaying it. */
|
|
13
|
+
docks: boolean;
|
|
14
|
+
/** An open aside renders over main (reserving only its rail). */
|
|
15
|
+
overlay: boolean;
|
|
16
|
+
/** The width `AppShell` reserves for the region. */
|
|
17
|
+
width: number;
|
|
18
|
+
};
|
|
19
|
+
/** The `min-width` query that holds while navbar + open aside + `MAIN_MIN_WIDTH` fit side by side. */
|
|
20
|
+
export declare function asideDockQuery(input: {
|
|
21
|
+
navbarWidth: number;
|
|
22
|
+
asideWidth: number;
|
|
23
|
+
}): string;
|
|
24
|
+
/**
|
|
25
|
+
* The room-to-dock query's SSR/no-`matchMedia` fallback — an `'expanded'` `sizeClassHint` means the
|
|
26
|
+
* server already believes there is room, matching `useSizeClass`'s own hint-seeded guard
|
|
27
|
+
* (`use-size-class.ts`), so the first client paint doesn't fold a default-open aside for one commit.
|
|
28
|
+
*/
|
|
29
|
+
export declare function roomToDockServerFallback(sizeClassHint: SizeClass | undefined): boolean;
|
|
30
|
+
export declare function resolveAsideDocking(input: AsideDockingInput): AsideDocking;
|
|
31
|
+
//# sourceMappingURL=aside-docking.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aside-docking.d.ts","sourceRoot":"","sources":["../../src/shell/aside-docking.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAQjD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,OAAO,CAAA;IACf,SAAS,EAAE,SAAS,CAAA;IACpB,iDAAiD;IACjD,UAAU,EAAE,OAAO,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;IAClB,cAAc,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,2DAA2D;IAC3D,KAAK,EAAE,OAAO,CAAA;IACd,iEAAiE;IACjE,OAAO,EAAE,OAAO,CAAA;IAChB,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,sGAAsG;AACtG,wBAAgB,cAAc,CAAC,KAAK,EAAE;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAEzF;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,aAAa,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAEtF;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,iBAAiB,GAAG,YAAY,CAK1E"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { toEm } from "../tokens/size-classes.js";
|
|
2
|
+
const MAIN_MIN_WIDTH = 720;
|
|
3
|
+
function asideDockQuery(input) {
|
|
4
|
+
return `(min-width: ${toEm(input.navbarWidth + input.asideWidth + MAIN_MIN_WIDTH)})`;
|
|
5
|
+
}
|
|
6
|
+
function roomToDockServerFallback(sizeClassHint) {
|
|
7
|
+
return sizeClassHint === "expanded";
|
|
8
|
+
}
|
|
9
|
+
function resolveAsideDocking(input) {
|
|
10
|
+
const docks = input.sizeClass === "expanded" && input.roomToDock;
|
|
11
|
+
const open = input.claimed && !input.folded;
|
|
12
|
+
const reserved = open && docks ? input.asideWidth : input.asideRailWidth;
|
|
13
|
+
return { docks, overlay: open && !docks, width: input.claimed ? reserved : 0 };
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
asideDockQuery,
|
|
17
|
+
resolveAsideDocking,
|
|
18
|
+
roomToDockServerFallback
|
|
19
|
+
};
|
package/dist/shell/index.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ import type { GlobalAction } from '../controls/actions.js';
|
|
|
4
4
|
import type { AccountMenuItem, BasaltAccountProps } from './account-types.js';
|
|
5
5
|
import type { SidebarSearchActions, SidebarSearchConfig } from './sidebar-search.js';
|
|
6
6
|
import type { MobileNavConfig, SidebarBlock, SidebarSection } from './nav-types.js';
|
|
7
|
-
import type { SizeClass } from './use-size-class.js';
|
|
8
7
|
export { AppSidebar, type AppSidebarProps } from './app-sidebar.js';
|
|
9
8
|
export { NavCountBadge, type NavCountBadgeProps } from './nav-count-badge.js';
|
|
10
9
|
export { SidebarSearch, type SidebarSearchProps, type SidebarSearchConfig, type SidebarSearchActions, } from './sidebar-search.js';
|
|
@@ -136,16 +135,6 @@ export type BasaltShellProps = BasaltProps & {
|
|
|
136
135
|
/** Page content. */
|
|
137
136
|
children?: ReactNode;
|
|
138
137
|
};
|
|
139
|
-
/**
|
|
140
|
-
* The room-to-dock `min-width` query's SSR/no-`matchMedia` fallback — an `'expanded'`
|
|
141
|
-
* `sizeClassHint` means the server already believes there is room, matching `useSizeClass`'s own
|
|
142
|
-
* hint-seeded guard one level up (`use-size-class.ts`). Extracted as its own pure function (rather
|
|
143
|
-
* than the inline `sizeClassHint === 'expanded'` it replaces) purely so `index.test.tsx` can pin it
|
|
144
|
-
* without needing to render `BasaltShell` through a real SSR pass — `AppShell`'s + `PageAside`'s own
|
|
145
|
-
* effects/refs/portals make that path unobservable through rendered markup, and the previous
|
|
146
|
-
* hardcoded `false` fallback here shipped with no test at all for exactly that reason.
|
|
147
|
-
*/
|
|
148
|
-
export declare function roomToDockServerFallback(sizeClassHint: SizeClass | undefined): boolean;
|
|
149
138
|
/**
|
|
150
139
|
* The shell's two page-level regions are providers, and both wrap the frame rather than living
|
|
151
140
|
* inside it: `PageBarProvider` owns the header portal and the single-kebab claim, `AsideProvider`
|
|
@@ -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;
|
|
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,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CAAA;IAChD,oBAAoB;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB,CAAA;AAgFD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,+BASlD"}
|
package/dist/shell/index.js
CHANGED
|
@@ -12,10 +12,10 @@ import { blockRowCount, projectMobileNav } from "./mobile-nav-model.js";
|
|
|
12
12
|
import { AppBreadcrumbs } from "./app-breadcrumbs.js";
|
|
13
13
|
import { PageBarBandOutlet, PageBarOutlet, PageBarProvider, usePageKebabClaimed } from "./page-bar.js";
|
|
14
14
|
import { AsideDocksContext, AsideOutlet, AsideProvider, useAsideRegion } from "./page-aside.js";
|
|
15
|
+
import { asideDockQuery, resolveAsideDocking, roomToDockServerFallback } from "./aside-docking.js";
|
|
15
16
|
import { OverflowMenu, globalActionAsBarAction, globalActionMobile } from "../controls/actions.js";
|
|
16
17
|
import { CtlSlot, useBasaltSpacing } from "../theme/index.js";
|
|
17
18
|
import { createPersistedStore } from "../state/persisted.js";
|
|
18
|
-
import { toEm } from "../tokens/size-classes.js";
|
|
19
19
|
import { SizeClassHintContext, useSizeClass } from "./use-size-class.js";
|
|
20
20
|
import brandClasses from "./app-brand.module.css";
|
|
21
21
|
import headerClasses from "./app-header.module.css";
|
|
@@ -73,10 +73,6 @@ function collapseStore(key) {
|
|
|
73
73
|
collapseStores.set(key, store);
|
|
74
74
|
return store;
|
|
75
75
|
}
|
|
76
|
-
const MAIN_MIN_WIDTH = 720;
|
|
77
|
-
function roomToDockServerFallback(sizeClassHint) {
|
|
78
|
-
return sizeClassHint === "expanded";
|
|
79
|
-
}
|
|
80
76
|
function BasaltShell(props) {
|
|
81
77
|
assertRequiredProps("BasaltShell", props, ["brand", "sections"]);
|
|
82
78
|
return /* @__PURE__ */ jsx(PageBarProvider, { globalActions: props.globalActions ?? [], children: /* @__PURE__ */ jsx(AsideProvider, { children: /* @__PURE__ */ jsx(ShellFrame, { ...props }) }) });
|
|
@@ -109,14 +105,18 @@ function ShellFrame({
|
|
|
109
105
|
const navbarWidth = collapsed ? step.appShellNavbarRailWidth : step.appShellNavbarWidth;
|
|
110
106
|
const sizeClassHint = useContext(SizeClassHintContext);
|
|
111
107
|
const roomToDock = useMediaQuery(
|
|
112
|
-
|
|
108
|
+
asideDockQuery({ navbarWidth, asideWidth: step.appShellAsideWidth }),
|
|
113
109
|
roomToDockServerFallback(sizeClassHint)
|
|
114
110
|
);
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
111
|
+
const docking = resolveAsideDocking({
|
|
112
|
+
claimed: aside.claimed,
|
|
113
|
+
folded: aside.folded,
|
|
114
|
+
sizeClass,
|
|
115
|
+
roomToDock,
|
|
116
|
+
asideWidth: step.appShellAsideWidth,
|
|
117
|
+
asideRailWidth: step.appShellAsideRailWidth
|
|
118
|
+
});
|
|
119
|
+
const asideOverlay = docking.overlay;
|
|
120
120
|
const { requestClose } = aside;
|
|
121
121
|
useEffect(() => {
|
|
122
122
|
if (!asideOverlay) return;
|
|
@@ -141,7 +141,7 @@ function ShellFrame({
|
|
|
141
141
|
() => projectMobileNav(sections, { config: mobileNav, extraMoreRows }),
|
|
142
142
|
[sections, mobileNav, extraMoreRows]
|
|
143
143
|
);
|
|
144
|
-
return /* @__PURE__ */ jsx(AsideDocksContext.Provider, { value: docks, children: /* @__PURE__ */ jsxs(
|
|
144
|
+
return /* @__PURE__ */ jsx(AsideDocksContext.Provider, { value: docking.docks, children: /* @__PURE__ */ jsxs(
|
|
145
145
|
AppShell,
|
|
146
146
|
{
|
|
147
147
|
h: "100dvh",
|
|
@@ -157,7 +157,7 @@ function ShellFrame({
|
|
|
157
157
|
},
|
|
158
158
|
aside: {
|
|
159
159
|
// An overlay reserves the rail only — `<AppShell.Aside>` below widens itself over main.
|
|
160
|
-
width:
|
|
160
|
+
width: docking.width,
|
|
161
161
|
breakpoint: "sm",
|
|
162
162
|
// Below `sm` there is no region at all — `PageAside` renders its content in the page
|
|
163
163
|
// flow instead, one node, no responsive twin (law C9).
|
|
@@ -256,7 +256,6 @@ export {
|
|
|
256
256
|
SidebarAccount,
|
|
257
257
|
SidebarSearch,
|
|
258
258
|
projectMobileNav2 as projectMobileNav,
|
|
259
|
-
roomToDockServerFallback,
|
|
260
259
|
useBreakpoint,
|
|
261
260
|
useSizeClass2 as useSizeClass
|
|
262
261
|
};
|
package/dist/shell/page-bar.d.ts
CHANGED
|
@@ -100,5 +100,29 @@ export type PageBarProps = BasaltProps & SlotStylesProps<PageBarSlot> & {
|
|
|
100
100
|
/** One `ViewTabs`. */
|
|
101
101
|
tabs?: ReactNode;
|
|
102
102
|
};
|
|
103
|
+
/**
|
|
104
|
+
* The page's control bar — row 1 (title/icon, `actions`, `sync`) and row 2 (`tabs`, `filters`,
|
|
105
|
+
* `filtersEnd`). Inside `BasaltShell` both rows portal into shell chrome; with no shell it renders
|
|
106
|
+
* ONE sticky bar in flow, `title` leading, and needs no `PageBarProvider`.
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* // Shell-less (linewatch-shaped): the store is local, the bar is the page's first child.
|
|
110
|
+
* const filters = createLocalStore({ key: 'outages', fields: { q: field.string({ max: 60 }) } })
|
|
111
|
+
*
|
|
112
|
+
* function OutagesPage() {
|
|
113
|
+
* const [q] = filters.field.q.use()
|
|
114
|
+
* return (
|
|
115
|
+
* <>
|
|
116
|
+
* <PageBar
|
|
117
|
+
* title="Outages"
|
|
118
|
+
* actions={{ primary: { key: 'export', label: 'Export', onClick: exportCsv } }}
|
|
119
|
+
* filters={<FilterSet><SearchFilter field={filters.field.q} placeholder="Find a line" /></FilterSet>}
|
|
120
|
+
* classNames={{ root: classes.bleed }} // your gutter bleed — see `PageBarSlot`
|
|
121
|
+
* />
|
|
122
|
+
* <OutageTable query={q} />
|
|
123
|
+
* </>
|
|
124
|
+
* )
|
|
125
|
+
* }
|
|
126
|
+
*/
|
|
103
127
|
export declare function PageBar({ title, icon, actions, sync, filters, filtersEnd, tabs, className, style, classNames, }: PageBarProps): ReactNode;
|
|
104
128
|
//# sourceMappingURL=page-bar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-bar.d.ts","sourceRoot":"","sources":["../../src/shell/page-bar.tsx"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAWnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AACpF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAK9D,mEAAmE;AACnE,eAAO,MAAM,mBAAmB,wBAAwB,CAAA;AAKxD;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,gFAAgF;IAChF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,gGAAgG;IAChG,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CACzB,CAAA;AAuDD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAC9B,aAAa,EACb,QAAQ,GACT,EAAE;IACD,aAAa,EAAE,SAAS,YAAY,EAAE,CAAA;IACtC,QAAQ,EAAE,SAAS,CAAA;CACpB,GAAG,SAAS,CAsDZ;AAED,iFAAiF;AACjF,wBAAgB,aAAa,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,+BAGlE;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,+BAGtE;AAED,yFAAyF;AACzF,wBAAgB,mBAAmB,IAAI,OAAO,CAE7C;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,iBAAiB,IAAI;IACnC,IAAI,EAAE,OAAO,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OAAO,CAAC,CAAA;IACrC,6CAA6C;IAC7C,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,sDAAsD;IACtD,UAAU,CAAC,EAAE,SAAS,EAAE,CAAA;IACxB,sBAAsB;IACtB,IAAI,CAAC,EAAE,SAAS,CAAA;CACjB,CAAA;AAmEH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,OAAO,EACP,UAAU,EACV,IAAI,EACJ,SAAS,EACT,KAAK,EACL,UAAU,GACX,EAAE,YAAY,GAAG,SAAS,CAkM1B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type BreakpointName = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
2
2
|
/**
|
|
3
|
-
* @deprecated Use `useSizeClass` — removed
|
|
3
|
+
* @deprecated Use `useSizeClass` — removed in 1.33.0 (see `MIGRATING.md`). `theme.breakpoints` is
|
|
4
4
|
* now derived: `sm` moved 48em → 52.5em and `md`/`lg`/`xl` all sit at 75em (`xs`/`sm` collapse,
|
|
5
5
|
* `md`/`lg`/`xl` collapse).
|
|
6
6
|
*/
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
* `.sheetBody` is the Modal body; it reaches the trailing button row `overlays.confirm`
|
|
43
43
|
* renders (Mantine `Group`), stretching the buttons to full width at the `--vx-hit` floor.
|
|
44
44
|
*/
|
|
45
|
+
/* theme-allow raw-media-query — the bottom sheet IS the compact size class's overlay form */
|
|
45
46
|
@media (max-width: 52.49375em) {
|
|
46
47
|
.sheetInner {
|
|
47
48
|
align-items: flex-end;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"derive-controls.d.ts","sourceRoot":"","sources":["../../src/theme-lab/derive-controls.tsx"],"names":[],"mappings":"AA8DA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAiBtC,OAAO,EAAE,aAAa,EAAE,yBAAyB,EAAE,KAAK,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAiDpG,MAAM,MAAM,mBAAmB,GAAG;IAChC,uFAAuF;IACvF,SAAS,CAAC,EAAE,SAAS,CAAA;CACtB,CAAA;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAAE,SAAS,EAAE,EAAE,mBAAmB,+
|
|
1
|
+
{"version":3,"file":"derive-controls.d.ts","sourceRoot":"","sources":["../../src/theme-lab/derive-controls.tsx"],"names":[],"mappings":"AA8DA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAiBtC,OAAO,EAAE,aAAa,EAAE,yBAAyB,EAAE,KAAK,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAiDpG,MAAM,MAAM,mBAAmB,GAAG;IAChC,uFAAuF;IACvF,SAAS,CAAC,EAAE,SAAS,CAAA;CACtB,CAAA;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAAE,SAAS,EAAE,EAAE,mBAAmB,+BA0FhE"}
|
package/dist/tokens/index.d.ts
CHANGED
|
@@ -16,6 +16,8 @@ export { deriveRadius } from './palette.js';
|
|
|
16
16
|
export type { RadiusValues } from './palette.js';
|
|
17
17
|
export { deriveSpacing } from './palette.js';
|
|
18
18
|
export type { SpaceValues } from './palette.js';
|
|
19
|
+
export { CONTAINER_CLASSES, resolveContainerClass, SIZE_CLASSES } from './size-classes.js';
|
|
20
|
+
export type { ContainerClass } from './size-classes.js';
|
|
19
21
|
/** A per-theme color pair: a hue keeps its identity but shifts shade across schemes. */
|
|
20
22
|
export type ColorPair = {
|
|
21
23
|
light: string;
|
|
@@ -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;AAQvE,OAAO,EAA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AgB,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
|
@@ -14,6 +14,7 @@ import { BP, p } from "./palette.js";
|
|
|
14
14
|
import { DEFAULT_DERIVE_CONFIG, deriveTokens, resolveDeriveConfig } from "./derive.js";
|
|
15
15
|
import { deriveRadius } from "./palette.js";
|
|
16
16
|
import { deriveSpacing } from "./palette.js";
|
|
17
|
+
import { CONTAINER_CLASSES, resolveContainerClass, SIZE_CLASSES as SIZE_CLASSES2 } from "./size-classes.js";
|
|
17
18
|
const alpha = (token, a) => `color-mix(in srgb, ${token} ${Math.round(a * 100)}%, transparent)`;
|
|
18
19
|
const TEXT = {
|
|
19
20
|
nano: 10,
|
|
@@ -671,7 +672,9 @@ ${mobileLadderBlock(space)}`;
|
|
|
671
672
|
export {
|
|
672
673
|
BP,
|
|
673
674
|
BREAKPOINTS,
|
|
675
|
+
CONTAINER_CLASSES,
|
|
674
676
|
DEFAULT_DERIVE_CONFIG,
|
|
677
|
+
SIZE_CLASSES2 as SIZE_CLASSES,
|
|
675
678
|
VX,
|
|
676
679
|
alpha,
|
|
677
680
|
buildDensityCss,
|
|
@@ -686,6 +689,7 @@ export {
|
|
|
686
689
|
groupTokens,
|
|
687
690
|
p,
|
|
688
691
|
pxRem,
|
|
692
|
+
resolveContainerClass,
|
|
689
693
|
resolveDeriveConfig,
|
|
690
694
|
seriesTokens
|
|
691
695
|
};
|
package/llms.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# basalt-ui v1.
|
|
1
|
+
# basalt-ui v1.32.1
|
|
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,7 +19,7 @@
|
|
|
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.32.1
|
|
23
23
|
|
|
24
24
|
## basalt-ui
|
|
25
25
|
Import: import { ... } from 'basalt-ui'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "basalt-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.32.1",
|
|
4
4
|
"description": "Opinionated framework for Mantine-based React apps — theme, app shell, visx charts, toolchain presets",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"charts",
|
|
@@ -171,6 +171,7 @@
|
|
|
171
171
|
"@shikijs/themes": "^4.4.3",
|
|
172
172
|
"@tanstack/react-hotkeys": "0.10.0",
|
|
173
173
|
"@tanstack/react-router-devtools": "^1.167.2",
|
|
174
|
+
"@testing-library/react": "16.3.3",
|
|
174
175
|
"@types/bun": "^1.4.2",
|
|
175
176
|
"@types/hast": "^3.0.5",
|
|
176
177
|
"@types/react": "^19.3.0",
|