kiru 0.44.4 → 0.45.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/LICENSE +1 -1
- package/README.md +3 -3
- package/dist/appContext.d.ts +38 -0
- package/dist/appContext.d.ts.map +1 -0
- package/dist/appContext.js +143 -0
- package/dist/appContext.js.map +1 -0
- package/dist/cloneVNode.d.ts +2 -0
- package/dist/cloneVNode.d.ts.map +1 -0
- package/dist/cloneVNode.js +14 -0
- package/dist/cloneVNode.js.map +1 -0
- package/dist/constants.d.ts +31 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +127 -0
- package/dist/constants.js.map +1 -0
- package/dist/context.d.ts +3 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +50 -0
- package/dist/context.js.map +1 -0
- package/dist/dom.d.ts +8 -0
- package/dist/dom.d.ts.map +1 -0
- package/dist/dom.js +582 -0
- package/dist/dom.js.map +1 -0
- package/dist/element.d.ts +6 -0
- package/dist/element.d.ts.map +1 -0
- package/dist/element.js +41 -0
- package/dist/element.js.map +1 -0
- package/dist/env.d.ts +2 -0
- package/dist/env.d.ts.map +1 -0
- package/dist/env.js +6 -0
- package/dist/env.js.map +1 -0
- package/dist/error.d.ts +19 -0
- package/dist/error.d.ts.map +1 -0
- package/dist/error.js +63 -0
- package/dist/error.js.map +1 -0
- package/dist/flags.d.ts +6 -0
- package/dist/flags.d.ts.map +1 -0
- package/dist/flags.js +16 -0
- package/dist/flags.js.map +1 -0
- package/dist/form/index.d.ts +4 -0
- package/dist/form/index.d.ts.map +1 -0
- package/dist/form/index.js +509 -0
- package/dist/form/index.js.map +1 -0
- package/dist/form/types.d.ts +121 -0
- package/dist/form/types.d.ts.map +1 -0
- package/dist/form/types.js +2 -0
- package/dist/form/types.js.map +1 -0
- package/dist/form/utils.d.ts +3 -0
- package/dist/form/utils.d.ts.map +1 -0
- package/dist/form/utils.js +16 -0
- package/dist/form/utils.js.map +1 -0
- package/dist/generateId.d.ts +8 -0
- package/dist/generateId.d.ts.map +1 -0
- package/dist/generateId.js +15 -0
- package/dist/generateId.js.map +1 -0
- package/dist/globalContext.d.ts +37 -0
- package/dist/globalContext.d.ts.map +1 -0
- package/dist/globalContext.js +85 -0
- package/dist/globalContext.js.map +1 -0
- package/dist/globals.d.ts +16 -0
- package/dist/globals.d.ts.map +1 -0
- package/dist/globals.js +15 -0
- package/dist/globals.js.map +1 -0
- package/dist/hmr.d.ts +32 -0
- package/dist/hmr.d.ts.map +1 -0
- package/dist/hmr.js +125 -0
- package/dist/hmr.js.map +1 -0
- package/dist/hooks/index.d.ts +15 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +15 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/useAsync.d.ts +29 -0
- package/dist/hooks/useAsync.d.ts.map +1 -0
- package/dist/hooks/useAsync.js +96 -0
- package/dist/hooks/useAsync.js.map +1 -0
- package/dist/hooks/useCallback.d.ts +7 -0
- package/dist/hooks/useCallback.d.ts.map +1 -0
- package/dist/hooks/useCallback.js +29 -0
- package/dist/hooks/useCallback.js.map +1 -0
- package/dist/hooks/useContext.d.ts +7 -0
- package/dist/hooks/useContext.d.ts.map +1 -0
- package/dist/hooks/useContext.js +59 -0
- package/dist/hooks/useContext.js.map +1 -0
- package/dist/hooks/useEffect.d.ts +8 -0
- package/dist/hooks/useEffect.d.ts.map +1 -0
- package/dist/hooks/useEffect.js +33 -0
- package/dist/hooks/useEffect.js.map +1 -0
- package/dist/hooks/useEffectEvent.d.ts +8 -0
- package/dist/hooks/useEffectEvent.d.ts.map +1 -0
- package/dist/hooks/useEffectEvent.js +22 -0
- package/dist/hooks/useEffectEvent.js.map +1 -0
- package/dist/hooks/useId.d.ts +8 -0
- package/dist/hooks/useId.d.ts.map +1 -0
- package/dist/hooks/useId.js +35 -0
- package/dist/hooks/useId.js.map +1 -0
- package/dist/hooks/useLayoutEffect.d.ts +8 -0
- package/dist/hooks/useLayoutEffect.d.ts.map +1 -0
- package/dist/hooks/useLayoutEffect.js +33 -0
- package/dist/hooks/useLayoutEffect.js.map +1 -0
- package/dist/hooks/useMemo.d.ts +8 -0
- package/dist/hooks/useMemo.d.ts.map +1 -0
- package/dist/hooks/useMemo.js +30 -0
- package/dist/hooks/useMemo.js.map +1 -0
- package/dist/hooks/useReducer.d.ts +7 -0
- package/dist/hooks/useReducer.d.ts.map +1 -0
- package/dist/hooks/useReducer.js +44 -0
- package/dist/hooks/useReducer.js.map +1 -0
- package/dist/hooks/useRef.d.ts +10 -0
- package/dist/hooks/useRef.d.ts.map +1 -0
- package/dist/hooks/useRef.js +28 -0
- package/dist/hooks/useRef.js.map +1 -0
- package/dist/hooks/useState.d.ts +7 -0
- package/dist/hooks/useState.d.ts.map +1 -0
- package/dist/hooks/useState.js +54 -0
- package/dist/hooks/useState.js.map +1 -0
- package/dist/hooks/useSyncExternalStore.d.ts +8 -0
- package/dist/hooks/useSyncExternalStore.d.ts.map +1 -0
- package/dist/hooks/useSyncExternalStore.js +50 -0
- package/dist/hooks/useSyncExternalStore.js.map +1 -0
- package/dist/hooks/useViewTransition.d.ts +10 -0
- package/dist/hooks/useViewTransition.d.ts.map +1 -0
- package/dist/hooks/useViewTransition.js +28 -0
- package/dist/hooks/useViewTransition.js.map +1 -0
- package/dist/hooks/utils.d.ts +69 -0
- package/dist/hooks/utils.d.ts.map +1 -0
- package/dist/hooks/utils.js +163 -0
- package/dist/hooks/utils.js.map +1 -0
- package/dist/hydration.d.ts +17 -0
- package/dist/hydration.d.ts.map +1 -0
- package/dist/hydration.js +59 -0
- package/dist/hydration.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +40 -0
- package/dist/index.js.map +1 -0
- package/dist/jsx.d.ts +6 -0
- package/dist/jsx.d.ts.map +1 -0
- package/dist/jsx.js +8 -0
- package/dist/jsx.js.map +1 -0
- package/dist/lazy.d.ts +11 -0
- package/dist/lazy.d.ts.map +1 -0
- package/dist/lazy.js +177 -0
- package/dist/lazy.js.map +1 -0
- package/dist/memo.d.ts +9 -0
- package/dist/memo.d.ts.map +1 -0
- package/dist/memo.js +25 -0
- package/dist/memo.js.map +1 -0
- package/dist/portal.d.ts +10 -0
- package/dist/portal.d.ts.map +1 -0
- package/dist/portal.js +34 -0
- package/dist/portal.js.map +1 -0
- package/dist/profiling.d.ts +26 -0
- package/dist/profiling.d.ts.map +1 -0
- package/dist/profiling.js +83 -0
- package/dist/profiling.js.map +1 -0
- package/dist/props.d.ts +4 -0
- package/dist/props.d.ts.map +1 -0
- package/dist/props.js +27 -0
- package/dist/props.js.map +1 -0
- package/dist/reconciler.d.ts +4 -0
- package/dist/reconciler.d.ts.map +1 -0
- package/dist/reconciler.js +466 -0
- package/dist/reconciler.js.map +1 -0
- package/dist/renderToString.d.ts +2 -0
- package/dist/renderToString.d.ts.map +1 -0
- package/dist/renderToString.js +74 -0
- package/dist/renderToString.js.map +1 -0
- package/dist/router/index.d.ts +3 -0
- package/dist/router/index.d.ts.map +1 -0
- package/dist/router/index.js +3 -0
- package/dist/router/index.js.map +1 -0
- package/dist/router/route.d.ts +46 -0
- package/dist/router/route.d.ts.map +1 -0
- package/dist/router/route.js +8 -0
- package/dist/router/route.js.map +1 -0
- package/dist/router/router.d.ts +62 -0
- package/dist/router/router.d.ts.map +1 -0
- package/dist/router/router.js +178 -0
- package/dist/router/router.js.map +1 -0
- package/dist/router/routerUtils.d.ts +5 -0
- package/dist/router/routerUtils.d.ts.map +1 -0
- package/dist/router/routerUtils.js +39 -0
- package/dist/router/routerUtils.js.map +1 -0
- package/dist/scheduler.d.ts +14 -0
- package/dist/scheduler.d.ts.map +1 -0
- package/dist/scheduler.js +457 -0
- package/dist/scheduler.js.map +1 -0
- package/dist/signals/base.d.ts +36 -0
- package/dist/signals/base.d.ts.map +1 -0
- package/dist/signals/base.js +205 -0
- package/dist/signals/base.js.map +1 -0
- package/dist/signals/computed.d.ts +16 -0
- package/dist/signals/computed.d.ts.map +1 -0
- package/dist/signals/computed.js +116 -0
- package/dist/signals/computed.js.map +1 -0
- package/dist/signals/effect.d.ts +18 -0
- package/dist/signals/effect.d.ts.map +1 -0
- package/dist/signals/effect.js +43 -0
- package/dist/signals/effect.js.map +1 -0
- package/dist/signals/globals.d.ts +9 -0
- package/dist/signals/globals.d.ts.map +1 -0
- package/dist/signals/globals.js +9 -0
- package/dist/signals/globals.js.map +1 -0
- package/dist/signals/index.d.ts +12 -0
- package/dist/signals/index.d.ts.map +1 -0
- package/dist/signals/index.js +12 -0
- package/dist/signals/index.js.map +1 -0
- package/dist/signals/jsx.d.ts +16 -0
- package/dist/signals/jsx.d.ts.map +1 -0
- package/dist/signals/jsx.js +11 -0
- package/dist/signals/jsx.js.map +1 -0
- package/dist/signals/types.d.ts +9 -0
- package/dist/signals/types.d.ts.map +1 -0
- package/dist/signals/types.js +2 -0
- package/dist/signals/types.js.map +1 -0
- package/dist/signals/utils.d.ts +4 -0
- package/dist/signals/utils.d.ts.map +1 -0
- package/dist/signals/utils.js +12 -0
- package/dist/signals/utils.js.map +1 -0
- package/dist/signals/watch.d.ts +24 -0
- package/dist/signals/watch.d.ts.map +1 -0
- package/dist/signals/watch.js +104 -0
- package/dist/signals/watch.js.map +1 -0
- package/dist/ssr/client.d.ts +4 -0
- package/dist/ssr/client.d.ts.map +1 -0
- package/dist/ssr/client.js +12 -0
- package/dist/ssr/client.js.map +1 -0
- package/dist/ssr/hydrationBoundary.d.ts +27 -0
- package/dist/ssr/hydrationBoundary.d.ts.map +1 -0
- package/dist/ssr/hydrationBoundary.js +30 -0
- package/dist/ssr/hydrationBoundary.js.map +1 -0
- package/dist/ssr/index.d.ts +2 -0
- package/dist/ssr/index.d.ts.map +1 -0
- package/dist/ssr/index.js +2 -0
- package/dist/ssr/index.js.map +1 -0
- package/dist/ssr/server.d.ts +3 -0
- package/dist/ssr/server.d.ts.map +1 -0
- package/dist/ssr/server.js +101 -0
- package/dist/ssr/server.js.map +1 -0
- package/dist/store.d.ts +28 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.js +166 -0
- package/dist/store.js.map +1 -0
- package/dist/swr.d.ts +74 -0
- package/dist/swr.d.ts.map +1 -0
- package/dist/swr.js +228 -0
- package/dist/swr.js.map +1 -0
- package/dist/transition.d.ts +18 -0
- package/dist/transition.d.ts.map +1 -0
- package/dist/transition.js +48 -0
- package/dist/transition.js.map +1 -0
- package/dist/types.d.ts +143 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.dom.d.ts +920 -0
- package/dist/types.dom.d.ts.map +1 -0
- package/dist/types.dom.js +2 -0
- package/dist/types.dom.js.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/types.utils.d.ts +41 -0
- package/dist/types.utils.d.ts.map +1 -0
- package/dist/types.utils.js +2 -0
- package/dist/types.utils.js.map +1 -0
- package/dist/utils.d.ts +61 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +478 -0
- package/dist/utils.js.map +1 -0
- package/dist/warning.d.ts +2 -0
- package/dist/warning.d.ts.map +1 -0
- package/dist/warning.js +4 -0
- package/dist/warning.js.map +1 -0
- package/package.json +2 -2
- package/src/appContext.ts +7 -7
- package/src/cloneVNode.ts +1 -1
- package/src/constants.ts +9 -9
- package/src/context.ts +7 -7
- package/src/dom.ts +13 -15
- package/src/element.ts +4 -4
- package/src/error.ts +11 -13
- package/src/globalContext.ts +6 -10
- package/src/globals.ts +3 -3
- package/src/hmr.ts +4 -4
- package/src/hooks/useAsync.ts +2 -2
- package/src/hooks/useCallback.ts +1 -1
- package/src/hooks/useContext.ts +6 -6
- package/src/hooks/useEffect.ts +2 -2
- package/src/hooks/useEffectEvent.ts +1 -1
- package/src/hooks/useId.ts +2 -2
- package/src/hooks/useLayoutEffect.ts +2 -2
- package/src/hooks/useMemo.ts +2 -2
- package/src/hooks/useReducer.ts +2 -2
- package/src/hooks/useRef.ts +5 -5
- package/src/hooks/useState.ts +5 -5
- package/src/hooks/useSyncExternalStore.ts +3 -3
- package/src/hooks/useViewTransition.ts +1 -1
- package/src/hooks/utils.ts +7 -9
- package/src/index.ts +4 -4
- package/src/jsx.ts +2 -2
- package/src/lazy.ts +15 -17
- package/src/memo.ts +2 -2
- package/src/portal.ts +4 -4
- package/src/props.ts +5 -7
- package/src/reconciler.ts +6 -6
- package/src/renderToString.ts +1 -1
- package/src/router/route.ts +1 -1
- package/src/router/router.ts +6 -6
- package/src/scheduler.ts +16 -16
- package/src/signals/base.ts +1 -1
- package/src/signals/types.ts +1 -1
- package/src/signals/watch.ts +2 -2
- package/src/ssr/hydrationBoundary.ts +1 -1
- package/src/ssr/server.ts +1 -1
- package/src/store.ts +7 -7
- package/src/swr.ts +2 -2
- package/src/types.dom.ts +1 -1
- package/src/types.ts +13 -13
- package/src/types.utils.ts +5 -5
- package/src/utils.ts +9 -12
- package/src/warning.ts +1 -1
|
@@ -0,0 +1,457 @@
|
|
|
1
|
+
import { flags } from "./flags.js";
|
|
2
|
+
import { $CONTEXT_PROVIDER, CONSECUTIVE_DIRTY_LIMIT, FLAG, } from "./constants.js";
|
|
3
|
+
import { commitWork, createDom, hydrateDom } from "./dom.js";
|
|
4
|
+
import { __DEV__ } from "./env.js";
|
|
5
|
+
import { KiruError } from "./error.js";
|
|
6
|
+
import { ctx, hookIndex, node, nodeToCtxMap, renderMode } from "./globals.js";
|
|
7
|
+
import { hydrationStack } from "./hydration.js";
|
|
8
|
+
import { assertValidElementProps } from "./props.js";
|
|
9
|
+
import { reconcileChildren } from "./reconciler.js";
|
|
10
|
+
import { willMemoBlockUpdate, latest, traverseApply, vNodeContains, isExoticType, } from "./utils.js";
|
|
11
|
+
import { Signal } from "./signals/base.js";
|
|
12
|
+
export function createScheduler(appCtx, maxFrameMs = 50) {
|
|
13
|
+
let nextUnitOfWork = null;
|
|
14
|
+
let treesInProgress = [];
|
|
15
|
+
let currentTreeIndex = 0;
|
|
16
|
+
let isRunning = false;
|
|
17
|
+
let nextIdleEffects = [];
|
|
18
|
+
let deletions = [];
|
|
19
|
+
let frameDeadline = 0;
|
|
20
|
+
let pendingCallback = null;
|
|
21
|
+
let frameHandle = null;
|
|
22
|
+
let isImmediateEffectsMode = false;
|
|
23
|
+
let immediateEffectDirtiedRender = false;
|
|
24
|
+
let isRenderDirtied = false;
|
|
25
|
+
let consecutiveDirtyCount = 0;
|
|
26
|
+
let pendingContextChanges = new Set();
|
|
27
|
+
let effectCallbacks = {
|
|
28
|
+
pre: [],
|
|
29
|
+
post: [],
|
|
30
|
+
};
|
|
31
|
+
let scheduler;
|
|
32
|
+
const timeRemaining = () => frameDeadline - window.performance.now();
|
|
33
|
+
const deadline = {
|
|
34
|
+
didTimeout: false,
|
|
35
|
+
timeRemaining,
|
|
36
|
+
};
|
|
37
|
+
const channel = new MessageChannel();
|
|
38
|
+
channel.port2.onmessage = () => {
|
|
39
|
+
if (typeof pendingCallback === "function") {
|
|
40
|
+
pendingCallback(deadline);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
function clear() {
|
|
44
|
+
nextUnitOfWork = null;
|
|
45
|
+
treesInProgress = [];
|
|
46
|
+
currentTreeIndex = 0;
|
|
47
|
+
nextIdleEffects = [];
|
|
48
|
+
deletions = [];
|
|
49
|
+
effectCallbacks = { pre: [], post: [] };
|
|
50
|
+
frameDeadline = 0;
|
|
51
|
+
pendingCallback = null;
|
|
52
|
+
sleep();
|
|
53
|
+
}
|
|
54
|
+
function wake() {
|
|
55
|
+
if (isRunning)
|
|
56
|
+
return;
|
|
57
|
+
isRunning = true;
|
|
58
|
+
requestIdleCallback(workLoop);
|
|
59
|
+
}
|
|
60
|
+
function sleep() {
|
|
61
|
+
isRunning = false;
|
|
62
|
+
if (frameHandle !== null) {
|
|
63
|
+
globalThis.cancelAnimationFrame(frameHandle);
|
|
64
|
+
frameHandle = null;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function nextIdle(fn, wakeUpIfIdle = true) {
|
|
68
|
+
nextIdleEffects.push(fn);
|
|
69
|
+
if (wakeUpIfIdle)
|
|
70
|
+
wake();
|
|
71
|
+
}
|
|
72
|
+
function flushSync() {
|
|
73
|
+
if (frameHandle !== null) {
|
|
74
|
+
globalThis.cancelAnimationFrame(frameHandle);
|
|
75
|
+
frameHandle = null;
|
|
76
|
+
}
|
|
77
|
+
workLoop();
|
|
78
|
+
}
|
|
79
|
+
function queueUpdate(vNode) {
|
|
80
|
+
// In immediate effect mode (useLayoutEffect), immediately mark the render as dirty
|
|
81
|
+
if (isImmediateEffectsMode) {
|
|
82
|
+
immediateEffectDirtiedRender = true;
|
|
83
|
+
}
|
|
84
|
+
// If this node is currently being rendered, just mark it dirty
|
|
85
|
+
if (node.current === vNode) {
|
|
86
|
+
if (__DEV__) {
|
|
87
|
+
window.__kiru?.profilingContext?.emit("updateDirtied", appCtx);
|
|
88
|
+
}
|
|
89
|
+
isRenderDirtied = true;
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
// If it's already the next unit of work, no need to queue again
|
|
93
|
+
if (nextUnitOfWork === vNode) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
if (nextUnitOfWork === null) {
|
|
97
|
+
treesInProgress.push(vNode);
|
|
98
|
+
nextUnitOfWork = vNode;
|
|
99
|
+
return wake();
|
|
100
|
+
}
|
|
101
|
+
// Check if the node is already in the treesInProgress queue
|
|
102
|
+
const treeIdx = treesInProgress.indexOf(vNode);
|
|
103
|
+
if (treeIdx !== -1) {
|
|
104
|
+
if (treeIdx === currentTreeIndex) {
|
|
105
|
+
// Replace current node if it's being worked on now
|
|
106
|
+
treesInProgress[treeIdx] = vNode;
|
|
107
|
+
nextUnitOfWork = vNode;
|
|
108
|
+
}
|
|
109
|
+
else if (treeIdx < currentTreeIndex) {
|
|
110
|
+
// It was already processed; requeue it to the end
|
|
111
|
+
currentTreeIndex--;
|
|
112
|
+
treesInProgress.splice(treeIdx, 1);
|
|
113
|
+
treesInProgress.push(vNode);
|
|
114
|
+
}
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
const nodeDepth = vNode.depth;
|
|
118
|
+
// Check if this node is a descendant of any trees already queued
|
|
119
|
+
for (let i = 0; i < treesInProgress.length; i++) {
|
|
120
|
+
const tree = treesInProgress[i];
|
|
121
|
+
if (tree.depth > nodeDepth)
|
|
122
|
+
continue; // Can't be an ancestor
|
|
123
|
+
if (!vNodeContains(tree, vNode))
|
|
124
|
+
continue;
|
|
125
|
+
if (i === currentTreeIndex) {
|
|
126
|
+
// It's a child of the currently worked-on tree
|
|
127
|
+
// If it's deeper within the same tree, we can skip
|
|
128
|
+
if (vNodeContains(nextUnitOfWork, vNode))
|
|
129
|
+
return;
|
|
130
|
+
// If it's not in the current work subtree, move back up to it
|
|
131
|
+
nextUnitOfWork = vNode;
|
|
132
|
+
}
|
|
133
|
+
else if (i < currentTreeIndex) {
|
|
134
|
+
// It's a descendant of an already processed tree; treat as a new update
|
|
135
|
+
treesInProgress.push(vNode);
|
|
136
|
+
}
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
// Check if this node contains any of the currently queued trees
|
|
140
|
+
let didReplaceTree = false;
|
|
141
|
+
let shouldQueueAtEnd = false;
|
|
142
|
+
for (let i = 0; i < treesInProgress.length;) {
|
|
143
|
+
const tree = treesInProgress[i];
|
|
144
|
+
if (tree.depth < nodeDepth || !vNodeContains(vNode, tree)) {
|
|
145
|
+
i++;
|
|
146
|
+
continue;
|
|
147
|
+
}
|
|
148
|
+
// This node contains another update root, replace it
|
|
149
|
+
if (i === currentTreeIndex) {
|
|
150
|
+
if (!didReplaceTree) {
|
|
151
|
+
treesInProgress.splice(i, 1, vNode);
|
|
152
|
+
nextUnitOfWork = vNode;
|
|
153
|
+
didReplaceTree = true;
|
|
154
|
+
i++; // advance past replaced node
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
treesInProgress.splice(i, 1);
|
|
158
|
+
// no increment
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
else if (i < currentTreeIndex) {
|
|
162
|
+
currentTreeIndex--;
|
|
163
|
+
treesInProgress.splice(i, 1);
|
|
164
|
+
if (!didReplaceTree) {
|
|
165
|
+
shouldQueueAtEnd = true;
|
|
166
|
+
didReplaceTree = true;
|
|
167
|
+
}
|
|
168
|
+
// no increment
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
// i > currentTreeIndex
|
|
172
|
+
treesInProgress.splice(i, 1);
|
|
173
|
+
if (!didReplaceTree) {
|
|
174
|
+
shouldQueueAtEnd = true;
|
|
175
|
+
didReplaceTree = true;
|
|
176
|
+
}
|
|
177
|
+
// no increment
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
if (!shouldQueueAtEnd && didReplaceTree) {
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
// If it doesn't overlap with any queued tree, queue as new independent update root
|
|
184
|
+
treesInProgress.push(vNode);
|
|
185
|
+
}
|
|
186
|
+
function queueDelete(vNode) {
|
|
187
|
+
traverseApply(vNode, (n) => (n.flags = flags.set(n.flags, FLAG.DELETION)));
|
|
188
|
+
deletions.push(vNode);
|
|
189
|
+
}
|
|
190
|
+
function isFlushReady() {
|
|
191
|
+
return !nextUnitOfWork && (deletions.length || treesInProgress.length);
|
|
192
|
+
}
|
|
193
|
+
function workLoop(deadline) {
|
|
194
|
+
if (__DEV__) {
|
|
195
|
+
window.__kiru?.profilingContext?.beginTick(appCtx);
|
|
196
|
+
}
|
|
197
|
+
ctx.current = appCtx;
|
|
198
|
+
while (nextUnitOfWork) {
|
|
199
|
+
nextUnitOfWork =
|
|
200
|
+
performUnitOfWork(nextUnitOfWork) ??
|
|
201
|
+
treesInProgress[++currentTreeIndex] ??
|
|
202
|
+
queueBlockedContextDependencyRoots();
|
|
203
|
+
if ((deadline?.timeRemaining() ?? 1) < 1)
|
|
204
|
+
break;
|
|
205
|
+
}
|
|
206
|
+
if (isFlushReady()) {
|
|
207
|
+
while (deletions.length) {
|
|
208
|
+
commitWork(deletions.shift());
|
|
209
|
+
}
|
|
210
|
+
const treesInProgressCopy = [...treesInProgress];
|
|
211
|
+
treesInProgress = [];
|
|
212
|
+
currentTreeIndex = 0;
|
|
213
|
+
for (const tree of treesInProgressCopy) {
|
|
214
|
+
commitWork(tree);
|
|
215
|
+
}
|
|
216
|
+
isImmediateEffectsMode = true;
|
|
217
|
+
flushEffects(effectCallbacks.pre);
|
|
218
|
+
isImmediateEffectsMode = false;
|
|
219
|
+
if (immediateEffectDirtiedRender) {
|
|
220
|
+
checkForTooManyConsecutiveDirtyRenders();
|
|
221
|
+
flushEffects(effectCallbacks.post);
|
|
222
|
+
immediateEffectDirtiedRender = false;
|
|
223
|
+
consecutiveDirtyCount++;
|
|
224
|
+
if (__DEV__) {
|
|
225
|
+
window.__kiru?.profilingContext?.endTick(appCtx);
|
|
226
|
+
window.__kiru?.profilingContext?.emit("updateDirtied", appCtx);
|
|
227
|
+
}
|
|
228
|
+
return workLoop();
|
|
229
|
+
}
|
|
230
|
+
consecutiveDirtyCount = 0;
|
|
231
|
+
flushEffects(effectCallbacks.post);
|
|
232
|
+
window.__kiru.emit("update", appCtx);
|
|
233
|
+
if (__DEV__) {
|
|
234
|
+
window.__kiru?.profilingContext?.emit("update", appCtx);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
if (!nextUnitOfWork) {
|
|
238
|
+
sleep();
|
|
239
|
+
while (nextIdleEffects.length) {
|
|
240
|
+
nextIdleEffects.shift()(scheduler);
|
|
241
|
+
}
|
|
242
|
+
if (__DEV__) {
|
|
243
|
+
window.__kiru?.profilingContext?.endTick(appCtx);
|
|
244
|
+
}
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
requestIdleCallback(workLoop);
|
|
248
|
+
}
|
|
249
|
+
function requestIdleCallback(callback) {
|
|
250
|
+
frameHandle = globalThis.requestAnimationFrame((time) => {
|
|
251
|
+
frameDeadline = time + maxFrameMs;
|
|
252
|
+
pendingCallback = callback;
|
|
253
|
+
channel.port1.postMessage(null);
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
function queueBlockedContextDependencyRoots() {
|
|
257
|
+
if (pendingContextChanges.size === 0)
|
|
258
|
+
return null;
|
|
259
|
+
// TODO: it's possible that a 'job' created by this process is
|
|
260
|
+
// blocked by a parent memo after a queueUpdate -> replaceTree action.
|
|
261
|
+
// To prevent this, we might need to add these to a distinct queue.
|
|
262
|
+
const jobRoots = [];
|
|
263
|
+
pendingContextChanges.forEach((provider) => {
|
|
264
|
+
provider.props.dependents.forEach((dep) => {
|
|
265
|
+
if (!willMemoBlockUpdate(provider, dep))
|
|
266
|
+
return;
|
|
267
|
+
const depDepth = dep.depth;
|
|
268
|
+
for (let i = 0; i < jobRoots.length; i++) {
|
|
269
|
+
const root = jobRoots[i];
|
|
270
|
+
const rootDepth = root.depth;
|
|
271
|
+
if (depDepth > rootDepth && vNodeContains(root, dep)) {
|
|
272
|
+
if (willMemoBlockUpdate(root, dep)) {
|
|
273
|
+
// root is a parent of dep and there's a memo between them, prevent consolidation and queue as new root
|
|
274
|
+
break;
|
|
275
|
+
}
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
if (depDepth < rootDepth && vNodeContains(dep, root)) {
|
|
279
|
+
jobRoots[i] = dep;
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
jobRoots.push(dep);
|
|
284
|
+
});
|
|
285
|
+
});
|
|
286
|
+
pendingContextChanges.clear();
|
|
287
|
+
treesInProgress.push(...jobRoots);
|
|
288
|
+
return jobRoots[0] ?? null;
|
|
289
|
+
}
|
|
290
|
+
function performUnitOfWork(vNode) {
|
|
291
|
+
let renderChild = true;
|
|
292
|
+
try {
|
|
293
|
+
const { props } = vNode;
|
|
294
|
+
if (typeof vNode.type === "string") {
|
|
295
|
+
updateHostComponent(vNode);
|
|
296
|
+
}
|
|
297
|
+
else if (isExoticType(vNode.type)) {
|
|
298
|
+
if (vNode.type === $CONTEXT_PROVIDER) {
|
|
299
|
+
const asProvider = vNode;
|
|
300
|
+
const { dependents, value } = asProvider.props;
|
|
301
|
+
if (dependents.size &&
|
|
302
|
+
asProvider.prev &&
|
|
303
|
+
asProvider.prev.props.value !== value) {
|
|
304
|
+
pendingContextChanges.add(asProvider);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
vNode.child = reconcileChildren(vNode, props.children);
|
|
308
|
+
vNode.deletions?.forEach((d) => queueDelete(d));
|
|
309
|
+
}
|
|
310
|
+
else {
|
|
311
|
+
renderChild = updateFunctionComponent(vNode);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
catch (error) {
|
|
315
|
+
window.__kiru?.emit("error", appCtx, error instanceof Error ? error : new Error(String(error)));
|
|
316
|
+
if (KiruError.isKiruError(error)) {
|
|
317
|
+
if (error.customNodeStack) {
|
|
318
|
+
setTimeout(() => {
|
|
319
|
+
throw new Error(error.customNodeStack);
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
if (error.fatal) {
|
|
323
|
+
throw error;
|
|
324
|
+
}
|
|
325
|
+
console.error(error);
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
setTimeout(() => {
|
|
329
|
+
throw error;
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
if (renderChild && vNode.child) {
|
|
333
|
+
return vNode.child;
|
|
334
|
+
}
|
|
335
|
+
let nextNode = vNode;
|
|
336
|
+
while (nextNode) {
|
|
337
|
+
// queue effects upon ascent
|
|
338
|
+
if (nextNode.immediateEffects) {
|
|
339
|
+
effectCallbacks.pre.push(...nextNode.immediateEffects);
|
|
340
|
+
nextNode.immediateEffects = undefined;
|
|
341
|
+
}
|
|
342
|
+
if (nextNode.effects) {
|
|
343
|
+
effectCallbacks.post.push(...nextNode.effects);
|
|
344
|
+
nextNode.effects = undefined;
|
|
345
|
+
}
|
|
346
|
+
if (nextNode === treesInProgress[currentTreeIndex])
|
|
347
|
+
return;
|
|
348
|
+
if (nextNode.sibling) {
|
|
349
|
+
return nextNode.sibling;
|
|
350
|
+
}
|
|
351
|
+
nextNode = nextNode.parent;
|
|
352
|
+
if (renderMode.current === "hydrate" && nextNode?.dom) {
|
|
353
|
+
hydrationStack.pop();
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
function updateFunctionComponent(vNode) {
|
|
358
|
+
const { type, props, subs, prev, isMemoized } = vNode;
|
|
359
|
+
if (isMemoized) {
|
|
360
|
+
vNode.memoizedProps = props;
|
|
361
|
+
if (prev?.memoizedProps &&
|
|
362
|
+
vNode.arePropsEqual(prev.memoizedProps, props) &&
|
|
363
|
+
!vNode.hmrUpdated) {
|
|
364
|
+
return false;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
try {
|
|
368
|
+
node.current = vNode;
|
|
369
|
+
nodeToCtxMap.set(vNode, appCtx);
|
|
370
|
+
let newChild;
|
|
371
|
+
let renderTryCount = 0;
|
|
372
|
+
do {
|
|
373
|
+
isRenderDirtied = false;
|
|
374
|
+
hookIndex.current = 0;
|
|
375
|
+
/**
|
|
376
|
+
* remove previous signal subscriptions (if any) every render.
|
|
377
|
+
* this prevents no-longer-observed signals from triggering updates
|
|
378
|
+
* in components that are not currently using them.
|
|
379
|
+
*
|
|
380
|
+
* TODO: in future, we might be able to optimize this by
|
|
381
|
+
* only clearing the subscriptions that are no longer needed
|
|
382
|
+
* and not clearing the entire set.
|
|
383
|
+
*/
|
|
384
|
+
if (subs) {
|
|
385
|
+
for (const sub of subs) {
|
|
386
|
+
Signal.unsubscribe(vNode, sub);
|
|
387
|
+
}
|
|
388
|
+
subs.clear();
|
|
389
|
+
}
|
|
390
|
+
if (__DEV__) {
|
|
391
|
+
newChild = latest(type)(props);
|
|
392
|
+
delete vNode.hmrUpdated;
|
|
393
|
+
if (++renderTryCount > CONSECUTIVE_DIRTY_LIMIT) {
|
|
394
|
+
throw new KiruError({
|
|
395
|
+
message: "Too many re-renders. Kiru limits the number of renders to prevent an infinite loop.",
|
|
396
|
+
fatal: true,
|
|
397
|
+
vNode,
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
continue;
|
|
401
|
+
}
|
|
402
|
+
newChild = type(props);
|
|
403
|
+
} while (isRenderDirtied);
|
|
404
|
+
vNode.child = reconcileChildren(vNode, newChild);
|
|
405
|
+
vNode.deletions?.forEach((d) => queueDelete(d));
|
|
406
|
+
return true;
|
|
407
|
+
}
|
|
408
|
+
finally {
|
|
409
|
+
node.current = null;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
function updateHostComponent(vNode) {
|
|
413
|
+
const { props } = vNode;
|
|
414
|
+
if (__DEV__) {
|
|
415
|
+
assertValidElementProps(vNode);
|
|
416
|
+
}
|
|
417
|
+
if (!vNode.dom) {
|
|
418
|
+
if (renderMode.current === "hydrate") {
|
|
419
|
+
hydrateDom(vNode);
|
|
420
|
+
}
|
|
421
|
+
else {
|
|
422
|
+
vNode.dom = createDom(vNode);
|
|
423
|
+
}
|
|
424
|
+
if (__DEV__) {
|
|
425
|
+
// @ts-expect-error we apply vNode to the dom node
|
|
426
|
+
vNode.dom.__kiruNode = vNode;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
// text should _never_ have children
|
|
430
|
+
if (vNode.type !== "#text") {
|
|
431
|
+
vNode.child = reconcileChildren(vNode, props.children);
|
|
432
|
+
vNode.deletions?.forEach((d) => queueDelete(d));
|
|
433
|
+
}
|
|
434
|
+
if (vNode.child && renderMode.current === "hydrate") {
|
|
435
|
+
hydrationStack.push(vNode.dom);
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
function checkForTooManyConsecutiveDirtyRenders() {
|
|
439
|
+
if (consecutiveDirtyCount > CONSECUTIVE_DIRTY_LIMIT) {
|
|
440
|
+
throw new KiruError("Maximum update depth exceeded. This can happen when a component repeatedly calls setState during render or in useLayoutEffect. Kiru limits the number of nested updates to prevent infinite loops.");
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
function flushEffects(effectArr) {
|
|
444
|
+
while (effectArr.length)
|
|
445
|
+
effectArr.shift()();
|
|
446
|
+
}
|
|
447
|
+
return (scheduler = {
|
|
448
|
+
clear,
|
|
449
|
+
wake,
|
|
450
|
+
sleep,
|
|
451
|
+
nextIdle,
|
|
452
|
+
flushSync,
|
|
453
|
+
queueUpdate,
|
|
454
|
+
queueDelete,
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
//# sourceMappingURL=scheduler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduler.js","sourceRoot":"","sources":["../src/scheduler.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EACvB,IAAI,GACL,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AACtC,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAA;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EACL,mBAAmB,EACnB,MAAM,EACN,aAAa,EACb,aAAa,EACb,YAAY,GACb,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAc1C,MAAM,UAAU,eAAe,CAC7B,MAAuB,EACvB,UAAU,GAAG,EAAE;IAEf,IAAI,cAAc,GAAiB,IAAI,CAAA;IACvC,IAAI,eAAe,GAA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|
1
|
+
import { $HMR_ACCEPT, $SIGNAL } from "../constants.js";
|
|
2
|
+
import type { HMRAccept } from "../hmr.js";
|
|
3
|
+
import { type SignalSubscriber, ReadonlySignal } from "./types.js";
|
|
4
|
+
export declare class Signal<T> {
|
|
5
|
+
[$SIGNAL]: boolean;
|
|
6
|
+
[$HMR_ACCEPT]?: HMRAccept<Signal<any>>;
|
|
7
|
+
displayName?: string;
|
|
8
|
+
private onBeforeRead?;
|
|
9
|
+
protected $id: string;
|
|
10
|
+
protected $value: T;
|
|
11
|
+
protected $initialValue?: string;
|
|
12
|
+
protected __next?: Signal<T>;
|
|
13
|
+
protected $isDisposed?: boolean;
|
|
14
|
+
constructor(initial: T, displayName?: string);
|
|
15
|
+
get value(): T;
|
|
16
|
+
set value(next: T);
|
|
17
|
+
peek(): T;
|
|
18
|
+
sneak(newValue: T): void;
|
|
19
|
+
toString(): string;
|
|
20
|
+
subscribe(cb: (state: T) => void): () => void;
|
|
21
|
+
notify(options?: {
|
|
22
|
+
filter?: (sub: Function | Kiru.VNode) => boolean;
|
|
23
|
+
}): void;
|
|
24
|
+
static isSignal(x: any): x is Signal<any>;
|
|
25
|
+
static unsubscribe(sub: SignalSubscriber, id: string): void;
|
|
26
|
+
static subscribers(signal: Signal<any>): Set<SignalSubscriber>;
|
|
27
|
+
static makeReadonly<T>(signal: Signal<T>): ReadonlySignal<T>;
|
|
28
|
+
static makeWritable<T>(signal: Signal<T>): Signal<T>;
|
|
29
|
+
static getId<T>(signal: Signal<T>): string;
|
|
30
|
+
static entangle<T>(signal: Signal<T>): void;
|
|
31
|
+
static configure(signal: Signal<any>, onBeforeRead?: () => void): void;
|
|
32
|
+
static dispose(signal: Signal<any>): void;
|
|
33
|
+
}
|
|
34
|
+
export declare const signal: <T>(initial: T, displayName?: string) => Signal<T>;
|
|
35
|
+
export declare const useSignal: <T>(initial: T, displayName?: string) => Signal<T>;
|
|
36
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@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