defuss 2.1.0 → 2.1.4

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 (62) hide show
  1. package/dist/dom-0hlsykYH.cjs +2307 -0
  2. package/dist/dom-7QMISZ5C.mjs +2211 -0
  3. package/dist/dom-B1A7C07a.cjs +2278 -0
  4. package/dist/dom-B8Nu6WeP.cjs +2278 -0
  5. package/dist/dom-BHkEmG9m.cjs +2304 -0
  6. package/dist/dom-BIjjeDUU.mjs +2216 -0
  7. package/dist/dom-BcpTNjoK.cjs +2297 -0
  8. package/dist/dom-BnTS2N9Y.mjs +2217 -0
  9. package/dist/dom-BpjmxHVm.cjs +2307 -0
  10. package/dist/dom-BsDRCamd.mjs +2232 -0
  11. package/dist/dom-C-wC3HeF.mjs +2226 -0
  12. package/dist/dom-C1rKi1FK.cjs +2282 -0
  13. package/dist/dom-C95ue10z.cjs +2274 -0
  14. package/dist/dom-CASDiI4e.mjs +2218 -0
  15. package/dist/dom-CRmy0cD5.cjs +2274 -0
  16. package/dist/dom-CgmybBkK.mjs +2235 -0
  17. package/dist/dom-CiUM5iRV.mjs +2208 -0
  18. package/dist/dom-Cl4KLBe2.mjs +2212 -0
  19. package/dist/dom-Co9qKYKH.mjs +2208 -0
  20. package/dist/dom-CsRpx_pQ.cjs +2288 -0
  21. package/dist/dom-DK9OsuHY.cjs +2281 -0
  22. package/dist/dom-DOo8Mn5m.mjs +2209 -0
  23. package/dist/dom-DTqN1pTP.mjs +2215 -0
  24. package/dist/dom-Db4PHLSs.cjs +2282 -0
  25. package/dist/dom-DqcP8s3C.mjs +2210 -0
  26. package/dist/dom-Dv7NYXDp.cjs +2278 -0
  27. package/dist/dom-DvLoZljw.cjs +2281 -0
  28. package/dist/dom-DzyeJzGT.mjs +2218 -0
  29. package/dist/dom-IvVOwsTR.cjs +2275 -0
  30. package/dist/dom-aW4SnGYh.mjs +2210 -0
  31. package/dist/dom-e8wNUSq9.cjs +2289 -0
  32. package/dist/dom-fZQn7O9l.cjs +2278 -0
  33. package/dist/dom-nqHAD9D_.mjs +2212 -0
  34. package/dist/dom-qpb9kPPR.mjs +2212 -0
  35. package/dist/dom-sudzLn02.mjs +2235 -0
  36. package/dist/dom-wNstqp5x.mjs +2212 -0
  37. package/dist/index-CFzTaTt4.d.ts +1486 -0
  38. package/dist/index-DFtvxAXR.d.ts +1485 -0
  39. package/dist/index-DOwhvTWr.d.ts +1484 -0
  40. package/dist/index-DSY7xbQy.d.ts +1470 -0
  41. package/dist/index-uLqRwtiw.d.ts +1475 -0
  42. package/dist/index.cjs +6 -1
  43. package/dist/index.d.cts +2 -2
  44. package/dist/index.d.ts +2 -2
  45. package/dist/index.mjs +2 -2
  46. package/dist/render/client.cjs +78 -3
  47. package/dist/render/client.d.cts +2 -2
  48. package/dist/render/client.d.ts +2 -2
  49. package/dist/render/client.mjs +74 -4
  50. package/dist/render/dev/index.cjs +31 -0
  51. package/dist/render/dev/index.d.cts +3 -0
  52. package/dist/render/dev/index.d.ts +3 -0
  53. package/dist/render/dev/index.mjs +2 -0
  54. package/dist/render/index.cjs +6 -1
  55. package/dist/render/index.d.cts +1 -1
  56. package/dist/render/index.d.ts +1 -1
  57. package/dist/render/index.mjs +1 -1
  58. package/dist/render/server.cjs +6 -1
  59. package/dist/render/server.d.cts +2 -2
  60. package/dist/render/server.d.ts +2 -2
  61. package/dist/render/server.mjs +2 -2
  62. package/package.json +39 -21
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var dom = require('./dom-DuPDCLQ6.cjs');
3
+ var dom = require('./dom-CsRpx_pQ.cjs');
4
4
  require('defuss-runtime');
5
5
 
6
6
  const inDevMode = true;
@@ -463,11 +463,16 @@ const Async = ({
463
463
  const Suspense = Async;
464
464
 
465
465
  exports.$ = dom.$;
466
+ exports.CLASS_ATTRIBUTE_NAME = dom.CLASS_ATTRIBUTE_NAME;
466
467
  exports.Call = dom.Call;
467
468
  exports.CallChainImpl = dom.CallChainImpl;
468
469
  exports.CallChainImplThenable = dom.CallChainImplThenable;
470
+ exports.DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE = dom.DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE;
469
471
  exports.DEFAULT_TRANSITION_CONFIG = dom.DEFAULT_TRANSITION_CONFIG;
470
472
  exports.Fragment = dom.Fragment;
473
+ exports.REF_ATTRIBUTE_NAME = dom.REF_ATTRIBUTE_NAME;
474
+ exports.XLINK_ATTRIBUTE_NAME = dom.XLINK_ATTRIBUTE_NAME;
475
+ exports.XMLNS_ATTRIBUTE_NAME = dom.XMLNS_ATTRIBUTE_NAME;
471
476
  exports.addElementEvent = dom.addElementEvent;
472
477
  exports.addNonChainedReturnCallNames = dom.addNonChainedReturnCallNames;
473
478
  exports.applyStyles = dom.applyStyles;
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { a0 as PersistenceProviderType, a1 as PersistenceProviderOptions, a2 as PersistenceProviderImpl, h as VNode, g as VNodeAttributes, R as RenderInput, G as Globals, N as NodeType, f as Ref, s as Props, n as VNodeChild, X as TransitionConfig } from './index-BBk97lC7.js';
2
- export { af as $, A as AllHTMLElements, C as CSSProperties, a3 as Call, a8 as CallChainImpl, a9 as CallChainImplThenable, p as Children, _ as DEFAULT_TRANSITION_CONFIG, aw as DOMPropValue, ad as Dequery, ax as DequeryOptions, az as DequerySyncMethodReturnType, au as Dimensions, D as DomAbstractionImpl, ay as ElementCreationOptions, F as FontFaceProperties, as as FormFieldValue, at as FormKeyValues, I as Fragment, K as KeyFrameProperties, aD as Listener, aB as MemoryStorage, aA as MiddlewareFn, P as ParentElementInput, b as ParentElementInputAsync, av as Position, d as RefUpdateFn, e as RefUpdateRenderFn, c as RefUpdateRenderFnInput, q as RenderNodeInput, a as RenderResult, r as RenderResultNode, aE as Store, S as SyncRenderInput, y as SyncRenderResult, U as TransitionStyles, T as TransitionType, W as TransitionsEasing, V as VAttributes, o as VNodeChildren, j as VNodeKey, m as VNodeRef, l as VNodeRefCallback, k as VNodeRefObject, i as VNodeType, aC as WebStorage, a4 as addNonChainedReturnCallNames, Z as applyStyles, ak as createCall, al as createGetterSetterCall, t as createInPlaceErrorMessageVNode, Q as createRef, aF as createStore, am as createSubChain, ac as delayedAutoStart, ae as dequery, a7 as emptyImpl, ab as getAllFormValues, ai as getDefaultDequeryOptions, a5 as getNonChainedReturnCallNames, x as getRenderer, Y as getTransitionStyles, E as globalScopeDomApis, w as handleLifecycleEventsForOnMount, ag as isDequery, ah as isDequeryOptionsObject, H as isJSX, a6 as isNonChainedReturnCall, O as isRef, u as jsx, L as jsxDEV, J as jsxs, aj as mapArrayIndexAccess, v as observeUnmount, $ as performTransition, B as renderIsomorphicAsync, z as renderIsomorphicSync, ap as renderNode, aq as resolveNodes, ao as runWithTimeGuard, aa as scrollHelper, an as subChainForNextAwait, ar as traverse, M as updateDom } from './index-BBk97lC7.js';
1
+ import { a7 as PersistenceProviderType, a8 as PersistenceProviderOptions, a9 as PersistenceProviderImpl, h as VNode, g as VNodeAttributes, R as RenderInput, G as Globals, N as NodeType, f as Ref, s as Props, n as VNodeChild, a2 as TransitionConfig } from './index-DFtvxAXR.js';
2
+ export { am as $, A as AllHTMLElements, t as CLASS_ATTRIBUTE_NAME, C as CSSProperties, aa as Call, af as CallChainImpl, ag as CallChainImplThenable, p as Children, w as DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE, a5 as DEFAULT_TRANSITION_CONFIG, aD as DOMPropValue, ak as Dequery, aE as DequeryOptions, aG as DequerySyncMethodReturnType, aB as Dimensions, D as DomAbstractionImpl, aF as ElementCreationOptions, F as FontFaceProperties, az as FormFieldValue, aA as FormKeyValues, T as Fragment, y as JsxRuntimeHookFn, J as JsxSourceInfo, K as KeyFrameProperties, aK as Listener, aI as MemoryStorage, aH as MiddlewareFn, P as ParentElementInput, b as ParentElementInputAsync, aC as Position, v as REF_ATTRIBUTE_NAME, d as RefUpdateFn, e as RefUpdateRenderFn, c as RefUpdateRenderFnInput, q as RenderNodeInput, a as RenderResult, r as RenderResultNode, aL as Store, S as SyncRenderInput, I as SyncRenderResult, a0 as TransitionStyles, $ as TransitionType, a1 as TransitionsEasing, V as VAttributes, o as VNodeChildren, j as VNodeKey, m as VNodeRef, l as VNodeRefCallback, k as VNodeRefObject, i as VNodeType, aJ as WebStorage, X as XLINK_ATTRIBUTE_NAME, u as XMLNS_ATTRIBUTE_NAME, ab as addNonChainedReturnCallNames, a4 as applyStyles, ar as createCall, as as createGetterSetterCall, x as createInPlaceErrorMessageVNode, _ as createRef, aM as createStore, at as createSubChain, aj as delayedAutoStart, al as dequery, ae as emptyImpl, ai as getAllFormValues, ap as getDefaultDequeryOptions, ac as getNonChainedReturnCallNames, H as getRenderer, a3 as getTransitionStyles, O as globalScopeDomApis, E as handleLifecycleEventsForOnMount, an as isDequery, ao as isDequeryOptionsObject, Q as isJSX, ad as isNonChainedReturnCall, Z as isRef, z as jsx, W as jsxDEV, U as jsxs, aq as mapArrayIndexAccess, B as observeUnmount, a6 as performTransition, M as renderIsomorphicAsync, L as renderIsomorphicSync, aw as renderNode, ax as resolveNodes, av as runWithTimeGuard, ah as scrollHelper, au as subChainForNextAwait, ay as traverse, Y as updateDom } from './index-DFtvxAXR.js';
3
3
  import * as CSS from 'csstype';
4
4
  export { CSS };
5
5
 
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { a0 as PersistenceProviderType, a1 as PersistenceProviderOptions, a2 as PersistenceProviderImpl, h as VNode, g as VNodeAttributes, R as RenderInput, G as Globals, N as NodeType, f as Ref, s as Props, n as VNodeChild, X as TransitionConfig } from './index-BBk97lC7.js';
2
- export { af as $, A as AllHTMLElements, C as CSSProperties, a3 as Call, a8 as CallChainImpl, a9 as CallChainImplThenable, p as Children, _ as DEFAULT_TRANSITION_CONFIG, aw as DOMPropValue, ad as Dequery, ax as DequeryOptions, az as DequerySyncMethodReturnType, au as Dimensions, D as DomAbstractionImpl, ay as ElementCreationOptions, F as FontFaceProperties, as as FormFieldValue, at as FormKeyValues, I as Fragment, K as KeyFrameProperties, aD as Listener, aB as MemoryStorage, aA as MiddlewareFn, P as ParentElementInput, b as ParentElementInputAsync, av as Position, d as RefUpdateFn, e as RefUpdateRenderFn, c as RefUpdateRenderFnInput, q as RenderNodeInput, a as RenderResult, r as RenderResultNode, aE as Store, S as SyncRenderInput, y as SyncRenderResult, U as TransitionStyles, T as TransitionType, W as TransitionsEasing, V as VAttributes, o as VNodeChildren, j as VNodeKey, m as VNodeRef, l as VNodeRefCallback, k as VNodeRefObject, i as VNodeType, aC as WebStorage, a4 as addNonChainedReturnCallNames, Z as applyStyles, ak as createCall, al as createGetterSetterCall, t as createInPlaceErrorMessageVNode, Q as createRef, aF as createStore, am as createSubChain, ac as delayedAutoStart, ae as dequery, a7 as emptyImpl, ab as getAllFormValues, ai as getDefaultDequeryOptions, a5 as getNonChainedReturnCallNames, x as getRenderer, Y as getTransitionStyles, E as globalScopeDomApis, w as handleLifecycleEventsForOnMount, ag as isDequery, ah as isDequeryOptionsObject, H as isJSX, a6 as isNonChainedReturnCall, O as isRef, u as jsx, L as jsxDEV, J as jsxs, aj as mapArrayIndexAccess, v as observeUnmount, $ as performTransition, B as renderIsomorphicAsync, z as renderIsomorphicSync, ap as renderNode, aq as resolveNodes, ao as runWithTimeGuard, aa as scrollHelper, an as subChainForNextAwait, ar as traverse, M as updateDom } from './index-BBk97lC7.js';
1
+ import { a7 as PersistenceProviderType, a8 as PersistenceProviderOptions, a9 as PersistenceProviderImpl, h as VNode, g as VNodeAttributes, R as RenderInput, G as Globals, N as NodeType, f as Ref, s as Props, n as VNodeChild, a2 as TransitionConfig } from './index-DFtvxAXR.js';
2
+ export { am as $, A as AllHTMLElements, t as CLASS_ATTRIBUTE_NAME, C as CSSProperties, aa as Call, af as CallChainImpl, ag as CallChainImplThenable, p as Children, w as DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE, a5 as DEFAULT_TRANSITION_CONFIG, aD as DOMPropValue, ak as Dequery, aE as DequeryOptions, aG as DequerySyncMethodReturnType, aB as Dimensions, D as DomAbstractionImpl, aF as ElementCreationOptions, F as FontFaceProperties, az as FormFieldValue, aA as FormKeyValues, T as Fragment, y as JsxRuntimeHookFn, J as JsxSourceInfo, K as KeyFrameProperties, aK as Listener, aI as MemoryStorage, aH as MiddlewareFn, P as ParentElementInput, b as ParentElementInputAsync, aC as Position, v as REF_ATTRIBUTE_NAME, d as RefUpdateFn, e as RefUpdateRenderFn, c as RefUpdateRenderFnInput, q as RenderNodeInput, a as RenderResult, r as RenderResultNode, aL as Store, S as SyncRenderInput, I as SyncRenderResult, a0 as TransitionStyles, $ as TransitionType, a1 as TransitionsEasing, V as VAttributes, o as VNodeChildren, j as VNodeKey, m as VNodeRef, l as VNodeRefCallback, k as VNodeRefObject, i as VNodeType, aJ as WebStorage, X as XLINK_ATTRIBUTE_NAME, u as XMLNS_ATTRIBUTE_NAME, ab as addNonChainedReturnCallNames, a4 as applyStyles, ar as createCall, as as createGetterSetterCall, x as createInPlaceErrorMessageVNode, _ as createRef, aM as createStore, at as createSubChain, aj as delayedAutoStart, al as dequery, ae as emptyImpl, ai as getAllFormValues, ap as getDefaultDequeryOptions, ac as getNonChainedReturnCallNames, H as getRenderer, a3 as getTransitionStyles, O as globalScopeDomApis, E as handleLifecycleEventsForOnMount, an as isDequery, ao as isDequeryOptionsObject, Q as isJSX, ad as isNonChainedReturnCall, Z as isRef, z as jsx, W as jsxDEV, U as jsxs, aq as mapArrayIndexAccess, B as observeUnmount, a6 as performTransition, M as renderIsomorphicAsync, L as renderIsomorphicSync, aw as renderNode, ax as resolveNodes, av as runWithTimeGuard, ah as scrollHelper, au as subChainForNextAwait, ay as traverse, Y as updateDom } from './index-DFtvxAXR.js';
3
3
  import * as CSS from 'csstype';
4
4
  export { CSS };
5
5
 
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { n as createStore, q as isServer, k as createRef, $, f as isRef } from './dom-BcaFBnxf.mjs';
2
- export { O as Call, T as CallChainImpl, U as CallChainImplThenable, D as DEFAULT_TRANSITION_CONFIG, F as Fragment, I as addElementEvent, P as addNonChainedReturnCallNames, m as applyStyles, s as areDomNodesEqual, G as checkElementVisibility, K as clearElementEvents, a2 as createCall, a3 as createGetterSetterCall, c as createInPlaceErrorMessageVNode, a4 as createSubChain, X as delayedAutoStart, Y as dequery, L as domNodeToVNode, S as emptyImpl, W as getAllFormValues, a0 as getDefaultDequeryOptions, H as getEventMap, C as getMimeType, Q as getNonChainedReturnCallNames, g as getRenderer, l as getTransitionStyles, b as globalScopeDomApis, h as handleLifecycleEventsForOnMount, M as htmlStringToVNodes, Z as isDequery, _ as isDequeryOptionsObject, z as isHTML, i as isJSX, A as isMarkup, R as isNonChainedReturnCall, y as isSVG, j as jsx, e as jsxDEV, d as jsxs, a1 as mapArrayIndexAccess, o as observeUnmount, x as parseDOM, p as performTransition, E as processAllFormElements, N as queueCallback, J as removeElementEvent, a as renderIsomorphicAsync, r as renderIsomorphicSync, B as renderMarkup, a7 as renderNode, v as replaceDomWithVdom, a8 as resolveNodes, a6 as runWithTimeGuard, V as scrollHelper, a5 as subChainForNextAwait, a9 as traverse, u as updateDom, t as updateDomWithVdom, w as waitForDOM, aa as webstorage } from './dom-BcaFBnxf.mjs';
1
+ import { s as createStore, t as isServer, l as createRef, $, k as isRef } from './dom-BnTS2N9Y.mjs';
2
+ export { C as CLASS_ATTRIBUTE_NAME, S as Call, Y as CallChainImpl, Z as CallChainImplThenable, D as DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE, p as DEFAULT_TRANSITION_CONFIG, F as Fragment, R as REF_ATTRIBUTE_NAME, X as XLINK_ATTRIBUTE_NAME, a as XMLNS_ATTRIBUTE_NAME, L as addElementEvent, T as addNonChainedReturnCallNames, n as applyStyles, v as areDomNodesEqual, J as checkElementVisibility, N as clearElementEvents, a7 as createCall, a8 as createGetterSetterCall, c as createInPlaceErrorMessageVNode, a9 as createSubChain, a1 as delayedAutoStart, a2 as dequery, O as domNodeToVNode, W as emptyImpl, a0 as getAllFormValues, a5 as getDefaultDequeryOptions, K as getEventMap, H as getMimeType, U as getNonChainedReturnCallNames, g as getRenderer, m as getTransitionStyles, d as globalScopeDomApis, h as handleLifecycleEventsForOnMount, P as htmlStringToVNodes, a3 as isDequery, a4 as isDequeryOptionsObject, B as isHTML, i as isJSX, E as isMarkup, V as isNonChainedReturnCall, A as isSVG, j as jsx, f as jsxDEV, e as jsxs, a6 as mapArrayIndexAccess, o as observeUnmount, z as parseDOM, q as performTransition, I as processAllFormElements, Q as queueCallback, M as removeElementEvent, b as renderIsomorphicAsync, r as renderIsomorphicSync, G as renderMarkup, ac as renderNode, x as replaceDomWithVdom, ad as resolveNodes, ab as runWithTimeGuard, _ as scrollHelper, aa as subChainForNextAwait, ae as traverse, u as updateDom, w as updateDomWithVdom, y as waitForDOM, af as webstorage } from './dom-BnTS2N9Y.mjs';
3
3
  import 'defuss-runtime';
4
4
 
5
5
  const inDevMode = true;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var dom = require('../dom-DuPDCLQ6.cjs');
3
+ var dom = require('../dom-CsRpx_pQ.cjs');
4
4
  require('defuss-runtime');
5
5
 
6
6
  const renderSync = (virtualNode, parentDomElement = document.documentElement) => {
@@ -22,12 +22,81 @@ const render = async (virtualNode, parentDomElement = document.documentElement)
22
22
  const renderToString = (el) => new XMLSerializer().serializeToString(el);
23
23
  const hydrate = (nodes, parentElements, debug) => {
24
24
  let elementIndex = 0;
25
+ if (nodes.length !== parentElements.length) {
26
+ const fusedNodes = [];
27
+ let textBuffer = null;
28
+ const flush = () => {
29
+ if (textBuffer && textBuffer.length > 0) {
30
+ fusedNodes.push(textBuffer);
31
+ }
32
+ textBuffer = null;
33
+ };
34
+ for (let i = 0; i < nodes.length; i++) {
35
+ const node = nodes[i];
36
+ if (typeof node === "string" || typeof node === "number" || typeof node === "bigint") {
37
+ textBuffer = (textBuffer ?? "") + String(node);
38
+ continue;
39
+ }
40
+ if (node === null || typeof node === "undefined" || typeof node === "boolean") {
41
+ continue;
42
+ }
43
+ flush();
44
+ fusedNodes.push(node);
45
+ }
46
+ flush();
47
+ if (fusedNodes.length === parentElements.length) {
48
+ nodes = fusedNodes;
49
+ if (debug) {
50
+ console.debug(
51
+ "[defuss] Hydration: resolved mismatch via text-node fusion."
52
+ );
53
+ }
54
+ } else {
55
+ throw new Error(
56
+ `\u3010defuss\u3011Hydration error: Mismatched number of VNodes (${fusedNodes.length}) and DOM elements (${parentElements.length}) after text-node fusion attempt.`
57
+ );
58
+ }
59
+ }
25
60
  for (const node of nodes) {
26
- if (typeof node === "string" || node === null) {
61
+ if (typeof node === "string" || typeof node === "number" || typeof node === "bigint") {
27
62
  while (elementIndex < parentElements.length && parentElements[elementIndex].nodeType !== Node.ELEMENT_NODE && parentElements[elementIndex].nodeType !== Node.TEXT_NODE) {
28
63
  elementIndex++;
29
64
  }
30
- elementIndex++;
65
+ if (elementIndex >= parentElements.length) {
66
+ if (debug) {
67
+ console.warn(
68
+ "[defuss] Hydration warning: Ran out of DOM nodes while matching text content."
69
+ );
70
+ }
71
+ break;
72
+ }
73
+ const domNode = parentElements[elementIndex];
74
+ const expected = String(node);
75
+ if (domNode.nodeType === Node.TEXT_NODE) {
76
+ const textNode = domNode;
77
+ if (textNode.nodeValue !== expected) {
78
+ if (debug) {
79
+ console.warn(
80
+ `[defuss] Hydration text mismatch: expected "${expected}", got "${textNode.nodeValue ?? ""}". Correcting.`
81
+ );
82
+ }
83
+ textNode.nodeValue = expected;
84
+ }
85
+ elementIndex++;
86
+ continue;
87
+ }
88
+ if (domNode.nodeType === Node.ELEMENT_NODE) {
89
+ const message = "[defuss] Hydration error: ELEMENT_NODE encountered where TEXT_NODE was expected for text content.";
90
+ if (debug) {
91
+ throw new Error(message);
92
+ } else {
93
+ console.warn(message);
94
+ elementIndex++;
95
+ continue;
96
+ }
97
+ }
98
+ }
99
+ if (node === null || typeof node === "undefined" || typeof node === "boolean") {
31
100
  continue;
32
101
  }
33
102
  while (elementIndex < parentElements.length && parentElements[elementIndex].nodeType !== Node.ELEMENT_NODE) {
@@ -43,6 +112,7 @@ const hydrate = (nodes, parentElements, debug) => {
43
112
  const element = parentElements[elementIndex];
44
113
  if (vnode.attributes.ref) {
45
114
  vnode.attributes.ref.current = element;
115
+ element._defussRef = vnode.attributes.ref;
46
116
  }
47
117
  for (const key of Object.keys(vnode.attributes)) {
48
118
  if (key === "ref") continue;
@@ -77,8 +147,13 @@ const hydrate = (nodes, parentElements, debug) => {
77
147
  }
78
148
  };
79
149
 
150
+ exports.CLASS_ATTRIBUTE_NAME = dom.CLASS_ATTRIBUTE_NAME;
151
+ exports.DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE = dom.DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE;
80
152
  exports.DEFAULT_TRANSITION_CONFIG = dom.DEFAULT_TRANSITION_CONFIG;
81
153
  exports.Fragment = dom.Fragment;
154
+ exports.REF_ATTRIBUTE_NAME = dom.REF_ATTRIBUTE_NAME;
155
+ exports.XLINK_ATTRIBUTE_NAME = dom.XLINK_ATTRIBUTE_NAME;
156
+ exports.XMLNS_ATTRIBUTE_NAME = dom.XMLNS_ATTRIBUTE_NAME;
82
157
  exports.applyStyles = dom.applyStyles;
83
158
  exports.createInPlaceErrorMessageVNode = dom.createInPlaceErrorMessageVNode;
84
159
  exports.createRef = dom.createRef;
@@ -1,5 +1,5 @@
1
- import { R as RenderInput, P as ParentElementInput, a as RenderResult, b as ParentElementInputAsync, h as VNode } from '../index-BBk97lC7.js';
2
- export { A as AllHTMLElements, C as CSSProperties, p as Children, _ as DEFAULT_TRANSITION_CONFIG, D as DomAbstractionImpl, F as FontFaceProperties, I as Fragment, G as Globals, K as KeyFrameProperties, N as NodeType, s as Props, f as Ref, d as RefUpdateFn, e as RefUpdateRenderFn, c as RefUpdateRenderFnInput, q as RenderNodeInput, r as RenderResultNode, S as SyncRenderInput, y as SyncRenderResult, X as TransitionConfig, U as TransitionStyles, T as TransitionType, W as TransitionsEasing, V as VAttributes, g as VNodeAttributes, n as VNodeChild, o as VNodeChildren, j as VNodeKey, m as VNodeRef, l as VNodeRefCallback, k as VNodeRefObject, i as VNodeType, Z as applyStyles, t as createInPlaceErrorMessageVNode, Q as createRef, x as getRenderer, Y as getTransitionStyles, E as globalScopeDomApis, w as handleLifecycleEventsForOnMount, H as isJSX, O as isRef, u as jsx, L as jsxDEV, J as jsxs, v as observeUnmount, $ as performTransition, B as renderIsomorphicAsync, z as renderIsomorphicSync, M as updateDom } from '../index-BBk97lC7.js';
1
+ import { R as RenderInput, P as ParentElementInput, a as RenderResult, b as ParentElementInputAsync, h as VNode } from '../index-DFtvxAXR.js';
2
+ export { A as AllHTMLElements, t as CLASS_ATTRIBUTE_NAME, C as CSSProperties, p as Children, w as DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE, a5 as DEFAULT_TRANSITION_CONFIG, D as DomAbstractionImpl, F as FontFaceProperties, T as Fragment, G as Globals, y as JsxRuntimeHookFn, J as JsxSourceInfo, K as KeyFrameProperties, N as NodeType, s as Props, v as REF_ATTRIBUTE_NAME, f as Ref, d as RefUpdateFn, e as RefUpdateRenderFn, c as RefUpdateRenderFnInput, q as RenderNodeInput, r as RenderResultNode, S as SyncRenderInput, I as SyncRenderResult, a2 as TransitionConfig, a0 as TransitionStyles, $ as TransitionType, a1 as TransitionsEasing, V as VAttributes, g as VNodeAttributes, n as VNodeChild, o as VNodeChildren, j as VNodeKey, m as VNodeRef, l as VNodeRefCallback, k as VNodeRefObject, i as VNodeType, X as XLINK_ATTRIBUTE_NAME, u as XMLNS_ATTRIBUTE_NAME, a4 as applyStyles, x as createInPlaceErrorMessageVNode, _ as createRef, H as getRenderer, a3 as getTransitionStyles, O as globalScopeDomApis, E as handleLifecycleEventsForOnMount, Q as isJSX, Z as isRef, z as jsx, W as jsxDEV, U as jsxs, B as observeUnmount, a6 as performTransition, M as renderIsomorphicAsync, L as renderIsomorphicSync, Y as updateDom } from '../index-DFtvxAXR.js';
3
3
  import * as CSS from 'csstype';
4
4
  export { CSS };
5
5
 
@@ -1,5 +1,5 @@
1
- import { R as RenderInput, P as ParentElementInput, a as RenderResult, b as ParentElementInputAsync, h as VNode } from '../index-BBk97lC7.js';
2
- export { A as AllHTMLElements, C as CSSProperties, p as Children, _ as DEFAULT_TRANSITION_CONFIG, D as DomAbstractionImpl, F as FontFaceProperties, I as Fragment, G as Globals, K as KeyFrameProperties, N as NodeType, s as Props, f as Ref, d as RefUpdateFn, e as RefUpdateRenderFn, c as RefUpdateRenderFnInput, q as RenderNodeInput, r as RenderResultNode, S as SyncRenderInput, y as SyncRenderResult, X as TransitionConfig, U as TransitionStyles, T as TransitionType, W as TransitionsEasing, V as VAttributes, g as VNodeAttributes, n as VNodeChild, o as VNodeChildren, j as VNodeKey, m as VNodeRef, l as VNodeRefCallback, k as VNodeRefObject, i as VNodeType, Z as applyStyles, t as createInPlaceErrorMessageVNode, Q as createRef, x as getRenderer, Y as getTransitionStyles, E as globalScopeDomApis, w as handleLifecycleEventsForOnMount, H as isJSX, O as isRef, u as jsx, L as jsxDEV, J as jsxs, v as observeUnmount, $ as performTransition, B as renderIsomorphicAsync, z as renderIsomorphicSync, M as updateDom } from '../index-BBk97lC7.js';
1
+ import { R as RenderInput, P as ParentElementInput, a as RenderResult, b as ParentElementInputAsync, h as VNode } from '../index-DFtvxAXR.js';
2
+ export { A as AllHTMLElements, t as CLASS_ATTRIBUTE_NAME, C as CSSProperties, p as Children, w as DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE, a5 as DEFAULT_TRANSITION_CONFIG, D as DomAbstractionImpl, F as FontFaceProperties, T as Fragment, G as Globals, y as JsxRuntimeHookFn, J as JsxSourceInfo, K as KeyFrameProperties, N as NodeType, s as Props, v as REF_ATTRIBUTE_NAME, f as Ref, d as RefUpdateFn, e as RefUpdateRenderFn, c as RefUpdateRenderFnInput, q as RenderNodeInput, r as RenderResultNode, S as SyncRenderInput, I as SyncRenderResult, a2 as TransitionConfig, a0 as TransitionStyles, $ as TransitionType, a1 as TransitionsEasing, V as VAttributes, g as VNodeAttributes, n as VNodeChild, o as VNodeChildren, j as VNodeKey, m as VNodeRef, l as VNodeRefCallback, k as VNodeRefObject, i as VNodeType, X as XLINK_ATTRIBUTE_NAME, u as XMLNS_ATTRIBUTE_NAME, a4 as applyStyles, x as createInPlaceErrorMessageVNode, _ as createRef, H as getRenderer, a3 as getTransitionStyles, O as globalScopeDomApis, E as handleLifecycleEventsForOnMount, Q as isJSX, Z as isRef, z as jsx, W as jsxDEV, U as jsxs, B as observeUnmount, a6 as performTransition, M as renderIsomorphicAsync, L as renderIsomorphicSync, Y as updateDom } from '../index-DFtvxAXR.js';
3
3
  import * as CSS from 'csstype';
4
4
  export { CSS };
5
5
 
@@ -1,5 +1,5 @@
1
- import { b as globalScopeDomApis, r as renderIsomorphicSync, a as renderIsomorphicAsync, o as observeUnmount } from '../dom-BcaFBnxf.mjs';
2
- export { D as DEFAULT_TRANSITION_CONFIG, F as Fragment, m as applyStyles, c as createInPlaceErrorMessageVNode, k as createRef, g as getRenderer, l as getTransitionStyles, h as handleLifecycleEventsForOnMount, i as isJSX, f as isRef, j as jsx, e as jsxDEV, d as jsxs, p as performTransition, u as updateDom } from '../dom-BcaFBnxf.mjs';
1
+ import { d as globalScopeDomApis, r as renderIsomorphicSync, b as renderIsomorphicAsync, o as observeUnmount } from '../dom-BnTS2N9Y.mjs';
2
+ export { C as CLASS_ATTRIBUTE_NAME, D as DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE, p as DEFAULT_TRANSITION_CONFIG, F as Fragment, R as REF_ATTRIBUTE_NAME, X as XLINK_ATTRIBUTE_NAME, a as XMLNS_ATTRIBUTE_NAME, n as applyStyles, c as createInPlaceErrorMessageVNode, l as createRef, g as getRenderer, m as getTransitionStyles, h as handleLifecycleEventsForOnMount, i as isJSX, k as isRef, j as jsx, f as jsxDEV, e as jsxs, q as performTransition, u as updateDom } from '../dom-BnTS2N9Y.mjs';
3
3
  import 'defuss-runtime';
4
4
 
5
5
  const renderSync = (virtualNode, parentDomElement = document.documentElement) => {
@@ -21,12 +21,81 @@ const render = async (virtualNode, parentDomElement = document.documentElement)
21
21
  const renderToString = (el) => new XMLSerializer().serializeToString(el);
22
22
  const hydrate = (nodes, parentElements, debug) => {
23
23
  let elementIndex = 0;
24
+ if (nodes.length !== parentElements.length) {
25
+ const fusedNodes = [];
26
+ let textBuffer = null;
27
+ const flush = () => {
28
+ if (textBuffer && textBuffer.length > 0) {
29
+ fusedNodes.push(textBuffer);
30
+ }
31
+ textBuffer = null;
32
+ };
33
+ for (let i = 0; i < nodes.length; i++) {
34
+ const node = nodes[i];
35
+ if (typeof node === "string" || typeof node === "number" || typeof node === "bigint") {
36
+ textBuffer = (textBuffer ?? "") + String(node);
37
+ continue;
38
+ }
39
+ if (node === null || typeof node === "undefined" || typeof node === "boolean") {
40
+ continue;
41
+ }
42
+ flush();
43
+ fusedNodes.push(node);
44
+ }
45
+ flush();
46
+ if (fusedNodes.length === parentElements.length) {
47
+ nodes = fusedNodes;
48
+ if (debug) {
49
+ console.debug(
50
+ "[defuss] Hydration: resolved mismatch via text-node fusion."
51
+ );
52
+ }
53
+ } else {
54
+ throw new Error(
55
+ `\u3010defuss\u3011Hydration error: Mismatched number of VNodes (${fusedNodes.length}) and DOM elements (${parentElements.length}) after text-node fusion attempt.`
56
+ );
57
+ }
58
+ }
24
59
  for (const node of nodes) {
25
- if (typeof node === "string" || node === null) {
60
+ if (typeof node === "string" || typeof node === "number" || typeof node === "bigint") {
26
61
  while (elementIndex < parentElements.length && parentElements[elementIndex].nodeType !== Node.ELEMENT_NODE && parentElements[elementIndex].nodeType !== Node.TEXT_NODE) {
27
62
  elementIndex++;
28
63
  }
29
- elementIndex++;
64
+ if (elementIndex >= parentElements.length) {
65
+ if (debug) {
66
+ console.warn(
67
+ "[defuss] Hydration warning: Ran out of DOM nodes while matching text content."
68
+ );
69
+ }
70
+ break;
71
+ }
72
+ const domNode = parentElements[elementIndex];
73
+ const expected = String(node);
74
+ if (domNode.nodeType === Node.TEXT_NODE) {
75
+ const textNode = domNode;
76
+ if (textNode.nodeValue !== expected) {
77
+ if (debug) {
78
+ console.warn(
79
+ `[defuss] Hydration text mismatch: expected "${expected}", got "${textNode.nodeValue ?? ""}". Correcting.`
80
+ );
81
+ }
82
+ textNode.nodeValue = expected;
83
+ }
84
+ elementIndex++;
85
+ continue;
86
+ }
87
+ if (domNode.nodeType === Node.ELEMENT_NODE) {
88
+ const message = "[defuss] Hydration error: ELEMENT_NODE encountered where TEXT_NODE was expected for text content.";
89
+ if (debug) {
90
+ throw new Error(message);
91
+ } else {
92
+ console.warn(message);
93
+ elementIndex++;
94
+ continue;
95
+ }
96
+ }
97
+ }
98
+ if (node === null || typeof node === "undefined" || typeof node === "boolean") {
30
99
  continue;
31
100
  }
32
101
  while (elementIndex < parentElements.length && parentElements[elementIndex].nodeType !== Node.ELEMENT_NODE) {
@@ -42,6 +111,7 @@ const hydrate = (nodes, parentElements, debug) => {
42
111
  const element = parentElements[elementIndex];
43
112
  if (vnode.attributes.ref) {
44
113
  vnode.attributes.ref.current = element;
114
+ element._defussRef = vnode.attributes.ref;
45
115
  }
46
116
  for (const key of Object.keys(vnode.attributes)) {
47
117
  if (key === "ref") continue;
@@ -0,0 +1,31 @@
1
+ 'use strict';
2
+
3
+ var dom = require('../../dom-CsRpx_pQ.cjs');
4
+ require('defuss-runtime');
5
+
6
+
7
+
8
+ exports.CLASS_ATTRIBUTE_NAME = dom.CLASS_ATTRIBUTE_NAME;
9
+ exports.DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE = dom.DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE;
10
+ exports.DEFAULT_TRANSITION_CONFIG = dom.DEFAULT_TRANSITION_CONFIG;
11
+ exports.Fragment = dom.Fragment;
12
+ exports.REF_ATTRIBUTE_NAME = dom.REF_ATTRIBUTE_NAME;
13
+ exports.XLINK_ATTRIBUTE_NAME = dom.XLINK_ATTRIBUTE_NAME;
14
+ exports.XMLNS_ATTRIBUTE_NAME = dom.XMLNS_ATTRIBUTE_NAME;
15
+ exports.applyStyles = dom.applyStyles;
16
+ exports.createInPlaceErrorMessageVNode = dom.createInPlaceErrorMessageVNode;
17
+ exports.createRef = dom.createRef;
18
+ exports.getRenderer = dom.getRenderer;
19
+ exports.getTransitionStyles = dom.getTransitionStyles;
20
+ exports.globalScopeDomApis = dom.globalScopeDomApis;
21
+ exports.handleLifecycleEventsForOnMount = dom.handleLifecycleEventsForOnMount;
22
+ exports.isJSX = dom.isJSX;
23
+ exports.isRef = dom.isRef;
24
+ exports.jsx = dom.jsx;
25
+ exports.jsxDEV = dom.jsxDEV;
26
+ exports.jsxs = dom.jsxs;
27
+ exports.observeUnmount = dom.observeUnmount;
28
+ exports.performTransition = dom.performTransition;
29
+ exports.renderIsomorphicAsync = dom.renderIsomorphicAsync;
30
+ exports.renderIsomorphicSync = dom.renderIsomorphicSync;
31
+ exports.updateDom = dom.updateDom;
@@ -0,0 +1,3 @@
1
+ export { A as AllHTMLElements, t as CLASS_ATTRIBUTE_NAME, C as CSSProperties, p as Children, w as DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE, a5 as DEFAULT_TRANSITION_CONFIG, D as DomAbstractionImpl, F as FontFaceProperties, T as Fragment, G as Globals, y as JsxRuntimeHookFn, J as JsxSourceInfo, K as KeyFrameProperties, N as NodeType, P as ParentElementInput, b as ParentElementInputAsync, s as Props, v as REF_ATTRIBUTE_NAME, f as Ref, d as RefUpdateFn, e as RefUpdateRenderFn, c as RefUpdateRenderFnInput, R as RenderInput, q as RenderNodeInput, a as RenderResult, r as RenderResultNode, S as SyncRenderInput, I as SyncRenderResult, a2 as TransitionConfig, a0 as TransitionStyles, $ as TransitionType, a1 as TransitionsEasing, V as VAttributes, h as VNode, g as VNodeAttributes, n as VNodeChild, o as VNodeChildren, j as VNodeKey, m as VNodeRef, l as VNodeRefCallback, k as VNodeRefObject, i as VNodeType, X as XLINK_ATTRIBUTE_NAME, u as XMLNS_ATTRIBUTE_NAME, a4 as applyStyles, x as createInPlaceErrorMessageVNode, _ as createRef, H as getRenderer, a3 as getTransitionStyles, O as globalScopeDomApis, E as handleLifecycleEventsForOnMount, Q as isJSX, Z as isRef, z as jsx, W as jsxDEV, U as jsxs, B as observeUnmount, a6 as performTransition, M as renderIsomorphicAsync, L as renderIsomorphicSync, Y as updateDom } from '../../index-DFtvxAXR.js';
2
+ import * as CSS from 'csstype';
3
+ export { CSS };
@@ -0,0 +1,3 @@
1
+ export { A as AllHTMLElements, t as CLASS_ATTRIBUTE_NAME, C as CSSProperties, p as Children, w as DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE, a5 as DEFAULT_TRANSITION_CONFIG, D as DomAbstractionImpl, F as FontFaceProperties, T as Fragment, G as Globals, y as JsxRuntimeHookFn, J as JsxSourceInfo, K as KeyFrameProperties, N as NodeType, P as ParentElementInput, b as ParentElementInputAsync, s as Props, v as REF_ATTRIBUTE_NAME, f as Ref, d as RefUpdateFn, e as RefUpdateRenderFn, c as RefUpdateRenderFnInput, R as RenderInput, q as RenderNodeInput, a as RenderResult, r as RenderResultNode, S as SyncRenderInput, I as SyncRenderResult, a2 as TransitionConfig, a0 as TransitionStyles, $ as TransitionType, a1 as TransitionsEasing, V as VAttributes, h as VNode, g as VNodeAttributes, n as VNodeChild, o as VNodeChildren, j as VNodeKey, m as VNodeRef, l as VNodeRefCallback, k as VNodeRefObject, i as VNodeType, X as XLINK_ATTRIBUTE_NAME, u as XMLNS_ATTRIBUTE_NAME, a4 as applyStyles, x as createInPlaceErrorMessageVNode, _ as createRef, H as getRenderer, a3 as getTransitionStyles, O as globalScopeDomApis, E as handleLifecycleEventsForOnMount, Q as isJSX, Z as isRef, z as jsx, W as jsxDEV, U as jsxs, B as observeUnmount, a6 as performTransition, M as renderIsomorphicAsync, L as renderIsomorphicSync, Y as updateDom } from '../../index-DFtvxAXR.js';
2
+ import * as CSS from 'csstype';
3
+ export { CSS };
@@ -0,0 +1,2 @@
1
+ export { C as CLASS_ATTRIBUTE_NAME, D as DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE, p as DEFAULT_TRANSITION_CONFIG, F as Fragment, R as REF_ATTRIBUTE_NAME, X as XLINK_ATTRIBUTE_NAME, a as XMLNS_ATTRIBUTE_NAME, n as applyStyles, c as createInPlaceErrorMessageVNode, l as createRef, g as getRenderer, m as getTransitionStyles, d as globalScopeDomApis, h as handleLifecycleEventsForOnMount, i as isJSX, k as isRef, j as jsx, f as jsxDEV, e as jsxs, o as observeUnmount, q as performTransition, b as renderIsomorphicAsync, r as renderIsomorphicSync, u as updateDom } from '../../dom-BnTS2N9Y.mjs';
2
+ import 'defuss-runtime';
@@ -1,12 +1,17 @@
1
1
  'use strict';
2
2
 
3
- var dom = require('../dom-DuPDCLQ6.cjs');
3
+ var dom = require('../dom-CsRpx_pQ.cjs');
4
4
  require('defuss-runtime');
5
5
 
6
6
 
7
7
 
8
+ exports.CLASS_ATTRIBUTE_NAME = dom.CLASS_ATTRIBUTE_NAME;
9
+ exports.DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE = dom.DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE;
8
10
  exports.DEFAULT_TRANSITION_CONFIG = dom.DEFAULT_TRANSITION_CONFIG;
9
11
  exports.Fragment = dom.Fragment;
12
+ exports.REF_ATTRIBUTE_NAME = dom.REF_ATTRIBUTE_NAME;
13
+ exports.XLINK_ATTRIBUTE_NAME = dom.XLINK_ATTRIBUTE_NAME;
14
+ exports.XMLNS_ATTRIBUTE_NAME = dom.XMLNS_ATTRIBUTE_NAME;
10
15
  exports.applyStyles = dom.applyStyles;
11
16
  exports.createInPlaceErrorMessageVNode = dom.createInPlaceErrorMessageVNode;
12
17
  exports.createRef = dom.createRef;
@@ -1,3 +1,3 @@
1
- export { A as AllHTMLElements, C as CSSProperties, p as Children, _ as DEFAULT_TRANSITION_CONFIG, D as DomAbstractionImpl, F as FontFaceProperties, I as Fragment, G as Globals, K as KeyFrameProperties, N as NodeType, P as ParentElementInput, b as ParentElementInputAsync, s as Props, f as Ref, d as RefUpdateFn, e as RefUpdateRenderFn, c as RefUpdateRenderFnInput, R as RenderInput, q as RenderNodeInput, a as RenderResult, r as RenderResultNode, S as SyncRenderInput, y as SyncRenderResult, X as TransitionConfig, U as TransitionStyles, T as TransitionType, W as TransitionsEasing, V as VAttributes, h as VNode, g as VNodeAttributes, n as VNodeChild, o as VNodeChildren, j as VNodeKey, m as VNodeRef, l as VNodeRefCallback, k as VNodeRefObject, i as VNodeType, Z as applyStyles, t as createInPlaceErrorMessageVNode, Q as createRef, x as getRenderer, Y as getTransitionStyles, E as globalScopeDomApis, w as handleLifecycleEventsForOnMount, H as isJSX, O as isRef, u as jsx, L as jsxDEV, J as jsxs, v as observeUnmount, $ as performTransition, B as renderIsomorphicAsync, z as renderIsomorphicSync, M as updateDom } from '../index-BBk97lC7.js';
1
+ export { A as AllHTMLElements, t as CLASS_ATTRIBUTE_NAME, C as CSSProperties, p as Children, w as DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE, a5 as DEFAULT_TRANSITION_CONFIG, D as DomAbstractionImpl, F as FontFaceProperties, T as Fragment, G as Globals, y as JsxRuntimeHookFn, J as JsxSourceInfo, K as KeyFrameProperties, N as NodeType, P as ParentElementInput, b as ParentElementInputAsync, s as Props, v as REF_ATTRIBUTE_NAME, f as Ref, d as RefUpdateFn, e as RefUpdateRenderFn, c as RefUpdateRenderFnInput, R as RenderInput, q as RenderNodeInput, a as RenderResult, r as RenderResultNode, S as SyncRenderInput, I as SyncRenderResult, a2 as TransitionConfig, a0 as TransitionStyles, $ as TransitionType, a1 as TransitionsEasing, V as VAttributes, h as VNode, g as VNodeAttributes, n as VNodeChild, o as VNodeChildren, j as VNodeKey, m as VNodeRef, l as VNodeRefCallback, k as VNodeRefObject, i as VNodeType, X as XLINK_ATTRIBUTE_NAME, u as XMLNS_ATTRIBUTE_NAME, a4 as applyStyles, x as createInPlaceErrorMessageVNode, _ as createRef, H as getRenderer, a3 as getTransitionStyles, O as globalScopeDomApis, E as handleLifecycleEventsForOnMount, Q as isJSX, Z as isRef, z as jsx, W as jsxDEV, U as jsxs, B as observeUnmount, a6 as performTransition, M as renderIsomorphicAsync, L as renderIsomorphicSync, Y as updateDom } from '../index-DFtvxAXR.js';
2
2
  import * as CSS from 'csstype';
3
3
  export { CSS };
@@ -1,3 +1,3 @@
1
- export { A as AllHTMLElements, C as CSSProperties, p as Children, _ as DEFAULT_TRANSITION_CONFIG, D as DomAbstractionImpl, F as FontFaceProperties, I as Fragment, G as Globals, K as KeyFrameProperties, N as NodeType, P as ParentElementInput, b as ParentElementInputAsync, s as Props, f as Ref, d as RefUpdateFn, e as RefUpdateRenderFn, c as RefUpdateRenderFnInput, R as RenderInput, q as RenderNodeInput, a as RenderResult, r as RenderResultNode, S as SyncRenderInput, y as SyncRenderResult, X as TransitionConfig, U as TransitionStyles, T as TransitionType, W as TransitionsEasing, V as VAttributes, h as VNode, g as VNodeAttributes, n as VNodeChild, o as VNodeChildren, j as VNodeKey, m as VNodeRef, l as VNodeRefCallback, k as VNodeRefObject, i as VNodeType, Z as applyStyles, t as createInPlaceErrorMessageVNode, Q as createRef, x as getRenderer, Y as getTransitionStyles, E as globalScopeDomApis, w as handleLifecycleEventsForOnMount, H as isJSX, O as isRef, u as jsx, L as jsxDEV, J as jsxs, v as observeUnmount, $ as performTransition, B as renderIsomorphicAsync, z as renderIsomorphicSync, M as updateDom } from '../index-BBk97lC7.js';
1
+ export { A as AllHTMLElements, t as CLASS_ATTRIBUTE_NAME, C as CSSProperties, p as Children, w as DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE, a5 as DEFAULT_TRANSITION_CONFIG, D as DomAbstractionImpl, F as FontFaceProperties, T as Fragment, G as Globals, y as JsxRuntimeHookFn, J as JsxSourceInfo, K as KeyFrameProperties, N as NodeType, P as ParentElementInput, b as ParentElementInputAsync, s as Props, v as REF_ATTRIBUTE_NAME, f as Ref, d as RefUpdateFn, e as RefUpdateRenderFn, c as RefUpdateRenderFnInput, R as RenderInput, q as RenderNodeInput, a as RenderResult, r as RenderResultNode, S as SyncRenderInput, I as SyncRenderResult, a2 as TransitionConfig, a0 as TransitionStyles, $ as TransitionType, a1 as TransitionsEasing, V as VAttributes, h as VNode, g as VNodeAttributes, n as VNodeChild, o as VNodeChildren, j as VNodeKey, m as VNodeRef, l as VNodeRefCallback, k as VNodeRefObject, i as VNodeType, X as XLINK_ATTRIBUTE_NAME, u as XMLNS_ATTRIBUTE_NAME, a4 as applyStyles, x as createInPlaceErrorMessageVNode, _ as createRef, H as getRenderer, a3 as getTransitionStyles, O as globalScopeDomApis, E as handleLifecycleEventsForOnMount, Q as isJSX, Z as isRef, z as jsx, W as jsxDEV, U as jsxs, B as observeUnmount, a6 as performTransition, M as renderIsomorphicAsync, L as renderIsomorphicSync, Y as updateDom } from '../index-DFtvxAXR.js';
2
2
  import * as CSS from 'csstype';
3
3
  export { CSS };
@@ -1,2 +1,2 @@
1
- export { D as DEFAULT_TRANSITION_CONFIG, F as Fragment, m as applyStyles, c as createInPlaceErrorMessageVNode, k as createRef, g as getRenderer, l as getTransitionStyles, b as globalScopeDomApis, h as handleLifecycleEventsForOnMount, i as isJSX, f as isRef, j as jsx, e as jsxDEV, d as jsxs, o as observeUnmount, p as performTransition, a as renderIsomorphicAsync, r as renderIsomorphicSync, u as updateDom } from '../dom-BcaFBnxf.mjs';
1
+ export { C as CLASS_ATTRIBUTE_NAME, D as DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE, p as DEFAULT_TRANSITION_CONFIG, F as Fragment, R as REF_ATTRIBUTE_NAME, X as XLINK_ATTRIBUTE_NAME, a as XMLNS_ATTRIBUTE_NAME, n as applyStyles, c as createInPlaceErrorMessageVNode, l as createRef, g as getRenderer, m as getTransitionStyles, d as globalScopeDomApis, h as handleLifecycleEventsForOnMount, i as isJSX, k as isRef, j as jsx, f as jsxDEV, e as jsxs, o as observeUnmount, q as performTransition, b as renderIsomorphicAsync, r as renderIsomorphicSync, u as updateDom } from '../dom-BnTS2N9Y.mjs';
2
2
  import 'defuss-runtime';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var HappyDom = require('happy-dom');
4
- var dom = require('../dom-DuPDCLQ6.cjs');
4
+ var dom = require('../dom-CsRpx_pQ.cjs');
5
5
  var serializeHtml = require('w3c-xmlserializer');
6
6
  require('defuss-runtime');
7
7
 
@@ -72,8 +72,13 @@ const getDocument = (shouldCreateRoot = false, browserGlobals) => {
72
72
  };
73
73
  const renderToString = (el) => serializeHtml(el).replaceAll(' xmlns="http://www.w3.org/1999/xhtml"', "");
74
74
 
75
+ exports.CLASS_ATTRIBUTE_NAME = dom.CLASS_ATTRIBUTE_NAME;
76
+ exports.DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE = dom.DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE;
75
77
  exports.DEFAULT_TRANSITION_CONFIG = dom.DEFAULT_TRANSITION_CONFIG;
76
78
  exports.Fragment = dom.Fragment;
79
+ exports.REF_ATTRIBUTE_NAME = dom.REF_ATTRIBUTE_NAME;
80
+ exports.XLINK_ATTRIBUTE_NAME = dom.XLINK_ATTRIBUTE_NAME;
81
+ exports.XMLNS_ATTRIBUTE_NAME = dom.XMLNS_ATTRIBUTE_NAME;
77
82
  exports.applyStyles = dom.applyStyles;
78
83
  exports.createInPlaceErrorMessageVNode = dom.createInPlaceErrorMessageVNode;
79
84
  exports.createRef = dom.createRef;
@@ -1,5 +1,5 @@
1
- import { G as Globals, R as RenderInput, P as ParentElementInput, a as RenderResult, b as ParentElementInputAsync } from '../index-BBk97lC7.js';
2
- export { A as AllHTMLElements, C as CSSProperties, p as Children, _ as DEFAULT_TRANSITION_CONFIG, D as DomAbstractionImpl, F as FontFaceProperties, I as Fragment, K as KeyFrameProperties, N as NodeType, s as Props, f as Ref, d as RefUpdateFn, e as RefUpdateRenderFn, c as RefUpdateRenderFnInput, q as RenderNodeInput, r as RenderResultNode, S as SyncRenderInput, y as SyncRenderResult, X as TransitionConfig, U as TransitionStyles, T as TransitionType, W as TransitionsEasing, V as VAttributes, h as VNode, g as VNodeAttributes, n as VNodeChild, o as VNodeChildren, j as VNodeKey, m as VNodeRef, l as VNodeRefCallback, k as VNodeRefObject, i as VNodeType, Z as applyStyles, t as createInPlaceErrorMessageVNode, Q as createRef, x as getRenderer, Y as getTransitionStyles, E as globalScopeDomApis, w as handleLifecycleEventsForOnMount, H as isJSX, O as isRef, u as jsx, L as jsxDEV, J as jsxs, v as observeUnmount, $ as performTransition, B as renderIsomorphicAsync, z as renderIsomorphicSync, M as updateDom } from '../index-BBk97lC7.js';
1
+ import { G as Globals, R as RenderInput, P as ParentElementInput, a as RenderResult, b as ParentElementInputAsync } from '../index-DFtvxAXR.js';
2
+ export { A as AllHTMLElements, t as CLASS_ATTRIBUTE_NAME, C as CSSProperties, p as Children, w as DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE, a5 as DEFAULT_TRANSITION_CONFIG, D as DomAbstractionImpl, F as FontFaceProperties, T as Fragment, y as JsxRuntimeHookFn, J as JsxSourceInfo, K as KeyFrameProperties, N as NodeType, s as Props, v as REF_ATTRIBUTE_NAME, f as Ref, d as RefUpdateFn, e as RefUpdateRenderFn, c as RefUpdateRenderFnInput, q as RenderNodeInput, r as RenderResultNode, S as SyncRenderInput, I as SyncRenderResult, a2 as TransitionConfig, a0 as TransitionStyles, $ as TransitionType, a1 as TransitionsEasing, V as VAttributes, h as VNode, g as VNodeAttributes, n as VNodeChild, o as VNodeChildren, j as VNodeKey, m as VNodeRef, l as VNodeRefCallback, k as VNodeRefObject, i as VNodeType, X as XLINK_ATTRIBUTE_NAME, u as XMLNS_ATTRIBUTE_NAME, a4 as applyStyles, x as createInPlaceErrorMessageVNode, _ as createRef, H as getRenderer, a3 as getTransitionStyles, O as globalScopeDomApis, E as handleLifecycleEventsForOnMount, Q as isJSX, Z as isRef, z as jsx, W as jsxDEV, U as jsxs, B as observeUnmount, a6 as performTransition, M as renderIsomorphicAsync, L as renderIsomorphicSync, Y as updateDom } from '../index-DFtvxAXR.js';
3
3
  import * as CSS from 'csstype';
4
4
  export { CSS };
5
5
 
@@ -1,5 +1,5 @@
1
- import { G as Globals, R as RenderInput, P as ParentElementInput, a as RenderResult, b as ParentElementInputAsync } from '../index-BBk97lC7.js';
2
- export { A as AllHTMLElements, C as CSSProperties, p as Children, _ as DEFAULT_TRANSITION_CONFIG, D as DomAbstractionImpl, F as FontFaceProperties, I as Fragment, K as KeyFrameProperties, N as NodeType, s as Props, f as Ref, d as RefUpdateFn, e as RefUpdateRenderFn, c as RefUpdateRenderFnInput, q as RenderNodeInput, r as RenderResultNode, S as SyncRenderInput, y as SyncRenderResult, X as TransitionConfig, U as TransitionStyles, T as TransitionType, W as TransitionsEasing, V as VAttributes, h as VNode, g as VNodeAttributes, n as VNodeChild, o as VNodeChildren, j as VNodeKey, m as VNodeRef, l as VNodeRefCallback, k as VNodeRefObject, i as VNodeType, Z as applyStyles, t as createInPlaceErrorMessageVNode, Q as createRef, x as getRenderer, Y as getTransitionStyles, E as globalScopeDomApis, w as handleLifecycleEventsForOnMount, H as isJSX, O as isRef, u as jsx, L as jsxDEV, J as jsxs, v as observeUnmount, $ as performTransition, B as renderIsomorphicAsync, z as renderIsomorphicSync, M as updateDom } from '../index-BBk97lC7.js';
1
+ import { G as Globals, R as RenderInput, P as ParentElementInput, a as RenderResult, b as ParentElementInputAsync } from '../index-DFtvxAXR.js';
2
+ export { A as AllHTMLElements, t as CLASS_ATTRIBUTE_NAME, C as CSSProperties, p as Children, w as DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE, a5 as DEFAULT_TRANSITION_CONFIG, D as DomAbstractionImpl, F as FontFaceProperties, T as Fragment, y as JsxRuntimeHookFn, J as JsxSourceInfo, K as KeyFrameProperties, N as NodeType, s as Props, v as REF_ATTRIBUTE_NAME, f as Ref, d as RefUpdateFn, e as RefUpdateRenderFn, c as RefUpdateRenderFnInput, q as RenderNodeInput, r as RenderResultNode, S as SyncRenderInput, I as SyncRenderResult, a2 as TransitionConfig, a0 as TransitionStyles, $ as TransitionType, a1 as TransitionsEasing, V as VAttributes, h as VNode, g as VNodeAttributes, n as VNodeChild, o as VNodeChildren, j as VNodeKey, m as VNodeRef, l as VNodeRefCallback, k as VNodeRefObject, i as VNodeType, X as XLINK_ATTRIBUTE_NAME, u as XMLNS_ATTRIBUTE_NAME, a4 as applyStyles, x as createInPlaceErrorMessageVNode, _ as createRef, H as getRenderer, a3 as getTransitionStyles, O as globalScopeDomApis, E as handleLifecycleEventsForOnMount, Q as isJSX, Z as isRef, z as jsx, W as jsxDEV, U as jsxs, B as observeUnmount, a6 as performTransition, M as renderIsomorphicAsync, L as renderIsomorphicSync, Y as updateDom } from '../index-DFtvxAXR.js';
3
3
  import * as CSS from 'csstype';
4
4
  export { CSS };
5
5
 
@@ -1,6 +1,6 @@
1
1
  import * as HappyDom from 'happy-dom';
2
- import { r as renderIsomorphicSync, a as renderIsomorphicAsync, b as globalScopeDomApis } from '../dom-BcaFBnxf.mjs';
3
- export { D as DEFAULT_TRANSITION_CONFIG, F as Fragment, m as applyStyles, c as createInPlaceErrorMessageVNode, k as createRef, g as getRenderer, l as getTransitionStyles, h as handleLifecycleEventsForOnMount, i as isJSX, f as isRef, j as jsx, e as jsxDEV, d as jsxs, o as observeUnmount, p as performTransition, u as updateDom } from '../dom-BcaFBnxf.mjs';
2
+ import { r as renderIsomorphicSync, b as renderIsomorphicAsync, d as globalScopeDomApis } from '../dom-BnTS2N9Y.mjs';
3
+ export { C as CLASS_ATTRIBUTE_NAME, D as DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE, p as DEFAULT_TRANSITION_CONFIG, F as Fragment, R as REF_ATTRIBUTE_NAME, X as XLINK_ATTRIBUTE_NAME, a as XMLNS_ATTRIBUTE_NAME, n as applyStyles, c as createInPlaceErrorMessageVNode, l as createRef, g as getRenderer, m as getTransitionStyles, h as handleLifecycleEventsForOnMount, i as isJSX, k as isRef, j as jsx, f as jsxDEV, e as jsxs, o as observeUnmount, q as performTransition, u as updateDom } from '../dom-BnTS2N9Y.mjs';
4
4
  import serializeHtml from 'w3c-xmlserializer';
5
5
  import 'defuss-runtime';
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "defuss",
3
- "version": "2.1.0",
3
+ "version": "2.1.4",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -11,12 +11,41 @@
11
11
  "jsx",
12
12
  "render",
13
13
  "ssr",
14
- "isomorphic"
14
+ "ssg",
15
+ "isomorphic",
16
+ "jquery-like",
17
+ "defuss",
18
+ "react-like",
19
+ "lightweight",
20
+ "typescript",
21
+ "framework",
22
+ "library",
23
+ "dom-router",
24
+ "spa",
25
+ "csr",
26
+ "store",
27
+ "state",
28
+ "component",
29
+ "components",
30
+ "ui",
31
+ "user-interface",
32
+ "frontend",
33
+ "front-end",
34
+ "web-storage",
35
+ "async"
15
36
  ],
16
37
  "repository": {
17
38
  "url": "git+https://github.com/kyr0/defuss.git",
18
39
  "type": "git"
19
40
  },
41
+ "scripts": {
42
+ "clean": "rm -rf ./coverage && rm -rf ./node_modules/.pnpm && rm -rf ./node_modules/.vite",
43
+ "pretest": "pnpm run build",
44
+ "test:watch": "vitest --coverage",
45
+ "test": "vitest run --coverage",
46
+ "prebuild": "pnpm run clean",
47
+ "build": "pkgroll"
48
+ },
20
49
  "author": "Aron Homberg <info@aron-homberg.de>",
21
50
  "sideEffects": false,
22
51
  "exports": {
@@ -62,22 +91,19 @@
62
91
  },
63
92
  "./jsx-dev-runtime": {
64
93
  "require": {
65
- "types": "./dist/render/index.d.ts",
66
- "default": "./dist/render/index.cjs"
94
+ "types": "./dist/render/dev/index.d.ts",
95
+ "default": "./dist/render/dev/index.cjs"
67
96
  },
68
97
  "import": {
69
- "types": "./dist/render/index.d.ts",
70
- "default": "./dist/render/index.mjs"
98
+ "types": "./dist/render/dev/index.d.ts",
99
+ "default": "./dist/render/dev/index.mjs"
71
100
  }
72
101
  }
73
102
  },
74
103
  "main": "./dist/index.cjs",
75
104
  "module": "./dist/index.mjs",
76
105
  "types": "./dist/index.d.cts",
77
- "files": [
78
- "dist",
79
- "assets"
80
- ],
106
+ "files": ["dist", "assets"],
81
107
  "devDependencies": {
82
108
  "@types/node": "^22.10.2",
83
109
  "@vitest/coverage-v8": "^3.1.3",
@@ -88,18 +114,10 @@
88
114
  "jsdom": "^26.1.0"
89
115
  },
90
116
  "dependencies": {
117
+ "defuss-runtime": "workspace:*",
91
118
  "@types/w3c-xmlserializer": "^2.0.4",
92
119
  "csstype": "^3.1.3",
93
120
  "happy-dom": "^15.11.7",
94
- "w3c-xmlserializer": "^5.0.0",
95
- "defuss-runtime": "1.2.0"
96
- },
97
- "scripts": {
98
- "clean": "rm -rf ./coverage && rm -rf ./node_modules/.pnpm && rm -rf ./node_modules/.vite",
99
- "pretest": "pnpm run build",
100
- "test:watch": "vitest --coverage",
101
- "test": "vitest run --coverage",
102
- "prebuild": "pnpm run clean",
103
- "build": "pkgroll"
121
+ "w3c-xmlserializer": "^5.0.0"
104
122
  }
105
- }
123
+ }