streetui 2.6.0 → 2.8.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/dist/bin.cjs +1 -1
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +1 -1
- package/dist/bin.js.map +1 -1
- package/dist/create-bin.cjs +1 -1
- package/dist/create-bin.cjs.map +1 -1
- package/dist/create-bin.js +1 -1
- package/dist/create-bin.js.map +1 -1
- package/dist/{hydration-diagnostics-D1GlzulR.d.cts → hydration-diagnostics-CvttL7mx.d.cts} +3 -3
- package/dist/{hydration-diagnostics-D1GlzulR.d.ts → hydration-diagnostics-CvttL7mx.d.ts} +3 -3
- package/dist/index.cjs +1391 -207
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1031 -15
- package/dist/index.d.ts +1031 -15
- package/dist/index.js +1325 -207
- package/dist/index.js.map +1 -1
- package/dist/{renderer-interface-BzLwBsyj.d.cts → renderer-interface-Cfa1Ts21.d.cts} +1 -1
- package/dist/{renderer-interface-CmVlxE95.d.ts → renderer-interface-WAzq2EVw.d.ts} +1 -1
- package/dist/{server-BP651UK6.d.ts → server-B94YjpnN.d.ts} +1 -1
- package/dist/{server-LJGg4GyH.d.cts → server-C2Wje065.d.cts} +1 -1
- package/dist/server.cjs +8 -1
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +8 -1
- package/dist/server.js.map +1 -1
- package/dist/testing.cjs +190 -183
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.d.cts +4 -4
- package/dist/testing.d.ts +4 -4
- package/dist/testing.js +190 -183
- package/dist/testing.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -23,11 +23,13 @@ __export(src_exports, {
|
|
|
23
23
|
AppBuilder: () => AppBuilder,
|
|
24
24
|
Application: () => Application,
|
|
25
25
|
ApplicationGraph: () => ApplicationGraph,
|
|
26
|
+
BREAKPOINTS: () => BREAKPOINTS,
|
|
26
27
|
BaseNode: () => BaseNode,
|
|
27
28
|
BrowserDOMAdapter: () => BrowserDOMAdapter,
|
|
28
29
|
CleanupRegistry: () => CleanupRegistry,
|
|
29
30
|
ContainerBuilderImpl: () => ContainerBuilderImpl,
|
|
30
31
|
DEFAULT_PERF_THRESHOLDS: () => DEFAULT_PERF_THRESHOLDS,
|
|
32
|
+
DEFAULT_TOKENS: () => DEFAULT_TOKENS,
|
|
31
33
|
DEVTOOLS_TABS: () => DEVTOOLS_TABS,
|
|
32
34
|
DerivedSignal: () => DerivedSignal,
|
|
33
35
|
DiagnosticCollector: () => DiagnosticCollector,
|
|
@@ -64,21 +66,35 @@ __export(src_exports, {
|
|
|
64
66
|
StreetFrameworkError: () => StreetFrameworkError,
|
|
65
67
|
StreetRenderHandle: () => StreetRenderHandle,
|
|
66
68
|
StreetRendererImpl: () => StreetRendererImpl,
|
|
69
|
+
StyleRegistry: () => StyleRegistry,
|
|
67
70
|
TransitionController: () => TransitionController,
|
|
68
71
|
VERSION: () => VERSION,
|
|
72
|
+
a11y: () => a11y,
|
|
69
73
|
a11yIds: () => a11yIds,
|
|
74
|
+
adoptServerStyles: () => adoptServerStyles,
|
|
75
|
+
animate: () => animate,
|
|
76
|
+
animation: () => animation,
|
|
70
77
|
applyNodeProps: () => applyNodeProps,
|
|
71
78
|
applyProp: () => applyProp,
|
|
79
|
+
backdrop: () => backdrop,
|
|
72
80
|
batch: () => batch,
|
|
73
81
|
bindDomEvent: () => bindDomEvent,
|
|
82
|
+
blockquote: () => blockquote,
|
|
83
|
+
body: () => body,
|
|
74
84
|
browserDOMAdapter: () => browserDOMAdapter,
|
|
85
|
+
button: () => button,
|
|
75
86
|
buttonUpdate: () => buttonUpdate,
|
|
87
|
+
canonicalize: () => canonicalize,
|
|
88
|
+
caption: () => caption,
|
|
89
|
+
center: () => center,
|
|
90
|
+
code: () => code,
|
|
76
91
|
compile: () => compile,
|
|
77
92
|
compileGraph: () => compileGraph,
|
|
78
93
|
component: () => component,
|
|
79
94
|
consoleDiagnosticSink: () => consoleDiagnosticSink,
|
|
80
95
|
consoleHydrationDiagnosticSink: () => consoleHydrationDiagnosticSink,
|
|
81
96
|
containFocus: () => containFocus,
|
|
97
|
+
container: () => container,
|
|
82
98
|
createAnnouncer: () => createAnnouncer,
|
|
83
99
|
createApplication: () => createApplication,
|
|
84
100
|
createAuthSession: () => createAuthSession,
|
|
@@ -97,31 +113,53 @@ __export(src_exports, {
|
|
|
97
113
|
createRuntime: () => createRuntime,
|
|
98
114
|
createStore: () => createStore,
|
|
99
115
|
createStreetEvent: () => createStreetEvent,
|
|
116
|
+
createTheme: () => createTheme,
|
|
117
|
+
createThemeTokens: () => createThemeTokens,
|
|
118
|
+
cssPropName: () => cssPropName,
|
|
119
|
+
cssValue: () => cssValue,
|
|
120
|
+
cx: () => cx,
|
|
121
|
+
defaultThemeStorage: () => defaultThemeStorage,
|
|
100
122
|
defineConfig: () => defineConfig,
|
|
101
123
|
derived: () => derived,
|
|
102
124
|
describeError: () => describeError,
|
|
103
125
|
diagnosePerformance: () => diagnosePerformance,
|
|
126
|
+
dialog: () => dialog,
|
|
127
|
+
dropdown: () => dropdown,
|
|
128
|
+
dropdownItem: () => dropdownItem,
|
|
104
129
|
effect: () => effect,
|
|
105
130
|
email: () => email,
|
|
106
131
|
environment: () => environment,
|
|
107
132
|
escapeHtml: () => escapeHtml,
|
|
108
133
|
escapeHtmlAttr: () => escapeHtmlAttr,
|
|
109
134
|
escapeHtmlText: () => escapeHtmlText,
|
|
135
|
+
fadeTransition: () => fadeTransition,
|
|
136
|
+
field: () => field,
|
|
137
|
+
fieldError: () => fieldError,
|
|
138
|
+
fieldHelp: () => fieldHelp,
|
|
139
|
+
fieldLabel: () => fieldLabel,
|
|
110
140
|
flushSync: () => flushSync,
|
|
111
141
|
focusById: () => focusById,
|
|
112
142
|
focusFirst: () => focusFirst,
|
|
113
143
|
focusInitial: () => focusInitial,
|
|
144
|
+
focusRing: () => focusRing,
|
|
145
|
+
form: () => form,
|
|
114
146
|
formatDiagnostic: () => formatDiagnostic,
|
|
115
147
|
formatDiagnosticContext: () => formatDiagnosticContext,
|
|
116
148
|
formatHydrationDiagnostic: () => formatHydrationDiagnostic,
|
|
117
149
|
frameworkError: () => frameworkError,
|
|
118
150
|
generateApplicationId: () => generateApplicationId,
|
|
151
|
+
generateCSS: () => generateCSS,
|
|
119
152
|
generateNodeId: () => generateNodeId,
|
|
120
153
|
getFocusable: () => getFocusable,
|
|
121
154
|
getResolvedTransition: () => getResolvedTransition,
|
|
122
155
|
globalEventBus: () => globalEventBus,
|
|
156
|
+
grid: () => grid,
|
|
157
|
+
hashIdentity: () => hashIdentity,
|
|
158
|
+
heading: () => heading,
|
|
123
159
|
headingUpdate: () => headingUpdate,
|
|
124
160
|
hydrateGraph: () => hydrateGraph,
|
|
161
|
+
identityOf: () => identityOf,
|
|
162
|
+
input: () => input,
|
|
125
163
|
inputUpdate: () => inputUpdate,
|
|
126
164
|
inspectApplication: () => inspectApplication,
|
|
127
165
|
inspectComponents: () => inspectComponents,
|
|
@@ -142,7 +180,11 @@ __export(src_exports, {
|
|
|
142
180
|
isComponentDefinition: () => isComponentDefinition,
|
|
143
181
|
isHeadContribution: () => isHeadContribution,
|
|
144
182
|
isTransitionConfig: () => isTransitionConfig,
|
|
183
|
+
label: () => label,
|
|
184
|
+
layout: () => layout,
|
|
185
|
+
link: () => link,
|
|
145
186
|
linkUpdate: () => linkUpdate,
|
|
187
|
+
list: () => list,
|
|
146
188
|
matchPattern: () => matchPattern,
|
|
147
189
|
matchRoutes: () => matchRoutes,
|
|
148
190
|
maxLength: () => maxLength,
|
|
@@ -157,13 +199,18 @@ __export(src_exports, {
|
|
|
157
199
|
normalizePath: () => normalizePath,
|
|
158
200
|
observerCount: () => observerCount,
|
|
159
201
|
onEscape: () => onEscape,
|
|
202
|
+
overlay: () => overlay,
|
|
160
203
|
patchNode: () => patchNode,
|
|
161
204
|
patchProp: () => patchProp,
|
|
162
205
|
pattern: () => pattern,
|
|
206
|
+
popover: () => popover,
|
|
207
|
+
pre: () => pre,
|
|
163
208
|
printDiagnostics: () => printDiagnostics,
|
|
164
209
|
printGraph: () => printGraph,
|
|
165
210
|
reactiveListItemKey: () => reactiveListItemKey,
|
|
166
211
|
reactiveListItemSignature: () => reactiveListItemSignature,
|
|
212
|
+
reactiveVarName: () => reactiveVarName,
|
|
213
|
+
reactiveVarValue: () => reactiveVarValue,
|
|
167
214
|
readState: () => readState,
|
|
168
215
|
reconcileChildren: () => reconcileChildren,
|
|
169
216
|
reconcileChildrenByPlan: () => reconcileChildrenByPlan,
|
|
@@ -171,6 +218,7 @@ __export(src_exports, {
|
|
|
171
218
|
renderDevToolsReport: () => renderDevToolsReport,
|
|
172
219
|
renderHead: () => renderHead,
|
|
173
220
|
renderInteractiveDevTools: () => renderInteractiveDevTools,
|
|
221
|
+
renderStyles: () => renderStyles,
|
|
174
222
|
renderToString: () => renderToString,
|
|
175
223
|
reportDiagnostic: () => reportDiagnostic,
|
|
176
224
|
reportError: () => reportError,
|
|
@@ -183,9 +231,11 @@ __export(src_exports, {
|
|
|
183
231
|
restoreFocus: () => restoreFocus,
|
|
184
232
|
routerOutlet: () => routerOutlet,
|
|
185
233
|
rovingMenu: () => rovingMenu,
|
|
234
|
+
row: () => row,
|
|
186
235
|
runElementTransition: () => runElementTransition,
|
|
187
236
|
runValidators: () => runValidators,
|
|
188
237
|
saveFocus: () => saveFocus,
|
|
238
|
+
scaleTransition: () => scaleTransition,
|
|
189
239
|
scheduleImmediate: () => scheduleImmediate,
|
|
190
240
|
scheduleUpdate: () => scheduleUpdate,
|
|
191
241
|
scheduler: () => scheduler,
|
|
@@ -195,13 +245,29 @@ __export(src_exports, {
|
|
|
195
245
|
serverDOMAdapter: () => serverDOMAdapter,
|
|
196
246
|
signal: () => signal,
|
|
197
247
|
signalKind: () => signalKind,
|
|
248
|
+
skipLink: () => skipLink,
|
|
249
|
+
slideTransition: () => slideTransition,
|
|
250
|
+
spacer: () => spacer,
|
|
198
251
|
splitTarget: () => splitTarget,
|
|
252
|
+
stack: () => stack,
|
|
253
|
+
stateAttr: () => stateAttr,
|
|
199
254
|
streetui: () => streetui,
|
|
255
|
+
style: () => style,
|
|
256
|
+
styleRegistry: () => styleRegistry,
|
|
257
|
+
styleVariants: () => styleVariants,
|
|
258
|
+
styleWithVars: () => styleWithVars,
|
|
259
|
+
text: () => text,
|
|
200
260
|
textUpdate: () => textUpdate,
|
|
201
261
|
toIdToken: () => toIdToken,
|
|
262
|
+
toast: () => toast,
|
|
263
|
+
tokens: () => tokens,
|
|
264
|
+
tooltip: () => tooltip,
|
|
202
265
|
transformGraph: () => transformGraph,
|
|
266
|
+
transition: () => transition,
|
|
267
|
+
transitions: () => transitions,
|
|
203
268
|
trapFocus: () => trapFocus,
|
|
204
269
|
validateGraph: () => validateGraph,
|
|
270
|
+
visuallyHidden: () => visuallyHidden,
|
|
205
271
|
wireComponentBehavior: () => wireComponentBehavior,
|
|
206
272
|
wireEvents: () => wireEvents,
|
|
207
273
|
wireHeadBehavior: () => wireHeadBehavior,
|
|
@@ -212,7 +278,7 @@ __export(src_exports, {
|
|
|
212
278
|
module.exports = __toCommonJS(src_exports);
|
|
213
279
|
|
|
214
280
|
// src/version.ts
|
|
215
|
-
var VERSION = "2.
|
|
281
|
+
var VERSION = "2.8.0";
|
|
216
282
|
|
|
217
283
|
// ../state/src/signal.ts
|
|
218
284
|
var _activeConsumer = null;
|
|
@@ -615,13 +681,13 @@ var HttpError = class extends Error {
|
|
|
615
681
|
statusText;
|
|
616
682
|
url;
|
|
617
683
|
body;
|
|
618
|
-
constructor(status, statusText, url,
|
|
684
|
+
constructor(status, statusText, url, body2) {
|
|
619
685
|
super(`HTTP ${status} ${statusText} for ${url}`);
|
|
620
686
|
this.name = "HttpError";
|
|
621
687
|
this.status = status;
|
|
622
688
|
this.statusText = statusText;
|
|
623
689
|
this.url = url;
|
|
624
|
-
this.body =
|
|
690
|
+
this.body = body2;
|
|
625
691
|
}
|
|
626
692
|
};
|
|
627
693
|
function joinUrl(baseUrl, path) {
|
|
@@ -639,20 +705,20 @@ function withQuery(url, query) {
|
|
|
639
705
|
return url.includes("?") ? `${url}&${qs}` : `${url}?${qs}`;
|
|
640
706
|
}
|
|
641
707
|
function createClient(config = {}) {
|
|
642
|
-
const doFetch = config.fetch ?? ((
|
|
708
|
+
const doFetch = config.fetch ?? ((input2, init) => {
|
|
643
709
|
if (typeof fetch === "undefined") {
|
|
644
710
|
throw new Error("createClient: no global fetch; pass { fetch } explicitly");
|
|
645
711
|
}
|
|
646
|
-
return fetch(
|
|
712
|
+
return fetch(input2, init);
|
|
647
713
|
});
|
|
648
|
-
async function request(method, path,
|
|
714
|
+
async function request(method, path, body2, reqConfig = {}) {
|
|
649
715
|
const url = withQuery(joinUrl(config.baseUrl, path), reqConfig.query);
|
|
650
716
|
const headers = { ...config.headers, ...reqConfig.headers };
|
|
651
717
|
const init = { method, headers };
|
|
652
718
|
if (reqConfig.signal !== void 0) init.signal = reqConfig.signal;
|
|
653
|
-
if (
|
|
719
|
+
if (body2 !== void 0) {
|
|
654
720
|
if (headers["Content-Type"] === void 0) headers["Content-Type"] = "application/json";
|
|
655
|
-
init.body = JSON.stringify(
|
|
721
|
+
init.body = JSON.stringify(body2);
|
|
656
722
|
}
|
|
657
723
|
const response = await doFetch(url, init);
|
|
658
724
|
const parsed = await parseBody(response);
|
|
@@ -679,17 +745,17 @@ function createClient(config = {}) {
|
|
|
679
745
|
};
|
|
680
746
|
}
|
|
681
747
|
async function parseBody(response) {
|
|
682
|
-
const
|
|
683
|
-
if (
|
|
748
|
+
const text2 = await response.text();
|
|
749
|
+
if (text2 === "") return void 0;
|
|
684
750
|
const type = response.headers.get("content-type") ?? "";
|
|
685
751
|
if (type.includes("application/json")) {
|
|
686
752
|
try {
|
|
687
|
-
return JSON.parse(
|
|
753
|
+
return JSON.parse(text2);
|
|
688
754
|
} catch {
|
|
689
|
-
return
|
|
755
|
+
return text2;
|
|
690
756
|
}
|
|
691
757
|
}
|
|
692
|
-
return
|
|
758
|
+
return text2;
|
|
693
759
|
}
|
|
694
760
|
|
|
695
761
|
// ../state/src/auth.ts
|
|
@@ -920,14 +986,14 @@ var DiagnosticCollector = class {
|
|
|
920
986
|
get hasWarnings() {
|
|
921
987
|
return this._diagnostics.some((d) => d.severity === "warning");
|
|
922
988
|
}
|
|
923
|
-
error(
|
|
924
|
-
this._diagnostics.push({ severity: "error", code, message, location: location ?? void 0, cause: cause ?? void 0 });
|
|
989
|
+
error(code2, message, location, cause) {
|
|
990
|
+
this._diagnostics.push({ severity: "error", code: code2, message, location: location ?? void 0, cause: cause ?? void 0 });
|
|
925
991
|
}
|
|
926
|
-
warn(
|
|
927
|
-
this._diagnostics.push({ severity: "warning", code, message, location: location ?? void 0, cause: void 0 });
|
|
992
|
+
warn(code2, message, location) {
|
|
993
|
+
this._diagnostics.push({ severity: "warning", code: code2, message, location: location ?? void 0, cause: void 0 });
|
|
928
994
|
}
|
|
929
|
-
info(
|
|
930
|
-
this._diagnostics.push({ severity: "info", code, message, location: location ?? void 0, cause: void 0 });
|
|
995
|
+
info(code2, message, location) {
|
|
996
|
+
this._diagnostics.push({ severity: "info", code: code2, message, location: location ?? void 0, cause: void 0 });
|
|
931
997
|
}
|
|
932
998
|
merge(other) {
|
|
933
999
|
for (const d of other.diagnostics) {
|
|
@@ -1068,11 +1134,11 @@ function safeStringify(value) {
|
|
|
1068
1134
|
if (typeof value === "string") return value;
|
|
1069
1135
|
if (value === null) return "null";
|
|
1070
1136
|
if (value === void 0) return "undefined";
|
|
1071
|
-
const
|
|
1072
|
-
if (
|
|
1137
|
+
const t6 = typeof value;
|
|
1138
|
+
if (t6 === "number" || t6 === "boolean" || t6 === "bigint" || t6 === "symbol") {
|
|
1073
1139
|
return String(value);
|
|
1074
1140
|
}
|
|
1075
|
-
const ctor =
|
|
1141
|
+
const ctor = t6 === "object" && value !== null ? value.constructor?.name ?? "Object" : t6;
|
|
1076
1142
|
return `[non-Error ${ctor}]`;
|
|
1077
1143
|
}
|
|
1078
1144
|
function describeError(error, context, options = {}) {
|
|
@@ -1084,6 +1150,884 @@ function reportError(sink, error, context, options = {}) {
|
|
|
1084
1150
|
return report;
|
|
1085
1151
|
}
|
|
1086
1152
|
|
|
1153
|
+
// ../core/src/styling/canonical.ts
|
|
1154
|
+
var LENGTH_PROPS = /* @__PURE__ */ new Set([
|
|
1155
|
+
"inset",
|
|
1156
|
+
"top",
|
|
1157
|
+
"right",
|
|
1158
|
+
"bottom",
|
|
1159
|
+
"left",
|
|
1160
|
+
"width",
|
|
1161
|
+
"minWidth",
|
|
1162
|
+
"maxWidth",
|
|
1163
|
+
"height",
|
|
1164
|
+
"minHeight",
|
|
1165
|
+
"maxHeight",
|
|
1166
|
+
"margin",
|
|
1167
|
+
"marginTop",
|
|
1168
|
+
"marginRight",
|
|
1169
|
+
"marginBottom",
|
|
1170
|
+
"marginLeft",
|
|
1171
|
+
"padding",
|
|
1172
|
+
"paddingTop",
|
|
1173
|
+
"paddingRight",
|
|
1174
|
+
"paddingBottom",
|
|
1175
|
+
"paddingLeft",
|
|
1176
|
+
"gap",
|
|
1177
|
+
"rowGap",
|
|
1178
|
+
"columnGap",
|
|
1179
|
+
"flexBasis",
|
|
1180
|
+
"borderWidth",
|
|
1181
|
+
"borderRadius",
|
|
1182
|
+
"fontSize",
|
|
1183
|
+
"letterSpacing"
|
|
1184
|
+
]);
|
|
1185
|
+
function cssPropName(camel) {
|
|
1186
|
+
if (camel.startsWith("--")) return camel;
|
|
1187
|
+
return camel.replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`);
|
|
1188
|
+
}
|
|
1189
|
+
function cssValue(prop, value) {
|
|
1190
|
+
if (typeof value === "number") {
|
|
1191
|
+
if (value === 0) return "0";
|
|
1192
|
+
return LENGTH_PROPS.has(prop) ? `${value}px` : String(value);
|
|
1193
|
+
}
|
|
1194
|
+
return value;
|
|
1195
|
+
}
|
|
1196
|
+
function sortDeep(value) {
|
|
1197
|
+
if (Array.isArray(value)) return value.map(sortDeep);
|
|
1198
|
+
if (value !== null && typeof value === "object") {
|
|
1199
|
+
const out = {};
|
|
1200
|
+
for (const key of Object.keys(value).sort()) {
|
|
1201
|
+
const v = value[key];
|
|
1202
|
+
if (v === void 0) continue;
|
|
1203
|
+
out[key] = sortDeep(v);
|
|
1204
|
+
}
|
|
1205
|
+
return out;
|
|
1206
|
+
}
|
|
1207
|
+
return value;
|
|
1208
|
+
}
|
|
1209
|
+
function canonicalize(def) {
|
|
1210
|
+
return JSON.stringify(sortDeep(def));
|
|
1211
|
+
}
|
|
1212
|
+
function hashIdentity(canonical) {
|
|
1213
|
+
let h1 = 2166136261;
|
|
1214
|
+
let h2 = 16777619 ^ canonical.length;
|
|
1215
|
+
for (let i = 0; i < canonical.length; i++) {
|
|
1216
|
+
const c = canonical.charCodeAt(i);
|
|
1217
|
+
h1 ^= c;
|
|
1218
|
+
h1 = Math.imul(h1, 16777619);
|
|
1219
|
+
h2 = Math.imul(h2 ^ c, 2246822507);
|
|
1220
|
+
}
|
|
1221
|
+
const a = (h1 >>> 0).toString(36);
|
|
1222
|
+
const b = (h2 >>> 0).toString(36);
|
|
1223
|
+
return `s-${a}${b}`;
|
|
1224
|
+
}
|
|
1225
|
+
function identityOf(def) {
|
|
1226
|
+
const canonical = canonicalize(def);
|
|
1227
|
+
return { canonical, id: hashIdentity(canonical) };
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
// ../core/src/styling/registry.ts
|
|
1231
|
+
var BAND_ORDER = ["tokens", "base", "responsive", "state", "variant"];
|
|
1232
|
+
var StyleRegistry = class {
|
|
1233
|
+
_entries = /* @__PURE__ */ new Map();
|
|
1234
|
+
_seq = 0;
|
|
1235
|
+
/** True once the registry has adopted a server-emitted stylesheet (§12). */
|
|
1236
|
+
_adopted = false;
|
|
1237
|
+
/**
|
|
1238
|
+
* Register (idempotently) the CSS for a style identity. Returns the identity so
|
|
1239
|
+
* callers can chain. Re-registering an existing id with the same css is a no-op;
|
|
1240
|
+
* with different css it keeps the first registration (identity is content-derived,
|
|
1241
|
+
* so this cannot happen for honest input and signals a hash collision if it does).
|
|
1242
|
+
*/
|
|
1243
|
+
register(id, band, css) {
|
|
1244
|
+
const existing = this._entries.get(id);
|
|
1245
|
+
if (existing !== void 0) return id;
|
|
1246
|
+
this._entries.set(id, { id, band, css, seq: this._seq++ });
|
|
1247
|
+
return id;
|
|
1248
|
+
}
|
|
1249
|
+
/** Whether an identity is already present (server-adopted or locally registered). */
|
|
1250
|
+
has(id) {
|
|
1251
|
+
return this._entries.has(id);
|
|
1252
|
+
}
|
|
1253
|
+
/** Number of distinct rules held (bounded by source diversity, not instances). */
|
|
1254
|
+
get size() {
|
|
1255
|
+
return this._entries.size;
|
|
1256
|
+
}
|
|
1257
|
+
/**
|
|
1258
|
+
* Seed the registry from identities a server stylesheet already shipped (§12).
|
|
1259
|
+
* We only need the *keys* to avoid re-emitting duplicates; the rule text is
|
|
1260
|
+
* already in the adopted `<style>` element, so a placeholder css is stored.
|
|
1261
|
+
*/
|
|
1262
|
+
adoptServerIdentities(ids) {
|
|
1263
|
+
for (const id of ids) {
|
|
1264
|
+
if (!this._entries.has(id)) {
|
|
1265
|
+
this._entries.set(id, { id, band: "base", css: "", seq: this._seq++ });
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1268
|
+
this._adopted = true;
|
|
1269
|
+
}
|
|
1270
|
+
get adopted() {
|
|
1271
|
+
return this._adopted;
|
|
1272
|
+
}
|
|
1273
|
+
/** Serialize all rules to a single CSS string in deterministic band order. */
|
|
1274
|
+
serializeCSS() {
|
|
1275
|
+
if (this._entries.size === 0) return "";
|
|
1276
|
+
const byBand = {
|
|
1277
|
+
tokens: [],
|
|
1278
|
+
base: [],
|
|
1279
|
+
responsive: [],
|
|
1280
|
+
state: [],
|
|
1281
|
+
variant: []
|
|
1282
|
+
};
|
|
1283
|
+
for (const e of this._entries.values()) {
|
|
1284
|
+
if (e.css.length > 0) byBand[e.band].push(e);
|
|
1285
|
+
}
|
|
1286
|
+
let out = "";
|
|
1287
|
+
for (const band of BAND_ORDER) {
|
|
1288
|
+
const list2 = byBand[band].sort((a, b) => a.seq - b.seq);
|
|
1289
|
+
for (const e of list2) out += e.css;
|
|
1290
|
+
}
|
|
1291
|
+
return out;
|
|
1292
|
+
}
|
|
1293
|
+
/** The ordered list of identities present (for the `data-streetui-css-keys` attr). */
|
|
1294
|
+
identities() {
|
|
1295
|
+
return [...this._entries.values()].sort((a, b) => a.seq - b.seq).map((e) => e.id);
|
|
1296
|
+
}
|
|
1297
|
+
/** Clear everything — test isolation and per-process reset only. */
|
|
1298
|
+
reset() {
|
|
1299
|
+
this._entries.clear();
|
|
1300
|
+
this._seq = 0;
|
|
1301
|
+
this._adopted = false;
|
|
1302
|
+
}
|
|
1303
|
+
};
|
|
1304
|
+
var styleRegistry = new StyleRegistry();
|
|
1305
|
+
|
|
1306
|
+
// ../core/src/styling/css.ts
|
|
1307
|
+
var BREAKPOINTS = {
|
|
1308
|
+
sm: 480,
|
|
1309
|
+
md: 768,
|
|
1310
|
+
lg: 1024,
|
|
1311
|
+
xl: 1280
|
|
1312
|
+
};
|
|
1313
|
+
var PSEUDO_SELECTOR = {
|
|
1314
|
+
hover: ":hover",
|
|
1315
|
+
focus: ":focus",
|
|
1316
|
+
focusVisible: ":focus-visible",
|
|
1317
|
+
focusWithin: ":focus-within",
|
|
1318
|
+
active: ":active",
|
|
1319
|
+
disabled: ":disabled",
|
|
1320
|
+
checked: ":checked",
|
|
1321
|
+
firstChild: ":first-child",
|
|
1322
|
+
lastChild: ":last-child"
|
|
1323
|
+
};
|
|
1324
|
+
function stateAttr(state) {
|
|
1325
|
+
return `data-${state}`;
|
|
1326
|
+
}
|
|
1327
|
+
function isResponsiveObject(v) {
|
|
1328
|
+
return v !== null && typeof v === "object";
|
|
1329
|
+
}
|
|
1330
|
+
function splitResponsive(props) {
|
|
1331
|
+
const base = [];
|
|
1332
|
+
const media = { sm: [], md: [], lg: [], xl: [] };
|
|
1333
|
+
for (const key of Object.keys(props).sort()) {
|
|
1334
|
+
if (key === "vars") {
|
|
1335
|
+
const vars = props.vars;
|
|
1336
|
+
if (vars) for (const vk of Object.keys(vars).sort()) base.push([vk, vars[vk]]);
|
|
1337
|
+
continue;
|
|
1338
|
+
}
|
|
1339
|
+
const raw = props[key];
|
|
1340
|
+
if (raw === void 0) continue;
|
|
1341
|
+
if (isResponsiveObject(raw)) {
|
|
1342
|
+
const r = raw;
|
|
1343
|
+
if (r.base !== void 0) base.push([key, r.base]);
|
|
1344
|
+
for (const bp of ["sm", "md", "lg", "xl"]) {
|
|
1345
|
+
if (r[bp] !== void 0) media[bp].push([key, r[bp]]);
|
|
1346
|
+
}
|
|
1347
|
+
} else {
|
|
1348
|
+
base.push([key, raw]);
|
|
1349
|
+
}
|
|
1350
|
+
}
|
|
1351
|
+
return { base, media };
|
|
1352
|
+
}
|
|
1353
|
+
function declBody(pairs) {
|
|
1354
|
+
let out = "";
|
|
1355
|
+
for (const [prop, val] of pairs) out += `${cssPropName(prop)}:${cssValue(prop, val)};`;
|
|
1356
|
+
return out;
|
|
1357
|
+
}
|
|
1358
|
+
function flatBody(props) {
|
|
1359
|
+
const pairs = [];
|
|
1360
|
+
for (const key of Object.keys(props).sort()) {
|
|
1361
|
+
if (key === "vars") {
|
|
1362
|
+
const vars = props.vars;
|
|
1363
|
+
if (vars) for (const vk of Object.keys(vars).sort()) pairs.push([vk, vars[vk]]);
|
|
1364
|
+
continue;
|
|
1365
|
+
}
|
|
1366
|
+
const raw = props[key];
|
|
1367
|
+
if (raw === void 0) continue;
|
|
1368
|
+
if (isResponsiveObject(raw)) {
|
|
1369
|
+
const b = raw.base;
|
|
1370
|
+
if (b !== void 0) pairs.push([key, b]);
|
|
1371
|
+
} else {
|
|
1372
|
+
pairs.push([key, raw]);
|
|
1373
|
+
}
|
|
1374
|
+
}
|
|
1375
|
+
return declBody(pairs);
|
|
1376
|
+
}
|
|
1377
|
+
function generateCSS(id, def) {
|
|
1378
|
+
const sel = `.${id}`;
|
|
1379
|
+
const { base, media } = splitResponsive(def);
|
|
1380
|
+
let baseCss = "";
|
|
1381
|
+
const baseBody = declBody(base);
|
|
1382
|
+
if (baseBody.length > 0) baseCss += `${sel}{${baseBody}}`;
|
|
1383
|
+
let hasResponsive = false;
|
|
1384
|
+
for (const bp of ["sm", "md", "lg", "xl"]) {
|
|
1385
|
+
if (media[bp].length > 0) {
|
|
1386
|
+
hasResponsive = true;
|
|
1387
|
+
baseCss += `@media (min-width:${BREAKPOINTS[bp]}px){${sel}{${declBody(media[bp])}}}`;
|
|
1388
|
+
}
|
|
1389
|
+
}
|
|
1390
|
+
let stateCss = "";
|
|
1391
|
+
if (def.on) {
|
|
1392
|
+
for (const ps of Object.keys(def.on).sort()) {
|
|
1393
|
+
const block = def.on[ps];
|
|
1394
|
+
if (!block) continue;
|
|
1395
|
+
const body2 = flatBody(block);
|
|
1396
|
+
if (body2.length > 0) stateCss += `${sel}${PSEUDO_SELECTOR[ps]}{${body2}}`;
|
|
1397
|
+
}
|
|
1398
|
+
}
|
|
1399
|
+
if (def.when) {
|
|
1400
|
+
for (const st of Object.keys(def.when).sort()) {
|
|
1401
|
+
const block = def.when[st];
|
|
1402
|
+
if (!block) continue;
|
|
1403
|
+
const body2 = flatBody(block);
|
|
1404
|
+
if (body2.length > 0) stateCss += `${sel}[${stateAttr(st)}]{${body2}}`;
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
1407
|
+
return { base: baseCss, state: stateCss, hasResponsive };
|
|
1408
|
+
}
|
|
1409
|
+
|
|
1410
|
+
// ../core/src/styling/tokens.ts
|
|
1411
|
+
function kebab(seg) {
|
|
1412
|
+
return seg.replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`);
|
|
1413
|
+
}
|
|
1414
|
+
function isLeaf(v) {
|
|
1415
|
+
return typeof v === "string" || typeof v === "number";
|
|
1416
|
+
}
|
|
1417
|
+
function walkTokens(tree, path, visit) {
|
|
1418
|
+
for (const key of Object.keys(tree).sort()) {
|
|
1419
|
+
const v = tree[key];
|
|
1420
|
+
const next = [...path, kebab(key)];
|
|
1421
|
+
if (isLeaf(v)) visit(`--${next.join("-")}`, v);
|
|
1422
|
+
else walkTokens(v, next, visit);
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
function buildRefs(tree, path) {
|
|
1426
|
+
const out = {};
|
|
1427
|
+
for (const key of Object.keys(tree)) {
|
|
1428
|
+
const v = tree[key];
|
|
1429
|
+
const next = [...path, kebab(key)];
|
|
1430
|
+
out[key] = isLeaf(v) ? `var(--${next.join("-")})` : buildRefs(v, next);
|
|
1431
|
+
}
|
|
1432
|
+
return out;
|
|
1433
|
+
}
|
|
1434
|
+
function tokenIdentity(def) {
|
|
1435
|
+
const json = JSON.stringify({ light: def.light, dark: def.dark ?? null });
|
|
1436
|
+
let h = 2166136261;
|
|
1437
|
+
for (let i = 0; i < json.length; i++) {
|
|
1438
|
+
h ^= json.charCodeAt(i);
|
|
1439
|
+
h = Math.imul(h, 16777619);
|
|
1440
|
+
}
|
|
1441
|
+
return `t-${(h >>> 0).toString(36)}`;
|
|
1442
|
+
}
|
|
1443
|
+
function createThemeTokens(def) {
|
|
1444
|
+
const id = tokenIdentity(def);
|
|
1445
|
+
let root = "";
|
|
1446
|
+
walkTokens(def.light, [], (name, value) => {
|
|
1447
|
+
root += `${name}:${value};`;
|
|
1448
|
+
});
|
|
1449
|
+
let dark = "";
|
|
1450
|
+
if (def.dark) walkTokens(def.dark, [], (name, value) => {
|
|
1451
|
+
dark += `${name}:${value};`;
|
|
1452
|
+
});
|
|
1453
|
+
let css = root.length > 0 ? `:root{${root}}` : "";
|
|
1454
|
+
if (dark.length > 0) css += `[data-theme="dark"]{${dark}}`;
|
|
1455
|
+
styleRegistry.register(id, "tokens", css);
|
|
1456
|
+
return {
|
|
1457
|
+
ref: buildRefs(def.light, []),
|
|
1458
|
+
css,
|
|
1459
|
+
id
|
|
1460
|
+
};
|
|
1461
|
+
}
|
|
1462
|
+
var DEFAULT_TOKENS = {
|
|
1463
|
+
surface: { background: "#ffffff", raised: "#f7f7f8", sunken: "#eeeef1", overlay: "rgba(17,17,20,0.55)" },
|
|
1464
|
+
content: { primary: "#17171a", secondary: "#55555f", muted: "#666672", inverse: "#ffffff" },
|
|
1465
|
+
border: { default: "#e3e3e8", strong: "#c9c9d1", subtle: "#f0f0f3" },
|
|
1466
|
+
accent: { primary: "#4f46e5", hover: "#4338ca", contrast: "#ffffff" },
|
|
1467
|
+
focus: { ring: "#6366f1" },
|
|
1468
|
+
danger: { surface: "#fef2f2", border: "#fecaca", content: "#b91c1c", solid: "#dc2626" },
|
|
1469
|
+
success: { content: "#15803d", solid: "#16a34a" },
|
|
1470
|
+
space: { "0": "0", "1": "4px", "2": "8px", "3": "12px", "4": "16px", "5": "24px", "6": "32px", "8": "48px", "10": "64px" },
|
|
1471
|
+
radius: { sm: "4px", md: "8px", lg: "12px", xl: "16px", full: "9999px" },
|
|
1472
|
+
font: {
|
|
1473
|
+
sans: "ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif",
|
|
1474
|
+
mono: "ui-monospace,SFMono-Regular,Menlo,Consolas,monospace"
|
|
1475
|
+
},
|
|
1476
|
+
size: { xs: "12px", sm: "14px", md: "16px", lg: "18px", xl: "24px", "2xl": "32px", "3xl": "44px" },
|
|
1477
|
+
weight: { normal: "400", medium: "500", semibold: "600", bold: "700" },
|
|
1478
|
+
leading: { tight: "1.2", normal: "1.5", relaxed: "1.7" },
|
|
1479
|
+
shadow: {
|
|
1480
|
+
sm: "0 1px 2px rgba(17,17,20,0.08)",
|
|
1481
|
+
md: "0 4px 12px rgba(17,17,20,0.1)",
|
|
1482
|
+
lg: "0 12px 32px rgba(17,17,20,0.16)"
|
|
1483
|
+
},
|
|
1484
|
+
z: { base: "0", dropdown: "1000", overlay: "1100", toast: "1200" },
|
|
1485
|
+
duration: { fast: "120ms", base: "200ms", slow: "320ms" },
|
|
1486
|
+
easing: { standard: "cubic-bezier(0.2,0,0,1)", emphasized: "cubic-bezier(0.3,0,0,1)" }
|
|
1487
|
+
};
|
|
1488
|
+
var DARK_OVERRIDES = {
|
|
1489
|
+
surface: { background: "#0f0f12", raised: "#17171c", sunken: "#0a0a0d", overlay: "rgba(0,0,0,0.6)" },
|
|
1490
|
+
content: { primary: "#f4f4f6", secondary: "#b4b4bf", muted: "#7c7c88", inverse: "#17171a" },
|
|
1491
|
+
border: { default: "#2a2a31", strong: "#3a3a44", subtle: "#1e1e24" },
|
|
1492
|
+
accent: { primary: "#818cf8", hover: "#a5b4fc", contrast: "#0f0f12" },
|
|
1493
|
+
focus: { ring: "#a5b4fc" },
|
|
1494
|
+
danger: { surface: "#2a1416", border: "#5b1d1d", content: "#fca5a5", solid: "#ef4444" },
|
|
1495
|
+
success: { content: "#4ade80", solid: "#22c55e" }
|
|
1496
|
+
};
|
|
1497
|
+
var tokens = createThemeTokens({ light: DEFAULT_TOKENS, dark: DARK_OVERRIDES });
|
|
1498
|
+
|
|
1499
|
+
// ../core/src/styling/style.ts
|
|
1500
|
+
function style(def) {
|
|
1501
|
+
const { id } = identityOf(def);
|
|
1502
|
+
if (!styleRegistry.has(id)) {
|
|
1503
|
+
const gen = generateCSS(id, def);
|
|
1504
|
+
styleRegistry.register(id, gen.hasResponsive ? "responsive" : "base", gen.base);
|
|
1505
|
+
if (gen.state.length > 0) {
|
|
1506
|
+
styleRegistry.register(`${id}~state`, "state", gen.state);
|
|
1507
|
+
}
|
|
1508
|
+
}
|
|
1509
|
+
return id;
|
|
1510
|
+
}
|
|
1511
|
+
function cx(...parts) {
|
|
1512
|
+
let out = "";
|
|
1513
|
+
for (const p of parts) {
|
|
1514
|
+
if (!p) continue;
|
|
1515
|
+
out = out.length === 0 ? p : `${out} ${p}`;
|
|
1516
|
+
}
|
|
1517
|
+
return out;
|
|
1518
|
+
}
|
|
1519
|
+
function styleVariants(cfg) {
|
|
1520
|
+
const baseClass = cfg.base ? style(cfg.base) : "";
|
|
1521
|
+
const groupClasses = {};
|
|
1522
|
+
for (const group of Object.keys(cfg.variants)) {
|
|
1523
|
+
const values = cfg.variants[group];
|
|
1524
|
+
const map = {};
|
|
1525
|
+
for (const value of Object.keys(values)) map[value] = style(values[value]);
|
|
1526
|
+
groupClasses[group] = map;
|
|
1527
|
+
}
|
|
1528
|
+
const defaults = cfg.defaultVariants ?? {};
|
|
1529
|
+
return (selection) => {
|
|
1530
|
+
const parts = [];
|
|
1531
|
+
if (baseClass) parts.push(baseClass);
|
|
1532
|
+
for (const group of Object.keys(groupClasses)) {
|
|
1533
|
+
const chosen = selection?.[group] ?? defaults[group];
|
|
1534
|
+
if (chosen === void 0) continue;
|
|
1535
|
+
const cls = groupClasses[group][chosen];
|
|
1536
|
+
if (cls) parts.push(cls);
|
|
1537
|
+
}
|
|
1538
|
+
return cx(...parts);
|
|
1539
|
+
};
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1542
|
+
// ../core/src/styling/reactive.ts
|
|
1543
|
+
function reactiveVarName(prop) {
|
|
1544
|
+
return `--s-${cssPropName(prop)}`;
|
|
1545
|
+
}
|
|
1546
|
+
function styleWithVars(staticDef, reactiveProps) {
|
|
1547
|
+
const vars = {};
|
|
1548
|
+
const bind = {};
|
|
1549
|
+
const dynamic = {};
|
|
1550
|
+
for (const prop of reactiveProps) {
|
|
1551
|
+
const varName = reactiveVarName(prop);
|
|
1552
|
+
vars[prop] = varName;
|
|
1553
|
+
bind[prop] = `style.${varName}`;
|
|
1554
|
+
dynamic[prop] = `var(${varName})`;
|
|
1555
|
+
}
|
|
1556
|
+
const merged = { ...staticDef, ...dynamic };
|
|
1557
|
+
return { class: style(merged), vars, bind };
|
|
1558
|
+
}
|
|
1559
|
+
function reactiveVarValue(prop, value) {
|
|
1560
|
+
return cssValue(prop, value);
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1563
|
+
// ../core/src/styling/layout.ts
|
|
1564
|
+
var space = (k) => tokens.ref.space[k];
|
|
1565
|
+
function container(opts = {}) {
|
|
1566
|
+
const def = {
|
|
1567
|
+
width: "100%",
|
|
1568
|
+
maxWidth: opts.max ?? 1120,
|
|
1569
|
+
paddingLeft: space(opts.padX ?? "4"),
|
|
1570
|
+
paddingRight: space(opts.padX ?? "4"),
|
|
1571
|
+
...opts.center === false ? {} : { marginLeft: "auto", marginRight: "auto" }
|
|
1572
|
+
};
|
|
1573
|
+
return style(def);
|
|
1574
|
+
}
|
|
1575
|
+
var ALIGN = {
|
|
1576
|
+
start: "flex-start",
|
|
1577
|
+
center: "center",
|
|
1578
|
+
end: "flex-end",
|
|
1579
|
+
stretch: "stretch"
|
|
1580
|
+
};
|
|
1581
|
+
var JUSTIFY = {
|
|
1582
|
+
start: "flex-start",
|
|
1583
|
+
center: "center",
|
|
1584
|
+
end: "flex-end",
|
|
1585
|
+
between: "space-between",
|
|
1586
|
+
around: "space-around"
|
|
1587
|
+
};
|
|
1588
|
+
function stack(opts = {}) {
|
|
1589
|
+
return style({
|
|
1590
|
+
display: "flex",
|
|
1591
|
+
flexDirection: "column",
|
|
1592
|
+
gap: space(opts.gap ?? "4"),
|
|
1593
|
+
...opts.align ? { alignItems: ALIGN[opts.align] } : {},
|
|
1594
|
+
...opts.justify ? { justifyContent: JUSTIFY[opts.justify] } : {}
|
|
1595
|
+
});
|
|
1596
|
+
}
|
|
1597
|
+
function row(opts = {}) {
|
|
1598
|
+
return style({
|
|
1599
|
+
display: "flex",
|
|
1600
|
+
flexDirection: "row",
|
|
1601
|
+
gap: space(opts.gap ?? "4"),
|
|
1602
|
+
alignItems: opts.align ? ALIGN[opts.align] : "center",
|
|
1603
|
+
...opts.justify ? { justifyContent: JUSTIFY[opts.justify] } : {},
|
|
1604
|
+
...opts.wrap ? { flexWrap: "wrap" } : {}
|
|
1605
|
+
});
|
|
1606
|
+
}
|
|
1607
|
+
function grid(opts = {}) {
|
|
1608
|
+
const columns = opts.columns ?? "auto";
|
|
1609
|
+
const min = typeof opts.min === "number" ? `${opts.min}px` : opts.min ?? "220px";
|
|
1610
|
+
const template = columns === "auto" ? `repeat(auto-fill, minmax(${min}, 1fr))` : `repeat(${columns}, minmax(0, 1fr))`;
|
|
1611
|
+
return style({ display: "grid", gridTemplateColumns: template, gap: space(opts.gap ?? "4") });
|
|
1612
|
+
}
|
|
1613
|
+
function center(opts = {}) {
|
|
1614
|
+
return style({
|
|
1615
|
+
display: opts.inline ? "inline-flex" : "flex",
|
|
1616
|
+
alignItems: "center",
|
|
1617
|
+
justifyContent: "center",
|
|
1618
|
+
...opts.minHeight !== void 0 ? { minHeight: opts.minHeight } : {}
|
|
1619
|
+
});
|
|
1620
|
+
}
|
|
1621
|
+
function spacer(opts = {}) {
|
|
1622
|
+
return opts.size !== void 0 ? style({ flex: "0 0 auto", width: opts.size, height: opts.size }) : style({ flex: "1 1 0%" });
|
|
1623
|
+
}
|
|
1624
|
+
var layout = { container, stack, row, grid, center, spacer };
|
|
1625
|
+
|
|
1626
|
+
// ../core/src/styling/typography.ts
|
|
1627
|
+
var t = tokens.ref;
|
|
1628
|
+
var HEADING_SIZE = {
|
|
1629
|
+
1: t.size["3xl"],
|
|
1630
|
+
2: t.size["2xl"],
|
|
1631
|
+
3: t.size.xl,
|
|
1632
|
+
4: t.size.lg,
|
|
1633
|
+
5: t.size.md,
|
|
1634
|
+
6: t.size.sm
|
|
1635
|
+
};
|
|
1636
|
+
function heading(opts = {}) {
|
|
1637
|
+
const level = opts.level ?? 2;
|
|
1638
|
+
return style({
|
|
1639
|
+
fontFamily: t.font.sans,
|
|
1640
|
+
fontSize: HEADING_SIZE[level],
|
|
1641
|
+
fontWeight: level <= 2 ? t.weight.bold : t.weight.semibold,
|
|
1642
|
+
lineHeight: t.leading.tight,
|
|
1643
|
+
color: t.content.primary,
|
|
1644
|
+
letterSpacing: level <= 2 ? "-0.02em" : "-0.01em"
|
|
1645
|
+
});
|
|
1646
|
+
}
|
|
1647
|
+
function body(opts = {}) {
|
|
1648
|
+
const def = {
|
|
1649
|
+
fontFamily: t.font.sans,
|
|
1650
|
+
fontSize: t.size.md,
|
|
1651
|
+
fontWeight: t.weight.normal,
|
|
1652
|
+
lineHeight: t.leading.normal,
|
|
1653
|
+
color: opts.muted ? t.content.secondary : t.content.primary
|
|
1654
|
+
};
|
|
1655
|
+
return style(opts.measure !== void 0 ? { ...def, maxWidth: opts.measure } : def);
|
|
1656
|
+
}
|
|
1657
|
+
function label() {
|
|
1658
|
+
return style({
|
|
1659
|
+
fontFamily: t.font.sans,
|
|
1660
|
+
fontSize: t.size.sm,
|
|
1661
|
+
fontWeight: t.weight.medium,
|
|
1662
|
+
lineHeight: t.leading.normal,
|
|
1663
|
+
color: t.content.primary
|
|
1664
|
+
});
|
|
1665
|
+
}
|
|
1666
|
+
function caption() {
|
|
1667
|
+
return style({
|
|
1668
|
+
fontFamily: t.font.sans,
|
|
1669
|
+
fontSize: t.size.xs,
|
|
1670
|
+
fontWeight: t.weight.normal,
|
|
1671
|
+
lineHeight: t.leading.normal,
|
|
1672
|
+
color: t.content.muted
|
|
1673
|
+
});
|
|
1674
|
+
}
|
|
1675
|
+
function link() {
|
|
1676
|
+
return style({
|
|
1677
|
+
color: t.accent.primary,
|
|
1678
|
+
textDecoration: "underline",
|
|
1679
|
+
cursor: "pointer",
|
|
1680
|
+
borderRadius: t.radius.sm,
|
|
1681
|
+
on: {
|
|
1682
|
+
hover: { color: t.accent.hover },
|
|
1683
|
+
focusVisible: { outline: `2px solid ${t.focus.ring}` }
|
|
1684
|
+
}
|
|
1685
|
+
});
|
|
1686
|
+
}
|
|
1687
|
+
function code() {
|
|
1688
|
+
return style({
|
|
1689
|
+
fontFamily: t.font.mono,
|
|
1690
|
+
fontSize: "0.9em",
|
|
1691
|
+
background: t.surface.sunken,
|
|
1692
|
+
color: t.content.primary,
|
|
1693
|
+
borderRadius: t.radius.sm,
|
|
1694
|
+
paddingLeft: t.space["1"],
|
|
1695
|
+
paddingRight: t.space["1"],
|
|
1696
|
+
borderWidth: 1,
|
|
1697
|
+
borderStyle: "solid",
|
|
1698
|
+
borderColor: t.border.subtle
|
|
1699
|
+
});
|
|
1700
|
+
}
|
|
1701
|
+
function pre() {
|
|
1702
|
+
return style({
|
|
1703
|
+
fontFamily: t.font.mono,
|
|
1704
|
+
fontSize: t.size.sm,
|
|
1705
|
+
lineHeight: t.leading.relaxed,
|
|
1706
|
+
background: t.surface.sunken,
|
|
1707
|
+
color: t.content.primary,
|
|
1708
|
+
borderRadius: t.radius.md,
|
|
1709
|
+
borderWidth: 1,
|
|
1710
|
+
borderStyle: "solid",
|
|
1711
|
+
borderColor: t.border.subtle,
|
|
1712
|
+
padding: t.space["4"],
|
|
1713
|
+
overflowX: "auto",
|
|
1714
|
+
whiteSpace: "pre"
|
|
1715
|
+
});
|
|
1716
|
+
}
|
|
1717
|
+
function blockquote() {
|
|
1718
|
+
return style({
|
|
1719
|
+
fontFamily: t.font.sans,
|
|
1720
|
+
fontSize: t.size.lg,
|
|
1721
|
+
lineHeight: t.leading.relaxed,
|
|
1722
|
+
color: t.content.secondary,
|
|
1723
|
+
borderStyle: "solid",
|
|
1724
|
+
borderColor: t.accent.primary,
|
|
1725
|
+
paddingLeft: t.space["4"],
|
|
1726
|
+
marginLeft: 0
|
|
1727
|
+
});
|
|
1728
|
+
}
|
|
1729
|
+
function list() {
|
|
1730
|
+
return style({
|
|
1731
|
+
fontFamily: t.font.sans,
|
|
1732
|
+
fontSize: t.size.md,
|
|
1733
|
+
lineHeight: t.leading.normal,
|
|
1734
|
+
color: t.content.primary,
|
|
1735
|
+
display: "flex",
|
|
1736
|
+
flexDirection: "column",
|
|
1737
|
+
gap: t.space["2"]
|
|
1738
|
+
});
|
|
1739
|
+
}
|
|
1740
|
+
var text = { heading, body, label, caption, link, code, pre, blockquote, list };
|
|
1741
|
+
|
|
1742
|
+
// ../core/src/styling/a11y.ts
|
|
1743
|
+
var t2 = tokens.ref;
|
|
1744
|
+
function focusRing(opts = {}) {
|
|
1745
|
+
const color = opts.color ?? t2.focus.ring;
|
|
1746
|
+
const width = opts.width ?? 2;
|
|
1747
|
+
const offset = opts.offset ?? 2;
|
|
1748
|
+
return style({
|
|
1749
|
+
outline: "2px solid transparent",
|
|
1750
|
+
// reserve space; real ring shown on focus
|
|
1751
|
+
on: {
|
|
1752
|
+
focusVisible: {
|
|
1753
|
+
outline: `${width}px solid ${color}`,
|
|
1754
|
+
outlineOffset: offset
|
|
1755
|
+
}
|
|
1756
|
+
}
|
|
1757
|
+
});
|
|
1758
|
+
}
|
|
1759
|
+
function visuallyHidden() {
|
|
1760
|
+
return style({
|
|
1761
|
+
position: "absolute",
|
|
1762
|
+
width: 1,
|
|
1763
|
+
height: 1,
|
|
1764
|
+
padding: 0,
|
|
1765
|
+
margin: -1,
|
|
1766
|
+
overflow: "hidden",
|
|
1767
|
+
whiteSpace: "nowrap",
|
|
1768
|
+
border: 0,
|
|
1769
|
+
// clip to a zero-area rect so the node occupies no visual space
|
|
1770
|
+
clipPath: "inset(50%)"
|
|
1771
|
+
});
|
|
1772
|
+
}
|
|
1773
|
+
function skipLink() {
|
|
1774
|
+
return style({
|
|
1775
|
+
position: "absolute",
|
|
1776
|
+
left: t2.space["2"],
|
|
1777
|
+
top: -40,
|
|
1778
|
+
background: t2.surface.raised,
|
|
1779
|
+
color: t2.content.primary,
|
|
1780
|
+
padding: t2.space["2"],
|
|
1781
|
+
borderRadius: t2.radius.md,
|
|
1782
|
+
boxShadow: t2.shadow.md,
|
|
1783
|
+
transition: `top ${t2.duration.fast} ${t2.easing.standard}`,
|
|
1784
|
+
on: {
|
|
1785
|
+
focusVisible: { top: t2.space["2"], outline: `2px solid ${t2.focus.ring}`, outlineOffset: 2 }
|
|
1786
|
+
}
|
|
1787
|
+
});
|
|
1788
|
+
}
|
|
1789
|
+
var a11y = { focusRing, visuallyHidden, skipLink };
|
|
1790
|
+
|
|
1791
|
+
// ../core/src/styling/forms.ts
|
|
1792
|
+
var t3 = tokens.ref;
|
|
1793
|
+
var CONTROL_BASE = {
|
|
1794
|
+
fontFamily: t3.font.sans,
|
|
1795
|
+
fontSize: t3.size.md,
|
|
1796
|
+
lineHeight: t3.leading.normal,
|
|
1797
|
+
color: t3.content.primary,
|
|
1798
|
+
background: t3.surface.background,
|
|
1799
|
+
borderWidth: 1,
|
|
1800
|
+
borderStyle: "solid",
|
|
1801
|
+
borderColor: t3.border.strong,
|
|
1802
|
+
borderRadius: t3.radius.md,
|
|
1803
|
+
paddingTop: t3.space["2"],
|
|
1804
|
+
paddingBottom: t3.space["2"],
|
|
1805
|
+
paddingLeft: t3.space["3"],
|
|
1806
|
+
paddingRight: t3.space["3"],
|
|
1807
|
+
width: "100%",
|
|
1808
|
+
appearance: "none",
|
|
1809
|
+
transition: `border-color ${t3.duration.fast} ${t3.easing.standard}, box-shadow ${t3.duration.fast} ${t3.easing.standard}`,
|
|
1810
|
+
on: {
|
|
1811
|
+
focusVisible: { outline: "none", borderColor: t3.accent.primary, boxShadow: `0 0 0 3px ${t3.focus.ring}` },
|
|
1812
|
+
disabled: { opacity: 0.55, cursor: "not-allowed", background: t3.surface.sunken }
|
|
1813
|
+
},
|
|
1814
|
+
when: {
|
|
1815
|
+
invalid: { borderColor: t3.danger.border, boxShadow: `0 0 0 3px ${t3.danger.surface}` }
|
|
1816
|
+
}
|
|
1817
|
+
};
|
|
1818
|
+
function input() {
|
|
1819
|
+
return style(CONTROL_BASE);
|
|
1820
|
+
}
|
|
1821
|
+
function field() {
|
|
1822
|
+
return style({ display: "flex", flexDirection: "column", gap: t3.space["2"] });
|
|
1823
|
+
}
|
|
1824
|
+
function fieldLabel() {
|
|
1825
|
+
return style({
|
|
1826
|
+
fontFamily: t3.font.sans,
|
|
1827
|
+
fontSize: t3.size.sm,
|
|
1828
|
+
fontWeight: t3.weight.medium,
|
|
1829
|
+
color: t3.content.primary
|
|
1830
|
+
});
|
|
1831
|
+
}
|
|
1832
|
+
function fieldHelp() {
|
|
1833
|
+
return style({ fontFamily: t3.font.sans, fontSize: t3.size.xs, color: t3.content.muted });
|
|
1834
|
+
}
|
|
1835
|
+
function fieldError() {
|
|
1836
|
+
return style({
|
|
1837
|
+
fontFamily: t3.font.sans,
|
|
1838
|
+
fontSize: t3.size.xs,
|
|
1839
|
+
fontWeight: t3.weight.medium,
|
|
1840
|
+
color: t3.danger.content
|
|
1841
|
+
});
|
|
1842
|
+
}
|
|
1843
|
+
function button() {
|
|
1844
|
+
return style({
|
|
1845
|
+
fontFamily: t3.font.sans,
|
|
1846
|
+
fontSize: t3.size.md,
|
|
1847
|
+
fontWeight: t3.weight.semibold,
|
|
1848
|
+
lineHeight: t3.leading.normal,
|
|
1849
|
+
color: t3.accent.contrast,
|
|
1850
|
+
background: t3.accent.primary,
|
|
1851
|
+
borderWidth: 0,
|
|
1852
|
+
borderStyle: "solid",
|
|
1853
|
+
borderRadius: t3.radius.md,
|
|
1854
|
+
paddingTop: t3.space["2"],
|
|
1855
|
+
paddingBottom: t3.space["2"],
|
|
1856
|
+
paddingLeft: t3.space["4"],
|
|
1857
|
+
paddingRight: t3.space["4"],
|
|
1858
|
+
cursor: "pointer",
|
|
1859
|
+
appearance: "none",
|
|
1860
|
+
transition: `background ${t3.duration.fast} ${t3.easing.standard}`,
|
|
1861
|
+
on: {
|
|
1862
|
+
hover: { background: t3.accent.hover },
|
|
1863
|
+
focusVisible: { outline: "none", boxShadow: `0 0 0 3px ${t3.focus.ring}` },
|
|
1864
|
+
disabled: { opacity: 0.55, cursor: "not-allowed" }
|
|
1865
|
+
}
|
|
1866
|
+
});
|
|
1867
|
+
}
|
|
1868
|
+
var form = { field, input, label: fieldLabel, help: fieldHelp, error: fieldError, button };
|
|
1869
|
+
|
|
1870
|
+
// ../core/src/styling/overlays.ts
|
|
1871
|
+
var t4 = tokens.ref;
|
|
1872
|
+
function backdrop() {
|
|
1873
|
+
return style({
|
|
1874
|
+
position: "fixed",
|
|
1875
|
+
inset: 0,
|
|
1876
|
+
background: t4.surface.overlay,
|
|
1877
|
+
zIndex: t4.z.overlay
|
|
1878
|
+
});
|
|
1879
|
+
}
|
|
1880
|
+
function dialog() {
|
|
1881
|
+
return style({
|
|
1882
|
+
position: "relative",
|
|
1883
|
+
background: t4.surface.background,
|
|
1884
|
+
color: t4.content.primary,
|
|
1885
|
+
borderRadius: t4.radius.lg,
|
|
1886
|
+
boxShadow: t4.shadow.lg,
|
|
1887
|
+
borderWidth: 1,
|
|
1888
|
+
borderStyle: "solid",
|
|
1889
|
+
borderColor: t4.border.default,
|
|
1890
|
+
padding: t4.space["5"],
|
|
1891
|
+
maxWidth: "min(560px, calc(100vw - 32px))",
|
|
1892
|
+
width: "100%",
|
|
1893
|
+
zIndex: t4.z.overlay
|
|
1894
|
+
});
|
|
1895
|
+
}
|
|
1896
|
+
function popover() {
|
|
1897
|
+
return style({
|
|
1898
|
+
position: "absolute",
|
|
1899
|
+
background: t4.surface.raised,
|
|
1900
|
+
color: t4.content.primary,
|
|
1901
|
+
borderRadius: t4.radius.md,
|
|
1902
|
+
boxShadow: t4.shadow.md,
|
|
1903
|
+
borderWidth: 1,
|
|
1904
|
+
borderStyle: "solid",
|
|
1905
|
+
borderColor: t4.border.default,
|
|
1906
|
+
padding: t4.space["3"],
|
|
1907
|
+
zIndex: t4.z.dropdown
|
|
1908
|
+
});
|
|
1909
|
+
}
|
|
1910
|
+
function tooltip() {
|
|
1911
|
+
return style({
|
|
1912
|
+
position: "absolute",
|
|
1913
|
+
background: t4.content.primary,
|
|
1914
|
+
color: t4.surface.background,
|
|
1915
|
+
fontFamily: t4.font.sans,
|
|
1916
|
+
fontSize: t4.size.xs,
|
|
1917
|
+
lineHeight: t4.leading.tight,
|
|
1918
|
+
borderRadius: t4.radius.sm,
|
|
1919
|
+
paddingTop: t4.space["1"],
|
|
1920
|
+
paddingBottom: t4.space["1"],
|
|
1921
|
+
paddingLeft: t4.space["2"],
|
|
1922
|
+
paddingRight: t4.space["2"],
|
|
1923
|
+
maxWidth: 240,
|
|
1924
|
+
zIndex: t4.z.overlay,
|
|
1925
|
+
pointerEvents: "none"
|
|
1926
|
+
});
|
|
1927
|
+
}
|
|
1928
|
+
var MENU_BASE = {
|
|
1929
|
+
position: "absolute",
|
|
1930
|
+
background: t4.surface.background,
|
|
1931
|
+
color: t4.content.primary,
|
|
1932
|
+
borderRadius: t4.radius.md,
|
|
1933
|
+
boxShadow: t4.shadow.md,
|
|
1934
|
+
borderWidth: 1,
|
|
1935
|
+
borderStyle: "solid",
|
|
1936
|
+
borderColor: t4.border.default,
|
|
1937
|
+
paddingTop: t4.space["1"],
|
|
1938
|
+
paddingBottom: t4.space["1"],
|
|
1939
|
+
minWidth: 180,
|
|
1940
|
+
zIndex: t4.z.dropdown
|
|
1941
|
+
};
|
|
1942
|
+
function dropdown() {
|
|
1943
|
+
return style(MENU_BASE);
|
|
1944
|
+
}
|
|
1945
|
+
function dropdownItem() {
|
|
1946
|
+
return style({
|
|
1947
|
+
display: "flex",
|
|
1948
|
+
alignItems: "center",
|
|
1949
|
+
gap: t4.space["2"],
|
|
1950
|
+
fontFamily: t4.font.sans,
|
|
1951
|
+
fontSize: t4.size.sm,
|
|
1952
|
+
color: t4.content.primary,
|
|
1953
|
+
paddingTop: t4.space["2"],
|
|
1954
|
+
paddingBottom: t4.space["2"],
|
|
1955
|
+
paddingLeft: t4.space["3"],
|
|
1956
|
+
paddingRight: t4.space["3"],
|
|
1957
|
+
cursor: "pointer",
|
|
1958
|
+
on: {
|
|
1959
|
+
hover: { background: t4.surface.raised },
|
|
1960
|
+
disabled: { opacity: 0.5, cursor: "not-allowed" }
|
|
1961
|
+
},
|
|
1962
|
+
when: { selected: { background: t4.surface.sunken, fontWeight: t4.weight.medium } }
|
|
1963
|
+
});
|
|
1964
|
+
}
|
|
1965
|
+
function toast() {
|
|
1966
|
+
return style({
|
|
1967
|
+
background: t4.surface.raised,
|
|
1968
|
+
color: t4.content.primary,
|
|
1969
|
+
borderRadius: t4.radius.md,
|
|
1970
|
+
boxShadow: t4.shadow.lg,
|
|
1971
|
+
borderWidth: 1,
|
|
1972
|
+
borderStyle: "solid",
|
|
1973
|
+
borderColor: t4.border.default,
|
|
1974
|
+
padding: t4.space["3"],
|
|
1975
|
+
minWidth: 240,
|
|
1976
|
+
maxWidth: 420,
|
|
1977
|
+
zIndex: t4.z.toast
|
|
1978
|
+
});
|
|
1979
|
+
}
|
|
1980
|
+
var overlay = {
|
|
1981
|
+
backdrop,
|
|
1982
|
+
dialog,
|
|
1983
|
+
popover,
|
|
1984
|
+
tooltip,
|
|
1985
|
+
dropdown,
|
|
1986
|
+
dropdownItem,
|
|
1987
|
+
toast
|
|
1988
|
+
};
|
|
1989
|
+
|
|
1990
|
+
// ../core/src/styling/animation.ts
|
|
1991
|
+
var t5 = tokens.ref;
|
|
1992
|
+
var KEYFRAMES = {
|
|
1993
|
+
"streetui-fade-in": "from{opacity:0}to{opacity:1}",
|
|
1994
|
+
"streetui-fade-out": "from{opacity:1}to{opacity:0}",
|
|
1995
|
+
"streetui-scale-in": "from{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}",
|
|
1996
|
+
"streetui-scale-out": "from{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.96)}",
|
|
1997
|
+
"streetui-slide-in-up": "from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}",
|
|
1998
|
+
"streetui-slide-out-down": "from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(8px)}",
|
|
1999
|
+
"streetui-spin": "to{transform:rotate(360deg)}"
|
|
2000
|
+
};
|
|
2001
|
+
function ensureKeyframes(name) {
|
|
2002
|
+
const id = `kf-${name}`;
|
|
2003
|
+
if (!styleRegistry.has(id)) {
|
|
2004
|
+
styleRegistry.register(id, "base", `@keyframes ${name}{${KEYFRAMES[name]}}`);
|
|
2005
|
+
}
|
|
2006
|
+
}
|
|
2007
|
+
function animate(name, opts = {}) {
|
|
2008
|
+
ensureKeyframes(name);
|
|
2009
|
+
const duration = t5.duration[opts.duration ?? "base"];
|
|
2010
|
+
const easing = t5.easing[opts.easing ?? "standard"];
|
|
2011
|
+
const iterations = opts.iterations ?? 1;
|
|
2012
|
+
const fill = opts.fill ?? "both";
|
|
2013
|
+
return style({
|
|
2014
|
+
animationName: name,
|
|
2015
|
+
animationDuration: duration,
|
|
2016
|
+
animationTimingFunction: easing,
|
|
2017
|
+
animationFillMode: fill,
|
|
2018
|
+
animationIterationCount: String(iterations),
|
|
2019
|
+
...opts.delay !== void 0 ? { animationDelay: opts.delay } : {}
|
|
2020
|
+
});
|
|
2021
|
+
}
|
|
2022
|
+
function transition(properties, opts = {}) {
|
|
2023
|
+
const props = typeof properties === "string" ? [properties] : properties;
|
|
2024
|
+
const duration = t5.duration[opts.duration ?? "base"];
|
|
2025
|
+
const easing = t5.easing[opts.easing ?? "standard"];
|
|
2026
|
+
const delay = opts.delay !== void 0 ? ` ${typeof opts.delay === "number" ? `${opts.delay}ms` : opts.delay}` : "";
|
|
2027
|
+
return props.map((p) => `${p} ${duration} ${easing}${delay}`).join(", ");
|
|
2028
|
+
}
|
|
2029
|
+
var animation = { animate, transition, keyframes: KEYFRAMES };
|
|
2030
|
+
|
|
1087
2031
|
// ../graph/src/graph-node.ts
|
|
1088
2032
|
var GraphNode = class _GraphNode {
|
|
1089
2033
|
id;
|
|
@@ -1617,13 +2561,13 @@ var ContentBuilderBase = class {
|
|
|
1617
2561
|
this._node = _node;
|
|
1618
2562
|
this._graph = _graph;
|
|
1619
2563
|
}
|
|
1620
|
-
heading(
|
|
2564
|
+
heading(text2, options = {}) {
|
|
1621
2565
|
const props = { level: options.level ?? 1 };
|
|
1622
2566
|
if (options.class !== void 0) props["class"] = options.class;
|
|
1623
2567
|
if (options.id !== void 0) props["id"] = options.id;
|
|
1624
2568
|
applyA11yProps(props, options);
|
|
1625
2569
|
const node = this._graph.createNode("heading", { parent: this._node, props });
|
|
1626
|
-
const resolved = bindValue(this._graph, node, "text",
|
|
2570
|
+
const resolved = bindValue(this._graph, node, "text", text2);
|
|
1627
2571
|
node.setProp("text", resolved);
|
|
1628
2572
|
}
|
|
1629
2573
|
text(content, options = {}) {
|
|
@@ -1635,13 +2579,13 @@ var ContentBuilderBase = class {
|
|
|
1635
2579
|
const resolved = bindValue(this._graph, node, "text", content);
|
|
1636
2580
|
node.setProp("text", resolved);
|
|
1637
2581
|
}
|
|
1638
|
-
button(
|
|
2582
|
+
button(label2, options = {}) {
|
|
1639
2583
|
const props = {};
|
|
1640
2584
|
if (options.class !== void 0) props["class"] = options.class;
|
|
1641
2585
|
if (options.id !== void 0) props["id"] = options.id;
|
|
1642
2586
|
applyA11yProps(props, options);
|
|
1643
2587
|
const node = this._graph.createNode("button", { parent: this._node, props });
|
|
1644
|
-
const resolved = bindValue(this._graph, node, "label",
|
|
2588
|
+
const resolved = bindValue(this._graph, node, "label", label2);
|
|
1645
2589
|
node.setProp("label", resolved);
|
|
1646
2590
|
if (options.disabled !== void 0) {
|
|
1647
2591
|
const resolvedDisabled = bindValue(this._graph, node, "disabled", options.disabled);
|
|
@@ -1705,7 +2649,7 @@ var ContentBuilderBase = class {
|
|
|
1705
2649
|
if (options.id !== void 0) nodeOpts.key = options.id;
|
|
1706
2650
|
this._graph.createNode("image", nodeOpts);
|
|
1707
2651
|
}
|
|
1708
|
-
link(
|
|
2652
|
+
link(label2, options) {
|
|
1709
2653
|
const props = {
|
|
1710
2654
|
href: options.href,
|
|
1711
2655
|
external: options.external ?? false
|
|
@@ -1714,7 +2658,7 @@ var ContentBuilderBase = class {
|
|
|
1714
2658
|
if (options.id !== void 0) props["id"] = options.id;
|
|
1715
2659
|
applyA11yProps(props, options);
|
|
1716
2660
|
const node = this._graph.createNode("link", { parent: this._node, props });
|
|
1717
|
-
const resolved = bindValue(this._graph, node, "label",
|
|
2661
|
+
const resolved = bindValue(this._graph, node, "label", label2);
|
|
1718
2662
|
node.setProp("label", resolved);
|
|
1719
2663
|
if (options.onClick !== void 0) {
|
|
1720
2664
|
const handlerKey = `click:${node.id}`;
|
|
@@ -1898,9 +2842,9 @@ var ContainerBuilderBase = class extends ContentBuilderBase {
|
|
|
1898
2842
|
options.fallback(fb, currentError, retry);
|
|
1899
2843
|
},
|
|
1900
2844
|
// Healthy state → body, guarded against synchronous build throws.
|
|
1901
|
-
(
|
|
2845
|
+
(body2) => {
|
|
1902
2846
|
try {
|
|
1903
|
-
builder(
|
|
2847
|
+
builder(body2);
|
|
1904
2848
|
} catch (err) {
|
|
1905
2849
|
queueMicrotask(() => localError.set(err));
|
|
1906
2850
|
}
|
|
@@ -2183,8 +3127,8 @@ function validateGraph(graph) {
|
|
|
2183
3127
|
function validateNode(node, dc) {
|
|
2184
3128
|
switch (node.type) {
|
|
2185
3129
|
case "heading": {
|
|
2186
|
-
const
|
|
2187
|
-
if (
|
|
3130
|
+
const text2 = node.getProp("text");
|
|
3131
|
+
if (text2 === void 0 || text2 === "") {
|
|
2188
3132
|
dc.warn("COMPILER_EMPTY_HEADING", `Heading node "${node.id}" has no text content`, {
|
|
2189
3133
|
nodeId: node.id
|
|
2190
3134
|
});
|
|
@@ -2464,11 +3408,11 @@ var Runtime = class {
|
|
|
2464
3408
|
/**
|
|
2465
3409
|
* Mount the compiled application into the given DOM container.
|
|
2466
3410
|
*/
|
|
2467
|
-
mount(compiled,
|
|
3411
|
+
mount(compiled, container2) {
|
|
2468
3412
|
if (this._mounted) {
|
|
2469
3413
|
throw new Error("[Runtime] Already mounted. Call unmount() first.");
|
|
2470
3414
|
}
|
|
2471
|
-
this._renderHandle = this._renderer.mount(compiled,
|
|
3415
|
+
this._renderHandle = this._renderer.mount(compiled, container2);
|
|
2472
3416
|
this._mounted = true;
|
|
2473
3417
|
this._bindSignals(compiled.graph);
|
|
2474
3418
|
const self2 = this;
|
|
@@ -2497,11 +3441,11 @@ var Runtime = class {
|
|
|
2497
3441
|
* cannot hydrate. Signal binding is identical to `mount`, so the live client
|
|
2498
3442
|
* lifecycle is established the same way.
|
|
2499
3443
|
*/
|
|
2500
|
-
hydrate(compiled,
|
|
3444
|
+
hydrate(compiled, container2) {
|
|
2501
3445
|
if (this._mounted) {
|
|
2502
3446
|
throw new Error("[Runtime] Already mounted. Call unmount() first.");
|
|
2503
3447
|
}
|
|
2504
|
-
this._renderHandle = this._renderer.hydrate !== void 0 ? this._renderer.hydrate(compiled,
|
|
3448
|
+
this._renderHandle = this._renderer.hydrate !== void 0 ? this._renderer.hydrate(compiled, container2) : this._renderer.mount(compiled, container2);
|
|
2505
3449
|
this._mounted = true;
|
|
2506
3450
|
this._bindSignals(compiled.graph);
|
|
2507
3451
|
const self2 = this;
|
|
@@ -2676,8 +3620,8 @@ var BrowserDOMAdapter = class {
|
|
|
2676
3620
|
setProperty(element, name, value) {
|
|
2677
3621
|
element[name] = value;
|
|
2678
3622
|
}
|
|
2679
|
-
setTextContent(node,
|
|
2680
|
-
node.textContent =
|
|
3623
|
+
setTextContent(node, text2) {
|
|
3624
|
+
node.textContent = text2;
|
|
2681
3625
|
}
|
|
2682
3626
|
getTextContent(node) {
|
|
2683
3627
|
return node.textContent;
|
|
@@ -2917,9 +3861,9 @@ function serializeAttributes(el) {
|
|
|
2917
3861
|
}
|
|
2918
3862
|
}
|
|
2919
3863
|
}
|
|
2920
|
-
const
|
|
2921
|
-
if (
|
|
2922
|
-
parts.push(` style="${escapeHtmlAttr(
|
|
3864
|
+
const style2 = el._style;
|
|
3865
|
+
if (style2 !== null && !style2.isEmpty && !el.attributes.has("style")) {
|
|
3866
|
+
parts.push(` style="${escapeHtmlAttr(style2.toCss())}"`);
|
|
2923
3867
|
}
|
|
2924
3868
|
return parts.join("");
|
|
2925
3869
|
}
|
|
@@ -3042,16 +3986,16 @@ var ServerDOMAdapter = class {
|
|
|
3042
3986
|
setProperty(element, name, value) {
|
|
3043
3987
|
element.properties.set(name, value);
|
|
3044
3988
|
}
|
|
3045
|
-
setTextContent(node,
|
|
3989
|
+
setTextContent(node, text2) {
|
|
3046
3990
|
const n = asServer(node);
|
|
3047
3991
|
if (n.kind === "element" || n.kind === "fragment") {
|
|
3048
3992
|
const el = n;
|
|
3049
3993
|
el.children.length = 0;
|
|
3050
|
-
const
|
|
3051
|
-
|
|
3052
|
-
el.children.push(
|
|
3994
|
+
const t6 = new ServerText(text2);
|
|
3995
|
+
t6.parent = el;
|
|
3996
|
+
el.children.push(t6);
|
|
3053
3997
|
} else if (n.kind === "text") {
|
|
3054
|
-
n.data =
|
|
3998
|
+
n.data = text2;
|
|
3055
3999
|
}
|
|
3056
4000
|
}
|
|
3057
4001
|
getTextContent(node) {
|
|
@@ -3156,14 +4100,14 @@ function focusById(dom, root, id) {
|
|
|
3156
4100
|
dom.focus(el);
|
|
3157
4101
|
return true;
|
|
3158
4102
|
}
|
|
3159
|
-
function focusFirst(dom,
|
|
3160
|
-
const el = dom.querySelector(
|
|
4103
|
+
function focusFirst(dom, container2, selector = FOCUSABLE_SELECTOR) {
|
|
4104
|
+
const el = dom.querySelector(container2, selector);
|
|
3161
4105
|
if (el === null) return false;
|
|
3162
4106
|
dom.focus(el);
|
|
3163
4107
|
return true;
|
|
3164
4108
|
}
|
|
3165
|
-
function getFocusable(dom,
|
|
3166
|
-
return Array.from(dom.querySelectorAll(
|
|
4109
|
+
function getFocusable(dom, container2, selector = FOCUSABLE_SELECTOR) {
|
|
4110
|
+
return Array.from(dom.querySelectorAll(container2, selector)).filter(
|
|
3167
4111
|
(el) => dom.matches(el, selector)
|
|
3168
4112
|
);
|
|
3169
4113
|
}
|
|
@@ -3173,14 +4117,14 @@ function saveFocus(dom) {
|
|
|
3173
4117
|
function restoreFocus(dom, saved) {
|
|
3174
4118
|
if (saved !== null) dom.focus(saved);
|
|
3175
4119
|
}
|
|
3176
|
-
function focusInitial(dom,
|
|
3177
|
-
if (initialFocusId !== void 0 && focusById(dom,
|
|
3178
|
-
focusFirst(dom,
|
|
4120
|
+
function focusInitial(dom, container2, initialFocusId) {
|
|
4121
|
+
if (initialFocusId !== void 0 && focusById(dom, container2, initialFocusId)) return;
|
|
4122
|
+
focusFirst(dom, container2);
|
|
3179
4123
|
}
|
|
3180
|
-
function trapFocus(dom,
|
|
4124
|
+
function trapFocus(dom, container2) {
|
|
3181
4125
|
const onKeydown = (event) => {
|
|
3182
4126
|
if (event.key !== "Tab") return;
|
|
3183
|
-
const items = getFocusable(dom,
|
|
4127
|
+
const items = getFocusable(dom, container2);
|
|
3184
4128
|
if (items.length === 0) {
|
|
3185
4129
|
event.preventDefault();
|
|
3186
4130
|
return;
|
|
@@ -3188,7 +4132,7 @@ function trapFocus(dom, container) {
|
|
|
3188
4132
|
const first = items[0];
|
|
3189
4133
|
const last = items[items.length - 1];
|
|
3190
4134
|
const active = dom.activeElement();
|
|
3191
|
-
if (active === null || !dom.contains(
|
|
4135
|
+
if (active === null || !dom.contains(container2, active)) {
|
|
3192
4136
|
event.preventDefault();
|
|
3193
4137
|
dom.focus(first);
|
|
3194
4138
|
} else if (event.shiftKey && active === first) {
|
|
@@ -3199,26 +4143,26 @@ function trapFocus(dom, container) {
|
|
|
3199
4143
|
dom.focus(first);
|
|
3200
4144
|
}
|
|
3201
4145
|
};
|
|
3202
|
-
dom.addEventListener(
|
|
3203
|
-
return () => dom.removeEventListener(
|
|
4146
|
+
dom.addEventListener(container2, "keydown", onKeydown);
|
|
4147
|
+
return () => dom.removeEventListener(container2, "keydown", onKeydown);
|
|
3204
4148
|
}
|
|
3205
4149
|
var containmentStack = [];
|
|
3206
|
-
function containFocus(dom,
|
|
3207
|
-
const
|
|
3208
|
-
if (
|
|
4150
|
+
function containFocus(dom, container2) {
|
|
4151
|
+
const body2 = dom.body();
|
|
4152
|
+
if (body2 === null) return () => {
|
|
3209
4153
|
};
|
|
3210
|
-
containmentStack.push(
|
|
4154
|
+
containmentStack.push(container2);
|
|
3211
4155
|
const onFocusIn = (event) => {
|
|
3212
|
-
if (containmentStack[containmentStack.length - 1] !==
|
|
4156
|
+
if (containmentStack[containmentStack.length - 1] !== container2) return;
|
|
3213
4157
|
const target = event.target;
|
|
3214
|
-
if (target !== null && !dom.contains(
|
|
3215
|
-
focusFirst(dom,
|
|
4158
|
+
if (target !== null && !dom.contains(container2, target)) {
|
|
4159
|
+
focusFirst(dom, container2);
|
|
3216
4160
|
}
|
|
3217
4161
|
};
|
|
3218
|
-
dom.addEventListener(
|
|
4162
|
+
dom.addEventListener(body2, "focusin", onFocusIn);
|
|
3219
4163
|
return () => {
|
|
3220
|
-
dom.removeEventListener(
|
|
3221
|
-
const index = containmentStack.lastIndexOf(
|
|
4164
|
+
dom.removeEventListener(body2, "focusin", onFocusIn);
|
|
4165
|
+
const index = containmentStack.lastIndexOf(container2);
|
|
3222
4166
|
if (index !== -1) containmentStack.splice(index, 1);
|
|
3223
4167
|
};
|
|
3224
4168
|
}
|
|
@@ -3229,13 +4173,13 @@ function onEscape(dom, target, handler) {
|
|
|
3229
4173
|
dom.addEventListener(target, "keydown", onKeydown);
|
|
3230
4174
|
return () => dom.removeEventListener(target, "keydown", onKeydown);
|
|
3231
4175
|
}
|
|
3232
|
-
function rovingMenu(dom,
|
|
4176
|
+
function rovingMenu(dom, container2, selector = FOCUSABLE_SELECTOR) {
|
|
3233
4177
|
const onKeydown = (event) => {
|
|
3234
4178
|
const key = event.key;
|
|
3235
4179
|
const isActivate = key === "Enter" || key === " " || key === "Spacebar";
|
|
3236
4180
|
const isMove = key === "ArrowDown" || key === "ArrowUp" || key === "Home" || key === "End";
|
|
3237
4181
|
if (!isActivate && !isMove) return;
|
|
3238
|
-
const items = getFocusable(dom,
|
|
4182
|
+
const items = getFocusable(dom, container2, selector);
|
|
3239
4183
|
if (items.length === 0) return;
|
|
3240
4184
|
const active = dom.activeElement();
|
|
3241
4185
|
const index = active === null ? -1 : items.indexOf(active);
|
|
@@ -3253,8 +4197,8 @@ function rovingMenu(dom, container, selector = FOCUSABLE_SELECTOR) {
|
|
|
3253
4197
|
else next = index <= 0 ? items.length - 1 : index - 1;
|
|
3254
4198
|
dom.focus(items[next]);
|
|
3255
4199
|
};
|
|
3256
|
-
dom.addEventListener(
|
|
3257
|
-
return () => dom.removeEventListener(
|
|
4200
|
+
dom.addEventListener(container2, "keydown", onKeydown);
|
|
4201
|
+
return () => dom.removeEventListener(container2, "keydown", onKeydown);
|
|
3258
4202
|
}
|
|
3259
4203
|
|
|
3260
4204
|
// ../dom/src/live-region.ts
|
|
@@ -3269,8 +4213,8 @@ function makeRegion(dom, politeness) {
|
|
|
3269
4213
|
return el;
|
|
3270
4214
|
}
|
|
3271
4215
|
function createAnnouncer(dom) {
|
|
3272
|
-
const
|
|
3273
|
-
if (
|
|
4216
|
+
const body2 = dom.body();
|
|
4217
|
+
if (body2 === null) {
|
|
3274
4218
|
return { announce() {
|
|
3275
4219
|
}, clear() {
|
|
3276
4220
|
}, destroy() {
|
|
@@ -3278,8 +4222,8 @@ function createAnnouncer(dom) {
|
|
|
3278
4222
|
}
|
|
3279
4223
|
const polite = makeRegion(dom, "polite");
|
|
3280
4224
|
const assertive = makeRegion(dom, "assertive");
|
|
3281
|
-
dom.appendChild(
|
|
3282
|
-
dom.appendChild(
|
|
4225
|
+
dom.appendChild(body2, polite);
|
|
4226
|
+
dom.appendChild(body2, assertive);
|
|
3283
4227
|
let destroyed = false;
|
|
3284
4228
|
const write = (region, message) => {
|
|
3285
4229
|
dom.setTextContent(region, "");
|
|
@@ -3309,12 +4253,12 @@ function createAnnouncer(dom) {
|
|
|
3309
4253
|
}
|
|
3310
4254
|
|
|
3311
4255
|
// ../renderer/src/render-context.ts
|
|
3312
|
-
function createRenderContext(dom, graph,
|
|
4256
|
+
function createRenderContext(dom, graph, container2, hydrationDiagnostics, staticHTML) {
|
|
3313
4257
|
return {
|
|
3314
4258
|
dom,
|
|
3315
4259
|
graph,
|
|
3316
4260
|
instances: /* @__PURE__ */ new Map(),
|
|
3317
|
-
container,
|
|
4261
|
+
container: container2,
|
|
3318
4262
|
...hydrationDiagnostics !== void 0 ? { hydrationDiagnostics } : {},
|
|
3319
4263
|
...staticHTML !== void 0 ? { staticHTML } : {}
|
|
3320
4264
|
};
|
|
@@ -3412,6 +4356,13 @@ function applyProp(dom, element, name, value) {
|
|
|
3412
4356
|
}
|
|
3413
4357
|
return;
|
|
3414
4358
|
}
|
|
4359
|
+
if (name.startsWith("style.")) {
|
|
4360
|
+
const el = element;
|
|
4361
|
+
const prop = name.slice("style.".length);
|
|
4362
|
+
if (value === null || value === void 0) el.style.removeProperty(prop);
|
|
4363
|
+
else el.style.setProperty(prop, String(value));
|
|
4364
|
+
return;
|
|
4365
|
+
}
|
|
3415
4366
|
if (value === null || value === void 0 || value === false) {
|
|
3416
4367
|
dom.removeAttribute(element, name);
|
|
3417
4368
|
return;
|
|
@@ -3431,8 +4382,8 @@ function wireEvents(dom, graph, node, element, instance) {
|
|
|
3431
4382
|
if (handler === void 0) continue;
|
|
3432
4383
|
const domListener = (domEvent) => {
|
|
3433
4384
|
if (eventDesc.type === "input" || eventDesc.type === "change") {
|
|
3434
|
-
const
|
|
3435
|
-
handler(
|
|
4385
|
+
const input2 = domEvent.target;
|
|
4386
|
+
handler(input2.value);
|
|
3436
4387
|
} else if (eventDesc.type === "submit") {
|
|
3437
4388
|
domEvent.preventDefault();
|
|
3438
4389
|
handler(domEvent);
|
|
@@ -3776,7 +4727,7 @@ function nextFrame(cb) {
|
|
|
3776
4727
|
function splitClass(value) {
|
|
3777
4728
|
if (value === null) return [];
|
|
3778
4729
|
const out = [];
|
|
3779
|
-
for (const
|
|
4730
|
+
for (const t6 of value.split(/\s+/)) if (t6.length > 0) out.push(t6);
|
|
3780
4731
|
return out;
|
|
3781
4732
|
}
|
|
3782
4733
|
function addClasses(dom, el, classes2) {
|
|
@@ -4158,9 +5109,9 @@ function mountNode(ctx, graphNode, parentDom) {
|
|
|
4158
5109
|
return instance2;
|
|
4159
5110
|
}
|
|
4160
5111
|
if (graphNode.type === "text") {
|
|
4161
|
-
const
|
|
5112
|
+
const text2 = String(graphNode.getProp("text") ?? "");
|
|
4162
5113
|
const el2 = dom.createElement("span");
|
|
4163
|
-
const textNode = dom.createTextNode(
|
|
5114
|
+
const textNode = dom.createTextNode(text2);
|
|
4164
5115
|
dom.appendChild(el2, textNode);
|
|
4165
5116
|
applyNodeProps(ctx, graphNode, el2);
|
|
4166
5117
|
const instance2 = new NodeInstance(graphNode, el2);
|
|
@@ -4176,8 +5127,8 @@ function mountNode(ctx, graphNode, parentDom) {
|
|
|
4176
5127
|
const level = graphNode.getProp("level") ?? 1;
|
|
4177
5128
|
const tag2 = `h${level}`;
|
|
4178
5129
|
const el2 = dom.createElement(tag2);
|
|
4179
|
-
const
|
|
4180
|
-
dom.setTextContent(el2,
|
|
5130
|
+
const text2 = String(graphNode.getProp("text") ?? "");
|
|
5131
|
+
dom.setTextContent(el2, text2);
|
|
4181
5132
|
applyNodeProps(ctx, graphNode, el2);
|
|
4182
5133
|
const instance2 = new NodeInstance(graphNode, el2);
|
|
4183
5134
|
ctx.instances.set(graphNode.id, instance2);
|
|
@@ -4224,28 +5175,28 @@ function mountNode(ctx, graphNode, parentDom) {
|
|
|
4224
5175
|
}
|
|
4225
5176
|
if (graphNode.type === "code") {
|
|
4226
5177
|
const source = String(graphNode.getProp("text") ?? "");
|
|
4227
|
-
const
|
|
5178
|
+
const pre2 = dom.createElement("pre");
|
|
4228
5179
|
const codeEl = dom.createElement("code");
|
|
4229
5180
|
const textNode = dom.createTextNode(source);
|
|
4230
5181
|
dom.appendChild(codeEl, textNode);
|
|
4231
|
-
dom.appendChild(
|
|
4232
|
-
applyNodeProps(ctx, graphNode,
|
|
4233
|
-
const instance2 = new NodeInstance(graphNode,
|
|
5182
|
+
dom.appendChild(pre2, codeEl);
|
|
5183
|
+
applyNodeProps(ctx, graphNode, pre2);
|
|
5184
|
+
const instance2 = new NodeInstance(graphNode, pre2);
|
|
4234
5185
|
ctx.instances.set(graphNode.id, instance2);
|
|
4235
|
-
wireEvents(dom, graph, graphNode,
|
|
5186
|
+
wireEvents(dom, graph, graphNode, pre2, instance2);
|
|
4236
5187
|
if (graphNode.stateRefs.length !== 0) {
|
|
4237
|
-
wireSignalBindings(ctx, graphNode, instance2, textUpdate(dom,
|
|
5188
|
+
wireSignalBindings(ctx, graphNode, instance2, textUpdate(dom, pre2, textNode));
|
|
4238
5189
|
}
|
|
4239
|
-
dom.appendChild(parentDom,
|
|
5190
|
+
dom.appendChild(parentDom, pre2);
|
|
4240
5191
|
return instance2;
|
|
4241
5192
|
}
|
|
4242
5193
|
if (graphNode.type === "link") {
|
|
4243
5194
|
const el2 = dom.createElement("a");
|
|
4244
5195
|
const href = graphNode.getProp("href");
|
|
4245
|
-
const
|
|
5196
|
+
const label2 = graphNode.getProp("label");
|
|
4246
5197
|
const external = graphNode.getProp("external");
|
|
4247
5198
|
if (href !== void 0) dom.setAttribute(el2, "href", String(href));
|
|
4248
|
-
if (
|
|
5199
|
+
if (label2 !== void 0) dom.setTextContent(el2, String(label2));
|
|
4249
5200
|
if (external === true) {
|
|
4250
5201
|
dom.setAttribute(el2, "target", "_blank");
|
|
4251
5202
|
dom.setAttribute(el2, "rel", "noopener noreferrer");
|
|
@@ -4262,8 +5213,8 @@ function mountNode(ctx, graphNode, parentDom) {
|
|
|
4262
5213
|
}
|
|
4263
5214
|
if (graphNode.type === "button") {
|
|
4264
5215
|
const el2 = dom.createElement("button");
|
|
4265
|
-
const
|
|
4266
|
-
if (
|
|
5216
|
+
const label2 = graphNode.getProp("label");
|
|
5217
|
+
if (label2 !== void 0) dom.setTextContent(el2, String(label2));
|
|
4267
5218
|
const disabled = graphNode.getProp("disabled");
|
|
4268
5219
|
if (disabled === true) dom.setAttribute(el2, "disabled", "");
|
|
4269
5220
|
applyNodeProps(ctx, graphNode, el2);
|
|
@@ -4296,13 +5247,13 @@ function mountNode(ctx, graphNode, parentDom) {
|
|
|
4296
5247
|
applyNodeProps(ctx, graphNode, anchor);
|
|
4297
5248
|
const instance2 = new NodeInstance(graphNode, anchor);
|
|
4298
5249
|
ctx.instances.set(graphNode.id, instance2);
|
|
4299
|
-
const
|
|
5250
|
+
const body2 = dom.body();
|
|
4300
5251
|
let target = anchor;
|
|
4301
|
-
if (
|
|
5252
|
+
if (body2 !== null) {
|
|
4302
5253
|
const portalContainer = dom.createElement("div");
|
|
4303
5254
|
dom.setAttribute(portalContainer, "data-streetui-portal-container", "");
|
|
4304
|
-
dom.appendChild(
|
|
4305
|
-
instance2.trackCleanup(() => dom.removeChild(
|
|
5255
|
+
dom.appendChild(body2, portalContainer);
|
|
5256
|
+
instance2.trackCleanup(() => dom.removeChild(body2, portalContainer));
|
|
4306
5257
|
target = portalContainer;
|
|
4307
5258
|
}
|
|
4308
5259
|
for (const child of graphNode.children) {
|
|
@@ -4541,6 +5492,173 @@ function wireComponentBehavior(ctx, graphNode, instance) {
|
|
|
4541
5492
|
for (const cleanup of fn()) instance.trackCleanup(cleanup);
|
|
4542
5493
|
}
|
|
4543
5494
|
|
|
5495
|
+
// ../renderer/src/styling-transitions.ts
|
|
5496
|
+
var DURATION_MS = { fast: 120, base: 200, slow: 320 };
|
|
5497
|
+
function activeClass(props, duration, easing) {
|
|
5498
|
+
return style({ transition: transition(props, { duration, easing }) });
|
|
5499
|
+
}
|
|
5500
|
+
function fadeTransition(opts = {}) {
|
|
5501
|
+
const duration = opts.duration ?? "base";
|
|
5502
|
+
const easing = opts.easing ?? "standard";
|
|
5503
|
+
const active = activeClass(["opacity"], duration, easing);
|
|
5504
|
+
const hidden = style({ opacity: 0 });
|
|
5505
|
+
const shown = style({ opacity: 1 });
|
|
5506
|
+
return {
|
|
5507
|
+
enterActive: [active],
|
|
5508
|
+
enterFrom: [hidden],
|
|
5509
|
+
enterTo: [shown],
|
|
5510
|
+
leaveActive: [active],
|
|
5511
|
+
leaveFrom: [shown],
|
|
5512
|
+
leaveTo: [hidden],
|
|
5513
|
+
appear: opts.appear ?? false,
|
|
5514
|
+
duration: DURATION_MS[duration]
|
|
5515
|
+
};
|
|
5516
|
+
}
|
|
5517
|
+
function scaleTransition(opts = {}) {
|
|
5518
|
+
const duration = opts.duration ?? "base";
|
|
5519
|
+
const easing = opts.easing ?? "emphasized";
|
|
5520
|
+
const active = activeClass(["opacity", "transform"], duration, easing);
|
|
5521
|
+
const hidden = style({ opacity: 0, transform: "scale(.96)" });
|
|
5522
|
+
const shown = style({ opacity: 1, transform: "scale(1)" });
|
|
5523
|
+
return {
|
|
5524
|
+
enterActive: [active],
|
|
5525
|
+
enterFrom: [hidden],
|
|
5526
|
+
enterTo: [shown],
|
|
5527
|
+
leaveActive: [active],
|
|
5528
|
+
leaveFrom: [shown],
|
|
5529
|
+
leaveTo: [hidden],
|
|
5530
|
+
appear: opts.appear ?? false,
|
|
5531
|
+
duration: DURATION_MS[duration]
|
|
5532
|
+
};
|
|
5533
|
+
}
|
|
5534
|
+
function slideTransition(opts = {}) {
|
|
5535
|
+
const duration = opts.duration ?? "base";
|
|
5536
|
+
const easing = opts.easing ?? "standard";
|
|
5537
|
+
const active = activeClass(["opacity", "transform"], duration, easing);
|
|
5538
|
+
const hidden = style({ opacity: 0, transform: "translateY(8px)" });
|
|
5539
|
+
const shown = style({ opacity: 1, transform: "translateY(0)" });
|
|
5540
|
+
return {
|
|
5541
|
+
enterActive: [active],
|
|
5542
|
+
enterFrom: [hidden],
|
|
5543
|
+
enterTo: [shown],
|
|
5544
|
+
leaveActive: [active],
|
|
5545
|
+
leaveFrom: [shown],
|
|
5546
|
+
leaveTo: [hidden],
|
|
5547
|
+
appear: opts.appear ?? false,
|
|
5548
|
+
duration: DURATION_MS[duration]
|
|
5549
|
+
};
|
|
5550
|
+
}
|
|
5551
|
+
var transitions = { fadeTransition, scaleTransition, slideTransition };
|
|
5552
|
+
|
|
5553
|
+
// ../renderer/src/styles.ts
|
|
5554
|
+
var CSS_MARKER = "data-streetui-css";
|
|
5555
|
+
var CSS_KEYS = "data-streetui-css-keys";
|
|
5556
|
+
function renderStyles(options = {}) {
|
|
5557
|
+
const registry = options.registry ?? styleRegistry;
|
|
5558
|
+
const css = registry.serializeCSS();
|
|
5559
|
+
if (css.length === 0) return "";
|
|
5560
|
+
const keys = registry.identities().join(" ");
|
|
5561
|
+
return `<style ${CSS_MARKER} ${CSS_KEYS}="${keys}">${css}</style>`;
|
|
5562
|
+
}
|
|
5563
|
+
function adoptServerStyles(dom, root, options = {}) {
|
|
5564
|
+
const registry = options.registry ?? styleRegistry;
|
|
5565
|
+
const el = findStyleBlock(dom, root);
|
|
5566
|
+
if (el === null) return 0;
|
|
5567
|
+
const keysAttr = dom.getAttribute(el, CSS_KEYS);
|
|
5568
|
+
if (keysAttr === null || keysAttr.length === 0) {
|
|
5569
|
+
registry.adoptServerIdentities([]);
|
|
5570
|
+
return 0;
|
|
5571
|
+
}
|
|
5572
|
+
const ids = keysAttr.split(" ").filter((s) => s.length > 0);
|
|
5573
|
+
registry.adoptServerIdentities(ids);
|
|
5574
|
+
return ids.length;
|
|
5575
|
+
}
|
|
5576
|
+
function findStyleBlock(dom, root) {
|
|
5577
|
+
const head = dom.head();
|
|
5578
|
+
const scope = root ?? head;
|
|
5579
|
+
if (scope === null) return null;
|
|
5580
|
+
return searchDescendants(dom, scope);
|
|
5581
|
+
}
|
|
5582
|
+
function searchDescendants(dom, el) {
|
|
5583
|
+
if (dom.isElement(el) && dom.getAttribute(el, CSS_MARKER) !== null) return el;
|
|
5584
|
+
for (const child of dom.childNodes(el)) {
|
|
5585
|
+
if (!dom.isElement(child)) continue;
|
|
5586
|
+
const found = searchDescendants(dom, child);
|
|
5587
|
+
if (found !== null) return found;
|
|
5588
|
+
}
|
|
5589
|
+
return null;
|
|
5590
|
+
}
|
|
5591
|
+
|
|
5592
|
+
// ../renderer/src/theme.ts
|
|
5593
|
+
var DEFAULT_STORAGE_KEY = "streetui-theme";
|
|
5594
|
+
var CHOICES = ["light", "dark", "system"];
|
|
5595
|
+
function defaultThemeStorage(key = DEFAULT_STORAGE_KEY) {
|
|
5596
|
+
try {
|
|
5597
|
+
if (typeof localStorage !== "undefined") {
|
|
5598
|
+
return {
|
|
5599
|
+
read() {
|
|
5600
|
+
const v = localStorage.getItem(key);
|
|
5601
|
+
return v === "light" || v === "dark" || v === "system" ? v : null;
|
|
5602
|
+
},
|
|
5603
|
+
write(choice) {
|
|
5604
|
+
try {
|
|
5605
|
+
localStorage.setItem(key, choice);
|
|
5606
|
+
} catch {
|
|
5607
|
+
}
|
|
5608
|
+
}
|
|
5609
|
+
};
|
|
5610
|
+
}
|
|
5611
|
+
} catch {
|
|
5612
|
+
}
|
|
5613
|
+
let mem = null;
|
|
5614
|
+
return { read: () => mem, write: (c) => {
|
|
5615
|
+
mem = c;
|
|
5616
|
+
} };
|
|
5617
|
+
}
|
|
5618
|
+
function systemPrefersDark() {
|
|
5619
|
+
try {
|
|
5620
|
+
return typeof matchMedia !== "undefined" && matchMedia("(prefers-color-scheme: dark)").matches;
|
|
5621
|
+
} catch {
|
|
5622
|
+
return false;
|
|
5623
|
+
}
|
|
5624
|
+
}
|
|
5625
|
+
function createTheme(options = {}) {
|
|
5626
|
+
const storage = options.storage ?? defaultThemeStorage();
|
|
5627
|
+
const choice = signal(storage.read() ?? options.initial ?? "system");
|
|
5628
|
+
const resolved = derived(() => {
|
|
5629
|
+
const c = choice.get();
|
|
5630
|
+
if (c === "system") return systemPrefersDark() ? "dark" : "light";
|
|
5631
|
+
return c;
|
|
5632
|
+
});
|
|
5633
|
+
const label2 = derived(() => {
|
|
5634
|
+
const c = choice.get();
|
|
5635
|
+
return c === "light" ? "Theme: Light" : c === "dark" ? "Theme: Dark" : "Theme: System";
|
|
5636
|
+
});
|
|
5637
|
+
const root = options.root ?? (typeof document !== "undefined" ? document.documentElement : null);
|
|
5638
|
+
const stop = root !== null ? effect(() => {
|
|
5639
|
+
root.setAttribute("data-theme", resolved.get());
|
|
5640
|
+
}) : () => {
|
|
5641
|
+
};
|
|
5642
|
+
return {
|
|
5643
|
+
choice,
|
|
5644
|
+
resolved,
|
|
5645
|
+
label: label2,
|
|
5646
|
+
set(next) {
|
|
5647
|
+
choice.set(next);
|
|
5648
|
+
storage.write(next);
|
|
5649
|
+
},
|
|
5650
|
+
cycle() {
|
|
5651
|
+
const i = CHOICES.indexOf(choice.get());
|
|
5652
|
+
const next = CHOICES[(i + 1) % CHOICES.length];
|
|
5653
|
+
choice.set(next);
|
|
5654
|
+
storage.write(next);
|
|
5655
|
+
},
|
|
5656
|
+
dispose() {
|
|
5657
|
+
stop();
|
|
5658
|
+
}
|
|
5659
|
+
};
|
|
5660
|
+
}
|
|
5661
|
+
|
|
4544
5662
|
// ../renderer/src/hydration-diagnostics.ts
|
|
4545
5663
|
function formatHydrationDiagnostic(d) {
|
|
4546
5664
|
const at = ` at ${d.path}`;
|
|
@@ -4671,16 +5789,16 @@ function hydrateNode(ctx, graphNode, domNode, path) {
|
|
|
4671
5789
|
case "portal": {
|
|
4672
5790
|
const instance = new NodeInstance(graphNode, domNode);
|
|
4673
5791
|
ctx.instances.set(graphNode.id, instance);
|
|
4674
|
-
const
|
|
5792
|
+
const body2 = dom.body();
|
|
4675
5793
|
let target = domNode;
|
|
4676
|
-
if (
|
|
5794
|
+
if (body2 !== null) {
|
|
4677
5795
|
const portalContainer = dom.createElement("div");
|
|
4678
5796
|
dom.setAttribute(portalContainer, "data-streetui-portal-container", "");
|
|
4679
5797
|
for (const child of dom.childNodes(domNode)) {
|
|
4680
5798
|
dom.appendChild(portalContainer, child);
|
|
4681
5799
|
}
|
|
4682
|
-
dom.appendChild(
|
|
4683
|
-
instance.trackCleanup(() => dom.removeChild(
|
|
5800
|
+
dom.appendChild(body2, portalContainer);
|
|
5801
|
+
instance.trackCleanup(() => dom.removeChild(body2, portalContainer));
|
|
4684
5802
|
target = portalContainer;
|
|
4685
5803
|
}
|
|
4686
5804
|
hydrateChildren(ctx, graphNode, instance, target, path);
|
|
@@ -4825,9 +5943,9 @@ var StreetRenderHandle = class {
|
|
|
4825
5943
|
this._disposed = true;
|
|
4826
5944
|
this._rootInstance.dispose();
|
|
4827
5945
|
const dom = this._ctx.dom;
|
|
4828
|
-
const
|
|
4829
|
-
for (const child of dom.childNodes(
|
|
4830
|
-
dom.removeChild(
|
|
5946
|
+
const container2 = this._ctx.container;
|
|
5947
|
+
for (const child of dom.childNodes(container2)) {
|
|
5948
|
+
dom.removeChild(container2, child);
|
|
4831
5949
|
}
|
|
4832
5950
|
this._ctx.instances.clear();
|
|
4833
5951
|
}
|
|
@@ -4843,8 +5961,8 @@ var StreetRendererImpl = class {
|
|
|
4843
5961
|
this._hydrationDiagnostics = options.hydrationDiagnostics;
|
|
4844
5962
|
}
|
|
4845
5963
|
}
|
|
4846
|
-
mount(compiled,
|
|
4847
|
-
const ctx = createRenderContext(this._dom, compiled.graph,
|
|
5964
|
+
mount(compiled, container2) {
|
|
5965
|
+
const ctx = createRenderContext(this._dom, compiled.graph, container2);
|
|
4848
5966
|
const rootInstance = mountGraph(ctx);
|
|
4849
5967
|
this._wireSignals(ctx, rootInstance);
|
|
4850
5968
|
return new StreetRenderHandle(ctx, rootInstance);
|
|
@@ -4856,11 +5974,11 @@ var StreetRendererImpl = class {
|
|
|
4856
5974
|
* behavior (events + signal subscriptions). Mismatched subtrees are locally
|
|
4857
5975
|
* replaced. Returns the same handle type as `mount`.
|
|
4858
5976
|
*/
|
|
4859
|
-
hydrate(compiled,
|
|
5977
|
+
hydrate(compiled, container2) {
|
|
4860
5978
|
const ctx = createRenderContext(
|
|
4861
5979
|
this._dom,
|
|
4862
5980
|
compiled.graph,
|
|
4863
|
-
|
|
5981
|
+
container2,
|
|
4864
5982
|
this._hydrationDiagnostics
|
|
4865
5983
|
);
|
|
4866
5984
|
const rootInstance = hydrateGraph(ctx);
|
|
@@ -4879,12 +5997,12 @@ var STATE_MARKER_ATTR = "data-streetui-state";
|
|
|
4879
5997
|
function escapeForScript(json) {
|
|
4880
5998
|
let out = "";
|
|
4881
5999
|
for (const ch of json) {
|
|
4882
|
-
const
|
|
6000
|
+
const code2 = ch.charCodeAt(0);
|
|
4883
6001
|
if (ch === "<") out += "\\u003c";
|
|
4884
6002
|
else if (ch === ">") out += "\\u003e";
|
|
4885
6003
|
else if (ch === "&") out += "\\u0026";
|
|
4886
|
-
else if (
|
|
4887
|
-
else if (
|
|
6004
|
+
else if (code2 === 8232) out += "\\u2028";
|
|
6005
|
+
else if (code2 === 8233) out += "\\u2029";
|
|
4888
6006
|
else out += ch;
|
|
4889
6007
|
}
|
|
4890
6008
|
return out;
|
|
@@ -4897,10 +6015,10 @@ function serializeState(state) {
|
|
|
4897
6015
|
function readState(dom, root) {
|
|
4898
6016
|
const el = dom.querySelector(root, `script[${STATE_MARKER_ATTR}]`);
|
|
4899
6017
|
if (el === null) return {};
|
|
4900
|
-
const
|
|
4901
|
-
if (
|
|
6018
|
+
const text2 = dom.getTextContent(el);
|
|
6019
|
+
if (text2 === null || text2.length === 0) return {};
|
|
4902
6020
|
try {
|
|
4903
|
-
const parsed = JSON.parse(
|
|
6021
|
+
const parsed = JSON.parse(text2);
|
|
4904
6022
|
if (parsed !== null && typeof parsed === "object") {
|
|
4905
6023
|
return parsed;
|
|
4906
6024
|
}
|
|
@@ -4985,10 +6103,10 @@ function collectMaximalStaticRoots(graph) {
|
|
|
4985
6103
|
return roots;
|
|
4986
6104
|
}
|
|
4987
6105
|
function serializeStaticSubtree(dom, graph, root) {
|
|
4988
|
-
const
|
|
4989
|
-
const ctx = createRenderContext(dom, graph,
|
|
4990
|
-
const instance = mountNode(ctx, root,
|
|
4991
|
-
const html = dom.serializeInner(
|
|
6106
|
+
const container2 = dom.createElement("div");
|
|
6107
|
+
const ctx = createRenderContext(dom, graph, container2);
|
|
6108
|
+
const instance = mountNode(ctx, root, container2);
|
|
6109
|
+
const html = dom.serializeInner(container2);
|
|
4992
6110
|
instance.dispose();
|
|
4993
6111
|
ctx.instances.clear();
|
|
4994
6112
|
return html;
|
|
@@ -5019,10 +6137,10 @@ function renderToString(compiled, options = {}) {
|
|
|
5019
6137
|
const dom = options.domAdapter ?? new ServerDOMAdapter();
|
|
5020
6138
|
const plan = options.staticPlan === null ? void 0 : options.staticPlan ?? getStaticSSRPlan(compiled);
|
|
5021
6139
|
const staticHTML = plan !== void 0 && plan.size > 0 ? plan : void 0;
|
|
5022
|
-
const
|
|
5023
|
-
const ctx = createRenderContext(dom, compiled.graph,
|
|
6140
|
+
const container2 = dom.createElement("div");
|
|
6141
|
+
const ctx = createRenderContext(dom, compiled.graph, container2, void 0, staticHTML);
|
|
5024
6142
|
const rootInstance = mountGraph(ctx);
|
|
5025
|
-
const html = dom.serializeInner(
|
|
6143
|
+
const html = dom.serializeInner(container2);
|
|
5026
6144
|
rootInstance.dispose();
|
|
5027
6145
|
ctx.instances.clear();
|
|
5028
6146
|
return html;
|
|
@@ -5137,20 +6255,20 @@ function createMemoryHistory(initial = "/") {
|
|
|
5137
6255
|
if (qIndex < 0) return buildLocation(entry, "");
|
|
5138
6256
|
return buildLocation(entry.slice(0, qIndex), entry.slice(qIndex + 1));
|
|
5139
6257
|
};
|
|
5140
|
-
const
|
|
6258
|
+
const stack2 = [initial];
|
|
5141
6259
|
let index = 0;
|
|
5142
6260
|
return {
|
|
5143
6261
|
location() {
|
|
5144
|
-
return parse(
|
|
6262
|
+
return parse(stack2[index]);
|
|
5145
6263
|
},
|
|
5146
6264
|
push(pathname, search) {
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
index =
|
|
6265
|
+
stack2.splice(index + 1);
|
|
6266
|
+
stack2.push(toUrl(pathname, search));
|
|
6267
|
+
index = stack2.length - 1;
|
|
5150
6268
|
notify();
|
|
5151
6269
|
},
|
|
5152
6270
|
replace(pathname, search) {
|
|
5153
|
-
|
|
6271
|
+
stack2[index] = toUrl(pathname, search);
|
|
5154
6272
|
notify();
|
|
5155
6273
|
},
|
|
5156
6274
|
back() {
|
|
@@ -5160,7 +6278,7 @@ function createMemoryHistory(initial = "/") {
|
|
|
5160
6278
|
}
|
|
5161
6279
|
},
|
|
5162
6280
|
forward() {
|
|
5163
|
-
if (index <
|
|
6281
|
+
if (index < stack2.length - 1) {
|
|
5164
6282
|
index++;
|
|
5165
6283
|
notify();
|
|
5166
6284
|
}
|
|
@@ -5260,7 +6378,7 @@ function isExternalHref(href) {
|
|
|
5260
6378
|
href.startsWith("//");
|
|
5261
6379
|
}
|
|
5262
6380
|
function mountRouter(router, options) {
|
|
5263
|
-
const { container } = options;
|
|
6381
|
+
const { container: container2 } = options;
|
|
5264
6382
|
const renderer = options.renderer ?? createRenderer();
|
|
5265
6383
|
const outletId = options.outletId ?? ROUTER_OUTLET_ID;
|
|
5266
6384
|
const interceptLinks = options.interceptLinks ?? true;
|
|
@@ -5278,8 +6396,8 @@ function mountRouter(router, options) {
|
|
|
5278
6396
|
node.setProp("_hydrationBoundary", true);
|
|
5279
6397
|
}
|
|
5280
6398
|
}
|
|
5281
|
-
shellMounted = hydrateMode ? shellRuntime.hydrate(shellCompiled,
|
|
5282
|
-
const found =
|
|
6399
|
+
shellMounted = hydrateMode ? shellRuntime.hydrate(shellCompiled, container2) : shellRuntime.mount(shellCompiled, container2);
|
|
6400
|
+
const found = container2.querySelector(`[id="${outletId}"]`);
|
|
5283
6401
|
if (found === null) {
|
|
5284
6402
|
throw new Error(
|
|
5285
6403
|
`[Router] The shell must contain a route outlet. Call routerOutlet(scope) (or add a container with id="${outletId}") inside your shell builder.`
|
|
@@ -5287,7 +6405,7 @@ function mountRouter(router, options) {
|
|
|
5287
6405
|
}
|
|
5288
6406
|
outlet = found;
|
|
5289
6407
|
} else {
|
|
5290
|
-
outlet =
|
|
6408
|
+
outlet = container2;
|
|
5291
6409
|
}
|
|
5292
6410
|
const routeTransition = options.transition !== void 0 ? resolveTransition(options.transition) : void 0;
|
|
5293
6411
|
const txDom = routeTransition !== void 0 ? new BrowserDOMAdapter() : void 0;
|
|
@@ -5400,12 +6518,12 @@ function mountRouter(router, options) {
|
|
|
5400
6518
|
router.navigate(href);
|
|
5401
6519
|
};
|
|
5402
6520
|
if (interceptLinks) {
|
|
5403
|
-
|
|
6521
|
+
container2.addEventListener("click", onClick);
|
|
5404
6522
|
}
|
|
5405
6523
|
return {
|
|
5406
6524
|
outlet,
|
|
5407
6525
|
unmount() {
|
|
5408
|
-
if (interceptLinks)
|
|
6526
|
+
if (interceptLinks) container2.removeEventListener("click", onClick);
|
|
5409
6527
|
stopRouteSub();
|
|
5410
6528
|
for (const [route, run] of pendingLeaves) {
|
|
5411
6529
|
run.cancel();
|
|
@@ -5438,8 +6556,8 @@ function pattern(regex, message = "Invalid format") {
|
|
|
5438
6556
|
}
|
|
5439
6557
|
function runValidators(value, validators) {
|
|
5440
6558
|
if (validators === void 0) return void 0;
|
|
5441
|
-
const
|
|
5442
|
-
for (const validate of
|
|
6559
|
+
const list2 = Array.isArray(validators) ? validators : [validators];
|
|
6560
|
+
for (const validate of list2) {
|
|
5443
6561
|
const error = validate(value);
|
|
5444
6562
|
if (error !== void 0) return error;
|
|
5445
6563
|
}
|
|
@@ -5491,31 +6609,31 @@ function createForm(config) {
|
|
|
5491
6609
|
};
|
|
5492
6610
|
fields.set(name, { api, value, touched, error, valid: valid2, dirty: dirty2, initial, unsub });
|
|
5493
6611
|
}
|
|
5494
|
-
const
|
|
6612
|
+
const field2 = (name) => {
|
|
5495
6613
|
const f = fields.get(name);
|
|
5496
6614
|
if (f === void 0) throw new Error(`Unknown form field: ${name}`);
|
|
5497
6615
|
return f;
|
|
5498
6616
|
};
|
|
5499
6617
|
const values = derived(() => {
|
|
5500
6618
|
const out = {};
|
|
5501
|
-
for (const name of names) out[name] =
|
|
6619
|
+
for (const name of names) out[name] = field2(name).value.get();
|
|
5502
6620
|
return out;
|
|
5503
6621
|
});
|
|
5504
6622
|
const errors = derived(() => {
|
|
5505
6623
|
const out = {};
|
|
5506
6624
|
for (const name of names) {
|
|
5507
|
-
const e =
|
|
6625
|
+
const e = field2(name).error.get();
|
|
5508
6626
|
if (e !== void 0) out[name] = e;
|
|
5509
6627
|
}
|
|
5510
6628
|
return out;
|
|
5511
6629
|
});
|
|
5512
6630
|
const touchedMap = derived(() => {
|
|
5513
6631
|
const out = {};
|
|
5514
|
-
for (const name of names) out[name] =
|
|
6632
|
+
for (const name of names) out[name] = field2(name).touched.get();
|
|
5515
6633
|
return out;
|
|
5516
6634
|
});
|
|
5517
|
-
const dirty = derived(() => names.some((n) =>
|
|
5518
|
-
const valid = derived(() => names.every((n) =>
|
|
6635
|
+
const dirty = derived(() => names.some((n) => field2(n).dirty.get()));
|
|
6636
|
+
const valid = derived(() => names.every((n) => field2(n).valid.get()));
|
|
5519
6637
|
const status = signal("idle");
|
|
5520
6638
|
const submitting = derived(() => status.get() === "submitting");
|
|
5521
6639
|
const submitted = derived(() => status.get() === "success");
|
|
@@ -5526,7 +6644,7 @@ function createForm(config) {
|
|
|
5526
6644
|
batch(() => {
|
|
5527
6645
|
for (const name of names) {
|
|
5528
6646
|
const next = partial[name];
|
|
5529
|
-
if (next !== void 0)
|
|
6647
|
+
if (next !== void 0) field2(name).value.set(next);
|
|
5530
6648
|
}
|
|
5531
6649
|
});
|
|
5532
6650
|
} finally {
|
|
@@ -5538,7 +6656,7 @@ function createForm(config) {
|
|
|
5538
6656
|
try {
|
|
5539
6657
|
batch(() => {
|
|
5540
6658
|
for (const name of names) {
|
|
5541
|
-
const f =
|
|
6659
|
+
const f = field2(name);
|
|
5542
6660
|
f.value.set(f.initial);
|
|
5543
6661
|
f.touched.set(false);
|
|
5544
6662
|
}
|
|
@@ -5551,7 +6669,7 @@ function createForm(config) {
|
|
|
5551
6669
|
}
|
|
5552
6670
|
async function submit() {
|
|
5553
6671
|
batch(() => {
|
|
5554
|
-
for (const name of names)
|
|
6672
|
+
for (const name of names) field2(name).touched.set(true);
|
|
5555
6673
|
});
|
|
5556
6674
|
if (!valid.peek()) {
|
|
5557
6675
|
return;
|
|
@@ -5591,7 +6709,7 @@ function createForm(config) {
|
|
|
5591
6709
|
submitted,
|
|
5592
6710
|
status,
|
|
5593
6711
|
submitError,
|
|
5594
|
-
field: (name) =>
|
|
6712
|
+
field: (name) => field2(name).api,
|
|
5595
6713
|
setValues,
|
|
5596
6714
|
submit,
|
|
5597
6715
|
reset,
|
|
@@ -5602,23 +6720,23 @@ function createForm(config) {
|
|
|
5602
6720
|
// ../context/src/context.ts
|
|
5603
6721
|
function createContext(defaultValue, description) {
|
|
5604
6722
|
const id = Symbol(description ?? "streetui.context");
|
|
5605
|
-
const
|
|
6723
|
+
const stack2 = [];
|
|
5606
6724
|
return {
|
|
5607
6725
|
id,
|
|
5608
6726
|
defaultValue,
|
|
5609
6727
|
provide(value, run) {
|
|
5610
|
-
|
|
6728
|
+
stack2.push(value);
|
|
5611
6729
|
try {
|
|
5612
6730
|
return run();
|
|
5613
6731
|
} finally {
|
|
5614
|
-
|
|
6732
|
+
stack2.pop();
|
|
5615
6733
|
}
|
|
5616
6734
|
},
|
|
5617
6735
|
consume() {
|
|
5618
|
-
return
|
|
6736
|
+
return stack2.length > 0 ? stack2[stack2.length - 1] : defaultValue;
|
|
5619
6737
|
},
|
|
5620
6738
|
hasProvider() {
|
|
5621
|
-
return
|
|
6739
|
+
return stack2.length > 0;
|
|
5622
6740
|
}
|
|
5623
6741
|
};
|
|
5624
6742
|
}
|
|
@@ -5738,7 +6856,7 @@ function inspectComponents(graph) {
|
|
|
5738
6856
|
}
|
|
5739
6857
|
function inspectInteractions(graph) {
|
|
5740
6858
|
const overlays = [];
|
|
5741
|
-
const
|
|
6859
|
+
const transitions2 = [];
|
|
5742
6860
|
graph.walk((node, depth) => {
|
|
5743
6861
|
const overlayFn = graph.getHandler(`__overlay__${node.id}`);
|
|
5744
6862
|
if (overlayFn !== void 0) {
|
|
@@ -5757,18 +6875,18 @@ function inspectInteractions(graph) {
|
|
|
5757
6875
|
}
|
|
5758
6876
|
const transitionFn = graph.getHandler(`__transition__${node.id}`);
|
|
5759
6877
|
if (transitionFn !== void 0) {
|
|
5760
|
-
const
|
|
5761
|
-
|
|
6878
|
+
const t6 = transitionFn();
|
|
6879
|
+
transitions2.push({
|
|
5762
6880
|
id: node.id,
|
|
5763
6881
|
key: node.key,
|
|
5764
6882
|
nodeType: node.type,
|
|
5765
|
-
duration:
|
|
5766
|
-
appear:
|
|
6883
|
+
duration: t6.duration,
|
|
6884
|
+
appear: t6.appear,
|
|
5767
6885
|
depth
|
|
5768
6886
|
});
|
|
5769
6887
|
}
|
|
5770
6888
|
});
|
|
5771
|
-
return { overlays, transitions };
|
|
6889
|
+
return { overlays, transitions: transitions2 };
|
|
5772
6890
|
}
|
|
5773
6891
|
|
|
5774
6892
|
// ../devtools/src/application.ts
|
|
@@ -5836,39 +6954,39 @@ var DEFAULT_PERF_THRESHOLDS = {
|
|
|
5836
6954
|
maxSignals: 1e3
|
|
5837
6955
|
};
|
|
5838
6956
|
function diagnosePerformance(compiled, thresholds = {}) {
|
|
5839
|
-
const
|
|
6957
|
+
const t6 = { ...DEFAULT_PERF_THRESHOLDS, ...thresholds };
|
|
5840
6958
|
const { perf } = inspectApplication(compiled);
|
|
5841
6959
|
const out = [];
|
|
5842
|
-
if (perf.totalNodes >
|
|
6960
|
+
if (perf.totalNodes > t6.maxNodes) {
|
|
5843
6961
|
out.push({
|
|
5844
6962
|
code: "large-graph",
|
|
5845
|
-
message: `Graph has ${perf.totalNodes} nodes (> ${
|
|
6963
|
+
message: `Graph has ${perf.totalNodes} nodes (> ${t6.maxNodes}); consider splitting the view or paginating.`,
|
|
5846
6964
|
observed: perf.totalNodes,
|
|
5847
|
-
threshold:
|
|
6965
|
+
threshold: t6.maxNodes
|
|
5848
6966
|
});
|
|
5849
6967
|
}
|
|
5850
|
-
if (perf.maxDepth >
|
|
6968
|
+
if (perf.maxDepth > t6.maxDepth) {
|
|
5851
6969
|
out.push({
|
|
5852
6970
|
code: "deep-tree",
|
|
5853
|
-
message: `Graph nests ${perf.maxDepth} levels deep (> ${
|
|
6971
|
+
message: `Graph nests ${perf.maxDepth} levels deep (> ${t6.maxDepth}); deep trees slow mount and reconciliation.`,
|
|
5854
6972
|
observed: perf.maxDepth,
|
|
5855
|
-
threshold:
|
|
6973
|
+
threshold: t6.maxDepth
|
|
5856
6974
|
});
|
|
5857
6975
|
}
|
|
5858
|
-
if (perf.largestChildCount >
|
|
6976
|
+
if (perf.largestChildCount > t6.maxChildCount) {
|
|
5859
6977
|
out.push({
|
|
5860
6978
|
code: "large-list",
|
|
5861
|
-
message: `A single node has ${perf.largestChildCount} children (> ${
|
|
6979
|
+
message: `A single node has ${perf.largestChildCount} children (> ${t6.maxChildCount}); large un-windowed lists dominate DOM cost.`,
|
|
5862
6980
|
observed: perf.largestChildCount,
|
|
5863
|
-
threshold:
|
|
6981
|
+
threshold: t6.maxChildCount
|
|
5864
6982
|
});
|
|
5865
6983
|
}
|
|
5866
|
-
if (perf.distinctSignals >
|
|
6984
|
+
if (perf.distinctSignals > t6.maxSignals) {
|
|
5867
6985
|
out.push({
|
|
5868
6986
|
code: "high-signal-fanout",
|
|
5869
|
-
message: `${perf.distinctSignals} distinct signals are bound (> ${
|
|
6987
|
+
message: `${perf.distinctSignals} distinct signals are bound (> ${t6.maxSignals}); heavy reactive fan-out increases update overhead.`,
|
|
5870
6988
|
observed: perf.distinctSignals,
|
|
5871
|
-
threshold:
|
|
6989
|
+
threshold: t6.maxSignals
|
|
5872
6990
|
});
|
|
5873
6991
|
}
|
|
5874
6992
|
return out;
|
|
@@ -5941,10 +7059,10 @@ function inspectRouter(router) {
|
|
|
5941
7059
|
isFallback: match.isFallback === true
|
|
5942
7060
|
};
|
|
5943
7061
|
}
|
|
5944
|
-
function inspectForm(
|
|
5945
|
-
const values =
|
|
5946
|
-
const errorsRaw =
|
|
5947
|
-
const touchedRaw =
|
|
7062
|
+
function inspectForm(form2, options = {}) {
|
|
7063
|
+
const values = form2.values.peek();
|
|
7064
|
+
const errorsRaw = form2.errors.peek();
|
|
7065
|
+
const touchedRaw = form2.touched.peek();
|
|
5948
7066
|
const errors = {};
|
|
5949
7067
|
for (const [k, v] of Object.entries(errorsRaw)) if (v !== void 0) errors[k] = v;
|
|
5950
7068
|
const touched = {};
|
|
@@ -5953,9 +7071,9 @@ function inspectForm(form, options = {}) {
|
|
|
5953
7071
|
fields: Object.keys(values),
|
|
5954
7072
|
errors,
|
|
5955
7073
|
touched,
|
|
5956
|
-
dirty:
|
|
5957
|
-
valid:
|
|
5958
|
-
status:
|
|
7074
|
+
dirty: form2.dirty.peek(),
|
|
7075
|
+
valid: form2.valid.peek(),
|
|
7076
|
+
status: form2.status.peek()
|
|
5959
7077
|
};
|
|
5960
7078
|
if (options.includeValues !== true) return base;
|
|
5961
7079
|
return { ...base, values: { ...values } };
|
|
@@ -5984,8 +7102,8 @@ function inspectEvents(graph) {
|
|
|
5984
7102
|
graph.walk((node, depth) => {
|
|
5985
7103
|
if (node.events.length === 0) return;
|
|
5986
7104
|
const types = node.events.map((e) => e.type);
|
|
5987
|
-
for (const
|
|
5988
|
-
byType[
|
|
7105
|
+
for (const t6 of types) {
|
|
7106
|
+
byType[t6] = (byType[t6] ?? 0) + 1;
|
|
5989
7107
|
totalHandlers += 1;
|
|
5990
7108
|
}
|
|
5991
7109
|
nodes.push({
|
|
@@ -6101,8 +7219,8 @@ function capture(compiled, sources, options) {
|
|
|
6101
7219
|
};
|
|
6102
7220
|
const live = {};
|
|
6103
7221
|
if (sources.signals !== void 0) {
|
|
6104
|
-
for (const [
|
|
6105
|
-
live[
|
|
7222
|
+
for (const [label2, sig] of Object.entries(sources.signals)) {
|
|
7223
|
+
live[label2] = inspectSignal(
|
|
6106
7224
|
sig,
|
|
6107
7225
|
options.redactSignals !== void 0 ? { redact: options.redactSignals } : {}
|
|
6108
7226
|
);
|
|
@@ -6154,7 +7272,7 @@ function capture(compiled, sources, options) {
|
|
|
6154
7272
|
}
|
|
6155
7273
|
function mapInspect(source, inspect) {
|
|
6156
7274
|
const out = {};
|
|
6157
|
-
for (const [
|
|
7275
|
+
for (const [label2, value] of Object.entries(source)) out[label2] = inspect(value);
|
|
6158
7276
|
return out;
|
|
6159
7277
|
}
|
|
6160
7278
|
function findNode(node, id) {
|
|
@@ -6176,8 +7294,8 @@ function formatSnapshot(s) {
|
|
|
6176
7294
|
` signals ${app.signalCount} \xB7 handlers ${app.eventHandlers} \xB7 bindings ${app.stateBindings} \xB7 errors ${app.errors} \xB7 warnings ${app.warnings}`
|
|
6177
7295
|
);
|
|
6178
7296
|
lines.push(`Signals: ${s.signals.boundSignalIds.length} bound in graph`);
|
|
6179
|
-
for (const [
|
|
6180
|
-
lines.push(` ${
|
|
7297
|
+
for (const [label2, sig] of Object.entries(s.signals.live)) {
|
|
7298
|
+
lines.push(` ${label2} [${sig.kind}] = ${format(sig.value)} \xB7 observers ${sig.observerCount ?? "?"}`);
|
|
6181
7299
|
}
|
|
6182
7300
|
if (s.components.length > 0) {
|
|
6183
7301
|
lines.push(`Components: ${s.components.length}`);
|
|
@@ -6194,8 +7312,8 @@ function formatSnapshot(s) {
|
|
|
6194
7312
|
}
|
|
6195
7313
|
if (s.transitions.length > 0) {
|
|
6196
7314
|
lines.push(`Transitions: ${s.transitions.length}`);
|
|
6197
|
-
for (const
|
|
6198
|
-
lines.push(` ${
|
|
7315
|
+
for (const t6 of s.transitions) {
|
|
7316
|
+
lines.push(` ${t6.key ?? t6.id} on <${t6.nodeType}> \xB7 ${t6.duration}ms${t6.appear ? " \xB7 appear" : ""}`);
|
|
6199
7317
|
}
|
|
6200
7318
|
}
|
|
6201
7319
|
if (s.router !== void 0) {
|
|
@@ -6203,26 +7321,26 @@ function formatSnapshot(s) {
|
|
|
6203
7321
|
}
|
|
6204
7322
|
if (s.resources !== void 0) {
|
|
6205
7323
|
lines.push("Resources:");
|
|
6206
|
-
for (const [
|
|
6207
|
-
lines.push(` ${
|
|
7324
|
+
for (const [label2, r] of Object.entries(s.resources)) {
|
|
7325
|
+
lines.push(` ${label2}: ${r.status}${r.loading ? " (loading)" : ""}${r.hasError ? ` !${r.errorName}` : ""}`);
|
|
6208
7326
|
}
|
|
6209
7327
|
}
|
|
6210
7328
|
if (s.mutations !== void 0) {
|
|
6211
7329
|
lines.push("Mutations:");
|
|
6212
|
-
for (const [
|
|
6213
|
-
lines.push(` ${
|
|
7330
|
+
for (const [label2, m] of Object.entries(s.mutations)) {
|
|
7331
|
+
lines.push(` ${label2}: ${m.status}${m.pending ? " (pending)" : ""}${m.hasError ? ` !${m.errorName}` : ""}`);
|
|
6214
7332
|
}
|
|
6215
7333
|
}
|
|
6216
7334
|
if (s.forms !== void 0) {
|
|
6217
7335
|
lines.push("Forms:");
|
|
6218
|
-
for (const [
|
|
6219
|
-
lines.push(` ${
|
|
7336
|
+
for (const [label2, f] of Object.entries(s.forms)) {
|
|
7337
|
+
lines.push(` ${label2}: ${f.valid ? "valid" : "invalid"} \xB7 ${f.status} \xB7 fields ${f.fields.length}`);
|
|
6220
7338
|
}
|
|
6221
7339
|
}
|
|
6222
7340
|
if (s.contexts !== void 0) {
|
|
6223
7341
|
lines.push("Contexts:");
|
|
6224
|
-
for (const [
|
|
6225
|
-
lines.push(` ${
|
|
7342
|
+
for (const [label2, c] of Object.entries(s.contexts)) {
|
|
7343
|
+
lines.push(` ${label2} (${c.description}): ${c.hasProvider ? "provided" : "no provider"}`);
|
|
6226
7344
|
}
|
|
6227
7345
|
}
|
|
6228
7346
|
if (s.i18n !== void 0) {
|
|
@@ -6244,7 +7362,7 @@ function formatSnapshot(s) {
|
|
|
6244
7362
|
lines.push(` ${m}`);
|
|
6245
7363
|
}
|
|
6246
7364
|
lines.push(
|
|
6247
|
-
`Events: ${s.events.nodes.length} node(s), ${s.events.totalHandlers} handler(s)` + (Object.keys(s.events.byType).length > 0 ? ` \xB7 ${Object.entries(s.events.byType).map(([
|
|
7365
|
+
`Events: ${s.events.nodes.length} node(s), ${s.events.totalHandlers} handler(s)` + (Object.keys(s.events.byType).length > 0 ? ` \xB7 ${Object.entries(s.events.byType).map(([t6, n]) => `${t6}\xD7${n}`).join(", ")}` : "")
|
|
6248
7366
|
);
|
|
6249
7367
|
lines.push(
|
|
6250
7368
|
`Signal graph: ${s.signalGraph.signals.length} signal(s), ${s.signalGraph.edges.length} binding edge(s)`
|
|
@@ -6285,9 +7403,9 @@ function stringifyValue(value) {
|
|
|
6285
7403
|
}
|
|
6286
7404
|
return String(value);
|
|
6287
7405
|
}
|
|
6288
|
-
function section(title, count,
|
|
7406
|
+
function section(title, count, body2) {
|
|
6289
7407
|
const badge = count === void 0 ? "" : ` <span class="st-count">${count}</span>`;
|
|
6290
|
-
return `<section class="st-panel"><h2>${escapeHtml(title)}${badge}</h2>${
|
|
7408
|
+
return `<section class="st-panel"><h2>${escapeHtml(title)}${badge}</h2>${body2}</section>`;
|
|
6291
7409
|
}
|
|
6292
7410
|
function ul(items) {
|
|
6293
7411
|
if (items.length === 0) return '<p class="st-empty">(none)</p>';
|
|
@@ -6321,7 +7439,7 @@ function renderDevToolsHTML(s) {
|
|
|
6321
7439
|
s.signals.boundSignalIds.length,
|
|
6322
7440
|
`<p class="st-dim">${s.signals.boundSignalIds.length} bound in graph \xB7 effects shown as observer counts (no global effect registry)</p>` + ul(
|
|
6323
7441
|
Object.entries(s.signals.live).map(
|
|
6324
|
-
([
|
|
7442
|
+
([label2, sig]) => `<code>${escapeHtml(label2)}</code> <span class="st-key">[${escapeHtml(sig.kind)}]</span> = <code>${escapeHtml(sig.value)}</code> <span class="st-dim">observers ${escapeHtml(sig.observerCount ?? "?")}</span>`
|
|
6325
7443
|
)
|
|
6326
7444
|
)
|
|
6327
7445
|
)
|
|
@@ -6342,7 +7460,7 @@ function renderDevToolsHTML(s) {
|
|
|
6342
7460
|
Object.keys(s.resources).length,
|
|
6343
7461
|
ul(
|
|
6344
7462
|
Object.entries(s.resources).map(
|
|
6345
|
-
([
|
|
7463
|
+
([label2, r]) => `<code>${escapeHtml(label2)}</code>: ${escapeHtml(r.status)}` + (r.loading ? ' <span class="st-dim">(loading)</span>' : "") + (r.hasError ? ` <span class="st-err">!${escapeHtml(r.errorName)}</span>` : "")
|
|
6346
7464
|
)
|
|
6347
7465
|
)
|
|
6348
7466
|
)
|
|
@@ -6366,7 +7484,7 @@ function renderDevToolsHTML(s) {
|
|
|
6366
7484
|
s.transitions.length,
|
|
6367
7485
|
ul(
|
|
6368
7486
|
s.transitions.map(
|
|
6369
|
-
(
|
|
7487
|
+
(t6) => `<code>${escapeHtml(t6.key ?? t6.id)}</code> on <code><${escapeHtml(t6.nodeType)}></code> <span class="st-dim">${t6.duration}ms${t6.appear ? " \xB7 appear" : ""}</span>`
|
|
6370
7488
|
)
|
|
6371
7489
|
)
|
|
6372
7490
|
)
|
|
@@ -6378,7 +7496,7 @@ function renderDevToolsHTML(s) {
|
|
|
6378
7496
|
Object.keys(s.forms).length,
|
|
6379
7497
|
ul(
|
|
6380
7498
|
Object.entries(s.forms).map(
|
|
6381
|
-
([
|
|
7499
|
+
([label2, f]) => `<code>${escapeHtml(label2)}</code>: ${f.valid ? "valid" : "invalid"} \xB7 ${escapeHtml(f.status)} \xB7 ${f.fields.length} field(s)`
|
|
6382
7500
|
)
|
|
6383
7501
|
)
|
|
6384
7502
|
)
|
|
@@ -6457,8 +7575,8 @@ var DEVTOOLS_TABS = [
|
|
|
6457
7575
|
var EMBED_ESCAPE = new RegExp("[<\\u2028\\u2029]", "g");
|
|
6458
7576
|
function embedJson(snapshot) {
|
|
6459
7577
|
return JSON.stringify(snapshot).replace(EMBED_ESCAPE, (ch) => {
|
|
6460
|
-
const
|
|
6461
|
-
return `\\u${
|
|
7578
|
+
const code2 = ch.charCodeAt(0).toString(16).padStart(4, "0");
|
|
7579
|
+
return `\\u${code2}`;
|
|
6462
7580
|
});
|
|
6463
7581
|
}
|
|
6464
7582
|
function renderInteractiveDevTools(snapshot, options = {}) {
|
|
@@ -6466,7 +7584,7 @@ function renderInteractiveDevTools(snapshot, options = {}) {
|
|
|
6466
7584
|
const title = options.title ?? `StreetUI DevTools \u2014 ${app.identity.name}`;
|
|
6467
7585
|
const initialTab = options.initialTab ?? DEVTOOLS_TABS[0].id;
|
|
6468
7586
|
const tabButtons = DEVTOOLS_TABS.map(
|
|
6469
|
-
(
|
|
7587
|
+
(t6) => `<button type="button" role="tab" class="st-tab" data-tab="${escapeHtml(t6.id)}"${t6.id === initialTab ? ' aria-selected="true"' : ' aria-selected="false"'}>${escapeHtml(t6.label)}</button>`
|
|
6470
7588
|
).join("");
|
|
6471
7589
|
return `<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>${escapeHtml(title)}</title><style>${INTERACTIVE_CSS}</style></head><body class="st-dt"><header class="st-top"><h1>${escapeHtml(title)} <span class="st-dim">v${escapeHtml(app.identity.version)}</span></h1><button type="button" id="st-refresh" class="st-refresh">↻ Refresh</button></header><nav class="st-tabs" role="tablist" aria-label="DevTools panels">${tabButtons}</nav><main id="st-panel" class="st-body" role="tabpanel" aria-live="polite"></main><footer class="st-foot"><span class="st-dim">Structural inspection over one compiled graph. Not a production profiler; browser/AT conformance not claimed (gates BLOCKED).</span></footer><script type="application/json" id="st-data">${embedJson(snapshot)}</script><script>${CONTROLLER_JS.replace("__INITIAL_TAB__", JSON.stringify(initialTab))}</script></body></html>`;
|
|
6472
7590
|
}
|
|
@@ -6655,11 +7773,13 @@ function defineConfig(config) {
|
|
|
6655
7773
|
AppBuilder,
|
|
6656
7774
|
Application,
|
|
6657
7775
|
ApplicationGraph,
|
|
7776
|
+
BREAKPOINTS,
|
|
6658
7777
|
BaseNode,
|
|
6659
7778
|
BrowserDOMAdapter,
|
|
6660
7779
|
CleanupRegistry,
|
|
6661
7780
|
ContainerBuilderImpl,
|
|
6662
7781
|
DEFAULT_PERF_THRESHOLDS,
|
|
7782
|
+
DEFAULT_TOKENS,
|
|
6663
7783
|
DEVTOOLS_TABS,
|
|
6664
7784
|
DerivedSignal,
|
|
6665
7785
|
DiagnosticCollector,
|
|
@@ -6696,21 +7816,35 @@ function defineConfig(config) {
|
|
|
6696
7816
|
StreetFrameworkError,
|
|
6697
7817
|
StreetRenderHandle,
|
|
6698
7818
|
StreetRendererImpl,
|
|
7819
|
+
StyleRegistry,
|
|
6699
7820
|
TransitionController,
|
|
6700
7821
|
VERSION,
|
|
7822
|
+
a11y,
|
|
6701
7823
|
a11yIds,
|
|
7824
|
+
adoptServerStyles,
|
|
7825
|
+
animate,
|
|
7826
|
+
animation,
|
|
6702
7827
|
applyNodeProps,
|
|
6703
7828
|
applyProp,
|
|
7829
|
+
backdrop,
|
|
6704
7830
|
batch,
|
|
6705
7831
|
bindDomEvent,
|
|
7832
|
+
blockquote,
|
|
7833
|
+
body,
|
|
6706
7834
|
browserDOMAdapter,
|
|
7835
|
+
button,
|
|
6707
7836
|
buttonUpdate,
|
|
7837
|
+
canonicalize,
|
|
7838
|
+
caption,
|
|
7839
|
+
center,
|
|
7840
|
+
code,
|
|
6708
7841
|
compile,
|
|
6709
7842
|
compileGraph,
|
|
6710
7843
|
component,
|
|
6711
7844
|
consoleDiagnosticSink,
|
|
6712
7845
|
consoleHydrationDiagnosticSink,
|
|
6713
7846
|
containFocus,
|
|
7847
|
+
container,
|
|
6714
7848
|
createAnnouncer,
|
|
6715
7849
|
createApplication,
|
|
6716
7850
|
createAuthSession,
|
|
@@ -6729,31 +7863,53 @@ function defineConfig(config) {
|
|
|
6729
7863
|
createRuntime,
|
|
6730
7864
|
createStore,
|
|
6731
7865
|
createStreetEvent,
|
|
7866
|
+
createTheme,
|
|
7867
|
+
createThemeTokens,
|
|
7868
|
+
cssPropName,
|
|
7869
|
+
cssValue,
|
|
7870
|
+
cx,
|
|
7871
|
+
defaultThemeStorage,
|
|
6732
7872
|
defineConfig,
|
|
6733
7873
|
derived,
|
|
6734
7874
|
describeError,
|
|
6735
7875
|
diagnosePerformance,
|
|
7876
|
+
dialog,
|
|
7877
|
+
dropdown,
|
|
7878
|
+
dropdownItem,
|
|
6736
7879
|
effect,
|
|
6737
7880
|
email,
|
|
6738
7881
|
environment,
|
|
6739
7882
|
escapeHtml,
|
|
6740
7883
|
escapeHtmlAttr,
|
|
6741
7884
|
escapeHtmlText,
|
|
7885
|
+
fadeTransition,
|
|
7886
|
+
field,
|
|
7887
|
+
fieldError,
|
|
7888
|
+
fieldHelp,
|
|
7889
|
+
fieldLabel,
|
|
6742
7890
|
flushSync,
|
|
6743
7891
|
focusById,
|
|
6744
7892
|
focusFirst,
|
|
6745
7893
|
focusInitial,
|
|
7894
|
+
focusRing,
|
|
7895
|
+
form,
|
|
6746
7896
|
formatDiagnostic,
|
|
6747
7897
|
formatDiagnosticContext,
|
|
6748
7898
|
formatHydrationDiagnostic,
|
|
6749
7899
|
frameworkError,
|
|
6750
7900
|
generateApplicationId,
|
|
7901
|
+
generateCSS,
|
|
6751
7902
|
generateNodeId,
|
|
6752
7903
|
getFocusable,
|
|
6753
7904
|
getResolvedTransition,
|
|
6754
7905
|
globalEventBus,
|
|
7906
|
+
grid,
|
|
7907
|
+
hashIdentity,
|
|
7908
|
+
heading,
|
|
6755
7909
|
headingUpdate,
|
|
6756
7910
|
hydrateGraph,
|
|
7911
|
+
identityOf,
|
|
7912
|
+
input,
|
|
6757
7913
|
inputUpdate,
|
|
6758
7914
|
inspectApplication,
|
|
6759
7915
|
inspectComponents,
|
|
@@ -6774,7 +7930,11 @@ function defineConfig(config) {
|
|
|
6774
7930
|
isComponentDefinition,
|
|
6775
7931
|
isHeadContribution,
|
|
6776
7932
|
isTransitionConfig,
|
|
7933
|
+
label,
|
|
7934
|
+
layout,
|
|
7935
|
+
link,
|
|
6777
7936
|
linkUpdate,
|
|
7937
|
+
list,
|
|
6778
7938
|
matchPattern,
|
|
6779
7939
|
matchRoutes,
|
|
6780
7940
|
maxLength,
|
|
@@ -6789,13 +7949,18 @@ function defineConfig(config) {
|
|
|
6789
7949
|
normalizePath,
|
|
6790
7950
|
observerCount,
|
|
6791
7951
|
onEscape,
|
|
7952
|
+
overlay,
|
|
6792
7953
|
patchNode,
|
|
6793
7954
|
patchProp,
|
|
6794
7955
|
pattern,
|
|
7956
|
+
popover,
|
|
7957
|
+
pre,
|
|
6795
7958
|
printDiagnostics,
|
|
6796
7959
|
printGraph,
|
|
6797
7960
|
reactiveListItemKey,
|
|
6798
7961
|
reactiveListItemSignature,
|
|
7962
|
+
reactiveVarName,
|
|
7963
|
+
reactiveVarValue,
|
|
6799
7964
|
readState,
|
|
6800
7965
|
reconcileChildren,
|
|
6801
7966
|
reconcileChildrenByPlan,
|
|
@@ -6803,6 +7968,7 @@ function defineConfig(config) {
|
|
|
6803
7968
|
renderDevToolsReport,
|
|
6804
7969
|
renderHead,
|
|
6805
7970
|
renderInteractiveDevTools,
|
|
7971
|
+
renderStyles,
|
|
6806
7972
|
renderToString,
|
|
6807
7973
|
reportDiagnostic,
|
|
6808
7974
|
reportError,
|
|
@@ -6815,9 +7981,11 @@ function defineConfig(config) {
|
|
|
6815
7981
|
restoreFocus,
|
|
6816
7982
|
routerOutlet,
|
|
6817
7983
|
rovingMenu,
|
|
7984
|
+
row,
|
|
6818
7985
|
runElementTransition,
|
|
6819
7986
|
runValidators,
|
|
6820
7987
|
saveFocus,
|
|
7988
|
+
scaleTransition,
|
|
6821
7989
|
scheduleImmediate,
|
|
6822
7990
|
scheduleUpdate,
|
|
6823
7991
|
scheduler,
|
|
@@ -6827,13 +7995,29 @@ function defineConfig(config) {
|
|
|
6827
7995
|
serverDOMAdapter,
|
|
6828
7996
|
signal,
|
|
6829
7997
|
signalKind,
|
|
7998
|
+
skipLink,
|
|
7999
|
+
slideTransition,
|
|
8000
|
+
spacer,
|
|
6830
8001
|
splitTarget,
|
|
8002
|
+
stack,
|
|
8003
|
+
stateAttr,
|
|
6831
8004
|
streetui,
|
|
8005
|
+
style,
|
|
8006
|
+
styleRegistry,
|
|
8007
|
+
styleVariants,
|
|
8008
|
+
styleWithVars,
|
|
8009
|
+
text,
|
|
6832
8010
|
textUpdate,
|
|
6833
8011
|
toIdToken,
|
|
8012
|
+
toast,
|
|
8013
|
+
tokens,
|
|
8014
|
+
tooltip,
|
|
6834
8015
|
transformGraph,
|
|
8016
|
+
transition,
|
|
8017
|
+
transitions,
|
|
6835
8018
|
trapFocus,
|
|
6836
8019
|
validateGraph,
|
|
8020
|
+
visuallyHidden,
|
|
6837
8021
|
wireComponentBehavior,
|
|
6838
8022
|
wireEvents,
|
|
6839
8023
|
wireHeadBehavior,
|