@fluixi/core 1.0.0-alpha.100 → 1.0.0-alpha.102
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/README.md +11 -11
- package/dist/cdn/core.global.js +2 -2
- package/dist/src/cdn/core.cjs +2 -7
- package/dist/src/cdn/core.mjs +2 -8
- package/dist/src/index.cjs +2 -18
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +0 -1
- package/dist/src/index.mjs +2 -18
- package/dist/src/jsx-runtime.d.ts +1 -1
- package/dist/src/jsx-runtime.js +1 -4
- package/dist/src/lib/client/{chunk-FDOPDB6Z.mjs → chunk-PLBLUAUD.mjs} +1 -1
- package/dist/src/lib/client/index.cjs +2 -2
- package/dist/src/lib/client/index.d.ts +1 -1
- package/dist/src/lib/client/index.js +2 -2
- package/dist/src/lib/client/index.mjs +4 -4
- package/dist/src/lib/client/{router-4PTBPZLQ.mjs → router-LQ57EOB4.mjs} +2 -2
- package/dist/src/lib/core.cjs +1 -17
- package/dist/src/lib/core.d.ts +2 -6
- package/dist/src/lib/core.d.ts.map +1 -1
- package/dist/src/lib/core.js +6 -22
- package/dist/src/lib/core.mjs +1 -17
- package/dist/src/lib/i18n/index.cjs +1 -1
- package/dist/src/lib/i18n/index.mjs +1 -1
- package/dist/src/lib/index.cjs +2 -8
- package/dist/src/lib/index.d.ts +3 -9
- package/dist/src/lib/index.d.ts.map +1 -1
- package/dist/src/lib/index.js +3 -26
- package/dist/src/lib/index.mjs +2 -9
- package/dist/src/lib/jsx-runtime/index.cjs +1 -1
- package/dist/src/lib/jsx-runtime/index.mjs +1 -1
- package/dist/src/lib/jsx-runtime/jsx-dev-runtime.cjs +1 -1
- package/dist/src/lib/jsx-runtime/jsx-dev-runtime.mjs +1 -1
- package/dist/src/lib/plugins/index.cjs +1 -1
- package/dist/src/lib/plugins/index.mjs +1 -1
- package/dist/src/lib/plugins/route-codegen.d.ts.map +1 -1
- package/dist/src/lib/plugins/route-codegen.js +0 -6
- package/dist/src/lib/plugins/route-scanner.d.ts.map +1 -1
- package/dist/src/lib/plugins/route-scanner.js +0 -6
- package/dist/src/lib/render/component.d.ts +0 -3
- package/dist/src/lib/render/component.d.ts.map +1 -1
- package/dist/src/lib/render/component.js +0 -21
- package/dist/src/lib/render/index.cjs +1 -10
- package/dist/src/lib/render/index.d.ts +1 -4
- package/dist/src/lib/render/index.d.ts.map +1 -1
- package/dist/src/lib/render/index.js +1 -21
- package/dist/src/lib/render/index.mjs +1 -10
- package/dist/src/lib/render/lazy.js +1 -1
- package/dist/src/lib/render/suspense.cjs +0 -5
- package/dist/src/lib/render/suspense.d.ts +1 -2
- package/dist/src/lib/render/suspense.d.ts.map +1 -1
- package/dist/src/lib/render/suspense.js +1 -8
- package/dist/src/lib/render/suspense.mjs +0 -5
- package/dist/src/lib/render/versions.cjs +1 -1
- package/dist/src/lib/render/versions.mjs +1 -1
- package/dist/src/lib/router/data.d.ts.map +1 -1
- package/dist/src/lib/router/data.js +0 -5
- package/dist/src/lib/router/index.cjs +1 -1
- package/dist/src/lib/router/index.js +5 -5
- package/dist/src/lib/router/index.mjs +1 -1
- package/dist/src/lib/server/hydration.d.ts +0 -6
- package/dist/src/lib/server/hydration.d.ts.map +1 -1
- package/dist/src/lib/server/hydration.js +0 -22
- package/dist/src/lib/server/index.cjs +1 -1
- package/dist/src/lib/server/index.d.ts +1 -7
- package/dist/src/lib/server/index.d.ts.map +1 -1
- package/dist/src/lib/server/index.js +1 -12
- package/dist/src/lib/server/index.mjs +1 -1
- package/dist/src/lib/server/reactive.d.ts.map +1 -1
- package/dist/src/lib/server/reactive.js +0 -35
- package/dist/src/lib/storage/index.cjs +1 -1
- package/dist/src/lib/storage/index.mjs +1 -1
- package/dist/src/routes.cjs +1 -1
- package/dist/src/routes.mjs +1 -1
- package/dist/src/server.d.ts +0 -1
- package/dist/src/server.d.ts.map +1 -1
- package/dist/src/server.js +0 -1
- package/dist/src/utils.cjs +1 -1
- package/dist/src/utils.mjs +1 -1
- package/dist/src/version.generated.cjs +1 -1
- package/dist/src/version.generated.d.ts +1 -1
- package/dist/src/version.generated.js +1 -1
- package/dist/src/version.generated.mjs +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +20 -24
- package/src/index.ts +0 -2
- package/dist/cli/generate.cjs +0 -5639
- package/dist/cli/generate.d.ts +0 -7
- package/dist/cli/generate.d.ts.map +0 -1
- package/dist/cli/generate.js +0 -2580
- package/dist/cli/generate.mjs +0 -5644
- package/dist/cli/index.cjs +0 -5639
- package/dist/cli/index.d.ts +0 -7
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/index.js +0 -2580
- package/dist/cli/index.mjs +0 -5644
- package/dist/cli/run.cjs +0 -64
- package/dist/cli/run.d.ts +0 -3
- package/dist/cli/run.d.ts.map +0 -1
- package/dist/cli/run.js +0 -62
- package/dist/cli/run.mjs +0 -40
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suspense.d.ts","sourceRoot":"","sources":["../../../../src/lib/render/suspense.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAuBH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,GAAG,CAAC;IACd,WAAW,CAAC,EAAE,UAAU,GAAG,WAAW,GAAG,UAAU,CAAC;IACpD,IAAI,CAAC,EAAE,WAAW,GAAG,QAAQ,CAAC;CAC/B;AAED,eAAO,MAAM,SAAS,eAAyB,CAAC;AAEhD,iBAAS,MAAM,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,IAAI,CAIzC;AAED,iBAAS,
|
|
1
|
+
{"version":3,"file":"suspense.d.ts","sourceRoot":"","sources":["../../../../src/lib/render/suspense.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAuBH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,GAAG,CAAC;IACd,WAAW,CAAC,EAAE,UAAU,GAAG,WAAW,GAAG,UAAU,CAAC;IACpD,IAAI,CAAC,EAAE,WAAW,GAAG,QAAQ,CAAC;CAC/B;AAED,eAAO,MAAM,SAAS,eAAyB,CAAC;AAEhD,iBAAS,MAAM,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,IAAI,CAIzC;AAED,iBAAS,SAAS,CAAC,CAAC,GAAG,GAAG,EAAE,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,OAAO,CAAC,CAAC,CAAC,CAK3D;AAED,iBAAS,YAAY,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAEzC;AAYD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,GAAG,CAElD;AA+ED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,GAAG,CAE1D;AAwDD,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -14,13 +14,6 @@ function isNode(value) {
|
|
|
14
14
|
return true;
|
|
15
15
|
return !!(value && typeof value === 'object' && typeof value.nodeType === 'number');
|
|
16
16
|
}
|
|
17
|
-
function isLitResult(value) {
|
|
18
|
-
if (!value || typeof value !== 'object')
|
|
19
|
-
return false;
|
|
20
|
-
return !!(typeof value['_$litType$'] !== 'undefined' ||
|
|
21
|
-
typeof value['_$litDirective$'] !== 'undefined' ||
|
|
22
|
-
(Array.isArray(value.strings) && Array.isArray(value.values)));
|
|
23
|
-
}
|
|
24
17
|
function isPromise(value) {
|
|
25
18
|
return !!((value && typeof value === 'object' && typeof value.then === 'function') ||
|
|
26
19
|
value instanceof Promise);
|
|
@@ -193,4 +186,4 @@ function SuspenseListImpl(props) {
|
|
|
193
186
|
}
|
|
194
187
|
asSuspense(Suspense);
|
|
195
188
|
Object.defineProperty(Suspense, '__suspense', { value: true, enumerable: true });
|
|
196
|
-
export { isNode,
|
|
189
|
+
export { isNode, isPromise, isJSXElement };
|
|
@@ -23,10 +23,6 @@ function isNode(value) {
|
|
|
23
23
|
if (typeof Node === "function" && value instanceof Node) return true;
|
|
24
24
|
return !!(value && typeof value === "object" && typeof value.nodeType === "number");
|
|
25
25
|
}
|
|
26
|
-
function isLitResult(value) {
|
|
27
|
-
if (!value || typeof value !== "object") return false;
|
|
28
|
-
return !!(typeof value["_$litType$"] !== "undefined" || typeof value["_$litDirective$"] !== "undefined" || Array.isArray(value.strings) && Array.isArray(value.values));
|
|
29
|
-
}
|
|
30
26
|
function isPromise(value) {
|
|
31
27
|
return !!(value && typeof value === "object" && typeof value.then === "function" || value instanceof Promise);
|
|
32
28
|
}
|
|
@@ -130,7 +126,6 @@ export {
|
|
|
130
126
|
Suspense,
|
|
131
127
|
SuspenseList,
|
|
132
128
|
isJSXElement,
|
|
133
|
-
isLitResult,
|
|
134
129
|
isNode,
|
|
135
130
|
isPromise
|
|
136
131
|
};
|
|
@@ -28,7 +28,7 @@ module.exports = __toCommonJS(versions_exports);
|
|
|
28
28
|
var import_dom = require("@fluixi/dom");
|
|
29
29
|
|
|
30
30
|
// src/version.generated.ts
|
|
31
|
-
var VERSION = "1.0.0-alpha.
|
|
31
|
+
var VERSION = "1.0.0-alpha.102";
|
|
32
32
|
|
|
33
33
|
// src/lib/render/versions.ts
|
|
34
34
|
var import_dom2 = require("@fluixi/dom");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../../src/lib/router/data.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGL,KAA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;CAA8C,CAAC;AAE5E,eAAO,MAAM,iBAAiB;;;;SAA4B,CAAC;AAE3D;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,CAAC,KAAK,MAAM,CAAC,GAAG,SAAS,CAGrD"}
|
|
@@ -109,20 +109,15 @@ if (typeof window !== 'undefined') {
|
|
|
109
109
|
}
|
|
110
110
|
// `@fluixi/api/client` applies `x-fx-revalidate` through this, without importing the router.
|
|
111
111
|
globalThis[Symbol.for('fluixi.revalidate')] = (names) => revalidate(names);
|
|
112
|
-
// ============================================================================
|
|
113
112
|
// ASYNC DATA PRIMITIVES
|
|
114
|
-
// ============================================================================
|
|
115
113
|
/**
|
|
116
114
|
* Create an async resource from a promise or cache function
|
|
117
115
|
*/
|
|
118
116
|
export function createAsync(fetcher, source) {
|
|
119
117
|
const [data] = createResource(source || (() => true), fetcher);
|
|
120
118
|
return data;
|
|
121
|
-
// return () => '' as any;
|
|
122
119
|
}
|
|
123
|
-
// ============================================================================
|
|
124
120
|
// ACTIONS
|
|
125
|
-
// ============================================================================
|
|
126
121
|
const submissionState = new Map();
|
|
127
122
|
function getSubmissionSignal(url) {
|
|
128
123
|
if (!submissionState.has(url)) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @fluixi/core v1.0.0-alpha.
|
|
1
|
+
/*! @fluixi/core v1.0.0-alpha.102 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
|
|
2
2
|
"use strict";
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -424,7 +424,7 @@ export function Router(props) {
|
|
|
424
424
|
},
|
|
425
425
|
});
|
|
426
426
|
}
|
|
427
|
-
//
|
|
427
|
+
// Outlet
|
|
428
428
|
/** Renders this layout's child route, inside this layout's context. */
|
|
429
429
|
export function Outlet() {
|
|
430
430
|
const ctx = useContext(OutletContext);
|
|
@@ -478,7 +478,7 @@ export function Redirect(props) {
|
|
|
478
478
|
}
|
|
479
479
|
return null;
|
|
480
480
|
}
|
|
481
|
-
//
|
|
481
|
+
// Hooks
|
|
482
482
|
// Safe stub returned by useRouter on the SERVER when no RouterContext is on the owner
|
|
483
483
|
// chain. That happens during a late/detached re-render: e.g. a slow data resource
|
|
484
484
|
// settling after renderToStringAsync already serialized the response and disposed the
|
|
@@ -749,7 +749,7 @@ export function Link(props) {
|
|
|
749
749
|
continue;
|
|
750
750
|
const v = props[k];
|
|
751
751
|
if (typeof v === 'function') {
|
|
752
|
-
// An accessor (`title={() => t('
|
|
752
|
+
// An accessor (`title={() => t('...')}`, `aria-current={() => ...}`): followed on the client,
|
|
753
753
|
// read once for the server's markup. Event handlers are not attributes.
|
|
754
754
|
if (/^on[A-Z]/.test(k))
|
|
755
755
|
continue;
|
|
@@ -870,7 +870,7 @@ export function ActionForm(props) {
|
|
|
870
870
|
insert(form, children);
|
|
871
871
|
return form;
|
|
872
872
|
}
|
|
873
|
-
//
|
|
873
|
+
// Hydration preload
|
|
874
874
|
/**
|
|
875
875
|
* Download the lazy component chunks for the route(s) matching `pathname` and resolve when
|
|
876
876
|
* they're all loaded. Await this before hydrating: once each matched lazy file-route is
|
|
@@ -891,7 +891,7 @@ export async function preloadRoutes(routes, pathname) {
|
|
|
891
891
|
}
|
|
892
892
|
await Promise.all(loads);
|
|
893
893
|
}
|
|
894
|
-
//
|
|
894
|
+
// Re-exports
|
|
895
895
|
export { createMemoryHistory, createBrowserHistory, matchRoutes, matchPath, } from '@fluixi/router';
|
|
896
896
|
// Action/cache/lazy layer is orthogonal to routing: re-export so a route file can
|
|
897
897
|
// swap its import path wholesale. (Routing hooks above are the router ones.)
|
|
@@ -128,13 +128,7 @@ export declare function generateMarkerID(): string;
|
|
|
128
128
|
* ```
|
|
129
129
|
*/
|
|
130
130
|
export declare function hydrationMarker(id: string): string;
|
|
131
|
-
/**
|
|
132
|
-
* Create start hydration marker
|
|
133
|
-
*/
|
|
134
131
|
export declare function hydrationMarkerStart(id: string): string;
|
|
135
|
-
/**
|
|
136
|
-
* Create end hydration marker
|
|
137
|
-
*/
|
|
138
132
|
export declare function hydrationMarkerEnd(id: string): string;
|
|
139
133
|
/**
|
|
140
134
|
* Create hydration-friendly resource
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hydration.d.ts","sourceRoot":"","sources":["../../../../src/lib/server/hydration.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"hydration.d.ts","sourceRoot":"","sources":["../../../../src/lib/server/hydration.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAuBD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,IAAI,OAAO,CAErC;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAEjD;AAID;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,GAAG,IAAI,CAE7D;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAEjD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAErD;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAEzC;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAEvD;AAID;;;;;;;;;;;;;GAaG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAS/C;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,wBAAwB,IAAI,OAAO,CAuBlD;AAID;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAElD;AAED,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAErD;AAID;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,EACxC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACxB,MAAM,OAAO,CAAC,CAAC,CAAC,CAoBlB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAiBxE;AAID;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAiCvC;AAcD;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAE7C;AAED,6EAA6E;AAC7E,wBAAgB,mBAAmB,IAAI,OAAO,CAE7C"}
|
|
@@ -8,9 +8,7 @@
|
|
|
8
8
|
* - Structural markers required
|
|
9
9
|
*/
|
|
10
10
|
import { isServer as domIsServer } from '@fluixi/dom';
|
|
11
|
-
// ============================================================================
|
|
12
11
|
// STATE
|
|
13
|
-
// ============================================================================
|
|
14
12
|
/**
|
|
15
13
|
* Global hydration flag
|
|
16
14
|
* Indicates if we're currently hydrating
|
|
@@ -25,9 +23,7 @@ const hydrationDataMap = new Map();
|
|
|
25
23
|
* Hydration marker counter for unique IDs
|
|
26
24
|
*/
|
|
27
25
|
let markerCounter = 0;
|
|
28
|
-
// ============================================================================
|
|
29
26
|
// HYDRATION STATE
|
|
30
|
-
// ============================================================================
|
|
31
27
|
/**
|
|
32
28
|
* Check if currently hydrating
|
|
33
29
|
*
|
|
@@ -53,9 +49,7 @@ export function isHydrating() {
|
|
|
53
49
|
export function setHydrating(state) {
|
|
54
50
|
hydrating = state;
|
|
55
51
|
}
|
|
56
|
-
// ============================================================================
|
|
57
52
|
// HYDRATION DATA MANAGEMENT
|
|
58
|
-
// ============================================================================
|
|
59
53
|
/**
|
|
60
54
|
* Store data for hydration
|
|
61
55
|
*
|
|
@@ -109,9 +103,7 @@ export function clearHydrationData() {
|
|
|
109
103
|
export function clearHydrationDataKey(key) {
|
|
110
104
|
hydrationDataMap.delete(key);
|
|
111
105
|
}
|
|
112
|
-
// ============================================================================
|
|
113
106
|
// SERIALIZATION
|
|
114
|
-
// ============================================================================
|
|
115
107
|
/**
|
|
116
108
|
* Serialize hydration data to script tag
|
|
117
109
|
*
|
|
@@ -170,9 +162,7 @@ export function deserializeHydrationData() {
|
|
|
170
162
|
return false;
|
|
171
163
|
}
|
|
172
164
|
}
|
|
173
|
-
// ============================================================================
|
|
174
165
|
// HYDRATION MARKERS
|
|
175
|
-
// ============================================================================
|
|
176
166
|
/**
|
|
177
167
|
* Generate unique hydration marker ID
|
|
178
168
|
*
|
|
@@ -197,21 +187,13 @@ export function generateMarkerID() {
|
|
|
197
187
|
export function hydrationMarker(id) {
|
|
198
188
|
return `<!--#${id}-->`;
|
|
199
189
|
}
|
|
200
|
-
/**
|
|
201
|
-
* Create start hydration marker
|
|
202
|
-
*/
|
|
203
190
|
export function hydrationMarkerStart(id) {
|
|
204
191
|
return `<!--#${id}-->`;
|
|
205
192
|
}
|
|
206
|
-
/**
|
|
207
|
-
* Create end hydration marker
|
|
208
|
-
*/
|
|
209
193
|
export function hydrationMarkerEnd(id) {
|
|
210
194
|
return `<!--/${id}-->`;
|
|
211
195
|
}
|
|
212
|
-
// ============================================================================
|
|
213
196
|
// RESOURCE HYDRATION
|
|
214
|
-
// ============================================================================
|
|
215
197
|
/**
|
|
216
198
|
* Create hydration-friendly resource
|
|
217
199
|
*
|
|
@@ -276,9 +258,7 @@ export function useHydrationData(key, value) {
|
|
|
276
258
|
}
|
|
277
259
|
return computedValue;
|
|
278
260
|
}
|
|
279
|
-
// ============================================================================
|
|
280
261
|
// CLEANUP
|
|
281
|
-
// ============================================================================
|
|
282
262
|
/**
|
|
283
263
|
* Cleanup hydration artifacts from DOM
|
|
284
264
|
*
|
|
@@ -325,9 +305,7 @@ if (typeof window !== 'undefined') {
|
|
|
325
305
|
setTimeout(cleanupHydration, 100);
|
|
326
306
|
});
|
|
327
307
|
}
|
|
328
|
-
// ============================================================================
|
|
329
308
|
// ENVIRONMENT HELPERS
|
|
330
|
-
// ============================================================================
|
|
331
309
|
/**
|
|
332
310
|
* Whether this is a server render.
|
|
333
311
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @fluixi/core v1.0.0-alpha.
|
|
1
|
+
/*! @fluixi/core v1.0.0-alpha.102 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
|
|
2
2
|
"use strict";
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module @fluixi/core/server
|
|
3
3
|
*
|
|
4
|
-
* Implements Unified SSR Engine
|
|
4
|
+
* Implements Unified SSR Engine for JSX and `html` templates.
|
|
5
5
|
*/
|
|
6
6
|
import { serializeHydrationData, setHydrating, isHydrating, setHydrationData, getHydrationData, hasHydrationData, clearHydrationData, clearHydrationDataKey, deserializeHydrationData, hydrationMarker, hydrationMarkerStart, hydrationMarkerEnd, createHydratableResource, useHydrationData, cleanupHydration, isServerEnvironment, isClientEnvironment, type HydrationData } from './hydration.js';
|
|
7
7
|
/**
|
|
@@ -12,9 +12,6 @@ export interface SSRContext {
|
|
|
12
12
|
headers: Record<string, string>;
|
|
13
13
|
[key: string]: any;
|
|
14
14
|
}
|
|
15
|
-
/**
|
|
16
|
-
* Document options
|
|
17
|
-
*/
|
|
18
15
|
export interface DocumentOptions {
|
|
19
16
|
title?: string;
|
|
20
17
|
lang?: string;
|
|
@@ -27,9 +24,6 @@ export interface DocumentOptions {
|
|
|
27
24
|
* Get current SSR context
|
|
28
25
|
*/
|
|
29
26
|
export declare function getSSRContext(): SSRContext | null;
|
|
30
|
-
/**
|
|
31
|
-
* Set SSR context
|
|
32
|
-
*/
|
|
33
27
|
export declare function setSSRContext(context: SSRContext | null): void;
|
|
34
28
|
/**
|
|
35
29
|
* Run function with SSR context
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/server/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,sBAAsB,EACtB,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,EACrB,wBAAwB,EACxB,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,wBAAwB,EACxB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,KAAK,aAAa,EACnB,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/server/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,sBAAsB,EACtB,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,EACrB,wBAAwB,EACxB,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,wBAAwB,EACxB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,KAAK,aAAa,EACnB,MAAM,gBAAgB,CAAC;AAQxB;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,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EG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,CAIrE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,KAAK,GAAG;IAE5D,qEAAqE;kBACvD,MAAM;IACpB,2EAA2E;kBAC7D,MAAM;IACpB,sDAAsD;gBAC1C,MAAM,SAAS,eAAe;EAG7C;AAGD,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,UAAU,EACV,KAAK,EACL,OAAO,EACP,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,aAAa,EACb,UAAU,EACV,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,cAAc,EACd,eAAe,EACf,QAAQ,IAAI,gBAAgB,EAC5B,QAAQ,IAAI,gBAAgB,GAC7B,MAAM,eAAe,CAAC;AAEvB,YAAY,EACV,WAAW,EACX,QAAQ,EACR,MAAM,EACN,aAAa,EACb,SAAS,EACT,OAAO,GACR,MAAM,eAAe,CAAC;AAIvB,OAAO,EACL,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,wBAAwB,EACxB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,GACpB,CAAC;AAEF,YAAY,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module @fluixi/core/server
|
|
3
3
|
*
|
|
4
|
-
* Implements Unified SSR Engine
|
|
4
|
+
* Implements Unified SSR Engine for JSX and `html` templates.
|
|
5
5
|
*/
|
|
6
6
|
import { serializeHydrationData, setHydrating, isHydrating, setHydrationData, getHydrationData, hasHydrationData, clearHydrationData, clearHydrationDataKey, deserializeHydrationData, hydrationMarker, hydrationMarkerStart, hydrationMarkerEnd, createHydratableResource, useHydrationData, cleanupHydration, isServerEnvironment, isClientEnvironment, } from './hydration.js';
|
|
7
7
|
// SSR runs through @fluixi/server: the universal renderer + request-scoping,
|
|
8
8
|
// with AsyncLocalStorage injected so concurrent renders are isolated.
|
|
9
9
|
import { renderToString as domRenderToString } from '@fluixi/server';
|
|
10
|
-
// ============================================================================
|
|
11
10
|
// SSR CONTEXT MANAGEMENT
|
|
12
|
-
// ============================================================================
|
|
13
11
|
let currentSSRContext = null;
|
|
14
12
|
/**
|
|
15
13
|
* Get current SSR context
|
|
@@ -17,9 +15,6 @@ let currentSSRContext = null;
|
|
|
17
15
|
export function getSSRContext() {
|
|
18
16
|
return currentSSRContext;
|
|
19
17
|
}
|
|
20
|
-
/**
|
|
21
|
-
* Set SSR context
|
|
22
|
-
*/
|
|
23
18
|
export function setSSRContext(context) {
|
|
24
19
|
currentSSRContext = context;
|
|
25
20
|
}
|
|
@@ -36,9 +31,7 @@ export function withSSRContext(context, fn) {
|
|
|
36
31
|
currentSSRContext = prev;
|
|
37
32
|
}
|
|
38
33
|
}
|
|
39
|
-
// ============================================================================
|
|
40
34
|
// HTML GENERATION
|
|
41
|
-
// ============================================================================
|
|
42
35
|
/**
|
|
43
36
|
* Render complete HTML page
|
|
44
37
|
*/
|
|
@@ -72,9 +65,7 @@ export function createHtmlDocument(content, options = {}) {
|
|
|
72
65
|
</body>
|
|
73
66
|
</html>`;
|
|
74
67
|
}
|
|
75
|
-
// ============================================================================
|
|
76
68
|
// ENVIRONMENT DETECTION
|
|
77
|
-
// ============================================================================
|
|
78
69
|
/**
|
|
79
70
|
* Whether this is a server render.
|
|
80
71
|
*
|
|
@@ -114,9 +105,7 @@ export function onServer(fn, fallback) {
|
|
|
114
105
|
export function onClient(fn, fallback) {
|
|
115
106
|
return !domIsServer() ? fn() : fallback;
|
|
116
107
|
}
|
|
117
|
-
// ============================================================================
|
|
118
108
|
// EXPORTS
|
|
119
|
-
// ============================================================================
|
|
120
109
|
/**
|
|
121
110
|
* Render component to HTML string
|
|
122
111
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @fluixi/core v1.0.0-alpha.
|
|
1
|
+
/*! @fluixi/core v1.0.0-alpha.102 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
|
|
2
2
|
|
|
3
3
|
// src/lib/server/hydration.ts
|
|
4
4
|
import { isServer as domIsServer } from "@fluixi/dom";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reactive.d.ts","sourceRoot":"","sources":["../../../../src/lib/server/reactive.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EACV,WAAW,EACX,QAAQ,EACR,MAAM,EACN,aAAa,EACb,SAAS,EACT,OAAO,EACR,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"reactive.d.ts","sourceRoot":"","sources":["../../../../src/lib/server/reactive.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EACV,WAAW,EACX,QAAQ,EACR,MAAM,EACN,aAAa,EACb,SAAS,EACT,OAAO,EACR,MAAM,yBAAyB,CAAC;AAIjC;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,KAAK,EAAE,CAAC,EACR,OAAO,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,GACzB,WAAW,CAAC,CAAC,CAAC,CAehB;AAID;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAC1B,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,GAAG,EACpB,KAAK,CAAC,EAAE,GAAG,EACX,OAAO,CAAC,EAAE,GAAG,GACZ;IAAE,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,CAUzB;AAID;;;;;;;;;;;;GAYG;AACH,wBAAgB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C;CACzE,CAAC;AAEF;;;GAGG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAC1C,IAAI,EAAE,CAAC,GACN,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAoBjC;AAID;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG,IAAI,CAEpD;AAKD;;GAEG;AACH,eAAO,MAAM,QAAQ,OAAO,CAAC;AAE7B;;GAEG;AACH,eAAO,MAAM,QAAQ,QAAQ,CAAC;AAI9B,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;AAIjF;;GAEG;AACH,eAAO,MAAM,YAAY;aACN,SAAS,GAAG,IAAI;WAClB,SAAS,GAAG,IAAI;CAChC,CAAC;AAEF;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI,GAAG,IAAI,CAItD;AAED;;;GAGG;AACH,wBAAgB,eAAe;aAlBZ,SAAS,GAAG,IAAI;WAClB,SAAS,GAAG,IAAI;EAmBhC"}
|
|
@@ -10,9 +10,7 @@
|
|
|
10
10
|
* - No scheduling
|
|
11
11
|
* - No subscriptions
|
|
12
12
|
*/
|
|
13
|
-
// ============================================================================
|
|
14
13
|
// SERVER SIGNAL
|
|
15
|
-
// ============================================================================
|
|
16
14
|
/**
|
|
17
15
|
* Server createSignal - Returns snapshot value
|
|
18
16
|
*
|
|
@@ -43,9 +41,7 @@ export function createSignal(value, options) {
|
|
|
43
41
|
};
|
|
44
42
|
return [read, write];
|
|
45
43
|
}
|
|
46
|
-
// ============================================================================
|
|
47
44
|
// SERVER EFFECT
|
|
48
|
-
// ============================================================================
|
|
49
45
|
/**
|
|
50
46
|
* Server createEffect - Runs once, no tracking
|
|
51
47
|
*
|
|
@@ -71,9 +67,7 @@ export function createEffect(fn, value, options) {
|
|
|
71
67
|
// Return no-op disposer
|
|
72
68
|
return { dispose: () => { } };
|
|
73
69
|
}
|
|
74
|
-
// ============================================================================
|
|
75
70
|
// SERVER MEMO
|
|
76
|
-
// ============================================================================
|
|
77
71
|
/**
|
|
78
72
|
* Server createMemo - Compute once, return static accessor
|
|
79
73
|
*
|
|
@@ -92,9 +86,7 @@ export function createMemo(fn, value, options) {
|
|
|
92
86
|
const computed = fn(value);
|
|
93
87
|
return (() => computed);
|
|
94
88
|
}
|
|
95
|
-
// ============================================================================
|
|
96
89
|
// SERVER ROOT
|
|
97
|
-
// ============================================================================
|
|
98
90
|
/**
|
|
99
91
|
* Server createRoot - Creates owner but no reactive tracking
|
|
100
92
|
*
|
|
@@ -132,9 +124,7 @@ export function createRoot(fn) {
|
|
|
132
124
|
throw error;
|
|
133
125
|
}
|
|
134
126
|
}
|
|
135
|
-
// ============================================================================
|
|
136
127
|
// SERVER BATCH
|
|
137
|
-
// ============================================================================
|
|
138
128
|
/**
|
|
139
129
|
* Server batch - Execute immediately, no batching
|
|
140
130
|
*
|
|
@@ -153,9 +143,7 @@ export function batch(fn) {
|
|
|
153
143
|
// Server: No batching needed, just run
|
|
154
144
|
return fn();
|
|
155
145
|
}
|
|
156
|
-
// ============================================================================
|
|
157
146
|
// SERVER UNTRACK
|
|
158
|
-
// ============================================================================
|
|
159
147
|
/**
|
|
160
148
|
* Server untrack - Execute function (already untracked)
|
|
161
149
|
*
|
|
@@ -173,9 +161,7 @@ export function untrack(fn) {
|
|
|
173
161
|
// Server: Already untracked, just run
|
|
174
162
|
return fn();
|
|
175
163
|
}
|
|
176
|
-
// ============================================================================
|
|
177
164
|
// SERVER CLEANUP
|
|
178
|
-
// ============================================================================
|
|
179
165
|
let currentCleanups = null;
|
|
180
166
|
/**
|
|
181
167
|
* Server onCleanup - Register cleanup function
|
|
@@ -198,9 +184,7 @@ export function onCleanup(fn) {
|
|
|
198
184
|
currentCleanups.push(fn);
|
|
199
185
|
}
|
|
200
186
|
}
|
|
201
|
-
// ============================================================================
|
|
202
187
|
// SERVER OWNER
|
|
203
|
-
// ============================================================================
|
|
204
188
|
let currentOwner = null;
|
|
205
189
|
/**
|
|
206
190
|
* Server getOwner - Get current reactive owner
|
|
@@ -225,9 +209,7 @@ export function runWithOwner(owner, fn) {
|
|
|
225
209
|
currentOwner = prev;
|
|
226
210
|
}
|
|
227
211
|
}
|
|
228
|
-
// ============================================================================
|
|
229
212
|
// SERVER CONTEXT
|
|
230
|
-
// ============================================================================
|
|
231
213
|
const contextMap = new Map();
|
|
232
214
|
/**
|
|
233
215
|
* Server createContext - Create context with default value
|
|
@@ -279,9 +261,7 @@ export function useContext(context) {
|
|
|
279
261
|
const value = contextMap.get(context.id);
|
|
280
262
|
return value !== undefined ? value : context.defaultValue;
|
|
281
263
|
}
|
|
282
|
-
// ============================================================================
|
|
283
264
|
// SERVER COMPUTED
|
|
284
|
-
// ============================================================================
|
|
285
265
|
/**
|
|
286
266
|
* Server createComputed - Alias for createEffect
|
|
287
267
|
*
|
|
@@ -290,27 +270,21 @@ export function useContext(context) {
|
|
|
290
270
|
export function createComputed(fn) {
|
|
291
271
|
return createEffect(fn);
|
|
292
272
|
}
|
|
293
|
-
// ============================================================================
|
|
294
273
|
// SERVER RENDER EFFECT
|
|
295
|
-
// ============================================================================
|
|
296
274
|
/**
|
|
297
275
|
* Server createRenderEffect - Runs once for SSR rendering
|
|
298
276
|
*/
|
|
299
277
|
export function createRenderEffect(fn) {
|
|
300
278
|
return createEffect(fn);
|
|
301
279
|
}
|
|
302
|
-
// ============================================================================
|
|
303
280
|
// SERVER DEFERRED
|
|
304
|
-
// ============================================================================
|
|
305
281
|
/**
|
|
306
282
|
* Server createDeferred - No deferring on server
|
|
307
283
|
*/
|
|
308
284
|
export function createDeferred(fn) {
|
|
309
285
|
return createMemo(fn);
|
|
310
286
|
}
|
|
311
|
-
// ============================================================================
|
|
312
287
|
// SERVER SELECTOR
|
|
313
|
-
// ============================================================================
|
|
314
288
|
/**
|
|
315
289
|
* Server createSelector - Returns static equality check
|
|
316
290
|
*/
|
|
@@ -326,9 +300,7 @@ export function createSelector(source) {
|
|
|
326
300
|
const value = source();
|
|
327
301
|
return (key) => key === value;
|
|
328
302
|
}
|
|
329
|
-
// ============================================================================
|
|
330
303
|
// SERVER RESOURCE
|
|
331
|
-
// ============================================================================
|
|
332
304
|
/**
|
|
333
305
|
* Server createResource - Stub for resource creation
|
|
334
306
|
*/
|
|
@@ -363,20 +335,15 @@ export function createStore(init) {
|
|
|
363
335
|
}
|
|
364
336
|
return [state, setStore];
|
|
365
337
|
}
|
|
366
|
-
// ============================================================================
|
|
367
338
|
// SERVER TRANSITION
|
|
368
|
-
// ============================================================================
|
|
369
339
|
/**
|
|
370
340
|
* Server startTransition - Execute immediately
|
|
371
341
|
*/
|
|
372
342
|
export function startTransition(fn) {
|
|
373
343
|
fn();
|
|
374
344
|
}
|
|
375
|
-
// ============================================================================
|
|
376
345
|
// ENVIRONMENT
|
|
377
|
-
// ============================================================================
|
|
378
346
|
// ENVIRONMENT
|
|
379
|
-
// ============================================================================
|
|
380
347
|
/**
|
|
381
348
|
* Check if running on server
|
|
382
349
|
*/
|
|
@@ -385,9 +352,7 @@ export const isServer = true;
|
|
|
385
352
|
* Check if running on client
|
|
386
353
|
*/
|
|
387
354
|
export const isClient = false;
|
|
388
|
-
// ============================================================================
|
|
389
355
|
// COMPATIBILITY
|
|
390
|
-
// ============================================================================
|
|
391
356
|
/**
|
|
392
357
|
* Server sharedConfig - Empty config object for compatibility
|
|
393
358
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @fluixi/core v1.0.0-alpha.
|
|
1
|
+
/*! @fluixi/core v1.0.0-alpha.102 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
|
|
2
2
|
"use strict";
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @fluixi/core v1.0.0-alpha.
|
|
1
|
+
/*! @fluixi/core v1.0.0-alpha.102 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
|
|
2
2
|
|
|
3
3
|
// src/lib/storage/index.ts
|
|
4
4
|
import { appendResponseHeader, getRequestContext, getServerData } from "@fluixi/dom";
|
package/dist/src/routes.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @fluixi/core v1.0.0-alpha.
|
|
1
|
+
/*! @fluixi/core v1.0.0-alpha.102 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
|
|
2
2
|
"use strict";
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
package/dist/src/routes.mjs
CHANGED
package/dist/src/server.d.ts
CHANGED
package/dist/src/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AAEH,cAAc,uBAAuB,CAAC"}
|
package/dist/src/server.js
CHANGED
package/dist/src/utils.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @fluixi/core v1.0.0-alpha.
|
|
1
|
+
/*! @fluixi/core v1.0.0-alpha.102 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
|
|
2
2
|
"use strict";
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
package/dist/src/utils.mjs
CHANGED