@number10/phaserjsx 0.6.1 → 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 (81) hide show
  1. package/README.md +13 -3
  2. package/dist/clip/stencil-clip.d.ts +86 -0
  3. package/dist/clip/stencil-clip.d.ts.map +1 -0
  4. package/dist/components/appliers/applyGestures.d.ts.map +1 -1
  5. package/dist/components/creators/createGestures.d.ts.map +1 -1
  6. package/dist/components/custom/CharText/CharText.d.ts.map +1 -1
  7. package/dist/components/custom/Dialog.d.ts +1 -1
  8. package/dist/components/custom/Divider.d.ts +1 -1
  9. package/dist/components/custom/Graphics.d.ts +1 -1
  10. package/dist/components/custom/Graphics.d.ts.map +1 -1
  11. package/dist/components/custom/Icon.d.ts.map +1 -1
  12. package/dist/components/custom/Image.d.ts.map +1 -1
  13. package/dist/components/custom/Joystick.d.ts +1 -1
  14. package/dist/components/custom/NineSlice.d.ts.map +1 -1
  15. package/dist/components/custom/Particles.d.ts +1 -1
  16. package/dist/components/custom/Particles.d.ts.map +1 -1
  17. package/dist/components/custom/Portal.d.ts.map +1 -1
  18. package/dist/components/custom/RefOriginView.d.ts +1 -1
  19. package/dist/components/custom/ScrollView.d.ts.map +1 -1
  20. package/dist/components/custom/Sprite.d.ts +1 -1
  21. package/dist/components/custom/Sprite.d.ts.map +1 -1
  22. package/dist/components/custom/Text.d.ts.map +1 -1
  23. package/dist/components/custom/TileSprite.d.ts +1 -1
  24. package/dist/components/custom/TileSprite.d.ts.map +1 -1
  25. package/dist/components/custom/View.d.ts.map +1 -1
  26. package/dist/components/custom/index.cjs +34 -36
  27. package/dist/components/custom/index.js +2 -37
  28. package/dist/components/primitives/graphics.d.ts.map +1 -1
  29. package/dist/components/primitives/image.d.ts.map +1 -1
  30. package/dist/components/primitives/nineslice.d.ts.map +1 -1
  31. package/dist/components/primitives/particles.d.ts.map +1 -1
  32. package/dist/components/primitives/sprite.d.ts.map +1 -1
  33. package/dist/components/primitives/text.d.ts.map +1 -1
  34. package/dist/components/primitives/tilesprite.d.ts.map +1 -1
  35. package/dist/components/primitives/view.d.ts.map +1 -1
  36. package/dist/custom-BN31OAJq.cjs +30826 -0
  37. package/dist/custom-BN31OAJq.cjs.map +1 -0
  38. package/dist/custom-oy3mBnrW.js +29562 -0
  39. package/dist/custom-oy3mBnrW.js.map +1 -0
  40. package/dist/fx/fx-creators/blur.d.ts.map +1 -1
  41. package/dist/fx/fx-creators/color-matrix.d.ts.map +1 -1
  42. package/dist/fx/fx-creators/glow.d.ts.map +1 -1
  43. package/dist/fx/fx-creators/pixelate.d.ts.map +1 -1
  44. package/dist/fx/fx-creators/shadow.d.ts.map +1 -1
  45. package/dist/fx/fx-creators/vignette.d.ts.map +1 -1
  46. package/dist/fx/use-fx.d.ts +3 -3
  47. package/dist/fx/use-fx.d.ts.map +1 -1
  48. package/dist/gestures/gesture-manager.d.ts +3 -1
  49. package/dist/gestures/gesture-manager.d.ts.map +1 -1
  50. package/dist/gestures/gesture-types.d.ts +1 -1
  51. package/dist/gestures/gesture-types.d.ts.map +1 -1
  52. package/dist/index.cjs +1547 -2837
  53. package/dist/index.cjs.map +1 -1
  54. package/dist/index.js +1356 -2866
  55. package/dist/index.js.map +1 -1
  56. package/dist/jsx-dev-runtime.cjs +12 -7
  57. package/dist/jsx-dev-runtime.cjs.map +1 -1
  58. package/dist/jsx-dev-runtime.js +11 -11
  59. package/dist/jsx-dev-runtime.js.map +1 -1
  60. package/dist/jsx-runtime.cjs +55 -33
  61. package/dist/jsx-runtime.cjs.map +1 -1
  62. package/dist/jsx-runtime.js +56 -37
  63. package/dist/jsx-runtime.js.map +1 -1
  64. package/dist/layout/layout-engine.d.ts.map +1 -1
  65. package/dist/scripts/generate-icon-loaders.js +146 -143
  66. package/dist/scripts/generate-icon-types.js +94 -83
  67. package/dist/scripts/generate-icons.d.ts +1 -2
  68. package/dist/scripts/generate-icons.d.ts.map +1 -1
  69. package/dist/scripts/generate-icons.js +381 -399
  70. package/dist/scripts/icon-generator-config.d.ts +0 -1
  71. package/dist/scripts/icon-generator-config.js +7 -4
  72. package/dist/theme-base.d.ts.map +1 -1
  73. package/dist/vite-plugin-icons.d.ts +1 -2
  74. package/dist/vite-plugin-icons.js +109 -90
  75. package/package.json +24 -22
  76. package/dist/TransformOriginView-Dw_HKnFH.cjs +0 -17116
  77. package/dist/TransformOriginView-Dw_HKnFH.cjs.map +0 -1
  78. package/dist/TransformOriginView-i8uVBHb1.js +0 -17100
  79. package/dist/TransformOriginView-i8uVBHb1.js.map +0 -1
  80. package/dist/components/custom/index.cjs.map +0 -1
  81. package/dist/components/custom/index.js.map +0 -1
@@ -1,10 +1,15 @@
1
- "use strict";
2
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const jsxRuntime = require("./jsx-runtime.cjs");
4
- const jsx = jsxRuntime.jsx;
5
- const jsxDEV = jsxRuntime.jsx;
6
- exports.Fragment = jsxRuntime.Fragment;
7
- exports.jsxs = jsxRuntime.jsxs;
2
+ const require_jsx_runtime = require("./jsx-runtime.cjs");
3
+ //#region src/jsx-dev-runtime.ts
4
+ /**
5
+ * JSX dev runtime (re-exports jsx-runtime for development mode)
6
+ */
7
+ var jsx = require_jsx_runtime.jsx;
8
+ var jsxDEV = require_jsx_runtime.jsx;
9
+ //#endregion
10
+ exports.Fragment = require_jsx_runtime.Fragment;
8
11
  exports.jsx = jsx;
9
12
  exports.jsxDEV = jsxDEV;
10
- //# sourceMappingURL=jsx-dev-runtime.cjs.map
13
+ exports.jsxs = require_jsx_runtime.jsxs;
14
+
15
+ //# sourceMappingURL=jsx-dev-runtime.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"jsx-dev-runtime.cjs","sources":["../src/jsx-dev-runtime.ts"],"sourcesContent":["/**\n * JSX dev runtime (re-exports jsx-runtime for development mode)\n */\nimport { jsx as jsxProd } from './jsx-runtime'\n\nexport { Fragment, jsxs } from './jsx-runtime'\nexport const jsx = jsxProd\nexport const jsxDEV = jsxProd\n"],"names":["jsxProd"],"mappings":";;;AAMO,MAAM,MAAMA,WAAAA;AACZ,MAAM,SAASA,WAAAA;;;;;"}
1
+ {"version":3,"file":"jsx-dev-runtime.cjs","names":[],"sources":["../src/jsx-dev-runtime.ts"],"sourcesContent":["/**\n * JSX dev runtime (re-exports jsx-runtime for development mode)\n */\nimport { jsx as jsxProd } from './jsx-runtime'\n\nexport { Fragment, jsxs } from './jsx-runtime'\nexport const jsx = jsxProd\nexport const jsxDEV = jsxProd\n"],"mappings":";;;;;;AAMA,IAAa,MAAM,oBAAA;AACnB,IAAa,SAAS,oBAAA"}
@@ -1,11 +1,11 @@
1
- import { jsx as jsx$1 } from "./jsx-runtime.js";
2
- import { Fragment, jsxs } from "./jsx-runtime.js";
3
- const jsx = jsx$1;
4
- const jsxDEV = jsx$1;
5
- export {
6
- Fragment,
7
- jsx,
8
- jsxDEV,
9
- jsxs
10
- };
11
- //# sourceMappingURL=jsx-dev-runtime.js.map
1
+ import { Fragment, jsx as jsx$1, jsxs } from "./jsx-runtime.js";
2
+ //#region src/jsx-dev-runtime.ts
3
+ /**
4
+ * JSX dev runtime (re-exports jsx-runtime for development mode)
5
+ */
6
+ var jsx = jsx$1;
7
+ var jsxDEV = jsx$1;
8
+ //#endregion
9
+ export { Fragment, jsx, jsxDEV, jsxs };
10
+
11
+ //# sourceMappingURL=jsx-dev-runtime.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"jsx-dev-runtime.js","sources":["../src/jsx-dev-runtime.ts"],"sourcesContent":["/**\n * JSX dev runtime (re-exports jsx-runtime for development mode)\n */\nimport { jsx as jsxProd } from './jsx-runtime'\n\nexport { Fragment, jsxs } from './jsx-runtime'\nexport const jsx = jsxProd\nexport const jsxDEV = jsxProd\n"],"names":["jsxProd"],"mappings":";;AAMO,MAAM,MAAMA;AACZ,MAAM,SAASA;"}
1
+ {"version":3,"file":"jsx-dev-runtime.js","names":[],"sources":["../src/jsx-dev-runtime.ts"],"sourcesContent":["/**\n * JSX dev runtime (re-exports jsx-runtime for development mode)\n */\nimport { jsx as jsxProd } from './jsx-runtime'\n\nexport { Fragment, jsxs } from './jsx-runtime'\nexport const jsx = jsxProd\nexport const jsxDEV = jsxProd\n"],"mappings":";;;;;AAMA,IAAa,MAAM;AACnB,IAAa,SAAS"}
@@ -1,43 +1,65 @@
1
- "use strict";
2
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const Fragment = (props) => props?.children ?? null;
2
+ //#region src/jsx-runtime.ts
3
+ var Fragment = (props) => props?.children ?? null;
4
+ /**
5
+ * Safely sets a property on a VNode, handling frozen/sealed objects from bundlers
6
+ * @param vnode - VNode to set property on
7
+ * @param key - Property key
8
+ * @param value - Value to set
9
+ * @returns Original VNode if extensible, or shallow copy with property
10
+ */
4
11
  function setVNodeProp(vnode, key, value) {
5
- if (Object.isExtensible(vnode)) {
6
- vnode[key] = value;
7
- return vnode;
8
- }
9
- return { ...vnode, [key]: value };
12
+ if (Object.isExtensible(vnode)) {
13
+ vnode[key] = value;
14
+ return vnode;
15
+ }
16
+ return {
17
+ ...vnode,
18
+ [key]: value
19
+ };
10
20
  }
21
+ /**
22
+ * JSX factory for automatic runtime (dynamic children)
23
+ * Used by TypeScript for expressions like {items.map(...)}
24
+ * @param type - Element type (string or component function)
25
+ * @param props - Props including children
26
+ * @param key - Optional key for identity tracking
27
+ * @returns VNode object
28
+ */
11
29
  function jsx(type, props, key) {
12
- const { children, expand, proportion, theme, ...rest } = props ?? {};
13
- const kids = children == null ? [] : Array.isArray(children) ? children.flat(Infinity) : [children];
14
- let vnode = { type, props: rest, children: kids };
15
- if (key !== void 0 && key !== null) {
16
- vnode = setVNodeProp(
17
- vnode,
18
- "__key",
19
- typeof key === "string" || typeof key === "number" ? key : String(key)
20
- );
21
- }
22
- if (theme !== void 0) {
23
- vnode = setVNodeProp(vnode, "__theme", theme);
24
- }
25
- if (expand !== void 0 || proportion !== void 0) {
26
- const addConfig = {};
27
- if (expand !== void 0) addConfig.expand = expand;
28
- if (proportion !== void 0) addConfig.proportion = proportion;
29
- vnode = setVNodeProp(vnode, "__addConfig", addConfig);
30
- }
31
- return vnode;
30
+ const { children, expand, proportion, theme, ...rest } = props ?? {};
31
+ let vnode = {
32
+ type,
33
+ props: rest,
34
+ children: children == null ? [] : Array.isArray(children) ? children.flat(Infinity) : [children]
35
+ };
36
+ if (key !== void 0 && key !== null) vnode = setVNodeProp(vnode, "__key", typeof key === "string" || typeof key === "number" ? key : String(key));
37
+ if (theme !== void 0) vnode = setVNodeProp(vnode, "__theme", theme);
38
+ if (expand !== void 0 || proportion !== void 0) {
39
+ const addConfig = {};
40
+ if (expand !== void 0) addConfig.expand = expand;
41
+ if (proportion !== void 0) addConfig.proportion = proportion;
42
+ vnode = setVNodeProp(vnode, "__addConfig", addConfig);
43
+ }
44
+ return vnode;
32
45
  }
46
+ /**
47
+ * JSX factory for static children arrays
48
+ * Used by TypeScript when children are directly listed in JSX (not via .map())
49
+ * Marks children as static so VDOM doesn't warn about missing keys
50
+ * @param type - Element type (string or component function)
51
+ * @param props - Props including children
52
+ * @param key - Optional key for identity tracking
53
+ * @returns VNode object
54
+ */
33
55
  function jsxs(type, props, key) {
34
- let vnode = jsx(type, props, key);
35
- if (vnode && typeof vnode === "object" && "type" in vnode) {
36
- vnode = setVNodeProp(vnode, "__staticChildren", true);
37
- }
38
- return vnode;
56
+ let vnode = jsx(type, props, key);
57
+ if (vnode && typeof vnode === "object" && "type" in vnode) vnode = setVNodeProp(vnode, "__staticChildren", true);
58
+ return vnode;
39
59
  }
60
+ //#endregion
40
61
  exports.Fragment = Fragment;
41
62
  exports.jsx = jsx;
42
63
  exports.jsxs = jsxs;
43
- //# sourceMappingURL=jsx-runtime.cjs.map
64
+
65
+ //# sourceMappingURL=jsx-runtime.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"jsx-runtime.cjs","sources":["../src/jsx-runtime.ts"],"sourcesContent":["/**\n * Minimal JSX runtime for the TS \"react-jsx\" automatic runtime.\n * This builds plain VNode objects consumed by our custom mount/patch.\n */\nimport type { VNode } from './hooks'\nimport type { VNodeLike } from './types'\n\nexport const Fragment = (props: { children?: VNodeLike }): VNodeLike => props?.children ?? null\n\n/**\n * Safely sets a property on a VNode, handling frozen/sealed objects from bundlers\n * @param vnode - VNode to set property on\n * @param key - Property key\n * @param value - Value to set\n * @returns Original VNode if extensible, or shallow copy with property\n */\nfunction setVNodeProp<T extends VNode, K extends keyof VNode>(\n vnode: T,\n key: K,\n value: VNode[K]\n): T {\n if (Object.isExtensible(vnode)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ;(vnode as any)[key] = value\n return vnode\n }\n // VNode is frozen - create shallow copy\n return { ...vnode, [key]: value } as T\n}\n\n/**\n * JSX factory for automatic runtime (dynamic children)\n * Used by TypeScript for expressions like {items.map(...)}\n * @param type - Element type (string or component function)\n * @param props - Props including children\n * @param key - Optional key for identity tracking\n * @returns VNode object\n */\nexport function jsx(\n type: unknown,\n props: Record<string, unknown> | null,\n key?: unknown\n): VNodeLike {\n const { children, expand, proportion, theme, ...rest } = props ?? {}\n // Flatten children arrays deeply to support {arrayVariable} in JSX\n const kids =\n children == null ? [] : Array.isArray(children) ? children.flat(Infinity) : [children]\n let vnode: VNode = { type, props: rest, children: kids }\n\n // Extract key\n if (key !== undefined && key !== null) {\n vnode = setVNodeProp(\n vnode,\n '__key',\n typeof key === 'string' || typeof key === 'number' ? key : String(key)\n )\n }\n\n // Extract theme and store separately (removed from props)\n if (theme !== undefined) {\n vnode = setVNodeProp(vnode, '__theme', theme as NonNullable<VNode['__theme']>)\n }\n\n // Extract UI add() config and store separately (removed from props)\n if (expand !== undefined || proportion !== undefined) {\n const addConfig: NonNullable<VNode['__addConfig']> = {}\n if (expand !== undefined) addConfig.expand = expand as boolean\n if (proportion !== undefined) addConfig.proportion = proportion as number\n vnode = setVNodeProp(vnode, '__addConfig', addConfig)\n }\n\n return vnode\n}\n\n/**\n * JSX factory for static children arrays\n * Used by TypeScript when children are directly listed in JSX (not via .map())\n * Marks children as static so VDOM doesn't warn about missing keys\n * @param type - Element type (string or component function)\n * @param props - Props including children\n * @param key - Optional key for identity tracking\n * @returns VNode object\n */\nexport function jsxs(\n type: unknown,\n props: Record<string, unknown> | null,\n key?: unknown\n): VNodeLike {\n let vnode = jsx(type, props, key) as VNode\n // Mark as static children - no key warnings needed\n if (vnode && typeof vnode === 'object' && 'type' in vnode) {\n vnode = setVNodeProp(vnode, '__staticChildren', true)\n }\n return vnode\n}\n"],"names":[],"mappings":";;AAOO,MAAM,WAAW,CAAC,UAA+C,OAAO,YAAY;AAS3F,SAAS,aACP,OACA,KACA,OACG;AACH,MAAI,OAAO,aAAa,KAAK,GAAG;AAE5B,UAAc,GAAG,IAAI;AACvB,WAAO;AAAA,EACT;AAEA,SAAO,EAAE,GAAG,OAAO,CAAC,GAAG,GAAG,MAAA;AAC5B;AAUO,SAAS,IACd,MACA,OACA,KACW;AACX,QAAM,EAAE,UAAU,QAAQ,YAAY,OAAO,GAAG,KAAA,IAAS,SAAS,CAAA;AAElE,QAAM,OACJ,YAAY,OAAO,CAAA,IAAK,MAAM,QAAQ,QAAQ,IAAI,SAAS,KAAK,QAAQ,IAAI,CAAC,QAAQ;AACvF,MAAI,QAAe,EAAE,MAAM,OAAO,MAAM,UAAU,KAAA;AAGlD,MAAI,QAAQ,UAAa,QAAQ,MAAM;AACrC,YAAQ;AAAA,MACN;AAAA,MACA;AAAA,MACA,OAAO,QAAQ,YAAY,OAAO,QAAQ,WAAW,MAAM,OAAO,GAAG;AAAA,IAAA;AAAA,EAEzE;AAGA,MAAI,UAAU,QAAW;AACvB,YAAQ,aAAa,OAAO,WAAW,KAAsC;AAAA,EAC/E;AAGA,MAAI,WAAW,UAAa,eAAe,QAAW;AACpD,UAAM,YAA+C,CAAA;AACrD,QAAI,WAAW,OAAW,WAAU,SAAS;AAC7C,QAAI,eAAe,OAAW,WAAU,aAAa;AACrD,YAAQ,aAAa,OAAO,eAAe,SAAS;AAAA,EACtD;AAEA,SAAO;AACT;AAWO,SAAS,KACd,MACA,OACA,KACW;AACX,MAAI,QAAQ,IAAI,MAAM,OAAO,GAAG;AAEhC,MAAI,SAAS,OAAO,UAAU,YAAY,UAAU,OAAO;AACzD,YAAQ,aAAa,OAAO,oBAAoB,IAAI;AAAA,EACtD;AACA,SAAO;AACT;;;;"}
1
+ {"version":3,"file":"jsx-runtime.cjs","names":[],"sources":["../src/jsx-runtime.ts"],"sourcesContent":["/**\n * Minimal JSX runtime for the TS \"react-jsx\" automatic runtime.\n * This builds plain VNode objects consumed by our custom mount/patch.\n */\nimport type { VNode } from './hooks'\nimport type { VNodeLike } from './types'\n\nexport const Fragment = (props: { children?: VNodeLike }): VNodeLike => props?.children ?? null\n\n/**\n * Safely sets a property on a VNode, handling frozen/sealed objects from bundlers\n * @param vnode - VNode to set property on\n * @param key - Property key\n * @param value - Value to set\n * @returns Original VNode if extensible, or shallow copy with property\n */\nfunction setVNodeProp<T extends VNode, K extends keyof VNode>(\n vnode: T,\n key: K,\n value: VNode[K]\n): T {\n if (Object.isExtensible(vnode)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ;(vnode as any)[key] = value\n return vnode\n }\n // VNode is frozen - create shallow copy\n return { ...vnode, [key]: value } as T\n}\n\n/**\n * JSX factory for automatic runtime (dynamic children)\n * Used by TypeScript for expressions like {items.map(...)}\n * @param type - Element type (string or component function)\n * @param props - Props including children\n * @param key - Optional key for identity tracking\n * @returns VNode object\n */\nexport function jsx(\n type: unknown,\n props: Record<string, unknown> | null,\n key?: unknown\n): VNodeLike {\n const { children, expand, proportion, theme, ...rest } = props ?? {}\n // Flatten children arrays deeply to support {arrayVariable} in JSX\n const kids =\n children == null ? [] : Array.isArray(children) ? children.flat(Infinity) : [children]\n let vnode: VNode = { type, props: rest, children: kids }\n\n // Extract key\n if (key !== undefined && key !== null) {\n vnode = setVNodeProp(\n vnode,\n '__key',\n typeof key === 'string' || typeof key === 'number' ? key : String(key)\n )\n }\n\n // Extract theme and store separately (removed from props)\n if (theme !== undefined) {\n vnode = setVNodeProp(vnode, '__theme', theme as NonNullable<VNode['__theme']>)\n }\n\n // Extract UI add() config and store separately (removed from props)\n if (expand !== undefined || proportion !== undefined) {\n const addConfig: NonNullable<VNode['__addConfig']> = {}\n if (expand !== undefined) addConfig.expand = expand as boolean\n if (proportion !== undefined) addConfig.proportion = proportion as number\n vnode = setVNodeProp(vnode, '__addConfig', addConfig)\n }\n\n return vnode\n}\n\n/**\n * JSX factory for static children arrays\n * Used by TypeScript when children are directly listed in JSX (not via .map())\n * Marks children as static so VDOM doesn't warn about missing keys\n * @param type - Element type (string or component function)\n * @param props - Props including children\n * @param key - Optional key for identity tracking\n * @returns VNode object\n */\nexport function jsxs(\n type: unknown,\n props: Record<string, unknown> | null,\n key?: unknown\n): VNodeLike {\n let vnode = jsx(type, props, key) as VNode\n // Mark as static children - no key warnings needed\n if (vnode && typeof vnode === 'object' && 'type' in vnode) {\n vnode = setVNodeProp(vnode, '__staticChildren', true)\n }\n return vnode\n}\n"],"mappings":";;AAOA,IAAa,YAAY,UAA+C,OAAO,YAAY;;;;;;;;AAS3F,SAAS,aACP,OACA,KACA,OACG;CACH,IAAI,OAAO,aAAa,KAAK,GAAG;EAE7B,MAAe,OAAO;EACvB,OAAO;CACT;CAEA,OAAO;EAAE,GAAG;GAAQ,MAAM;CAAM;AAClC;;;;;;;;;AAUA,SAAgB,IACd,MACA,OACA,KACW;CACX,MAAM,EAAE,UAAU,QAAQ,YAAY,OAAO,GAAG,SAAS,SAAS,CAAC;CAInE,IAAI,QAAe;EAAE;EAAM,OAAO;EAAM,UADtC,YAAY,OAAO,CAAC,IAAI,MAAM,QAAQ,QAAQ,IAAI,SAAS,KAAK,QAAQ,IAAI,CAAC,QAAQ;CAChC;CAGvD,IAAI,QAAQ,KAAA,KAAa,QAAQ,MAC/B,QAAQ,aACN,OACA,SACA,OAAO,QAAQ,YAAY,OAAO,QAAQ,WAAW,MAAM,OAAO,GAAG,CACvE;CAIF,IAAI,UAAU,KAAA,GACZ,QAAQ,aAAa,OAAO,WAAW,KAAsC;CAI/E,IAAI,WAAW,KAAA,KAAa,eAAe,KAAA,GAAW;EACpD,MAAM,YAA+C,CAAC;EACtD,IAAI,WAAW,KAAA,GAAW,UAAU,SAAS;EAC7C,IAAI,eAAe,KAAA,GAAW,UAAU,aAAa;EACrD,QAAQ,aAAa,OAAO,eAAe,SAAS;CACtD;CAEA,OAAO;AACT;;;;;;;;;;AAWA,SAAgB,KACd,MACA,OACA,KACW;CACX,IAAI,QAAQ,IAAI,MAAM,OAAO,GAAG;CAEhC,IAAI,SAAS,OAAO,UAAU,YAAY,UAAU,OAClD,QAAQ,aAAa,OAAO,oBAAoB,IAAI;CAEtD,OAAO;AACT"}
@@ -1,43 +1,62 @@
1
- const Fragment = (props) => props?.children ?? null;
1
+ //#region src/jsx-runtime.ts
2
+ var Fragment = (props) => props?.children ?? null;
3
+ /**
4
+ * Safely sets a property on a VNode, handling frozen/sealed objects from bundlers
5
+ * @param vnode - VNode to set property on
6
+ * @param key - Property key
7
+ * @param value - Value to set
8
+ * @returns Original VNode if extensible, or shallow copy with property
9
+ */
2
10
  function setVNodeProp(vnode, key, value) {
3
- if (Object.isExtensible(vnode)) {
4
- vnode[key] = value;
5
- return vnode;
6
- }
7
- return { ...vnode, [key]: value };
11
+ if (Object.isExtensible(vnode)) {
12
+ vnode[key] = value;
13
+ return vnode;
14
+ }
15
+ return {
16
+ ...vnode,
17
+ [key]: value
18
+ };
8
19
  }
20
+ /**
21
+ * JSX factory for automatic runtime (dynamic children)
22
+ * Used by TypeScript for expressions like {items.map(...)}
23
+ * @param type - Element type (string or component function)
24
+ * @param props - Props including children
25
+ * @param key - Optional key for identity tracking
26
+ * @returns VNode object
27
+ */
9
28
  function jsx(type, props, key) {
10
- const { children, expand, proportion, theme, ...rest } = props ?? {};
11
- const kids = children == null ? [] : Array.isArray(children) ? children.flat(Infinity) : [children];
12
- let vnode = { type, props: rest, children: kids };
13
- if (key !== void 0 && key !== null) {
14
- vnode = setVNodeProp(
15
- vnode,
16
- "__key",
17
- typeof key === "string" || typeof key === "number" ? key : String(key)
18
- );
19
- }
20
- if (theme !== void 0) {
21
- vnode = setVNodeProp(vnode, "__theme", theme);
22
- }
23
- if (expand !== void 0 || proportion !== void 0) {
24
- const addConfig = {};
25
- if (expand !== void 0) addConfig.expand = expand;
26
- if (proportion !== void 0) addConfig.proportion = proportion;
27
- vnode = setVNodeProp(vnode, "__addConfig", addConfig);
28
- }
29
- return vnode;
29
+ const { children, expand, proportion, theme, ...rest } = props ?? {};
30
+ let vnode = {
31
+ type,
32
+ props: rest,
33
+ children: children == null ? [] : Array.isArray(children) ? children.flat(Infinity) : [children]
34
+ };
35
+ if (key !== void 0 && key !== null) vnode = setVNodeProp(vnode, "__key", typeof key === "string" || typeof key === "number" ? key : String(key));
36
+ if (theme !== void 0) vnode = setVNodeProp(vnode, "__theme", theme);
37
+ if (expand !== void 0 || proportion !== void 0) {
38
+ const addConfig = {};
39
+ if (expand !== void 0) addConfig.expand = expand;
40
+ if (proportion !== void 0) addConfig.proportion = proportion;
41
+ vnode = setVNodeProp(vnode, "__addConfig", addConfig);
42
+ }
43
+ return vnode;
30
44
  }
45
+ /**
46
+ * JSX factory for static children arrays
47
+ * Used by TypeScript when children are directly listed in JSX (not via .map())
48
+ * Marks children as static so VDOM doesn't warn about missing keys
49
+ * @param type - Element type (string or component function)
50
+ * @param props - Props including children
51
+ * @param key - Optional key for identity tracking
52
+ * @returns VNode object
53
+ */
31
54
  function jsxs(type, props, key) {
32
- let vnode = jsx(type, props, key);
33
- if (vnode && typeof vnode === "object" && "type" in vnode) {
34
- vnode = setVNodeProp(vnode, "__staticChildren", true);
35
- }
36
- return vnode;
55
+ let vnode = jsx(type, props, key);
56
+ if (vnode && typeof vnode === "object" && "type" in vnode) vnode = setVNodeProp(vnode, "__staticChildren", true);
57
+ return vnode;
37
58
  }
38
- export {
39
- Fragment,
40
- jsx,
41
- jsxs
42
- };
43
- //# sourceMappingURL=jsx-runtime.js.map
59
+ //#endregion
60
+ export { Fragment, jsx, jsxs };
61
+
62
+ //# sourceMappingURL=jsx-runtime.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"jsx-runtime.js","sources":["../src/jsx-runtime.ts"],"sourcesContent":["/**\n * Minimal JSX runtime for the TS \"react-jsx\" automatic runtime.\n * This builds plain VNode objects consumed by our custom mount/patch.\n */\nimport type { VNode } from './hooks'\nimport type { VNodeLike } from './types'\n\nexport const Fragment = (props: { children?: VNodeLike }): VNodeLike => props?.children ?? null\n\n/**\n * Safely sets a property on a VNode, handling frozen/sealed objects from bundlers\n * @param vnode - VNode to set property on\n * @param key - Property key\n * @param value - Value to set\n * @returns Original VNode if extensible, or shallow copy with property\n */\nfunction setVNodeProp<T extends VNode, K extends keyof VNode>(\n vnode: T,\n key: K,\n value: VNode[K]\n): T {\n if (Object.isExtensible(vnode)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ;(vnode as any)[key] = value\n return vnode\n }\n // VNode is frozen - create shallow copy\n return { ...vnode, [key]: value } as T\n}\n\n/**\n * JSX factory for automatic runtime (dynamic children)\n * Used by TypeScript for expressions like {items.map(...)}\n * @param type - Element type (string or component function)\n * @param props - Props including children\n * @param key - Optional key for identity tracking\n * @returns VNode object\n */\nexport function jsx(\n type: unknown,\n props: Record<string, unknown> | null,\n key?: unknown\n): VNodeLike {\n const { children, expand, proportion, theme, ...rest } = props ?? {}\n // Flatten children arrays deeply to support {arrayVariable} in JSX\n const kids =\n children == null ? [] : Array.isArray(children) ? children.flat(Infinity) : [children]\n let vnode: VNode = { type, props: rest, children: kids }\n\n // Extract key\n if (key !== undefined && key !== null) {\n vnode = setVNodeProp(\n vnode,\n '__key',\n typeof key === 'string' || typeof key === 'number' ? key : String(key)\n )\n }\n\n // Extract theme and store separately (removed from props)\n if (theme !== undefined) {\n vnode = setVNodeProp(vnode, '__theme', theme as NonNullable<VNode['__theme']>)\n }\n\n // Extract UI add() config and store separately (removed from props)\n if (expand !== undefined || proportion !== undefined) {\n const addConfig: NonNullable<VNode['__addConfig']> = {}\n if (expand !== undefined) addConfig.expand = expand as boolean\n if (proportion !== undefined) addConfig.proportion = proportion as number\n vnode = setVNodeProp(vnode, '__addConfig', addConfig)\n }\n\n return vnode\n}\n\n/**\n * JSX factory for static children arrays\n * Used by TypeScript when children are directly listed in JSX (not via .map())\n * Marks children as static so VDOM doesn't warn about missing keys\n * @param type - Element type (string or component function)\n * @param props - Props including children\n * @param key - Optional key for identity tracking\n * @returns VNode object\n */\nexport function jsxs(\n type: unknown,\n props: Record<string, unknown> | null,\n key?: unknown\n): VNodeLike {\n let vnode = jsx(type, props, key) as VNode\n // Mark as static children - no key warnings needed\n if (vnode && typeof vnode === 'object' && 'type' in vnode) {\n vnode = setVNodeProp(vnode, '__staticChildren', true)\n }\n return vnode\n}\n"],"names":[],"mappings":"AAOO,MAAM,WAAW,CAAC,UAA+C,OAAO,YAAY;AAS3F,SAAS,aACP,OACA,KACA,OACG;AACH,MAAI,OAAO,aAAa,KAAK,GAAG;AAE5B,UAAc,GAAG,IAAI;AACvB,WAAO;AAAA,EACT;AAEA,SAAO,EAAE,GAAG,OAAO,CAAC,GAAG,GAAG,MAAA;AAC5B;AAUO,SAAS,IACd,MACA,OACA,KACW;AACX,QAAM,EAAE,UAAU,QAAQ,YAAY,OAAO,GAAG,KAAA,IAAS,SAAS,CAAA;AAElE,QAAM,OACJ,YAAY,OAAO,CAAA,IAAK,MAAM,QAAQ,QAAQ,IAAI,SAAS,KAAK,QAAQ,IAAI,CAAC,QAAQ;AACvF,MAAI,QAAe,EAAE,MAAM,OAAO,MAAM,UAAU,KAAA;AAGlD,MAAI,QAAQ,UAAa,QAAQ,MAAM;AACrC,YAAQ;AAAA,MACN;AAAA,MACA;AAAA,MACA,OAAO,QAAQ,YAAY,OAAO,QAAQ,WAAW,MAAM,OAAO,GAAG;AAAA,IAAA;AAAA,EAEzE;AAGA,MAAI,UAAU,QAAW;AACvB,YAAQ,aAAa,OAAO,WAAW,KAAsC;AAAA,EAC/E;AAGA,MAAI,WAAW,UAAa,eAAe,QAAW;AACpD,UAAM,YAA+C,CAAA;AACrD,QAAI,WAAW,OAAW,WAAU,SAAS;AAC7C,QAAI,eAAe,OAAW,WAAU,aAAa;AACrD,YAAQ,aAAa,OAAO,eAAe,SAAS;AAAA,EACtD;AAEA,SAAO;AACT;AAWO,SAAS,KACd,MACA,OACA,KACW;AACX,MAAI,QAAQ,IAAI,MAAM,OAAO,GAAG;AAEhC,MAAI,SAAS,OAAO,UAAU,YAAY,UAAU,OAAO;AACzD,YAAQ,aAAa,OAAO,oBAAoB,IAAI;AAAA,EACtD;AACA,SAAO;AACT;"}
1
+ {"version":3,"file":"jsx-runtime.js","names":[],"sources":["../src/jsx-runtime.ts"],"sourcesContent":["/**\n * Minimal JSX runtime for the TS \"react-jsx\" automatic runtime.\n * This builds plain VNode objects consumed by our custom mount/patch.\n */\nimport type { VNode } from './hooks'\nimport type { VNodeLike } from './types'\n\nexport const Fragment = (props: { children?: VNodeLike }): VNodeLike => props?.children ?? null\n\n/**\n * Safely sets a property on a VNode, handling frozen/sealed objects from bundlers\n * @param vnode - VNode to set property on\n * @param key - Property key\n * @param value - Value to set\n * @returns Original VNode if extensible, or shallow copy with property\n */\nfunction setVNodeProp<T extends VNode, K extends keyof VNode>(\n vnode: T,\n key: K,\n value: VNode[K]\n): T {\n if (Object.isExtensible(vnode)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ;(vnode as any)[key] = value\n return vnode\n }\n // VNode is frozen - create shallow copy\n return { ...vnode, [key]: value } as T\n}\n\n/**\n * JSX factory for automatic runtime (dynamic children)\n * Used by TypeScript for expressions like {items.map(...)}\n * @param type - Element type (string or component function)\n * @param props - Props including children\n * @param key - Optional key for identity tracking\n * @returns VNode object\n */\nexport function jsx(\n type: unknown,\n props: Record<string, unknown> | null,\n key?: unknown\n): VNodeLike {\n const { children, expand, proportion, theme, ...rest } = props ?? {}\n // Flatten children arrays deeply to support {arrayVariable} in JSX\n const kids =\n children == null ? [] : Array.isArray(children) ? children.flat(Infinity) : [children]\n let vnode: VNode = { type, props: rest, children: kids }\n\n // Extract key\n if (key !== undefined && key !== null) {\n vnode = setVNodeProp(\n vnode,\n '__key',\n typeof key === 'string' || typeof key === 'number' ? key : String(key)\n )\n }\n\n // Extract theme and store separately (removed from props)\n if (theme !== undefined) {\n vnode = setVNodeProp(vnode, '__theme', theme as NonNullable<VNode['__theme']>)\n }\n\n // Extract UI add() config and store separately (removed from props)\n if (expand !== undefined || proportion !== undefined) {\n const addConfig: NonNullable<VNode['__addConfig']> = {}\n if (expand !== undefined) addConfig.expand = expand as boolean\n if (proportion !== undefined) addConfig.proportion = proportion as number\n vnode = setVNodeProp(vnode, '__addConfig', addConfig)\n }\n\n return vnode\n}\n\n/**\n * JSX factory for static children arrays\n * Used by TypeScript when children are directly listed in JSX (not via .map())\n * Marks children as static so VDOM doesn't warn about missing keys\n * @param type - Element type (string or component function)\n * @param props - Props including children\n * @param key - Optional key for identity tracking\n * @returns VNode object\n */\nexport function jsxs(\n type: unknown,\n props: Record<string, unknown> | null,\n key?: unknown\n): VNodeLike {\n let vnode = jsx(type, props, key) as VNode\n // Mark as static children - no key warnings needed\n if (vnode && typeof vnode === 'object' && 'type' in vnode) {\n vnode = setVNodeProp(vnode, '__staticChildren', true)\n }\n return vnode\n}\n"],"mappings":";AAOA,IAAa,YAAY,UAA+C,OAAO,YAAY;;;;;;;;AAS3F,SAAS,aACP,OACA,KACA,OACG;CACH,IAAI,OAAO,aAAa,KAAK,GAAG;EAE7B,MAAe,OAAO;EACvB,OAAO;CACT;CAEA,OAAO;EAAE,GAAG;GAAQ,MAAM;CAAM;AAClC;;;;;;;;;AAUA,SAAgB,IACd,MACA,OACA,KACW;CACX,MAAM,EAAE,UAAU,QAAQ,YAAY,OAAO,GAAG,SAAS,SAAS,CAAC;CAInE,IAAI,QAAe;E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