@hedystia/view 2.1.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 (102) hide show
  1. package/dist/constants.cjs +13 -0
  2. package/dist/constants.cjs.map +1 -0
  3. package/dist/constants.mjs +13 -0
  4. package/dist/constants.mjs.map +1 -0
  5. package/dist/context/context.cjs +51 -0
  6. package/dist/context/context.cjs.map +1 -0
  7. package/dist/context/context.d.cts +25 -0
  8. package/dist/context/context.d.mts +25 -0
  9. package/dist/context/context.mjs +50 -0
  10. package/dist/context/context.mjs.map +1 -0
  11. package/dist/fetch/resource.cjs +89 -0
  12. package/dist/fetch/resource.cjs.map +1 -0
  13. package/dist/fetch/resource.d.cts +14 -0
  14. package/dist/fetch/resource.d.mts +14 -0
  15. package/dist/fetch/resource.mjs +88 -0
  16. package/dist/fetch/resource.mjs.map +1 -0
  17. package/dist/index.cjs +58 -0
  18. package/dist/index.d.cts +15 -0
  19. package/dist/index.d.mts +15 -0
  20. package/dist/index.mjs +14 -0
  21. package/dist/jsx/element.cjs +201 -0
  22. package/dist/jsx/element.cjs.map +1 -0
  23. package/dist/jsx/element.d.cts +48 -0
  24. package/dist/jsx/element.d.mts +48 -0
  25. package/dist/jsx/element.mjs +199 -0
  26. package/dist/jsx/element.mjs.map +1 -0
  27. package/dist/jsx-dev-runtime.cjs +40 -0
  28. package/dist/jsx-dev-runtime.cjs.map +1 -0
  29. package/dist/jsx-dev-runtime.d.cts +21 -0
  30. package/dist/jsx-dev-runtime.d.mts +21 -0
  31. package/dist/jsx-dev-runtime.mjs +36 -0
  32. package/dist/jsx-dev-runtime.mjs.map +1 -0
  33. package/dist/jsx-runtime.cjs +5 -0
  34. package/dist/jsx-runtime.d.cts +3 -0
  35. package/dist/jsx-runtime.d.mts +3 -0
  36. package/dist/jsx-runtime.mjs +2 -0
  37. package/dist/jsx.d.cts +942 -0
  38. package/dist/jsx.d.mts +942 -0
  39. package/dist/lifecycle/hooks.cjs +56 -0
  40. package/dist/lifecycle/hooks.cjs.map +1 -0
  41. package/dist/lifecycle/hooks.d.cts +37 -0
  42. package/dist/lifecycle/hooks.d.mts +37 -0
  43. package/dist/lifecycle/hooks.mjs +54 -0
  44. package/dist/lifecycle/hooks.mjs.map +1 -0
  45. package/dist/render/engine.cjs +52 -0
  46. package/dist/render/engine.cjs.map +1 -0
  47. package/dist/render/engine.d.cts +31 -0
  48. package/dist/render/engine.d.mts +31 -0
  49. package/dist/render/engine.mjs +51 -0
  50. package/dist/render/engine.mjs.map +1 -0
  51. package/dist/render/flow.cjs +286 -0
  52. package/dist/render/flow.cjs.map +1 -0
  53. package/dist/render/flow.d.cts +64 -0
  54. package/dist/render/flow.d.mts +64 -0
  55. package/dist/render/flow.mjs +279 -0
  56. package/dist/render/flow.mjs.map +1 -0
  57. package/dist/scheduler/scheduler.cjs +61 -0
  58. package/dist/scheduler/scheduler.cjs.map +1 -0
  59. package/dist/scheduler/scheduler.d.cts +31 -0
  60. package/dist/scheduler/scheduler.d.mts +31 -0
  61. package/dist/scheduler/scheduler.mjs +59 -0
  62. package/dist/scheduler/scheduler.mjs.map +1 -0
  63. package/dist/signal/signal.cjs +387 -0
  64. package/dist/signal/signal.cjs.map +1 -0
  65. package/dist/signal/signal.d.cts +44 -0
  66. package/dist/signal/signal.d.mts +44 -0
  67. package/dist/signal/signal.mjs +370 -0
  68. package/dist/signal/signal.mjs.map +1 -0
  69. package/dist/store/index.cjs +1 -0
  70. package/dist/store/index.mjs +2 -0
  71. package/dist/store/store.cjs +94 -0
  72. package/dist/store/store.cjs.map +1 -0
  73. package/dist/store/store.d.cts +22 -0
  74. package/dist/store/store.d.mts +22 -0
  75. package/dist/store/store.mjs +91 -0
  76. package/dist/store/store.mjs.map +1 -0
  77. package/dist/style/computed.cjs +65 -0
  78. package/dist/style/computed.cjs.map +1 -0
  79. package/dist/style/computed.d.cts +18 -0
  80. package/dist/style/computed.d.mts +18 -0
  81. package/dist/style/computed.mjs +63 -0
  82. package/dist/style/computed.mjs.map +1 -0
  83. package/dist/text/text.cjs +74 -0
  84. package/dist/text/text.cjs.map +1 -0
  85. package/dist/text/text.d.cts +31 -0
  86. package/dist/text/text.d.mts +31 -0
  87. package/dist/text/text.mjs +72 -0
  88. package/dist/text/text.mjs.map +1 -0
  89. package/dist/types.d.cts +185 -0
  90. package/dist/types.d.mts +185 -0
  91. package/dist/utils/index.cjs +34 -0
  92. package/dist/utils/index.cjs.map +1 -0
  93. package/dist/utils/index.mjs +33 -0
  94. package/dist/utils/index.mjs.map +1 -0
  95. package/dist/watch/watcher.cjs +71 -0
  96. package/dist/watch/watcher.cjs.map +1 -0
  97. package/dist/watch/watcher.d.cts +17 -0
  98. package/dist/watch/watcher.d.mts +17 -0
  99. package/dist/watch/watcher.mjs +70 -0
  100. package/dist/watch/watcher.mjs.map +1 -0
  101. package/package.json +34 -0
  102. package/readme.md +395 -0
@@ -0,0 +1,201 @@
1
+ const require_signal = require("../signal/signal.cjs");
2
+ const require_scheduler = require("../scheduler/scheduler.cjs");
3
+ //#region src/jsx/element.ts
4
+ /**
5
+ * Create a real DOM element from JSX props
6
+ * @param {ElementType} type - The element type (string or function component)
7
+ * @param {Record<string, any>} props - The element props
8
+ * @returns {JSX.Element} The created DOM element or component result
9
+ * @example
10
+ * const div = jsx("div", { className: "card", children: "Hello" });
11
+ * const MyComponent = (props: { text: string }) => <div>{props.text}</div>;
12
+ * const component = jsx(MyComponent, { text: "Hello" });
13
+ */
14
+ function jsx(type, props) {
15
+ const { children, ...rest } = props || {};
16
+ if (typeof type === "function") return type({
17
+ children,
18
+ ...rest
19
+ });
20
+ const element = document.createElement(type);
21
+ for (const key in rest) {
22
+ if (!Object.hasOwn(rest, key)) continue;
23
+ const value = rest[key];
24
+ applyProp(element, key, value);
25
+ }
26
+ if (children !== void 0 && children !== null) applyChildren(element, children);
27
+ return element;
28
+ }
29
+ /**
30
+ * Create a fragment (multiple children without wrapper)
31
+ * @param {ElementType} type - The element type (string or function component)
32
+ * @param {Record<string, any>} props - The element props
33
+ * @returns {JSX.Element | (HTMLElement | Text | Comment)[]} The fragment children or element
34
+ * @example
35
+ * const fragment = jsxs("fragment", { children: [div1, div2] });
36
+ * const MyComponent = (props: { items: string[] }) => <>{props.items.map(item => <span>{item}</span>)}</>;
37
+ * const component = jsxs(MyComponent, { items: ["a", "b"] });
38
+ */
39
+ function jsxs(type, props) {
40
+ const { children, ...rest } = props || {};
41
+ if (typeof type === "function") return type({
42
+ children,
43
+ ...rest
44
+ });
45
+ if (type === "fragment" || type === "Fragment") {
46
+ if (Array.isArray(children)) return flattenChildren(children);
47
+ return children ?? null;
48
+ }
49
+ const element = document.createElement(type);
50
+ for (const key in rest) {
51
+ if (!Object.hasOwn(rest, key)) continue;
52
+ const value = rest[key];
53
+ applyProp(element, key, value);
54
+ }
55
+ if (children !== void 0 && children !== null) applyChildren(element, children);
56
+ return element;
57
+ }
58
+ /**
59
+ * Fragment component for multiple children
60
+ */
61
+ function Fragment(props) {
62
+ const { children } = props;
63
+ if (children == null) return null;
64
+ if (Array.isArray(children)) return flattenChildren(children);
65
+ if (typeof children === "function") {
66
+ const container = document.createDocumentFragment();
67
+ applyReactiveChild(container, children);
68
+ return container;
69
+ }
70
+ return children;
71
+ }
72
+ /** @internal - Eager effect for DOM side effects (unlike memo which is lazy) */
73
+ function effect(fn) {
74
+ require_signal.runComputation({
75
+ _fn: () => {
76
+ fn();
77
+ },
78
+ _value: void 0,
79
+ _sources: null,
80
+ _sourceSlots: null,
81
+ _observers: null,
82
+ _observerSlots: null,
83
+ _owner: require_signal.Owner,
84
+ _cleanups: null,
85
+ _context: null,
86
+ _suspense: null,
87
+ _user: true,
88
+ _pure: false,
89
+ _state: 0,
90
+ _updatedAt: null
91
+ });
92
+ }
93
+ /** @internal */
94
+ function applyProp(element, key, value) {
95
+ if (value === void 0 || value === null) return;
96
+ if (key.startsWith("on") && typeof value === "function") {
97
+ const eventName = key.slice(2).toLowerCase();
98
+ element.addEventListener(eventName, value);
99
+ } else if (key === "style") {
100
+ if (typeof value === "string") element.style.cssText = value;
101
+ else if (typeof value === "object") applyStyle(element, value);
102
+ else if (typeof value === "function") applyReactiveStyle(element, value);
103
+ } else if (key === "class") element.className = String(value);
104
+ else if (key === "className") element.className = String(value);
105
+ else if (key === "ref" && typeof value === "function") require_scheduler.tick(() => value(element));
106
+ else if (typeof value === "function" && !key.startsWith("on")) applyReactiveProp(element, key, value);
107
+ else if (typeof value === "boolean") {
108
+ if (value) element.setAttribute(key, "");
109
+ } else element.setAttribute(key, String(value));
110
+ }
111
+ /** @internal */
112
+ function applyStyle(element, style) {
113
+ for (const key in style) {
114
+ if (!Object.hasOwn(style, key)) continue;
115
+ const value = style[key];
116
+ if (value !== void 0 && value !== null) {
117
+ const cssKey = camelToKebab(key);
118
+ element.style[cssKey] = String(value);
119
+ }
120
+ }
121
+ }
122
+ /** @internal */
123
+ function applyReactiveStyle(element, accessor) {
124
+ effect(() => {
125
+ applyStyle(element, accessor());
126
+ });
127
+ }
128
+ /** @internal */
129
+ function applyReactiveProp(element, key, accessor) {
130
+ effect(() => {
131
+ const value = accessor();
132
+ if (value === void 0 || value === null) element.removeAttribute(key);
133
+ else element.setAttribute(key, String(value));
134
+ });
135
+ }
136
+ /** @internal */
137
+ function applyChildren(element, children) {
138
+ if (Array.isArray(children)) for (let i = 0; i < children.length; i++) appendSingleChild(element, children[i]);
139
+ else appendSingleChild(element, children);
140
+ }
141
+ /** @internal */
142
+ function appendSingleChild(element, child) {
143
+ if (child === null || child === void 0 || child === false) return;
144
+ if (Array.isArray(child)) for (let i = 0; i < child.length; i++) appendSingleChild(element, child[i]);
145
+ else if (typeof child === "function") applyReactiveChild(element, child);
146
+ else if (typeof child === "string" || typeof child === "number") element.appendChild(document.createTextNode(String(child)));
147
+ else if (child instanceof HTMLElement || child instanceof Text || child instanceof Comment) element.appendChild(child);
148
+ else if (child instanceof DocumentFragment) element.appendChild(child);
149
+ }
150
+ /** @internal */
151
+ function applyReactiveChild(element, accessor) {
152
+ const marker = document.createComment("");
153
+ element.appendChild(marker);
154
+ let currentNodes = [];
155
+ effect(() => {
156
+ const value = accessor();
157
+ for (let i = 0; i < currentNodes.length; i++) {
158
+ const node = currentNodes[i];
159
+ if (node.parentNode) node.parentNode.removeChild(node);
160
+ }
161
+ currentNodes = [];
162
+ const insert = (node) => {
163
+ marker.parentNode.insertBefore(node, marker);
164
+ currentNodes.push(node);
165
+ };
166
+ if (value === null || value === void 0 || value === false) {} else if (Array.isArray(value)) for (let i = 0; i < value.length; i++) {
167
+ const item = value[i];
168
+ if (item instanceof HTMLElement || item instanceof Text || item instanceof Comment || item instanceof DocumentFragment) insert(item);
169
+ else if (typeof item === "string" || typeof item === "number") insert(document.createTextNode(String(item)));
170
+ else if (Array.isArray(item)) {
171
+ const flat = flattenChildren(item);
172
+ for (let j = 0; j < flat.length; j++) insert(flat[j]);
173
+ }
174
+ }
175
+ else if (typeof value === "string" || typeof value === "number") insert(document.createTextNode(String(value)));
176
+ else if (value instanceof HTMLElement || value instanceof Text || value instanceof Comment || value instanceof DocumentFragment) insert(value);
177
+ });
178
+ }
179
+ /** @internal */
180
+ function flattenChildren(children) {
181
+ const result = [];
182
+ for (let i = 0; i < children.length; i++) {
183
+ const child = children[i];
184
+ if (Array.isArray(child)) result.push(...flattenChildren(child));
185
+ else if (child !== null && child !== void 0 && child !== false) {
186
+ if (child instanceof HTMLElement || child instanceof Text || child instanceof Comment) result.push(child);
187
+ else if (typeof child === "string" || typeof child === "number") result.push(document.createTextNode(String(child)));
188
+ }
189
+ }
190
+ return result;
191
+ }
192
+ /** @internal */
193
+ function camelToKebab(str) {
194
+ return str.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
195
+ }
196
+ //#endregion
197
+ exports.Fragment = Fragment;
198
+ exports.jsx = jsx;
199
+ exports.jsxs = jsxs;
200
+
201
+ //# sourceMappingURL=element.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"element.cjs","names":["Owner"],"sources":["../../src/jsx/element.ts"],"sourcesContent":["/**\n * JSX element creation for @hedystia/view\n *\n * Creates real DOM nodes directly from JSX, no Virtual DOM.\n * Supports both intrinsic elements (strings) and functional components.\n */\n\nimport type { JSX } from \"../jsx.d\";\nimport { tick } from \"../scheduler\";\nimport { Owner, runComputation } from \"../signal\";\nimport type { Accessor, Computation } from \"../types\";\n\n/**\n * Function component type\n */\nexport type FunctionComponent<P = {}> = (props: P & { children?: JSX.Element }) => JSX.Element;\n\n/**\n * Element type - can be a string (intrinsic) or a function component\n */\nexport type ElementType<P = {}> = string | FunctionComponent<P>;\n\n/**\n * Create a real DOM element from JSX props\n * @param {ElementType} type - The element type (string or function component)\n * @param {Record<string, any>} props - The element props\n * @returns {JSX.Element} The created DOM element or component result\n * @example\n * const div = jsx(\"div\", { className: \"card\", children: \"Hello\" });\n * const MyComponent = (props: { text: string }) => <div>{props.text}</div>;\n * const component = jsx(MyComponent, { text: \"Hello\" });\n */\nexport function jsx<P>(type: ElementType<P>, props: P & { children?: JSX.Element }): JSX.Element {\n const { children, ...rest } = props || {};\n\n // Handle function components\n if (typeof type === \"function\") {\n return type({ children, ...rest } as P & { children?: JSX.Element });\n }\n\n // Handle intrinsic elements (strings)\n const element = document.createElement(type);\n\n for (const key in rest) {\n if (!Object.hasOwn(rest, key)) {\n continue;\n }\n const value = (rest as Record<string, any>)[key];\n applyProp(element, key, value);\n }\n\n if (children !== undefined && children !== null) {\n applyChildren(element, children);\n }\n\n return element;\n}\n\n/**\n * Create a fragment (multiple children without wrapper)\n * @param {ElementType} type - The element type (string or function component)\n * @param {Record<string, any>} props - The element props\n * @returns {JSX.Element | (HTMLElement | Text | Comment)[]} The fragment children or element\n * @example\n * const fragment = jsxs(\"fragment\", { children: [div1, div2] });\n * const MyComponent = (props: { items: string[] }) => <>{props.items.map(item => <span>{item}</span>)}</>;\n * const component = jsxs(MyComponent, { items: [\"a\", \"b\"] });\n */\nexport function jsxs<P>(\n type: ElementType<P>,\n props: P & { children?: JSX.Element },\n): JSX.Element | (HTMLElement | Text | Comment)[] {\n const { children, ...rest } = props || {};\n\n // Handle function components\n if (typeof type === \"function\") {\n return type({ children, ...rest } as P & { children?: JSX.Element });\n }\n\n // Handle Fragment\n if (type === \"fragment\" || type === \"Fragment\") {\n if (Array.isArray(children)) {\n return flattenChildren(children);\n }\n return children ?? null;\n }\n\n // Handle intrinsic elements (strings)\n const element = document.createElement(type);\n\n for (const key in rest) {\n if (!Object.hasOwn(rest, key)) {\n continue;\n }\n const value = (rest as Record<string, any>)[key];\n applyProp(element, key, value);\n }\n\n if (children !== undefined && children !== null) {\n applyChildren(element, children);\n }\n\n return element;\n}\n\n/**\n * Fragment component for multiple children\n */\nexport function Fragment(props: {\n children?: JSX.Children;\n}): JSX.Element | (HTMLElement | Text | Comment)[] {\n const { children } = props;\n if (children == null) {\n return null;\n }\n if (Array.isArray(children)) {\n return flattenChildren(children);\n }\n if (typeof children === \"function\") {\n const container = document.createDocumentFragment();\n applyReactiveChild(container, children as () => any);\n return container;\n }\n return children as JSX.Element;\n}\n\n/** @internal - Eager effect for DOM side effects (unlike memo which is lazy) */\nfunction effect(fn: () => void): void {\n const computation: Computation<any> = {\n _fn: () => {\n fn();\n return undefined;\n },\n _value: undefined,\n _sources: null,\n _sourceSlots: null,\n _observers: null,\n _observerSlots: null,\n _owner: Owner,\n _cleanups: null,\n _context: null,\n _suspense: null,\n _user: true,\n _pure: false,\n _state: 0,\n _updatedAt: null,\n };\n runComputation(computation);\n}\n\n/** @internal */\nfunction applyProp(element: HTMLElement, key: string, value: any): void {\n if (value === undefined || value === null) {\n return;\n }\n\n if (key.startsWith(\"on\") && typeof value === \"function\") {\n const eventName = key.slice(2).toLowerCase();\n element.addEventListener(eventName, value);\n } else if (key === \"style\") {\n if (typeof value === \"string\") {\n element.style.cssText = value;\n } else if (typeof value === \"object\") {\n applyStyle(element, value);\n } else if (typeof value === \"function\") {\n applyReactiveStyle(element, value);\n }\n } else if (key === \"class\") {\n element.className = String(value);\n } else if (key === \"className\") {\n element.className = String(value);\n } else if (key === \"ref\" && typeof value === \"function\") {\n tick(() => value(element));\n } else if (typeof value === \"function\" && !key.startsWith(\"on\")) {\n applyReactiveProp(element, key, value);\n } else {\n if (typeof value === \"boolean\") {\n if (value) {\n element.setAttribute(key, \"\");\n }\n } else {\n element.setAttribute(key, String(value));\n }\n }\n}\n\n/** @internal */\nfunction applyStyle(element: HTMLElement, style: Record<string, any>): void {\n for (const key in style) {\n if (!Object.hasOwn(style, key)) {\n continue;\n }\n const value = style[key];\n if (value !== undefined && value !== null) {\n const cssKey = camelToKebab(key);\n (element.style as any)[cssKey] = String(value);\n }\n }\n}\n\n/** @internal */\nfunction applyReactiveStyle(element: HTMLElement, accessor: Accessor<Record<string, any>>): void {\n effect(() => {\n const style = accessor();\n applyStyle(element, style);\n });\n}\n\n/** @internal */\nfunction applyReactiveProp(element: HTMLElement, key: string, accessor: Accessor<any>): void {\n effect(() => {\n const value = accessor();\n if (value === undefined || value === null) {\n element.removeAttribute(key);\n } else {\n element.setAttribute(key, String(value));\n }\n });\n}\n\n/** @internal */\nfunction applyChildren(element: HTMLElement | DocumentFragment, children: JSX.Children): void {\n if (Array.isArray(children)) {\n for (let i = 0; i < children.length; i++) {\n appendSingleChild(element, children[i]);\n }\n } else {\n appendSingleChild(element, children);\n }\n}\n\n/** @internal */\nfunction appendSingleChild(element: HTMLElement | DocumentFragment, child: any): void {\n if (child === null || child === undefined || child === false) {\n return;\n }\n if (Array.isArray(child)) {\n for (let i = 0; i < child.length; i++) {\n appendSingleChild(element, child[i]);\n }\n } else if (typeof child === \"function\") {\n applyReactiveChild(element, child);\n } else if (typeof child === \"string\" || typeof child === \"number\") {\n element.appendChild(document.createTextNode(String(child)));\n } else if (child instanceof HTMLElement || child instanceof Text || child instanceof Comment) {\n element.appendChild(child);\n } else if (child instanceof DocumentFragment) {\n element.appendChild(child);\n }\n}\n\n/** @internal */\nfunction applyReactiveChild(\n element: HTMLElement | DocumentFragment,\n accessor: Accessor<any>,\n): void {\n const marker = document.createComment(\"\");\n element.appendChild(marker);\n let currentNodes: Node[] = [];\n\n effect(() => {\n const value = accessor();\n\n // Remove old nodes\n for (let i = 0; i < currentNodes.length; i++) {\n const node = currentNodes[i]!;\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n }\n currentNodes = [];\n\n const insert = (node: Node) => {\n marker.parentNode!.insertBefore(node, marker);\n currentNodes.push(node);\n };\n\n if (value === null || value === undefined || value === false) {\n // nothing to insert\n } else if (Array.isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n const item = value[i];\n if (\n item instanceof HTMLElement ||\n item instanceof Text ||\n item instanceof Comment ||\n item instanceof DocumentFragment\n ) {\n insert(item);\n } else if (typeof item === \"string\" || typeof item === \"number\") {\n insert(document.createTextNode(String(item)));\n } else if (Array.isArray(item)) {\n const flat = flattenChildren(item);\n for (let j = 0; j < flat.length; j++) {\n insert(flat[j]!);\n }\n }\n }\n } else if (typeof value === \"string\" || typeof value === \"number\") {\n insert(document.createTextNode(String(value)));\n } else if (\n value instanceof HTMLElement ||\n value instanceof Text ||\n value instanceof Comment ||\n value instanceof DocumentFragment\n ) {\n insert(value);\n }\n });\n}\n\n/** @internal */\nfunction flattenChildren(children: JSX.Child[]): Array<HTMLElement | Text | Comment> {\n const result: Array<HTMLElement | Text | Comment> = [];\n for (let i = 0; i < children.length; i++) {\n const child = children[i];\n if (Array.isArray(child)) {\n result.push(...flattenChildren(child));\n } else if (child !== null && child !== undefined && child !== false) {\n if (child instanceof HTMLElement || child instanceof Text || child instanceof Comment) {\n result.push(child);\n } else if (typeof child === \"string\" || typeof child === \"number\") {\n result.push(document.createTextNode(String(child)));\n }\n }\n }\n return result;\n}\n\n/** @internal */\nfunction camelToKebab(str: string): string {\n return str.replace(/([a-z])([A-Z])/g, \"$1-$2\").toLowerCase();\n}\n"],"mappings":";;;;;;;;;;;;;AAgCA,SAAgB,IAAO,MAAsB,OAAoD;CAC/F,MAAM,EAAE,UAAU,G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Component<P = {}> = (props: P & {
8
+ children?: JSX.Element;
9
+ }) => JSX.Element;
10
+ /**
11
+ * Element type - can be a string (intrinsic) or a function component
12
+ */
13
+ type ElementType<P = {}> = string | FunctionComponent<P>;
14
+ /**
15
+ * Create a real DOM element from JSX props
16
+ * @param {ElementType} type - The element type (string or function component)
17
+ * @param {Record<string, any>} props - The element props
18
+ * @returns {JSX.Element} The created DOM element or component result
19
+ * @example
20
+ * const div = jsx("div", { className: "card", children: "Hello" });
21
+ * const MyComponent = (props: { text: string }) => <div>{props.text}</div>;
22
+ * const component = jsx(MyComponent, { text: "Hello" });
23
+ */
24
+ declare function jsx<P>(type: ElementType<P>, props: P & {
25
+ children?: JSX.Element;
26
+ }): JSX.Element;
27
+ /**
28
+ * Create a fragment (multiple children without wrapper)
29
+ * @param {ElementType} type - The element type (string or function component)
30
+ * @param {Record<string, any>} props - The element props
31
+ * @returns {JSX.Element | (HTMLElement | Text | Comment)[]} The fragment children or element
32
+ * @example
33
+ * const fragment = jsxs("fragment", { children: [div1, div2] });
34
+ * const MyComponent = (props: { items: string[] }) => <>{props.items.map(item => <span>{item}</span>)}</>;
35
+ * const component = jsxs(MyComponent, { items: ["a", "b"] });
36
+ */
37
+ declare function jsxs<P>(type: ElementType<P>, props: P & {
38
+ children?: JSX.Element;
39
+ }): JSX.Element | (HTMLElement | Text | Comment)[];
40
+ /**
41
+ * Fragment component for multiple children
42
+ */
43
+ declare function Fragment(props: {
44
+ children?: JSX.Children;
45
+ }): JSX.Element | (HTMLElement | Text | Comment)[];
46
+ //#endregion
47
+ export { ElementType, Fragment, FunctionComponent, jsx, jsxs };
48
+ //# sourceMappingURL=element.d.cts.map
@@ -0,0 +1,48 @@
1
+ import { JSX } from "../jsx.mjs";
2
+
3
+ //#region src/jsx/element.d.ts
4
+ /**
5
+ * Function component type
6
+ */
7
+ type FunctionComponent<P = {}> = (props: P & {
8
+ children?: JSX.Element;
9
+ }) => JSX.Element;
10
+ /**
11
+ * Element type - can be a string (intrinsic) or a function component
12
+ */
13
+ type ElementType<P = {}> = string | FunctionComponent<P>;
14
+ /**
15
+ * Create a real DOM element from JSX props
16
+ * @param {ElementType} type - The element type (string or function component)
17
+ * @param {Record<string, any>} props - The element props
18
+ * @returns {JSX.Element} The created DOM element or component result
19
+ * @example
20
+ * const div = jsx("div", { className: "card", children: "Hello" });
21
+ * const MyComponent = (props: { text: string }) => <div>{props.text}</div>;
22
+ * const component = jsx(MyComponent, { text: "Hello" });
23
+ */
24
+ declare function jsx<P>(type: ElementType<P>, props: P & {
25
+ children?: JSX.Element;
26
+ }): JSX.Element;
27
+ /**
28
+ * Create a fragment (multiple children without wrapper)
29
+ * @param {ElementType} type - The element type (string or function component)
30
+ * @param {Record<string, any>} props - The element props
31
+ * @returns {JSX.Element | (HTMLElement | Text | Comment)[]} The fragment children or element
32
+ * @example
33
+ * const fragment = jsxs("fragment", { children: [div1, div2] });
34
+ * const MyComponent = (props: { items: string[] }) => <>{props.items.map(item => <span>{item}</span>)}</>;
35
+ * const component = jsxs(MyComponent, { items: ["a", "b"] });
36
+ */
37
+ declare function jsxs<P>(type: ElementType<P>, props: P & {
38
+ children?: JSX.Element;
39
+ }): JSX.Element | (HTMLElement | Text | Comment)[];
40
+ /**
41
+ * Fragment component for multiple children
42
+ */
43
+ declare function Fragment(props: {
44
+ children?: JSX.Children;
45
+ }): JSX.Element | (HTMLElement | Text | Comment)[];
46
+ //#endregion
47
+ export { ElementType, Fragment, FunctionComponent, jsx, jsxs };
48
+ //# sourceMappingURL=element.d.mts.map
@@ -0,0 +1,199 @@
1
+ import { Owner, runComputation } from "../signal/signal.mjs";
2
+ import { tick } from "../scheduler/scheduler.mjs";
3
+ //#region src/jsx/element.ts
4
+ /**
5
+ * Create a real DOM element from JSX props
6
+ * @param {ElementType} type - The element type (string or function component)
7
+ * @param {Record<string, any>} props - The element props
8
+ * @returns {JSX.Element} The created DOM element or component result
9
+ * @example
10
+ * const div = jsx("div", { className: "card", children: "Hello" });
11
+ * const MyComponent = (props: { text: string }) => <div>{props.text}</div>;
12
+ * const component = jsx(MyComponent, { text: "Hello" });
13
+ */
14
+ function jsx(type, props) {
15
+ const { children, ...rest } = props || {};
16
+ if (typeof type === "function") return type({
17
+ children,
18
+ ...rest
19
+ });
20
+ const element = document.createElement(type);
21
+ for (const key in rest) {
22
+ if (!Object.hasOwn(rest, key)) continue;
23
+ const value = rest[key];
24
+ applyProp(element, key, value);
25
+ }
26
+ if (children !== void 0 && children !== null) applyChildren(element, children);
27
+ return element;
28
+ }
29
+ /**
30
+ * Create a fragment (multiple children without wrapper)
31
+ * @param {ElementType} type - The element type (string or function component)
32
+ * @param {Record<string, any>} props - The element props
33
+ * @returns {JSX.Element | (HTMLElement | Text | Comment)[]} The fragment children or element
34
+ * @example
35
+ * const fragment = jsxs("fragment", { children: [div1, div2] });
36
+ * const MyComponent = (props: { items: string[] }) => <>{props.items.map(item => <span>{item}</span>)}</>;
37
+ * const component = jsxs(MyComponent, { items: ["a", "b"] });
38
+ */
39
+ function jsxs(type, props) {
40
+ const { children, ...rest } = props || {};
41
+ if (typeof type === "function") return type({
42
+ children,
43
+ ...rest
44
+ });
45
+ if (type === "fragment" || type === "Fragment") {
46
+ if (Array.isArray(children)) return flattenChildren(children);
47
+ return children ?? null;
48
+ }
49
+ const element = document.createElement(type);
50
+ for (const key in rest) {
51
+ if (!Object.hasOwn(rest, key)) continue;
52
+ const value = rest[key];
53
+ applyProp(element, key, value);
54
+ }
55
+ if (children !== void 0 && children !== null) applyChildren(element, children);
56
+ return element;
57
+ }
58
+ /**
59
+ * Fragment component for multiple children
60
+ */
61
+ function Fragment(props) {
62
+ const { children } = props;
63
+ if (children == null) return null;
64
+ if (Array.isArray(children)) return flattenChildren(children);
65
+ if (typeof children === "function") {
66
+ const container = document.createDocumentFragment();
67
+ applyReactiveChild(container, children);
68
+ return container;
69
+ }
70
+ return children;
71
+ }
72
+ /** @internal - Eager effect for DOM side effects (unlike memo which is lazy) */
73
+ function effect(fn) {
74
+ runComputation({
75
+ _fn: () => {
76
+ fn();
77
+ },
78
+ _value: void 0,
79
+ _sources: null,
80
+ _sourceSlots: null,
81
+ _observers: null,
82
+ _observerSlots: null,
83
+ _owner: Owner,
84
+ _cleanups: null,
85
+ _context: null,
86
+ _suspense: null,
87
+ _user: true,
88
+ _pure: false,
89
+ _state: 0,
90
+ _updatedAt: null
91
+ });
92
+ }
93
+ /** @internal */
94
+ function applyProp(element, key, value) {
95
+ if (value === void 0 || value === null) return;
96
+ if (key.startsWith("on") && typeof value === "function") {
97
+ const eventName = key.slice(2).toLowerCase();
98
+ element.addEventListener(eventName, value);
99
+ } else if (key === "style") {
100
+ if (typeof value === "string") element.style.cssText = value;
101
+ else if (typeof value === "object") applyStyle(element, value);
102
+ else if (typeof value === "function") applyReactiveStyle(element, value);
103
+ } else if (key === "class") element.className = String(value);
104
+ else if (key === "className") element.className = String(value);
105
+ else if (key === "ref" && typeof value === "function") tick(() => value(element));
106
+ else if (typeof value === "function" && !key.startsWith("on")) applyReactiveProp(element, key, value);
107
+ else if (typeof value === "boolean") {
108
+ if (value) element.setAttribute(key, "");
109
+ } else element.setAttribute(key, String(value));
110
+ }
111
+ /** @internal */
112
+ function applyStyle(element, style) {
113
+ for (const key in style) {
114
+ if (!Object.hasOwn(style, key)) continue;
115
+ const value = style[key];
116
+ if (value !== void 0 && value !== null) {
117
+ const cssKey = camelToKebab(key);
118
+ element.style[cssKey] = String(value);
119
+ }
120
+ }
121
+ }
122
+ /** @internal */
123
+ function applyReactiveStyle(element, accessor) {
124
+ effect(() => {
125
+ applyStyle(element, accessor());
126
+ });
127
+ }
128
+ /** @internal */
129
+ function applyReactiveProp(element, key, accessor) {
130
+ effect(() => {
131
+ const value = accessor();
132
+ if (value === void 0 || value === null) element.removeAttribute(key);
133
+ else element.setAttribute(key, String(value));
134
+ });
135
+ }
136
+ /** @internal */
137
+ function applyChildren(element, children) {
138
+ if (Array.isArray(children)) for (let i = 0; i < children.length; i++) appendSingleChild(element, children[i]);
139
+ else appendSingleChild(element, children);
140
+ }
141
+ /** @internal */
142
+ function appendSingleChild(element, child) {
143
+ if (child === null || child === void 0 || child === false) return;
144
+ if (Array.isArray(child)) for (let i = 0; i < child.length; i++) appendSingleChild(element, child[i]);
145
+ else if (typeof child === "function") applyReactiveChild(element, child);
146
+ else if (typeof child === "string" || typeof child === "number") element.appendChild(document.createTextNode(String(child)));
147
+ else if (child instanceof HTMLElement || child instanceof Text || child instanceof Comment) element.appendChild(child);
148
+ else if (child instanceof DocumentFragment) element.appendChild(child);
149
+ }
150
+ /** @internal */
151
+ function applyReactiveChild(element, accessor) {
152
+ const marker = document.createComment("");
153
+ element.appendChild(marker);
154
+ let currentNodes = [];
155
+ effect(() => {
156
+ const value = accessor();
157
+ for (let i = 0; i < currentNodes.length; i++) {
158
+ const node = currentNodes[i];
159
+ if (node.parentNode) node.parentNode.removeChild(node);
160
+ }
161
+ currentNodes = [];
162
+ const insert = (node) => {
163
+ marker.parentNode.insertBefore(node, marker);
164
+ currentNodes.push(node);
165
+ };
166
+ if (value === null || value === void 0 || value === false) {} else if (Array.isArray(value)) for (let i = 0; i < value.length; i++) {
167
+ const item = value[i];
168
+ if (item instanceof HTMLElement || item instanceof Text || item instanceof Comment || item instanceof DocumentFragment) insert(item);
169
+ else if (typeof item === "string" || typeof item === "number") insert(document.createTextNode(String(item)));
170
+ else if (Array.isArray(item)) {
171
+ const flat = flattenChildren(item);
172
+ for (let j = 0; j < flat.length; j++) insert(flat[j]);
173
+ }
174
+ }
175
+ else if (typeof value === "string" || typeof value === "number") insert(document.createTextNode(String(value)));
176
+ else if (value instanceof HTMLElement || value instanceof Text || value instanceof Comment || value instanceof DocumentFragment) insert(value);
177
+ });
178
+ }
179
+ /** @internal */
180
+ function flattenChildren(children) {
181
+ const result = [];
182
+ for (let i = 0; i < children.length; i++) {
183
+ const child = children[i];
184
+ if (Array.isArray(child)) result.push(...flattenChildren(child));
185
+ else if (child !== null && child !== void 0 && child !== false) {
186
+ if (child instanceof HTMLElement || child instanceof Text || child instanceof Comment) result.push(child);
187
+ else if (typeof child === "string" || typeof child === "number") result.push(document.createTextNode(String(child)));
188
+ }
189
+ }
190
+ return result;
191
+ }
192
+ /** @internal */
193
+ function camelToKebab(str) {
194
+ return str.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
195
+ }
196
+ //#endregion
197
+ export { Fragment, jsx, jsxs };
198
+
199
+ //# sourceMappingURL=element.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"element.mjs","names":[],"sources":["../../src/jsx/element.ts"],"sourcesContent":["/**\n * JSX element creation for @hedystia/view\n *\n * Creates real DOM nodes directly from JSX, no Virtual DOM.\n * Supports both intrinsic elements (strings) and functional components.\n */\n\nimport type { JSX } from \"../jsx.d\";\nimport { tick } from \"../scheduler\";\nimport { Owner, runComputation } from \"../signal\";\nimport type { Accessor, Computation } from \"../types\";\n\n/**\n * Function component type\n */\nexport type FunctionComponent<P = {}> = (props: P & { children?: JSX.Element }) => JSX.Element;\n\n/**\n * Element type - can be a string (intrinsic) or a function component\n */\nexport type ElementType<P = {}> = string | FunctionComponent<P>;\n\n/**\n * Create a real DOM element from JSX props\n * @param {ElementType} type - The element type (string or function component)\n * @param {Record<string, any>} props - The element props\n * @returns {JSX.Element} The created DOM element or component result\n * @example\n * const div = jsx(\"div\", { className: \"card\", children: \"Hello\" });\n * const MyComponent = (props: { text: string }) => <div>{props.text}</div>;\n * const component = jsx(MyComponent, { text: \"Hello\" });\n */\nexport function jsx<P>(type: ElementType<P>, props: P & { children?: JSX.Element }): JSX.Element {\n const { children, ...rest } = props || {};\n\n // Handle function components\n if (typeof type === \"function\") {\n return type({ children, ...rest } as P & { children?: JSX.Element });\n }\n\n // Handle intrinsic elements (strings)\n const element = document.createElement(type);\n\n for (const key in rest) {\n if (!Object.hasOwn(rest, key)) {\n continue;\n }\n const value = (rest as Record<string, any>)[key];\n applyProp(element, key, value);\n }\n\n if (children !== undefined && children !== null) {\n applyChildren(element, children);\n }\n\n return element;\n}\n\n/**\n * Create a fragment (multiple children without wrapper)\n * @param {ElementType} type - The element type (string or function component)\n * @param {Record<string, any>} props - The element props\n * @returns {JSX.Element | (HTMLElement | Text | Comment)[]} The fragment children or element\n * @example\n * const fragment = jsxs(\"fragment\", { children: [div1, div2] });\n * const MyComponent = (props: { items: string[] }) => <>{props.items.map(item => <span>{item}</span>)}</>;\n * const component = jsxs(MyComponent, { items: [\"a\", \"b\"] });\n */\nexport function jsxs<P>(\n type: ElementType<P>,\n props: P & { children?: JSX.Element },\n): JSX.Element | (HTMLElement | Text | Comment)[] {\n const { children, ...rest } = props || {};\n\n // Handle function components\n if (typeof type === \"function\") {\n return type({ children, ...rest } as P & { children?: JSX.Element });\n }\n\n // Handle Fragment\n if (type === \"fragment\" || type === \"Fragment\") {\n if (Array.isArray(children)) {\n return flattenChildren(children);\n }\n return children ?? null;\n }\n\n // Handle intrinsic elements (strings)\n const element = document.createElement(type);\n\n for (const key in rest) {\n if (!Object.hasOwn(rest, key)) {\n continue;\n }\n const value = (rest as Record<string, any>)[key];\n applyProp(element, key, value);\n }\n\n if (children !== undefined && children !== null) {\n applyChildren(element, children);\n }\n\n return element;\n}\n\n/**\n * Fragment component for multiple children\n */\nexport function Fragment(props: {\n children?: JSX.Children;\n}): JSX.Element | (HTMLElement | Text | Comment)[] {\n const { children } = props;\n if (children == null) {\n return null;\n }\n if (Array.isArray(children)) {\n return flattenChildren(children);\n }\n if (typeof children === \"function\") {\n const container = document.createDocumentFragment();\n applyReactiveChild(container, children as () => any);\n return container;\n }\n return children as JSX.Element;\n}\n\n/** @internal - Eager effect for DOM side effects (unlike memo which is lazy) */\nfunction effect(fn: () => void): void {\n const computation: Computation<any> = {\n _fn: () => {\n fn();\n return undefined;\n },\n _value: undefined,\n _sources: null,\n _sourceSlots: null,\n _observers: null,\n _observerSlots: null,\n _owner: Owner,\n _cleanups: null,\n _context: null,\n _suspense: null,\n _user: true,\n _pure: false,\n _state: 0,\n _updatedAt: null,\n };\n runComputation(computation);\n}\n\n/** @internal */\nfunction applyProp(element: HTMLElement, key: string, value: any): void {\n if (value === undefined || value === null) {\n return;\n }\n\n if (key.startsWith(\"on\") && typeof value === \"function\") {\n const eventName = key.slice(2).toLowerCase();\n element.addEventListener(eventName, value);\n } else if (key === \"style\") {\n if (typeof value === \"string\") {\n element.style.cssText = value;\n } else if (typeof value === \"object\") {\n applyStyle(element, value);\n } else if (typeof value === \"function\") {\n applyReactiveStyle(element, value);\n }\n } else if (key === \"class\") {\n element.className = String(value);\n } else if (key === \"className\") {\n element.className = String(value);\n } else if (key === \"ref\" && typeof value === \"function\") {\n tick(() => value(element));\n } else if (typeof value === \"function\" && !key.startsWith(\"on\")) {\n applyReactiveProp(element, key, value);\n } else {\n if (typeof value === \"boolean\") {\n if (value) {\n element.setAttribute(key, \"\");\n }\n } else {\n element.setAttribute(key, String(value));\n }\n }\n}\n\n/** @internal */\nfunction applyStyle(element: HTMLElement, style: Record<string, any>): void {\n for (const key in style) {\n if (!Object.hasOwn(style, key)) {\n continue;\n }\n const value = style[key];\n if (value !== undefined && value !== null) {\n const cssKey = camelToKebab(key);\n (element.style as any)[cssKey] = String(value);\n }\n }\n}\n\n/** @internal */\nfunction applyReactiveStyle(element: HTMLElement, accessor: Accessor<Record<string, any>>): void {\n effect(() => {\n const style = accessor();\n applyStyle(element, style);\n });\n}\n\n/** @internal */\nfunction applyReactiveProp(element: HTMLElement, key: string, accessor: Accessor<any>): void {\n effect(() => {\n const value = accessor();\n if (value === undefined || value === null) {\n element.removeAttribute(key);\n } else {\n element.setAttribute(key, String(value));\n }\n });\n}\n\n/** @internal */\nfunction applyChildren(element: HTMLElement | DocumentFragment, children: JSX.Children): void {\n if (Array.isArray(children)) {\n for (let i = 0; i < children.length; i++) {\n appendSingleChild(element, children[i]);\n }\n } else {\n appendSingleChild(element, children);\n }\n}\n\n/** @internal */\nfunction appendSingleChild(element: HTMLElement | DocumentFragment, child: any): void {\n if (child === null || child === undefined || child === false) {\n return;\n }\n if (Array.isArray(child)) {\n for (let i = 0; i < child.length; i++) {\n appendSingleChild(element, child[i]);\n }\n } else if (typeof child === \"function\") {\n applyReactiveChild(element, child);\n } else if (typeof child === \"string\" || typeof child === \"number\") {\n element.appendChild(document.createTextNode(String(child)));\n } else if (child instanceof HTMLElement || child instanceof Text || child instanceof Comment) {\n element.appendChild(child);\n } else if (child instanceof DocumentFragment) {\n element.appendChild(child);\n }\n}\n\n/** @internal */\nfunction applyReactiveChild(\n element: HTMLElement | DocumentFragment,\n accessor: Accessor<any>,\n): void {\n const marker = document.createComment(\"\");\n element.appendChild(marker);\n let currentNodes: Node[] = [];\n\n effect(() => {\n const value = accessor();\n\n // Remove old nodes\n for (let i = 0; i < currentNodes.length; i++) {\n const node = currentNodes[i]!;\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n }\n currentNodes = [];\n\n const insert = (node: Node) => {\n marker.parentNode!.insertBefore(node, marker);\n currentNodes.push(node);\n };\n\n if (value === null || value === undefined || value === false) {\n // nothing to insert\n } else if (Array.isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n const item = value[i];\n if (\n item instanceof HTMLElement ||\n item instanceof Text ||\n item instanceof Comment ||\n item instanceof DocumentFragment\n ) {\n insert(item);\n } else if (typeof item === \"string\" || typeof item === \"number\") {\n insert(document.createTextNode(String(item)));\n } else if (Array.isArray(item)) {\n const flat = flattenChildren(item);\n for (let j = 0; j < flat.length; j++) {\n insert(flat[j]!);\n }\n }\n }\n } else if (typeof value === \"string\" || typeof value === \"number\") {\n insert(document.createTextNode(String(value)));\n } else if (\n value instanceof HTMLElement ||\n value instanceof Text ||\n value instanceof Comment ||\n value instanceof DocumentFragment\n ) {\n insert(value);\n }\n });\n}\n\n/** @internal */\nfunction flattenChildren(children: JSX.Child[]): Array<HTMLElement | Text | Comment> {\n const result: Array<HTMLElement | Text | Comment> = [];\n for (let i = 0; i < children.length; i++) {\n const child = children[i];\n if (Array.isArray(child)) {\n result.push(...flattenChildren(child));\n } else if (child !== null && child !== undefined && child !== false) {\n if (child instanceof HTMLElement || child instanceof Text || child instanceof Comment) {\n result.push(child);\n } else if (typeof child === \"string\" || typeof child === \"number\") {\n result.push(document.createTextNode(String(child)));\n }\n }\n }\n return result;\n}\n\n/** @internal */\nfunction camelToKebab(str: string): string {\n return str.replace(/([a-z])([A-Z])/g, \"$1-$2\").toLowerCase();\n}\n"],"mappings":";;;;;;;;;;;;;AAgCA,SAAgB,IAAO,MAAsB,OAAoD;CAC/F,MAAM,EAAE,UAAU,GAAG,SAAS,SAAS,EAAE;AAGzC,KAAI,OAAO,SAAS,WAClB,QAAO,KAAK;EAAE;EAAU,GAAG;EAAM,CAAmC;CAItE,MAAM,UAAU,SAAS,cAAc,KAAK;AAE5C,MAAK,MAAM,OAAO,MAAM;AACtB,MAAI,CAAC,OAAO,OAAO,MAAM,IAAI,CAC3B;EAEF,MAAM,QAAS,KAA6B;AAC5C,YAAU,SAAS,KAAK,MAAM;;AAGhC,KAAI,aAAa,KAAA,KAAa,aAAa,KACzC,eAAc,SAAS,SAAS;AAGlC,QAAO;;;;;;;;;;;;AAaT,SAAgB,KACd,MACA,OACgD;CAChD,MAAM,EAAE,UAAU,GAAG,SAAS,SAAS,EAAE;AAGzC,KAAI,OAAO,SAAS,WAClB,QAAO,KAAK;EAAE;EAAU,GAAG;EAAM,CAAmC;AAItE,KAAI,SAAS,cAAc,SAAS,YAAY;AAC9C,MAAI,MAAM,QAAQ,SAAS,CACzB,QAAO,gBAAgB,SAAS;AAElC,SAAO,YAAY;;CAIrB,MAAM,UAAU,SAAS,cAAc,KAAK;AAE5C,MAAK,MAAM,OAAO,MAAM;AACtB,MAAI,CAAC,OAAO,OAAO,MAAM,IAAI,CAC3B;EAEF,MAAM,QAAS,KAA6B;AAC5C,YAAU,SAAS,KAAK,MAAM;;AAGhC,KAAI,aAAa,KAAA,KAAa,aAAa,KACzC,eAAc,SAAS,SAAS;AAGlC,QAAO;;;;;AAMT,SAAgB,SAAS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KAAK,MAAM;YACT,OAAO,UAAU,YAAY,OAAO,UAAU,SACvD,QAAO,KAAK,SAAS,eAAe,OAAO,MAAM,CAAC,CAAC;;;AAIzD,QAAO;;;AAIT,SAAS,aAAa,KAAqB;AACzC,QAAO,IAAI,QAAQ,mBAAmB,QAAQ,CAAC,aAAa"}
@@ -0,0 +1,40 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_element = require("./jsx/element.cjs");
3
+ //#region src/jsx-dev-runtime.ts
4
+ /**
5
+ * Development JSX runtime for @hedystia/view
6
+ *
7
+ * Provides jsxDEV with source location info for better error messages.
8
+ * Re-exports jsx, jsxs, and Fragment from production runtime.
9
+ */
10
+ /**
11
+ * Development JSX element creator with source info
12
+ * @param {ElementType} type - The element type (string or function component)
13
+ * @param {Record<string, any>} props - The element props
14
+ * @param {string} [key] - The element key
15
+ * @param {boolean} [isStaticChildren] - Whether children are static
16
+ * @param {string} [sourceFileName] - The source file name
17
+ * @param {number} [sourceLineNumber] - The source line number
18
+ * @param {number} [sourceColumnNumber] - The source column number
19
+ * @returns {JSX.Element} The created DOM element or component result
20
+ */
21
+ function jsxDEV(type, props, _key, _isStaticChildren, sourceFileName, sourceLineNumber, sourceColumnNumber) {
22
+ if (typeof window !== "undefined" && window.__DEV__ === true) {
23
+ const location = sourceFileName && sourceLineNumber ? ` at ${sourceFileName}:${sourceLineNumber}:${sourceColumnNumber || 0}` : "";
24
+ try {
25
+ return require_element.jsx(type, props);
26
+ } catch (error) {
27
+ const message = error instanceof Error ? error.message : String(error);
28
+ const typeName = typeof type === "string" ? `<${type}>` : type.name || "Component";
29
+ throw new Error(`jsxDEV error for ${typeName}${location}: ${message}`);
30
+ }
31
+ }
32
+ return require_element.jsx(type, props);
33
+ }
34
+ //#endregion
35
+ exports.Fragment = require_element.Fragment;
36
+ exports.jsx = require_element.jsx;
37
+ exports.jsxDEV = jsxDEV;
38
+ exports.jsxs = require_element.jsxs;
39
+
40
+ //# sourceMappingURL=jsx-dev-runtime.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jsx-dev-runtime.cjs","names":["jsx"],"sources":["../src/jsx-dev-runtime.ts"],"sourcesContent":["/**\n * Development JSX runtime for @hedystia/view\n *\n * Provides jsxDEV with source location info for better error messages.\n * Re-exports jsx, jsxs, and Fragment from production runtime.\n */\n\nimport { type ElementType, Fragment, type FunctionComponent, jsx, jsxs } from \"./jsx/element\";\nimport type { JSX } from \"./jsx.d\";\n\n/**\n * Development JSX element creator with source info\n * @param {ElementType} type - The element type (string or function component)\n * @param {Record<string, any>} props - The element props\n * @param {string} [key] - The element key\n * @param {boolean} [isStaticChildren] - Whether children are static\n * @param {string} [sourceFileName] - The source file name\n * @param {number} [sourceLineNumber] - The source line number\n * @param {number} [sourceColumnNumber] - The source column number\n * @returns {JSX.Element} The created DOM element or component result\n */\nexport function jsxDEV<P>(\n type: ElementType<P>,\n props: P & { children?: JSX.Element },\n _key?: string,\n _isStaticChildren?: boolean,\n sourceFileName?: string,\n sourceLineNumber?: number,\n sourceColumnNumber?: number,\n): JSX.Element {\n const isDev = typeof window !== \"undefined\" && (window as any).__DEV__ === true;\n\n if (isDev) {\n const location =\n sourceFileName && sourceLineNumber\n ? ` at ${sourceFileName}:${sourceLineNumber}:${sourceColumnNumber || 0}`\n : \"\";\n\n try {\n return jsx(type, props);\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error);\n const typeName = typeof type === \"string\" ? `<${type}>` : type.name || \"Component\";\n throw new Error(`jsxDEV error for ${typeName}${location}: ${message}`);\n }\n }\n\n return jsx(type, props);\n}\n\nexport type { ElementType, FunctionComponent, JSX };\nexport { Fragment, jsx, jsxs };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAqBA,SAAgB,OACd,MACA,OACA,MACA,mBACA,gBACA,kBACA,oBACa;AAGb,KAFc,OAAO,WAAW,eAAgB,OAAe,YAAY,MAEhE;EACT,MAAM,WACJ,kBAAkB,mBACd,OAAO,eAAe,GAAG,iBAAiB,GAAG,sBAAsB,MACnE;AAEN,MAAI;AACF,UAAOA,gBAAAA,IAAI,MAAM,MAAM;WAChB,OAAO;GACd,MAAM,UAAU,iBAAiB,QAAQ,MAAM,UAAU,OAAO,MAAM;GACtE,MAAM,WAAW,OAAO,SAAS,WAAW,IAAI,KAAK,KAAK,KAAK,QAAQ;AACvE,SAAM,IAAI,MAAM,oBAAoB,WAAW,SAAS,IAAI,UAAU;;;AAI1E,QAAOA,gBAAAA,IAAI,MAAM,MAAM"}
@@ -0,0 +1,21 @@
1
+ import { JSX } from "./jsx.cjs";
2
+ import { ElementType, Fragment, FunctionComponent, jsx, jsxs } from "./jsx/element.cjs";
3
+
4
+ //#region src/jsx-dev-runtime.d.ts
5
+ /**
6
+ * Development JSX element creator with source info
7
+ * @param {ElementType} type - The element type (string or function component)
8
+ * @param {Record<string, any>} props - The element props
9
+ * @param {string} [key] - The element key
10
+ * @param {boolean} [isStaticChildren] - Whether children are static
11
+ * @param {string} [sourceFileName] - The source file name
12
+ * @param {number} [sourceLineNumber] - The source line number
13
+ * @param {number} [sourceColumnNumber] - The source column number
14
+ * @returns {JSX.Element} The created DOM element or component result
15
+ */
16
+ declare function jsxDEV<P>(type: ElementType<P>, props: P & {
17
+ children?: JSX.Element;
18
+ }, _key?: string, _isStaticChildren?: boolean, sourceFileName?: string, sourceLineNumber?: number, sourceColumnNumber?: number): JSX.Element;
19
+ //#endregion
20
+ export { type ElementType, Fragment, type FunctionComponent, type JSX, jsx, jsxDEV, jsxs };
21
+ //# sourceMappingURL=jsx-dev-runtime.d.cts.map
@@ -0,0 +1,21 @@
1
+ import { JSX } from "./jsx.mjs";
2
+ import { ElementType, Fragment, FunctionComponent, jsx, jsxs } from "./jsx/element.mjs";
3
+
4
+ //#region src/jsx-dev-runtime.d.ts
5
+ /**
6
+ * Development JSX element creator with source info
7
+ * @param {ElementType} type - The element type (string or function component)
8
+ * @param {Record<string, any>} props - The element props
9
+ * @param {string} [key] - The element key
10
+ * @param {boolean} [isStaticChildren] - Whether children are static
11
+ * @param {string} [sourceFileName] - The source file name
12
+ * @param {number} [sourceLineNumber] - The source line number
13
+ * @param {number} [sourceColumnNumber] - The source column number
14
+ * @returns {JSX.Element} The created DOM element or component result
15
+ */
16
+ declare function jsxDEV<P>(type: ElementType<P>, props: P & {
17
+ children?: JSX.Element;
18
+ }, _key?: string, _isStaticChildren?: boolean, sourceFileName?: string, sourceLineNumber?: number, sourceColumnNumber?: number): JSX.Element;
19
+ //#endregion
20
+ export { type ElementType, Fragment, type FunctionComponent, type JSX, jsx, jsxDEV, jsxs };
21
+ //# sourceMappingURL=jsx-dev-runtime.d.mts.map