defuss 2.0.16 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dom-051FL7DA.cjs +2499 -0
- package/dist/dom-2urZevPa.cjs +2604 -0
- package/dist/dom-3Q6GgiEP.cjs +2386 -0
- package/dist/dom-5yKQMUIF.mjs +2041 -0
- package/dist/dom-6ZLWCL99.mjs +2043 -0
- package/dist/dom-7TUAWNZF.mjs +2620 -0
- package/dist/dom-9gOgXC15.mjs +2530 -0
- package/dist/dom-Ac1HaELT.cjs +2383 -0
- package/dist/dom-B0JKQVLo.mjs +2159 -0
- package/dist/dom-B35D5snD.cjs +2565 -0
- package/dist/dom-B3H4AWT8.cjs +2560 -0
- package/dist/dom-B4SRsxUl.cjs +2560 -0
- package/dist/dom-B6LaR9hr.mjs +2479 -0
- package/dist/dom-B9S2ESUN.mjs +2496 -0
- package/dist/dom-BBt7XE-h.mjs +2634 -0
- package/dist/dom-BCQkRmTA.mjs +2480 -0
- package/dist/dom-BEht0Cox.mjs +2428 -0
- package/dist/dom-BIbibRMj.mjs +2680 -0
- package/dist/dom-BNGg_cbb.mjs +2491 -0
- package/dist/dom-BOSr7iWk.cjs +2706 -0
- package/dist/dom-BQR3Ktxk.mjs +2479 -0
- package/dist/dom-BRy0f7HK.cjs +2714 -0
- package/dist/dom-BZFXy5pV.cjs +2703 -0
- package/dist/dom-B_UvukCH.mjs +2040 -0
- package/dist/dom-B_e7yDzd.cjs +2928 -0
- package/dist/dom-B_lCwk1Q.mjs +2315 -0
- package/dist/dom-Baq533m0.mjs +2857 -0
- package/dist/dom-BcaFBnxf.mjs +2208 -0
- package/dist/dom-BfByzUuR.cjs +2159 -0
- package/dist/dom-BgRqSIRj.mjs +2517 -0
- package/dist/dom-Bm2vH_qI.mjs +2431 -0
- package/dist/dom-BpYh7n5K.cjs +2562 -0
- package/dist/dom-BwxduwV-.mjs +2097 -0
- package/dist/dom-BxFiaTgP.mjs +2169 -0
- package/dist/dom-BycLWyql.mjs +2564 -0
- package/dist/dom-ByuC2gIO.cjs +2598 -0
- package/dist/dom-C0Md-XPg.cjs +2553 -0
- package/dist/dom-C274_6Go.cjs +2556 -0
- package/dist/dom-CEXwGUHT.mjs +2175 -0
- package/dist/dom-CKDuv_GB.cjs +2700 -0
- package/dist/dom-CX9zlNhe.mjs +2492 -0
- package/dist/dom-CbkHOYKY.cjs +2101 -0
- package/dist/dom-CbnDrfq8.mjs +2491 -0
- package/dist/dom-CdE-pVzi.cjs +2102 -0
- package/dist/dom-Cg8xF9s2.mjs +2634 -0
- package/dist/dom-Cgi1LYfG.mjs +2626 -0
- package/dist/dom-Cj-ITpFq.mjs +2312 -0
- package/dist/dom-Cka7SFtU.mjs +2486 -0
- package/dist/dom-CqXRRKMq.cjs +2502 -0
- package/dist/dom-Cvxyn1jX.cjs +2751 -0
- package/dist/dom-CwVNwwYO.mjs +2622 -0
- package/dist/dom-D1h0E-Gl.cjs +2276 -0
- package/dist/dom-D1tJ6iHK.mjs +2208 -0
- package/dist/dom-D3B4oBiG.cjs +2560 -0
- package/dist/dom-D3RFN-wE.cjs +2105 -0
- package/dist/dom-D3kiX0Hd.mjs +2240 -0
- package/dist/dom-D6Z2Nh2a.cjs +2658 -0
- package/dist/dom-D88_i9KL.cjs +2758 -0
- package/dist/dom-D98Bwft7.mjs +2674 -0
- package/dist/dom-DDUT5VJn.cjs +2308 -0
- package/dist/dom-DEyxBtEp.cjs +2386 -0
- package/dist/dom-DFRuG-Zh.cjs +2243 -0
- package/dist/dom-DG8glurk.cjs +2235 -0
- package/dist/dom-DHoO2wC0.cjs +2554 -0
- package/dist/dom-DLelllDB.mjs +2479 -0
- package/dist/dom-DM9F1UXd.cjs +2755 -0
- package/dist/dom-DPcA3iwZ.mjs +2315 -0
- package/dist/dom-DSrDBeAh.cjs +2383 -0
- package/dist/dom-DWF-s1Su.cjs +2560 -0
- package/dist/dom-DXqKDT61.mjs +2636 -0
- package/dist/dom-DZaG_1dy.cjs +2523 -0
- package/dist/dom-Da94we67.mjs +2482 -0
- package/dist/dom-DbLKf6Jh.mjs +2452 -0
- package/dist/dom-DcxhioDc.mjs +2312 -0
- package/dist/dom-Dd4Xeoid.cjs +2225 -0
- package/dist/dom-DdmtiIFy.mjs +2240 -0
- package/dist/dom-DeobYYW6.cjs +2565 -0
- package/dist/dom-DfOG-SOC.mjs +2524 -0
- package/dist/dom-DfoXi_Ge.mjs +2491 -0
- package/dist/dom-DgH5XaDf.cjs +2566 -0
- package/dist/dom-Dh6j0hU3.cjs +2216 -0
- package/dist/dom-DoY3LzGN.cjs +2716 -0
- package/dist/dom-DrkvmJc0.mjs +2604 -0
- package/dist/dom-DtoQzVf_.mjs +2420 -0
- package/dist/dom-DuPDCLQ6.cjs +2274 -0
- package/dist/dom-DxgDiOaA.cjs +2565 -0
- package/dist/dom-G04drjmU.cjs +2491 -0
- package/dist/dom-H0GABHXb.mjs +2150 -0
- package/dist/dom-JCkS89Rd.cjs +2567 -0
- package/dist/dom-KqUQZkfM.cjs +2308 -0
- package/dist/dom-TFwB-0L9.cjs +2678 -0
- package/dist/dom-TZFkL5KJ.cjs +2644 -0
- package/dist/dom-TouShoro.mjs +2177 -0
- package/dist/dom-VETbfxjz.mjs +2677 -0
- package/dist/dom-Vsf53vAt.mjs +2488 -0
- package/dist/dom-XAoDKik2.cjs +2241 -0
- package/dist/dom-YFfM2w3z.mjs +2041 -0
- package/dist/dom-_tAEgP75.mjs +2578 -0
- package/dist/dom-aBdjDw0s.cjs +2308 -0
- package/dist/dom-aW_a5G16.mjs +2240 -0
- package/dist/dom-gRbdIyyK.cjs +2604 -0
- package/dist/dom-rGg1mmtQ.cjs +2103 -0
- package/dist/dom-unkLyMam.mjs +2486 -0
- package/dist/dom-vZS7gOVB.cjs +2714 -0
- package/dist/index-2LUk-rix.d.ts +1509 -0
- package/dist/index-5Ez8v0Mw.d.ts +1568 -0
- package/dist/index-B8ImEI1u.d.ts +1509 -0
- package/dist/index-BBk97lC7.d.ts +1465 -0
- package/dist/index-BTOeLZBB.d.ts +1527 -0
- package/dist/index-BTaR1jax.d.ts +1509 -0
- package/dist/index-Bae31vFS.d.ts +1570 -0
- package/dist/index-Bb1GxtDc.d.ts +1472 -0
- package/dist/index-Bfz7852w.d.ts +1567 -0
- package/dist/index-Bywe1fkx.d.ts +1509 -0
- package/dist/index-CCeeNIcc.d.ts +1496 -0
- package/dist/index-C_P6zlvR.d.ts +1558 -0
- package/dist/index-DBvUJqwo.d.ts +1509 -0
- package/dist/index-DPVHaQn9.d.ts +1521 -0
- package/dist/index-DbR8em5t.d.ts +1497 -0
- package/dist/index-Dhjx6sE5.d.ts +1570 -0
- package/dist/index-Dzgvlh_Y.d.ts +1509 -0
- package/dist/index-Fi1RplM1.d.ts +1496 -0
- package/dist/index-ep2QX2G6.d.ts +1579 -0
- package/dist/index-gq002HdC.d.ts +1568 -0
- package/dist/index-u-BP7aQx.d.ts +1553 -0
- package/dist/index.cjs +51 -11
- package/dist/index.d.cts +8 -4
- package/dist/index.d.ts +8 -4
- package/dist/index.mjs +48 -12
- package/dist/render/client.cjs +6 -4
- package/dist/render/client.d.cts +2 -2
- package/dist/render/client.d.ts +2 -2
- package/dist/render/client.mjs +3 -5
- package/dist/render/index.cjs +5 -1
- package/dist/render/index.d.cts +1 -1
- package/dist/render/index.d.ts +1 -1
- package/dist/render/index.mjs +1 -1
- package/dist/render/server.cjs +5 -1
- package/dist/render/server.d.cts +2 -2
- package/dist/render/server.d.ts +2 -2
- package/dist/render/server.mjs +2 -2
- package/dist/transitions-BTnlvkEd.mjs +102 -0
- package/dist/transitions-D6dj9XXM.cjs +109 -0
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var dom = require('./dom-
|
|
3
|
+
var dom = require('./dom-DuPDCLQ6.cjs');
|
|
4
4
|
require('defuss-runtime');
|
|
5
5
|
|
|
6
6
|
const inDevMode = true;
|
|
7
7
|
|
|
8
|
-
const queueCallback = (cb) => () => queueMicrotask(cb);
|
|
9
|
-
|
|
10
8
|
const VARIABLE_REGEX = /{([^}]*)}/g;
|
|
11
9
|
const DOUBLE_BRACE_REGEX = /\{\{([^}]*)\}\}/g;
|
|
12
10
|
const interpolate = (template, replacements) => {
|
|
@@ -122,13 +120,13 @@ const Trans = ({
|
|
|
122
120
|
const onMount = () => {
|
|
123
121
|
i18n.subscribe(updateContent);
|
|
124
122
|
if (attrs.onMount) {
|
|
125
|
-
|
|
123
|
+
attrs.onMount(_ref.current);
|
|
126
124
|
}
|
|
127
125
|
};
|
|
128
126
|
const onUnmount = () => {
|
|
129
127
|
i18n.unsubscribe(updateContent);
|
|
130
128
|
if (attrs.onUnmount) {
|
|
131
|
-
|
|
129
|
+
attrs.onUnmount(_ref.current);
|
|
132
130
|
}
|
|
133
131
|
};
|
|
134
132
|
return {
|
|
@@ -187,12 +185,16 @@ const setupRouter = (config = {
|
|
|
187
185
|
// default
|
|
188
186
|
}, windowImpl) => {
|
|
189
187
|
const routeRegistrations = [];
|
|
188
|
+
let currentPath = "";
|
|
190
189
|
if (typeof window !== "undefined" && !windowImpl) {
|
|
191
190
|
windowImpl = globalThis.__defuss_window || window;
|
|
192
191
|
}
|
|
193
192
|
if (!windowImpl && !dom.isServer()) {
|
|
194
193
|
console.warn("Router requires a Window API implementation!");
|
|
195
194
|
}
|
|
195
|
+
if (windowImpl) {
|
|
196
|
+
currentPath = windowImpl.document.location.pathname;
|
|
197
|
+
}
|
|
196
198
|
const api = {
|
|
197
199
|
...config,
|
|
198
200
|
listeners: [],
|
|
@@ -221,22 +223,50 @@ const setupRouter = (config = {
|
|
|
221
223
|
},
|
|
222
224
|
navigate(newPath) {
|
|
223
225
|
const strategy = api.strategy || "page-refresh";
|
|
224
|
-
const oldPath =
|
|
226
|
+
const oldPath = currentPath;
|
|
225
227
|
if (strategy === "page-refresh") {
|
|
226
228
|
document.location.href = newPath;
|
|
227
229
|
} else if (strategy === "slot-refresh") {
|
|
228
230
|
if (typeof windowImpl !== "undefined") {
|
|
229
231
|
windowImpl.history.pushState({}, "", newPath);
|
|
230
232
|
}
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
233
|
+
currentPath = newPath;
|
|
234
|
+
queueMicrotask(() => {
|
|
235
|
+
for (const listener of api.listeners) {
|
|
236
|
+
listener(newPath, oldPath);
|
|
237
|
+
}
|
|
238
|
+
});
|
|
234
239
|
}
|
|
235
240
|
},
|
|
236
241
|
getRoutes() {
|
|
237
242
|
return routeRegistrations;
|
|
243
|
+
},
|
|
244
|
+
destroy() {
|
|
245
|
+
if (windowImpl && api.strategy === "slot-refresh") {
|
|
246
|
+
windowImpl.removeEventListener("popstate", handlePopState);
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
attachPopStateHandler() {
|
|
250
|
+
if (windowImpl && api.strategy === "slot-refresh") {
|
|
251
|
+
windowImpl.addEventListener("popstate", handlePopState);
|
|
252
|
+
}
|
|
238
253
|
}
|
|
239
254
|
};
|
|
255
|
+
const handlePopState = (event) => {
|
|
256
|
+
if (api.strategy === "slot-refresh" && windowImpl) {
|
|
257
|
+
const newPath = windowImpl.document.location.pathname;
|
|
258
|
+
const oldPath = currentPath;
|
|
259
|
+
currentPath = newPath;
|
|
260
|
+
queueMicrotask(() => {
|
|
261
|
+
for (const listener of api.listeners) {
|
|
262
|
+
listener(newPath, oldPath);
|
|
263
|
+
}
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
if (windowImpl && api.strategy === "slot-refresh") {
|
|
268
|
+
api.attachPopStateHandler();
|
|
269
|
+
}
|
|
240
270
|
return api;
|
|
241
271
|
};
|
|
242
272
|
const Router = setupRouter();
|
|
@@ -273,13 +303,19 @@ const RouterSlot = ({
|
|
|
273
303
|
router = Router,
|
|
274
304
|
children,
|
|
275
305
|
RouterOutlet,
|
|
306
|
+
transitionConfig = {
|
|
307
|
+
type: "fade",
|
|
308
|
+
duration: 25,
|
|
309
|
+
target: "self"
|
|
310
|
+
},
|
|
276
311
|
...attributes
|
|
277
312
|
}) => {
|
|
278
313
|
const { tag, ...attributesWithoutTag } = attributes;
|
|
279
314
|
const ref = dom.createRef();
|
|
280
315
|
router.strategy = "slot-refresh";
|
|
316
|
+
router.attachPopStateHandler();
|
|
281
317
|
router.onRouteChange(async () => {
|
|
282
|
-
await dom.$(ref).update(RouterOutlet());
|
|
318
|
+
await dom.$(ref).update(RouterOutlet(), transitionConfig);
|
|
283
319
|
});
|
|
284
320
|
if (document.getElementById(RouterSlotId)) {
|
|
285
321
|
console.warn(
|
|
@@ -430,9 +466,11 @@ exports.$ = dom.$;
|
|
|
430
466
|
exports.Call = dom.Call;
|
|
431
467
|
exports.CallChainImpl = dom.CallChainImpl;
|
|
432
468
|
exports.CallChainImplThenable = dom.CallChainImplThenable;
|
|
469
|
+
exports.DEFAULT_TRANSITION_CONFIG = dom.DEFAULT_TRANSITION_CONFIG;
|
|
433
470
|
exports.Fragment = dom.Fragment;
|
|
434
471
|
exports.addElementEvent = dom.addElementEvent;
|
|
435
472
|
exports.addNonChainedReturnCallNames = dom.addNonChainedReturnCallNames;
|
|
473
|
+
exports.applyStyles = dom.applyStyles;
|
|
436
474
|
exports.areDomNodesEqual = dom.areDomNodesEqual;
|
|
437
475
|
exports.checkElementVisibility = dom.checkElementVisibility;
|
|
438
476
|
exports.clearElementEvents = dom.clearElementEvents;
|
|
@@ -452,6 +490,7 @@ exports.getEventMap = dom.getEventMap;
|
|
|
452
490
|
exports.getMimeType = dom.getMimeType;
|
|
453
491
|
exports.getNonChainedReturnCallNames = dom.getNonChainedReturnCallNames;
|
|
454
492
|
exports.getRenderer = dom.getRenderer;
|
|
493
|
+
exports.getTransitionStyles = dom.getTransitionStyles;
|
|
455
494
|
exports.globalScopeDomApis = dom.globalScopeDomApis;
|
|
456
495
|
exports.handleLifecycleEventsForOnMount = dom.handleLifecycleEventsForOnMount;
|
|
457
496
|
exports.htmlStringToVNodes = dom.htmlStringToVNodes;
|
|
@@ -469,7 +508,9 @@ exports.jsxs = dom.jsxs;
|
|
|
469
508
|
exports.mapArrayIndexAccess = dom.mapArrayIndexAccess;
|
|
470
509
|
exports.observeUnmount = dom.observeUnmount;
|
|
471
510
|
exports.parseDOM = dom.parseDOM;
|
|
511
|
+
exports.performTransition = dom.performTransition;
|
|
472
512
|
exports.processAllFormElements = dom.processAllFormElements;
|
|
513
|
+
exports.queueCallback = dom.queueCallback;
|
|
473
514
|
exports.removeElementEvent = dom.removeElementEvent;
|
|
474
515
|
exports.renderIsomorphicAsync = dom.renderIsomorphicAsync;
|
|
475
516
|
exports.renderIsomorphicSync = dom.renderIsomorphicSync;
|
|
@@ -501,7 +542,6 @@ exports.i18n = i18n;
|
|
|
501
542
|
exports.inDevMode = inDevMode;
|
|
502
543
|
exports.loadLanguage = loadLanguage;
|
|
503
544
|
exports.matchRouteRegistrations = matchRouteRegistrations;
|
|
504
|
-
exports.queueCallback = queueCallback;
|
|
505
545
|
exports.setupRouter = setupRouter;
|
|
506
546
|
exports.t = t;
|
|
507
547
|
exports.tokenizePath = tokenizePath;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
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';
|
|
3
3
|
import * as CSS from 'csstype';
|
|
4
4
|
export { CSS };
|
|
5
5
|
|
|
@@ -138,6 +138,8 @@ interface Router {
|
|
|
138
138
|
tokenizePath(path: string): TokenizedPath;
|
|
139
139
|
navigate(path: string): void;
|
|
140
140
|
onRouteChange: OnRouteChangeFn;
|
|
141
|
+
destroy(): void;
|
|
142
|
+
attachPopStateHandler(): void;
|
|
141
143
|
}
|
|
142
144
|
declare const Router: Router;
|
|
143
145
|
|
|
@@ -165,13 +167,15 @@ interface RouterSlotProps extends Props {
|
|
|
165
167
|
router?: Router;
|
|
166
168
|
/** A component reference that returns many <Route />, <Redirect ... /> etc. components */
|
|
167
169
|
RouterOutlet?: any;
|
|
170
|
+
/** Transition configuration for route changes; default: { type: 'fade', duration: 50 } */
|
|
171
|
+
transitionConfig?: TransitionConfig;
|
|
168
172
|
}
|
|
169
173
|
/**
|
|
170
174
|
* RouterSlot registers a slot refresh handler with the global router configuration
|
|
171
175
|
* and renders its default children (RouterOutlet). Whenever the route changes, it re-renders dynamically.
|
|
172
176
|
* This decouples the slot refresh logic from route registration.
|
|
173
177
|
*/
|
|
174
|
-
declare const RouterSlot: ({ router, children, RouterOutlet, ...attributes }: RouterSlotProps) => VNodeChild;
|
|
178
|
+
declare const RouterSlot: ({ router, children, RouterOutlet, transitionConfig, ...attributes }: RouterSlotProps) => VNodeChild;
|
|
175
179
|
|
|
176
180
|
type AsyncState = "loading" | "loaded" | "error";
|
|
177
181
|
interface AsyncStateRef extends Ref<AsyncState, HTMLElement> {
|
|
@@ -223,4 +227,4 @@ declare const Suspense: ({ fallback, ref, children, class: _class, className, id
|
|
|
223
227
|
children: VNode<VNodeAttributes>[];
|
|
224
228
|
};
|
|
225
229
|
|
|
226
|
-
export { Async, type AsyncProps, type AsyncState, type AsyncStateRef, Globals, type I18nStore, NodeType, type OnHandleRouteChangeFn, type OnLanguageChangeListener, type OnRouteChangeFn, PersistenceProviderImpl, PersistenceProviderOptions, PersistenceProviderType, Props, Redirect, type RedirectProps, Ref, RenderInput, type Replacements, Route, type RouteHandler, type RouteParams, type RouteProps, type RouteRegistration, type RouteRequest, Router, type RouterConfig, RouterSlot, RouterSlotId, type RouterSlotProps, type RouterStrategy, Suspense, T, type TokenizedPath, Trans, type TransProps, type TransRef, type TranslationObject, type Translations, VNode, VNodeAttributes, VNodeChild, type ValidChild, addElementEvent, areDomNodesEqual, changeLanguage, checkElementVisibility, clearElementEvents, createI18n, domNodeToVNode, getEventMap, getLanguage, getMimeType, htmlStringToVNodes, i18n, inDevMode, isHTML, isMarkup, isSVG, loadLanguage, matchRouteRegistrations, parseDOM, processAllFormElements, queueCallback, removeElementEvent, renderMarkup, replaceDomWithVdom, setupRouter, t, tokenizePath, updateDomWithVdom, waitForDOM, webstorage };
|
|
230
|
+
export { Async, type AsyncProps, type AsyncState, type AsyncStateRef, Globals, type I18nStore, NodeType, type OnHandleRouteChangeFn, type OnLanguageChangeListener, type OnRouteChangeFn, PersistenceProviderImpl, PersistenceProviderOptions, PersistenceProviderType, Props, Redirect, type RedirectProps, Ref, RenderInput, type Replacements, Route, type RouteHandler, type RouteParams, type RouteProps, type RouteRegistration, type RouteRequest, Router, type RouterConfig, RouterSlot, RouterSlotId, type RouterSlotProps, type RouterStrategy, Suspense, T, type TokenizedPath, Trans, type TransProps, type TransRef, TransitionConfig, type TranslationObject, type Translations, VNode, VNodeAttributes, VNodeChild, type ValidChild, addElementEvent, areDomNodesEqual, changeLanguage, checkElementVisibility, clearElementEvents, createI18n, domNodeToVNode, getEventMap, getLanguage, getMimeType, htmlStringToVNodes, i18n, inDevMode, isHTML, isMarkup, isSVG, loadLanguage, matchRouteRegistrations, parseDOM, processAllFormElements, queueCallback, removeElementEvent, renderMarkup, replaceDomWithVdom, setupRouter, t, tokenizePath, updateDomWithVdom, waitForDOM, webstorage };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
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';
|
|
3
3
|
import * as CSS from 'csstype';
|
|
4
4
|
export { CSS };
|
|
5
5
|
|
|
@@ -138,6 +138,8 @@ interface Router {
|
|
|
138
138
|
tokenizePath(path: string): TokenizedPath;
|
|
139
139
|
navigate(path: string): void;
|
|
140
140
|
onRouteChange: OnRouteChangeFn;
|
|
141
|
+
destroy(): void;
|
|
142
|
+
attachPopStateHandler(): void;
|
|
141
143
|
}
|
|
142
144
|
declare const Router: Router;
|
|
143
145
|
|
|
@@ -165,13 +167,15 @@ interface RouterSlotProps extends Props {
|
|
|
165
167
|
router?: Router;
|
|
166
168
|
/** A component reference that returns many <Route />, <Redirect ... /> etc. components */
|
|
167
169
|
RouterOutlet?: any;
|
|
170
|
+
/** Transition configuration for route changes; default: { type: 'fade', duration: 50 } */
|
|
171
|
+
transitionConfig?: TransitionConfig;
|
|
168
172
|
}
|
|
169
173
|
/**
|
|
170
174
|
* RouterSlot registers a slot refresh handler with the global router configuration
|
|
171
175
|
* and renders its default children (RouterOutlet). Whenever the route changes, it re-renders dynamically.
|
|
172
176
|
* This decouples the slot refresh logic from route registration.
|
|
173
177
|
*/
|
|
174
|
-
declare const RouterSlot: ({ router, children, RouterOutlet, ...attributes }: RouterSlotProps) => VNodeChild;
|
|
178
|
+
declare const RouterSlot: ({ router, children, RouterOutlet, transitionConfig, ...attributes }: RouterSlotProps) => VNodeChild;
|
|
175
179
|
|
|
176
180
|
type AsyncState = "loading" | "loaded" | "error";
|
|
177
181
|
interface AsyncStateRef extends Ref<AsyncState, HTMLElement> {
|
|
@@ -223,4 +227,4 @@ declare const Suspense: ({ fallback, ref, children, class: _class, className, id
|
|
|
223
227
|
children: VNode<VNodeAttributes>[];
|
|
224
228
|
};
|
|
225
229
|
|
|
226
|
-
export { Async, type AsyncProps, type AsyncState, type AsyncStateRef, Globals, type I18nStore, NodeType, type OnHandleRouteChangeFn, type OnLanguageChangeListener, type OnRouteChangeFn, PersistenceProviderImpl, PersistenceProviderOptions, PersistenceProviderType, Props, Redirect, type RedirectProps, Ref, RenderInput, type Replacements, Route, type RouteHandler, type RouteParams, type RouteProps, type RouteRegistration, type RouteRequest, Router, type RouterConfig, RouterSlot, RouterSlotId, type RouterSlotProps, type RouterStrategy, Suspense, T, type TokenizedPath, Trans, type TransProps, type TransRef, type TranslationObject, type Translations, VNode, VNodeAttributes, VNodeChild, type ValidChild, addElementEvent, areDomNodesEqual, changeLanguage, checkElementVisibility, clearElementEvents, createI18n, domNodeToVNode, getEventMap, getLanguage, getMimeType, htmlStringToVNodes, i18n, inDevMode, isHTML, isMarkup, isSVG, loadLanguage, matchRouteRegistrations, parseDOM, processAllFormElements, queueCallback, removeElementEvent, renderMarkup, replaceDomWithVdom, setupRouter, t, tokenizePath, updateDomWithVdom, waitForDOM, webstorage };
|
|
230
|
+
export { Async, type AsyncProps, type AsyncState, type AsyncStateRef, Globals, type I18nStore, NodeType, type OnHandleRouteChangeFn, type OnLanguageChangeListener, type OnRouteChangeFn, PersistenceProviderImpl, PersistenceProviderOptions, PersistenceProviderType, Props, Redirect, type RedirectProps, Ref, RenderInput, type Replacements, Route, type RouteHandler, type RouteParams, type RouteProps, type RouteRegistration, type RouteRequest, Router, type RouterConfig, RouterSlot, RouterSlotId, type RouterSlotProps, type RouterStrategy, Suspense, T, type TokenizedPath, Trans, type TransProps, type TransRef, TransitionConfig, type TranslationObject, type Translations, VNode, VNodeAttributes, VNodeChild, type ValidChild, addElementEvent, areDomNodesEqual, changeLanguage, checkElementVisibility, clearElementEvents, createI18n, domNodeToVNode, getEventMap, getLanguage, getMimeType, htmlStringToVNodes, i18n, inDevMode, isHTML, isMarkup, isSVG, loadLanguage, matchRouteRegistrations, parseDOM, processAllFormElements, queueCallback, removeElementEvent, renderMarkup, replaceDomWithVdom, setupRouter, t, tokenizePath, updateDomWithVdom, waitForDOM, webstorage };
|
package/dist/index.mjs
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
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';
|
|
3
3
|
import 'defuss-runtime';
|
|
4
4
|
|
|
5
5
|
const inDevMode = true;
|
|
6
6
|
|
|
7
|
-
const queueCallback = (cb) => () => queueMicrotask(cb);
|
|
8
|
-
|
|
9
7
|
const VARIABLE_REGEX = /{([^}]*)}/g;
|
|
10
8
|
const DOUBLE_BRACE_REGEX = /\{\{([^}]*)\}\}/g;
|
|
11
9
|
const interpolate = (template, replacements) => {
|
|
@@ -121,13 +119,13 @@ const Trans = ({
|
|
|
121
119
|
const onMount = () => {
|
|
122
120
|
i18n.subscribe(updateContent);
|
|
123
121
|
if (attrs.onMount) {
|
|
124
|
-
|
|
122
|
+
attrs.onMount(_ref.current);
|
|
125
123
|
}
|
|
126
124
|
};
|
|
127
125
|
const onUnmount = () => {
|
|
128
126
|
i18n.unsubscribe(updateContent);
|
|
129
127
|
if (attrs.onUnmount) {
|
|
130
|
-
|
|
128
|
+
attrs.onUnmount(_ref.current);
|
|
131
129
|
}
|
|
132
130
|
};
|
|
133
131
|
return {
|
|
@@ -186,12 +184,16 @@ const setupRouter = (config = {
|
|
|
186
184
|
// default
|
|
187
185
|
}, windowImpl) => {
|
|
188
186
|
const routeRegistrations = [];
|
|
187
|
+
let currentPath = "";
|
|
189
188
|
if (typeof window !== "undefined" && !windowImpl) {
|
|
190
189
|
windowImpl = globalThis.__defuss_window || window;
|
|
191
190
|
}
|
|
192
191
|
if (!windowImpl && !isServer()) {
|
|
193
192
|
console.warn("Router requires a Window API implementation!");
|
|
194
193
|
}
|
|
194
|
+
if (windowImpl) {
|
|
195
|
+
currentPath = windowImpl.document.location.pathname;
|
|
196
|
+
}
|
|
195
197
|
const api = {
|
|
196
198
|
...config,
|
|
197
199
|
listeners: [],
|
|
@@ -220,22 +222,50 @@ const setupRouter = (config = {
|
|
|
220
222
|
},
|
|
221
223
|
navigate(newPath) {
|
|
222
224
|
const strategy = api.strategy || "page-refresh";
|
|
223
|
-
const oldPath =
|
|
225
|
+
const oldPath = currentPath;
|
|
224
226
|
if (strategy === "page-refresh") {
|
|
225
227
|
document.location.href = newPath;
|
|
226
228
|
} else if (strategy === "slot-refresh") {
|
|
227
229
|
if (typeof windowImpl !== "undefined") {
|
|
228
230
|
windowImpl.history.pushState({}, "", newPath);
|
|
229
231
|
}
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
232
|
+
currentPath = newPath;
|
|
233
|
+
queueMicrotask(() => {
|
|
234
|
+
for (const listener of api.listeners) {
|
|
235
|
+
listener(newPath, oldPath);
|
|
236
|
+
}
|
|
237
|
+
});
|
|
233
238
|
}
|
|
234
239
|
},
|
|
235
240
|
getRoutes() {
|
|
236
241
|
return routeRegistrations;
|
|
242
|
+
},
|
|
243
|
+
destroy() {
|
|
244
|
+
if (windowImpl && api.strategy === "slot-refresh") {
|
|
245
|
+
windowImpl.removeEventListener("popstate", handlePopState);
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
attachPopStateHandler() {
|
|
249
|
+
if (windowImpl && api.strategy === "slot-refresh") {
|
|
250
|
+
windowImpl.addEventListener("popstate", handlePopState);
|
|
251
|
+
}
|
|
237
252
|
}
|
|
238
253
|
};
|
|
254
|
+
const handlePopState = (event) => {
|
|
255
|
+
if (api.strategy === "slot-refresh" && windowImpl) {
|
|
256
|
+
const newPath = windowImpl.document.location.pathname;
|
|
257
|
+
const oldPath = currentPath;
|
|
258
|
+
currentPath = newPath;
|
|
259
|
+
queueMicrotask(() => {
|
|
260
|
+
for (const listener of api.listeners) {
|
|
261
|
+
listener(newPath, oldPath);
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
if (windowImpl && api.strategy === "slot-refresh") {
|
|
267
|
+
api.attachPopStateHandler();
|
|
268
|
+
}
|
|
239
269
|
return api;
|
|
240
270
|
};
|
|
241
271
|
const Router = setupRouter();
|
|
@@ -272,13 +302,19 @@ const RouterSlot = ({
|
|
|
272
302
|
router = Router,
|
|
273
303
|
children,
|
|
274
304
|
RouterOutlet,
|
|
305
|
+
transitionConfig = {
|
|
306
|
+
type: "fade",
|
|
307
|
+
duration: 25,
|
|
308
|
+
target: "self"
|
|
309
|
+
},
|
|
275
310
|
...attributes
|
|
276
311
|
}) => {
|
|
277
312
|
const { tag, ...attributesWithoutTag } = attributes;
|
|
278
313
|
const ref = createRef();
|
|
279
314
|
router.strategy = "slot-refresh";
|
|
315
|
+
router.attachPopStateHandler();
|
|
280
316
|
router.onRouteChange(async () => {
|
|
281
|
-
await $(ref).update(RouterOutlet());
|
|
317
|
+
await $(ref).update(RouterOutlet(), transitionConfig);
|
|
282
318
|
});
|
|
283
319
|
if (document.getElementById(RouterSlotId)) {
|
|
284
320
|
console.warn(
|
|
@@ -425,4 +461,4 @@ const Async = ({
|
|
|
425
461
|
};
|
|
426
462
|
const Suspense = Async;
|
|
427
463
|
|
|
428
|
-
export { $, Async, Redirect, Route, Router, RouterSlot, RouterSlotId, Suspense, T, Trans, changeLanguage, createI18n, createRef, createStore, getLanguage, i18n, inDevMode, isRef, loadLanguage, matchRouteRegistrations,
|
|
464
|
+
export { $, Async, Redirect, Route, Router, RouterSlot, RouterSlotId, Suspense, T, Trans, changeLanguage, createI18n, createRef, createStore, getLanguage, i18n, inDevMode, isRef, loadLanguage, matchRouteRegistrations, setupRouter, t, tokenizePath };
|
package/dist/render/client.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var dom = require('../dom-
|
|
3
|
+
var dom = require('../dom-DuPDCLQ6.cjs');
|
|
4
4
|
require('defuss-runtime');
|
|
5
5
|
|
|
6
6
|
const renderSync = (virtualNode, parentDomElement = document.documentElement) => {
|
|
@@ -66,9 +66,7 @@ const hydrate = (nodes, parentElements, debug) => {
|
|
|
66
66
|
);
|
|
67
67
|
}
|
|
68
68
|
if (vnode?.attributes?.onMount) {
|
|
69
|
-
|
|
70
|
-
vnode.attributes?.onMount?.(element);
|
|
71
|
-
});
|
|
69
|
+
vnode.attributes?.onMount?.(element);
|
|
72
70
|
}
|
|
73
71
|
elementIndex++;
|
|
74
72
|
}
|
|
@@ -79,10 +77,13 @@ const hydrate = (nodes, parentElements, debug) => {
|
|
|
79
77
|
}
|
|
80
78
|
};
|
|
81
79
|
|
|
80
|
+
exports.DEFAULT_TRANSITION_CONFIG = dom.DEFAULT_TRANSITION_CONFIG;
|
|
82
81
|
exports.Fragment = dom.Fragment;
|
|
82
|
+
exports.applyStyles = dom.applyStyles;
|
|
83
83
|
exports.createInPlaceErrorMessageVNode = dom.createInPlaceErrorMessageVNode;
|
|
84
84
|
exports.createRef = dom.createRef;
|
|
85
85
|
exports.getRenderer = dom.getRenderer;
|
|
86
|
+
exports.getTransitionStyles = dom.getTransitionStyles;
|
|
86
87
|
exports.globalScopeDomApis = dom.globalScopeDomApis;
|
|
87
88
|
exports.handleLifecycleEventsForOnMount = dom.handleLifecycleEventsForOnMount;
|
|
88
89
|
exports.isJSX = dom.isJSX;
|
|
@@ -91,6 +92,7 @@ exports.jsx = dom.jsx;
|
|
|
91
92
|
exports.jsxDEV = dom.jsxDEV;
|
|
92
93
|
exports.jsxs = dom.jsxs;
|
|
93
94
|
exports.observeUnmount = dom.observeUnmount;
|
|
95
|
+
exports.performTransition = dom.performTransition;
|
|
94
96
|
exports.renderIsomorphicAsync = dom.renderIsomorphicAsync;
|
|
95
97
|
exports.renderIsomorphicSync = dom.renderIsomorphicSync;
|
|
96
98
|
exports.updateDom = dom.updateDom;
|
package/dist/render/client.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as RenderInput, P as ParentElementInput, a as RenderResult, b as ParentElementInputAsync, h as VNode } from '../index-
|
|
2
|
-
export { A as AllHTMLElements, C as CSSProperties, p as Children, 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, 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, t as createInPlaceErrorMessageVNode, Q as createRef, x as getRenderer, E as globalScopeDomApis, w as handleLifecycleEventsForOnMount, H as isJSX, O as isRef, u as jsx, L as jsxDEV, J as jsxs, v as observeUnmount, B as renderIsomorphicAsync, z as renderIsomorphicSync, M as updateDom } from '../index-
|
|
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';
|
|
3
3
|
import * as CSS from 'csstype';
|
|
4
4
|
export { CSS };
|
|
5
5
|
|
package/dist/render/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as RenderInput, P as ParentElementInput, a as RenderResult, b as ParentElementInputAsync, h as VNode } from '../index-
|
|
2
|
-
export { A as AllHTMLElements, C as CSSProperties, p as Children, 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, 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, t as createInPlaceErrorMessageVNode, Q as createRef, x as getRenderer, E as globalScopeDomApis, w as handleLifecycleEventsForOnMount, H as isJSX, O as isRef, u as jsx, L as jsxDEV, J as jsxs, v as observeUnmount, B as renderIsomorphicAsync, z as renderIsomorphicSync, M as updateDom } from '../index-
|
|
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';
|
|
3
3
|
import * as CSS from 'csstype';
|
|
4
4
|
export { CSS };
|
|
5
5
|
|
package/dist/render/client.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as globalScopeDomApis, r as renderIsomorphicSync, a as renderIsomorphicAsync, o as observeUnmount } from '../dom-
|
|
2
|
-
export { F as Fragment, c as createInPlaceErrorMessageVNode, k as createRef, g as getRenderer, h as handleLifecycleEventsForOnMount, i as isJSX, f as isRef, j as jsx, e as jsxDEV, d as jsxs, u as updateDom } from '../dom-
|
|
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';
|
|
3
3
|
import 'defuss-runtime';
|
|
4
4
|
|
|
5
5
|
const renderSync = (virtualNode, parentDomElement = document.documentElement) => {
|
|
@@ -65,9 +65,7 @@ const hydrate = (nodes, parentElements, debug) => {
|
|
|
65
65
|
);
|
|
66
66
|
}
|
|
67
67
|
if (vnode?.attributes?.onMount) {
|
|
68
|
-
|
|
69
|
-
vnode.attributes?.onMount?.(element);
|
|
70
|
-
});
|
|
68
|
+
vnode.attributes?.onMount?.(element);
|
|
71
69
|
}
|
|
72
70
|
elementIndex++;
|
|
73
71
|
}
|
package/dist/render/index.cjs
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var dom = require('../dom-
|
|
3
|
+
var dom = require('../dom-DuPDCLQ6.cjs');
|
|
4
4
|
require('defuss-runtime');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
+
exports.DEFAULT_TRANSITION_CONFIG = dom.DEFAULT_TRANSITION_CONFIG;
|
|
8
9
|
exports.Fragment = dom.Fragment;
|
|
10
|
+
exports.applyStyles = dom.applyStyles;
|
|
9
11
|
exports.createInPlaceErrorMessageVNode = dom.createInPlaceErrorMessageVNode;
|
|
10
12
|
exports.createRef = dom.createRef;
|
|
11
13
|
exports.getRenderer = dom.getRenderer;
|
|
14
|
+
exports.getTransitionStyles = dom.getTransitionStyles;
|
|
12
15
|
exports.globalScopeDomApis = dom.globalScopeDomApis;
|
|
13
16
|
exports.handleLifecycleEventsForOnMount = dom.handleLifecycleEventsForOnMount;
|
|
14
17
|
exports.isJSX = dom.isJSX;
|
|
@@ -17,6 +20,7 @@ exports.jsx = dom.jsx;
|
|
|
17
20
|
exports.jsxDEV = dom.jsxDEV;
|
|
18
21
|
exports.jsxs = dom.jsxs;
|
|
19
22
|
exports.observeUnmount = dom.observeUnmount;
|
|
23
|
+
exports.performTransition = dom.performTransition;
|
|
20
24
|
exports.renderIsomorphicAsync = dom.renderIsomorphicAsync;
|
|
21
25
|
exports.renderIsomorphicSync = dom.renderIsomorphicSync;
|
|
22
26
|
exports.updateDom = dom.updateDom;
|
package/dist/render/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { A as AllHTMLElements, C as CSSProperties, p as Children, 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, 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, t as createInPlaceErrorMessageVNode, Q as createRef, x as getRenderer, E as globalScopeDomApis, w as handleLifecycleEventsForOnMount, H as isJSX, O as isRef, u as jsx, L as jsxDEV, J as jsxs, v as observeUnmount, B as renderIsomorphicAsync, z as renderIsomorphicSync, M as updateDom } from '../index-
|
|
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';
|
|
2
2
|
import * as CSS from 'csstype';
|
|
3
3
|
export { CSS };
|
package/dist/render/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { A as AllHTMLElements, C as CSSProperties, p as Children, 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, 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, t as createInPlaceErrorMessageVNode, Q as createRef, x as getRenderer, E as globalScopeDomApis, w as handleLifecycleEventsForOnMount, H as isJSX, O as isRef, u as jsx, L as jsxDEV, J as jsxs, v as observeUnmount, B as renderIsomorphicAsync, z as renderIsomorphicSync, M as updateDom } from '../index-
|
|
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';
|
|
2
2
|
import * as CSS from 'csstype';
|
|
3
3
|
export { CSS };
|
package/dist/render/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { F as Fragment, c as createInPlaceErrorMessageVNode, k as createRef, g as getRenderer, b as globalScopeDomApis, h as handleLifecycleEventsForOnMount, i as isJSX, f as isRef, j as jsx, e as jsxDEV, d as jsxs, o as observeUnmount, a as renderIsomorphicAsync, r as renderIsomorphicSync, u as updateDom } from '../dom-
|
|
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';
|
|
2
2
|
import 'defuss-runtime';
|
package/dist/render/server.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var HappyDom = require('happy-dom');
|
|
4
|
-
var dom = require('../dom-
|
|
4
|
+
var dom = require('../dom-DuPDCLQ6.cjs');
|
|
5
5
|
var serializeHtml = require('w3c-xmlserializer');
|
|
6
6
|
require('defuss-runtime');
|
|
7
7
|
|
|
@@ -72,10 +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.DEFAULT_TRANSITION_CONFIG = dom.DEFAULT_TRANSITION_CONFIG;
|
|
75
76
|
exports.Fragment = dom.Fragment;
|
|
77
|
+
exports.applyStyles = dom.applyStyles;
|
|
76
78
|
exports.createInPlaceErrorMessageVNode = dom.createInPlaceErrorMessageVNode;
|
|
77
79
|
exports.createRef = dom.createRef;
|
|
78
80
|
exports.getRenderer = dom.getRenderer;
|
|
81
|
+
exports.getTransitionStyles = dom.getTransitionStyles;
|
|
79
82
|
exports.globalScopeDomApis = dom.globalScopeDomApis;
|
|
80
83
|
exports.handleLifecycleEventsForOnMount = dom.handleLifecycleEventsForOnMount;
|
|
81
84
|
exports.isJSX = dom.isJSX;
|
|
@@ -84,6 +87,7 @@ exports.jsx = dom.jsx;
|
|
|
84
87
|
exports.jsxDEV = dom.jsxDEV;
|
|
85
88
|
exports.jsxs = dom.jsxs;
|
|
86
89
|
exports.observeUnmount = dom.observeUnmount;
|
|
90
|
+
exports.performTransition = dom.performTransition;
|
|
87
91
|
exports.renderIsomorphicAsync = dom.renderIsomorphicAsync;
|
|
88
92
|
exports.renderIsomorphicSync = dom.renderIsomorphicSync;
|
|
89
93
|
exports.updateDom = dom.updateDom;
|
package/dist/render/server.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { G as Globals, R as RenderInput, P as ParentElementInput, a as RenderResult, b as ParentElementInputAsync } from '../index-
|
|
2
|
-
export { A as AllHTMLElements, C as CSSProperties, p as Children, 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, 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, t as createInPlaceErrorMessageVNode, Q as createRef, x as getRenderer, E as globalScopeDomApis, w as handleLifecycleEventsForOnMount, H as isJSX, O as isRef, u as jsx, L as jsxDEV, J as jsxs, v as observeUnmount, B as renderIsomorphicAsync, z as renderIsomorphicSync, M as updateDom } from '../index-
|
|
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';
|
|
3
3
|
import * as CSS from 'csstype';
|
|
4
4
|
export { CSS };
|
|
5
5
|
|
package/dist/render/server.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { G as Globals, R as RenderInput, P as ParentElementInput, a as RenderResult, b as ParentElementInputAsync } from '../index-
|
|
2
|
-
export { A as AllHTMLElements, C as CSSProperties, p as Children, 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, 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, t as createInPlaceErrorMessageVNode, Q as createRef, x as getRenderer, E as globalScopeDomApis, w as handleLifecycleEventsForOnMount, H as isJSX, O as isRef, u as jsx, L as jsxDEV, J as jsxs, v as observeUnmount, B as renderIsomorphicAsync, z as renderIsomorphicSync, M as updateDom } from '../index-
|
|
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';
|
|
3
3
|
import * as CSS from 'csstype';
|
|
4
4
|
export { CSS };
|
|
5
5
|
|
package/dist/render/server.mjs
CHANGED
|
@@ -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-
|
|
3
|
-
export { F as Fragment, c as createInPlaceErrorMessageVNode, k as createRef, g as getRenderer, h as handleLifecycleEventsForOnMount, i as isJSX, f as isRef, j as jsx, e as jsxDEV, d as jsxs, o as observeUnmount, u as updateDom } from '../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';
|
|
4
4
|
import serializeHtml from 'w3c-xmlserializer';
|
|
5
5
|
import 'defuss-runtime';
|
|
6
6
|
|