defuss 2.0.17 → 2.1.1
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-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-B1A7C07a.cjs +2278 -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-B8Nu6WeP.cjs +2278 -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-BIjjeDUU.mjs +2216 -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_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-C95ue10z.cjs +2274 -0
- package/dist/dom-CEXwGUHT.mjs +2175 -0
- package/dist/dom-CKDuv_GB.cjs +2700 -0
- package/dist/dom-CRmy0cD5.cjs +2274 -0
- package/dist/dom-CX9zlNhe.mjs +2492 -0
- package/dist/dom-CbnDrfq8.mjs +2491 -0
- package/dist/dom-Cg8xF9s2.mjs +2634 -0
- package/dist/dom-Cgi1LYfG.mjs +2626 -0
- package/dist/dom-CiUM5iRV.mjs +2208 -0
- package/dist/dom-Cj-ITpFq.mjs +2312 -0
- package/dist/dom-Cka7SFtU.mjs +2486 -0
- package/dist/dom-Cl4KLBe2.mjs +2212 -0
- package/dist/dom-Co9qKYKH.mjs +2208 -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-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-DK9OsuHY.cjs +2281 -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-DTqN1pTP.mjs +2215 -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-Db4PHLSs.cjs +2282 -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-Dv7NYXDp.cjs +2278 -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-fZQn7O9l.cjs +2278 -0
- package/dist/dom-gRbdIyyK.cjs +2604 -0
- package/dist/dom-nqHAD9D_.mjs +2212 -0
- package/dist/dom-qpb9kPPR.mjs +2212 -0
- package/dist/dom-rGg1mmtQ.cjs +2103 -0
- package/dist/dom-unkLyMam.mjs +2486 -0
- package/dist/dom-vZS7gOVB.cjs +2714 -0
- package/dist/dom-wNstqp5x.mjs +2212 -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 +50 -8
- package/dist/index.d.cts +8 -4
- package/dist/index.d.ts +8 -4
- package/dist/index.mjs +47 -9
- 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,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var dom = require('./dom-
|
|
3
|
+
var dom = require('./dom-C95ue10z.cjs');
|
|
4
4
|
require('defuss-runtime');
|
|
5
5
|
|
|
6
6
|
const inDevMode = true;
|
|
@@ -120,13 +120,13 @@ const Trans = ({
|
|
|
120
120
|
const onMount = () => {
|
|
121
121
|
i18n.subscribe(updateContent);
|
|
122
122
|
if (attrs.onMount) {
|
|
123
|
-
|
|
123
|
+
attrs.onMount(_ref.current);
|
|
124
124
|
}
|
|
125
125
|
};
|
|
126
126
|
const onUnmount = () => {
|
|
127
127
|
i18n.unsubscribe(updateContent);
|
|
128
128
|
if (attrs.onUnmount) {
|
|
129
|
-
|
|
129
|
+
attrs.onUnmount(_ref.current);
|
|
130
130
|
}
|
|
131
131
|
};
|
|
132
132
|
return {
|
|
@@ -185,12 +185,16 @@ const setupRouter = (config = {
|
|
|
185
185
|
// default
|
|
186
186
|
}, windowImpl) => {
|
|
187
187
|
const routeRegistrations = [];
|
|
188
|
+
let currentPath = "";
|
|
188
189
|
if (typeof window !== "undefined" && !windowImpl) {
|
|
189
190
|
windowImpl = globalThis.__defuss_window || window;
|
|
190
191
|
}
|
|
191
192
|
if (!windowImpl && !dom.isServer()) {
|
|
192
193
|
console.warn("Router requires a Window API implementation!");
|
|
193
194
|
}
|
|
195
|
+
if (windowImpl) {
|
|
196
|
+
currentPath = windowImpl.document.location.pathname;
|
|
197
|
+
}
|
|
194
198
|
const api = {
|
|
195
199
|
...config,
|
|
196
200
|
listeners: [],
|
|
@@ -219,22 +223,50 @@ const setupRouter = (config = {
|
|
|
219
223
|
},
|
|
220
224
|
navigate(newPath) {
|
|
221
225
|
const strategy = api.strategy || "page-refresh";
|
|
222
|
-
const oldPath =
|
|
226
|
+
const oldPath = currentPath;
|
|
223
227
|
if (strategy === "page-refresh") {
|
|
224
228
|
document.location.href = newPath;
|
|
225
229
|
} else if (strategy === "slot-refresh") {
|
|
226
230
|
if (typeof windowImpl !== "undefined") {
|
|
227
231
|
windowImpl.history.pushState({}, "", newPath);
|
|
228
232
|
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
233
|
+
currentPath = newPath;
|
|
234
|
+
queueMicrotask(() => {
|
|
235
|
+
for (const listener of api.listeners) {
|
|
236
|
+
listener(newPath, oldPath);
|
|
237
|
+
}
|
|
238
|
+
});
|
|
232
239
|
}
|
|
233
240
|
},
|
|
234
241
|
getRoutes() {
|
|
235
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
|
+
}
|
|
253
|
+
}
|
|
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
|
+
});
|
|
236
265
|
}
|
|
237
266
|
};
|
|
267
|
+
if (windowImpl && api.strategy === "slot-refresh") {
|
|
268
|
+
api.attachPopStateHandler();
|
|
269
|
+
}
|
|
238
270
|
return api;
|
|
239
271
|
};
|
|
240
272
|
const Router = setupRouter();
|
|
@@ -271,13 +303,19 @@ const RouterSlot = ({
|
|
|
271
303
|
router = Router,
|
|
272
304
|
children,
|
|
273
305
|
RouterOutlet,
|
|
306
|
+
transitionConfig = {
|
|
307
|
+
type: "fade",
|
|
308
|
+
duration: 25,
|
|
309
|
+
target: "self"
|
|
310
|
+
},
|
|
274
311
|
...attributes
|
|
275
312
|
}) => {
|
|
276
313
|
const { tag, ...attributesWithoutTag } = attributes;
|
|
277
314
|
const ref = dom.createRef();
|
|
278
315
|
router.strategy = "slot-refresh";
|
|
316
|
+
router.attachPopStateHandler();
|
|
279
317
|
router.onRouteChange(async () => {
|
|
280
|
-
await dom.$(ref).update(RouterOutlet());
|
|
318
|
+
await dom.$(ref).update(RouterOutlet(), transitionConfig);
|
|
281
319
|
});
|
|
282
320
|
if (document.getElementById(RouterSlotId)) {
|
|
283
321
|
console.warn(
|
|
@@ -428,9 +466,11 @@ exports.$ = dom.$;
|
|
|
428
466
|
exports.Call = dom.Call;
|
|
429
467
|
exports.CallChainImpl = dom.CallChainImpl;
|
|
430
468
|
exports.CallChainImplThenable = dom.CallChainImplThenable;
|
|
469
|
+
exports.DEFAULT_TRANSITION_CONFIG = dom.DEFAULT_TRANSITION_CONFIG;
|
|
431
470
|
exports.Fragment = dom.Fragment;
|
|
432
471
|
exports.addElementEvent = dom.addElementEvent;
|
|
433
472
|
exports.addNonChainedReturnCallNames = dom.addNonChainedReturnCallNames;
|
|
473
|
+
exports.applyStyles = dom.applyStyles;
|
|
434
474
|
exports.areDomNodesEqual = dom.areDomNodesEqual;
|
|
435
475
|
exports.checkElementVisibility = dom.checkElementVisibility;
|
|
436
476
|
exports.clearElementEvents = dom.clearElementEvents;
|
|
@@ -450,6 +490,7 @@ exports.getEventMap = dom.getEventMap;
|
|
|
450
490
|
exports.getMimeType = dom.getMimeType;
|
|
451
491
|
exports.getNonChainedReturnCallNames = dom.getNonChainedReturnCallNames;
|
|
452
492
|
exports.getRenderer = dom.getRenderer;
|
|
493
|
+
exports.getTransitionStyles = dom.getTransitionStyles;
|
|
453
494
|
exports.globalScopeDomApis = dom.globalScopeDomApis;
|
|
454
495
|
exports.handleLifecycleEventsForOnMount = dom.handleLifecycleEventsForOnMount;
|
|
455
496
|
exports.htmlStringToVNodes = dom.htmlStringToVNodes;
|
|
@@ -467,6 +508,7 @@ exports.jsxs = dom.jsxs;
|
|
|
467
508
|
exports.mapArrayIndexAccess = dom.mapArrayIndexAccess;
|
|
468
509
|
exports.observeUnmount = dom.observeUnmount;
|
|
469
510
|
exports.parseDOM = dom.parseDOM;
|
|
511
|
+
exports.performTransition = dom.performTransition;
|
|
470
512
|
exports.processAllFormElements = dom.processAllFormElements;
|
|
471
513
|
exports.queueCallback = dom.queueCallback;
|
|
472
514
|
exports.removeElementEvent = dom.removeElementEvent;
|
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,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { n as createStore, q as isServer, k as createRef, $, f as isRef } from './dom-CiUM5iRV.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-CiUM5iRV.mjs';
|
|
3
3
|
import 'defuss-runtime';
|
|
4
4
|
|
|
5
5
|
const inDevMode = true;
|
|
@@ -119,13 +119,13 @@ const Trans = ({
|
|
|
119
119
|
const onMount = () => {
|
|
120
120
|
i18n.subscribe(updateContent);
|
|
121
121
|
if (attrs.onMount) {
|
|
122
|
-
|
|
122
|
+
attrs.onMount(_ref.current);
|
|
123
123
|
}
|
|
124
124
|
};
|
|
125
125
|
const onUnmount = () => {
|
|
126
126
|
i18n.unsubscribe(updateContent);
|
|
127
127
|
if (attrs.onUnmount) {
|
|
128
|
-
|
|
128
|
+
attrs.onUnmount(_ref.current);
|
|
129
129
|
}
|
|
130
130
|
};
|
|
131
131
|
return {
|
|
@@ -184,12 +184,16 @@ const setupRouter = (config = {
|
|
|
184
184
|
// default
|
|
185
185
|
}, windowImpl) => {
|
|
186
186
|
const routeRegistrations = [];
|
|
187
|
+
let currentPath = "";
|
|
187
188
|
if (typeof window !== "undefined" && !windowImpl) {
|
|
188
189
|
windowImpl = globalThis.__defuss_window || window;
|
|
189
190
|
}
|
|
190
191
|
if (!windowImpl && !isServer()) {
|
|
191
192
|
console.warn("Router requires a Window API implementation!");
|
|
192
193
|
}
|
|
194
|
+
if (windowImpl) {
|
|
195
|
+
currentPath = windowImpl.document.location.pathname;
|
|
196
|
+
}
|
|
193
197
|
const api = {
|
|
194
198
|
...config,
|
|
195
199
|
listeners: [],
|
|
@@ -218,22 +222,50 @@ const setupRouter = (config = {
|
|
|
218
222
|
},
|
|
219
223
|
navigate(newPath) {
|
|
220
224
|
const strategy = api.strategy || "page-refresh";
|
|
221
|
-
const oldPath =
|
|
225
|
+
const oldPath = currentPath;
|
|
222
226
|
if (strategy === "page-refresh") {
|
|
223
227
|
document.location.href = newPath;
|
|
224
228
|
} else if (strategy === "slot-refresh") {
|
|
225
229
|
if (typeof windowImpl !== "undefined") {
|
|
226
230
|
windowImpl.history.pushState({}, "", newPath);
|
|
227
231
|
}
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
232
|
+
currentPath = newPath;
|
|
233
|
+
queueMicrotask(() => {
|
|
234
|
+
for (const listener of api.listeners) {
|
|
235
|
+
listener(newPath, oldPath);
|
|
236
|
+
}
|
|
237
|
+
});
|
|
231
238
|
}
|
|
232
239
|
},
|
|
233
240
|
getRoutes() {
|
|
234
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
|
+
}
|
|
252
|
+
}
|
|
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
|
+
});
|
|
235
264
|
}
|
|
236
265
|
};
|
|
266
|
+
if (windowImpl && api.strategy === "slot-refresh") {
|
|
267
|
+
api.attachPopStateHandler();
|
|
268
|
+
}
|
|
237
269
|
return api;
|
|
238
270
|
};
|
|
239
271
|
const Router = setupRouter();
|
|
@@ -270,13 +302,19 @@ const RouterSlot = ({
|
|
|
270
302
|
router = Router,
|
|
271
303
|
children,
|
|
272
304
|
RouterOutlet,
|
|
305
|
+
transitionConfig = {
|
|
306
|
+
type: "fade",
|
|
307
|
+
duration: 25,
|
|
308
|
+
target: "self"
|
|
309
|
+
},
|
|
273
310
|
...attributes
|
|
274
311
|
}) => {
|
|
275
312
|
const { tag, ...attributesWithoutTag } = attributes;
|
|
276
313
|
const ref = createRef();
|
|
277
314
|
router.strategy = "slot-refresh";
|
|
315
|
+
router.attachPopStateHandler();
|
|
278
316
|
router.onRouteChange(async () => {
|
|
279
|
-
await $(ref).update(RouterOutlet());
|
|
317
|
+
await $(ref).update(RouterOutlet(), transitionConfig);
|
|
280
318
|
});
|
|
281
319
|
if (document.getElementById(RouterSlotId)) {
|
|
282
320
|
console.warn(
|
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-C95ue10z.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-CiUM5iRV.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-CiUM5iRV.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-C95ue10z.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-CiUM5iRV.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-C95ue10z.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-CiUM5iRV.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-CiUM5iRV.mjs';
|
|
4
4
|
import serializeHtml from 'w3c-xmlserializer';
|
|
5
5
|
import 'defuss-runtime';
|
|
6
6
|
|