@tanstack/redact 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.js +4 -0
- package/dist/core/index.js.map +7 -0
- package/dist/core/internal.d.ts +76 -0
- package/dist/core/internal.js +59 -0
- package/dist/core/internal.js.map +7 -0
- package/dist/core/types.d.ts +21 -0
- package/dist/core/types.js +10 -0
- package/dist/core/types.js.map +7 -0
- package/dist/dom/_all.d.ts +17 -0
- package/dist/dom/_all.js +51 -0
- package/dist/dom/_all.js.map +7 -0
- package/dist/dom/client.d.ts +3 -0
- package/dist/dom/client.js +8 -0
- package/dist/dom/client.js.map +7 -0
- package/dist/dom/dispatcher.d.ts +20 -0
- package/dist/dom/dispatcher.js +267 -0
- package/dist/dom/dispatcher.js.map +7 -0
- package/dist/dom/dom.d.ts +10 -0
- package/dist/dom/dom.js +262 -0
- package/dist/dom/dom.js.map +7 -0
- package/dist/dom/event-replay.d.ts +13 -0
- package/dist/dom/event-replay.js +46 -0
- package/dist/dom/event-replay.js.map +7 -0
- package/dist/dom/features/class/full.d.ts +1 -0
- package/dist/dom/features/class/full.js +91 -0
- package/dist/dom/features/class/full.js.map +7 -0
- package/dist/dom/features/class/index.d.ts +1 -0
- package/dist/dom/features/class/index.js +3 -0
- package/dist/dom/features/class/index.js.map +7 -0
- package/dist/dom/features/class/stub.d.ts +1 -0
- package/dist/dom/features/class/stub.js +50 -0
- package/dist/dom/features/class/stub.js.map +7 -0
- package/dist/dom/features/context/full.d.ts +1 -0
- package/dist/dom/features/context/full.js +49 -0
- package/dist/dom/features/context/full.js.map +7 -0
- package/dist/dom/features/context/index.d.ts +1 -0
- package/dist/dom/features/context/index.js +3 -0
- package/dist/dom/features/context/index.js.map +7 -0
- package/dist/dom/features/context/stub.d.ts +1 -0
- package/dist/dom/features/context/stub.js +22 -0
- package/dist/dom/features/context/stub.js.map +7 -0
- package/dist/dom/features/forward-ref/full.d.ts +1 -0
- package/dist/dom/features/forward-ref/full.js +51 -0
- package/dist/dom/features/forward-ref/full.js.map +7 -0
- package/dist/dom/features/forward-ref/index.d.ts +1 -0
- package/dist/dom/features/forward-ref/index.js +3 -0
- package/dist/dom/features/forward-ref/index.js.map +7 -0
- package/dist/dom/features/forward-ref/stub.d.ts +1 -0
- package/dist/dom/features/forward-ref/stub.js +22 -0
- package/dist/dom/features/forward-ref/stub.js.map +7 -0
- package/dist/dom/features/hydration/full.d.ts +61 -0
- package/dist/dom/features/hydration/full.js +264 -0
- package/dist/dom/features/hydration/full.js.map +7 -0
- package/dist/dom/features/hydration/index.d.ts +1 -0
- package/dist/dom/features/hydration/index.js +3 -0
- package/dist/dom/features/hydration/index.js.map +7 -0
- package/dist/dom/features/hydration/stub.d.ts +28 -0
- package/dist/dom/features/hydration/stub.js +66 -0
- package/dist/dom/features/hydration/stub.js.map +7 -0
- package/dist/dom/features/index.d.ts +7 -0
- package/dist/dom/features/index.js +9 -0
- package/dist/dom/features/index.js.map +7 -0
- package/dist/dom/features/lazy/full.d.ts +1 -0
- package/dist/dom/features/lazy/full.js +78 -0
- package/dist/dom/features/lazy/full.js.map +7 -0
- package/dist/dom/features/lazy/index.d.ts +1 -0
- package/dist/dom/features/lazy/index.js +3 -0
- package/dist/dom/features/lazy/index.js.map +7 -0
- package/dist/dom/features/lazy/stub.d.ts +1 -0
- package/dist/dom/features/lazy/stub.js +36 -0
- package/dist/dom/features/lazy/stub.js.map +7 -0
- package/dist/dom/features/memo/full.d.ts +1 -0
- package/dist/dom/features/memo/full.js +59 -0
- package/dist/dom/features/memo/full.js.map +7 -0
- package/dist/dom/features/memo/index.d.ts +1 -0
- package/dist/dom/features/memo/index.js +3 -0
- package/dist/dom/features/memo/index.js.map +7 -0
- package/dist/dom/features/memo/stub.d.ts +1 -0
- package/dist/dom/features/memo/stub.js +36 -0
- package/dist/dom/features/memo/stub.js.map +7 -0
- package/dist/dom/features/portal/full.d.ts +1 -0
- package/dist/dom/features/portal/full.js +19 -0
- package/dist/dom/features/portal/full.js.map +7 -0
- package/dist/dom/features/portal/index.d.ts +1 -0
- package/dist/dom/features/portal/index.js +3 -0
- package/dist/dom/features/portal/index.js.map +7 -0
- package/dist/dom/features/portal/stub.d.ts +1 -0
- package/dist/dom/features/portal/stub.js +7 -0
- package/dist/dom/features/portal/stub.js.map +7 -0
- package/dist/dom/features/suspense/full.d.ts +1 -0
- package/dist/dom/features/suspense/full.js +146 -0
- package/dist/dom/features/suspense/full.js.map +7 -0
- package/dist/dom/features/suspense/index.d.ts +1 -0
- package/dist/dom/features/suspense/index.js +3 -0
- package/dist/dom/features/suspense/index.js.map +7 -0
- package/dist/dom/features/suspense/stub.d.ts +1 -0
- package/dist/dom/features/suspense/stub.js +6 -0
- package/dist/dom/features/suspense/stub.js.map +7 -0
- package/dist/dom/index.d.ts +25 -0
- package/dist/dom/index.js +45 -0
- package/dist/dom/index.js.map +7 -0
- package/dist/dom/portal.d.ts +2 -0
- package/dist/dom/portal.js +15 -0
- package/dist/dom/portal.js.map +7 -0
- package/dist/dom/reconcile.d.ts +40 -0
- package/dist/dom/reconcile.js +795 -0
- package/dist/dom/reconcile.js.map +7 -0
- package/dist/dom/root.d.ts +15 -0
- package/dist/dom/root.js +85 -0
- package/dist/dom/root.js.map +7 -0
- package/dist/dom/test-utils.d.ts +1 -0
- package/dist/dom/test-utils.js +10 -0
- package/dist/dom/test-utils.js.map +7 -0
- package/dist/react/children.d.ts +8 -0
- package/dist/react/children.js +75 -0
- package/dist/react/children.js.map +7 -0
- package/dist/react/class.d.ts +31 -0
- package/dist/react/class.js +40 -0
- package/dist/react/class.js.map +7 -0
- package/dist/react/context.d.ts +27 -0
- package/dist/react/context.js +31 -0
- package/dist/react/context.js.map +7 -0
- package/dist/react/element.d.ts +10 -0
- package/dist/react/element.js +64 -0
- package/dist/react/element.js.map +7 -0
- package/dist/react/hooks.d.ts +37 -0
- package/dist/react/hooks.js +146 -0
- package/dist/react/hooks.js.map +7 -0
- package/dist/react/index.d.ts +76 -0
- package/dist/react/index.js +187 -0
- package/dist/react/index.js.map +7 -0
- package/dist/react/jsx-runtime.d.ts +5 -0
- package/dist/react/jsx-runtime.js +21 -0
- package/dist/react/jsx-runtime.js.map +7 -0
- package/dist/react/memo.d.ts +29 -0
- package/dist/react/memo.js +47 -0
- package/dist/react/memo.js.map +7 -0
- package/dist/react/portal.d.ts +1 -0
- package/dist/react/portal.js +6 -0
- package/dist/react/portal.js.map +7 -0
- package/dist/react/shared-internals.d.ts +33 -0
- package/dist/react/shared-internals.js +29 -0
- package/dist/react/shared-internals.js.map +7 -0
- package/dist/react/suspense.d.ts +15 -0
- package/dist/react/suspense.js +16 -0
- package/dist/react/suspense.js.map +7 -0
- package/dist/scheduler/index.d.ts +44 -0
- package/dist/scheduler/index.js +109 -0
- package/dist/scheduler/index.js.map +7 -0
- package/dist/server/bootstrap-script.d.ts +22 -0
- package/dist/server/bootstrap-script.js +16 -0
- package/dist/server/bootstrap-script.js.map +7 -0
- package/dist/server/dispatcher.d.ts +37 -0
- package/dist/server/dispatcher.js +140 -0
- package/dist/server/dispatcher.js.map +7 -0
- package/dist/server/escape.d.ts +7 -0
- package/dist/server/escape.js +159 -0
- package/dist/server/escape.js.map +7 -0
- package/dist/server/index.d.ts +16 -0
- package/dist/server/index.js +26 -0
- package/dist/server/index.js.map +7 -0
- package/dist/server/renderToString.d.ts +7 -0
- package/dist/server/renderToString.js +29 -0
- package/dist/server/renderToString.js.map +7 -0
- package/dist/server/stream.d.ts +40 -0
- package/dist/server/stream.js +200 -0
- package/dist/server/stream.js.map +7 -0
- package/dist/server/walk.d.ts +33 -0
- package/dist/server/walk.js +298 -0
- package/dist/server/walk.js.map +7 -0
- package/dist/vite/index.d.ts +96 -0
- package/dist/vite/index.js +217 -0
- package/dist/vite/index.js.map +7 -0
- package/package.json +83 -0
- package/src/core/index.ts +2 -0
- package/src/core/internal.ts +107 -0
- package/src/core/types.ts +36 -0
- package/src/dom/_all.ts +54 -0
- package/src/dom/client.ts +4 -0
- package/src/dom/dispatcher.ts +318 -0
- package/src/dom/dom.ts +316 -0
- package/src/dom/event-replay.ts +55 -0
- package/src/dom/features/class/full.ts +104 -0
- package/src/dom/features/class/index.ts +1 -0
- package/src/dom/features/class/stub.ts +65 -0
- package/src/dom/features/context/full.ts +57 -0
- package/src/dom/features/context/index.ts +1 -0
- package/src/dom/features/context/stub.ts +32 -0
- package/src/dom/features/forward-ref/full.ts +54 -0
- package/src/dom/features/forward-ref/index.ts +1 -0
- package/src/dom/features/forward-ref/stub.ts +28 -0
- package/src/dom/features/hydration/full.ts +345 -0
- package/src/dom/features/hydration/index.ts +1 -0
- package/src/dom/features/hydration/stub.ts +72 -0
- package/src/dom/features/index.ts +11 -0
- package/src/dom/features/lazy/full.ts +98 -0
- package/src/dom/features/lazy/index.ts +1 -0
- package/src/dom/features/lazy/stub.ts +45 -0
- package/src/dom/features/memo/full.ts +74 -0
- package/src/dom/features/memo/index.ts +1 -0
- package/src/dom/features/memo/stub.ts +42 -0
- package/src/dom/features/portal/full.ts +22 -0
- package/src/dom/features/portal/index.ts +1 -0
- package/src/dom/features/portal/stub.ts +11 -0
- package/src/dom/features/suspense/full.ts +191 -0
- package/src/dom/features/suspense/index.ts +1 -0
- package/src/dom/features/suspense/stub.ts +12 -0
- package/src/dom/index.ts +33 -0
- package/src/dom/portal.ts +16 -0
- package/src/dom/reconcile.ts +1169 -0
- package/src/dom/root.ts +107 -0
- package/src/dom/test-utils.ts +6 -0
- package/src/react/children.ts +85 -0
- package/src/react/class.ts +56 -0
- package/src/react/context.ts +50 -0
- package/src/react/element.ts +80 -0
- package/src/react/hooks.ts +190 -0
- package/src/react/index.ts +132 -0
- package/src/react/jsx-runtime.ts +16 -0
- package/src/react/memo.ts +45 -0
- package/src/react/portal.ts +1 -0
- package/src/react/shared-internals.ts +79 -0
- package/src/react/suspense.ts +18 -0
- package/src/scheduler/index.ts +124 -0
- package/src/server/bootstrap-script.ts +52 -0
- package/src/server/dispatcher.ts +158 -0
- package/src/server/escape.ts +187 -0
- package/src/server/index.ts +26 -0
- package/src/server/renderToString.ts +33 -0
- package/src/server/stream.ts +302 -0
- package/src/server/walk.ts +448 -0
- package/src/vite/index.ts +401 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import './features';
|
|
2
|
+
export { flushSync, batchedUpdates as unstable_batchedUpdates } from './root';
|
|
3
|
+
export { createPortal } from './portal';
|
|
4
|
+
export declare function preconnect(_href: string, _opts?: any): void;
|
|
5
|
+
export declare function prefetchDNS(_href: string): void;
|
|
6
|
+
export declare function preload(_href: string, _opts?: any): void;
|
|
7
|
+
export declare function preinit(_href: string, _opts?: any): void;
|
|
8
|
+
export declare function preloadModule(_href: string, _opts?: any): void;
|
|
9
|
+
export declare function preinitModule(_href: string, _opts?: any): void;
|
|
10
|
+
export declare const version = "19.2.3";
|
|
11
|
+
import { flushSync, batchedUpdates } from './root';
|
|
12
|
+
import { createPortal } from './portal';
|
|
13
|
+
declare const _default: {
|
|
14
|
+
flushSync: typeof flushSync;
|
|
15
|
+
unstable_batchedUpdates: typeof batchedUpdates;
|
|
16
|
+
createPortal: typeof createPortal;
|
|
17
|
+
preconnect: typeof preconnect;
|
|
18
|
+
prefetchDNS: typeof prefetchDNS;
|
|
19
|
+
preload: typeof preload;
|
|
20
|
+
preinit: typeof preinit;
|
|
21
|
+
preloadModule: typeof preloadModule;
|
|
22
|
+
preinitModule: typeof preinitModule;
|
|
23
|
+
version: string;
|
|
24
|
+
};
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// packages/redact/src/dom/index.ts
|
|
2
|
+
import "./features";
|
|
3
|
+
import { flushSync, batchedUpdates } from "./root";
|
|
4
|
+
import { createPortal } from "./portal";
|
|
5
|
+
import { flushSync as flushSync2, batchedUpdates as batchedUpdates2 } from "./root";
|
|
6
|
+
import { createPortal as createPortal2 } from "./portal";
|
|
7
|
+
function preconnect(_href, _opts) {
|
|
8
|
+
}
|
|
9
|
+
function prefetchDNS(_href) {
|
|
10
|
+
}
|
|
11
|
+
function preload(_href, _opts) {
|
|
12
|
+
}
|
|
13
|
+
function preinit(_href, _opts) {
|
|
14
|
+
}
|
|
15
|
+
function preloadModule(_href, _opts) {
|
|
16
|
+
}
|
|
17
|
+
function preinitModule(_href, _opts) {
|
|
18
|
+
}
|
|
19
|
+
var version = "19.2.3";
|
|
20
|
+
var dom_default = {
|
|
21
|
+
flushSync: flushSync2,
|
|
22
|
+
unstable_batchedUpdates: batchedUpdates2,
|
|
23
|
+
createPortal: createPortal2,
|
|
24
|
+
preconnect,
|
|
25
|
+
prefetchDNS,
|
|
26
|
+
preload,
|
|
27
|
+
preinit,
|
|
28
|
+
preloadModule,
|
|
29
|
+
preinitModule,
|
|
30
|
+
version: "19.2.3"
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
createPortal,
|
|
34
|
+
dom_default as default,
|
|
35
|
+
flushSync,
|
|
36
|
+
preconnect,
|
|
37
|
+
prefetchDNS,
|
|
38
|
+
preinit,
|
|
39
|
+
preinitModule,
|
|
40
|
+
preload,
|
|
41
|
+
preloadModule,
|
|
42
|
+
batchedUpdates as unstable_batchedUpdates,
|
|
43
|
+
version
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/dom/index.ts"],
|
|
4
|
+
"sourcesContent": ["// Side-effect import: registers opt-in features (Portal, etc.) with the\n// reconciler. A vite plugin may alias individual feature modules to their\n// stub variants to strip them from the bundle.\nimport './features'\n\nexport { flushSync, batchedUpdates as unstable_batchedUpdates } from './root'\nexport { createPortal } from './portal'\n\n// Resource hints \u2014 stubs\nexport function preconnect(_href: string, _opts?: any): void {}\nexport function prefetchDNS(_href: string): void {}\nexport function preload(_href: string, _opts?: any): void {}\nexport function preinit(_href: string, _opts?: any): void {}\nexport function preloadModule(_href: string, _opts?: any): void {}\nexport function preinitModule(_href: string, _opts?: any): void {}\n\nexport const version = '19.2.3'\n\n// Required by React's default export consumers\nimport { flushSync, batchedUpdates } from './root'\nimport { createPortal } from './portal'\nexport default {\n flushSync,\n unstable_batchedUpdates: batchedUpdates,\n createPortal,\n preconnect,\n prefetchDNS,\n preload,\n preinit,\n preloadModule,\n preinitModule,\n version: '19.2.3',\n}\n"],
|
|
5
|
+
"mappings": ";AAGA,OAAO;AAEP,SAAS,WAA6B,sBAA+B;AACrE,SAAS,oBAAoB;AAa7B,SAAS,aAAAA,YAAW,kBAAAC,uBAAsB;AAC1C,SAAS,gBAAAC,qBAAoB;AAXtB,SAAS,WAAW,OAAe,OAAmB;AAAC;AACvD,SAAS,YAAY,OAAqB;AAAC;AAC3C,SAAS,QAAQ,OAAe,OAAmB;AAAC;AACpD,SAAS,QAAQ,OAAe,OAAmB;AAAC;AACpD,SAAS,cAAc,OAAe,OAAmB;AAAC;AAC1D,SAAS,cAAc,OAAe,OAAmB;AAAC;AAE1D,IAAM,UAAU;AAKvB,IAAO,cAAQ;AAAA,EACb,WAAAF;AAAA,EACA,yBAAyBC;AAAA,EACzB,cAAAC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,SAAS;AACX;",
|
|
6
|
+
"names": ["flushSync", "batchedUpdates", "createPortal"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// packages/redact/src/dom/portal.ts
|
|
2
|
+
import { REACT_PORTAL_TYPE } from "../react";
|
|
3
|
+
function createPortal(children, container, key = null) {
|
|
4
|
+
return {
|
|
5
|
+
$$typeof: REACT_PORTAL_TYPE,
|
|
6
|
+
type: REACT_PORTAL_TYPE,
|
|
7
|
+
key: key == null ? null : "" + key,
|
|
8
|
+
ref: null,
|
|
9
|
+
props: { children, container }
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
createPortal
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=portal.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/dom/portal.ts"],
|
|
4
|
+
"sourcesContent": ["import type { ReactNode, ReactElement } from '../core'\nimport { REACT_PORTAL_TYPE } from '../react'\n\nexport function createPortal(\n children: ReactNode,\n container: Element,\n key: string | null = null,\n): ReactElement {\n return {\n $$typeof: REACT_PORTAL_TYPE as any,\n type: REACT_PORTAL_TYPE as any,\n key: key == null ? null : '' + key,\n ref: null,\n props: { children, container },\n }\n}\n"],
|
|
5
|
+
"mappings": ";AACA,SAAS,yBAAyB;AAE3B,SAAS,aACd,UACA,WACA,MAAqB,MACP;AACd,SAAO;AAAA,IACL,UAAU;AAAA,IACV,MAAM;AAAA,IACN,KAAK,OAAO,OAAO,OAAO,KAAK;AAAA,IAC/B,KAAK;AAAA,IACL,OAAO,EAAE,UAAU,UAAU;AAAA,EAC/B;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { FiberTag, type Fiber, type FiberRoot, type ReactElement, type ReactNode, type Effect } from '../core';
|
|
2
|
+
export declare function scheduleUpdate(fiber: Fiber): void;
|
|
3
|
+
export declare function flushSyncWork(fn: () => void): void;
|
|
4
|
+
export declare function batchedUpdates<T>(fn: () => T): T;
|
|
5
|
+
export declare function findRoot(fiber: Fiber): FiberRoot | null;
|
|
6
|
+
export declare function renderRoot(root: FiberRoot, children: ReactNode): void;
|
|
7
|
+
type TextChild = {
|
|
8
|
+
_text: string;
|
|
9
|
+
};
|
|
10
|
+
type NormalizedChild = ReactElement | TextChild | null;
|
|
11
|
+
export declare function childrenToArray(children: ReactNode): NormalizedChild[];
|
|
12
|
+
/**
|
|
13
|
+
* Reconcile a parent fiber's child list against new normalized children.
|
|
14
|
+
* Mutates parent.child and the sibling chain.
|
|
15
|
+
* Mounts new host DOM into `domParent` before `anchor` (or appends if anchor === null).
|
|
16
|
+
*/
|
|
17
|
+
export declare function reconcileChildren(parent: Fiber, newChildren: NormalizedChild[], domParent: Node, anchor: Node | null): void;
|
|
18
|
+
export type RenderFn = (fiber: Fiber, domParent: Node, anchor: Node | null) => void;
|
|
19
|
+
export type TypeMatcher = (type: any, marker: any) => FiberTag | null;
|
|
20
|
+
export declare function registerRenderer(tag: FiberTag, fn: RenderFn): void;
|
|
21
|
+
export declare function registerTypeMatcher(m: TypeMatcher): void;
|
|
22
|
+
export declare function registerElementMarker(sym: symbol): void;
|
|
23
|
+
export declare function getCurrentRoot(): FiberRoot | null;
|
|
24
|
+
export declare function withCurrentRoot<T>(root: FiberRoot | null, fn: () => T): T;
|
|
25
|
+
export declare function getForceRerenderingFiber(): Fiber | null;
|
|
26
|
+
export declare function renderFiber(fiber: Fiber, domParent: Node, anchor: Node | null): void;
|
|
27
|
+
export interface Capabilities {
|
|
28
|
+
handleSuspended: (fiber: Fiber, thenable: Promise<any>) => void;
|
|
29
|
+
readContext: (fiber: Fiber, ctx: any) => any;
|
|
30
|
+
}
|
|
31
|
+
export declare function installCapability<K extends keyof Capabilities>(name: K, fn: Capabilities[K]): void;
|
|
32
|
+
export declare function handleSuspended(fiber: Fiber, thenable: Promise<any>): void;
|
|
33
|
+
export declare function handleErrorInRender(fiber: Fiber, err: any): void;
|
|
34
|
+
export declare function isThenable(x: any): x is Promise<any>;
|
|
35
|
+
export declare function unmountAllChildren(parent: Fiber, domParent: Node): void;
|
|
36
|
+
export declare function readContext(fiber: Fiber, ctx: any): any;
|
|
37
|
+
export declare function enqueueEffect(fiber: Fiber, effect: Effect): void;
|
|
38
|
+
export declare function scheduleLifecycle(fiber: Fiber, fn: () => void): void;
|
|
39
|
+
export declare function runEffects(root: FiberRoot): void;
|
|
40
|
+
export {};
|