defuss 3.4.7 → 3.4.9

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.
package/dist/index.cjs CHANGED
@@ -1,11 +1,85 @@
1
1
  'use strict';
2
2
 
3
- var dom = require('./dom-DIfHWdHZ.cjs');
4
- var mount = require('./mount-C9aDnSHs.cjs');
3
+ var dom = require('./dom-D--m76Im.cjs');
4
+ var mount = require('./mount-CY0wDye_.cjs');
5
5
  require('defuss-runtime');
6
6
 
7
7
  const inDevMode = typeof process !== "undefined" && process.env ? process.env.NODE_ENV !== "production" : false;
8
8
 
9
+ function computed(stores, fn) {
10
+ const storeList = Array.isArray(stores) ? stores : [stores];
11
+ let value = fn(...storeList.map((s) => s.value));
12
+ const listeners = [];
13
+ const recalculate = () => {
14
+ const oldValue = value;
15
+ value = fn(...storeList.map((s) => s.value));
16
+ if (value !== oldValue) {
17
+ listeners.forEach((l) => l(value, oldValue));
18
+ }
19
+ };
20
+ storeList.map((s) => s.subscribe(recalculate));
21
+ return {
22
+ get value() {
23
+ return value;
24
+ },
25
+ get: () => value,
26
+ set: () => {
27
+ throw new Error("Computed stores are read-only");
28
+ },
29
+ getRaw: () => value,
30
+ setRaw: () => {
31
+ throw new Error("Computed stores are read-only");
32
+ },
33
+ reset: () => {
34
+ },
35
+ subscribe: (listener) => {
36
+ listeners.push(listener);
37
+ return () => {
38
+ const idx = listeners.indexOf(listener);
39
+ if (idx >= 0) listeners.splice(idx, 1);
40
+ };
41
+ },
42
+ persist: () => {
43
+ },
44
+ restore: () => {
45
+ }
46
+ };
47
+ }
48
+
49
+ const Reactive = ({
50
+ store,
51
+ render,
52
+ cleanup,
53
+ tag = "div",
54
+ className,
55
+ ref: externalRef,
56
+ ...props
57
+ }) => {
58
+ const reactiveRef = externalRef ?? dom.createRef();
59
+ let cleanupFn;
60
+ let isUnmounted = false;
61
+ const attrs = {
62
+ ref: reactiveRef
63
+ };
64
+ if (className) {
65
+ attrs.class = className;
66
+ }
67
+ Object.assign(attrs, props);
68
+ attrs.onMount = () => {
69
+ cleanupFn = dom.reactive({ store, render, cleanup }, reactiveRef);
70
+ };
71
+ attrs.onUnmount = () => {
72
+ if (isUnmounted) return;
73
+ isUnmounted = true;
74
+ cleanupFn?.();
75
+ };
76
+ return {
77
+ type: tag,
78
+ attributes: attrs,
79
+ children: []
80
+ };
81
+ };
82
+
9
83
  const VARIABLE_REGEX = /{([^}]*)}/g;
10
84
  const DOUBLE_BRACE_REGEX = /\{\{([^}]*)\}\}/g;
11
85
  const interpolate = (template, replacements) => {
@@ -764,6 +838,7 @@ exports.parseEventPropName = dom.parseEventPropName;
764
838
  exports.performTransition = dom.performTransition;
765
839
  exports.processAllFormElements = dom.processAllFormElements;
766
840
  exports.queueCallback = dom.queueCallback;
841
+ exports.reactive = dom.reactive;
767
842
  exports.registerComponent = dom.registerComponent;
768
843
  exports.registerDelegatedEvent = dom.registerDelegatedEvent;
769
844
  exports.removeDelegatedEvent = dom.removeDelegatedEvent;
@@ -785,6 +860,7 @@ exports.webstorage = dom.webstorage;
785
860
  exports.mount = mount.mount;
786
861
  exports.unmount = mount.unmount;
787
862
  exports.Async = Async;
863
+ exports.Reactive = Reactive;
788
864
  exports.Redirect = Redirect;
789
865
  exports.Route = Route;
790
866
  exports.Router = Router;
@@ -794,6 +870,7 @@ exports.Suspense = Suspense;
794
870
  exports.T = T;
795
871
  exports.Trans = Trans;
796
872
  exports.changeLanguage = changeLanguage;
873
+ exports.computed = computed;
797
874
  exports.createI18n = createI18n;
798
875
  exports.createTrans = createTrans;
799
876
  exports.getLanguage = getLanguage;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { ao as PersistenceProviderType, ap as PersistenceProviderOptions, aq as PersistenceProviderImpl, W as VNode, X as VNodeAttributes, N as NodeType, R as RenderInput, G as Globals, t as Props, v as Ref, i as DOMElement, Y as VNodeChild, F as FC, T as TransitionConfig, c as AsyncDefussChild } from './index-CDeQTFKH.js';
2
- export { ar as $, A as AllHTMLElements, as as AnyEventHandler, d as AsyncFC, e as AsyncFunctionComponent, C as CLASS_ATTRIBUTE_NAME, f as CSSProperties, at as CallChainImpl, g as Children, D as DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE, h as DEFAULT_TRANSITION_CONFIG, au as DOMPropValue, j as DefussChild, k as DefussChildren, l as DefussClassValue, m as DefussKey, av as Dequery, aw as DequeryOptions, ax as DequerySyncMethodReturnType, ay as Dimensions, n as DomAbstractionImpl, az as ElementCreationOptions, E as ElementProps, aA as EqualsFn, aB as EventMapFor, aC as EventMapForAny, o as FontFaceProperties, aD as FormFieldValue, aE as FormKeyValues, p as Fragment, q as FunctionComponent, J as JsxRuntimeHookFn, r as JsxSourceInfo, K as KeyFrameProperties, aF as Listener, M as Maybe, aG as MemoryStorage, aH as MiddlewareFn, s as MountHandler, O as OneOrMany, b as ParentElementInput, P as ParentElementInputAsync, aI as Position, u as REF_ATTRIBUTE_NAME, w as RefUpdateFn, x as RefUpdateRenderFn, y as RefUpdateRenderFnInput, z as RenderNodeInput, a as RenderResult, B as RenderResultNode, aJ as Store, aK as StoreOptions, S as SyncRenderInput, H as SyncRenderResult, aL as TargetOf, I as TransitionStyles, L as TransitionType, Q as TransitionsEasing, aM as UnionToIntersection, U as UnmountHandler, V as VAttributes, Z as VNodeChildren, _ as VNodeKey, $ as VNodeRef, a0 as VNodeRefCallback, a1 as VNodeRefObject, a2 as VNodeType, aN as WebStorage, a3 as XLINK_ATTRIBUTE_NAME, a4 as XMLNS_ATTRIBUTE_NAME, a5 as applyStyles, a6 as createInPlaceErrorMessageVNode, a7 as createRef, aO as createStore, aP as deepEquals, aQ as dequery, aR as emptyImpl, aS as getAllFormValues, aT as getDefaultDequeryOptions, a8 as getRenderer, a9 as getTransitionStyles, aa as globalScopeDomApis, ab as handleLifecycleEventsForOnMount, aU as isDequery, aV as isDequeryOptionsObject, ac as isJSX, ad as isRef, ae as jsx, af as jsxDEV, ag as jsxs, ah as nsMap, ai as observeUnmount, aj as performTransition, aW as render, ak as renderInto, al as renderIsomorphicAsync, am as renderIsomorphicSync, aX as scrollHelper, aY as shallowEquals, an as updateDom } from './index-CDeQTFKH.js';
1
+ import { W as PersistenceProviderType, V as PersistenceProviderOptions, U as PersistenceProviderImpl, aj as VNode, ak as VNodeAttributes, Q as NodeType, a3 as RenderInput, H as Globals, a7 as Store, _ as Ref, F as FC, t as ElementProps, Y as Props, i as DOMElement, al as VNodeChild, ac as TransitionConfig, b as AsyncDefussChild } from './index-CeFAHwJi.js';
2
+ export { $, A as AllHTMLElements, a as AnyEventHandler, c as AsyncFC, d as AsyncFunctionComponent, C as CLASS_ATTRIBUTE_NAME, e as CSSProperties, f as CallChainImpl, g as Children, D as DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE, h as DEFAULT_TRANSITION_CONFIG, j as DOMPropValue, k as DefussChild, l as DefussChildren, m as DefussClassValue, n as DefussKey, o as Dequery, p as DequeryOptions, q as DequerySyncMethodReturnType, r as Dimensions, s as DomAbstractionImpl, E as ElementCreationOptions, u as EqualsFn, v as EventMapFor, w as EventMapForAny, x as FontFaceProperties, y as FormFieldValue, z as FormKeyValues, B as Fragment, G as FunctionComponent, J as JsxRuntimeHookFn, I as JsxSourceInfo, K as KeyFrameProperties, L as Listener, M as Maybe, N as MemoryStorage, O as MiddlewareFn, P as MountHandler, R as OneOrMany, S as ParentElementInput, T as ParentElementInputAsync, X as Position, Z as REF_ATTRIBUTE_NAME, a0 as RefUpdateFn, a1 as RefUpdateRenderFn, a2 as RefUpdateRenderFnInput, a4 as RenderNodeInput, a5 as RenderResult, a6 as RenderResultNode, a8 as StoreOptions, a9 as SyncRenderInput, aa as SyncRenderResult, ab as TargetOf, ad as TransitionStyles, ae as TransitionType, af as TransitionsEasing, ag as UnionToIntersection, ah as UnmountHandler, ai as VAttributes, am as VNodeChildren, an as VNodeKey, ao as VNodeRef, ap as VNodeRefCallback, aq as VNodeRefObject, ar as VNodeType, as as WebStorage, at as XLINK_ATTRIBUTE_NAME, au as XMLNS_ATTRIBUTE_NAME, av as applyStyles, aw as createInPlaceErrorMessageVNode, ax as createRef, ay as createStore, az as deepEquals, aA as dequery, aB as emptyImpl, aC as getAllFormValues, aD as getDefaultDequeryOptions, aE as getRenderer, aF as getTransitionStyles, aG as globalScopeDomApis, aH as handleLifecycleEventsForOnMount, aI as isDequery, aJ as isDequeryOptionsObject, aK as isJSX, aL as isRef, aM as jsx, aN as jsxDEV, aO as jsxs, aP as nsMap, aQ as observeUnmount, aR as performTransition, aS as render, aT as renderInto, aU as renderIsomorphicAsync, aV as renderIsomorphicSync, aW as scrollHelper, aX as shallowEquals, aY as updateDom } from './index-CeFAHwJi.js';
3
3
  export { CAPTURE_ONLY_EVENTS, ComponentInstance, DelegatedEventOptions, DelegatedPhase, ParsedEventProp, clearDelegatedEvents, clearDelegatedEventsDeep, getComponentInstance, getRegisteredEventKeys, getRegisteredEventTypes, isComponentRoot, mount, parseEventPropName, registerComponent, registerDelegatedEvent, removeDelegatedEvent, removeDelegatedEventByKey, unmount, unregisterComponent } from './render/index.js';
4
4
  import 'csstype';
5
5
 
@@ -69,6 +69,91 @@ declare function htmlStringToVNodes(html: string, Parser: typeof DOMParser): Arr
69
69
 
70
70
  declare const queueCallback: <T extends any[]>(cb: (...args: T) => void) => (...args: T) => void;
71
71
 
72
+ /**
73
+ * Creates a computed (derived) store from other stores.
74
+ * The computed value is recalculated when any dependency store changes.
75
+ *
76
+ * @example
77
+ * ```ts
78
+ * const countStore = createStore({ count: 0 });
79
+ * const doubled = computed(countStore, (v) => v.count * 2);
80
+ *
81
+ * // Or with multiple stores:
82
+ * const a = createStore({ value: 1 });
83
+ * const b = createStore({ value: 2 });
84
+ * const sum = computed([a, b], (av, bv) => av.value + bv.value);
85
+ * ```
86
+ */
87
+ declare function computed<T>(stores: Store<any> | Store<any>[], fn: (...values: any[]) => T): Store<T>;
88
+
89
+ /**
90
+ * Configuration for reactive rendering.
91
+ */
92
+ interface ReactiveConfig {
93
+ /** One or more stores to subscribe to. */
94
+ store: Store<any> | Store<any>[];
95
+ /** Render function that returns JSX to render into the target. */
96
+ render: () => JSX.Element;
97
+ /** Optional cleanup function called on unmount. */
98
+ cleanup?: () => void;
99
+ }
100
+ /**
101
+ * Core reactive utility - subscribes to store(s) and re-renders JSX on changes.
102
+ * Returns a cleanup function to unsubscribe all stores and call optional cleanup.
103
+ *
104
+ * @example
105
+ * ```ts
106
+ * const store = createStore({ count: 0 });
107
+ * const ref = createRef<HTMLDivElement>();
108
+ *
109
+ * // In onMount:
110
+ * const cleanup = reactive({
111
+ * store,
112
+ * render: () => <div>Count: {store.value.count}</div>,
113
+ * cleanup: () => console.log("unmounted")
114
+ * }, ref);
115
+ *
116
+ * // Later, to clean up:
117
+ * cleanup();
118
+ * ```
119
+ */
120
+ declare function reactive(config: ReactiveConfig, target: Ref<HTMLElement> | HTMLElement): () => void;
121
+
122
+ /**
123
+ * Props for the Reactive component.
124
+ */
125
+ interface ReactiveProps extends ElementProps<HTMLDivElement> {
126
+ /** One or more stores to subscribe to. */
127
+ store: ReactiveConfig["store"];
128
+ /** Render function that returns JSX to render into the component. */
129
+ render: ReactiveConfig["render"];
130
+ /** Optional cleanup function called on unmount. */
131
+ cleanup?: ReactiveConfig["cleanup"];
132
+ /** Wrapper element tag name. Default: "div". */
133
+ tag?: string;
134
+ }
135
+ /**
136
+ * A component that automatically re-renders when its store(s) change.
137
+ * Handles subscription setup on mount and cleanup on unmount.
138
+ *
139
+ * @example
140
+ * ```tsx
141
+ * import { Reactive, createStore } from "defuss";
142
+ *
143
+ * const store = createStore({ count: 0 });
144
+ *
145
+ * <Reactive store={store} render={() => (
146
+ * <div>
147
+ * <p>Count: {store.value.count}</p>
148
+ * <button onClick={() => store.set({ count: store.value.count + 1 })}>
149
+ * Increment
150
+ * </button>
151
+ * </div>
152
+ * )}/>
153
+ * ```
154
+ */
155
+ declare const Reactive: FC<ReactiveProps>;
156
+
72
157
  type Resolve<T> = T extends infer U ? U : never;
73
158
  type TranslationKeys<T, Prefix extends string = ""> = Resolve<{
74
159
  [K in keyof T]: T[K] extends Record<string, unknown> ? TranslationKeys<T[K], `${Prefix}${K & string}.`> : `${Prefix}${K & string}`;
@@ -485,5 +570,5 @@ declare const Suspense: ({ fallback, ref, children, class: _class, className, id
485
570
  children: (VNode<VNodeAttributes> | VNode<VNodeAttributes> | Promise<VNode<VNodeAttributes> | null>)[];
486
571
  };
487
572
 
488
- export { Async, AsyncDefussChild, DOMElement, FC, Globals, NodeType, PersistenceProviderImpl, PersistenceProviderOptions, PersistenceProviderType, Props, Redirect, Ref, RenderInput, Route, Router, RouterSlot, RouterSlotId, Suspense, T, Trans, TransitionConfig, VNode, VNodeAttributes, VNodeChild, addElementEvent, areDomNodesEqual, changeLanguage, checkElementVisibility, clearElementEvents, createI18n, createTrans, domNodeToVNode, getEventMap, getLanguage, getMimeType, getRouterState, htmlStringToVNodes, i18n, inDevMode, isHTML, isMarkup, isSVG, loadLanguage, matchRouteRegistrations, parseDOM, processAllFormElements, queueCallback, removeElementEvent, renderMarkup, replaceDomWithVdom, setupRouter, t, tokenizePath, updateDomWithVdom, waitForDOM, webstorage };
489
- export type { AsyncProps, AsyncState, AsyncStateRef, BeforeLeaveHookFn, I18nStore, LeaveHookFn, MatchRouteRegistrationsOpts, OnHandleRouteChangeFn, OnLanguageChangeListener, OnRouteChangeFn, RedirectProps, Replacements, Resolve, RouteComponentProps, RouteContext, RouteHandler, RouteParams, RouteProps, RouteRegistration, RouteRequest, RouterConfig, RouterSlotProps, RouterStrategy, TokenizedPath, TransProps, TransRef, TranslationKeys, TranslationObject, Translations, ValidChild };
573
+ export { Async, AsyncDefussChild, DOMElement, ElementProps, FC, Globals, NodeType, PersistenceProviderImpl, PersistenceProviderOptions, PersistenceProviderType, Props, Reactive, Redirect, Ref, RenderInput, Route, Router, RouterSlot, RouterSlotId, Store, Suspense, T, Trans, TransitionConfig, VNode, VNodeAttributes, VNodeChild, addElementEvent, areDomNodesEqual, changeLanguage, checkElementVisibility, clearElementEvents, computed, createI18n, createTrans, domNodeToVNode, getEventMap, getLanguage, getMimeType, getRouterState, htmlStringToVNodes, i18n, inDevMode, isHTML, isMarkup, isSVG, loadLanguage, matchRouteRegistrations, parseDOM, processAllFormElements, queueCallback, reactive, removeElementEvent, renderMarkup, replaceDomWithVdom, setupRouter, t, tokenizePath, updateDomWithVdom, waitForDOM, webstorage };
574
+ export type { AsyncProps, AsyncState, AsyncStateRef, BeforeLeaveHookFn, I18nStore, LeaveHookFn, MatchRouteRegistrationsOpts, OnHandleRouteChangeFn, OnLanguageChangeListener, OnRouteChangeFn, ReactiveConfig, ReactiveProps, RedirectProps, Replacements, Resolve, RouteComponentProps, RouteContext, RouteHandler, RouteParams, RouteProps, RouteRegistration, RouteRequest, RouterConfig, RouterSlotProps, RouterStrategy, TokenizedPath, TransProps, TransRef, TranslationKeys, TranslationObject, Translations, ValidChild };
package/dist/index.mjs CHANGED
@@ -1,10 +1,84 @@
1
- import { M as createStore, s as jsx, h as createRef, $, r as isRef } from './dom-DhkFpQzW.mjs';
2
- export { C as CAPTURE_ONLY_EVENTS, a as CLASS_ATTRIBUTE_NAME, N as CallChainImpl, D as DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE, b as DEFAULT_TRANSITION_CONFIG, F as Fragment, R as REF_ATTRIBUTE_NAME, X as XLINK_ATTRIBUTE_NAME, c as XMLNS_ATTRIBUTE_NAME, O as addElementEvent, d as applyStyles, P as areDomNodesEqual, Q as checkElementVisibility, e as clearDelegatedEvents, f as clearDelegatedEventsDeep, S as clearElementEvents, g as createInPlaceErrorMessageVNode, T as deepEquals, U as dequery, V as domNodeToVNode, W as emptyImpl, Y as getAllFormValues, i as getComponentInstance, Z as getDefaultDequeryOptions, _ as getEventMap, a0 as getMimeType, j as getRegisteredEventKeys, k as getRegisteredEventTypes, l as getRenderer, m as getTransitionStyles, n as globalScopeDomApis, o as handleLifecycleEventsForOnMount, a1 as htmlStringToVNodes, p as isComponentRoot, a2 as isDequery, a3 as isDequeryOptionsObject, a4 as isHTML, q as isJSX, a5 as isMarkup, a6 as isSVG, t as jsxDEV, u as jsxs, v as nsMap, w as observeUnmount, a7 as parseDOM, x as parseEventPropName, y as performTransition, a8 as processAllFormElements, a9 as queueCallback, z as registerComponent, A as registerDelegatedEvent, B as removeDelegatedEvent, E as removeDelegatedEventByKey, aa as removeElementEvent, G as render, H as renderInto, I as renderIsomorphicAsync, J as renderIsomorphicSync, ab as renderMarkup, ac as replaceDomWithVdom, ad as scrollHelper, ae as shallowEquals, K as unregisterComponent, L as updateDom, af as updateDomWithVdom, ag as waitForDOM, ah as webstorage } from './dom-DhkFpQzW.mjs';
3
- export { m as mount, u as unmount } from './mount-0BKlcRFL.mjs';
1
+ import { m as createRef, a0 as reactive, n as createStore, P as jsx, $, N as isRef } from './dom-_OdBXxSy.mjs';
2
+ export { C as CAPTURE_ONLY_EVENTS, a as CLASS_ATTRIBUTE_NAME, b as CallChainImpl, D as DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE, c as DEFAULT_TRANSITION_CONFIG, F as Fragment, R as REF_ATTRIBUTE_NAME, X as XLINK_ATTRIBUTE_NAME, d as XMLNS_ATTRIBUTE_NAME, e as addElementEvent, f as applyStyles, g as areDomNodesEqual, h as checkElementVisibility, i as clearDelegatedEvents, j as clearDelegatedEventsDeep, k as clearElementEvents, l as createInPlaceErrorMessageVNode, o as deepEquals, p as dequery, q as domNodeToVNode, r as emptyImpl, s as getAllFormValues, t as getComponentInstance, u as getDefaultDequeryOptions, v as getEventMap, w as getMimeType, x as getRegisteredEventKeys, y as getRegisteredEventTypes, z as getRenderer, A as getTransitionStyles, B as globalScopeDomApis, E as handleLifecycleEventsForOnMount, G as htmlStringToVNodes, H as isComponentRoot, I as isDequery, J as isDequeryOptionsObject, K as isHTML, L as isJSX, M as isMarkup, O as isSVG, Q as jsxDEV, S as jsxs, T as nsMap, U as observeUnmount, V as parseDOM, W as parseEventPropName, Y as performTransition, Z as processAllFormElements, _ as queueCallback, a1 as registerComponent, a2 as registerDelegatedEvent, a3 as removeDelegatedEvent, a4 as removeDelegatedEventByKey, a5 as removeElementEvent, a6 as render, a7 as renderInto, a8 as renderIsomorphicAsync, a9 as renderIsomorphicSync, aa as renderMarkup, ab as replaceDomWithVdom, ac as scrollHelper, ad as shallowEquals, ae as unregisterComponent, af as updateDom, ag as updateDomWithVdom, ah as waitForDOM, ai as webstorage } from './dom-_OdBXxSy.mjs';
3
+ export { m as mount, u as unmount } from './mount-BcFWqQDc.mjs';
4
4
  import 'defuss-runtime';
5
5
 
6
6
  const inDevMode = typeof process !== "undefined" && process.env ? process.env.NODE_ENV !== "production" : false;
7
7
 
8
+ function computed(stores, fn) {
9
+ const storeList = Array.isArray(stores) ? stores : [stores];
10
+ let value = fn(...storeList.map((s) => s.value));
11
+ const listeners = [];
12
+ const recalculate = () => {
13
+ const oldValue = value;
14
+ value = fn(...storeList.map((s) => s.value));
15
+ if (value !== oldValue) {
16
+ listeners.forEach((l) => l(value, oldValue));
17
+ }
18
+ };
19
+ storeList.map((s) => s.subscribe(recalculate));
20
+ return {
21
+ get value() {
22
+ return value;
23
+ },
24
+ get: () => value,
25
+ set: () => {
26
+ throw new Error("Computed stores are read-only");
27
+ },
28
+ getRaw: () => value,
29
+ setRaw: () => {
30
+ throw new Error("Computed stores are read-only");
31
+ },
32
+ reset: () => {
33
+ },
34
+ subscribe: (listener) => {
35
+ listeners.push(listener);
36
+ return () => {
37
+ const idx = listeners.indexOf(listener);
38
+ if (idx >= 0) listeners.splice(idx, 1);
39
+ };
40
+ },
41
+ persist: () => {
42
+ },
43
+ restore: () => {
44
+ }
45
+ };
46
+ }
47
+
48
+ const Reactive = ({
49
+ store,
50
+ render,
51
+ cleanup,
52
+ tag = "div",
53
+ className,
54
+ ref: externalRef,
55
+ ...props
56
+ }) => {
57
+ const reactiveRef = externalRef ?? createRef();
58
+ let cleanupFn;
59
+ let isUnmounted = false;
60
+ const attrs = {
61
+ ref: reactiveRef
62
+ };
63
+ if (className) {
64
+ attrs.class = className;
65
+ }
66
+ Object.assign(attrs, props);
67
+ attrs.onMount = () => {
68
+ cleanupFn = reactive({ store, render, cleanup }, reactiveRef);
69
+ };
70
+ attrs.onUnmount = () => {
71
+ if (isUnmounted) return;
72
+ isUnmounted = true;
73
+ cleanupFn?.();
74
+ };
75
+ return {
76
+ type: tag,
77
+ attributes: attrs,
78
+ children: []
79
+ };
80
+ };
81
+
8
82
  const VARIABLE_REGEX = /{([^}]*)}/g;
9
83
  const DOUBLE_BRACE_REGEX = /\{\{([^}]*)\}\}/g;
10
84
  const interpolate = (template, replacements) => {
@@ -709,4 +783,4 @@ const Async = ({
709
783
  };
710
784
  const Suspense = Async;
711
785
 
712
- export { $, Async, Redirect, Route, Router, RouterSlot, RouterSlotId, Suspense, T, Trans, changeLanguage, createI18n, createRef, createStore, createTrans, getLanguage, getRouterState, i18n, inDevMode, isRef, jsx, loadLanguage, matchRouteRegistrations, setupRouter, t, tokenizePath };
786
+ export { $, Async, Reactive, Redirect, Route, Router, RouterSlot, RouterSlotId, Suspense, T, Trans, changeLanguage, computed, createI18n, createRef, createStore, createTrans, getLanguage, getRouterState, i18n, inDevMode, isRef, jsx, loadLanguage, matchRouteRegistrations, reactive, setupRouter, t, tokenizePath };
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var dom = require('./dom-DIfHWdHZ.cjs');
3
+ var dom = require('./dom-BMM8gF0l.cjs');
4
4
 
5
5
  function mount(container, Component, initialProps) {
6
6
  while (container.firstChild) {
@@ -1,4 +1,4 @@
1
- import { J as renderIsomorphicSync, z as registerComponent, w as observeUnmount, K as unregisterComponent } from './dom-DhkFpQzW.mjs';
1
+ import { a9 as renderIsomorphicSync, a1 as registerComponent, U as observeUnmount, ae as unregisterComponent } from './dom-_OdBXxSy.mjs';
2
2
 
3
3
  function mount(container, Component, initialProps) {
4
4
  while (container.firstChild) {
@@ -0,0 +1,26 @@
1
+ import { a9 as renderIsomorphicSync, a1 as registerComponent, U as observeUnmount, ae as unregisterComponent } from './dom-nGC6cuXP.mjs';
2
+
3
+ function mount(container, Component, initialProps) {
4
+ while (container.firstChild) {
5
+ container.removeChild(container.firstChild);
6
+ }
7
+ const vnode = Component(initialProps);
8
+ renderIsomorphicSync(vnode, container, globalThis);
9
+ registerComponent(
10
+ container,
11
+ Component,
12
+ { ...initialProps }
13
+ );
14
+ if (container.parentNode) {
15
+ observeUnmount(container, () => unregisterComponent(container));
16
+ }
17
+ return container;
18
+ }
19
+ function unmount(container) {
20
+ unregisterComponent(container);
21
+ while (container.firstChild) {
22
+ container.removeChild(container.firstChild);
23
+ }
24
+ }
25
+
26
+ export { mount as m, unmount as u };
@@ -0,0 +1,29 @@
1
+ 'use strict';
2
+
3
+ var dom = require('./dom-D--m76Im.cjs');
4
+
5
+ function mount(container, Component, initialProps) {
6
+ while (container.firstChild) {
7
+ container.removeChild(container.firstChild);
8
+ }
9
+ const vnode = Component(initialProps);
10
+ dom.renderIsomorphicSync(vnode, container, globalThis);
11
+ dom.registerComponent(
12
+ container,
13
+ Component,
14
+ { ...initialProps }
15
+ );
16
+ if (container.parentNode) {
17
+ dom.observeUnmount(container, () => dom.unregisterComponent(container));
18
+ }
19
+ return container;
20
+ }
21
+ function unmount(container) {
22
+ dom.unregisterComponent(container);
23
+ while (container.firstChild) {
24
+ container.removeChild(container.firstChild);
25
+ }
26
+ }
27
+
28
+ exports.mount = mount;
29
+ exports.unmount = unmount;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var dom = require('../dom-DIfHWdHZ.cjs');
4
- var mount = require('../mount-C9aDnSHs.cjs');
3
+ var dom = require('../dom-D--m76Im.cjs');
4
+ var mount = require('../mount-CY0wDye_.cjs');
5
5
  require('defuss-runtime');
6
6
 
7
7
  const renderSync = (virtualNode, parentDomElement = document.documentElement) => {
@@ -1,5 +1,5 @@
1
- import { W as VNode, R as RenderInput, P as ParentElementInputAsync, a as RenderResult, b as ParentElementInput } from '../index-CDeQTFKH.js';
2
- export { A as AllHTMLElements, c as AsyncDefussChild, d as AsyncFC, e as AsyncFunctionComponent, C as CLASS_ATTRIBUTE_NAME, f as CSSProperties, g as Children, D as DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE, h as DEFAULT_TRANSITION_CONFIG, i as DOMElement, j as DefussChild, k as DefussChildren, l as DefussClassValue, m as DefussKey, n as DomAbstractionImpl, E as ElementProps, F as FC, o as FontFaceProperties, p as Fragment, q as FunctionComponent, G as Globals, J as JsxRuntimeHookFn, r as JsxSourceInfo, K as KeyFrameProperties, M as Maybe, s as MountHandler, N as NodeType, O as OneOrMany, t as Props, u as REF_ATTRIBUTE_NAME, v as Ref, w as RefUpdateFn, x as RefUpdateRenderFn, y as RefUpdateRenderFnInput, z as RenderNodeInput, B as RenderResultNode, S as SyncRenderInput, H as SyncRenderResult, T as TransitionConfig, I as TransitionStyles, L as TransitionType, Q as TransitionsEasing, U as UnmountHandler, V as VAttributes, X as VNodeAttributes, Y as VNodeChild, Z as VNodeChildren, _ as VNodeKey, $ as VNodeRef, a0 as VNodeRefCallback, a1 as VNodeRefObject, a2 as VNodeType, a3 as XLINK_ATTRIBUTE_NAME, a4 as XMLNS_ATTRIBUTE_NAME, a5 as applyStyles, a6 as createInPlaceErrorMessageVNode, a7 as createRef, a8 as getRenderer, a9 as getTransitionStyles, aa as globalScopeDomApis, ab as handleLifecycleEventsForOnMount, ac as isJSX, ad as isRef, ae as jsx, af as jsxDEV, ag as jsxs, ah as nsMap, ai as observeUnmount, aj as performTransition, ak as renderInto, al as renderIsomorphicAsync, am as renderIsomorphicSync, an as updateDom } from '../index-CDeQTFKH.js';
1
+ import { aj as VNode, a3 as RenderInput, T as ParentElementInputAsync, a5 as RenderResult, S as ParentElementInput } from '../index-CeFAHwJi.js';
2
+ export { A as AllHTMLElements, b as AsyncDefussChild, c as AsyncFC, d as AsyncFunctionComponent, C as CLASS_ATTRIBUTE_NAME, e as CSSProperties, g as Children, D as DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE, h as DEFAULT_TRANSITION_CONFIG, i as DOMElement, k as DefussChild, l as DefussChildren, m as DefussClassValue, n as DefussKey, s as DomAbstractionImpl, t as ElementProps, F as FC, x as FontFaceProperties, B as Fragment, G as FunctionComponent, H as Globals, J as JsxRuntimeHookFn, I as JsxSourceInfo, K as KeyFrameProperties, M as Maybe, P as MountHandler, Q as NodeType, R as OneOrMany, Y as Props, Z as REF_ATTRIBUTE_NAME, _ as Ref, a0 as RefUpdateFn, a1 as RefUpdateRenderFn, a2 as RefUpdateRenderFnInput, a4 as RenderNodeInput, a6 as RenderResultNode, a9 as SyncRenderInput, aa as SyncRenderResult, ac as TransitionConfig, ad as TransitionStyles, ae as TransitionType, af as TransitionsEasing, ah as UnmountHandler, ai as VAttributes, ak as VNodeAttributes, al as VNodeChild, am as VNodeChildren, an as VNodeKey, ao as VNodeRef, ap as VNodeRefCallback, aq as VNodeRefObject, ar as VNodeType, at as XLINK_ATTRIBUTE_NAME, au as XMLNS_ATTRIBUTE_NAME, av as applyStyles, aw as createInPlaceErrorMessageVNode, ax as createRef, aE as getRenderer, aF as getTransitionStyles, aG as globalScopeDomApis, aH as handleLifecycleEventsForOnMount, aK as isJSX, aL as isRef, aM as jsx, aN as jsxDEV, aO as jsxs, aP as nsMap, aQ as observeUnmount, aR as performTransition, aT as renderInto, aU as renderIsomorphicAsync, aV as renderIsomorphicSync, aY as updateDom } from '../index-CeFAHwJi.js';
3
3
  export { CAPTURE_ONLY_EVENTS, ComponentInstance, DelegatedEventOptions, DelegatedPhase, ParsedEventProp, clearDelegatedEvents, clearDelegatedEventsDeep, getComponentInstance, getRegisteredEventKeys, getRegisteredEventTypes, isComponentRoot, mount, parseEventPropName, registerComponent, registerDelegatedEvent, removeDelegatedEvent, removeDelegatedEventByKey, unmount, unregisterComponent } from './index.js';
4
4
  import 'csstype';
5
5
 
@@ -1,6 +1,6 @@
1
- import { x as parseEventPropName, A as registerDelegatedEvent, w as observeUnmount, n as globalScopeDomApis, I as renderIsomorphicAsync, J as renderIsomorphicSync } from '../dom-DhkFpQzW.mjs';
2
- export { C as CAPTURE_ONLY_EVENTS, a as CLASS_ATTRIBUTE_NAME, D as DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE, b as DEFAULT_TRANSITION_CONFIG, F as Fragment, R as REF_ATTRIBUTE_NAME, X as XLINK_ATTRIBUTE_NAME, c as XMLNS_ATTRIBUTE_NAME, d as applyStyles, e as clearDelegatedEvents, f as clearDelegatedEventsDeep, g as createInPlaceErrorMessageVNode, h as createRef, i as getComponentInstance, j as getRegisteredEventKeys, k as getRegisteredEventTypes, l as getRenderer, m as getTransitionStyles, o as handleLifecycleEventsForOnMount, p as isComponentRoot, q as isJSX, r as isRef, s as jsx, t as jsxDEV, u as jsxs, v as nsMap, y as performTransition, z as registerComponent, B as removeDelegatedEvent, E as removeDelegatedEventByKey, H as renderInto, K as unregisterComponent, L as updateDom } from '../dom-DhkFpQzW.mjs';
3
- export { m as mount, u as unmount } from '../mount-0BKlcRFL.mjs';
1
+ import { W as parseEventPropName, a2 as registerDelegatedEvent, U as observeUnmount, B as globalScopeDomApis, a8 as renderIsomorphicAsync, a9 as renderIsomorphicSync } from '../dom-_OdBXxSy.mjs';
2
+ export { C as CAPTURE_ONLY_EVENTS, a as CLASS_ATTRIBUTE_NAME, D as DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE, c as DEFAULT_TRANSITION_CONFIG, F as Fragment, R as REF_ATTRIBUTE_NAME, X as XLINK_ATTRIBUTE_NAME, d as XMLNS_ATTRIBUTE_NAME, f as applyStyles, i as clearDelegatedEvents, j as clearDelegatedEventsDeep, l as createInPlaceErrorMessageVNode, m as createRef, t as getComponentInstance, x as getRegisteredEventKeys, y as getRegisteredEventTypes, z as getRenderer, A as getTransitionStyles, E as handleLifecycleEventsForOnMount, H as isComponentRoot, L as isJSX, N as isRef, P as jsx, Q as jsxDEV, S as jsxs, T as nsMap, Y as performTransition, a1 as registerComponent, a3 as removeDelegatedEvent, a4 as removeDelegatedEventByKey, a7 as renderInto, ae as unregisterComponent, af as updateDom } from '../dom-_OdBXxSy.mjs';
3
+ export { m as mount, u as unmount } from '../mount-BcFWqQDc.mjs';
4
4
  import 'defuss-runtime';
5
5
 
6
6
  const renderSync = (virtualNode, parentDomElement = document.documentElement) => {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var dom = require('../../dom-DIfHWdHZ.cjs');
3
+ var dom = require('../../dom-D--m76Im.cjs');
4
4
  require('defuss-runtime');
5
5
 
6
6
 
@@ -1,2 +1,2 @@
1
- export { A as AllHTMLElements, c as AsyncDefussChild, d as AsyncFC, e as AsyncFunctionComponent, C as CLASS_ATTRIBUTE_NAME, f as CSSProperties, g as Children, D as DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE, h as DEFAULT_TRANSITION_CONFIG, i as DOMElement, j as DefussChild, k as DefussChildren, l as DefussClassValue, m as DefussKey, n as DomAbstractionImpl, E as ElementProps, F as FC, o as FontFaceProperties, p as Fragment, q as FunctionComponent, G as Globals, J as JsxRuntimeHookFn, r as JsxSourceInfo, K as KeyFrameProperties, M as Maybe, s as MountHandler, N as NodeType, O as OneOrMany, b as ParentElementInput, P as ParentElementInputAsync, t as Props, u as REF_ATTRIBUTE_NAME, v as Ref, w as RefUpdateFn, x as RefUpdateRenderFn, y as RefUpdateRenderFnInput, R as RenderInput, z as RenderNodeInput, a as RenderResult, B as RenderResultNode, S as SyncRenderInput, H as SyncRenderResult, T as TransitionConfig, I as TransitionStyles, L as TransitionType, Q as TransitionsEasing, U as UnmountHandler, V as VAttributes, W as VNode, X as VNodeAttributes, Y as VNodeChild, Z as VNodeChildren, _ as VNodeKey, $ as VNodeRef, a0 as VNodeRefCallback, a1 as VNodeRefObject, a2 as VNodeType, a3 as XLINK_ATTRIBUTE_NAME, a4 as XMLNS_ATTRIBUTE_NAME, a5 as applyStyles, a6 as createInPlaceErrorMessageVNode, a7 as createRef, a8 as getRenderer, a9 as getTransitionStyles, aa as globalScopeDomApis, ab as handleLifecycleEventsForOnMount, ac as isJSX, ad as isRef, ae as jsx, af as jsxDEV, ag as jsxs, ah as nsMap, ai as observeUnmount, aj as performTransition, aW as render, ak as renderInto, al as renderIsomorphicAsync, am as renderIsomorphicSync, an as updateDom } from '../../index-CDeQTFKH.js';
1
+ export { A as AllHTMLElements, b as AsyncDefussChild, c as AsyncFC, d as AsyncFunctionComponent, C as CLASS_ATTRIBUTE_NAME, e as CSSProperties, g as Children, D as DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE, h as DEFAULT_TRANSITION_CONFIG, i as DOMElement, k as DefussChild, l as DefussChildren, m as DefussClassValue, n as DefussKey, s as DomAbstractionImpl, t as ElementProps, F as FC, x as FontFaceProperties, B as Fragment, G as FunctionComponent, H as Globals, J as JsxRuntimeHookFn, I as JsxSourceInfo, K as KeyFrameProperties, M as Maybe, P as MountHandler, Q as NodeType, R as OneOrMany, S as ParentElementInput, T as ParentElementInputAsync, Y as Props, Z as REF_ATTRIBUTE_NAME, _ as Ref, a0 as RefUpdateFn, a1 as RefUpdateRenderFn, a2 as RefUpdateRenderFnInput, a3 as RenderInput, a4 as RenderNodeInput, a5 as RenderResult, a6 as RenderResultNode, a9 as SyncRenderInput, aa as SyncRenderResult, ac as TransitionConfig, ad as TransitionStyles, ae as TransitionType, af as TransitionsEasing, ah as UnmountHandler, ai as VAttributes, aj as VNode, ak as VNodeAttributes, al as VNodeChild, am as VNodeChildren, an as VNodeKey, ao as VNodeRef, ap as VNodeRefCallback, aq as VNodeRefObject, ar as VNodeType, at as XLINK_ATTRIBUTE_NAME, au as XMLNS_ATTRIBUTE_NAME, av as applyStyles, aw as createInPlaceErrorMessageVNode, ax as createRef, aE as getRenderer, aF as getTransitionStyles, aG as globalScopeDomApis, aH as handleLifecycleEventsForOnMount, aK as isJSX, aL as isRef, aM as jsx, aN as jsxDEV, aO as jsxs, aP as nsMap, aQ as observeUnmount, aR as performTransition, aS as render, aT as renderInto, aU as renderIsomorphicAsync, aV as renderIsomorphicSync, aY as updateDom } from '../../index-CeFAHwJi.js';
2
2
  import 'csstype';
@@ -1,2 +1,2 @@
1
- export { a as CLASS_ATTRIBUTE_NAME, D as DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE, b as DEFAULT_TRANSITION_CONFIG, F as Fragment, R as REF_ATTRIBUTE_NAME, X as XLINK_ATTRIBUTE_NAME, c as XMLNS_ATTRIBUTE_NAME, d as applyStyles, g as createInPlaceErrorMessageVNode, h as createRef, l as getRenderer, m as getTransitionStyles, n as globalScopeDomApis, o as handleLifecycleEventsForOnMount, q as isJSX, r as isRef, s as jsx, t as jsxDEV, u as jsxs, v as nsMap, w as observeUnmount, y as performTransition, G as render, H as renderInto, I as renderIsomorphicAsync, J as renderIsomorphicSync, L as updateDom } from '../../dom-DhkFpQzW.mjs';
1
+ export { a as CLASS_ATTRIBUTE_NAME, D as DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE, c as DEFAULT_TRANSITION_CONFIG, F as Fragment, R as REF_ATTRIBUTE_NAME, X as XLINK_ATTRIBUTE_NAME, d as XMLNS_ATTRIBUTE_NAME, f as applyStyles, l as createInPlaceErrorMessageVNode, m as createRef, z as getRenderer, A as getTransitionStyles, B as globalScopeDomApis, E as handleLifecycleEventsForOnMount, L as isJSX, N as isRef, P as jsx, Q as jsxDEV, S as jsxs, T as nsMap, U as observeUnmount, Y as performTransition, a6 as render, a7 as renderInto, a8 as renderIsomorphicAsync, a9 as renderIsomorphicSync, af as updateDom } from '../../dom-_OdBXxSy.mjs';
2
2
  import 'defuss-runtime';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var dom = require('../dom-DIfHWdHZ.cjs');
4
- var mount = require('../mount-C9aDnSHs.cjs');
3
+ var dom = require('../dom-D--m76Im.cjs');
4
+ var mount = require('../mount-CY0wDye_.cjs');
5
5
  require('defuss-runtime');
6
6
 
7
7
 
@@ -1,5 +1,5 @@
1
- import { W as VNode } from '../index-CDeQTFKH.js';
2
- export { A as AllHTMLElements, c as AsyncDefussChild, d as AsyncFC, e as AsyncFunctionComponent, C as CLASS_ATTRIBUTE_NAME, f as CSSProperties, g as Children, D as DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE, h as DEFAULT_TRANSITION_CONFIG, i as DOMElement, j as DefussChild, k as DefussChildren, l as DefussClassValue, m as DefussKey, n as DomAbstractionImpl, E as ElementProps, F as FC, o as FontFaceProperties, p as Fragment, q as FunctionComponent, G as Globals, J as JsxRuntimeHookFn, r as JsxSourceInfo, K as KeyFrameProperties, M as Maybe, s as MountHandler, N as NodeType, O as OneOrMany, b as ParentElementInput, P as ParentElementInputAsync, t as Props, u as REF_ATTRIBUTE_NAME, v as Ref, w as RefUpdateFn, x as RefUpdateRenderFn, y as RefUpdateRenderFnInput, R as RenderInput, z as RenderNodeInput, a as RenderResult, B as RenderResultNode, S as SyncRenderInput, H as SyncRenderResult, T as TransitionConfig, I as TransitionStyles, L as TransitionType, Q as TransitionsEasing, U as UnmountHandler, V as VAttributes, X as VNodeAttributes, Y as VNodeChild, Z as VNodeChildren, _ as VNodeKey, $ as VNodeRef, a0 as VNodeRefCallback, a1 as VNodeRefObject, a2 as VNodeType, a3 as XLINK_ATTRIBUTE_NAME, a4 as XMLNS_ATTRIBUTE_NAME, a5 as applyStyles, a6 as createInPlaceErrorMessageVNode, a7 as createRef, a8 as getRenderer, a9 as getTransitionStyles, aa as globalScopeDomApis, ab as handleLifecycleEventsForOnMount, ac as isJSX, ad as isRef, ae as jsx, af as jsxDEV, ag as jsxs, ah as nsMap, ai as observeUnmount, aj as performTransition, aW as render, ak as renderInto, al as renderIsomorphicAsync, am as renderIsomorphicSync, an as updateDom } from '../index-CDeQTFKH.js';
1
+ import { aj as VNode } from '../index-CeFAHwJi.js';
2
+ export { A as AllHTMLElements, b as AsyncDefussChild, c as AsyncFC, d as AsyncFunctionComponent, C as CLASS_ATTRIBUTE_NAME, e as CSSProperties, g as Children, D as DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE, h as DEFAULT_TRANSITION_CONFIG, i as DOMElement, k as DefussChild, l as DefussChildren, m as DefussClassValue, n as DefussKey, s as DomAbstractionImpl, t as ElementProps, F as FC, x as FontFaceProperties, B as Fragment, G as FunctionComponent, H as Globals, J as JsxRuntimeHookFn, I as JsxSourceInfo, K as KeyFrameProperties, M as Maybe, P as MountHandler, Q as NodeType, R as OneOrMany, S as ParentElementInput, T as ParentElementInputAsync, Y as Props, Z as REF_ATTRIBUTE_NAME, _ as Ref, a0 as RefUpdateFn, a1 as RefUpdateRenderFn, a2 as RefUpdateRenderFnInput, a3 as RenderInput, a4 as RenderNodeInput, a5 as RenderResult, a6 as RenderResultNode, a9 as SyncRenderInput, aa as SyncRenderResult, ac as TransitionConfig, ad as TransitionStyles, ae as TransitionType, af as TransitionsEasing, ah as UnmountHandler, ai as VAttributes, ak as VNodeAttributes, al as VNodeChild, am as VNodeChildren, an as VNodeKey, ao as VNodeRef, ap as VNodeRefCallback, aq as VNodeRefObject, ar as VNodeType, at as XLINK_ATTRIBUTE_NAME, au as XMLNS_ATTRIBUTE_NAME, av as applyStyles, aw as createInPlaceErrorMessageVNode, ax as createRef, aE as getRenderer, aF as getTransitionStyles, aG as globalScopeDomApis, aH as handleLifecycleEventsForOnMount, aK as isJSX, aL as isRef, aM as jsx, aN as jsxDEV, aO as jsxs, aP as nsMap, aQ as observeUnmount, aR as performTransition, aS as render, aT as renderInto, aU as renderIsomorphicAsync, aV as renderIsomorphicSync, aY as updateDom } from '../index-CeFAHwJi.js';
3
3
  import 'csstype';
4
4
 
5
5
  type DelegatedPhase = "bubble" | "capture";
@@ -1,3 +1,3 @@
1
- export { C as CAPTURE_ONLY_EVENTS, a as CLASS_ATTRIBUTE_NAME, D as DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE, b as DEFAULT_TRANSITION_CONFIG, F as Fragment, R as REF_ATTRIBUTE_NAME, X as XLINK_ATTRIBUTE_NAME, c as XMLNS_ATTRIBUTE_NAME, d as applyStyles, e as clearDelegatedEvents, f as clearDelegatedEventsDeep, g as createInPlaceErrorMessageVNode, h as createRef, i as getComponentInstance, j as getRegisteredEventKeys, k as getRegisteredEventTypes, l as getRenderer, m as getTransitionStyles, n as globalScopeDomApis, o as handleLifecycleEventsForOnMount, p as isComponentRoot, q as isJSX, r as isRef, s as jsx, t as jsxDEV, u as jsxs, v as nsMap, w as observeUnmount, x as parseEventPropName, y as performTransition, z as registerComponent, A as registerDelegatedEvent, B as removeDelegatedEvent, E as removeDelegatedEventByKey, G as render, H as renderInto, I as renderIsomorphicAsync, J as renderIsomorphicSync, K as unregisterComponent, L as updateDom } from '../dom-DhkFpQzW.mjs';
2
- export { m as mount, u as unmount } from '../mount-0BKlcRFL.mjs';
1
+ export { C as CAPTURE_ONLY_EVENTS, a as CLASS_ATTRIBUTE_NAME, D as DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE, c as DEFAULT_TRANSITION_CONFIG, F as Fragment, R as REF_ATTRIBUTE_NAME, X as XLINK_ATTRIBUTE_NAME, d as XMLNS_ATTRIBUTE_NAME, f as applyStyles, i as clearDelegatedEvents, j as clearDelegatedEventsDeep, l as createInPlaceErrorMessageVNode, m as createRef, t as getComponentInstance, x as getRegisteredEventKeys, y as getRegisteredEventTypes, z as getRenderer, A as getTransitionStyles, B as globalScopeDomApis, E as handleLifecycleEventsForOnMount, H as isComponentRoot, L as isJSX, N as isRef, P as jsx, Q as jsxDEV, S as jsxs, T as nsMap, U as observeUnmount, W as parseEventPropName, Y as performTransition, a1 as registerComponent, a2 as registerDelegatedEvent, a3 as removeDelegatedEvent, a4 as removeDelegatedEventByKey, a6 as render, a7 as renderInto, a8 as renderIsomorphicAsync, a9 as renderIsomorphicSync, ae as unregisterComponent, af as updateDom } from '../dom-_OdBXxSy.mjs';
2
+ export { m as mount, u as unmount } from '../mount-BcFWqQDc.mjs';
3
3
  import 'defuss-runtime';
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
3
  var HappyDom = require('happy-dom');
4
- var dom = require('../dom-DIfHWdHZ.cjs');
4
+ var dom = require('../dom-D--m76Im.cjs');
5
5
  var serializeHtml = require('w3c-xmlserializer');
6
- var mount = require('../mount-C9aDnSHs.cjs');
6
+ var mount = require('../mount-CY0wDye_.cjs');
7
7
  require('defuss-runtime');
8
8
 
9
9
  function _interopNamespaceDefault(e) {
@@ -1,5 +1,5 @@
1
- import { G as Globals, R as RenderInput, P as ParentElementInputAsync, a as RenderResult, b as ParentElementInput } from '../index-CDeQTFKH.js';
2
- export { A as AllHTMLElements, c as AsyncDefussChild, d as AsyncFC, e as AsyncFunctionComponent, C as CLASS_ATTRIBUTE_NAME, f as CSSProperties, g as Children, D as DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE, h as DEFAULT_TRANSITION_CONFIG, i as DOMElement, j as DefussChild, k as DefussChildren, l as DefussClassValue, m as DefussKey, n as DomAbstractionImpl, E as ElementProps, F as FC, o as FontFaceProperties, p as Fragment, q as FunctionComponent, J as JsxRuntimeHookFn, r as JsxSourceInfo, K as KeyFrameProperties, M as Maybe, s as MountHandler, N as NodeType, O as OneOrMany, t as Props, u as REF_ATTRIBUTE_NAME, v as Ref, w as RefUpdateFn, x as RefUpdateRenderFn, y as RefUpdateRenderFnInput, z as RenderNodeInput, B as RenderResultNode, S as SyncRenderInput, H as SyncRenderResult, T as TransitionConfig, I as TransitionStyles, L as TransitionType, Q as TransitionsEasing, U as UnmountHandler, V as VAttributes, W as VNode, X as VNodeAttributes, Y as VNodeChild, Z as VNodeChildren, _ as VNodeKey, $ as VNodeRef, a0 as VNodeRefCallback, a1 as VNodeRefObject, a2 as VNodeType, a3 as XLINK_ATTRIBUTE_NAME, a4 as XMLNS_ATTRIBUTE_NAME, a5 as applyStyles, a6 as createInPlaceErrorMessageVNode, a7 as createRef, a8 as getRenderer, a9 as getTransitionStyles, aa as globalScopeDomApis, ab as handleLifecycleEventsForOnMount, ac as isJSX, ad as isRef, ae as jsx, af as jsxDEV, ag as jsxs, ah as nsMap, ai as observeUnmount, aj as performTransition, ak as renderInto, al as renderIsomorphicAsync, am as renderIsomorphicSync, an as updateDom } from '../index-CDeQTFKH.js';
1
+ import { H as Globals, a3 as RenderInput, T as ParentElementInputAsync, a5 as RenderResult, S as ParentElementInput } from '../index-CeFAHwJi.js';
2
+ export { A as AllHTMLElements, b as AsyncDefussChild, c as AsyncFC, d as AsyncFunctionComponent, C as CLASS_ATTRIBUTE_NAME, e as CSSProperties, g as Children, D as DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE, h as DEFAULT_TRANSITION_CONFIG, i as DOMElement, k as DefussChild, l as DefussChildren, m as DefussClassValue, n as DefussKey, s as DomAbstractionImpl, t as ElementProps, F as FC, x as FontFaceProperties, B as Fragment, G as FunctionComponent, J as JsxRuntimeHookFn, I as JsxSourceInfo, K as KeyFrameProperties, M as Maybe, P as MountHandler, Q as NodeType, R as OneOrMany, Y as Props, Z as REF_ATTRIBUTE_NAME, _ as Ref, a0 as RefUpdateFn, a1 as RefUpdateRenderFn, a2 as RefUpdateRenderFnInput, a4 as RenderNodeInput, a6 as RenderResultNode, a9 as SyncRenderInput, aa as SyncRenderResult, ac as TransitionConfig, ad as TransitionStyles, ae as TransitionType, af as TransitionsEasing, ah as UnmountHandler, ai as VAttributes, aj as VNode, ak as VNodeAttributes, al as VNodeChild, am as VNodeChildren, an as VNodeKey, ao as VNodeRef, ap as VNodeRefCallback, aq as VNodeRefObject, ar as VNodeType, at as XLINK_ATTRIBUTE_NAME, au as XMLNS_ATTRIBUTE_NAME, av as applyStyles, aw as createInPlaceErrorMessageVNode, ax as createRef, aE as getRenderer, aF as getTransitionStyles, aG as globalScopeDomApis, aH as handleLifecycleEventsForOnMount, aK as isJSX, aL as isRef, aM as jsx, aN as jsxDEV, aO as jsxs, aP as nsMap, aQ as observeUnmount, aR as performTransition, aT as renderInto, aU as renderIsomorphicAsync, aV as renderIsomorphicSync, aY as updateDom } from '../index-CeFAHwJi.js';
3
3
  export { CAPTURE_ONLY_EVENTS, ComponentInstance, DelegatedEventOptions, DelegatedPhase, ParsedEventProp, clearDelegatedEvents, clearDelegatedEventsDeep, getComponentInstance, getRegisteredEventKeys, getRegisteredEventTypes, isComponentRoot, mount, parseEventPropName, registerComponent, registerDelegatedEvent, removeDelegatedEvent, removeDelegatedEventByKey, unmount, unregisterComponent } from './index.js';
4
4
  import 'csstype';
5
5
 
@@ -1,8 +1,8 @@
1
1
  import * as HappyDom from 'happy-dom';
2
- import { I as renderIsomorphicAsync, J as renderIsomorphicSync, n as globalScopeDomApis } from '../dom-DhkFpQzW.mjs';
3
- export { C as CAPTURE_ONLY_EVENTS, a as CLASS_ATTRIBUTE_NAME, D as DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE, b as DEFAULT_TRANSITION_CONFIG, F as Fragment, R as REF_ATTRIBUTE_NAME, X as XLINK_ATTRIBUTE_NAME, c as XMLNS_ATTRIBUTE_NAME, d as applyStyles, e as clearDelegatedEvents, f as clearDelegatedEventsDeep, g as createInPlaceErrorMessageVNode, h as createRef, i as getComponentInstance, j as getRegisteredEventKeys, k as getRegisteredEventTypes, l as getRenderer, m as getTransitionStyles, o as handleLifecycleEventsForOnMount, p as isComponentRoot, q as isJSX, r as isRef, s as jsx, t as jsxDEV, u as jsxs, v as nsMap, w as observeUnmount, x as parseEventPropName, y as performTransition, z as registerComponent, A as registerDelegatedEvent, B as removeDelegatedEvent, E as removeDelegatedEventByKey, H as renderInto, K as unregisterComponent, L as updateDom } from '../dom-DhkFpQzW.mjs';
2
+ import { a8 as renderIsomorphicAsync, a9 as renderIsomorphicSync, B as globalScopeDomApis } from '../dom-_OdBXxSy.mjs';
3
+ export { C as CAPTURE_ONLY_EVENTS, a as CLASS_ATTRIBUTE_NAME, D as DANGEROUSLY_SET_INNER_HTML_ATTRIBUTE, c as DEFAULT_TRANSITION_CONFIG, F as Fragment, R as REF_ATTRIBUTE_NAME, X as XLINK_ATTRIBUTE_NAME, d as XMLNS_ATTRIBUTE_NAME, f as applyStyles, i as clearDelegatedEvents, j as clearDelegatedEventsDeep, l as createInPlaceErrorMessageVNode, m as createRef, t as getComponentInstance, x as getRegisteredEventKeys, y as getRegisteredEventTypes, z as getRenderer, A as getTransitionStyles, E as handleLifecycleEventsForOnMount, H as isComponentRoot, L as isJSX, N as isRef, P as jsx, Q as jsxDEV, S as jsxs, T as nsMap, U as observeUnmount, W as parseEventPropName, Y as performTransition, a1 as registerComponent, a2 as registerDelegatedEvent, a3 as removeDelegatedEvent, a4 as removeDelegatedEventByKey, a7 as renderInto, ae as unregisterComponent, af as updateDom } from '../dom-_OdBXxSy.mjs';
4
4
  import serializeHtml from 'w3c-xmlserializer';
5
- export { m as mount, u as unmount } from '../mount-0BKlcRFL.mjs';
5
+ export { m as mount, u as unmount } from '../mount-BcFWqQDc.mjs';
6
6
  import 'defuss-runtime';
7
7
 
8
8
  const setupDomApis = (options = {}) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "defuss",
3
- "version": "3.4.7",
3
+ "version": "3.4.9",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -43,13 +43,18 @@
43
43
  "pretest": "bun run build",
44
44
  "test:watch": "vitest --coverage",
45
45
  "test": "vitest run --coverage",
46
+ "pretest:browser": "bunx playwright install chromium",
46
47
  "test:browser": "vitest run --config vitest.browser.config.ts",
48
+ "prebench:chromium": "bunx playwright install chromium",
47
49
  "kitchensink": "vitest run --config kitchensink/vitest.config.ts",
48
- "bench": "vitest bench --config vitest.bench.config.ts",
49
- "bench:browser": "vitest run --config vitest.browser.config.ts src/__benchmarks__/dom-benchmark.browser.test.tsx",
50
+ "bench": "vitest bench --run --config vitest.bench.config.ts",
51
+ "bench:browser": "vitest run --config vitest.bench-browser.config.ts src/__benchmarks__/dom-benchmark.browser.test.tsx",
52
+ "bench:ssr": "vitest run --config vitest.bench-browser.config.ts src/__benchmarks__/dom-benchmark.ssr.test.tsx",
53
+ "bench:chromium": "vitest run --config vitest.bench-chromium.config.ts src/__benchmarks__/dom-benchmark.browser.test.tsx",
54
+ "test:all": "bun run test && bun run test:browser && bun run bench && bun run bench:browser && bun run bench:ssr && bun run bench:chromium",
50
55
  "prebuild": "bun run clean",
51
56
  "build": "node scripts/build.mjs",
52
- "prepublishOnly": "bun run build"
57
+ "prepublishOnly": "bun run build && bun run test:all"
53
58
  },
54
59
  "author": "Aron Homberg <info@aron-homberg.de>",
55
60
  "sideEffects": false,
@@ -132,4 +137,4 @@
132
137
  "happy-dom": "^20.5.0",
133
138
  "w3c-xmlserializer": "^5.0.0"
134
139
  }
135
- }
140
+ }