@vertz/ui 0.2.24 → 0.2.26
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/shared/{chunk-2eh4p2n7.js → chunk-09ntccdx.js} +1 -1
- package/dist/shared/{chunk-4gen306a.js → chunk-1jgws7rs.js} +4 -109
- package/dist/shared/{chunk-2wag9c7v.js → chunk-2krx4aqe.js} +5 -5
- package/dist/shared/{chunk-f4d5nphq.js → chunk-7nr2ebrf.js} +1 -1
- package/dist/shared/{chunk-mbnda3pv.js → chunk-djvarb8r.js} +123 -76
- package/dist/shared/{chunk-jtma4sh4.js → chunk-e09mdqcx.js} +2 -2
- package/dist/shared/{chunk-4gmtsf6v.js → chunk-h2sjma78.js} +110 -1
- package/dist/shared/{chunk-t3rnfxc0.js → chunk-j1a7t906.js} +2 -2
- package/dist/shared/{chunk-656n0x6y.js → chunk-ppr06jgn.js} +8 -2
- package/dist/shared/{chunk-ge2e6y2s.js → chunk-svvqjmyy.js} +1 -1
- package/dist/shared/{chunk-da2w7j7w.js → chunk-xs5s8gqe.js} +1 -1
- package/dist/shared/{chunk-18frwfc4.js → chunk-ymc3wwam.js} +8 -2
- package/dist/src/auth/public.js +4 -4
- package/dist/src/components/index.d.ts +2 -1
- package/dist/src/components/index.js +5 -0
- package/dist/src/css/public.js +3 -4
- package/dist/src/form/public.d.ts +11 -0
- package/dist/src/form/public.js +2 -2
- package/dist/src/index.d.ts +37 -44
- package/dist/src/index.js +17 -202
- package/dist/src/internals.d.ts +51 -5
- package/dist/src/internals.js +284 -74
- package/dist/src/query/public.d.ts +1 -32
- package/dist/src/query/public.js +5 -8
- package/dist/src/router/public.js +7 -8
- package/dist/src/test/index.js +3 -3
- package/package.json +3 -3
- package/dist/shared/chunk-2y9f9j62.js +0 -40
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
injectCSS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-j1a7t906.js";
|
|
4
|
+
import {
|
|
5
|
+
createContext
|
|
6
|
+
} from "./chunk-ppr06jgn.js";
|
|
4
7
|
|
|
5
8
|
// src/dom/animation.ts
|
|
6
9
|
function onAnimationsComplete(el, callback) {
|
|
@@ -417,6 +420,9 @@ var palettes = {
|
|
|
417
420
|
pink,
|
|
418
421
|
rose
|
|
419
422
|
};
|
|
423
|
+
// src/dom/list-animation-context.ts
|
|
424
|
+
var ListAnimationContext = createContext(undefined, "@vertz/ui::ListAnimationContext");
|
|
425
|
+
|
|
420
426
|
// src/hydrate/component-registry.ts
|
|
421
427
|
async function resolveComponent(registry, componentId) {
|
|
422
428
|
const loader = registry[componentId];
|
|
@@ -547,4 +553,4 @@ function hydrateIslands(registry) {
|
|
|
547
553
|
// src/query/index.ts
|
|
548
554
|
import { isQueryDescriptor } from "@vertz/fetch";
|
|
549
555
|
|
|
550
|
-
export { onAnimationsComplete, keyframes, ANIMATION_DURATION, ANIMATION_EASING, fadeIn, fadeOut, zoomIn, zoomOut, slideInFromTop, slideInFromBottom, slideOutToTop, slideOutToBottom, slideInFromLeft, slideInFromRight, slideOutToLeft, slideOutToRight, accordionDown, accordionUp, palettes, resolveComponent, deserializeProps, hydrate, hydrateIslands, isQueryDescriptor };
|
|
556
|
+
export { onAnimationsComplete, keyframes, ANIMATION_DURATION, ANIMATION_EASING, fadeIn, fadeOut, zoomIn, zoomOut, slideInFromTop, slideInFromBottom, slideOutToTop, slideOutToBottom, slideInFromLeft, slideInFromRight, slideOutToLeft, slideOutToRight, accordionDown, accordionUp, palettes, ListAnimationContext, resolveComponent, deserializeProps, hydrate, hydrateIslands, isQueryDescriptor };
|
package/dist/src/auth/public.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
RouterContext
|
|
3
|
-
} from "../../shared/chunk-
|
|
3
|
+
} from "../../shared/chunk-7nr2ebrf.js";
|
|
4
4
|
import {
|
|
5
5
|
invalidateTenantQueries
|
|
6
|
-
} from "../../shared/chunk-
|
|
6
|
+
} from "../../shared/chunk-09ntccdx.js";
|
|
7
7
|
import {
|
|
8
8
|
isBrowser
|
|
9
|
-
} from "../../shared/chunk-
|
|
9
|
+
} from "../../shared/chunk-xs5s8gqe.js";
|
|
10
10
|
import {
|
|
11
11
|
_tryOnCleanup,
|
|
12
12
|
computed,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
getSSRContext,
|
|
15
15
|
signal,
|
|
16
16
|
useContext
|
|
17
|
-
} from "../../shared/chunk-
|
|
17
|
+
} from "../../shared/chunk-ppr06jgn.js";
|
|
18
18
|
|
|
19
19
|
// src/auth/access-context.ts
|
|
20
20
|
var AccessContext = createContext(undefined, "@vertz/ui::AccessContext");
|
|
@@ -51,6 +51,7 @@ declare const ContextMenu: ThemeComponentMap["ContextMenu"];
|
|
|
51
51
|
declare const Sheet: ThemeComponentMap["Sheet"];
|
|
52
52
|
declare const Drawer: ThemeComponentMap["Drawer"];
|
|
53
53
|
declare const Carousel: ThemeComponentMap["Carousel"];
|
|
54
|
+
declare const List: ThemeComponentMap["List"];
|
|
54
55
|
declare const Calendar: ThemeComponentMap["Calendar"];
|
|
55
56
|
declare const Checkbox: ThemeComponentMap["Checkbox"];
|
|
56
57
|
declare const Switch: ThemeComponentMap["Switch"];
|
|
@@ -67,4 +68,4 @@ declare const NavigationMenu: ThemeComponentMap["NavigationMenu"];
|
|
|
67
68
|
declare const ResizablePanel: ThemeComponentMap["ResizablePanel"];
|
|
68
69
|
declare const ScrollArea: ThemeComponentMap["ScrollArea"];
|
|
69
70
|
declare const ToggleGroup: ThemeComponentMap["ToggleGroup"];
|
|
70
|
-
export { Tooltip, ToggleGroup, Toggle, Toast, ThemeComponentMap, Textarea, Tabs, Table, Switch, Slider, Skeleton, Sheet, Separator, Select, ScrollArea, ResizablePanel, RadioGroup, Progress, Popover, Pagination, NavigationMenu, Menubar, Label, Input, HoverCard, FormGroup, EmptyState, DropdownMenu, Drawer, Dialog, DatePicker, ContextMenu, Command, Collapsible, Checkbox, Carousel, Card, Calendar, Button, Breadcrumb, Badge, Avatar, Alert, Accordion };
|
|
71
|
+
export { Tooltip, ToggleGroup, Toggle, Toast, ThemeComponentMap, Textarea, Tabs, Table, Switch, Slider, Skeleton, Sheet, Separator, Select, ScrollArea, ResizablePanel, RadioGroup, Progress, Popover, Pagination, NavigationMenu, Menubar, List, Label, Input, HoverCard, FormGroup, EmptyState, DropdownMenu, Drawer, Dialog, DatePicker, ContextMenu, Command, Collapsible, Checkbox, Carousel, Card, Calendar, Button, Breadcrumb, Badge, Avatar, Alert, Accordion };
|
|
@@ -145,6 +145,10 @@ var Drawer = /* @__PURE__ */ createCompoundProxy("Drawer", [
|
|
|
145
145
|
"Handle"
|
|
146
146
|
]);
|
|
147
147
|
var Carousel = /* @__PURE__ */ createCompoundProxy("Carousel", ["Slide", "Previous", "Next"]);
|
|
148
|
+
var List = /* @__PURE__ */ createCompoundProxy("List", [
|
|
149
|
+
"Item",
|
|
150
|
+
"DragHandle"
|
|
151
|
+
]);
|
|
148
152
|
var Calendar = /* @__PURE__ */ createPrimitiveProxy("Calendar");
|
|
149
153
|
var Checkbox = /* @__PURE__ */ createPrimitiveProxy("Checkbox");
|
|
150
154
|
var Switch = /* @__PURE__ */ createPrimitiveProxy("Switch");
|
|
@@ -193,6 +197,7 @@ export {
|
|
|
193
197
|
Pagination,
|
|
194
198
|
NavigationMenu,
|
|
195
199
|
Menubar,
|
|
200
|
+
List,
|
|
196
201
|
Label,
|
|
197
202
|
Input,
|
|
198
203
|
HoverCard,
|
package/dist/src/css/public.js
CHANGED
|
@@ -8,11 +8,10 @@ import {
|
|
|
8
8
|
globalCss,
|
|
9
9
|
s,
|
|
10
10
|
variants
|
|
11
|
-
} from "../../shared/chunk-
|
|
12
|
-
import"../../shared/chunk-
|
|
11
|
+
} from "../../shared/chunk-j1a7t906.js";
|
|
12
|
+
import"../../shared/chunk-djvarb8r.js";
|
|
13
13
|
import"../../shared/chunk-h1fsr8kv.js";
|
|
14
|
-
import"../../shared/chunk-
|
|
15
|
-
import"../../shared/chunk-656n0x6y.js";
|
|
14
|
+
import"../../shared/chunk-ppr06jgn.js";
|
|
16
15
|
export {
|
|
17
16
|
variants,
|
|
18
17
|
s,
|
|
@@ -156,6 +156,17 @@ interface FormOptions<
|
|
|
156
156
|
onError?: (errors: Record<string, string>) => void;
|
|
157
157
|
/** When true, reset the form after a successful submission. */
|
|
158
158
|
resetOnSuccess?: boolean;
|
|
159
|
+
/**
|
|
160
|
+
* Controls when fields with errors are re-validated after the first form submission.
|
|
161
|
+
*
|
|
162
|
+
* - `'blur'` (default) — Re-validates flagged fields when the user blurs them.
|
|
163
|
+
* - `'change'` — Re-validates flagged fields on every input/change event.
|
|
164
|
+
* - `'submit'` — No re-validation between submissions; errors only update on submit.
|
|
165
|
+
*
|
|
166
|
+
* Re-validation only activates after the first submit attempt. Fields without prior
|
|
167
|
+
* errors are never re-validated on blur/change (no premature validation).
|
|
168
|
+
*/
|
|
169
|
+
revalidateOn?: "submit" | "blur" | "change";
|
|
159
170
|
}
|
|
160
171
|
/**
|
|
161
172
|
* Create a form instance bound to an SDK method.
|
package/dist/src/form/public.js
CHANGED
package/dist/src/index.d.ts
CHANGED
|
@@ -222,20 +222,6 @@ declare function Foreign({ tag, onReady, html, id, className, style }: ForeignPr
|
|
|
222
222
|
* ```
|
|
223
223
|
*/
|
|
224
224
|
declare function onMount2(callback: () => (() => void) | void): void;
|
|
225
|
-
interface ListTransitionProps<T> {
|
|
226
|
-
each: T[];
|
|
227
|
-
keyFn: (item: T, index: number) => string | number;
|
|
228
|
-
children: (item: T) => Node;
|
|
229
|
-
}
|
|
230
|
-
/**
|
|
231
|
-
* ListTransition component for animated list item enter/exit.
|
|
232
|
-
* New items get `data-presence="enter"`, removed items get `data-presence="exit"`
|
|
233
|
-
* with DOM removal deferred until CSS animation completes.
|
|
234
|
-
*
|
|
235
|
-
* Props are accessed as getters (not destructured) so the compiler-generated
|
|
236
|
-
* reactive getters are tracked by the underlying domEffect.
|
|
237
|
-
*/
|
|
238
|
-
declare function ListTransition<T>(props: ListTransitionProps<T>): DocumentFragment;
|
|
239
225
|
interface PresenceProps {
|
|
240
226
|
when: boolean;
|
|
241
227
|
children: () => HTMLElement;
|
|
@@ -809,6 +795,31 @@ declare function __enterChildren(el: Element): void;
|
|
|
809
795
|
*/
|
|
810
796
|
declare function __exitChildren(): void;
|
|
811
797
|
/**
|
|
798
|
+
* Lifecycle hooks for list animation (enter/exit/reorder).
|
|
799
|
+
*
|
|
800
|
+
* Provided by `<List animate>` via ListAnimationContext.
|
|
801
|
+
* Consumed by `__listValue()` during reconciliation.
|
|
802
|
+
*/
|
|
803
|
+
interface ListAnimationHooks {
|
|
804
|
+
/** Called before reconciliation starts. Use to snapshot element rects for FLIP. */
|
|
805
|
+
onBeforeReconcile: () => void;
|
|
806
|
+
/** Called after reconciliation finishes. Use to play FLIP animations. */
|
|
807
|
+
onAfterReconcile: () => void;
|
|
808
|
+
/** Called when a new item enters (after first render). */
|
|
809
|
+
onItemEnter: (node: Node, key: string | number) => void;
|
|
810
|
+
/** Called when an item exits. Must call `done()` when animation finishes so the node can be removed. */
|
|
811
|
+
onItemExit: (node: Node, key: string | number, done: () => void) => void;
|
|
812
|
+
}
|
|
813
|
+
/**
|
|
814
|
+
* Context for list animation hooks.
|
|
815
|
+
*
|
|
816
|
+
* When provided, `__listValue()` calls these hooks during reconciliation
|
|
817
|
+
* to enable enter/exit animations and FLIP reordering.
|
|
818
|
+
*
|
|
819
|
+
* When not provided, `__listValue()` behaves as a plain keyed list.
|
|
820
|
+
*/
|
|
821
|
+
declare const ListAnimationContext: Context<ListAnimationHooks | undefined>;
|
|
822
|
+
/**
|
|
812
823
|
* Returns true when running in a real browser environment.
|
|
813
824
|
* Returns false on the server, even if `window` exists (DOM shim).
|
|
814
825
|
*
|
|
@@ -953,6 +964,17 @@ interface FormOptions<
|
|
|
953
964
|
onError?: (errors: Record<string, string>) => void;
|
|
954
965
|
/** When true, reset the form after a successful submission. */
|
|
955
966
|
resetOnSuccess?: boolean;
|
|
967
|
+
/**
|
|
968
|
+
* Controls when fields with errors are re-validated after the first form submission.
|
|
969
|
+
*
|
|
970
|
+
* - `'blur'` (default) — Re-validates flagged fields when the user blurs them.
|
|
971
|
+
* - `'change'` — Re-validates flagged fields on every input/change event.
|
|
972
|
+
* - `'submit'` — No re-validation between submissions; errors only update on submit.
|
|
973
|
+
*
|
|
974
|
+
* Re-validation only activates after the first submit attempt. Fields without prior
|
|
975
|
+
* errors are never re-validated on blur/change (no premature validation).
|
|
976
|
+
*/
|
|
977
|
+
revalidateOn?: "submit" | "blur" | "change";
|
|
956
978
|
}
|
|
957
979
|
/**
|
|
958
980
|
* Create a form instance bound to an SDK method.
|
|
@@ -1238,35 +1260,6 @@ declare function query<
|
|
|
1238
1260
|
E
|
|
1239
1261
|
>(thunk: () => QueryDescriptor2<T, E> | null, options?: Omit<QueryOptions<T>, "key">): QueryResult<T, E>;
|
|
1240
1262
|
declare function query<T>(thunk: () => Promise<T> | null, options?: QueryOptions<T>): QueryResult<T>;
|
|
1241
|
-
interface QueryMatchHandlers<
|
|
1242
|
-
T,
|
|
1243
|
-
E
|
|
1244
|
-
> {
|
|
1245
|
-
loading: () => Node | null;
|
|
1246
|
-
error: (error: E) => Node | null;
|
|
1247
|
-
data: (data: T) => Node | null;
|
|
1248
|
-
}
|
|
1249
|
-
/**
|
|
1250
|
-
* Pattern-match on a QueryResult's exclusive state.
|
|
1251
|
-
*
|
|
1252
|
-
* Returns a stable `<span style="display:contents">` wrapper that internally
|
|
1253
|
-
* manages branch switching (loading/error/data) via a reactive effect.
|
|
1254
|
-
* The same wrapper is returned for repeated calls with the same queryResult
|
|
1255
|
-
* (cached via WeakMap), enabling __child's stable-node optimization.
|
|
1256
|
-
*
|
|
1257
|
-
* Priority: loading → error → data.
|
|
1258
|
-
*
|
|
1259
|
-
* `loading` only fires on the initial load (no data yet).
|
|
1260
|
-
* When revalidating with existing data, the `data` handler receives the
|
|
1261
|
-
* current data. Access `query.revalidating` from the component scope for
|
|
1262
|
-
* revalidation state.
|
|
1263
|
-
*/
|
|
1264
|
-
declare function queryMatch<
|
|
1265
|
-
T,
|
|
1266
|
-
E
|
|
1267
|
-
>(queryResult: QueryResult<T, E>, handlers: QueryMatchHandlers<T, E>): HTMLElement & {
|
|
1268
|
-
dispose: DisposeFn;
|
|
1269
|
-
};
|
|
1270
1263
|
/**
|
|
1271
1264
|
* Template literal type utility that extracts route parameter names from a path pattern.
|
|
1272
1265
|
*
|
|
@@ -2081,4 +2074,4 @@ interface RegisterThemeInput {
|
|
|
2081
2074
|
* ```
|
|
2082
2075
|
*/
|
|
2083
2076
|
declare function registerTheme(resolved: RegisterThemeInput): void;
|
|
2084
|
-
export { zoomOut, zoomIn, variants, validate, useSearchParams, useRouter, useParams, useDialogStack, useDialog, useContext, untrack, slideOutToTop, slideOutToRight, slideOutToLeft, slideOutToBottom, slideInFromTop, slideInFromRight, slideInFromLeft, slideInFromBottom, signal, setAdapter, s, resolveChildren, resetRelationSchemas_TEST_ONLY, resetInjectedStyles, registerTheme, registerRelationSchema, ref,
|
|
2077
|
+
export { zoomOut, zoomIn, variants, validate, useSearchParams, useRouter, useParams, useDialogStack, useDialog, useContext, untrack, slideOutToTop, slideOutToRight, slideOutToLeft, slideOutToBottom, slideInFromTop, slideInFromRight, slideInFromLeft, slideInFromBottom, signal, setAdapter, s, resolveChildren, resetRelationSchemas_TEST_ONLY, resetInjectedStyles, registerTheme, registerRelationSchema, ref, query, parseSearchParams, palettes, onMount2 as onMount, onCleanup, onAnimationsComplete, mount, keyframes, isRenderNode, isQueryDescriptor, isBrowser, invalidateTenantQueries, invalidate, injectCSS, hydrateIslands, hydrate, globalCss, getRelationSchema, getQueryEnvelopeStore, getInjectedCSS, getEntityStore, getAdapter, formatRelativeTime, formDataToObject, form, font, fadeOut, fadeIn, defineTheme, defineRoutes, css, createTestStore, createRouter, createOptimisticHandler, createLink, createFieldState, createDialogStack, createDOMAdapter, createContext, configureImageOptimizer, computed, compileTheme, compileFonts, children, buildOptimizedUrl, batch, accordionUp, accordionDown, __staticText, __exitChildren, __enterChildren, __element, __append, VariantsConfig, VariantProps, VariantFunction, ValidationResult, UnwrapSignals, TypedRoutes, TypedRouter, ThemeProviderProps, ThemeProvider, ThemeInput, Theme, SuspenseProps, Suspense, StyleValue, StyleEntry, Signal, SerializedStore, SearchParamSchema, SdkMethodWithMeta, SdkMethod, RouterViewProps, RouterView, RouterOptions, RouterContext, Router, RoutePattern, RoutePaths, RouteMatch, RouteDefinitionMap, RouteConfig, RenderText, RenderNode, RenderElement, RenderAdapter, RelativeTimeProps, RelativeTime, RelationSchema, RelationFieldDef, RegisterThemeInput, Ref, ReadonlySignal, RENDER_NODE_BRAND, QueryResult, QueryOptions, QueryEnvelopeStore, QueryEnvelope, QueryDescriptor3 as QueryDescriptor, PresenceProps, Presence, PreloadItem, PathWithParams, ParamSchema, OutletContextValue, OutletContext, Outlet, NavigateOptions, NavigateInput, MountOptions, MountHandle, MergeSelectOptions, MatchedRoute, LoaderData, ListAnimationHooks, ListAnimationContext, LinkProps, LinkFactoryOptions, Link, IslandRegistry, IslandProps, Island, InferRouteMap, ImageProps, Image, GlobalCSSOutput, GlobalCSSInput, FormatRelativeTimeOptions, FormSchema, FormOptions, FormInstance, FormDataOptions, ForeignProps, Foreign, FontSrc, FontOptions, FontFallbackMetrics, FontDescriptor, FieldState, FieldSelectionTracker, FallbackFontName, ExtractParams, ErrorFallbackProps, ErrorBoundaryProps, ErrorBoundary, EntityStoreOptions, EntityStore, DisposeFn, DisposalScopeError, DialogStackProvider, DialogStackContext, DialogStack, DialogResult, DialogOpenOptions, DialogIdContext, DialogHandleContext, DialogHandle, DialogComponent, DefaultErrorFallback, DateInput, Context, ConfirmOptions, Computed, ComponentRegistry, ComponentLoader, ComponentFunction, CompiledTheme, CompiledRoute, CompiledFonts, CompileThemeOptions, CompileFontsOptions, ColorPalette, ChildrenAccessor, ChildValue, CacheStore, CSSOutput, CSSInput, ANIMATION_EASING, ANIMATION_DURATION };
|
package/dist/src/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
ANIMATION_DURATION,
|
|
6
6
|
ANIMATION_EASING,
|
|
7
|
+
ListAnimationContext,
|
|
7
8
|
accordionDown,
|
|
8
9
|
accordionUp,
|
|
9
10
|
fadeIn,
|
|
@@ -24,7 +25,7 @@ import {
|
|
|
24
25
|
slideOutToTop,
|
|
25
26
|
zoomIn,
|
|
26
27
|
zoomOut
|
|
27
|
-
} from "../shared/chunk-
|
|
28
|
+
} from "../shared/chunk-ymc3wwam.js";
|
|
28
29
|
import {
|
|
29
30
|
ErrorBoundary,
|
|
30
31
|
Link,
|
|
@@ -35,16 +36,16 @@ import {
|
|
|
35
36
|
getCurrentErrorHandler,
|
|
36
37
|
parseSearchParams,
|
|
37
38
|
useSearchParams
|
|
38
|
-
} from "../shared/chunk-
|
|
39
|
+
} from "../shared/chunk-2krx4aqe.js";
|
|
39
40
|
import {
|
|
40
41
|
beginDeferringMounts,
|
|
41
42
|
discardDeferredMounts,
|
|
42
43
|
flushDeferredMounts,
|
|
43
44
|
onMount
|
|
44
|
-
} from "../shared/chunk-
|
|
45
|
+
} from "../shared/chunk-svvqjmyy.js";
|
|
45
46
|
import {
|
|
46
47
|
createRouter
|
|
47
|
-
} from "../shared/chunk-
|
|
48
|
+
} from "../shared/chunk-e09mdqcx.js";
|
|
48
49
|
import {
|
|
49
50
|
defineRoutes
|
|
50
51
|
} from "../shared/chunk-am9zaw4h.js";
|
|
@@ -53,7 +54,7 @@ import {
|
|
|
53
54
|
form,
|
|
54
55
|
formDataToObject,
|
|
55
56
|
validate
|
|
56
|
-
} from "../shared/chunk-
|
|
57
|
+
} from "../shared/chunk-h2sjma78.js";
|
|
57
58
|
import {
|
|
58
59
|
EntityStore,
|
|
59
60
|
FieldSelectionTracker,
|
|
@@ -63,10 +64,9 @@ import {
|
|
|
63
64
|
getQueryEnvelopeStore,
|
|
64
65
|
getRelationSchema,
|
|
65
66
|
query,
|
|
66
|
-
queryMatch,
|
|
67
67
|
registerRelationSchema,
|
|
68
68
|
resetRelationSchemas_TEST_ONLY
|
|
69
|
-
} from "../shared/chunk-
|
|
69
|
+
} from "../shared/chunk-1jgws7rs.js";
|
|
70
70
|
import"../shared/chunk-jrtrk5z4.js";
|
|
71
71
|
import {
|
|
72
72
|
ThemeProvider,
|
|
@@ -83,35 +83,33 @@ import {
|
|
|
83
83
|
resolveChildren,
|
|
84
84
|
s,
|
|
85
85
|
variants
|
|
86
|
-
} from "../shared/chunk-
|
|
86
|
+
} from "../shared/chunk-j1a7t906.js";
|
|
87
87
|
import {
|
|
88
|
+
RENDER_NODE_BRAND,
|
|
88
89
|
__append,
|
|
89
90
|
__element,
|
|
90
91
|
__enterChildren,
|
|
91
92
|
__exitChildren,
|
|
92
93
|
__insert,
|
|
93
|
-
__staticText
|
|
94
|
-
} from "../shared/chunk-mbnda3pv.js";
|
|
95
|
-
import"../shared/chunk-h1fsr8kv.js";
|
|
96
|
-
import {
|
|
97
|
-
RENDER_NODE_BRAND,
|
|
94
|
+
__staticText,
|
|
98
95
|
createDOMAdapter,
|
|
99
96
|
getAdapter,
|
|
100
97
|
isRenderNode,
|
|
101
98
|
setAdapter
|
|
102
|
-
} from "../shared/chunk-
|
|
99
|
+
} from "../shared/chunk-djvarb8r.js";
|
|
100
|
+
import"../shared/chunk-h1fsr8kv.js";
|
|
103
101
|
import {
|
|
104
102
|
RouterContext,
|
|
105
103
|
useParams,
|
|
106
104
|
useRouter
|
|
107
|
-
} from "../shared/chunk-
|
|
105
|
+
} from "../shared/chunk-7nr2ebrf.js";
|
|
108
106
|
import {
|
|
109
107
|
invalidate,
|
|
110
108
|
invalidateTenantQueries
|
|
111
|
-
} from "../shared/chunk-
|
|
109
|
+
} from "../shared/chunk-09ntccdx.js";
|
|
112
110
|
import {
|
|
113
111
|
isBrowser
|
|
114
|
-
} from "../shared/chunk-
|
|
112
|
+
} from "../shared/chunk-xs5s8gqe.js";
|
|
115
113
|
import {
|
|
116
114
|
DisposalScopeError,
|
|
117
115
|
_tryOnCleanup,
|
|
@@ -136,7 +134,7 @@ import {
|
|
|
136
134
|
startHydration,
|
|
137
135
|
untrack,
|
|
138
136
|
useContext
|
|
139
|
-
} from "../shared/chunk-
|
|
137
|
+
} from "../shared/chunk-ppr06jgn.js";
|
|
140
138
|
// src/component/default-error-fallback.ts
|
|
141
139
|
function DefaultErrorFallback({ error, retry }) {
|
|
142
140
|
const container = document.createElement("div");
|
|
@@ -207,188 +205,6 @@ function Foreign({
|
|
|
207
205
|
}
|
|
208
206
|
return el;
|
|
209
207
|
}
|
|
210
|
-
// src/dom/list-transition.ts
|
|
211
|
-
function createItemProxy(itemSignal) {
|
|
212
|
-
if (typeof itemSignal.peek() !== "object" || itemSignal.peek() == null) {
|
|
213
|
-
return itemSignal.peek();
|
|
214
|
-
}
|
|
215
|
-
return new Proxy({}, {
|
|
216
|
-
get(_target, prop, receiver) {
|
|
217
|
-
const current = itemSignal.value;
|
|
218
|
-
if (current == null)
|
|
219
|
-
return;
|
|
220
|
-
const value = Reflect.get(current, prop, receiver);
|
|
221
|
-
if (typeof value === "function") {
|
|
222
|
-
return value.bind(current);
|
|
223
|
-
}
|
|
224
|
-
return value;
|
|
225
|
-
},
|
|
226
|
-
has(_target, prop) {
|
|
227
|
-
const current = itemSignal.value;
|
|
228
|
-
if (current == null)
|
|
229
|
-
return false;
|
|
230
|
-
return Reflect.has(current, prop);
|
|
231
|
-
},
|
|
232
|
-
ownKeys() {
|
|
233
|
-
const current = itemSignal.value;
|
|
234
|
-
if (current == null)
|
|
235
|
-
return [];
|
|
236
|
-
return Reflect.ownKeys(current);
|
|
237
|
-
},
|
|
238
|
-
getOwnPropertyDescriptor(_target, prop) {
|
|
239
|
-
const current = itemSignal.value;
|
|
240
|
-
if (current == null)
|
|
241
|
-
return;
|
|
242
|
-
return Reflect.getOwnPropertyDescriptor(current, prop);
|
|
243
|
-
}
|
|
244
|
-
});
|
|
245
|
-
}
|
|
246
|
-
function listTransition(startMarker, endMarker, items, keyFn, renderFn) {
|
|
247
|
-
const getItems = typeof items === "function" ? items : () => items.value;
|
|
248
|
-
const nodeMap = new Map;
|
|
249
|
-
const scopeMap = new Map;
|
|
250
|
-
const itemSignalMap = new Map;
|
|
251
|
-
const exitingNodes = new Set;
|
|
252
|
-
const exitingKeyMap = new Map;
|
|
253
|
-
const keyGeneration = new Map;
|
|
254
|
-
let isFirstRun = true;
|
|
255
|
-
const outerScope = pushScope();
|
|
256
|
-
try {
|
|
257
|
-
domEffect(() => {
|
|
258
|
-
const newItems = getItems() ?? [];
|
|
259
|
-
const newKeySet = new Set(newItems.map((item, i) => keyFn(item, i)));
|
|
260
|
-
if (isFirstRun) {
|
|
261
|
-
isFirstRun = false;
|
|
262
|
-
for (const [i, item] of newItems.entries()) {
|
|
263
|
-
const key = keyFn(item, i);
|
|
264
|
-
const itemSig = signal(item);
|
|
265
|
-
const proxy = createItemProxy(itemSig);
|
|
266
|
-
const scope = pushScope();
|
|
267
|
-
const node = renderFn(proxy);
|
|
268
|
-
popScope();
|
|
269
|
-
nodeMap.set(key, node);
|
|
270
|
-
scopeMap.set(key, scope);
|
|
271
|
-
itemSignalMap.set(key, itemSig);
|
|
272
|
-
endMarker.parentNode?.insertBefore(node, endMarker);
|
|
273
|
-
}
|
|
274
|
-
return;
|
|
275
|
-
}
|
|
276
|
-
for (const [key, node] of nodeMap) {
|
|
277
|
-
if (!newKeySet.has(key)) {
|
|
278
|
-
const scope = scopeMap.get(key);
|
|
279
|
-
if (scope) {
|
|
280
|
-
runCleanups(scope);
|
|
281
|
-
scopeMap.delete(key);
|
|
282
|
-
}
|
|
283
|
-
nodeMap.delete(key);
|
|
284
|
-
itemSignalMap.delete(key);
|
|
285
|
-
const gen = (keyGeneration.get(key) ?? 0) + 1;
|
|
286
|
-
keyGeneration.set(key, gen);
|
|
287
|
-
exitingNodes.add(node);
|
|
288
|
-
exitingKeyMap.set(key, node);
|
|
289
|
-
if (node instanceof Element) {
|
|
290
|
-
node.setAttribute("data-presence", "exit");
|
|
291
|
-
onAnimationsComplete(node, () => {
|
|
292
|
-
if (keyGeneration.get(key) === gen) {
|
|
293
|
-
node.parentNode?.removeChild(node);
|
|
294
|
-
exitingNodes.delete(node);
|
|
295
|
-
exitingKeyMap.delete(key);
|
|
296
|
-
}
|
|
297
|
-
});
|
|
298
|
-
} else {
|
|
299
|
-
node.parentNode?.removeChild(node);
|
|
300
|
-
exitingNodes.delete(node);
|
|
301
|
-
exitingKeyMap.delete(key);
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
const desiredNodes = [];
|
|
306
|
-
const enterNodes = [];
|
|
307
|
-
for (const [i, item] of newItems.entries()) {
|
|
308
|
-
const key = keyFn(item, i);
|
|
309
|
-
let node = nodeMap.get(key);
|
|
310
|
-
if (!node) {
|
|
311
|
-
const oldExiting = exitingKeyMap.get(key);
|
|
312
|
-
if (oldExiting) {
|
|
313
|
-
oldExiting.parentNode?.removeChild(oldExiting);
|
|
314
|
-
exitingNodes.delete(oldExiting);
|
|
315
|
-
exitingKeyMap.delete(key);
|
|
316
|
-
}
|
|
317
|
-
const gen = (keyGeneration.get(key) ?? 0) + 1;
|
|
318
|
-
keyGeneration.set(key, gen);
|
|
319
|
-
const itemSig = signal(item);
|
|
320
|
-
const proxy = createItemProxy(itemSig);
|
|
321
|
-
const scope = pushScope();
|
|
322
|
-
node = renderFn(proxy);
|
|
323
|
-
popScope();
|
|
324
|
-
nodeMap.set(key, node);
|
|
325
|
-
scopeMap.set(key, scope);
|
|
326
|
-
itemSignalMap.set(key, itemSig);
|
|
327
|
-
if (node instanceof Element)
|
|
328
|
-
node.setAttribute("data-presence", "enter");
|
|
329
|
-
enterNodes.push({ node, key });
|
|
330
|
-
} else {
|
|
331
|
-
const itemSig = itemSignalMap.get(key);
|
|
332
|
-
if (itemSig) {
|
|
333
|
-
itemSig.value = item;
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
desiredNodes.push(node);
|
|
337
|
-
}
|
|
338
|
-
const parent = startMarker.parentNode;
|
|
339
|
-
if (parent) {
|
|
340
|
-
let cursor = startMarker.nextSibling;
|
|
341
|
-
for (const desired of desiredNodes) {
|
|
342
|
-
while (cursor && cursor !== endMarker && exitingNodes.has(cursor)) {
|
|
343
|
-
cursor = cursor.nextSibling;
|
|
344
|
-
}
|
|
345
|
-
if (cursor === desired) {
|
|
346
|
-
cursor = cursor.nextSibling;
|
|
347
|
-
} else {
|
|
348
|
-
parent.insertBefore(desired, cursor);
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
for (const { node: enterNode, key } of enterNodes) {
|
|
353
|
-
if (!(enterNode instanceof Element))
|
|
354
|
-
continue;
|
|
355
|
-
onAnimationsComplete(enterNode, () => {
|
|
356
|
-
if (nodeMap.get(key) === enterNode) {
|
|
357
|
-
enterNode.removeAttribute("data-presence");
|
|
358
|
-
}
|
|
359
|
-
});
|
|
360
|
-
}
|
|
361
|
-
});
|
|
362
|
-
} finally {
|
|
363
|
-
popScope();
|
|
364
|
-
}
|
|
365
|
-
const dispose = () => {
|
|
366
|
-
for (const scope of scopeMap.values()) {
|
|
367
|
-
runCleanups(scope);
|
|
368
|
-
}
|
|
369
|
-
scopeMap.clear();
|
|
370
|
-
for (const node of exitingNodes) {
|
|
371
|
-
node.parentNode?.removeChild(node);
|
|
372
|
-
}
|
|
373
|
-
exitingNodes.clear();
|
|
374
|
-
exitingKeyMap.clear();
|
|
375
|
-
runCleanups(outerScope);
|
|
376
|
-
};
|
|
377
|
-
_tryOnCleanup(dispose);
|
|
378
|
-
return dispose;
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
// src/component/list-transition.ts
|
|
382
|
-
function ListTransition(props) {
|
|
383
|
-
const startMarker = document.createComment("lt-start");
|
|
384
|
-
const endMarker = document.createComment("lt-end");
|
|
385
|
-
const fragment = document.createDocumentFragment();
|
|
386
|
-
fragment.appendChild(startMarker);
|
|
387
|
-
fragment.appendChild(endMarker);
|
|
388
|
-
const dispose = listTransition(startMarker, endMarker, () => props.each, props.keyFn, props.children);
|
|
389
|
-
_tryOnCleanup(dispose);
|
|
390
|
-
return Object.assign(fragment, { dispose });
|
|
391
|
-
}
|
|
392
208
|
// src/component/presence.ts
|
|
393
209
|
function Presence(props) {
|
|
394
210
|
const anchor = document.createComment("presence");
|
|
@@ -1112,7 +928,6 @@ export {
|
|
|
1112
928
|
registerTheme,
|
|
1113
929
|
registerRelationSchema,
|
|
1114
930
|
ref,
|
|
1115
|
-
queryMatch,
|
|
1116
931
|
query,
|
|
1117
932
|
parseSearchParams,
|
|
1118
933
|
palettes,
|
|
@@ -1176,7 +991,7 @@ export {
|
|
|
1176
991
|
Presence,
|
|
1177
992
|
OutletContext,
|
|
1178
993
|
Outlet,
|
|
1179
|
-
|
|
994
|
+
ListAnimationContext,
|
|
1180
995
|
Link,
|
|
1181
996
|
Island,
|
|
1182
997
|
Image,
|
package/dist/src/internals.d.ts
CHANGED
|
@@ -387,6 +387,10 @@ interface DisposableText extends Text {
|
|
|
387
387
|
* Returns a Text node with a `dispose` property for cleanup.
|
|
388
388
|
*/
|
|
389
389
|
declare function __text(fn: () => string): DisposableText;
|
|
390
|
+
/** A Node that also carries a dispose function for cleanup. */
|
|
391
|
+
interface DisposableChild extends Node {
|
|
392
|
+
dispose: DisposeFn;
|
|
393
|
+
}
|
|
390
394
|
/**
|
|
391
395
|
* Create a reactive child node that updates when dependencies change.
|
|
392
396
|
* Unlike __text(), this handles both Node values (appended directly)
|
|
@@ -395,11 +399,12 @@ declare function __text(fn: () => string): DisposableText;
|
|
|
395
399
|
* This prevents HTMLElements from being stringified to "[object HTMLElement]"
|
|
396
400
|
* when used as JSX expression children like {someElement}.
|
|
397
401
|
*
|
|
398
|
-
*
|
|
402
|
+
* Uses a comment anchor (<!--child-->) with sibling-based content management.
|
|
403
|
+
* Content nodes are inserted after the anchor and tracked for cleanup.
|
|
404
|
+
* Returns a DocumentFragment (CSR) or the claimed comment (hydration),
|
|
405
|
+
* with a `dispose` property for lifecycle management.
|
|
399
406
|
*/
|
|
400
|
-
declare function __child(fn: () => Node | string | number | boolean | null | undefined):
|
|
401
|
-
dispose: DisposeFn;
|
|
402
|
-
};
|
|
407
|
+
declare function __child(fn: () => Node | string | number | boolean | null | undefined): DisposableChild;
|
|
403
408
|
/**
|
|
404
409
|
* Insert a static (non-reactive) child value into a parent node.
|
|
405
410
|
* This is used for static JSX expression children to avoid the performance
|
|
@@ -492,6 +497,47 @@ declare function clearChildren(container: Node): void;
|
|
|
492
497
|
*/
|
|
493
498
|
declare function __list<T>(container: HTMLElement, items: Signal<T[]> | (() => T[]), keyFn: ((item: T, index: number) => string | number) | null, renderFn: (item: T) => Node): DisposeFn;
|
|
494
499
|
/**
|
|
500
|
+
* Lifecycle hooks for list animation (enter/exit/reorder).
|
|
501
|
+
*
|
|
502
|
+
* Provided by `<List animate>` via ListAnimationContext.
|
|
503
|
+
* Consumed by `__listValue()` during reconciliation.
|
|
504
|
+
*/
|
|
505
|
+
interface ListAnimationHooks {
|
|
506
|
+
/** Called before reconciliation starts. Use to snapshot element rects for FLIP. */
|
|
507
|
+
onBeforeReconcile: () => void;
|
|
508
|
+
/** Called after reconciliation finishes. Use to play FLIP animations. */
|
|
509
|
+
onAfterReconcile: () => void;
|
|
510
|
+
/** Called when a new item enters (after first render). */
|
|
511
|
+
onItemEnter: (node: Node, key: string | number) => void;
|
|
512
|
+
/** Called when an item exits. Must call `done()` when animation finishes so the node can be removed. */
|
|
513
|
+
onItemExit: (node: Node, key: string | number, done: () => void) => void;
|
|
514
|
+
}
|
|
515
|
+
/**
|
|
516
|
+
* Context for list animation hooks.
|
|
517
|
+
*
|
|
518
|
+
* When provided, `__listValue()` calls these hooks during reconciliation
|
|
519
|
+
* to enable enter/exit animations and FLIP reordering.
|
|
520
|
+
*
|
|
521
|
+
* When not provided, `__listValue()` behaves as a plain keyed list.
|
|
522
|
+
*/
|
|
523
|
+
declare const ListAnimationContext: Context<ListAnimationHooks | undefined>;
|
|
524
|
+
/**
|
|
525
|
+
* Keyed list reconciliation that returns a DisposableNode (DocumentFragment).
|
|
526
|
+
*
|
|
527
|
+
* Unlike `__list()` which appends to an existing container element,
|
|
528
|
+
* `__listValue()` manages items between comment markers in a DocumentFragment.
|
|
529
|
+
* This makes it suitable for use in component children thunks where there is
|
|
530
|
+
* no parent element variable at compile time.
|
|
531
|
+
*
|
|
532
|
+
* Compiler output target for .map() expressions in component children JSX.
|
|
533
|
+
*
|
|
534
|
+
* @param items - A signal or getter function containing the array of items
|
|
535
|
+
* @param keyFn - Extracts a unique key from each item. Pass null for unkeyed mode.
|
|
536
|
+
* @param renderFn - Creates a DOM node for an item (called once per key)
|
|
537
|
+
* @returns A DisposableNode (DocumentFragment with dispose method)
|
|
538
|
+
*/
|
|
539
|
+
declare function __listValue<T>(items: Signal<T[]> | (() => T[]), keyFn: ((item: T, index: number) => string | number) | null, renderFn: (item: T) => Node): DisposableNode;
|
|
540
|
+
/**
|
|
495
541
|
* Apply a spread props object to a DOM element.
|
|
496
542
|
*
|
|
497
543
|
* Compiler output target for JSX spread attributes on intrinsic elements:
|
|
@@ -1122,4 +1168,4 @@ declare function getSSRContext(): SSRRenderContext | undefined;
|
|
|
1122
1168
|
* clears during HMR module re-evaluation.
|
|
1123
1169
|
*/
|
|
1124
1170
|
declare function hasSSRResolver(): boolean;
|
|
1125
|
-
export { stopSignalCollection, startSignalCollection, setContextScope, setAdapter, runCleanups, resolveComponent, removeNode, registerSSRResolver, pushScope, popScope, onCleanup, onAnimationsComplete, matchRoute, matchPath, lifecycleEffect, isRenderNode, isBrowser, insertBefore, hasSSRResolver, getSSRContext, getContextScope, getAdapter, executeLoaders, domEffect, deserializeProps, deriveKey, createDOMAdapter, compileTheme, clearChildren, _tryOnCleanup, __text, styleObjectToString as __styleStr, __staticText, __spread, __show, __pushMountFrame, __prop, __on, __list, __insert, __flushMountFrame, __exitChildren, __enterChildren, __element, __discardMountFrame, __conditional, __classList, __child, __attr, __append, SSRRenderContext, SSRQueryEntry, SSRAuth, SPACING_SCALE, SIZE_KEYWORDS, SHADOW_SCALE, RenderText, RenderNode, RenderElement, RenderAdapter, RENDER_NODE_BRAND, RADIUS_SCALE, QueryEnvelopeStore, PropertyMapping, PSEUDO_PREFIXES, PSEUDO_MAP, PROPERTY_MAP, MemoryCache, MatchResult, LINE_HEIGHT_SCALE, KEYWORD_MAP, HEIGHT_AXIS_PROPERTIES, FONT_WEIGHT_SCALE, FONT_SIZE_SCALE, EntityStore, DISPLAY_MAP, CSS_COLOR_KEYWORDS, CSSDeclarationEntry, CONTENT_MAP, COLOR_NAMESPACES, ALIGNMENT_MAP };
|
|
1171
|
+
export { stopSignalCollection, startSignalCollection, setContextScope, setAdapter, runCleanups, resolveComponent, removeNode, registerSSRResolver, pushScope, popScope, onCleanup, onAnimationsComplete, matchRoute, matchPath, lifecycleEffect, isRenderNode, isBrowser, insertBefore, hasSSRResolver, getSSRContext, getContextScope, getAdapter, executeLoaders, domEffect, deserializeProps, deriveKey, createDOMAdapter, compileTheme, clearChildren, _tryOnCleanup, __text, styleObjectToString as __styleStr, __staticText, __spread, __show, __pushMountFrame, __prop, __on, __listValue, __list, __insert, __flushMountFrame, __exitChildren, __enterChildren, __element, __discardMountFrame, __conditional, __classList, __child, __attr, __append, SSRRenderContext, SSRQueryEntry, SSRAuth, SPACING_SCALE, SIZE_KEYWORDS, SHADOW_SCALE, RenderText, RenderNode, RenderElement, RenderAdapter, RENDER_NODE_BRAND, RADIUS_SCALE, QueryEnvelopeStore, PropertyMapping, PSEUDO_PREFIXES, PSEUDO_MAP, PROPERTY_MAP, MemoryCache, MatchResult, ListAnimationHooks, ListAnimationContext, LINE_HEIGHT_SCALE, KEYWORD_MAP, HEIGHT_AXIS_PROPERTIES, FONT_WEIGHT_SCALE, FONT_SIZE_SCALE, EntityStore, DISPLAY_MAP, CSS_COLOR_KEYWORDS, CSSDeclarationEntry, CONTENT_MAP, COLOR_NAMESPACES, ALIGNMENT_MAP };
|