@bleedingdev/tanstack-redact 0.2.1 → 0.3.2
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/bundler-core/resolution.d.ts +31 -0
- package/dist/bundler-core/resolution.js +80 -0
- package/dist/bundler-core/resolution.js.map +7 -0
- package/dist/bundler-core/selection.d.ts +89 -0
- package/dist/bundler-core/selection.js +103 -0
- package/dist/bundler-core/selection.js.map +7 -0
- package/dist/core/devtools.d.ts +1 -1
- package/dist/core/devtools.js +1 -0
- package/dist/core/devtools.js.map +2 -2
- package/dist/core/functions.js +1 -0
- package/dist/core/functions.js.map +2 -2
- package/dist/core/internal.d.ts +5 -4
- package/dist/core/internal.js +4 -3
- package/dist/core/internal.js.map +2 -2
- package/dist/core/types.d.ts +2 -2
- package/dist/core/types.js +1 -0
- package/dist/core/types.js.map +1 -1
- package/dist/dom/devtools.d.ts +5 -5
- package/dist/dom/devtools.js +1 -0
- package/dist/dom/devtools.js.map +2 -2
- package/dist/dom/dispatcher.d.ts +1 -1
- package/dist/dom/dispatcher.js +1 -0
- package/dist/dom/dispatcher.js.map +3 -3
- package/dist/dom/document-metadata.d.ts +1 -1
- package/dist/dom/document-metadata.js +3 -1
- package/dist/dom/document-metadata.js.map +2 -2
- package/dist/dom/dom.js +1 -1
- package/dist/dom/dom.js.map +2 -2
- package/dist/dom/features/class/full.js +25 -32
- package/dist/dom/features/class/full.js.map +2 -2
- package/dist/dom/features/class/stub.js +1 -0
- package/dist/dom/features/class/stub.js.map +2 -2
- package/dist/dom/features/hydration/full.d.ts +6 -6
- package/dist/dom/features/hydration/full.js +20 -29
- package/dist/dom/features/hydration/full.js.map +2 -2
- package/dist/dom/features/hydration/stub.d.ts +7 -2
- package/dist/dom/features/hydration/stub.js +1 -0
- package/dist/dom/features/hydration/stub.js.map +2 -2
- package/dist/dom/features/lazy/full.js +1 -0
- package/dist/dom/features/lazy/full.js.map +2 -2
- package/dist/dom/features/suspense/full.d.ts +4 -1
- package/dist/dom/features/suspense/full.js +22 -161
- package/dist/dom/features/suspense/full.js.map +2 -2
- package/dist/dom/features/suspense-hydration/full.d.ts +8 -0
- package/dist/dom/features/suspense-hydration/full.js +147 -0
- package/dist/dom/features/suspense-hydration/full.js.map +7 -0
- package/dist/dom/features/suspense-hydration/index.d.ts +1 -0
- package/dist/dom/features/suspense-hydration/index.js +2 -0
- package/dist/dom/features/suspense-hydration/index.js.map +7 -0
- package/dist/dom/features/suspense-hydration/stub.d.ts +2 -0
- package/dist/dom/features/suspense-hydration/stub.js +9 -0
- package/dist/dom/features/suspense-hydration/stub.js.map +7 -0
- package/dist/dom/features/suspense-runtime/stub.js +1 -0
- package/dist/dom/features/suspense-runtime/stub.js.map +2 -2
- package/dist/dom/profiling.d.ts +36 -0
- package/dist/dom/profiling.js +9 -0
- package/dist/dom/profiling.js.map +7 -0
- package/dist/dom/react-ids.js +1 -0
- package/dist/dom/react-ids.js.map +2 -2
- package/dist/dom/reconcile.d.ts +4 -5
- package/dist/dom/reconcile.js +102 -144
- package/dist/dom/reconcile.js.map +2 -2
- package/dist/dom/resources.js +1 -0
- package/dist/dom/resources.js.map +2 -2
- package/dist/dom/root-internal.d.ts +1 -1
- package/dist/dom/root-internal.js +4 -3
- package/dist/dom/root-internal.js.map +2 -2
- package/dist/dom/root.d.ts +2 -2
- package/dist/dom/root.js +1 -0
- package/dist/dom/root.js.map +2 -2
- package/dist/dom/synthetic-event.js +6 -4
- package/dist/dom/synthetic-event.js.map +2 -2
- package/dist/dom/transitions.d.ts +1 -1
- package/dist/dom/transitions.js +1 -0
- package/dist/dom/transitions.js.map +2 -2
- package/dist/react/action-scope.d.ts +1 -1
- package/dist/react/action-scope.js +1 -0
- package/dist/react/action-scope.js.map +2 -2
- package/dist/rspack/index.d.ts +2 -0
- package/dist/rspack/index.js +6 -0
- package/dist/rspack/index.js.map +7 -0
- package/dist/server/bootstrap-script.js +1 -0
- package/dist/server/bootstrap-script.js.map +2 -2
- package/dist/server/dispatcher.js +11 -20
- package/dist/server/dispatcher.js.map +2 -2
- package/dist/server/insertion-context.js +9 -16
- package/dist/server/insertion-context.js.map +7 -0
- package/dist/server/stream-ids.js +1 -0
- package/dist/server/stream-ids.js.map +7 -0
- package/dist/server/stream.d.ts +1 -2
- package/dist/server/stream.js +106 -122
- package/dist/server/stream.js.map +2 -2
- package/dist/server/walk.js +69 -72
- package/dist/server/walk.js.map +3 -3
- package/dist/vite/index.d.ts +5 -99
- package/dist/vite/index.js +56 -179
- package/dist/vite/index.js.map +2 -2
- package/dist/webpack/index.d.ts +46 -0
- package/dist/webpack/index.js +102 -0
- package/dist/webpack/index.js.map +7 -0
- package/dist/webpack/react18-loader.cjs +25 -0
- package/package.json +17 -3
- package/src/bundler-core/resolution.ts +131 -0
- package/src/bundler-core/selection.ts +192 -0
- package/src/core/internal.ts +2 -1
- package/src/core/types.ts +3 -2
- package/src/dom/dom.ts +1 -1
- package/src/dom/features/class/full.ts +26 -34
- package/src/dom/features/suspense/full.ts +7 -165
- package/src/dom/features/suspense-hydration/full.ts +166 -0
- package/src/dom/features/suspense-hydration/index.ts +1 -0
- package/src/dom/features/suspense-hydration/stub.ts +2 -0
- package/src/dom/profiling.ts +6 -0
- package/src/dom/reconcile.ts +16 -6
- package/src/dom/synthetic-event.ts +9 -4
- package/src/rspack/index.ts +2 -0
- package/src/server/stream.ts +15 -14
- package/src/vite/index.ts +55 -317
- package/src/webpack/index.ts +108 -0
- package/src/webpack/react18-loader.cjs +25 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export * from "./index.js";
|
|
2
|
+
export * from "./client.js";
|
|
3
|
+
declare const _default: {
|
|
4
|
+
createRoot: typeof import("./root.js").createRoot;
|
|
5
|
+
hydrateRoot: typeof import("./root.js").hydrateRoot;
|
|
6
|
+
useFormStatus: typeof import("./index.js").useFormStatus;
|
|
7
|
+
useFormState: typeof import("./index.js").useFormState;
|
|
8
|
+
requestFormReset: typeof import("./form-actions.js").requestFormReset;
|
|
9
|
+
flushSync: typeof import("./reconcile.js").flushSyncWork;
|
|
10
|
+
unstable_batchedUpdates: typeof import("./reconcile.js").batchedUpdates;
|
|
11
|
+
createPortal: typeof import("./portal.js").createPortal;
|
|
12
|
+
browser: typeof import("./index.js").browser;
|
|
13
|
+
preconnect: typeof import("./resource-hints.js").preconnect;
|
|
14
|
+
prefetchDNS: typeof import("./resource-hints.js").prefetchDNS;
|
|
15
|
+
preload: typeof import("./resource-hints.js").preload;
|
|
16
|
+
preinit: typeof import("./resource-hints.js").preinit;
|
|
17
|
+
preloadModule: typeof import("./resource-hints.js").preloadModule;
|
|
18
|
+
preinitModule: typeof import("./resource-hints.js").preinitModule;
|
|
19
|
+
__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE: {
|
|
20
|
+
d: {
|
|
21
|
+
f(): void;
|
|
22
|
+
r: typeof import("./form-actions.js").requestFormReset;
|
|
23
|
+
D: typeof import("./resource-hints.js").prefetchDNS;
|
|
24
|
+
C(href: string, crossOrigin?: string): void;
|
|
25
|
+
L(href: string, as: string, options?: any): void;
|
|
26
|
+
m: typeof import("./resource-hints.js").preloadModule;
|
|
27
|
+
X(href: string, options?: any): void;
|
|
28
|
+
S(href: string, precedence?: string, options?: any): void;
|
|
29
|
+
M: typeof import("./resource-hints.js").preinitModule;
|
|
30
|
+
};
|
|
31
|
+
p: number;
|
|
32
|
+
findDOMNode: typeof import("./features/class/index.js").findDOMNode;
|
|
33
|
+
};
|
|
34
|
+
version: string;
|
|
35
|
+
};
|
|
36
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/dom/profiling.ts"],
|
|
4
|
+
"sourcesContent": ["// Compatibility entrypoint, React profiling instrumentation is not provided.\nimport dom from './index'\nimport client from './client'\nexport * from './index'\nexport * from './client'\nexport default { ...dom, ...client }\n"],
|
|
5
|
+
"mappings": "AACA,OAAO,SAAS;AAChB,OAAO,YAAY;AACnB,cAAc;AACd,cAAc;AACd,IAAA,oBAAe,EAAE,GAAG,KAAK,GAAG,OAAM;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/dom/react-ids.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/dom/react-ids.ts"],
|
|
4
|
-
"sourcesContent": ["import type { Fiber, FiberRoot } from '../core';\n// React SSR encodes the original child slots, including empty slots, into IDs.\n//
|
|
5
|
-
"mappings": "AAGA,IAAI,WAAW;
|
|
4
|
+
"sourcesContent": ["import type { Fiber, FiberRoot } from '../core/index.js';\n// React SSR encodes the original child slots, including empty slots, into IDs.\n// Redact SSR uses the same tree slots so suspended render order cannot change IDs.\nlet clientId = 0;\nexport const leadingBit = (tree: bigint): bigint => 1n << BigInt(tree.toString(2).length - 1);\nexport function forkId(base: bigint, count: number, index: number): bigint {\n const bit = leadingBit(base);\n return (bit << BigInt(32 - Math.clz32(count))) | (BigInt(index + 1) * bit) | (base ^ bit);\n}\nexport function assignReactIds(parent: Fiber, children: object): void {\n const paths = (children as {\n ip?: bigint[];\n }).ip;\n if (!paths)\n return;\n let base = parent.it ?? 1n;\n if (parent.im)\n base = forkId(base, 1, 0);\n const bit = leadingBit(base);\n let index = 0;\n for (let child = parent.c; child; child = child.s) {\n const path = paths[child.ix ?? index++] ?? 1n;\n child.it = (path * bit) | (base ^ bit);\n }\n}\nexport function reactId(fiber: Fiber, root: FiberRoot): string {\n if (!root.h)\n return clientReactId(root);\n fiber.im = true;\n const local = fiber.il ?? 0;\n fiber.il = local + 1;\n const tree = fiber.it ?? 1n;\n const id = (tree ^ leadingBit(tree)).toString(32);\n return '_' + (root.i ?? '') + 'R_' + id + (local ? 'H' + local.toString(32) : '') + '_';\n}\nexport const clientReactId = (root: FiberRoot): string => ('_' + (root.i ?? '') + 'r_' + (clientId++).toString(32) + '_');\n"],
|
|
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export { isThenable } from
|
|
3
|
-
export { deferHydration } from
|
|
4
|
-
import { FiberTag, type Fiber, type FiberRoot, type ReactElement, type ReactNode, type Effect, type Hook } from
|
|
1
|
+
export { getHostParent, findRoot, getAnchor, firstDomNode } from "./tree.js";
|
|
2
|
+
export { isThenable } from "../core/functions.js";
|
|
3
|
+
export { deferHydration } from "./features/hydration/index.js";
|
|
4
|
+
import { FiberTag, type Fiber, type FiberRoot, type ReactElement, type ReactNode, type Effect, type Hook } from "../core/index.js";
|
|
5
5
|
export declare function registerElementMarker(sym: symbol): void;
|
|
6
6
|
export declare function stageCommit(fiber: Fiber, work: Effect | (() => void), ref?: boolean): void;
|
|
7
7
|
export declare function childrenToArray(children: ReactNode): NormalizedChild[];
|
|
@@ -59,7 +59,6 @@ export declare function batchedUpdates<A, T>(fn: (arg: A) => T, arg: A): T;
|
|
|
59
59
|
*/
|
|
60
60
|
export declare function reconcileChildren(parent: Fiber, nodes: Parameters<typeof reconcile>[1], _domParent: Node, _anchor: Node | null): void;
|
|
61
61
|
export declare function installRenderer(tag: FiberTag, fn: RenderFn): void;
|
|
62
|
-
export declare const recoveringBoundaries: Set<Fiber>;
|
|
63
62
|
export declare function disposeCleanup(fiber: Fiber, cleanup: () => void): void;
|
|
64
63
|
export declare function installCapability<K extends keyof Capabilities>(name: K, fn: Capabilities[K]): void;
|
|
65
64
|
export declare function unmountFiber(fiber: Fiber, _domParent: Node, remove?: boolean): void;
|