@vertz/ui 0.2.22 → 0.2.24

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.
Files changed (36) hide show
  1. package/dist/shared/{chunk-pdqr78k9.js → chunk-18frwfc4.js} +1 -1
  2. package/dist/shared/chunk-2eh4p2n7.js +39 -0
  3. package/dist/shared/{chunk-67z8b0q8.js → chunk-2wag9c7v.js} +182 -53
  4. package/dist/shared/{chunk-c61572xp.js → chunk-2y9f9j62.js} +1 -1
  5. package/dist/shared/{chunk-szk0hyjg.js → chunk-4gen306a.js} +212 -155
  6. package/dist/shared/{chunk-yb4a0smw.js → chunk-4gmtsf6v.js} +1 -1
  7. package/dist/shared/{chunk-2qe6aqhb.js → chunk-656n0x6y.js} +48 -48
  8. package/dist/shared/{chunk-bybgyjye.js → chunk-da2w7j7w.js} +1 -1
  9. package/dist/shared/{chunk-4cmt1ve8.js → chunk-f4d5nphq.js} +1 -1
  10. package/dist/shared/chunk-ge2e6y2s.js +102 -0
  11. package/dist/shared/{chunk-4xkw6h1s.js → chunk-h1fsr8kv.js} +67 -1
  12. package/dist/shared/{chunk-7g722pdh.js → chunk-jtma4sh4.js} +2 -2
  13. package/dist/shared/{chunk-vwz86vg9.js → chunk-mbnda3pv.js} +96 -18
  14. package/dist/shared/{chunk-pq8khh47.js → chunk-t3rnfxc0.js} +64 -23
  15. package/dist/src/auth/public.d.ts +35 -1
  16. package/dist/src/auth/public.js +72 -3
  17. package/dist/src/components/index.d.ts +2 -2
  18. package/dist/src/components/index.js +51 -46
  19. package/dist/src/css/public.d.ts +7 -3
  20. package/dist/src/css/public.js +5 -5
  21. package/dist/src/form/public.js +2 -2
  22. package/dist/src/index.d.ts +211 -39
  23. package/dist/src/index.js +372 -153
  24. package/dist/src/internals.d.ts +70 -6
  25. package/dist/src/internals.js +161 -34
  26. package/dist/src/jsx-runtime/index.js +3 -5
  27. package/dist/src/query/public.d.ts +7 -3
  28. package/dist/src/query/public.js +5 -4
  29. package/dist/src/router/public.d.ts +27 -4
  30. package/dist/src/router/public.js +9 -10
  31. package/dist/src/test/index.d.ts +12 -3
  32. package/dist/src/test/index.js +3 -3
  33. package/package.json +4 -3
  34. package/reactivity.json +1 -1
  35. package/dist/shared/chunk-kjwp5q5s.js +0 -53
  36. package/dist/shared/chunk-prj7nm08.js +0 -67
@@ -187,7 +187,10 @@ interface RouteConfig<
187
187
  signal: AbortSignal;
188
188
  }) => Promise<TLoaderData> | TLoaderData;
189
189
  /** Optional error component rendered when loader throws. */
190
- errorComponent?: (error: Error) => Node;
190
+ errorComponent?: (props: {
191
+ error: Error;
192
+ retry: () => void;
193
+ }) => Node;
191
194
  /** Optional path params schema for validation/parsing. */
192
195
  params?: ParamSchema<TParams>;
193
196
  /** Optional search params schema for validation/coercion. */
@@ -225,7 +228,10 @@ interface RouteConfigLike {
225
228
  params: Record<string, string>;
226
229
  signal: AbortSignal;
227
230
  }): unknown;
228
- errorComponent?: (error: Error) => Node;
231
+ errorComponent?: (props: {
232
+ error: Error;
233
+ retry: () => void;
234
+ }) => Node;
229
235
  params?: ParamSchema<unknown>;
230
236
  searchParams?: SearchParamSchema<unknown>;
231
237
  children?: Record<string, RouteConfigLike>;
@@ -243,7 +249,10 @@ interface CompiledRoute {
243
249
  params: Record<string, string>;
244
250
  signal: AbortSignal;
245
251
  }) => Promise<unknown> | unknown;
246
- errorComponent?: RouteConfig["errorComponent"];
252
+ errorComponent?: (props: {
253
+ error: Error;
254
+ retry: () => void;
255
+ }) => Node;
247
256
  /** Optional path params schema for validation/parsing. */
248
257
  params?: ParamSchema<unknown>;
249
258
  searchParams?: RouteConfig["searchParams"];
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  createRouter
3
- } from "../../shared/chunk-7g722pdh.js";
3
+ } from "../../shared/chunk-jtma4sh4.js";
4
4
  import {
5
5
  defineRoutes
6
6
  } from "../../shared/chunk-am9zaw4h.js";
7
7
  import"../../shared/chunk-jrtrk5z4.js";
8
- import"../../shared/chunk-bybgyjye.js";
9
- import"../../shared/chunk-2qe6aqhb.js";
8
+ import"../../shared/chunk-da2w7j7w.js";
9
+ import"../../shared/chunk-656n0x6y.js";
10
10
 
11
11
  // src/test/interactions.ts
12
12
  async function click(el) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vertz/ui",
3
- "version": "0.2.22",
3
+ "version": "0.2.24",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Vertz UI framework — signals, components, JSX runtime",
@@ -69,15 +69,16 @@
69
69
  "scripts": {
70
70
  "build": "bunup",
71
71
  "test": "bun test",
72
+ "test:benchmark": "bun test src/dom/__tests__/hydration-deferred-effects-bench.local.ts",
72
73
  "test:watch": "bun test --watch",
73
74
  "typecheck": "tsc --noEmit"
74
75
  },
75
76
  "dependencies": {
76
- "@vertz/fetch": "^0.2.21"
77
+ "@vertz/fetch": "^0.2.23"
77
78
  },
78
79
  "devDependencies": {
79
80
  "@happy-dom/global-registrator": "^20.7.0",
80
- "@vertz/schema": "^0.2.21",
81
+ "@vertz/schema": "^0.2.23",
81
82
  "bunup": "^0.16.31",
82
83
  "happy-dom": "^20.7.0",
83
84
  "typescript": "^5.7.0"
package/reactivity.json CHANGED
@@ -29,7 +29,7 @@
29
29
  "kind": "function",
30
30
  "reactivity": {
31
31
  "plainProperties": ["refetch", "revalidate", "dispose"],
32
- "signalProperties": ["data", "loading", "error", "revalidating"],
32
+ "signalProperties": ["data", "loading", "error", "revalidating", "idle"],
33
33
  "type": "signal-api"
34
34
  }
35
35
  },
@@ -1,53 +0,0 @@
1
- import {
2
- styleObjectToString
3
- } from "./chunk-4xkw6h1s.js";
4
- import {
5
- deferredDomEffect
6
- } from "./chunk-2qe6aqhb.js";
7
-
8
- // src/dom/attributes.ts
9
- function __attr(el, name, fn) {
10
- return deferredDomEffect(() => {
11
- const value = fn();
12
- if (value == null || value === false) {
13
- el.removeAttribute(name);
14
- } else if (value === true) {
15
- el.setAttribute(name, "");
16
- } else if (name === "style" && typeof value === "object") {
17
- el.setAttribute(name, styleObjectToString(value));
18
- } else {
19
- el.setAttribute(name, value);
20
- }
21
- });
22
- }
23
- function __show(el, fn) {
24
- const originalDisplay = el.style.display;
25
- return deferredDomEffect(() => {
26
- el.style.display = fn() ? originalDisplay : "none";
27
- });
28
- }
29
- function __classList(el, classMap) {
30
- const disposers = [];
31
- for (const [className, fn] of Object.entries(classMap)) {
32
- disposers.push(deferredDomEffect(() => {
33
- if (fn()) {
34
- el.classList.add(className);
35
- } else {
36
- el.classList.remove(className);
37
- }
38
- }));
39
- }
40
- return () => {
41
- for (const dispose of disposers) {
42
- dispose();
43
- }
44
- };
45
- }
46
-
47
- // src/dom/events.ts
48
- function __on(el, event, handler) {
49
- el.addEventListener(event, handler);
50
- return () => el.removeEventListener(event, handler);
51
- }
52
-
53
- export { __attr, __show, __classList, __on };
@@ -1,67 +0,0 @@
1
- // src/dom/svg-tags.ts
2
- var SVG_TAGS = new Set([
3
- "svg",
4
- "path",
5
- "circle",
6
- "ellipse",
7
- "rect",
8
- "line",
9
- "polyline",
10
- "polygon",
11
- "g",
12
- "defs",
13
- "symbol",
14
- "use",
15
- "text",
16
- "tspan",
17
- "image",
18
- "foreignObject",
19
- "filter",
20
- "feGaussianBlur",
21
- "feOffset",
22
- "feColorMatrix",
23
- "feBlend",
24
- "feMerge",
25
- "feMergeNode",
26
- "feComposite",
27
- "feFlood",
28
- "linearGradient",
29
- "radialGradient",
30
- "stop",
31
- "pattern",
32
- "clipPath",
33
- "mask",
34
- "animate",
35
- "animateTransform",
36
- "set",
37
- "marker",
38
- "desc"
39
- ]);
40
- var SVG_NS = "http://www.w3.org/2000/svg";
41
- function isSVGTag(tag) {
42
- return SVG_TAGS.has(tag);
43
- }
44
- var SVG_ATTR_MAP = {
45
- strokeWidth: "stroke-width",
46
- strokeLinecap: "stroke-linecap",
47
- strokeLinejoin: "stroke-linejoin",
48
- strokeDasharray: "stroke-dasharray",
49
- strokeDashoffset: "stroke-dashoffset",
50
- strokeOpacity: "stroke-opacity",
51
- fillOpacity: "fill-opacity",
52
- fillRule: "fill-rule",
53
- clipRule: "clip-rule",
54
- clipPath: "clip-path",
55
- stopColor: "stop-color",
56
- stopOpacity: "stop-opacity",
57
- floodColor: "flood-color",
58
- floodOpacity: "flood-opacity",
59
- colorInterpolation: "color-interpolation",
60
- colorInterpolationFilters: "color-interpolation-filters",
61
- viewBox: "viewBox"
62
- };
63
- function normalizeSVGAttr(attr) {
64
- return SVG_ATTR_MAP[attr] ?? attr;
65
- }
66
-
67
- export { SVG_NS, isSVGTag, normalizeSVGAttr };