basalt-ui 2.12.0 → 2.13.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 +35 -0
- package/MIGRATING.md +50 -12
- package/agent/rules/basalt-state.md +1 -1
- package/agent/skills/basalt-app/SKILL.md +1 -1
- package/agent/templates/main.tpl +1 -0
- package/dist/cli/basalt-install.d.ts +10 -0
- package/dist/cli/basalt-install.d.ts.map +1 -0
- package/dist/cli/basalt-install.js +0 -0
- package/dist/cli/check-theme.js +1 -1
- package/dist/cli/doctor-upgrade.d.ts +3 -3
- package/dist/cli/doctor-upgrade.d.ts.map +1 -1
- package/dist/cli/doctor-upgrade.js +28 -44
- package/dist/cli/doctor.js +3 -3
- package/dist/cli/index.d.ts +4 -28
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +10 -49
- package/dist/cli/provider-tags.d.ts +12 -0
- package/dist/cli/provider-tags.d.ts.map +1 -0
- package/dist/cli/provider-tags.js +28 -0
- package/dist/cli/render-imports.d.ts +24 -0
- package/dist/cli/render-imports.d.ts.map +1 -0
- package/dist/cli/render-imports.js +74 -0
- package/dist/cli/router-wiring.d.ts +12 -0
- package/dist/cli/router-wiring.d.ts.map +1 -1
- package/dist/cli/router-wiring.js +18 -0
- package/dist/cli/source-text.d.ts +7 -0
- package/dist/cli/source-text.d.ts.map +1 -1
- package/dist/cli/source-text.js +34 -0
- package/dist/cli/sync.d.ts.map +1 -1
- package/dist/cli/sync.js +18 -13
- package/dist/guard/fonts-hint.d.ts +3 -0
- package/dist/guard/fonts-hint.d.ts.map +1 -0
- package/dist/guard/fonts-hint.js +4 -0
- package/dist/guard/index.d.ts +1 -1
- package/dist/guard/index.d.ts.map +1 -1
- package/dist/guard/index.js +2 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/provider/create-router.d.ts +57 -10
- package/dist/provider/create-router.d.ts.map +1 -1
- package/dist/provider/create-router.js +28 -17
- package/dist/provider/index.d.ts +2 -2
- package/dist/provider/index.d.ts.map +1 -1
- package/dist/provider/index.js +23 -7
- package/dist/query-client.d.ts +2 -62
- package/dist/query-client.d.ts.map +1 -1
- package/dist/query-client.js +13 -18
- package/dist/router-tanstack/nav.d.ts +5 -0
- package/dist/router-tanstack/nav.d.ts.map +1 -1
- package/dist/router-tanstack/search-store-warnings.d.ts +33 -0
- package/dist/router-tanstack/search-store-warnings.d.ts.map +1 -0
- package/dist/router-tanstack/search-store-warnings.js +77 -0
- package/dist/router-tanstack/search-store.d.ts +2 -5
- package/dist/router-tanstack/search-store.d.ts.map +1 -1
- package/dist/router-tanstack/search-store.js +111 -110
- package/dist/router-tanstack/use-nav.d.ts +4 -2
- package/dist/router-tanstack/use-nav.d.ts.map +1 -1
- package/dist/router-tanstack/use-nav.js +55 -18
- package/dist/shell/app-breadcrumbs.d.ts +1 -3
- package/dist/shell/app-breadcrumbs.d.ts.map +1 -1
- package/dist/shell/app-breadcrumbs.js +1 -6
- package/dist/shell/index.d.ts +14 -5
- package/dist/shell/index.d.ts.map +1 -1
- package/dist/shell/index.js +6 -29
- package/dist/shell/nav-types.d.ts +7 -0
- package/dist/shell/nav-types.d.ts.map +1 -1
- package/dist/shell/page-aside.d.ts +4 -2
- package/dist/shell/page-aside.d.ts.map +1 -1
- package/dist/shell/page-aside.js +41 -23
- package/dist/shell/page-bar.d.ts +1 -1
- package/dist/shell/page-bar.d.ts.map +1 -1
- package/dist/shell/page-bar.js +39 -33
- package/dist/telemetry.d.ts +31 -2
- package/dist/telemetry.d.ts.map +1 -1
- package/dist/telemetry.js +32 -12
- package/dist/theme/ctl-theme.d.ts.map +1 -1
- package/dist/theme/ctl-theme.js +17 -30
- package/dist/theme/extend.d.ts +18 -0
- package/dist/theme/extend.d.ts.map +1 -0
- package/dist/theme/extend.js +6 -0
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +44 -84
- package/dist/unwrap.d.ts +29 -0
- package/dist/unwrap.d.ts.map +1 -0
- package/dist/unwrap.js +18 -0
- package/llms.txt +9 -5
- package/package.json +1 -1
- package/src/cli/basalt-install.ts +9 -0
- package/src/cli/check-theme.ts +1 -1
- package/src/cli/doctor-upgrade.ts +40 -61
- package/src/cli/doctor.ts +3 -3
- package/src/cli/index.ts +14 -71
- package/src/cli/provider-tags.ts +38 -0
- package/src/cli/render-imports.ts +104 -0
- package/src/cli/router-wiring.ts +23 -0
- package/src/cli/source-text.ts +39 -0
- package/src/cli/sync.ts +27 -21
- package/src/guard/fonts-hint.ts +2 -0
- package/src/guard/index.ts +2 -2
- package/src/index.ts +4 -2
- package/src/provider/create-router.tsx +103 -39
- package/src/provider/index.tsx +27 -9
- package/src/query-client.ts +20 -78
- package/src/router-tanstack/nav.ts +5 -0
- package/src/router-tanstack/search-store-warnings.ts +120 -0
- package/src/router-tanstack/search-store.ts +200 -206
- package/src/router-tanstack/use-nav.ts +116 -76
- package/src/shell/app-breadcrumbs.tsx +1 -12
- package/src/shell/index.tsx +22 -55
- package/src/shell/nav-types.ts +8 -0
- package/src/shell/page-aside.tsx +59 -26
- package/src/shell/page-bar.tsx +63 -59
- package/src/telemetry.ts +71 -13
- package/src/theme/__snapshots__/plain-theme.test.ts.snap +2354 -0
- package/src/theme/ctl-theme.tsx +20 -19
- package/src/theme/extend.ts +18 -0
- package/src/theme/index.ts +50 -49
- package/src/unwrap.ts +44 -0
|
@@ -1,33 +1,29 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useEffect, useRef } from "react";
|
|
2
|
+
import { useNavigate, useRouter, useRouterState, useSearch } from "@tanstack/react-router";
|
|
2
3
|
import { createStoreCore } from "../state/fields.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
);
|
|
8
|
-
}
|
|
9
|
-
function useCurrentSearch() {
|
|
10
|
-
const search = useSearch({ strict: false });
|
|
11
|
-
return typeof search === "object" && search !== null ? search : {};
|
|
4
|
+
import { createStoreWarnings } from "./search-store-warnings.js";
|
|
5
|
+
let hydrationDone = false;
|
|
6
|
+
function resetHydrationForTests() {
|
|
7
|
+
hydrationDone = false;
|
|
12
8
|
}
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
const isDehydrating = () => typeof window !== "undefined" && "$_TSR" in window && !hydrationDone;
|
|
10
|
+
function reportFailure(error) {
|
|
11
|
+
if (typeof reportError === "function") reportError(error);
|
|
12
|
+
else
|
|
13
|
+
queueMicrotask(() => {
|
|
14
|
+
throw error;
|
|
15
|
+
});
|
|
15
16
|
}
|
|
16
|
-
function
|
|
17
|
-
const {
|
|
18
|
-
|
|
19
|
-
`[basalt-ui] createSearchStore('${key}'): wrote field '${name}' from a route that does not validate \`${param}\`, and the field is \`persist: false\` \u2014 so the write was dropped. Either render this control on the route wired to \`validateSearch\`, or give the field the localStorage lane (drop \`persist: false\`) so a write from elsewhere survives until the owning route reads it. (dev only)`
|
|
20
|
-
);
|
|
17
|
+
function navigateSearch(navigate, search, replace) {
|
|
18
|
+
const result = navigate({ to: ".", search, replace, resetScroll: false });
|
|
19
|
+
if (result !== void 0) result.catch(reportFailure);
|
|
21
20
|
}
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
return `basalt-ui: createSearchStore('${key}'): set('${name}', \u2026, { patch }) carries \`${param}\`, which this store's field '${owner}' owns \u2014 the URL would take it while the localStorage mirror kept the old value, so the next paramless visit and every \`linkSearch\` link disagree with the page the write happened on. Write it through \`field.${owner}.use()[1]\` instead; a \`patch\` is for keys the store does NOT own.`;
|
|
21
|
+
function isRecord(value) {
|
|
22
|
+
return typeof value === "object" && value !== null;
|
|
25
23
|
}
|
|
26
|
-
function
|
|
27
|
-
const {
|
|
28
|
-
|
|
29
|
-
`[basalt-ui] createSearchStore('${key}'): wrote field '${name}' with a \`patch\` from a route that does not validate \`${param}\` \u2014 the field's value persisted (A1), but the patch was DROPPED: there is no navigate to merge it into. Render the control on the route wired to \`validateSearch\`, or apply that sibling param on the route that owns it. (dev only)`
|
|
30
|
-
);
|
|
24
|
+
function useCurrentSearch() {
|
|
25
|
+
const search = useSearch({ strict: false });
|
|
26
|
+
return isRecord(search) ? search : {};
|
|
31
27
|
}
|
|
32
28
|
function assertNoLazyUrlFallback(key, fields) {
|
|
33
29
|
for (const [name, f] of Object.entries(fields)) {
|
|
@@ -50,17 +46,14 @@ function assertResetsNotOwned(input) {
|
|
|
50
46
|
function isMemoryLane(entry) {
|
|
51
47
|
return !entry.codec.lane.url && !entry.codec.lane.persist;
|
|
52
48
|
}
|
|
53
|
-
function
|
|
49
|
+
function createSearchStore(o) {
|
|
54
50
|
assertNoLazyUrlFallback(o.key, o.fields);
|
|
55
51
|
const core = createStoreCore(o);
|
|
56
52
|
let readerWired = false;
|
|
57
|
-
let warned = false;
|
|
58
53
|
const markReaderWired = () => {
|
|
59
54
|
readerWired = true;
|
|
60
55
|
};
|
|
61
|
-
const
|
|
62
|
-
const patchDroppedWarned = /* @__PURE__ */ new Set();
|
|
63
|
-
const patchOwnerLogged = /* @__PURE__ */ new Set();
|
|
56
|
+
const warnings = createStoreWarnings(o.key);
|
|
64
57
|
const paramOwners = /* @__PURE__ */ new Map();
|
|
65
58
|
for (const entry of core.urlEntries) {
|
|
66
59
|
for (const param of entry.codec.params) paramOwners.set(param, entry.name);
|
|
@@ -77,16 +70,12 @@ function buildSearchStore(o) {
|
|
|
77
70
|
const persistedNames = new Set(
|
|
78
71
|
core.entries.filter((entry) => entry.codec.lane.persist).map((entry) => entry.name)
|
|
79
72
|
);
|
|
80
|
-
const
|
|
73
|
+
const mounts = /* @__PURE__ */ new Map();
|
|
81
74
|
const assertPatchNotOwned = (entry, patch) => {
|
|
82
75
|
for (const param of Object.keys(patch)) {
|
|
83
76
|
const owner = paramOwners.get(param);
|
|
84
77
|
if (owner === void 0 || entry.codec.params.includes(param)) continue;
|
|
85
|
-
|
|
86
|
-
if (process.env["NODE_ENV"] !== "production") throw new Error(message);
|
|
87
|
-
if (patchOwnerLogged.has(param)) continue;
|
|
88
|
-
patchOwnerLogged.add(param);
|
|
89
|
-
console.error(message);
|
|
78
|
+
warnings.patchOwned({ name: entry.name, owner, param });
|
|
90
79
|
}
|
|
91
80
|
};
|
|
92
81
|
const flatten = (search, record) => {
|
|
@@ -97,30 +86,33 @@ function buildSearchStore(o) {
|
|
|
97
86
|
return out;
|
|
98
87
|
};
|
|
99
88
|
const maybeWarn = (raw, record) => {
|
|
100
|
-
if (
|
|
89
|
+
if (process.env["NODE_ENV"] === "production" || readerWired) return;
|
|
101
90
|
for (const entry of core.urlEntries) {
|
|
102
91
|
const fromUrl = entry.codec.fromSearch(raw);
|
|
103
92
|
if (fromUrl === null || !entry.codec.equals(fromUrl, entry.codec.fallback)) continue;
|
|
104
|
-
const
|
|
105
|
-
if (
|
|
106
|
-
|
|
107
|
-
warnLinkPinsFallback({
|
|
108
|
-
key: o.key,
|
|
93
|
+
const stored2 = entry.codec.decode(record[entry.name]);
|
|
94
|
+
if (stored2 === null || entry.codec.equals(stored2, fromUrl)) continue;
|
|
95
|
+
warnings.linkPinsFallback({
|
|
109
96
|
param: entry.codec.primary,
|
|
110
|
-
urlValue:
|
|
111
|
-
storedValue:
|
|
97
|
+
urlValue: entry.codec.toSearch(fromUrl)[entry.codec.primary],
|
|
98
|
+
storedValue: entry.codec.toSearch(stored2)[entry.codec.primary]
|
|
112
99
|
});
|
|
113
100
|
return;
|
|
114
101
|
}
|
|
115
102
|
};
|
|
103
|
+
const stored = () => typeof window === "undefined" || isDehydrating() ? {} : core.readRecord();
|
|
116
104
|
const validateSearch = (raw) => {
|
|
117
|
-
const record =
|
|
105
|
+
const record = stored();
|
|
118
106
|
maybeWarn(raw, record);
|
|
119
107
|
return flatten(raw, record);
|
|
120
108
|
};
|
|
109
|
+
const runsStore = (route) => {
|
|
110
|
+
const validate = route?.options.validateSearch;
|
|
111
|
+
return typeof validate === "function" && (validate === validateSearch || Function.prototype.toString.call(validate).includes("validateSearch"));
|
|
112
|
+
};
|
|
121
113
|
const linkSearch = () => {
|
|
122
114
|
readerWired = true;
|
|
123
|
-
return flatten(null,
|
|
115
|
+
return flatten(null, stored());
|
|
124
116
|
};
|
|
125
117
|
const readStored = () => {
|
|
126
118
|
readerWired = true;
|
|
@@ -129,65 +121,72 @@ function buildSearchStore(o) {
|
|
|
129
121
|
const urlUse = (entry) => () => {
|
|
130
122
|
const search = useCurrentSearch();
|
|
131
123
|
const navigate = useNavigate();
|
|
124
|
+
const router = useRouter();
|
|
125
|
+
const pathname = useRouterState({ select: (state) => state.location.pathname });
|
|
132
126
|
const [record, setRecord] = core.usePersistedRecord();
|
|
133
127
|
markReaderWired();
|
|
134
128
|
const value = core.resolve(entry, search, record);
|
|
129
|
+
const hydrating = useRef(isDehydrating());
|
|
135
130
|
const validated = Object.hasOwn(search, entry.codec.primary);
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
131
|
+
useEffect(() => {
|
|
132
|
+
const count = mounts.get(router) ?? 0;
|
|
133
|
+
mounts.set(router, count + 1);
|
|
134
|
+
return () => {
|
|
135
|
+
const left = (mounts.get(router) ?? 1) - 1;
|
|
136
|
+
if (left > 0) mounts.set(router, left);
|
|
137
|
+
else mounts.delete(router);
|
|
138
|
+
};
|
|
139
|
+
}, [router]);
|
|
140
|
+
useEffect(() => {
|
|
141
|
+
if (hydrating.current) hydrationDone = true;
|
|
142
|
+
}, []);
|
|
143
|
+
const mirrored = entry.codec.lane.persist ? entry.codec.decode(record[entry.name]) : null;
|
|
144
|
+
const mirroredKey = mirrored === null ? null : JSON.stringify(entry.codec.toSearch(mirrored));
|
|
145
|
+
useEffect(() => {
|
|
146
|
+
if (!hydrating.current || mirrored === null) return;
|
|
147
|
+
hydrating.current = false;
|
|
148
|
+
if (!validated || entry.codec.equals(mirrored, entry.codec.fallback)) return;
|
|
149
|
+
const urlValue = entry.codec.fromSearch(search);
|
|
150
|
+
if (urlValue !== null && !entry.codec.equals(urlValue, entry.codec.fallback)) return;
|
|
151
|
+
navigateSearch(
|
|
152
|
+
(o2) => router.navigate(o2),
|
|
153
|
+
(prev) => ({ ...prev, ...entry.codec.toSearch(mirrored) }),
|
|
154
|
+
true
|
|
155
|
+
);
|
|
156
|
+
}, [mirroredKey]);
|
|
157
|
+
useEffect(() => {
|
|
158
|
+
if (process.env["NODE_ENV"] === "production") return;
|
|
159
|
+
const { matches } = router.state;
|
|
160
|
+
const leaf = matches.at(-1);
|
|
161
|
+
if (leaf === void 0 || !isRecord(leaf.search)) return;
|
|
162
|
+
if (!Object.hasOwn(leaf.search, entry.codec.primary)) return;
|
|
163
|
+
if (matches.some((match) => runsStore(router.routesById[match.routeId]))) return;
|
|
164
|
+
warnings.foreignParam({ name: entry.name, param: entry.codec.primary, path: leaf.pathname });
|
|
165
|
+
}, [pathname]);
|
|
150
166
|
return [
|
|
151
167
|
value,
|
|
152
168
|
(next, opts) => {
|
|
153
169
|
const patch = opts?.patch;
|
|
154
170
|
if (patch !== void 0 && Object.keys(patch).length > 0) {
|
|
155
171
|
assertPatchNotOwned(entry, patch);
|
|
156
|
-
if (!validated
|
|
157
|
-
patchDroppedWarned.add(entry.name);
|
|
158
|
-
warnPatchDropped({ key: o.key, name: entry.name, param: entry.codec.primary });
|
|
159
|
-
}
|
|
172
|
+
if (!validated) warnings.patchWasDropped({ name: entry.name, param: entry.codec.primary });
|
|
160
173
|
}
|
|
161
|
-
if (validated) {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
// `patch` FIRST, the field's own params last: a patch is for keys the store does not
|
|
165
|
-
// own (clearing a sibling `detailDate` with `undefined`), so it must never be able to
|
|
166
|
-
// overwrite the value this very call is setting.
|
|
167
|
-
// `resets` only when the value moves: a no-op write (a debounced box settling back on
|
|
168
|
-
// what it held) must not throw the reader off the page they are on.
|
|
169
|
-
search: (prev) => ({
|
|
170
|
-
...prev,
|
|
171
|
-
...resetsFor(entry, prev, next),
|
|
172
|
-
...opts?.patch,
|
|
173
|
-
...entry.codec.toSearch(next)
|
|
174
|
-
}),
|
|
175
|
-
replace: entry.codec.lane.history === "replace",
|
|
176
|
-
// A filter lives halfway down a page as often as it lives in the bar, and the router's
|
|
177
|
-
// default scroll restoration treats this same-route search write as a navigation — so
|
|
178
|
-
// without this a select two screens down jumps the reader back to the top on every
|
|
179
|
-
// change. Never a prop: there is no filter write that WANTS the page to scroll.
|
|
180
|
-
resetScroll: false
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
if (entry.codec.lane.persist) {
|
|
184
|
-
core.writeField(setRecord, entry.name, next);
|
|
174
|
+
if (!validated) {
|
|
175
|
+
if (entry.codec.lane.persist) core.writeField(setRecord, entry.name, next);
|
|
176
|
+
else warnings.writeHasNowhereToGo({ name: entry.name, param: entry.codec.primary });
|
|
185
177
|
return;
|
|
186
178
|
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
179
|
+
navigateSearch(
|
|
180
|
+
(o2) => navigate(o2),
|
|
181
|
+
(prev) => ({
|
|
182
|
+
...prev,
|
|
183
|
+
...resetsFor(entry, prev, next),
|
|
184
|
+
...opts?.patch,
|
|
185
|
+
...entry.codec.toSearch(next)
|
|
186
|
+
}),
|
|
187
|
+
entry.codec.lane.history === "replace"
|
|
188
|
+
);
|
|
189
|
+
if (entry.codec.lane.persist) core.writeField(setRecord, entry.name, next);
|
|
191
190
|
}
|
|
192
191
|
];
|
|
193
192
|
};
|
|
@@ -204,8 +203,19 @@ function buildSearchStore(o) {
|
|
|
204
203
|
if (entry.codec.lane.persist) core.clearField(entry.name);
|
|
205
204
|
else if (!entry.codec.lane.url) core.clearMemory(entry.name);
|
|
206
205
|
if (!entry.codec.lane.url) return;
|
|
207
|
-
const
|
|
208
|
-
|
|
206
|
+
for (const router of mounts.keys()) {
|
|
207
|
+
const { search } = router.state.location;
|
|
208
|
+
if (!isRecord(search) || !Object.hasOwn(search, entry.codec.primary)) continue;
|
|
209
|
+
navigateSearch(
|
|
210
|
+
(o2) => router.navigate(o2),
|
|
211
|
+
(prev) => ({
|
|
212
|
+
...prev,
|
|
213
|
+
...resetsFor(entry, prev, entry.codec.fallback),
|
|
214
|
+
...entry.codec.toSearch(entry.codec.fallback)
|
|
215
|
+
}),
|
|
216
|
+
true
|
|
217
|
+
);
|
|
218
|
+
}
|
|
209
219
|
};
|
|
210
220
|
const field = {};
|
|
211
221
|
for (const entry of core.entries) {
|
|
@@ -246,22 +256,16 @@ function buildSearchStore(o) {
|
|
|
246
256
|
for (const entry of validatedEntries) {
|
|
247
257
|
Object.assign(patch, entry.codec.toSearch(entry.codec.fallback));
|
|
248
258
|
}
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
// `clear()`. A `Reset all` with everything already at its fallback must keep the page:
|
|
253
|
-
// this navigate REPLACES, so a page dropped here could not be got back with Back.
|
|
254
|
-
search: (prev) => {
|
|
259
|
+
navigateSearch(
|
|
260
|
+
(o2) => navigate(o2),
|
|
261
|
+
(prev) => {
|
|
255
262
|
const moved = validatedEntries.some(
|
|
256
263
|
(entry) => resetsFor(entry, prev, entry.codec.fallback) !== void 0
|
|
257
264
|
);
|
|
258
265
|
return { ...prev, ...moved ? resetPatch : void 0, ...patch };
|
|
259
266
|
},
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
// sheet must not also scroll the page it was pressed on.
|
|
263
|
-
resetScroll: false
|
|
264
|
-
});
|
|
267
|
+
true
|
|
268
|
+
);
|
|
265
269
|
}
|
|
266
270
|
if (memoryEntries.length > 0) core.resetMemory();
|
|
267
271
|
if (!core.anyPersisted) return;
|
|
@@ -293,10 +297,7 @@ function buildSearchStore(o) {
|
|
|
293
297
|
};
|
|
294
298
|
return store;
|
|
295
299
|
}
|
|
296
|
-
function createSearchStore(o) {
|
|
297
|
-
return buildSearchStore(o);
|
|
298
|
-
}
|
|
299
300
|
export {
|
|
300
|
-
|
|
301
|
-
|
|
301
|
+
createSearchStore,
|
|
302
|
+
resetHydrationForTests
|
|
302
303
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import type { MobileNavConfig, SidebarSection } from '../shell/nav-types.js';
|
|
2
|
+
import type { ActiveCrumb, MobileNavConfig, SidebarSection } from '../shell/nav-types.js';
|
|
3
3
|
import type { AnyNavGroup, AnyNavItem, NavConfig, NavItemId, NavTabId } from './nav.js';
|
|
4
4
|
export type UseNavOptions<G extends ReadonlyArray<AnyNavGroup>> = {
|
|
5
5
|
/**
|
|
@@ -8,7 +8,7 @@ export type UseNavOptions<G extends ReadonlyArray<AnyNavGroup>> = {
|
|
|
8
8
|
* Anything else becomes `item.badge` (desktop only).
|
|
9
9
|
*/
|
|
10
10
|
badges?: Partial<Record<NavItemId<G>, number | ReactNode>>;
|
|
11
|
-
/** Override active detection entirely. */
|
|
11
|
+
/** Override active detection entirely. Keep it stable (module scope or memoized). */
|
|
12
12
|
isActive?: (item: AnyNavItem & {
|
|
13
13
|
id: NavItemId<G>;
|
|
14
14
|
}) => boolean;
|
|
@@ -18,6 +18,8 @@ export type UseNavOptions<G extends ReadonlyArray<AnyNavGroup>> = {
|
|
|
18
18
|
export type ResolvedNav = {
|
|
19
19
|
sections: SidebarSection[];
|
|
20
20
|
mobileNav: MobileNavConfig;
|
|
21
|
+
/** The breadcrumb for the one active destination; `undefined` when nothing matches. */
|
|
22
|
+
activeCrumb: ActiveCrumb | undefined;
|
|
21
23
|
};
|
|
22
24
|
/**
|
|
23
25
|
* Resolve a nav definition against the live router into `BasaltShell`'s internal `ShellFrame`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-nav.d.ts","sourceRoot":"","sources":["../../src/router-tanstack/use-nav.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAqC,SAAS,EAAE,MAAM,OAAO,CAAA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H/D"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createElement, forwardRef, useMemo } from "react";
|
|
1
|
+
import { createElement, forwardRef, useMemo, useState } from "react";
|
|
2
2
|
import { Link, useMatchRoute, useRouterState } from "@tanstack/react-router";
|
|
3
3
|
import { flattenNav } from "./nav-stash.js";
|
|
4
4
|
const OverriddenAnchor = forwardRef((props, ref) => {
|
|
@@ -16,12 +16,58 @@ const OverriddenAnchor = forwardRef((props, ref) => {
|
|
|
16
16
|
});
|
|
17
17
|
});
|
|
18
18
|
OverriddenAnchor.displayName = "OverriddenAnchor";
|
|
19
|
+
const anchorCache = /* @__PURE__ */ new WeakMap();
|
|
20
|
+
function anchorFor(config, item, overridden) {
|
|
21
|
+
let byMode = anchorCache.get(config);
|
|
22
|
+
if (!byMode) anchorCache.set(config, byMode = /* @__PURE__ */ new Map());
|
|
23
|
+
let byId = byMode.get(overridden);
|
|
24
|
+
if (!byId) byMode.set(overridden, byId = /* @__PURE__ */ new Map());
|
|
25
|
+
const cached = byId.get(item.id);
|
|
26
|
+
if (cached) return cached;
|
|
27
|
+
const Anchor = (props) => createElement(Link, {
|
|
28
|
+
...item.link,
|
|
29
|
+
activeOptions: { exact: true, includeSearch: true },
|
|
30
|
+
...overridden && {
|
|
31
|
+
_asChild: OverriddenAnchor,
|
|
32
|
+
"data-basalt-current": props["aria-current"]
|
|
33
|
+
},
|
|
34
|
+
...props
|
|
35
|
+
});
|
|
36
|
+
byId.set(item.id, Anchor);
|
|
37
|
+
return Anchor;
|
|
38
|
+
}
|
|
39
|
+
const NO_BADGES = {};
|
|
40
|
+
function shallowEqual(a = NO_BADGES, b = NO_BADGES) {
|
|
41
|
+
if (a === b) return true;
|
|
42
|
+
const keys = Object.keys(a);
|
|
43
|
+
return keys.length === Object.keys(b).length && keys.every((k) => Object.hasOwn(b, k) && Object.is(a[k], b[k]));
|
|
44
|
+
}
|
|
45
|
+
function crumbOf(config, winnerId, overridden) {
|
|
46
|
+
const find = (items, section, parent) => {
|
|
47
|
+
for (const item of items) {
|
|
48
|
+
if (item.id === winnerId) {
|
|
49
|
+
const parentCrumb = parent && {
|
|
50
|
+
parent: parent.label,
|
|
51
|
+
parentAnchor: anchorFor(config, parent, overridden)
|
|
52
|
+
};
|
|
53
|
+
return { section, page: item.label, ...parentCrumb };
|
|
54
|
+
}
|
|
55
|
+
const nested = item.children && find(item.children, section, item);
|
|
56
|
+
if (nested) return nested;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
for (const group of config.groups) {
|
|
60
|
+
const found = find(group.items, group.label);
|
|
61
|
+
if (found) return found;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
19
64
|
function useNav(config, opts) {
|
|
20
65
|
const matchRoute = useMatchRoute();
|
|
21
66
|
const href = useRouterState({ select: (s) => s.location.href });
|
|
22
|
-
const badges = opts?.badges;
|
|
67
|
+
const [badges, setBadges] = useState(opts?.badges);
|
|
68
|
+
if (!shallowEqual(badges, opts?.badges)) setBadges(opts?.badges);
|
|
23
69
|
const isActiveOverride = opts?.isActive;
|
|
24
|
-
const
|
|
70
|
+
const resolved = useMemo(() => {
|
|
25
71
|
const badgeOf = (id) => badges?.[id];
|
|
26
72
|
const matchOf = (item) => isActiveOverride?.(item) ?? Boolean(
|
|
27
73
|
matchRoute({
|
|
@@ -49,16 +95,9 @@ function useNav(config, opts) {
|
|
|
49
95
|
const ancestor = winnerTo !== void 0 && matched && winnerTo.startsWith(`${item.link.to}/`);
|
|
50
96
|
return { active: false, ancestor };
|
|
51
97
|
};
|
|
98
|
+
const overridden = isActiveOverride !== void 0;
|
|
52
99
|
const toSidebarItem = (item) => {
|
|
53
|
-
const Anchor = (
|
|
54
|
-
...item.link,
|
|
55
|
-
activeOptions: { exact: true, includeSearch: true },
|
|
56
|
-
...isActiveOverride !== void 0 && {
|
|
57
|
-
_asChild: OverriddenAnchor,
|
|
58
|
-
"data-basalt-current": props["aria-current"]
|
|
59
|
-
},
|
|
60
|
-
...props
|
|
61
|
-
});
|
|
100
|
+
const Anchor = anchorFor(config, item, overridden);
|
|
62
101
|
const badge = badgeOf(item.id);
|
|
63
102
|
const children = item.children?.map(toSidebarItem);
|
|
64
103
|
const { active, ancestor } = resolveState(item);
|
|
@@ -67,10 +106,7 @@ function useNav(config, opts) {
|
|
|
67
106
|
label: item.label,
|
|
68
107
|
icon: item.icon,
|
|
69
108
|
Anchor,
|
|
70
|
-
// Exactly one destination
|
|
71
|
-
// Rolling that up into a mobile SLOT (any descendant active → the slot reads active) is
|
|
72
|
-
// still `projectMobileNav`'s job, which reads `children` for that. `ancestor` is the
|
|
73
|
-
// desktop-only middle state: a matched item that sits on the winner's path but isn't it.
|
|
109
|
+
// Exactly one destination reads `active`; `projectMobileNav` rolls it up into mobile slots.
|
|
74
110
|
active,
|
|
75
111
|
...ancestor && { ancestor },
|
|
76
112
|
...item.short !== void 0 && { short: item.short },
|
|
@@ -80,7 +116,7 @@ function useNav(config, opts) {
|
|
|
80
116
|
...children !== void 0 && { children }
|
|
81
117
|
};
|
|
82
118
|
};
|
|
83
|
-
|
|
119
|
+
const sections = config.groups.map((group) => ({
|
|
84
120
|
label: group.label,
|
|
85
121
|
items: group.items.map(toSidebarItem),
|
|
86
122
|
...group.icon !== void 0 && { icon: group.icon },
|
|
@@ -88,6 +124,7 @@ function useNav(config, opts) {
|
|
|
88
124
|
...group.defaultCollapsed !== void 0 && { defaultCollapsed: group.defaultCollapsed },
|
|
89
125
|
...group.mobile !== void 0 && { mobile: group.mobile }
|
|
90
126
|
}));
|
|
127
|
+
return { sections, activeCrumb: crumbOf(config, winnerId, overridden) };
|
|
91
128
|
}, [config, matchRoute, href, badges, isActiveOverride]);
|
|
92
129
|
const mobile = config.mobile;
|
|
93
130
|
const getScrollElement = opts?.getScrollElement;
|
|
@@ -105,7 +142,7 @@ function useNav(config, opts) {
|
|
|
105
142
|
...getScrollElement !== void 0 && { getScrollElement }
|
|
106
143
|
};
|
|
107
144
|
}, [config, mobile, getScrollElement]);
|
|
108
|
-
return {
|
|
145
|
+
return { ...resolved, mobileNav };
|
|
109
146
|
}
|
|
110
147
|
export {
|
|
111
148
|
useNav
|
|
@@ -9,9 +9,7 @@ export type AppBreadcrumbsProps = BasaltProps & {
|
|
|
9
9
|
* client-side. basalt still owns every pixel of the crumb — the anchor only hosts the label.
|
|
10
10
|
*/
|
|
11
11
|
parentAnchor?: NavAnchor | undefined;
|
|
12
|
-
/** Parent item href — the no-router fallback; ignored when `parentAnchor` is present. */
|
|
13
|
-
parentHref?: string | undefined;
|
|
14
12
|
page?: string;
|
|
15
13
|
};
|
|
16
|
-
export declare function AppBreadcrumbs({ section, parent, parentAnchor,
|
|
14
|
+
export declare function AppBreadcrumbs({ section, parent, parentAnchor, page, className, style, }: AppBreadcrumbsProps): import("react").JSX.Element | null;
|
|
17
15
|
//# sourceMappingURL=app-breadcrumbs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-breadcrumbs.d.ts","sourceRoot":"","sources":["../../src/shell/app-breadcrumbs.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAE5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAkBlD,MAAM,MAAM,mBAAmB,GAAG,WAAW,GAAG;IAC9C,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,2FAA2F;IAC3F,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B;;;OAGG;IACH,YAAY,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IACpC,
|
|
1
|
+
{"version":3,"file":"app-breadcrumbs.d.ts","sourceRoot":"","sources":["../../src/shell/app-breadcrumbs.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAE5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAkBlD,MAAM,MAAM,mBAAmB,GAAG,WAAW,GAAG;IAC9C,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,2FAA2F;IAC3F,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B;;;OAGG;IACH,YAAY,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IACpC,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,MAAM,EACN,YAAY,EACZ,IAAI,EACJ,SAAS,EACT,KAAK,GACN,EAAE,mBAAmB,sCAkDrB"}
|
|
@@ -15,7 +15,6 @@ function AppBreadcrumbs({
|
|
|
15
15
|
section,
|
|
16
16
|
parent,
|
|
17
17
|
parentAnchor,
|
|
18
|
-
parentHref,
|
|
19
18
|
page,
|
|
20
19
|
className,
|
|
21
20
|
style
|
|
@@ -38,11 +37,7 @@ function AppBreadcrumbs({
|
|
|
38
37
|
/* @__PURE__ */ jsx(Anchor, { style: crumbStyle, underline: "never", component: parentAnchor, truncate: true, children: parent }),
|
|
39
38
|
/* @__PURE__ */ jsx(Text, { style: separatorStyle, children: "/" })
|
|
40
39
|
] }),
|
|
41
|
-
parent && !parentAnchor &&
|
|
42
|
-
/* @__PURE__ */ jsx(Anchor, { style: crumbStyle, underline: "never", href: parentHref, truncate: true, children: parent }),
|
|
43
|
-
/* @__PURE__ */ jsx(Text, { style: separatorStyle, children: "/" })
|
|
44
|
-
] }),
|
|
45
|
-
parent && !parentAnchor && !parentHref && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
40
|
+
parent && !parentAnchor && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
46
41
|
/* @__PURE__ */ jsx(Text, { style: crumbStyle, truncate: true, children: parent }),
|
|
47
42
|
/* @__PURE__ */ jsx(Text, { style: separatorStyle, children: "/" })
|
|
48
43
|
] })
|
package/dist/shell/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { BasaltProps } from '../common/props.js';
|
|
|
3
3
|
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
|
-
import type { MobileNavConfig, NavAnchor, SidebarBlock, SidebarSection } from './nav-types.js';
|
|
6
|
+
import type { ActiveCrumb, MobileNavConfig, NavAnchor, SidebarBlock, SidebarSection } from './nav-types.js';
|
|
7
7
|
import type { UseNavOptions } from '../router-tanstack/use-nav.js';
|
|
8
8
|
import type { AnyNavGroup, NavConfig, NavTabId } from '../router-tanstack/nav.js';
|
|
9
9
|
export { AppSidebar, type AppSidebarProps } from './app-sidebar.js';
|
|
@@ -74,7 +74,8 @@ export type ShellBaseProps = BasaltProps & {
|
|
|
74
74
|
* the rest fold into the header's single kebab (`mobile: 'bar' | 'more' | 'hidden'`, see
|
|
75
75
|
* `GlobalAction`). That kebab is the SAME one `PageBar`'s ROW 1 opens — a route whose bar has
|
|
76
76
|
* row-1 actions (or `filtersEnd`) lends it, any other route gets it from the shell. An
|
|
77
|
-
* `ActionGroup` a consumer mounts in some other home never inherits these rows.
|
|
77
|
+
* `ActionGroup` a consumer mounts in some other home never inherits these rows. Keep the array
|
|
78
|
+
* stable (module scope or memoized): a new one every render re-derives the header and kebab.
|
|
78
79
|
*/
|
|
79
80
|
globalActions?: GlobalAction[];
|
|
80
81
|
/**
|
|
@@ -159,9 +160,15 @@ export type BasaltShellProps<G extends ReadonlyArray<AnyNavGroup>, T extends Rea
|
|
|
159
160
|
/**
|
|
160
161
|
* The `defineNav` definition — the ONE nav, resolved against the router here: the sidebar, the
|
|
161
162
|
* mobile bar (its tuning rides `defineNav`'s `mobile`) and the breadcrumb all derive from it.
|
|
162
|
-
* Alongside it: `badges` (a `number` becomes `item.count`, anything else `item.badge`;
|
|
163
|
-
*
|
|
164
|
-
*
|
|
163
|
+
* Alongside it: `badges` (a `number` becomes `item.count`, anything else `item.badge`; an
|
|
164
|
+
* inline `{ … }` literal is fine for numbers and strings, but a JSX `ReactNode` value is a new
|
|
165
|
+
* element every render and rebuilds the sections — memoize it), `isActive` (override active
|
|
166
|
+
* detection) and `getScrollElement` (the mobile bar's scroll container).
|
|
167
|
+
*
|
|
168
|
+
* Define `nav` at module scope: its anchors are cached per config object, so a `defineNav`
|
|
169
|
+
* call inside a component is a new config every render and remounts the links again.
|
|
170
|
+
* `isActive` must likewise be a module-scope or memoized function; a new one every render
|
|
171
|
+
* rebuilds the sections.
|
|
165
172
|
*/
|
|
166
173
|
nav: NavConfig<G, T>;
|
|
167
174
|
};
|
|
@@ -177,6 +184,8 @@ export type ShellFrameProps = ShellBaseProps & {
|
|
|
177
184
|
sections: SidebarSection[];
|
|
178
185
|
/** Mobile bar tuning; every field optional (see `projectMobileNav`'s zero-config fallback). */
|
|
179
186
|
mobileNav?: MobileNavConfig;
|
|
187
|
+
/** The breadcrumb for the active destination, resolved by the nav resolver. */
|
|
188
|
+
activeCrumb: ActiveCrumb | undefined;
|
|
180
189
|
};
|
|
181
190
|
/**
|
|
182
191
|
* @internal Renders resolved `sections`; consumers use `BasaltShell nav` instead.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shell/index.tsx"],"names":[],"mappings":"AAwBA,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,EACf,SAAS,EACT,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shell/index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