@fictjs/runtime 0.9.0 → 0.10.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/advanced.cjs +9 -9
- package/dist/advanced.d.cts +4 -4
- package/dist/advanced.d.ts +4 -4
- package/dist/advanced.js +4 -4
- package/dist/{binding-BWchH3Kp.d.ts → binding-DUEukRxl.d.cts} +4 -2
- package/dist/{binding-BWchH3Kp.d.cts → binding-DqxS9ZQf.d.ts} +4 -2
- package/dist/{chunk-JVYH76ZX.js → chunk-2JRPPCG7.js} +3 -3
- package/dist/{chunk-FVX77557.js → chunk-DKA2I6ET.js} +3 -3
- package/dist/{chunk-UBFDB6OL.cjs → chunk-EQ5E4WOV.cjs} +216 -50
- package/dist/chunk-EQ5E4WOV.cjs.map +1 -0
- package/dist/{chunk-DXG3TARY.js → chunk-F4RVNXOL.js} +196 -30
- package/dist/chunk-F4RVNXOL.js.map +1 -0
- package/dist/{chunk-OAM7HABA.cjs → chunk-I4GKKAAY.cjs} +226 -182
- package/dist/chunk-I4GKKAAY.cjs.map +1 -0
- package/dist/{chunk-PG4QX2I2.cjs → chunk-K3DH5SD5.cjs} +17 -17
- package/dist/{chunk-PG4QX2I2.cjs.map → chunk-K3DH5SD5.cjs.map} +1 -1
- package/dist/{chunk-N6ODUM2Y.js → chunk-P4TZLFV6.js} +3 -3
- package/dist/{chunk-T2LNV5Q5.js → chunk-R6FINS25.js} +50 -6
- package/dist/chunk-R6FINS25.js.map +1 -0
- package/dist/{chunk-LBE6DC3V.cjs → chunk-SZLJCQFZ.cjs} +40 -40
- package/dist/{chunk-LBE6DC3V.cjs.map → chunk-SZLJCQFZ.cjs.map} +1 -1
- package/dist/{chunk-PD6IQY2Y.cjs → chunk-V7BC64W2.cjs} +8 -8
- package/dist/{chunk-PD6IQY2Y.cjs.map → chunk-V7BC64W2.cjs.map} +1 -1
- package/dist/{devtools-5AipK9CX.d.cts → devtools-C4Hgfa-S.d.ts} +14 -2
- package/dist/{devtools-BDp76luf.d.ts → devtools-CMxlJUTx.d.cts} +14 -2
- package/dist/index.cjs +42 -42
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.dev.js +230 -25
- package/dist/index.dev.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/internal-list.cjs +4 -4
- package/dist/internal-list.d.cts +2 -2
- package/dist/internal-list.d.ts +2 -2
- package/dist/internal-list.js +3 -3
- package/dist/internal.cjs +5 -5
- package/dist/internal.d.cts +6 -6
- package/dist/internal.d.ts +6 -6
- package/dist/internal.js +4 -4
- package/dist/jsx-dev-runtime.d.cts +671 -0
- package/dist/jsx-dev-runtime.d.ts +671 -0
- package/dist/jsx-runtime.d.cts +671 -0
- package/dist/jsx-runtime.d.ts +671 -0
- package/dist/{list-DL5DOFcO.d.ts → list-BBzsJhrm.d.ts} +1 -1
- package/dist/{list-hP7hQ9Vk.d.cts → list-_NJCcjl1.d.cts} +1 -1
- package/dist/loader.cjs +24 -20
- package/dist/loader.cjs.map +1 -1
- package/dist/loader.d.cts +2 -2
- package/dist/loader.d.ts +2 -2
- package/dist/loader.js +7 -3
- package/dist/loader.js.map +1 -1
- package/dist/{props-BpZz0AOq.d.cts → props--zJ4ebbT.d.cts} +2 -2
- package/dist/{props-CjLH0JE-.d.ts → props-BAGR7j-j.d.ts} +2 -2
- package/dist/{resume-BJ4oHLi_.d.cts → resume-C5IKAIdh.d.ts} +2 -2
- package/dist/{resume-CuyJWXP_.d.ts → resume-DPZxmA95.d.cts} +2 -2
- package/dist/{scope-jPt5DHRT.d.ts → scope-CuImnvh1.d.ts} +1 -1
- package/dist/{scope-BJCtq8hJ.d.cts → scope-Dq5hOu7c.d.cts} +1 -1
- package/dist/{signal-C4ISF17w.d.cts → signal-Z4KkDk9h.d.cts} +12 -1
- package/dist/{signal-C4ISF17w.d.ts → signal-Z4KkDk9h.d.ts} +12 -1
- package/package.json +2 -2
- package/src/devtools.ts +19 -2
- package/src/dom.ts +58 -4
- package/src/effect.ts +5 -5
- package/src/hooks.ts +13 -5
- package/src/lifecycle.ts +41 -3
- package/src/loader.ts +10 -4
- package/src/signal.ts +191 -18
- package/src/transition.ts +9 -3
- package/dist/chunk-DXG3TARY.js.map +0 -1
- package/dist/chunk-OAM7HABA.cjs.map +0 -1
- package/dist/chunk-T2LNV5Q5.js.map +0 -1
- package/dist/chunk-UBFDB6OL.cjs.map +0 -1
- /package/dist/{chunk-JVYH76ZX.js.map → chunk-2JRPPCG7.js.map} +0 -0
- /package/dist/{chunk-FVX77557.js.map → chunk-DKA2I6ET.js.map} +0 -0
- /package/dist/{chunk-N6ODUM2Y.js.map → chunk-P4TZLFV6.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/fict/fict/packages/runtime/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/fict/fict/packages/runtime/dist/chunk-V7BC64W2.cjs","../src/scope.ts"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACA;ACKO,SAAS,WAAA,CAAA,EAA6B;AAC3C,EAAA,IAAI,QAAA,EAA+B,IAAA;AAEnC,EAAA,MAAM,KAAA,EAAO,CAAA,EAAA,GAAM;AACjB,IAAA,GAAA,CAAI,OAAA,EAAS;AACX,MAAA,OAAA,CAAQ,CAAA;AACR,MAAA,QAAA,EAAU,IAAA;AAAA,IACZ;AAAA,EACF,CAAA;AAEA,EAAA,MAAM,IAAA,EAAM,CAAI,EAAA,EAAA,GAAmB;AACjC,IAAA,IAAA,CAAK,CAAA;AACL,IAAA,MAAM,EAAE,OAAA,EAAS,WAAA,EAAa,MAAM,EAAA,EAAI,0CAAA,EAAW,EAAI,EAAE,OAAA,EAAS,KAAK,CAAC,CAAA;AACxE,IAAA,QAAA,EAAU,WAAA;AACV,IAAA,OAAO,KAAA;AAAA,EACT,CAAA;AAEA,EAAA,mDAAA,IAAwB,CAAA;AACxB,EAAA,OAAO,EAAE,GAAA,EAAK,KAAK,CAAA;AACrB;AAMO,SAAS,UAAA,CAAW,IAAA,EAA8B,EAAA,EAAsB;AAC7E,EAAA,MAAM,MAAA,EAAQ,WAAA,CAAY,CAAA;AAC1B,EAAA,MAAM,SAAA,EAAW,CAAA,EAAA,GAAO,0CAAA,IAAe,EAAA,EAAK,IAAA,CAAuB,EAAA,EAAI,CAAC,CAAC,IAAA;AAEzE,EAAA,4CAAA,CAAa,EAAA,GAAM;AACjB,IAAA,MAAM,QAAA,EAAU,QAAA,CAAS,CAAA;AACzB,IAAA,GAAA,CAAI,OAAA,EAAS;AACX,MAAA,KAAA,CAAM,GAAA,CAAI,EAAE,CAAA;AAAA,IACd,EAAA,KAAO;AACL,MAAA,KAAA,CAAM,IAAA,CAAK,CAAA;AAAA,IACb;AAAA,EACF,CAAC,CAAA;AAED,EAAA,yCAAA,KAAU,CAAM,IAAI,CAAA;AACtB;ADbA;AACA;AACE;AACA;AACF,mEAAC","file":"/home/runner/work/fict/fict/packages/runtime/dist/chunk-V7BC64W2.cjs","sourcesContent":[null,"import { isReactive, type MaybeReactive } from './binding'\nimport { createEffect } from './effect'\nimport { createRoot, onCleanup, registerRootCleanup } from './lifecycle'\n\nexport { effectScope } from './signal'\n\nexport interface ReactiveScope {\n run<T>(fn: () => T): T\n stop(): void\n}\n\n/**\n * Create an explicit reactive scope that can contain effects/memos and be stopped manually.\n * The scope registers with the current root for cleanup.\n */\nexport function createScope(): ReactiveScope {\n let dispose: (() => void) | null = null\n\n const stop = () => {\n if (dispose) {\n dispose()\n dispose = null\n }\n }\n\n const run = <T>(fn: () => T): T => {\n stop()\n const { dispose: rootDispose, value } = createRoot(fn, { inherit: true })\n dispose = rootDispose\n return value\n }\n\n registerRootCleanup(stop)\n return { run, stop }\n}\n\n/**\n * Run a block of reactive code inside a managed scope that follows a boolean flag.\n * When the flag turns false, the scope is disposed and all contained effects/memos are cleaned up.\n */\nexport function runInScope(flag: MaybeReactive<boolean>, fn: () => void): void {\n const scope = createScope()\n const evaluate = () => (isReactive(flag) ? (flag as () => boolean)() : !!flag)\n\n createEffect(() => {\n const enabled = evaluate()\n if (enabled) {\n scope.run(fn)\n } else {\n scope.stop()\n }\n })\n\n onCleanup(scope.stop)\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as BaseProps, F as FictNode } from './binding-
|
|
1
|
+
import { B as BaseProps, F as FictNode } from './binding-DqxS9ZQf.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @fileoverview Context API for Fict
|
|
@@ -157,22 +157,34 @@ interface FictDevtoolsHook {
|
|
|
157
157
|
ownerId?: number;
|
|
158
158
|
}) => void;
|
|
159
159
|
updateSignal: (id: number, value: unknown) => void;
|
|
160
|
+
disposeSignal?: (id: number) => void;
|
|
160
161
|
registerComputed: (id: number, value: unknown, options?: {
|
|
161
162
|
name?: string;
|
|
162
163
|
source?: string;
|
|
163
164
|
ownerId?: number;
|
|
164
165
|
hasValue?: boolean;
|
|
166
|
+
internal?: boolean;
|
|
165
167
|
}) => void;
|
|
166
168
|
updateComputed: (id: number, value: unknown) => void;
|
|
169
|
+
disposeComputed?: (id: number) => void;
|
|
167
170
|
registerEffect: (id: number, options?: {
|
|
168
171
|
ownerId?: number;
|
|
169
172
|
source?: string;
|
|
170
173
|
}) => void;
|
|
171
|
-
effectRun: (id: number) => void;
|
|
174
|
+
effectRun: (id: number, duration?: number) => void;
|
|
175
|
+
effectCleanup?: (id: number) => void;
|
|
176
|
+
disposeEffect?: (id: number) => void;
|
|
172
177
|
/** Track a dependency relationship between subscriber and dependency */
|
|
173
178
|
trackDependency?: (subscriberId: number, dependencyId: number) => void;
|
|
174
179
|
/** Remove a dependency relationship when unlinked */
|
|
175
180
|
untrackDependency?: (subscriberId: number, dependencyId: number) => void;
|
|
181
|
+
registerRoot?: (id: number, name?: string) => void;
|
|
182
|
+
disposeRoot?: (id: number) => void;
|
|
183
|
+
rootSuspend?: (id: number, suspended: boolean) => void;
|
|
184
|
+
batchStart?: () => void;
|
|
185
|
+
batchEnd?: () => void;
|
|
186
|
+
flushStart?: () => void;
|
|
187
|
+
flushEnd?: () => void;
|
|
176
188
|
cycleDetected?: (payload: {
|
|
177
189
|
reason: string;
|
|
178
190
|
detail?: Record<string, unknown>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as BaseProps, F as FictNode } from './binding-
|
|
1
|
+
import { B as BaseProps, F as FictNode } from './binding-DUEukRxl.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @fileoverview Context API for Fict
|
|
@@ -157,22 +157,34 @@ interface FictDevtoolsHook {
|
|
|
157
157
|
ownerId?: number;
|
|
158
158
|
}) => void;
|
|
159
159
|
updateSignal: (id: number, value: unknown) => void;
|
|
160
|
+
disposeSignal?: (id: number) => void;
|
|
160
161
|
registerComputed: (id: number, value: unknown, options?: {
|
|
161
162
|
name?: string;
|
|
162
163
|
source?: string;
|
|
163
164
|
ownerId?: number;
|
|
164
165
|
hasValue?: boolean;
|
|
166
|
+
internal?: boolean;
|
|
165
167
|
}) => void;
|
|
166
168
|
updateComputed: (id: number, value: unknown) => void;
|
|
169
|
+
disposeComputed?: (id: number) => void;
|
|
167
170
|
registerEffect: (id: number, options?: {
|
|
168
171
|
ownerId?: number;
|
|
169
172
|
source?: string;
|
|
170
173
|
}) => void;
|
|
171
|
-
effectRun: (id: number) => void;
|
|
174
|
+
effectRun: (id: number, duration?: number) => void;
|
|
175
|
+
effectCleanup?: (id: number) => void;
|
|
176
|
+
disposeEffect?: (id: number) => void;
|
|
172
177
|
/** Track a dependency relationship between subscriber and dependency */
|
|
173
178
|
trackDependency?: (subscriberId: number, dependencyId: number) => void;
|
|
174
179
|
/** Remove a dependency relationship when unlinked */
|
|
175
180
|
untrackDependency?: (subscriberId: number, dependencyId: number) => void;
|
|
181
|
+
registerRoot?: (id: number, name?: string) => void;
|
|
182
|
+
disposeRoot?: (id: number) => void;
|
|
183
|
+
rootSuspend?: (id: number, suspended: boolean) => void;
|
|
184
|
+
batchStart?: () => void;
|
|
185
|
+
batchEnd?: () => void;
|
|
186
|
+
flushStart?: () => void;
|
|
187
|
+
flushEnd?: () => void;
|
|
176
188
|
cycleDetected?: (payload: {
|
|
177
189
|
reason: string;
|
|
178
190
|
detail?: Record<string, unknown>;
|
package/dist/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkK3DH5SD5cjs = require('./chunk-K3DH5SD5.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -19,7 +19,7 @@ var _chunkPG4QX2I2cjs = require('./chunk-PG4QX2I2.cjs');
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkI4GKKAAYcjs = require('./chunk-I4GKKAAY.cjs');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
@@ -40,7 +40,7 @@ var _chunkOAM7HABAcjs = require('./chunk-OAM7HABA.cjs');
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
var
|
|
43
|
+
var _chunkEQ5E4WOVcjs = require('./chunk-EQ5E4WOV.cjs');
|
|
44
44
|
|
|
45
45
|
// src/ref.ts
|
|
46
46
|
function createRef() {
|
|
@@ -52,7 +52,7 @@ function ErrorBoundary(props) {
|
|
|
52
52
|
const fragment = document.createDocumentFragment();
|
|
53
53
|
const marker = document.createComment("fict:error-boundary");
|
|
54
54
|
fragment.appendChild(marker);
|
|
55
|
-
const hostRoot =
|
|
55
|
+
const hostRoot = _chunkEQ5E4WOVcjs.getCurrentRoot.call(void 0, );
|
|
56
56
|
let cleanup;
|
|
57
57
|
let activeNodes = [];
|
|
58
58
|
let renderingFallback = false;
|
|
@@ -70,25 +70,25 @@ function ErrorBoundary(props) {
|
|
|
70
70
|
cleanup = void 0;
|
|
71
71
|
}
|
|
72
72
|
if (activeNodes.length) {
|
|
73
|
-
|
|
73
|
+
_chunkI4GKKAAYcjs.removeNodes.call(void 0, activeNodes);
|
|
74
74
|
activeNodes = [];
|
|
75
75
|
}
|
|
76
76
|
if (value == null || value === false) {
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
79
|
-
const root =
|
|
80
|
-
const prev =
|
|
79
|
+
const root = _chunkEQ5E4WOVcjs.createRootContext.call(void 0, hostRoot);
|
|
80
|
+
const prev = _chunkEQ5E4WOVcjs.pushRoot.call(void 0, root);
|
|
81
81
|
let nodes = [];
|
|
82
82
|
try {
|
|
83
|
-
const output =
|
|
84
|
-
nodes =
|
|
83
|
+
const output = _chunkI4GKKAAYcjs.createElement.call(void 0, value);
|
|
84
|
+
nodes = _chunkI4GKKAAYcjs.toNodeArray.call(void 0, output);
|
|
85
85
|
const parentNode = marker.parentNode;
|
|
86
86
|
if (parentNode) {
|
|
87
|
-
|
|
87
|
+
_chunkI4GKKAAYcjs.insertNodesBefore.call(void 0, parentNode, nodes, marker);
|
|
88
88
|
}
|
|
89
89
|
} catch (err) {
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
_chunkEQ5E4WOVcjs.popRoot.call(void 0, prev);
|
|
91
|
+
_chunkEQ5E4WOVcjs.destroyRoot.call(void 0, root);
|
|
92
92
|
if (renderingFallback) {
|
|
93
93
|
throw err;
|
|
94
94
|
}
|
|
@@ -103,11 +103,11 @@ function ErrorBoundary(props) {
|
|
|
103
103
|
}
|
|
104
104
|
return;
|
|
105
105
|
}
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
_chunkEQ5E4WOVcjs.popRoot.call(void 0, prev);
|
|
107
|
+
_chunkEQ5E4WOVcjs.flushOnMount.call(void 0, root);
|
|
108
108
|
cleanup = () => {
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
_chunkEQ5E4WOVcjs.destroyRoot.call(void 0, root);
|
|
110
|
+
_chunkI4GKKAAYcjs.removeNodes.call(void 0, nodes);
|
|
111
111
|
};
|
|
112
112
|
activeNodes = nodes;
|
|
113
113
|
};
|
|
@@ -116,7 +116,7 @@ function ErrorBoundary(props) {
|
|
|
116
116
|
renderValue(toView(null));
|
|
117
117
|
};
|
|
118
118
|
renderValue(_nullishCoalesce(props.children, () => ( null)));
|
|
119
|
-
|
|
119
|
+
_chunkEQ5E4WOVcjs.registerErrorHandler.call(void 0, (err) => {
|
|
120
120
|
renderValue(toView(err));
|
|
121
121
|
_optionalChain([props, 'access', _5 => _5.onError, 'optionalCall', _6 => _6(err)]);
|
|
122
122
|
return true;
|
|
@@ -125,7 +125,7 @@ function ErrorBoundary(props) {
|
|
|
125
125
|
const isGetter = typeof props.resetKeys === "function" && props.resetKeys.length === 0;
|
|
126
126
|
const getter = isGetter ? props.resetKeys : void 0;
|
|
127
127
|
let prev = isGetter ? getter() : props.resetKeys;
|
|
128
|
-
|
|
128
|
+
_chunkEQ5E4WOVcjs.createEffect.call(void 0, () => {
|
|
129
129
|
const next = getter ? getter() : props.resetKeys;
|
|
130
130
|
if (prev !== next) {
|
|
131
131
|
prev = next;
|
|
@@ -154,11 +154,11 @@ function createSuspenseToken() {
|
|
|
154
154
|
}
|
|
155
155
|
var isThenable = (value) => typeof value === "object" && value !== null && typeof value.then === "function";
|
|
156
156
|
function Suspense(props) {
|
|
157
|
-
const streamHooks =
|
|
158
|
-
const pending =
|
|
157
|
+
const streamHooks = _chunkEQ5E4WOVcjs.__fictGetSSRStreamHooks.call(void 0, );
|
|
158
|
+
const pending = _chunkEQ5E4WOVcjs.signal.call(void 0, 0);
|
|
159
159
|
let resolvedOnce = false;
|
|
160
160
|
let epoch = 0;
|
|
161
|
-
const hostRoot =
|
|
161
|
+
const hostRoot = _chunkEQ5E4WOVcjs.getCurrentRoot.call(void 0, );
|
|
162
162
|
const toFallback = (err) => typeof props.fallback === "function" ? props.fallback(err) : props.fallback;
|
|
163
163
|
const renderView = (view) => {
|
|
164
164
|
if (cleanup) {
|
|
@@ -166,50 +166,50 @@ function Suspense(props) {
|
|
|
166
166
|
cleanup = void 0;
|
|
167
167
|
}
|
|
168
168
|
if (activeNodes.length) {
|
|
169
|
-
|
|
169
|
+
_chunkI4GKKAAYcjs.removeNodes.call(void 0, activeNodes);
|
|
170
170
|
activeNodes = [];
|
|
171
171
|
}
|
|
172
172
|
if (view == null || view === false) {
|
|
173
173
|
return;
|
|
174
174
|
}
|
|
175
|
-
const root =
|
|
176
|
-
const prev =
|
|
175
|
+
const root = _chunkEQ5E4WOVcjs.createRootContext.call(void 0, hostRoot);
|
|
176
|
+
const prev = _chunkEQ5E4WOVcjs.pushRoot.call(void 0, root);
|
|
177
177
|
let nodes = [];
|
|
178
178
|
let boundaryPushed = false;
|
|
179
179
|
try {
|
|
180
180
|
if (streamBoundaryId) {
|
|
181
|
-
|
|
181
|
+
_chunkEQ5E4WOVcjs.__fictPushSSRBoundary.call(void 0, streamBoundaryId);
|
|
182
182
|
boundaryPushed = true;
|
|
183
183
|
}
|
|
184
|
-
const output =
|
|
185
|
-
nodes =
|
|
184
|
+
const output = _chunkI4GKKAAYcjs.createElement.call(void 0, view);
|
|
185
|
+
nodes = _chunkI4GKKAAYcjs.toNodeArray.call(void 0, output);
|
|
186
186
|
const suspendedAttempt = root.suspended || nodes.length > 0 && nodes.every((node) => node instanceof Comment && node.data === "fict:suspend");
|
|
187
187
|
if (suspendedAttempt) {
|
|
188
|
-
|
|
189
|
-
|
|
188
|
+
_chunkEQ5E4WOVcjs.popRoot.call(void 0, prev);
|
|
189
|
+
_chunkEQ5E4WOVcjs.destroyRoot.call(void 0, root);
|
|
190
190
|
return;
|
|
191
191
|
}
|
|
192
192
|
const parentNode = endMarker.parentNode;
|
|
193
193
|
if (parentNode) {
|
|
194
|
-
|
|
194
|
+
_chunkI4GKKAAYcjs.insertNodesBefore.call(void 0, parentNode, nodes, endMarker);
|
|
195
195
|
}
|
|
196
196
|
} catch (err) {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
if (!
|
|
197
|
+
_chunkEQ5E4WOVcjs.popRoot.call(void 0, prev);
|
|
198
|
+
_chunkEQ5E4WOVcjs.destroyRoot.call(void 0, root);
|
|
199
|
+
if (!_chunkEQ5E4WOVcjs.handleError.call(void 0, err, { source: "render" }, hostRoot)) {
|
|
200
200
|
throw err;
|
|
201
201
|
}
|
|
202
202
|
return;
|
|
203
203
|
} finally {
|
|
204
204
|
if (boundaryPushed) {
|
|
205
|
-
|
|
205
|
+
_chunkEQ5E4WOVcjs.__fictPopSSRBoundary.call(void 0, _nullishCoalesce(streamBoundaryId, () => ( void 0)));
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
|
|
209
|
-
|
|
208
|
+
_chunkEQ5E4WOVcjs.popRoot.call(void 0, prev);
|
|
209
|
+
_chunkEQ5E4WOVcjs.flushOnMount.call(void 0, root);
|
|
210
210
|
cleanup = () => {
|
|
211
|
-
|
|
212
|
-
|
|
211
|
+
_chunkEQ5E4WOVcjs.destroyRoot.call(void 0, root);
|
|
212
|
+
_chunkI4GKKAAYcjs.removeNodes.call(void 0, nodes);
|
|
213
213
|
};
|
|
214
214
|
activeNodes = nodes;
|
|
215
215
|
};
|
|
@@ -235,7 +235,7 @@ function Suspense(props) {
|
|
|
235
235
|
_optionalChain([props, 'access', _8 => _8.onResolve, 'optionalCall', _9 => _9()]);
|
|
236
236
|
}
|
|
237
237
|
};
|
|
238
|
-
|
|
238
|
+
_chunkEQ5E4WOVcjs.registerSuspenseHandler.call(void 0, (token) => {
|
|
239
239
|
const tokenEpoch = epoch;
|
|
240
240
|
if (!streamPending && streamBoundaryId && _optionalChain([streamHooks, 'optionalAccess', _10 => _10.boundaryPending])) {
|
|
241
241
|
streamPending = true;
|
|
@@ -273,7 +273,7 @@ function Suspense(props) {
|
|
|
273
273
|
} catch (callbackError) {
|
|
274
274
|
rejectionError = callbackError;
|
|
275
275
|
}
|
|
276
|
-
const handled =
|
|
276
|
+
const handled = _chunkEQ5E4WOVcjs.handleError.call(void 0, rejectionError, { source: "render" }, hostRoot);
|
|
277
277
|
if (!handled) {
|
|
278
278
|
if (_optionalChain([streamHooks, 'optionalAccess', _14 => _14.onError])) {
|
|
279
279
|
streamHooks.onError(rejectionError, _nullishCoalesce(streamBoundaryId, () => ( void 0)));
|
|
@@ -296,7 +296,7 @@ function Suspense(props) {
|
|
|
296
296
|
const isGetter = typeof props.resetKeys === "function" && props.resetKeys.length === 0;
|
|
297
297
|
const getter = isGetter ? props.resetKeys : void 0;
|
|
298
298
|
let prev = isGetter ? getter() : props.resetKeys;
|
|
299
|
-
|
|
299
|
+
_chunkEQ5E4WOVcjs.createEffect.call(void 0, () => {
|
|
300
300
|
const next = getter ? getter() : props.resetKeys;
|
|
301
301
|
if (prev !== next) {
|
|
302
302
|
prev = next;
|
|
@@ -338,5 +338,5 @@ function Suspense(props) {
|
|
|
338
338
|
|
|
339
339
|
|
|
340
340
|
|
|
341
|
-
exports.ErrorBoundary = ErrorBoundary; exports.Fragment =
|
|
341
|
+
exports.ErrorBoundary = ErrorBoundary; exports.Fragment = _chunkI4GKKAAYcjs.Fragment; exports.Suspense = Suspense; exports.batch = _chunkI4GKKAAYcjs.batch; exports.createContext = _chunkK3DH5SD5cjs.createContext; exports.createEffect = _chunkEQ5E4WOVcjs.createEffect; exports.createElement = _chunkI4GKKAAYcjs.createElement; exports.createMemo = _chunkEQ5E4WOVcjs.createMemo; exports.createPortal = _chunkI4GKKAAYcjs.createPortal; exports.createRef = createRef; exports.createRoot = _chunkEQ5E4WOVcjs.createRoot; exports.createSuspenseToken = createSuspenseToken; exports.hasContext = _chunkK3DH5SD5cjs.hasContext; exports.keyed = _chunkI4GKKAAYcjs.keyed; exports.mergeProps = _chunkI4GKKAAYcjs.mergeProps; exports.onCleanup = _chunkEQ5E4WOVcjs.onCleanup; exports.onDestroy = _chunkEQ5E4WOVcjs.onDestroy; exports.onMount = _chunkEQ5E4WOVcjs.onMount; exports.prop = _chunkI4GKKAAYcjs.prop; exports.render = _chunkI4GKKAAYcjs.render; exports.startTransition = _chunkI4GKKAAYcjs.startTransition; exports.untrack = _chunkI4GKKAAYcjs.untrack; exports.useContext = _chunkK3DH5SD5cjs.useContext; exports.useDeferredValue = _chunkI4GKKAAYcjs.useDeferredValue; exports.useTransition = _chunkI4GKKAAYcjs.useTransition;
|
|
342
342
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { F as Fragment, J as JSX, M as Memo, d as createElement, c as createMemo, k as keyed, m as mergeProps, p as prop, r as render } from './props
|
|
2
|
-
import { S as RefObject, B as BaseProps, F as FictNode, T as SuspenseToken } from './binding-
|
|
3
|
-
export { a3 as ClassProp, Z as Cleanup, _ as Component, R as DOMElement, U as Effect, a5 as ErrorInfo, a4 as EventHandler, Y as FictVNode, $ as PropsWithChildren, a0 as Ref, a1 as RefCallback, a2 as StyleProp, j as createEffect, E as createPortal, X as createRoot, W as onCleanup, N as onDestroy, V as onMount } from './binding-
|
|
4
|
-
export { C as Context, F as FictDevtoolsHook, P as ProviderProps, c as createContext, h as hasContext, u as useContext } from './devtools-
|
|
5
|
-
import './signal-
|
|
1
|
+
export { F as Fragment, J as JSX, M as Memo, d as createElement, c as createMemo, k as keyed, m as mergeProps, p as prop, r as render } from './props--zJ4ebbT.cjs';
|
|
2
|
+
import { S as RefObject, B as BaseProps, F as FictNode, T as SuspenseToken } from './binding-DUEukRxl.cjs';
|
|
3
|
+
export { a3 as ClassProp, Z as Cleanup, _ as Component, R as DOMElement, U as Effect, a5 as ErrorInfo, a4 as EventHandler, Y as FictVNode, $ as PropsWithChildren, a0 as Ref, a1 as RefCallback, a2 as StyleProp, j as createEffect, E as createPortal, X as createRoot, W as onCleanup, N as onDestroy, V as onMount } from './binding-DUEukRxl.cjs';
|
|
4
|
+
export { C as Context, F as FictDevtoolsHook, P as ProviderProps, c as createContext, h as hasContext, u as useContext } from './devtools-CMxlJUTx.cjs';
|
|
5
|
+
import './signal-Z4KkDk9h.cjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Create a ref object for DOM element references.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { F as Fragment, J as JSX, M as Memo, d as createElement, c as createMemo, k as keyed, m as mergeProps, p as prop, r as render } from './props-
|
|
2
|
-
import { S as RefObject, B as BaseProps, F as FictNode, T as SuspenseToken } from './binding-
|
|
3
|
-
export { a3 as ClassProp, Z as Cleanup, _ as Component, R as DOMElement, U as Effect, a5 as ErrorInfo, a4 as EventHandler, Y as FictVNode, $ as PropsWithChildren, a0 as Ref, a1 as RefCallback, a2 as StyleProp, j as createEffect, E as createPortal, X as createRoot, W as onCleanup, N as onDestroy, V as onMount } from './binding-
|
|
4
|
-
export { C as Context, F as FictDevtoolsHook, P as ProviderProps, c as createContext, h as hasContext, u as useContext } from './devtools-
|
|
5
|
-
import './signal-
|
|
1
|
+
export { F as Fragment, J as JSX, M as Memo, d as createElement, c as createMemo, k as keyed, m as mergeProps, p as prop, r as render } from './props-BAGR7j-j.js';
|
|
2
|
+
import { S as RefObject, B as BaseProps, F as FictNode, T as SuspenseToken } from './binding-DqxS9ZQf.js';
|
|
3
|
+
export { a3 as ClassProp, Z as Cleanup, _ as Component, R as DOMElement, U as Effect, a5 as ErrorInfo, a4 as EventHandler, Y as FictVNode, $ as PropsWithChildren, a0 as Ref, a1 as RefCallback, a2 as StyleProp, j as createEffect, E as createPortal, X as createRoot, W as onCleanup, N as onDestroy, V as onMount } from './binding-DqxS9ZQf.js';
|
|
4
|
+
export { C as Context, F as FictDevtoolsHook, P as ProviderProps, c as createContext, h as hasContext, u as useContext } from './devtools-C4Hgfa-S.js';
|
|
5
|
+
import './signal-Z4KkDk9h.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Create a ref object for DOM element references.
|