basalt-ui 1.34.1 → 1.35.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/CHANGELOG.md +15 -0
- package/MIGRATING.md +17 -12
- package/dist/guard/index.d.ts.map +1 -1
- package/dist/guard/index.js +16 -6
- 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/surfaces.js +2 -2
- package/dist/tokens/index.js +1 -1
- package/llms.txt +2 -2
- package/package.json +1 -1
- package/src/guard/index.ts +34 -18
- 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/surfaces.ts +2 -2
- package/src/tokens/index.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
# [1.35.0](https://github.com/jkrumm/basalt-ui/compare/v1.34.1...v1.35.0) (2026-10-01)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* extend the unknown-vx-token grace one minor to 1.36.0 ([a618388](https://github.com/jkrumm/basalt-ui/commit/a618388e27ea1fc650b592f75f70a753946b55a7))
|
|
7
|
+
* judge raw-selection-control by host-tag nesting, not a 12-line window ([98724ad](https://github.com/jkrumm/basalt-ui/commit/98724ad2d1c46cbced5aef8d834f9f6c26cf81c4))
|
|
8
|
+
* name the signed-out sidebar account row in the collapsed rail ([9e4ccad](https://github.com/jkrumm/basalt-ui/commit/9e4ccadf04b759ce58501cc146ee808f4c0bb449))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* keep a custom sidebar block in the collapsed rail and the mobile drawer ([136481c](https://github.com/jkrumm/basalt-ui/commit/136481cb6485543c9bdd4b386590c5080ed14c3c))
|
|
14
|
+
* let a settings entry be the current page, not only a checked selection ([1da042c](https://github.com/jkrumm/basalt-ui/commit/1da042ce10855e6d6cc364b94358220be2064c4d))
|
|
15
|
+
|
|
1
16
|
## [1.34.1](https://github.com/jkrumm/basalt-ui/compare/v1.34.0...v1.34.1) (2026-10-01)
|
|
2
17
|
|
|
3
18
|
|
package/MIGRATING.md
CHANGED
|
@@ -66,18 +66,18 @@ There is one row per SURFACE, not per export, and a surface earns a row once any
|
|
|
66
66
|
shipped lefthook preset both changed in 1.30.0 with no row that owned them — which is how a
|
|
67
67
|
consumer read this index, found nothing, and diffed a KPI row that had silently gone 4-up → 2-up.
|
|
68
68
|
|
|
69
|
-
| Surface | 1.27.0 | 1.28.0 | 1.29.0 | 1.30.0 | 1.30.1 | 1.30.2 | 1.31.0 | 1.32.0 | 1.32.1 | 1.33.0 | 1.34.0 | 1.34.1 | Unreleased |
|
|
70
|
-
| ----------------------------- | ------------------------------------------------------------ | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ---------------------------------- | ------ | ---------- |
|
|
71
|
-
| **tokens** (`./tokens`) | — | `--vx-divider` → `rgba()` on both schemes (§ Shell) | `--vx-space-touch-target` added (§ Additions) | eight spacing numbers (§ Chrome) | — | — | `--vx-hit` replaces the touch vars; `SIZE_CLASSES` (§ 1.31.0) | — | `SIZE_CLASSES`/`CONTAINER_CLASSES` actually exported (§ Fixes) | `CONTAINER_GRID_BREAKPOINTS`; `raw-breakpoint` trusts it (§ 1.33.0) | `CONTAINER_KEYS` (§ 1.34.0) | — | — |
|
|
72
|
-
| **charts** (`./charts`) | — | phone tier, `curve`, formatters, `state`, log axis (§ preamble) | `ChartState.empty: string`, `AxisBottomNumeric` (§ Additions) | responsive `height`, `legend.maxRows` (§ Charts) | `height` reaches the kinds; `maxRows` beats the `fill` fit (§ Charts) | — | container-class tier + `height` keys (§ 1.31.0) | — | `ResponsiveChartHeight` `sm` → key (§ Container recipes) | — | — | — | — |
|
|
73
|
-
| **shell** (`.`) | — | scrollport, region seams, **the brand left the sidebar** (§§ scrollport, brand, Shell) | `PageTitle`, `BasaltDevDock`, `useBreakpoint` (§ Additions) | More popover, aside pill, the responsive gutter, `useBasaltSpacing` (§ Chrome) | — | — | `theme.breakpoints` derived, `useSizeClass`, `data-basalt-host`, `useBreakpoint` on notice (§ 1.31.0) | `useBreakpoint` removal → 1.33.0; `useSizeClass` is shell-only (§ 1.32.0) | shell-less `shell/` gutter, `AppShell` breakpoints, `useSizeClass` for overlays (§§ Shell-less, `useSizeClass`) | — | `useBreakpoint` removed (§ 1.34.0) | — | — |
|
|
74
|
-
| **controls** (`./controls`) | `NumberFilter`, `field.number` (§ Controls) | sheet renders panel rows; `PanelRow`, `SliderControl` (§ `basalt-ui/controls`) | — | — | — | — | — | — | — | `NumberFilter clearable`; `createSearchStore` `resets` (§ State and controls) | — | — | — |
|
|
75
|
-
| **forms** (`./forms`) | — | `field` → `inputProps`, **`inputProps` drops `key`**, the layout tier (§ `inputProps`) | `field` DELETED — and the `--fix` recipe no longer works (§ Consolidation) | — | — | — | — | — | `FormGroup` row no longer stretches (§ Fixes) | — | — | — | — |
|
|
76
|
-
| **data** (`./data/table`) | — | root is a `<div>`, row selection, `getItemKey` required (§ `basalt-ui/data`) | `./data` + `./query` + `./connectivity` dropped (§ Consolidation) | — | — | — | — | — | `renderCard` documented (§ `renderCard`) | — | — | — | — |
|
|
77
|
-
| **dashboard** (`.`) | `StatCard`: `unit`, `breakdown`, delta format (§ `StatCard`) | `StatGroup`, `WidgetGrid`, query-aware `StatCard` — additive | — | **the column law keys on the CONTAINER; `cols={4}` is 2-up at `sm`** (§ Dashboard) | — | — | — | — | — | — | — | — | — |
|
|
78
|
-
| **toolchain** (`./configs/*`) | — | — | the shipped lefthook preset's `check-theme` BROKE — the CLI resolver stopped ascending (§ CLI) | the preset's default bin, and the `root:` recipe (§ Toolchain) | — | — | — | — | — | — | — | — | — |
|
|
79
|
-
| **CLI** (`basalt-ui`) | — | — | **resolver stops relocating; `doctor` loses 6 of 10 checks** (§ CLI) | — | — | — | — | — | — | — | — | — | — |
|
|
80
|
-
| **guards** | five rules → `error` (§ Guards) | six new ids at `warn` (§ preamble) | `query-dual-import` retired in 1.29.1 (§ Guards) | four rules → `error` (§ Guards) | — | — | — | `raw-breakpoint`: the container-grid answer, `error` at 1.33.0 (§ 1.32.0) | `FormRow`/`FormGroup` homes in both lanes; `basalt-main` dropped (§ Fixes) | C1 + breakpoint pairs → `error`; `unknown-vx-token` `warn` (§ Guards) | — | — | — |
|
|
69
|
+
| Surface | 1.27.0 | 1.28.0 | 1.29.0 | 1.30.0 | 1.30.1 | 1.30.2 | 1.31.0 | 1.32.0 | 1.32.1 | 1.33.0 | 1.34.0 | 1.34.1 | 1.35.0 | Unreleased |
|
|
70
|
+
| ----------------------------- | ------------------------------------------------------------ | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ---------------------------------- | ------ | ------ | ---------- |
|
|
71
|
+
| **tokens** (`./tokens`) | — | `--vx-divider` → `rgba()` on both schemes (§ Shell) | `--vx-space-touch-target` added (§ Additions) | eight spacing numbers (§ Chrome) | — | — | `--vx-hit` replaces the touch vars; `SIZE_CLASSES` (§ 1.31.0) | — | `SIZE_CLASSES`/`CONTAINER_CLASSES` actually exported (§ Fixes) | `CONTAINER_GRID_BREAKPOINTS`; `raw-breakpoint` trusts it (§ 1.33.0) | `CONTAINER_KEYS` (§ 1.34.0) | — | — | — |
|
|
72
|
+
| **charts** (`./charts`) | — | phone tier, `curve`, formatters, `state`, log axis (§ preamble) | `ChartState.empty: string`, `AxisBottomNumeric` (§ Additions) | responsive `height`, `legend.maxRows` (§ Charts) | `height` reaches the kinds; `maxRows` beats the `fill` fit (§ Charts) | — | container-class tier + `height` keys (§ 1.31.0) | — | `ResponsiveChartHeight` `sm` → key (§ Container recipes) | — | — | — | — | — |
|
|
73
|
+
| **shell** (`.`) | — | scrollport, region seams, **the brand left the sidebar** (§§ scrollport, brand, Shell) | `PageTitle`, `BasaltDevDock`, `useBreakpoint` (§ Additions) | More popover, aside pill, the responsive gutter, `useBasaltSpacing` (§ Chrome) | — | — | `theme.breakpoints` derived, `useSizeClass`, `data-basalt-host`, `useBreakpoint` on notice (§ 1.31.0) | `useBreakpoint` removal → 1.33.0; `useSizeClass` is shell-only (§ 1.32.0) | shell-less `shell/` gutter, `AppShell` breakpoints, `useSizeClass` for overlays (§§ Shell-less, `useSizeClass`) | — | `useBreakpoint` removed (§ 1.34.0) | — | — | — |
|
|
74
|
+
| **controls** (`./controls`) | `NumberFilter`, `field.number` (§ Controls) | sheet renders panel rows; `PanelRow`, `SliderControl` (§ `basalt-ui/controls`) | — | — | — | — | — | — | — | `NumberFilter clearable`; `createSearchStore` `resets` (§ State and controls) | — | — | — | — |
|
|
75
|
+
| **forms** (`./forms`) | — | `field` → `inputProps`, **`inputProps` drops `key`**, the layout tier (§ `inputProps`) | `field` DELETED — and the `--fix` recipe no longer works (§ Consolidation) | — | — | — | — | — | `FormGroup` row no longer stretches (§ Fixes) | — | — | — | — | — |
|
|
76
|
+
| **data** (`./data/table`) | — | root is a `<div>`, row selection, `getItemKey` required (§ `basalt-ui/data`) | `./data` + `./query` + `./connectivity` dropped (§ Consolidation) | — | — | — | — | — | `renderCard` documented (§ `renderCard`) | — | — | — | — | — |
|
|
77
|
+
| **dashboard** (`.`) | `StatCard`: `unit`, `breakdown`, delta format (§ `StatCard`) | `StatGroup`, `WidgetGrid`, query-aware `StatCard` — additive | — | **the column law keys on the CONTAINER; `cols={4}` is 2-up at `sm`** (§ Dashboard) | — | — | — | — | — | — | — | — | — | — |
|
|
78
|
+
| **toolchain** (`./configs/*`) | — | — | the shipped lefthook preset's `check-theme` BROKE — the CLI resolver stopped ascending (§ CLI) | the preset's default bin, and the `root:` recipe (§ Toolchain) | — | — | — | — | — | — | — | — | — | — |
|
|
79
|
+
| **CLI** (`basalt-ui`) | — | — | **resolver stops relocating; `doctor` loses 6 of 10 checks** (§ CLI) | — | — | — | — | — | — | — | — | — | — | — |
|
|
80
|
+
| **guards** | five rules → `error` (§ Guards) | six new ids at `warn` (§ preamble) | `query-dual-import` retired in 1.29.1 (§ Guards) | four rules → `error` (§ Guards) | — | — | — | `raw-breakpoint`: the container-grid answer, `error` at 1.33.0 (§ 1.32.0) | `FormRow`/`FormGroup` homes in both lanes; `basalt-main` dropped (§ Fixes) | C1 + breakpoint pairs → `error`; `unknown-vx-token` `warn` (§ Guards) | — | — | — | — |
|
|
81
81
|
|
|
82
82
|
---
|
|
83
83
|
|
|
@@ -86,6 +86,11 @@ consumer read this index, found nothing, and diffed a KPI row that had silently
|
|
|
86
86
|
_Nothing yet. Author the next section under this heading as `## Unreleased — <title>`; the
|
|
87
87
|
release renames it and opens a new one here._
|
|
88
88
|
|
|
89
|
+
## 1.35.0
|
|
90
|
+
|
|
91
|
+
_Nothing yet. Author the next section under this heading as `## Unreleased — <title>`; the
|
|
92
|
+
release renames it and opens a new one here._
|
|
93
|
+
|
|
89
94
|
## 1.34.1 — the AST lane needs a binary
|
|
90
95
|
|
|
91
96
|
`check-theme`'s "AST lane not enforced" notice and `doctor`'s `oxlint-preset` check now count the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/guard/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAK7E,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/guard/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAK7E,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,CAAA;AAm1B9D,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,EA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;;;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
|
@@ -203,7 +203,18 @@ function titleBodyNamesThePage(body) {
|
|
|
203
203
|
const RAW_SELECTION_CONTROL_TAG = /<(SegmentedControl|Select|MultiSelect|NativeSelect|DatePickerInput|DateInput|TagsInput|Chip\.Group)(?![\w])(?:=>|[^>])*?>/g;
|
|
204
204
|
const PROSE_CONTEXT_TAG = /<(?:Prose|ArticleLayout|Modal|Drawer)(?![\w])/;
|
|
205
205
|
const CONTROL_HOST_TAG = /<(?:SettingsRow|FormRow|FormGroup|Modal|Drawer|Popover\.Dropdown|Menu\.Dropdown|Composer|FilterSet|PageAside|PanelRow)(?![\w])/;
|
|
206
|
-
const
|
|
206
|
+
const CONTROL_HOST_TAG_SCAN = new RegExp(
|
|
207
|
+
`<(/?)(?:${/\(\?:([^)]*)\)/.exec(CONTROL_HOST_TAG.source)?.[1] ?? ""})(?![\\w])(?:=>|[^>])*?>`,
|
|
208
|
+
"g"
|
|
209
|
+
);
|
|
210
|
+
function insideHostTag(codeText, offset) {
|
|
211
|
+
let depth = 0;
|
|
212
|
+
for (const m of codeText.slice(0, offset).matchAll(CONTROL_HOST_TAG_SCAN)) {
|
|
213
|
+
if (m[1] === "/") depth = Math.max(0, depth - 1);
|
|
214
|
+
else if (!m[0].endsWith("/>")) depth += 1;
|
|
215
|
+
}
|
|
216
|
+
return depth > 0;
|
|
217
|
+
}
|
|
207
218
|
const OVERLAY_CONVENTION_KEBAB = /^[^/]*-(?:modal|drawer|popover|panel|form)\.[jt]sx$/;
|
|
208
219
|
const OVERLAY_CONVENTION_PASCAL = /^[A-Z]\w*(?:Modal|Drawer|Popover|Panel|Form)\.[jt]sx$/;
|
|
209
220
|
function isOverlayConventionFile(relPath) {
|
|
@@ -240,8 +251,8 @@ const DEFAULT_GUARD_CONFIG = {
|
|
|
240
251
|
const GRACE_PERIOD_KINDS = {
|
|
241
252
|
"unknown-vx-token": {
|
|
242
253
|
since: "1.34.0",
|
|
243
|
-
promote: "1.
|
|
244
|
-
why: "New kind at 1.33.0 (consumer-loop r2 B3): obsidian lost its 44px touch floor to a removed `var(--vx-space-touch-target)` that nothing reported. WIDENED at 1.34.0 (image-gen r4: `var(--vx-surface-2)` rendered transparent, unreported) to every unemitted name inside a basalt-owned family, so the grace restarts: warn through 1.34.x, error at 1.35.0."
|
|
254
|
+
promote: "1.36.0",
|
|
255
|
+
why: "New kind at 1.33.0 (consumer-loop r2 B3): obsidian lost its 44px touch floor to a removed `var(--vx-space-touch-target)` that nothing reported. WIDENED at 1.34.0 (image-gen r4: `var(--vx-surface-2)` rendered transparent, unreported) to every unemitted name inside a basalt-owned family, so the grace restarts: warn through 1.34.x, error at 1.35.0. EXTENDED one minor at 1.35.0: that minor ships the shell a11y fixes consumers are upgrading for, and the promotion also turns the seriesTokens warning into a throw \u2014 not a change to bundle into that bump. Error at 1.36.0."
|
|
245
256
|
}
|
|
246
257
|
};
|
|
247
258
|
function severityOf(kind, cfg) {
|
|
@@ -925,7 +936,7 @@ const GUARD_RULES = {
|
|
|
925
936
|
"raw-selection-control": {
|
|
926
937
|
kind: "raw-selection-control",
|
|
927
938
|
pattern: RAW_SELECTION_CONTROL_TAG,
|
|
928
|
-
// handled inline (full-text tag-scoped scan + host
|
|
939
|
+
// handled inline (full-text tag-scoped scan + host ancestry)
|
|
929
940
|
// JSX-tag-shaped (`<Select …>`) — never appears in CSS text.
|
|
930
941
|
appliesTo: (relPath) => !relPath.endsWith(".css"),
|
|
931
942
|
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."
|
|
@@ -1246,8 +1257,7 @@ function checkSource(text, relPath, cfg) {
|
|
|
1246
1257
|
if (ruleApplies("raw-selection-control", relPath) && !isOverlayConventionFile(relPath) && !(CONTROL_OWNER_DEF.test(codeText) && !BASALT_ANY_IMPORT.test(codeText)) && !MANTINE_FORM_IMPORT.test(codeText)) {
|
|
1247
1258
|
for (const m of codeText.matchAll(RAW_SELECTION_CONTROL_TAG)) {
|
|
1248
1259
|
const startLine = codeText.slice(0, m.index ?? 0).split("\n").length;
|
|
1249
|
-
|
|
1250
|
-
if (CONTROL_HOST_TAG.test(codeLines.slice(windowStart, startLine).join("\n"))) continue;
|
|
1260
|
+
if (insideHostTag(codeText, m.index ?? 0)) continue;
|
|
1251
1261
|
const endLine = startLine + (m[0].split("\n").length - 1);
|
|
1252
1262
|
if (isAllowedInRange(startLine, endLine, "raw-selection-control")) continue;
|
|
1253
1263
|
findings.push({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-mobile-nav.d.ts","sourceRoot":"","sources":["../../src/shell/app-mobile-nav.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAc,YAAY,EAAa,MAAM,OAAO,CAAA;AAEhE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAGlD,OAAO,KAAK,EACV,eAAe,EAEf,cAAc,EAEd,YAAY,
|
|
1
|
+
{"version":3,"file":"app-mobile-nav.d.ts","sourceRoot":"","sources":["../../src/shell/app-mobile-nav.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAc,YAAY,EAAa,MAAM,OAAO,CAAA;AAEhE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAGlD,OAAO,KAAK,EACV,eAAe,EAEf,cAAc,EAEd,YAAY,EAMb,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAqB/C,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG;IACzC,kFAAkF;IAClF,KAAK,EAAE,cAAc,CAAA;IACrB,MAAM,CAAC,EAAE,eAAe,GAAG,SAAS,CAAA;IACpC;;wEAEoE;IACpE,OAAO,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAA;IACxC,iBAAiB,CAAC,EAAE,gBAAgB,EAAE,GAAG,SAAS,CAAA;IAClD;;;;;OAKG;IACH,MAAM,CAAC,EAAE,YAAY,EAAE,GAAG,SAAS,CAAA;CACpC,CAAA;AAgHD;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,kBAAkB,GAAG,SAAS,GAAG,MAAM,CAE/E;AA8ED,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,MAAM,EACN,OAAO,EACP,iBAAiB,EACjB,MAAM,EACN,SAAS,EACT,KAAK,GACN,EAAE,cAAc,GAAG,YAAY,CAuiB/B"}
|
|
@@ -51,6 +51,10 @@ function IconCheck() {
|
|
|
51
51
|
}
|
|
52
52
|
);
|
|
53
53
|
}
|
|
54
|
+
function rowCurrent(row) {
|
|
55
|
+
if (!row.active) return void 0;
|
|
56
|
+
return row.current === "page" ? "page" : "true";
|
|
57
|
+
}
|
|
54
58
|
function accountRows(account) {
|
|
55
59
|
if (!account || account.state.status === "loading") return [];
|
|
56
60
|
const actions = account.actions;
|
|
@@ -104,7 +108,8 @@ function settingsRows(items) {
|
|
|
104
108
|
label: item.label,
|
|
105
109
|
icon: item.icon,
|
|
106
110
|
onClick: item.onClick,
|
|
107
|
-
...item.active !== void 0 && { active: item.active }
|
|
111
|
+
...item.active !== void 0 && { active: item.active },
|
|
112
|
+
...item.current !== void 0 && { current: item.current }
|
|
108
113
|
}));
|
|
109
114
|
}
|
|
110
115
|
function deepestScrolledDescendant(root) {
|
|
@@ -129,10 +134,10 @@ const menuActionRow = (row, sectionStart = false) => /* @__PURE__ */ jsx(
|
|
|
129
134
|
{
|
|
130
135
|
className: sectionStart ? `${classes.menuItem} ${classes.menuSectionStart}` : classes.menuItem,
|
|
131
136
|
leftSection: row.icon,
|
|
132
|
-
rightSection: row.active ? /* @__PURE__ */ jsx(IconCheck, {}) : void 0,
|
|
137
|
+
rightSection: row.active && row.current !== "page" ? /* @__PURE__ */ jsx(IconCheck, {}) : void 0,
|
|
133
138
|
...row.danger ? { color: "red" } : {},
|
|
134
139
|
onClick: (event) => row.onClick?.(event),
|
|
135
|
-
"aria-current": row
|
|
140
|
+
"aria-current": rowCurrent(row),
|
|
136
141
|
children: row.label
|
|
137
142
|
},
|
|
138
143
|
row.key
|
|
@@ -175,13 +180,15 @@ function MobileNav({
|
|
|
175
180
|
};
|
|
176
181
|
const extraRows = [...accountRows(account), ...settingsRows(settingsMenuItems)];
|
|
177
182
|
const moreBlocks = (blocks ?? []).filter(
|
|
178
|
-
(block) =>
|
|
183
|
+
(block) => sidebarBlockMobile(block) === "more" && (block.kind !== "list" || block.items.length > 0)
|
|
184
|
+
);
|
|
185
|
+
const sheetBlocks = moreBlocks.filter(
|
|
186
|
+
(block) => block.kind !== "progress"
|
|
179
187
|
);
|
|
180
|
-
const listBlocks = moreBlocks.filter((block) => block.kind === "list");
|
|
181
188
|
const tailRule = (slot) => moreBlocks.length + extraRows.length > 0 && slotHasRows(slot);
|
|
182
189
|
const activateBlock = (block) => {
|
|
183
190
|
close();
|
|
184
|
-
if (block.kind
|
|
191
|
+
if (block.kind !== "progress") {
|
|
185
192
|
requestAnimationFrame(() => setOpenBlockKey(block.key));
|
|
186
193
|
return;
|
|
187
194
|
}
|
|
@@ -351,13 +358,14 @@ function MobileNav({
|
|
|
351
358
|
classNames: { root: classes.row },
|
|
352
359
|
label: row.label,
|
|
353
360
|
leftSection: row.icon,
|
|
354
|
-
rightSection: row.active ? /* @__PURE__ */ jsx(IconCheck, {}) : void 0,
|
|
361
|
+
rightSection: row.active && row.current !== "page" ? /* @__PURE__ */ jsx(IconCheck, {}) : void 0,
|
|
355
362
|
...row.danger ? { color: "red" } : {},
|
|
356
363
|
onClick: (event) => {
|
|
357
364
|
row.onClick?.(event);
|
|
358
365
|
close();
|
|
359
366
|
},
|
|
360
|
-
|
|
367
|
+
active: row.active === true && row.current === "page",
|
|
368
|
+
"aria-current": rowCurrent(row)
|
|
361
369
|
},
|
|
362
370
|
row.key
|
|
363
371
|
);
|
|
@@ -463,7 +471,7 @@ function MobileNav({
|
|
|
463
471
|
exitDuration: reduceMotion ? 0 : 120,
|
|
464
472
|
timingFunction: "cubic-bezier(0.32, 0.72, 0, 1)"
|
|
465
473
|
},
|
|
466
|
-
children: /* @__PURE__ */ jsx(ScrollArea.Autosize, { mah: "62dvh", type: "scroll", offsetScrollbars: "present", scrollbarSize: 8, children: /* @__PURE__ */ jsx(Stack, { gap: 1, children: block.items.map(blockItemRow) }) })
|
|
474
|
+
children: /* @__PURE__ */ jsx(ScrollArea.Autosize, { mah: "62dvh", type: "scroll", offsetScrollbars: "present", scrollbarSize: 8, children: block.kind === "list" ? /* @__PURE__ */ jsx(Stack, { gap: 1, children: block.items.map(blockItemRow) }) : block.node })
|
|
467
475
|
},
|
|
468
476
|
`block-${block.key}`
|
|
469
477
|
);
|
|
@@ -479,12 +487,13 @@ function MobileNav({
|
|
|
479
487
|
if (slot.kind === "menu") return menuSlot(slot);
|
|
480
488
|
return sheetSlot(slot);
|
|
481
489
|
}),
|
|
482
|
-
|
|
490
|
+
sheetBlocks.map(blockSheet)
|
|
483
491
|
]
|
|
484
492
|
}
|
|
485
493
|
);
|
|
486
494
|
}
|
|
487
495
|
function blockRowLabel(block) {
|
|
496
|
+
if (block.kind === "custom") return block.label ?? "";
|
|
488
497
|
return block.kind === "list" ? `${block.label} \xB7 ${block.count ?? block.items.length}` : `${block.label} \xB7 ${block.value} of ${block.total}`;
|
|
489
498
|
}
|
|
490
499
|
function slotHasRows(slot) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-sidebar-account.d.ts","sourceRoot":"","sources":["../../src/shell/app-sidebar-account.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAElD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AA0DzD,wBAAgB,cAAc,CAAC,KAAK,EAAE,kBAAkB,GAAG,WAAW,+
|
|
1
|
+
{"version":3,"file":"app-sidebar-account.d.ts","sourceRoot":"","sources":["../../src/shell/app-sidebar-account.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAElD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AA0DzD,wBAAgB,cAAc,CAAC,KAAK,EAAE,kBAAkB,GAAG,WAAW,+BA6FrE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-sidebar.d.ts","sourceRoot":"","sources":["../../src/shell/app-sidebar.tsx"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAElD,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAe,cAAc,EAAE,MAAM,aAAa,CAAA;AAI5E,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAE1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAgBjF,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG;IAC1C;;;;OAIG;IACH,KAAK,EAAE,WAAW,GAAG;QAAE,IAAI,CAAC,EAAE,eAAe,EAA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A;IAC5B;;;;;;;;;;;OAWG;IACH,iBAAiB,CAAC,EAAE,gBAAgB,EAAE,CAAA;IACtC;;;;;;;;;;;;;;;;OAgBG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;IACvC;;;;OAIG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAA;IAC5B;;;;OAIG;IACH,MAAM,CAAC,EAAE,mBAAmB,GAAG;QAAE,OAAO,CAAC,EAAE,oBAAoB,CAAA;KAAE,CAAA;IACjE;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,YAAY,EAAE,CAAA;CACxB,CAAA;AAmTD,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,+BAyKhD"}
|
|
@@ -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,kBAAk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: '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,K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B,GACD;IACE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;IACtB,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,SAAS,CAAA;IACf,MAAM,EAAE,OAAO,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"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