@takazudo/zfb 3.1.0 → 4.0.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.
Files changed (61) hide show
  1. package/dist/config.d.ts +57 -3
  2. package/dist/config.js +23 -12
  3. package/dist/config.js.map +1 -1
  4. package/dist/content.js.map +1 -1
  5. package/dist/index.d.ts +2 -1
  6. package/dist/index.js.map +1 -1
  7. package/dist/island-boundary.d.ts +2 -2
  8. package/dist/island-boundary.js +4 -2
  9. package/dist/island-boundary.js.map +1 -1
  10. package/dist/island.d.ts +8 -4
  11. package/dist/island.js +1 -1
  12. package/dist/island.js.map +1 -1
  13. package/dist/jsx-types.d.ts +1 -1
  14. package/dist/jsx-types.js.map +1 -1
  15. package/dist/plugins.d.ts +18 -4
  16. package/dist/plugins.js.map +1 -1
  17. package/dist/runtime.js.map +1 -1
  18. package/dist/slugify.js.map +1 -1
  19. package/dist/zudo-react/description.d.ts +18 -0
  20. package/dist/zudo-react/description.js +41 -0
  21. package/dist/zudo-react/description.js.map +1 -1
  22. package/dist/zudo-react/dom-bindings.d.ts +2 -1
  23. package/dist/zudo-react/dom-bindings.js +16 -22
  24. package/dist/zudo-react/dom-bindings.js.map +1 -1
  25. package/dist/zudo-react/forms.js.map +1 -1
  26. package/dist/zudo-react/hydrate.js +52 -31
  27. package/dist/zudo-react/hydrate.js.map +1 -1
  28. package/dist/zudo-react/index.d.ts +2 -1
  29. package/dist/zudo-react/index.js.map +1 -1
  30. package/dist/zudo-react/jsx-dev-runtime.d.ts +2 -6
  31. package/dist/zudo-react/jsx-dev-runtime.js +3 -3
  32. package/dist/zudo-react/jsx-dev-runtime.js.map +1 -1
  33. package/dist/zudo-react/jsx-runtime.js +2 -2
  34. package/dist/zudo-react/jsx-runtime.js.map +1 -1
  35. package/dist/zudo-react/jsx-types.d.ts +73 -26
  36. package/dist/zudo-react/jsx-types.js.map +1 -1
  37. package/dist/zudo-react/props-transport.d.ts +2 -0
  38. package/dist/zudo-react/props-transport.js +42 -14
  39. package/dist/zudo-react/props-transport.js.map +1 -1
  40. package/dist/zudo-react/raw-html.d.ts +1 -0
  41. package/dist/zudo-react/raw-html.js +260 -0
  42. package/dist/zudo-react/raw-html.js.map +1 -0
  43. package/dist/zudo-react/reactive.js.map +1 -1
  44. package/dist/zudo-react/render-html.d.ts +11 -1
  45. package/dist/zudo-react/render-html.js +83 -56
  46. package/dist/zudo-react/render-html.js.map +1 -1
  47. package/dist/zudo-react/root.d.ts +9 -1
  48. package/dist/zudo-react/root.js +45 -3
  49. package/dist/zudo-react/root.js.map +1 -1
  50. package/dist/zudo-react/server.d.ts +2 -0
  51. package/dist/zudo-react/server.js.map +1 -1
  52. package/dist/zudo-react/style.d.ts +10 -0
  53. package/dist/zudo-react/style.js +525 -0
  54. package/dist/zudo-react/style.js.map +1 -0
  55. package/dist/zudo-react/testing.d.ts +27 -0
  56. package/dist/zudo-react/testing.js +117 -0
  57. package/dist/zudo-react/testing.js.map +1 -0
  58. package/dist/zudo-react/vocabulary.d.ts +7 -0
  59. package/dist/zudo-react/vocabulary.js +64 -5
  60. package/dist/zudo-react/vocabulary.js.map +1 -1
  61. package/package.json +16 -10
@@ -0,0 +1,117 @@
1
+ import { h } from "./index.js";
2
+ import { hydrate as hydrateRoot, mount as mountRoot } from "./client.js";
3
+ import { flush as flushUpdates } from "./scheduler.js";
4
+ import { islandRoot, renderToString } from "./server.js";
5
+ import { parseProps } from "./props-transport.js";
6
+ const testBuild = "test";
7
+ function componentName(component) {
8
+ const name = component.name;
9
+ const displayName = component.displayName;
10
+ if (!name || (displayName && displayName !== name))
11
+ throw new TypeError(`ZR_ISLAND_IDENTITY: invalid component name ${name || "<anonymous>"}`);
12
+ return displayName ?? name;
13
+ }
14
+ /** Render one real island, parse it into a connected host, then activate it on demand. */
15
+ export function createIslandTest(component, props, options) {
16
+ const serverIdentity = { component: componentName(component), build: testBuild };
17
+ const html = renderToString(islandRoot(h(component, props), { identity: serverIdentity }));
18
+ const owner = options.document.createElement("div");
19
+ owner.innerHTML = html;
20
+ const host = owner.firstElementChild;
21
+ if (!host || owner.children.length !== 1)
22
+ throw new TypeError("ZR_ISLAND_TEST: expected one island host");
23
+ const islandHost = host;
24
+ if (!options.document.body)
25
+ throw new TypeError("ZR_ISLAND_TEST: document requires a body");
26
+ options.document.body.append(owner);
27
+ const diagnostics = [];
28
+ let root = null;
29
+ let disposed = false;
30
+ const test = {
31
+ html,
32
+ host: islandHost,
33
+ identity: options.identity ?? serverIdentity,
34
+ diagnostics,
35
+ hydrate() {
36
+ return activate(hydrateRoot);
37
+ },
38
+ mount() {
39
+ return activate(mountRoot);
40
+ },
41
+ flush: flushUpdates,
42
+ dispose() {
43
+ if (disposed)
44
+ return;
45
+ disposed = true;
46
+ try {
47
+ root?.unmount();
48
+ }
49
+ finally {
50
+ islandHost.remove();
51
+ owner.remove();
52
+ }
53
+ },
54
+ };
55
+ function activate(run) {
56
+ if (disposed)
57
+ throw new Error("ZR_ISLAND_TEST: disposed test");
58
+ // The client receives the serialized transport payload, not the original props object.
59
+ let clientProps;
60
+ try {
61
+ clientProps = parseProps(islandHost.getAttribute("data-props") ?? "");
62
+ }
63
+ catch (error) {
64
+ diagnostics.push({
65
+ code: "ZR_PROPS",
66
+ phase: "preflight",
67
+ component: test.identity.component,
68
+ componentStack: [test.identity.component],
69
+ path: `/${islandHost.localName}`,
70
+ expected: "valid serialized props",
71
+ actual: String(error),
72
+ protocol: "zudo-react/1",
73
+ build: test.identity.build,
74
+ });
75
+ return null;
76
+ }
77
+ const result = run(h(component, clientProps), islandHost, {
78
+ identity: test.identity,
79
+ report: (diagnostic) => diagnostics.push(diagnostic),
80
+ });
81
+ if (result)
82
+ root = result;
83
+ return result;
84
+ }
85
+ return test;
86
+ }
87
+ /** Supply scanner metadata to synchronous full-page SDK Island rendering. */
88
+ export function withIslandTestContext(options, callback) {
89
+ const scope = globalThis;
90
+ const hadMetadata = Object.hasOwn(scope, "__zfb");
91
+ const previous = scope.__zfb;
92
+ const components = Array.isArray(options.components)
93
+ ? options.components
94
+ : Object.values(options.components);
95
+ const names = [...new Set(components.map(componentName))];
96
+ scope.__zfb = {
97
+ ...previous,
98
+ zudoReactBuild: options.build ?? testBuild,
99
+ zudoReactIslands: names,
100
+ };
101
+ try {
102
+ const result = callback();
103
+ if (result !== null &&
104
+ typeof result === "object" &&
105
+ "then" in result &&
106
+ typeof result.then === "function")
107
+ throw new TypeError("ZR_ISLAND_TEST: context callback must be synchronous");
108
+ return result;
109
+ }
110
+ finally {
111
+ if (hadMetadata)
112
+ scope.__zfb = previous;
113
+ else
114
+ delete scope.__zfb;
115
+ }
116
+ }
117
+ //# sourceMappingURL=testing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"testing.js","sourceRoot":"","sources":["../../src/zudo-react/testing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAwD,MAAM,YAAY,CAAC;AACrF,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,KAAK,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGlD,MAAM,SAAS,GAAG,MAAM,CAAC;AAEzB,SAAS,aAAa,CAAC,SAAyB;IAC9C,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC;IAC5B,MAAM,WAAW,GAAI,SAAyD,CAAC,WAAW,CAAC;IAC3F,IAAI,CAAC,IAAI,IAAI,CAAC,WAAW,IAAI,WAAW,KAAK,IAAI,CAAC;QAChD,MAAM,IAAI,SAAS,CAAC,8CAA8C,IAAI,IAAI,aAAa,EAAE,CAAC,CAAC;IAC7F,OAAO,WAAW,IAAI,IAAI,CAAC;AAC7B,CAAC;AAqBD,0FAA0F;AAC1F,MAAM,UAAU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QAC1B,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAOD,6EAA6E;AAC7E,MAAM,UAAU,qBAAqB,CAAI,OAAiC,EAAE,QAAiB;IAC3F,MAAM,KAAK,GAAG,UAAiF,CAAC;IAChG,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAClD,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC;IAC7B,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC;QAClD,CAAC,CAAC,OAAO,CAAC,UAAU;QACpB,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACtC,MAAM,KAAK,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IAC1D,KAAK,CAAC,KAAK,GAAG;QACZ,GAAG,QAAQ;QACX,cAAc,EAAE,OAAO,CAAC,KAAK,IAAI,SAAS;QAC1C,gBAAgB,EAAE,KAAK;KACxB,CAAC;IACF,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,QAAQ,EAAE,CAAC;QAC1B,IACE,MAAM,KAAK,IAAI;YACf,OAAO,MAAM,KAAK,QAAQ;YAC1B,MAAM,IAAI,MAAM;YAChB,OAAO,MAAM,CAAC,IAAI,KAAK,UAAU;YAEjC,MAAM,IAAI,SAAS,CAAC,sDAAsD,CAAC,CAAC;QAC9E,OAAO,MAAM,CAAC;IAChB,CAAC;YAAS,CAAC;QACT,IAAI,WAAW;YAAE,KAAK,CAAC,KAAK,GAAG,QAAQ,CAAC;;YACnC,OAAO,KAAK,CAAC,KAAK,CAAC;IAC1B,CAAC;AACH,CAAC","sourcesContent":["import { h, type Component, type Diagnostic, type IslandIdentity } from \"./index.js\";\nimport { hydrate as hydrateRoot, mount as mountRoot } from \"./client.js\";\nimport { flush as flushUpdates } from \"./scheduler.js\";\nimport { islandRoot, renderToString } from \"./server.js\";\nimport { parseProps } from \"./props-transport.js\";\nimport type { RootHandle } from \"./root.js\";\n\nconst testBuild = \"test\";\n\nfunction componentName(component: Component<any>): string {\n const name = component.name;\n const displayName = (component as typeof component & { displayName?: string }).displayName;\n if (!name || (displayName && displayName !== name))\n throw new TypeError(`ZR_ISLAND_IDENTITY: invalid component name ${name || \"<anonymous>\"}`);\n return displayName ?? name;\n}\n\nexport interface IslandTestOptions {\n /** The DOM document used to parse SSR markup and attach the host. */\n document: Document;\n /** Override the client identity to exercise identity failure cases explicitly. */\n identity?: IslandIdentity;\n}\n\nexport interface IslandTest {\n readonly html: string;\n readonly host: Element;\n /** Change this before activation to test a mismatched client identity. */\n identity: IslandIdentity;\n readonly diagnostics: Diagnostic[];\n hydrate(): RootHandle | null;\n mount(): RootHandle | null;\n flush(): Promise<void>;\n dispose(): void;\n}\n\n/** Render one real island, parse it into a connected host, then activate it on demand. */\nexport function createIslandTest<P extends Record<string, unknown>>(\n component: Component<P>,\n props: P,\n options: IslandTestOptions,\n): IslandTest {\n const serverIdentity = { component: componentName(component), build: testBuild };\n const html = renderToString(islandRoot(h(component, props), { identity: serverIdentity }));\n const owner = options.document.createElement(\"div\");\n owner.innerHTML = html;\n const host = owner.firstElementChild;\n if (!host || owner.children.length !== 1)\n throw new TypeError(\"ZR_ISLAND_TEST: expected one island host\");\n const islandHost = host;\n if (!options.document.body) throw new TypeError(\"ZR_ISLAND_TEST: document requires a body\");\n options.document.body.append(owner);\n\n const diagnostics: Diagnostic[] = [];\n let root: RootHandle | null = null;\n let disposed = false;\n const test: IslandTest = {\n html,\n host: islandHost,\n identity: options.identity ?? serverIdentity,\n diagnostics,\n hydrate() {\n return activate(hydrateRoot);\n },\n mount() {\n return activate(mountRoot);\n },\n flush: flushUpdates,\n dispose() {\n if (disposed) return;\n disposed = true;\n try {\n root?.unmount();\n } finally {\n islandHost.remove();\n owner.remove();\n }\n },\n };\n function activate(run: typeof hydrateRoot): RootHandle | null {\n if (disposed) throw new Error(\"ZR_ISLAND_TEST: disposed test\");\n // The client receives the serialized transport payload, not the original props object.\n let clientProps: Record<string, unknown>;\n try {\n clientProps = parseProps(islandHost.getAttribute(\"data-props\") ?? \"\");\n } catch (error) {\n diagnostics.push({\n code: \"ZR_PROPS\",\n phase: \"preflight\",\n component: test.identity.component,\n componentStack: [test.identity.component],\n path: `/${islandHost.localName}`,\n expected: \"valid serialized props\",\n actual: String(error),\n protocol: \"zudo-react/1\",\n build: test.identity.build,\n });\n return null;\n }\n const result = run(h(component, clientProps), islandHost, {\n identity: test.identity,\n report: (diagnostic) => diagnostics.push(diagnostic),\n });\n if (result) root = result;\n return result;\n }\n return test;\n}\n\nexport interface IslandTestContextOptions {\n components: Readonly<Record<string, Component<any>>> | readonly Component<any>[];\n build?: string;\n}\n\n/** Supply scanner metadata to synchronous full-page SDK Island rendering. */\nexport function withIslandTestContext<T>(options: IslandTestContextOptions, callback: () => T): T {\n const scope = globalThis as typeof globalThis & { __zfb?: Record<string, unknown> | undefined };\n const hadMetadata = Object.hasOwn(scope, \"__zfb\");\n const previous = scope.__zfb;\n const components = Array.isArray(options.components)\n ? options.components\n : Object.values(options.components);\n const names = [...new Set(components.map(componentName))];\n scope.__zfb = {\n ...previous,\n zudoReactBuild: options.build ?? testBuild,\n zudoReactIslands: names,\n };\n try {\n const result = callback();\n if (\n result !== null &&\n typeof result === \"object\" &&\n \"then\" in result &&\n typeof result.then === \"function\"\n )\n throw new TypeError(\"ZR_ISLAND_TEST: context callback must be synchronous\");\n return result;\n } finally {\n if (hadMetadata) scope.__zfb = previous;\n else delete scope.__zfb;\n }\n}\n"]}
@@ -1,11 +1,18 @@
1
1
  export declare const voidTags: Set<string>;
2
2
  export declare const booleanAttrs: Set<string>;
3
+ export declare const enumeratedBooleanAttrs: Set<string>;
4
+ export declare const overloadedBooleanAttrs: Set<string>;
5
+ export declare const numericAttrs: Set<string>;
3
6
  export declare const commonAttrs: Set<string>;
4
7
  export declare const htmlAttrs: Set<string>;
5
8
  export declare const svgAttrs: Set<string>;
6
9
  export declare const svgTags: Set<string>;
7
10
  export declare const htmlTags: Set<string>;
8
11
  export type Namespace = "html" | "svg";
12
+ export declare function emptyIframeChildren(value: unknown): boolean;
13
+ export declare function attributeError(name: string, value: unknown, custom: boolean): string | undefined;
14
+ export declare function attributeText(name: string, value: unknown): string | null;
15
+ export declare function attributeNamespace(name: string): string | null;
9
16
  export declare function isDialectProp(name: string, namespace: Namespace, custom: boolean): boolean;
10
17
  export declare function dialectSuggestion(name: string, namespace: Namespace, custom: boolean): string | undefined;
11
18
  export declare function reactiveModelSuggestion(tag: string, name: string, inputType: string, custom: boolean): "modelValue" | "modelChecked" | undefined;
@@ -1,11 +1,70 @@
1
1
  const words = (value) => new Set(value.split(" "));
2
2
  export const voidTags = words("area base br col embed hr img input link meta param source track wbr");
3
- export const booleanAttrs = words("hidden inert readonly autofocus required disabled checked selected multiple open controls muted loop autoplay novalidate formnovalidate allowfullscreen reversed");
3
+ export const booleanAttrs = words("hidden inert readonly autofocus required disabled checked selected multiple open controls muted loop autoplay novalidate formnovalidate allowfullscreen reversed async defer playsinline");
4
+ export const enumeratedBooleanAttrs = words("spellcheck contenteditable draggable");
5
+ export const overloadedBooleanAttrs = words("download");
6
+ export const numericAttrs = words("start");
7
+ const stringAttrs = words("property itemprop hreflang as integrity nonce popover popovertarget popovertargetaction srcdoc fetchpriority inputmode autocapitalize form label preload wrap closedby xmlns xmlns:xlink href focusable stroke-dasharray text-anchor");
4
8
  export const commonAttrs = words("id class title lang dir slot role style hidden inert contenteditable draggable spellcheck tabindex accesskey translate onclick onload onerror");
5
- export const htmlAttrs = words("href target rel download src alt width height type name value placeholder for charset datetime readonly autofocus required disabled checked selected multiple open controls muted loop autoplay novalidate formnovalidate maxlength minlength min max step pattern autocomplete accept accept-charset http-equiv content media method action enctype rows cols colspan rowspan scope cite poster loading decoding sizes srcset crossorigin referrerpolicy sandbox allow allowfullscreen start reversed");
6
- export const svgAttrs = words("width height viewBox preserveAspectRatio gradientUnits gradientTransform markerWidth markerHeight refX refY xlink:href xml:lang stroke-width fill-rule clip-rule stroke-linecap stroke-linejoin stop-color stop-opacity fill stroke d x y x1 x2 y1 y2 cx cy r rx ry points transform opacity offset");
7
- export const svgTags = words("svg g path circle ellipse rect line polyline polygon text tspan defs symbol use clipPath mask linearGradient radialGradient stop title desc foreignObject");
8
- export const htmlTags = words("html head body title base link meta style script div span p a br hr main header footer nav section article aside h1 h2 h3 h4 h5 h6 ul ol li dl dt dd blockquote pre code strong em b i small mark time figure figcaption img picture source video audio track canvas form label input button textarea select option optgroup fieldset legend output progress meter datalist table caption thead tbody tfoot tr th td col colgroup details summary dialog template slot iframe noscript address abbr bdi bdo cite data del dfn ins kbd map area object param q rp rt ruby s samp sub sup u var wbr embed xmp noembed noframes plaintext");
9
+ export const htmlAttrs = words("href target rel download src alt width height type name value placeholder for charset datetime readonly autofocus required disabled checked selected multiple open controls muted loop autoplay novalidate formnovalidate maxlength minlength min max step pattern autocomplete accept accept-charset http-equiv content media method action enctype rows cols colspan rowspan scope cite poster loading decoding sizes srcset crossorigin referrerpolicy sandbox allow allowfullscreen start reversed property itemprop hreflang as integrity async defer nonce popover popovertarget popovertargetaction srcdoc fetchpriority inputmode autocapitalize form label preload playsinline wrap closedby");
10
+ export const svgAttrs = words("width height viewBox preserveAspectRatio gradientUnits gradientTransform markerWidth markerHeight refX refY xlink:href xml:lang xmlns xmlns:xlink href focusable stroke-width fill-rule clip-rule stroke-linecap stroke-linejoin stop-color stop-opacity fill-opacity stroke-dasharray text-anchor fill stroke d x y x1 x2 y1 y2 cx cy r rx ry points transform opacity offset");
11
+ export const svgTags = words("svg g path circle ellipse rect line polyline polygon text tspan defs symbol use clipPath mask linearGradient radialGradient stop title desc foreignObject pattern filter marker image");
12
+ export const htmlTags = words("html head body title base link meta style script div span p a br hr main header footer nav section article aside search hgroup menu h1 h2 h3 h4 h5 h6 ul ol li dl dt dd blockquote pre code strong em b i small mark time figure figcaption img picture source video audio track canvas form label input button textarea select option optgroup fieldset legend output progress meter datalist table caption thead tbody tfoot tr th td col colgroup details summary dialog template slot iframe noscript address abbr bdi bdo cite data del dfn ins kbd map area object param q rp rb rt ruby s samp sub sup u var wbr embed xmp noembed noframes plaintext");
13
+ // An iframe is an owned element shell. Its fallback and foreign document are never owned children.
14
+ export function emptyIframeChildren(value) {
15
+ if (value == null || typeof value === "boolean" || value === "")
16
+ return true;
17
+ return Array.isArray(value) && value.every(emptyIframeChildren);
18
+ }
19
+ export function attributeError(name, value, custom) {
20
+ if (value == null)
21
+ return undefined;
22
+ if (custom)
23
+ return typeof value === "string" ? undefined : "requires a string";
24
+ if (name === "style")
25
+ return undefined; // style has its own object validator.
26
+ if (booleanAttrs.has(name))
27
+ return typeof value === "boolean" ? undefined : "requires a boolean";
28
+ if (overloadedBooleanAttrs.has(name))
29
+ return typeof value === "string" || typeof value === "boolean"
30
+ ? undefined
31
+ : "requires a string or boolean";
32
+ if (enumeratedBooleanAttrs.has(name))
33
+ return typeof value === "string" || typeof value === "boolean"
34
+ ? undefined
35
+ : "requires a string or boolean";
36
+ if (numericAttrs.has(name))
37
+ return typeof value === "string" || (typeof value === "number" && Number.isFinite(value))
38
+ ? undefined
39
+ : "requires a string or finite number";
40
+ if (stringAttrs.has(name))
41
+ return typeof value === "string" ? undefined : "requires a string";
42
+ if (/^on[a-z]/.test(name))
43
+ return typeof value === "string" ? undefined : "requires a string";
44
+ if (typeof value === "string" ||
45
+ (typeof value === "number" && Number.isFinite(value)) ||
46
+ (typeof value === "boolean" && /^(data-|aria-)/.test(name)))
47
+ return undefined;
48
+ return "requires a string or finite number";
49
+ }
50
+ export function attributeText(name, value) {
51
+ if (value == null ||
52
+ (booleanAttrs.has(name) && value === false) ||
53
+ (overloadedBooleanAttrs.has(name) && value === false))
54
+ return null;
55
+ if ((booleanAttrs.has(name) || overloadedBooleanAttrs.has(name)) && value === true)
56
+ return "";
57
+ return String(value);
58
+ }
59
+ export function attributeNamespace(name) {
60
+ if (name === "xlink:href")
61
+ return "http://www.w3.org/1999/xlink";
62
+ if (name === "xml:lang")
63
+ return "http://www.w3.org/XML/1998/namespace";
64
+ if (name === "xmlns" || name === "xmlns:xlink")
65
+ return "http://www.w3.org/2000/xmlns/";
66
+ return null;
67
+ }
9
68
  const propAliases = {
10
69
  className: { spelling: "class" },
11
70
  htmlFor: { spelling: "for" },
@@ -1 +1 @@
1
- {"version":3,"file":"vocabulary.js","sourceRoot":"","sources":["../../src/zudo-react/vocabulary.ts"],"names":[],"mappings":"AAAA,MAAM,KAAK,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;AAE3D,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAC3B,sEAAsE,CACvE,CAAC;AACF,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,CAC/B,kKAAkK,CACnK,CAAC;AACF,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,CAC9B,+IAA+I,CAChJ,CAAC;AACF,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAC5B,weAAwe,CACze,CAAC;AACF,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAC3B,qSAAqS,CACtS,CAAC;AACF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAC1B,2JAA2J,CAC5J,CAAC;AACF,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAC3B,wmBAAwmB,CACzmB,CAAC;AAQF,MAAM,WAAW,GAAwC;IACvD,SAAS,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE;IAChC,OAAO,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE;IAC5B,OAAO,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE;IAChC,QAAQ,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE;IAClC,QAAQ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,UAAU;YAAE,OAAO,cAAc,CAAC;IACtD,CAAC;IACD,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;QACrB,IAAI,GAAG,KAAK,UAAU,IAAI,GAAG,KAAK,QAAQ;YAAE,OAAO,YAAY,CAAC;QAChE,IACE,GAAG,KAAK,OAAO;YACf,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC;YAEzE,OAAO,YAAY,CAAC;IACxB,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AACD,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAAC,qDAAqD,CAAC,CAAC","sourcesContent":["const words = (value: string) => new Set(value.split(\" \"));\n\nexport const voidTags = words(\n \"area base br col embed hr img input link meta param source track wbr\",\n);\nexport const booleanAttrs = words(\n \"hidden inert readonly autofocus required disabled checked selected multiple open controls muted loop autoplay novalidate formnovalidate allowfullscreen reversed\",\n);\nexport const commonAttrs = words(\n \"id class title lang dir slot role style hidden inert contenteditable draggable spellcheck tabindex accesskey translate onclick onload onerror\",\n);\nexport const htmlAttrs = words(\n \"href target rel download src alt width height type name value placeholder for charset datetime readonly autofocus required disabled checked selected multiple open controls muted loop autoplay novalidate formnovalidate maxlength minlength min max step pattern autocomplete accept accept-charset http-equiv content media method action enctype rows cols colspan rowspan scope cite poster loading decoding sizes srcset crossorigin referrerpolicy sandbox allow allowfullscreen start reversed\",\n);\nexport const svgAttrs = words(\n \"width height viewBox preserveAspectRatio gradientUnits gradientTransform markerWidth markerHeight refX refY xlink:href xml:lang stroke-width fill-rule clip-rule stroke-linecap stroke-linejoin stop-color stop-opacity fill stroke d x y x1 x2 y1 y2 cx cy r rx ry points transform opacity offset\",\n);\nexport const svgTags = words(\n \"svg g path circle ellipse rect line polyline polygon text tspan defs symbol use clipPath mask linearGradient radialGradient stop title desc foreignObject\",\n);\nexport const htmlTags = words(\n \"html head body title base link meta style script div span p a br hr main header footer nav section article aside h1 h2 h3 h4 h5 h6 ul ol li dl dt dd blockquote pre code strong em b i small mark time figure figcaption img picture source video audio track canvas form label input button textarea select option optgroup fieldset legend output progress meter datalist table caption thead tbody tfoot tr th td col colgroup details summary dialog template slot iframe noscript address abbr bdi bdo cite data del dfn ins kbd map area object param q rp rt ruby s samp sub sup u var wbr embed xmp noembed noframes plaintext\",\n);\nexport type Namespace = \"html\" | \"svg\";\n\ntype PropAlias = {\n readonly spelling: string;\n readonly namespace?: Namespace;\n};\n\nconst propAliases: Readonly<Record<string, PropAlias>> = {\n className: { spelling: \"class\" },\n htmlFor: { spelling: \"for\" },\n charSet: { spelling: \"charset\" },\n dateTime: { spelling: \"datetime\" },\n tabIndex: { spelling: \"tabindex\" },\n readOnly: { spelling: \"readonly\" },\n autoComplete: { spelling: \"autocomplete\" },\n autoFocus: { spelling: \"autofocus\" },\n maxLength: { spelling: \"maxlength\" },\n minLength: { spelling: \"minlength\" },\n crossOrigin: { spelling: \"crossorigin\" },\n srcSet: { spelling: \"srcset\" },\n acceptCharset: { spelling: \"accept-charset\" },\n httpEquiv: { spelling: \"http-equiv\" },\n encType: { spelling: \"enctype\" },\n noValidate: { spelling: \"novalidate\" },\n formNoValidate: { spelling: \"formnovalidate\" },\n colSpan: { spelling: \"colspan\" },\n rowSpan: { spelling: \"rowspan\" },\n referrerPolicy: { spelling: \"referrerpolicy\" },\n allowFullScreen: { spelling: \"allowfullscreen\" },\n autoPlay: { spelling: \"autoplay\" },\n contentEditable: { spelling: \"contenteditable\" },\n spellCheck: { spelling: \"spellcheck\" },\n accessKey: { spelling: \"accesskey\" },\n dangerouslySetInnerHTML: { spelling: \"rawHtml\" },\n strokeWidth: { spelling: \"stroke-width\", namespace: \"svg\" },\n fillRule: { spelling: \"fill-rule\", namespace: \"svg\" },\n clipRule: { spelling: \"clip-rule\", namespace: \"svg\" },\n strokeLinecap: { spelling: \"stroke-linecap\", namespace: \"svg\" },\n strokeLinejoin: { spelling: \"stroke-linejoin\", namespace: \"svg\" },\n stopColor: { spelling: \"stop-color\", namespace: \"svg\" },\n stopOpacity: { spelling: \"stop-opacity\", namespace: \"svg\" },\n xlinkHref: { spelling: \"xlink:href\", namespace: \"svg\" },\n xmlLang: { spelling: \"xml:lang\", namespace: \"svg\" },\n};\n\nconst legacyDialect = words(\n \"className htmlFor charSet dateTime tabIndex readOnly strokeWidth dangerouslySetInnerHTML\",\n);\n\nfunction allowedAliasTarget(spelling: string, namespace: Namespace): boolean {\n if (spelling === \"rawHtml\") return namespace === \"html\";\n return (\n commonAttrs.has(spelling) ||\n (namespace === \"svg\" ? svgAttrs.has(spelling) : htmlAttrs.has(spelling))\n );\n}\n\nfunction eventSuggestion(name: string): string {\n const event = name.slice(2);\n return `on:${event === \"DoubleClick\" ? \"dblclick\" : event.toLowerCase()}`;\n}\n\nexport function isDialectProp(name: string, namespace: Namespace, custom: boolean): boolean {\n if (/^on[A-Z]/.test(name) || legacyDialect.has(name)) return true;\n if (custom) return false;\n const alias = propAliases[name];\n return (\n alias !== undefined &&\n (!alias.namespace || alias.namespace === namespace) &&\n allowedAliasTarget(alias.spelling, namespace)\n );\n}\n\nexport function dialectSuggestion(\n name: string,\n namespace: Namespace,\n custom: boolean,\n): string | undefined {\n if (/^on[A-Z]/.test(name)) return eventSuggestion(name);\n if (custom && !legacyDialect.has(name)) return undefined;\n const alias = propAliases[name];\n if (!alias || (alias.namespace && alias.namespace !== namespace)) return undefined;\n return allowedAliasTarget(alias.spelling, namespace) ? alias.spelling : undefined;\n}\n\nexport function reactiveModelSuggestion(\n tag: string,\n name: string,\n inputType: string,\n custom: boolean,\n): \"modelValue\" | \"modelChecked\" | undefined {\n if (custom) return undefined;\n if (name === \"checked\" && tag === \"input\") {\n if (inputType === \"radio\") return \"modelValue\";\n if (inputType === \"checkbox\") return \"modelChecked\";\n }\n if (name === \"value\") {\n if (tag === \"textarea\" || tag === \"select\") return \"modelValue\";\n if (\n tag === \"input\" &&\n [\"text\", \"search\", \"email\", \"url\", \"tel\", \"password\"].includes(inputType)\n )\n return \"modelValue\";\n }\n return undefined;\n}\nexport const formProps = words(\"modelValue modelChecked defaultValue defaultChecked\");\n"]}
1
+ {"version":3,"file":"vocabulary.js","sourceRoot":"","sources":["../../src/zudo-react/vocabulary.ts"],"names":[],"mappings":"AAAA,MAAM,KAAK,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;AAE3D,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAC3B,sEAAsE,CACvE,CAAC;AACF,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,CAC/B,0LAA0L,CAC3L,CAAC;AACF,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,CAAC,sCAAsC,CAAC,CAAC;AACpF,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC;AACxD,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;AAC3C,MAAM,WAAW,GAAG,KAAK,CACvB,sOAAsO,CACvO,CAAC;AACF,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,CAC9B,+IAA+I,CAChJ,CAAC;AACF,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAC5B,uqBAAuqB,CACxqB,CAAC;AACF,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAC3B,gXAAgX,CACjX,CAAC;AACF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAC1B,uLAAuL,CACxL,CAAC;AACF,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAC3B,8nBAA8nB,CAC/nB,CAAC;AAGF,mGAAmG;AACnG,MAAM,UAAU,mBAAmB,CAAC,KAAc;IAChD,IAAI,KAAK,IAAI,IAAI,IAAI,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE;QAAE,OAAO,I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iB,EACjB,MAAe;IAEf,IAAI,MAAM;QAAE,OAAO,SAAS,CAAC;IAC7B,IAAI,IAAI,KAAK,SAAS,IAAI,GAAG,KAAK,OAAO,EAAE,CAAC;QAC1C,IAAI,SAAS,KAAK,OAAO;YAAE,OAAO,YAAY,CAAC;QAC/C,IAAI,SAAS,KAAK,UAAU;YAAE,OAAO,cAAc,CAAC;IACtD,CAAC;IACD,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;QACrB,IAAI,GAAG,KAAK,UAAU,IAAI,GAAG,KAAK,QAAQ;YAAE,OAAO,YAAY,CAAC;QAChE,IACE,GAAG,KAAK,OAAO;YACf,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC;YAEzE,OAAO,YAAY,CAAC;IACxB,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AACD,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAAC,qDAAqD,CAAC,CAAC","sourcesContent":["const words = (value: string) => new Set(value.split(\" \"));\n\nexport const voidTags = words(\n \"area base br col embed hr img input link meta param source track wbr\",\n);\nexport const booleanAttrs = words(\n \"hidden inert readonly autofocus required disabled checked selected multiple open controls muted loop autoplay novalidate formnovalidate allowfullscreen reversed async defer playsinline\",\n);\nexport const enumeratedBooleanAttrs = words(\"spellcheck contenteditable draggable\");\nexport const overloadedBooleanAttrs = words(\"download\");\nexport const numericAttrs = words(\"start\");\nconst stringAttrs = words(\n \"property itemprop hreflang as integrity nonce popover popovertarget popovertargetaction srcdoc fetchpriority inputmode autocapitalize form label preload wrap closedby xmlns xmlns:xlink href focusable stroke-dasharray text-anchor\",\n);\nexport const commonAttrs = words(\n \"id class title lang dir slot role style hidden inert contenteditable draggable spellcheck tabindex accesskey translate onclick onload onerror\",\n);\nexport const htmlAttrs = words(\n \"href target rel download src alt width height type name value placeholder for charset datetime readonly autofocus required disabled checked selected multiple open controls muted loop autoplay novalidate formnovalidate maxlength minlength min max step pattern autocomplete accept accept-charset http-equiv content media method action enctype rows cols colspan rowspan scope cite poster loading decoding sizes srcset crossorigin referrerpolicy sandbox allow allowfullscreen start reversed property itemprop hreflang as integrity async defer nonce popover popovertarget popovertargetaction srcdoc fetchpriority inputmode autocapitalize form label preload playsinline wrap closedby\",\n);\nexport const svgAttrs = words(\n \"width height viewBox preserveAspectRatio gradientUnits gradientTransform markerWidth markerHeight refX refY xlink:href xml:lang xmlns xmlns:xlink href focusable stroke-width fill-rule clip-rule stroke-linecap stroke-linejoin stop-color stop-opacity fill-opacity stroke-dasharray text-anchor fill stroke d x y x1 x2 y1 y2 cx cy r rx ry points transform opacity offset\",\n);\nexport const svgTags = words(\n \"svg g path circle ellipse rect line polyline polygon text tspan defs symbol use clipPath mask linearGradient radialGradient stop title desc foreignObject pattern filter marker image\",\n);\nexport const htmlTags = words(\n \"html head body title base link meta style script div span p a br hr main header footer nav section article aside search hgroup menu h1 h2 h3 h4 h5 h6 ul ol li dl dt dd blockquote pre code strong em b i small mark time figure figcaption img picture source video audio track canvas form label input button textarea select option optgroup fieldset legend output progress meter datalist table caption thead tbody tfoot tr th td col colgroup details summary dialog template slot iframe noscript address abbr bdi bdo cite data del dfn ins kbd map area object param q rp rb rt ruby s samp sub sup u var wbr embed xmp noembed noframes plaintext\",\n);\nexport type Namespace = \"html\" | \"svg\";\n\n// An iframe is an owned element shell. Its fallback and foreign document are never owned children.\nexport function emptyIframeChildren(value: unknown): boolean {\n if (value == null || typeof value === \"boolean\" || value === \"\") return true;\n return Array.isArray(value) && value.every(emptyIframeChildren);\n}\n\nexport function attributeError(name: string, value: unknown, custom: boolean): string | undefined {\n if (value == null) return undefined;\n if (custom) return typeof value === \"string\" ? undefined : \"requires a string\";\n if (name === \"style\") return undefined; // style has its own object validator.\n if (booleanAttrs.has(name)) return typeof value === \"boolean\" ? undefined : \"requires a boolean\";\n if (overloadedBooleanAttrs.has(name))\n return typeof value === \"string\" || typeof value === \"boolean\"\n ? undefined\n : \"requires a string or boolean\";\n if (enumeratedBooleanAttrs.has(name))\n return typeof value === \"string\" || typeof value === \"boolean\"\n ? undefined\n : \"requires a string or boolean\";\n if (numericAttrs.has(name))\n return typeof value === \"string\" || (typeof value === \"number\" && Number.isFinite(value))\n ? undefined\n : \"requires a string or finite number\";\n if (stringAttrs.has(name)) return typeof value === \"string\" ? undefined : \"requires a string\";\n if (/^on[a-z]/.test(name)) return typeof value === \"string\" ? undefined : \"requires a string\";\n if (\n typeof value === \"string\" ||\n (typeof value === \"number\" && Number.isFinite(value)) ||\n (typeof value === \"boolean\" && /^(data-|aria-)/.test(name))\n )\n return undefined;\n return \"requires a string or finite number\";\n}\n\nexport function attributeText(name: string, value: unknown): string | null {\n if (\n value == null ||\n (booleanAttrs.has(name) && value === false) ||\n (overloadedBooleanAttrs.has(name) && value === false)\n )\n return null;\n if ((booleanAttrs.has(name) || overloadedBooleanAttrs.has(name)) && value === true) return \"\";\n return String(value);\n}\n\nexport function attributeNamespace(name: string): string | null {\n if (name === \"xlink:href\") return \"http://www.w3.org/1999/xlink\";\n if (name === \"xml:lang\") return \"http://www.w3.org/XML/1998/namespace\";\n if (name === \"xmlns\" || name === \"xmlns:xlink\") return \"http://www.w3.org/2000/xmlns/\";\n return null;\n}\n\ntype PropAlias = {\n readonly spelling: string;\n readonly namespace?: Namespace;\n};\n\nconst propAliases: Readonly<Record<string, PropAlias>> = {\n className: { spelling: \"class\" },\n htmlFor: { spelling: \"for\" },\n charSet: { spelling: \"charset\" },\n dateTime: { spelling: \"datetime\" },\n tabIndex: { spelling: \"tabindex\" },\n readOnly: { spelling: \"readonly\" },\n autoComplete: { spelling: \"autocomplete\" },\n autoFocus: { spelling: \"autofocus\" },\n maxLength: { spelling: \"maxlength\" },\n minLength: { spelling: \"minlength\" },\n crossOrigin: { spelling: \"crossorigin\" },\n srcSet: { spelling: \"srcset\" },\n acceptCharset: { spelling: \"accept-charset\" },\n httpEquiv: { spelling: \"http-equiv\" },\n encType: { spelling: \"enctype\" },\n noValidate: { spelling: \"novalidate\" },\n formNoValidate: { spelling: \"formnovalidate\" },\n colSpan: { spelling: \"colspan\" },\n rowSpan: { spelling: \"rowspan\" },\n referrerPolicy: { spelling: \"referrerpolicy\" },\n allowFullScreen: { spelling: \"allowfullscreen\" },\n autoPlay: { spelling: \"autoplay\" },\n contentEditable: { spelling: \"contenteditable\" },\n spellCheck: { spelling: \"spellcheck\" },\n accessKey: { spelling: \"accesskey\" },\n dangerouslySetInnerHTML: { spelling: \"rawHtml\" },\n strokeWidth: { spelling: \"stroke-width\", namespace: \"svg\" },\n fillRule: { spelling: \"fill-rule\", namespace: \"svg\" },\n clipRule: { spelling: \"clip-rule\", namespace: \"svg\" },\n strokeLinecap: { spelling: \"stroke-linecap\", namespace: \"svg\" },\n strokeLinejoin: { spelling: \"stroke-linejoin\", namespace: \"svg\" },\n stopColor: { spelling: \"stop-color\", namespace: \"svg\" },\n stopOpacity: { spelling: \"stop-opacity\", namespace: \"svg\" },\n xlinkHref: { spelling: \"xlink:href\", namespace: \"svg\" },\n xmlLang: { spelling: \"xml:lang\", namespace: \"svg\" },\n};\n\nconst legacyDialect = words(\n \"className htmlFor charSet dateTime tabIndex readOnly strokeWidth dangerouslySetInnerHTML\",\n);\n\nfunction allowedAliasTarget(spelling: string, namespace: Namespace): boolean {\n if (spelling === \"rawHtml\") return namespace === \"html\";\n return (\n commonAttrs.has(spelling) ||\n (namespace === \"svg\" ? svgAttrs.has(spelling) : htmlAttrs.has(spelling))\n );\n}\n\nfunction eventSuggestion(name: string): string {\n const event = name.slice(2);\n return `on:${event === \"DoubleClick\" ? \"dblclick\" : event.toLowerCase()}`;\n}\n\nexport function isDialectProp(name: string, namespace: Namespace, custom: boolean): boolean {\n if (/^on[A-Z]/.test(name) || legacyDialect.has(name)) return true;\n if (custom) return false;\n const alias = propAliases[name];\n return (\n alias !== undefined &&\n (!alias.namespace || alias.namespace === namespace) &&\n allowedAliasTarget(alias.spelling, namespace)\n );\n}\n\nexport function dialectSuggestion(\n name: string,\n namespace: Namespace,\n custom: boolean,\n): string | undefined {\n if (/^on[A-Z]/.test(name)) return eventSuggestion(name);\n if (custom && !legacyDialect.has(name)) return undefined;\n const alias = propAliases[name];\n if (!alias || (alias.namespace && alias.namespace !== namespace)) return undefined;\n return allowedAliasTarget(alias.spelling, namespace) ? alias.spelling : undefined;\n}\n\nexport function reactiveModelSuggestion(\n tag: string,\n name: string,\n inputType: string,\n custom: boolean,\n): \"modelValue\" | \"modelChecked\" | undefined {\n if (custom) return undefined;\n if (name === \"checked\" && tag === \"input\") {\n if (inputType === \"radio\") return \"modelValue\";\n if (inputType === \"checkbox\") return \"modelChecked\";\n }\n if (name === \"value\") {\n if (tag === \"textarea\" || tag === \"select\") return \"modelValue\";\n if (\n tag === \"input\" &&\n [\"text\", \"search\", \"email\", \"url\", \"tel\", \"password\"].includes(inputType)\n )\n return \"modelValue\";\n }\n return undefined;\n}\nexport const formProps = words(\"modelValue modelChecked defaultValue defaultChecked\");\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takazudo/zfb",
3
- "version": "3.1.0",
3
+ "version": "4.0.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Content-site engine on the web's Request/Response model — prerender to static HTML, serve on Cloudflare Workers, or run as a local content server inside your app. One Rust binary. SDK with islands, content collections, pagination, and config helpers.",
@@ -79,6 +79,10 @@
79
79
  "./zudo-react/client": {
80
80
  "types": "./dist/zudo-react/client.d.ts",
81
81
  "default": "./dist/zudo-react/client.js"
82
+ },
83
+ "./zudo-react/testing": {
84
+ "types": "./dist/zudo-react/testing.d.ts",
85
+ "default": "./dist/zudo-react/testing.js"
82
86
  }
83
87
  },
84
88
  "bin": {
@@ -92,11 +96,11 @@
92
96
  "LICENSE"
93
97
  ],
94
98
  "optionalDependencies": {
95
- "@takazudo/zfb-darwin-arm64": "3.1.0",
96
- "@takazudo/zfb-darwin-x64": "3.1.0",
97
- "@takazudo/zfb-linux-arm64-gnu": "3.1.0",
98
- "@takazudo/zfb-linux-x64-gnu": "3.1.0",
99
- "@takazudo/zfb-win32-x64-msvc": "3.1.0"
99
+ "@takazudo/zfb-darwin-arm64": "4.0.0",
100
+ "@takazudo/zfb-darwin-x64": "4.0.0",
101
+ "@takazudo/zfb-linux-arm64-gnu": "4.0.0",
102
+ "@takazudo/zfb-linux-x64-gnu": "4.0.0",
103
+ "@takazudo/zfb-win32-x64-msvc": "4.0.0"
100
104
  },
101
105
  "publishConfig": {
102
106
  "access": "public"
@@ -108,13 +112,15 @@
108
112
  "devDependencies": {
109
113
  "@types/node": "^22.0.0",
110
114
  "happy-dom": "^15.7.4",
111
- "typescript": "^5.9.0",
112
- "vitest": "^2.1.9"
115
+ "typescript": "7.0.2",
116
+ "typescript-5.9": "npm:typescript@5.9.3",
117
+ "typescript-6.0": "npm:typescript@6.0.3",
118
+ "vite-plus": "1.0.0"
113
119
  },
114
120
  "scripts": {
115
121
  "build": "tsc",
116
- "test": "vitest run && tsc -p tsconfig.zudo-react-fixture.json && tsc -p tsconfig.zudo-react-dev-fixture.json && tsc -p tsconfig.zudo-react-sdk-fixture.json",
117
- "test:watch": "vitest",
122
+ "test": "vp test run && tsc -p tsconfig.zudo-react-fixture.json && tsc -p tsconfig.zudo-react-dev-fixture.json && tsc -p tsconfig.zudo-react-sdk-fixture.json",
123
+ "test:watch": "vp test",
118
124
  "typecheck": "tsc --noEmit"
119
125
  }
120
126
  }