@bleedingdev/tanstack-redact 0.0.0-stage → 0.2.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/LICENSE +21 -0
- package/dist/cloudflare/index.d.ts +6 -0
- package/dist/cloudflare/index.js +39 -0
- package/dist/cloudflare/index.js.map +7 -0
- package/dist/core/attributes.d.ts +4 -0
- package/dist/core/attributes.js +30 -0
- package/dist/core/attributes.js.map +7 -0
- package/dist/core/browser.d.ts +9 -0
- package/dist/core/browser.js +32 -0
- package/dist/core/browser.js.map +7 -0
- package/dist/core/class-props.d.ts +1 -0
- package/dist/core/class-props.js +15 -0
- package/dist/core/class-props.js.map +7 -0
- package/dist/core/devtools.d.ts +26 -0
- package/dist/core/devtools.js +70 -0
- package/dist/core/devtools.js.map +7 -0
- package/dist/core/functions.d.ts +6 -0
- package/dist/core/functions.js +14 -0
- package/dist/core/functions.js.map +7 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.js +3 -0
- package/dist/core/index.js.map +7 -0
- package/dist/core/internal.d.ts +103 -0
- package/dist/core/internal.js +43 -0
- package/dist/core/internal.js.map +7 -0
- package/dist/core/resource-hints.d.ts +7 -0
- package/dist/core/resource-hints.js +20 -0
- package/dist/core/resource-hints.js.map +7 -0
- package/dist/core/types.d.ts +23 -0
- package/dist/core/types.js +8 -0
- package/dist/core/types.js.map +7 -0
- package/dist/core/unitless-style.d.ts +1 -0
- package/dist/core/unitless-style.js +5 -0
- package/dist/core/unitless-style.js.map +7 -0
- package/dist/dom/_all.d.ts +27 -0
- package/dist/dom/_all.js +51 -0
- package/dist/dom/_all.js.map +7 -0
- package/dist/dom/client.d.ts +9 -0
- package/dist/dom/client.js +13 -0
- package/dist/dom/client.js.map +7 -0
- package/dist/dom/commit.d.ts +27 -0
- package/dist/dom/commit.js +237 -0
- package/dist/dom/commit.js.map +7 -0
- package/dist/dom/devtools-effects.d.ts +8 -0
- package/dist/dom/devtools-effects.js +80 -0
- package/dist/dom/devtools-effects.js.map +7 -0
- package/dist/dom/devtools.d.ts +33 -0
- package/dist/dom/devtools.js +635 -0
- package/dist/dom/devtools.js.map +7 -0
- package/dist/dom/dispatcher.d.ts +4 -0
- package/dist/dom/dispatcher.js +437 -0
- package/dist/dom/dispatcher.js.map +7 -0
- package/dist/dom/document-metadata.d.ts +7 -0
- package/dist/dom/document-metadata.js +44 -0
- package/dist/dom/document-metadata.js.map +7 -0
- package/dist/dom/dom.d.ts +11 -0
- package/dist/dom/dom.js +165 -0
- package/dist/dom/dom.js.map +7 -0
- package/dist/dom/error-info.d.ts +2 -0
- package/dist/dom/error-info.js +19 -0
- package/dist/dom/error-info.js.map +7 -0
- package/dist/dom/event-replay.d.ts +13 -0
- package/dist/dom/event-replay.js +24 -0
- package/dist/dom/event-replay.js.map +7 -0
- package/dist/dom/features/activity/full.d.ts +1 -0
- package/dist/dom/features/activity/full.js +140 -0
- package/dist/dom/features/activity/full.js.map +7 -0
- package/dist/dom/features/activity/index.d.ts +1 -0
- package/dist/dom/features/activity/index.js +2 -0
- package/dist/dom/features/activity/index.js.map +7 -0
- package/dist/dom/features/activity/stub.d.ts +1 -0
- package/dist/dom/features/activity/stub.js +10 -0
- package/dist/dom/features/activity/stub.js.map +7 -0
- package/dist/dom/features/class/full.d.ts +1 -0
- package/dist/dom/features/class/full.js +208 -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 +2 -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 +46 -0
- package/dist/dom/features/class/stub.js.map +7 -0
- package/dist/dom/features/context/full.d.ts +4 -0
- package/dist/dom/features/context/full.js +103 -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 +2 -0
- package/dist/dom/features/context/index.js.map +7 -0
- package/dist/dom/features/context/stub.d.ts +4 -0
- package/dist/dom/features/context/stub.js +21 -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 +9 -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 +2 -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 +9 -0
- package/dist/dom/features/forward-ref/stub.js.map +7 -0
- package/dist/dom/features/fragment-refs/index.d.ts +1 -0
- package/dist/dom/features/fragment-refs/index.js +9 -0
- package/dist/dom/features/fragment-refs/index.js.map +7 -0
- package/dist/dom/features/fragment-refs/stub.d.ts +5 -0
- package/dist/dom/features/fragment-refs/stub.js +17 -0
- package/dist/dom/features/fragment-refs/stub.js.map +7 -0
- package/dist/dom/features/hydration/full.d.ts +68 -0
- package/dist/dom/features/hydration/full.js +493 -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 +2 -0
- package/dist/dom/features/hydration/index.js.map +7 -0
- package/dist/dom/features/hydration/stub.d.ts +36 -0
- package/dist/dom/features/hydration/stub.js +80 -0
- package/dist/dom/features/hydration/stub.js.map +7 -0
- package/dist/dom/features/index.d.ts +8 -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 +23 -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 +2 -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 +19 -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 +34 -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 +2 -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 +9 -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 +11 -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 +2 -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 +5 -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 +389 -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 +2 -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 +4 -0
- package/dist/dom/features/suspense/stub.js.map +7 -0
- package/dist/dom/features/suspense-runtime/index.d.ts +1 -0
- package/dist/dom/features/suspense-runtime/index.js +2 -0
- package/dist/dom/features/suspense-runtime/index.js.map +7 -0
- package/dist/dom/features/suspense-runtime/stub.d.ts +1 -0
- package/dist/dom/features/suspense-runtime/stub.js +11 -0
- package/dist/dom/features/suspense-runtime/stub.js.map +7 -0
- package/dist/dom/features/view-transition/full.d.ts +7 -0
- package/dist/dom/features/view-transition/full.js +324 -0
- package/dist/dom/features/view-transition/full.js.map +7 -0
- package/dist/dom/features/view-transition/index.d.ts +1 -0
- package/dist/dom/features/view-transition/index.js +2 -0
- package/dist/dom/features/view-transition/index.js.map +7 -0
- package/dist/dom/features/view-transition/resources.d.ts +11 -0
- package/dist/dom/features/view-transition/resources.js +117 -0
- package/dist/dom/features/view-transition/resources.js.map +7 -0
- package/dist/dom/features/view-transition/stub.d.ts +7 -0
- package/dist/dom/features/view-transition/stub.js +21 -0
- package/dist/dom/features/view-transition/stub.js.map +7 -0
- package/dist/dom/features/view-transition/visual.d.ts +14 -0
- package/dist/dom/features/view-transition/visual.js +404 -0
- package/dist/dom/features/view-transition/visual.js.map +7 -0
- package/dist/dom/form-actions.d.ts +4 -0
- package/dist/dom/form-actions.js +74 -0
- package/dist/dom/form-actions.js.map +7 -0
- package/dist/dom/form-controls.d.ts +3 -0
- package/dist/dom/form-controls.js +91 -0
- package/dist/dom/form-controls.js.map +7 -0
- package/dist/dom/fragment-instance.d.ts +33 -0
- package/dist/dom/fragment-instance.js +449 -0
- package/dist/dom/fragment-instance.js.map +7 -0
- package/dist/dom/index.d.ts +61 -0
- package/dist/dom/index.js +71 -0
- package/dist/dom/index.js.map +7 -0
- package/dist/dom/portal.d.ts +2 -0
- package/dist/dom/portal.js +14 -0
- package/dist/dom/portal.js.map +7 -0
- package/dist/dom/react-ids.d.ts +6 -0
- package/dist/dom/react-ids.js +38 -0
- package/dist/dom/react-ids.js.map +7 -0
- package/dist/dom/reconcile.d.ts +86 -0
- package/dist/dom/reconcile.js +1305 -0
- package/dist/dom/reconcile.js.map +7 -0
- package/dist/dom/refresh.d.ts +12 -0
- package/dist/dom/refresh.js +174 -0
- package/dist/dom/refresh.js.map +7 -0
- package/dist/dom/resource-hints.d.ts +6 -0
- package/dist/dom/resource-hints.js +107 -0
- package/dist/dom/resource-hints.js.map +7 -0
- package/dist/dom/resource-store.d.ts +13 -0
- package/dist/dom/resource-store.js +47 -0
- package/dist/dom/resource-store.js.map +7 -0
- package/dist/dom/resources.d.ts +1 -0
- package/dist/dom/resources.js +46 -0
- package/dist/dom/resources.js.map +7 -0
- package/dist/dom/retained-effects.d.ts +6 -0
- package/dist/dom/retained-effects.js +67 -0
- package/dist/dom/retained-effects.js.map +7 -0
- package/dist/dom/root-internal.d.ts +11 -0
- package/dist/dom/root-internal.js +35 -0
- package/dist/dom/root-internal.js.map +7 -0
- package/dist/dom/root.d.ts +17 -0
- package/dist/dom/root.js +38 -0
- package/dist/dom/root.js.map +7 -0
- package/dist/dom/synthetic-event.d.ts +1 -0
- package/dist/dom/synthetic-event.js +37 -0
- package/dist/dom/synthetic-event.js.map +7 -0
- package/dist/dom/test-utils.d.ts +1 -0
- package/dist/dom/test-utils.js +5 -0
- package/dist/dom/test-utils.js.map +7 -0
- package/dist/dom/transitions.d.ts +9 -0
- package/dist/dom/transitions.js +147 -0
- package/dist/dom/transitions.js.map +7 -0
- package/dist/dom/tree.d.ts +5 -0
- package/dist/dom/tree.js +62 -0
- package/dist/dom/tree.js.map +7 -0
- package/dist/dom/walk.d.ts +2 -0
- package/dist/dom/walk.js +14 -0
- package/dist/dom/walk.js.map +7 -0
- package/dist/next/client.d.ts +9 -0
- package/dist/next/client.js +14 -0
- package/dist/next/client.js.map +7 -0
- package/dist/next/dev-cache-loader.cjs +13 -0
- package/dist/next/index.d.ts +2 -0
- package/dist/next/index.js +97 -0
- package/dist/next/index.js.map +7 -0
- package/dist/next/loader.cjs +10 -0
- package/dist/next/react.d.ts +71 -0
- package/dist/next/react.js +9 -0
- package/dist/next/react.js.map +7 -0
- package/dist/react/act.d.ts +3 -0
- package/dist/react/act.js +124 -0
- package/dist/react/act.js.map +7 -0
- package/dist/react/action-scope.d.ts +17 -0
- package/dist/react/action-scope.js +60 -0
- package/dist/react/action-scope.js.map +7 -0
- package/dist/react/activity.d.ts +7 -0
- package/dist/react/activity.js +7 -0
- package/dist/react/activity.js.map +7 -0
- package/dist/react/children.d.ts +8 -0
- package/dist/react/children.js +76 -0
- package/dist/react/children.js.map +7 -0
- package/dist/react/class.d.ts +36 -0
- package/dist/react/class.js +39 -0
- package/dist/react/class.js.map +7 -0
- package/dist/react/compiler-runtime.d.ts +1 -0
- package/dist/react/compiler-runtime.js +9 -0
- package/dist/react/compiler-runtime.js.map +7 -0
- package/dist/react/context.d.ts +32 -0
- package/dist/react/context.js +25 -0
- package/dist/react/context.js.map +7 -0
- package/dist/react/element.d.ts +13 -0
- package/dist/react/element.js +70 -0
- package/dist/react/element.js.map +7 -0
- package/dist/react/form-state.d.ts +26 -0
- package/dist/react/form-state.js +30 -0
- package/dist/react/form-state.js.map +7 -0
- package/dist/react/hooks.d.ts +67 -0
- package/dist/react/hooks.js +165 -0
- package/dist/react/hooks.js.map +7 -0
- package/dist/react/index.d.ts +99 -0
- package/dist/react/index.js +143 -0
- package/dist/react/index.js.map +7 -0
- package/dist/react/jsx-runtime.d.ts +24 -0
- package/dist/react/jsx-runtime.js +37 -0
- package/dist/react/jsx-runtime.js.map +7 -0
- package/dist/react/memo.d.ts +20 -0
- package/dist/react/memo.js +27 -0
- package/dist/react/memo.js.map +7 -0
- package/dist/react/portal.d.ts +1 -0
- package/dist/react/portal.js +5 -0
- package/dist/react/portal.js.map +7 -0
- package/dist/react/shared-internals.d.ts +52 -0
- package/dist/react/shared-internals.js +22 -0
- package/dist/react/shared-internals.js.map +7 -0
- package/dist/react/suspense.d.ts +15 -0
- package/dist/react/suspense.js +15 -0
- package/dist/react/suspense.js.map +7 -0
- package/dist/react/thenable.d.ts +1 -0
- package/dist/react/thenable.js +25 -0
- package/dist/react/thenable.js.map +7 -0
- package/dist/react/view-transition.d.ts +32 -0
- package/dist/react/view-transition.js +12 -0
- package/dist/react/view-transition.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 +3 -0
- package/dist/server/bootstrap-script.js +17 -0
- package/dist/server/bootstrap-script.js.map +7 -0
- package/dist/server/dispatcher.d.ts +57 -0
- package/dist/server/dispatcher.js +157 -0
- package/dist/server/dispatcher.js.map +7 -0
- package/dist/server/escape.d.ts +6 -0
- package/dist/server/escape.js +75 -0
- package/dist/server/escape.js.map +7 -0
- package/dist/server/index.d.ts +16 -0
- package/dist/server/index.js +25 -0
- package/dist/server/index.js.map +7 -0
- package/dist/server/insertion-context.d.ts +3 -0
- package/dist/server/insertion-context.js +32 -0
- package/dist/server/renderToString.d.ts +7 -0
- package/dist/server/renderToString.js +33 -0
- package/dist/server/renderToString.js.map +7 -0
- package/dist/server/resource-hints.d.ts +22 -0
- package/dist/server/resource-hints.js +168 -0
- package/dist/server/resource-hints.js.map +7 -0
- package/dist/server/stream-ids.d.ts +3 -0
- package/dist/server/stream-ids.js +8 -0
- package/dist/server/stream.d.ts +61 -0
- package/dist/server/stream.js +418 -0
- package/dist/server/stream.js.map +7 -0
- package/dist/server/walk.d.ts +58 -0
- package/dist/server/walk.js +378 -0
- package/dist/server/walk.js.map +7 -0
- package/dist/vinext/compatibility.d.ts +23 -0
- package/dist/vinext/compatibility.js +127 -0
- package/dist/vinext/compatibility.js.map +7 -0
- package/dist/vinext/flight-timing.d.ts +1 -0
- package/dist/vinext/flight-timing.js +46 -0
- package/dist/vinext/flight-timing.js.map +7 -0
- package/dist/vinext/index.d.ts +5 -0
- package/dist/vinext/index.js +50 -0
- package/dist/vinext/index.js.map +7 -0
- package/dist/vite/index.d.ts +102 -0
- package/dist/vite/index.js +291 -0
- package/dist/vite/index.js.map +7 -0
- package/dist/vite/react18.d.ts +4 -0
- package/dist/vite/react18.js +74 -0
- package/dist/vite/react18.js.map +7 -0
- package/package.json +121 -4
- package/src/cloudflare/index.ts +44 -0
- package/src/core/attributes.ts +20 -0
- package/src/core/browser.ts +34 -0
- package/src/core/class-props.ts +12 -0
- package/src/core/devtools.ts +69 -0
- package/src/core/functions.ts +11 -0
- package/src/core/index.ts +2 -0
- package/src/core/internal.ts +123 -0
- package/src/core/resource-hints.ts +39 -0
- package/src/core/types.ts +39 -0
- package/src/core/unitless-style.ts +1 -0
- package/src/dom/_all.ts +46 -0
- package/src/dom/client.ts +17 -0
- package/src/dom/commit.ts +223 -0
- package/src/dom/devtools-effects.ts +78 -0
- package/src/dom/devtools.ts +527 -0
- package/src/dom/dispatcher.ts +476 -0
- package/src/dom/document-metadata.ts +41 -0
- package/src/dom/dom.ts +181 -0
- package/src/dom/error-info.ts +20 -0
- package/src/dom/event-replay.ts +39 -0
- package/src/dom/features/activity/full.ts +150 -0
- package/src/dom/features/activity/index.ts +1 -0
- package/src/dom/features/activity/stub.ts +12 -0
- package/src/dom/features/class/full.ts +202 -0
- package/src/dom/features/class/index.ts +1 -0
- package/src/dom/features/class/stub.ts +58 -0
- package/src/dom/features/context/full.ts +107 -0
- package/src/dom/features/context/index.ts +1 -0
- package/src/dom/features/context/stub.ts +26 -0
- package/src/dom/features/forward-ref/full.ts +9 -0
- package/src/dom/features/forward-ref/index.ts +1 -0
- package/src/dom/features/forward-ref/stub.ts +15 -0
- package/src/dom/features/fragment-refs/index.ts +1 -0
- package/src/dom/features/fragment-refs/stub.ts +6 -0
- package/src/dom/features/hydration/full.ts +563 -0
- package/src/dom/features/hydration/index.ts +1 -0
- package/src/dom/features/hydration/stub.ts +86 -0
- package/src/dom/features/index.ts +12 -0
- package/src/dom/features/lazy/full.ts +27 -0
- package/src/dom/features/lazy/index.ts +1 -0
- package/src/dom/features/lazy/stub.ts +24 -0
- package/src/dom/features/memo/full.ts +39 -0
- package/src/dom/features/memo/index.ts +1 -0
- package/src/dom/features/memo/stub.ts +13 -0
- package/src/dom/features/portal/full.ts +14 -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 +469 -0
- package/src/dom/features/suspense/index.ts +1 -0
- package/src/dom/features/suspense/stub.ts +13 -0
- package/src/dom/features/suspense-runtime/index.ts +1 -0
- package/src/dom/features/suspense-runtime/stub.ts +1 -0
- package/src/dom/features/view-transition/full.ts +292 -0
- package/src/dom/features/view-transition/index.ts +1 -0
- package/src/dom/features/view-transition/resources.ts +123 -0
- package/src/dom/features/view-transition/stub.ts +8 -0
- package/src/dom/features/view-transition/visual.ts +454 -0
- package/src/dom/form-actions.ts +69 -0
- package/src/dom/form-controls.ts +91 -0
- package/src/dom/fragment-instance.ts +462 -0
- package/src/dom/index.ts +49 -0
- package/src/dom/portal.ts +16 -0
- package/src/dom/react-ids.ts +36 -0
- package/src/dom/reconcile.ts +1423 -0
- package/src/dom/refresh.ts +171 -0
- package/src/dom/resource-hints.ts +104 -0
- package/src/dom/resource-store.ts +50 -0
- package/src/dom/resources.ts +47 -0
- package/src/dom/retained-effects.ts +57 -0
- package/src/dom/root-internal.ts +37 -0
- package/src/dom/root.ts +59 -0
- package/src/dom/synthetic-event.ts +27 -0
- package/src/dom/test-utils.ts +1 -0
- package/src/dom/transitions.ts +141 -0
- package/src/dom/tree.ts +56 -0
- package/src/dom/walk.ts +8 -0
- package/src/next/client.ts +10 -0
- package/src/next/dev-cache-loader.cjs +13 -0
- package/src/next/index.ts +95 -0
- package/src/next/loader.cjs +10 -0
- package/src/next/react.ts +7 -0
- package/src/react/act.ts +105 -0
- package/src/react/action-scope.ts +57 -0
- package/src/react/activity.ts +10 -0
- package/src/react/children.ts +86 -0
- package/src/react/class.ts +66 -0
- package/src/react/compiler-runtime.ts +8 -0
- package/src/react/context.ts +46 -0
- package/src/react/element.ts +82 -0
- package/src/react/form-state.ts +35 -0
- package/src/react/hooks.ts +214 -0
- package/src/react/index.ts +91 -0
- package/src/react/jsx-runtime.ts +50 -0
- package/src/react/memo.ts +42 -0
- package/src/react/portal.ts +1 -0
- package/src/react/shared-internals.ts +80 -0
- package/src/react/suspense.ts +18 -0
- package/src/react/thenable.ts +21 -0
- package/src/react/view-transition.ts +41 -0
- package/src/scheduler/index.ts +124 -0
- package/src/server/bootstrap-script.ts +92 -0
- package/src/server/dispatcher.ts +168 -0
- package/src/server/escape.ts +102 -0
- package/src/server/index.ts +26 -0
- package/src/server/insertion-context.ts +28 -0
- package/src/server/renderToString.ts +35 -0
- package/src/server/resource-hints.ts +166 -0
- package/src/server/stream-ids.ts +5 -0
- package/src/server/stream.ts +525 -0
- package/src/server/walk.ts +555 -0
- package/src/vinext/compatibility.ts +122 -0
- package/src/vinext/flight-timing.ts +37 -0
- package/src/vinext/index.ts +47 -0
- package/src/vite/index.ts +476 -0
- package/src/vite/react18.ts +74 -0
- package/vendor/cloudflare-vite-plugin/LICENSE +25 -0
- package/vendor/cloudflare-vite-plugin/README.md +9 -0
- package/vendor/cloudflare-vite-plugin/dist/chunk-U6NEESU5-BmLHqeIt.mjs +43 -0
- package/vendor/cloudflare-vite-plugin/dist/index.d.mts +155 -0
- package/vendor/cloudflare-vite-plugin/dist/index.mjs +94700 -0
- package/vendor/cloudflare-vite-plugin/dist/open-PCXX3ZDZ-DYH87NhH.mjs +530 -0
- package/vendor/cloudflare-vite-plugin/dist/package-4cnqy5mM.mjs +84 -0
- package/vendor/cloudflare-vite-plugin/dist/workers/asset-worker/index.js +5996 -0
- package/vendor/cloudflare-vite-plugin/dist/workers/router-worker/index.js +6414 -0
- package/vendor/cloudflare-vite-plugin/dist/workers/runner-worker/index.js +457 -0
- package/vendor/cloudflare-vite-plugin/dist/workers/runner-worker/module-runner-legacy.js +1129 -0
- package/vendor/cloudflare-vite-plugin/dist/workers/runner-worker/module-runner.js +1259 -0
- package/vendor/cloudflare-vite-plugin/dist/workers/vite-proxy-worker/index.js +31 -0
- package/vendor/cloudflare-vite-plugin/package.json +90 -0
- package/vendor/cloudflare-vite-plugin/provenance.json +26 -0
- package/README.md +0 -3
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/dom/document-metadata.ts"],
|
|
4
|
+
"sourcesContent": ["import { FiberTag, type Fiber } from '../core';\nexport function documentSingleton(fiber: Fiber): HTMLElement | null {\n const doc = fiber.r?.c as Document | undefined;\n return doc?.nodeType === 9 && DOCUMENT_SHELL_TAGS.test(fiber.type) ? doc[fiber.type === 'html' ? 'documentElement' : fiber.type as 'head' | 'body'] : null;\n}\nexport const DOCUMENT_HEAD_TAGS = /^(base|link|meta|script|style|title)$/;\nexport const DOCUMENT_SHELL_TAGS = /^(html|head|body)$/;\nexport function clearAttributes(node: Element): void {\n for (let attribute; attribute = node.attributes[0];)\n node.removeAttribute(attribute.name);\n}\n// React's document server renderer hoists metadata even when a component\n// returns it inside a body wrapper or a Suspense boundary.\nexport function documentMetadataParent(fiber: Fiber): HTMLHeadElement | null {\n if (fiber.r?.c.nodeType !== 9 || fiber.v?.itemProp != null ||\n !['title', 'meta', 'base', 'link'].includes(fiber.type))\n return null;\n for (let parent = fiber.p; parent; parent = parent.p) {\n if (parent.t === FiberTag.Portal || parent.type === 'svg')\n return null;\n if (parent.type === 'foreignObject')\n break;\n }\n return (fiber.r.c as unknown as Document).head;\n}\nexport function clearHostContainer(container: Node): void {\n if (container.nodeType !== 9 && !DOCUMENT_SHELL_TAGS.test((container as Element).localName)) {\n container.textContent = '';\n return;\n }\n for (let index = container.childNodes.length; index--;) {\n const node = container.childNodes[index]!, tag = (node as Element).localName;\n if (DOCUMENT_SHELL_TAGS.test(tag))\n clearHostContainer(node);\n else if (node.nodeType !== 10 && !/^(script|style)$/.test(tag) && !(tag === 'link' && /^stylesheet$/i.test((node as HTMLLinkElement).rel)))\n node.remove();\n }\n}\n"],
|
|
5
|
+
"mappings": "AACM,SAAU,kBAAkB,OAAY;AAC1C,QAAM,MAAM,MAAM,GAAG;AACrB,SAAO,KAAK,aAAa,KAAK,oBAAoB,KAAK,MAAM,IAAI,IAAI,IAAI,MAAM,SAAS,SAAS,oBAAoB,MAAM,IAAuB,IAAI;AAC1J;AACO,MAAM,qBAAqB;AAC3B,MAAM,sBAAsB;AAC7B,SAAU,gBAAgB,MAAa;AACzC,WAAS,WAAW,YAAY,KAAK,WAAW,CAAC;AAC7C,SAAK,gBAAgB,UAAU,IAAI;AAC3C;AAGM,SAAU,uBAAuB,OAAY;AAC/C,MAAI,MAAM,GAAG,EAAE,aAAa,KAAK,MAAM,GAAG,YAAY,QAClD,CAAC,CAAC,SAAS,QAAQ,QAAQ,MAAM,EAAE,SAAS,MAAM,IAAI;AACtD,WAAO;AACX,WAAS,SAAS,MAAM,GAAG,QAAQ,SAAS,OAAO,GAAG;AAClD,QAAI,OAAO,MAAC,KAAwB,OAAO,SAAS;AAChD,aAAO;AACX,QAAI,OAAO,SAAS;AAChB;EACR;AACA,SAAQ,MAAM,EAAE,EAA0B;AAC9C;AACM,SAAU,mBAAmB,WAAe;AAC9C,MAAI,UAAU,aAAa,KAAK,CAAC,oBAAoB,KAAM,UAAsB,SAAS,GAAG;AACzF,cAAU,cAAc;AACxB;EACJ;AACA,WAAS,QAAQ,UAAU,WAAW,QAAQ,WAAU;AACpD,UAAM,OAAO,UAAU,WAAW,KAAK,GAAI,MAAO,KAAiB;AACnE,QAAI,oBAAoB,KAAK,GAAG;AAC5B,yBAAmB,IAAI;aAClB,KAAK,aAAa,MAAM,CAAC,mBAAmB,KAAK,GAAG,KAAK,EAAE,QAAQ,UAAU,gBAAgB,KAAM,KAAyB,GAAG;AACpI,WAAK,OAAM;EACnB;AACJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const isSvgElement: (el: Element) => boolean;
|
|
2
|
+
export declare function setProp(el: Element, name: string, next: any, prev: any, isSvg: boolean): void;
|
|
3
|
+
export interface SyntheticEvent extends Event {
|
|
4
|
+
nativeEvent: Event;
|
|
5
|
+
isDefaultPrevented(): boolean;
|
|
6
|
+
isPropagationStopped(): boolean;
|
|
7
|
+
persist(): void;
|
|
8
|
+
currentTarget: EventTarget & Element;
|
|
9
|
+
}
|
|
10
|
+
export declare function createHostNode(type: string, isSvg: boolean, owner?: Document): Element;
|
|
11
|
+
export declare function trackInputValue(el: HTMLInputElement | HTMLTextAreaElement): void;
|
package/dist/dom/dom.js
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { createSyntheticEvent } from "./synthetic-event.js";
|
|
2
|
+
import { UNITLESS_STYLE } from "../core/unitless-style.js";
|
|
3
|
+
import { devToolsMetadata } from "../core/devtools.js";
|
|
4
|
+
import { formActions } from "./form-actions.js";
|
|
5
|
+
import { attributeName, attributeValue } from "../core/attributes.js";
|
|
6
|
+
import { isString } from "../core/functions.js";
|
|
7
|
+
const SVG_NS = "http://www.w3.org/2000/svg";
|
|
8
|
+
const IDL_ATTRS = /^(value|checked|selected|disabled|multiple|muted|readonly)$/;
|
|
9
|
+
const isSvgElement = (el) => el.namespaceURI === SVG_NS;
|
|
10
|
+
function setProp(el, name, next, prev, isSvg) {
|
|
11
|
+
if (isReservedProp(name))
|
|
12
|
+
return;
|
|
13
|
+
if (/^(aria|data)-./.test(name)) {
|
|
14
|
+
if (next == null)
|
|
15
|
+
el.removeAttribute(name);
|
|
16
|
+
else
|
|
17
|
+
el.setAttribute(name, "" + next);
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
if (name === "action" || name === "formAction") {
|
|
21
|
+
if (isFunction(next)) {
|
|
22
|
+
formActions.set(el, next);
|
|
23
|
+
el.removeAttribute(name.toLowerCase());
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
formActions.delete(el);
|
|
27
|
+
}
|
|
28
|
+
if (name === "defaultValue" || name === "defaultChecked") {
|
|
29
|
+
if (prev === void 0 && next != null) {
|
|
30
|
+
try {
|
|
31
|
+
;
|
|
32
|
+
el[name] = next;
|
|
33
|
+
} catch {
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
if (name === "className" && !isSvg) {
|
|
39
|
+
;
|
|
40
|
+
el.className = next == null ? "" : "" + next;
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (name === "style") {
|
|
44
|
+
setStyle(el, next, prev);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
if (name === "dangerouslySetInnerHTML") {
|
|
48
|
+
const nextHtml = next?.__html ?? "";
|
|
49
|
+
const prevHtml = prev?.__html ?? "";
|
|
50
|
+
if (nextHtml !== prevHtml)
|
|
51
|
+
el.innerHTML = nextHtml;
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
if (name[0] === "o" && name[1] === "n") {
|
|
55
|
+
setEventHandler(el, name, next);
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const attr = attributeName(name, isSvg);
|
|
59
|
+
if (!isSvg && IDL_ATTRS.test(name) && name in el) {
|
|
60
|
+
try {
|
|
61
|
+
el[name] = next == null ? "" : next;
|
|
62
|
+
return;
|
|
63
|
+
} catch {
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
const value = attributeValue(name, next, attr);
|
|
67
|
+
if (value === null)
|
|
68
|
+
el.removeAttribute(attr);
|
|
69
|
+
else
|
|
70
|
+
el.setAttribute(attr, value);
|
|
71
|
+
}
|
|
72
|
+
function setStyleProperty(style, key, value) {
|
|
73
|
+
if (key[0] === "-") {
|
|
74
|
+
style.setProperty(key, value == null ? "" : "" + value);
|
|
75
|
+
} else {
|
|
76
|
+
;
|
|
77
|
+
style[key] = value == null || value === "" ? "" : value + (typeof value === "number" && !UNITLESS_STYLE.test(key) ? "px" : "");
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
function setStyle(el, next, prev) {
|
|
81
|
+
const style = el.style;
|
|
82
|
+
if (isString(next)) {
|
|
83
|
+
style.cssText = next;
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
if (isString(prev))
|
|
87
|
+
style.cssText = "";
|
|
88
|
+
if (prev && isObject(prev)) {
|
|
89
|
+
for (const k in prev) {
|
|
90
|
+
if (!next || !(k in next))
|
|
91
|
+
setStyleProperty(style, k, "");
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
if (next && isObject(next)) {
|
|
95
|
+
for (const k in next) {
|
|
96
|
+
if (!prev || prev[k] !== next[k])
|
|
97
|
+
setStyleProperty(style, k, next[k]);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
function setEventHandler(el, name, next) {
|
|
102
|
+
const enabled = isFunction(next);
|
|
103
|
+
const capture = name.endsWith("Capture") && !name.endsWith("PointerCapture");
|
|
104
|
+
const lower = name.slice(2, capture ? -7 : void 0).toLowerCase();
|
|
105
|
+
const events = lower === "change" && (el.tagName === "TEXTAREA" || el.tagName === "INPUT" && !/^(checkbox|radio|file)$/.test(el.type)) ? ["input", "change"] : [lower === "focus" ? "focusin" : lower === "blur" ? "focusout" : lower === "doubleclick" ? "dblclick" : lower];
|
|
106
|
+
const handlers = el.__h ||= /* @__PURE__ */ Object.create(null);
|
|
107
|
+
let existing = handlers[name];
|
|
108
|
+
if (existing && (!enabled || existing.e[0] !== events[0])) {
|
|
109
|
+
for (const event of existing.e)
|
|
110
|
+
el.removeEventListener(event, existing, capture);
|
|
111
|
+
if (enabled)
|
|
112
|
+
delete el.__v;
|
|
113
|
+
existing = handlers[name] = null;
|
|
114
|
+
}
|
|
115
|
+
if (!enabled)
|
|
116
|
+
return;
|
|
117
|
+
if (!existing) {
|
|
118
|
+
const entry = ((e) => {
|
|
119
|
+
if (events.length > 1) {
|
|
120
|
+
const value = el.value;
|
|
121
|
+
if (e.type === "change" && el.__v === value)
|
|
122
|
+
return;
|
|
123
|
+
el.__v = e.type === "input" ? value : void 0;
|
|
124
|
+
}
|
|
125
|
+
const event = createSyntheticEvent(e);
|
|
126
|
+
try {
|
|
127
|
+
if (process.env.NODE_ENV !== "production") {
|
|
128
|
+
const previous = devToolsMetadata.current;
|
|
129
|
+
devToolsMetadata.current = devToolsMetadata.hosts.get(el) || null;
|
|
130
|
+
try {
|
|
131
|
+
entry.c(event);
|
|
132
|
+
} finally {
|
|
133
|
+
devToolsMetadata.current = previous;
|
|
134
|
+
}
|
|
135
|
+
} else
|
|
136
|
+
entry.c(event);
|
|
137
|
+
} finally {
|
|
138
|
+
event.currentTarget = null;
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
entry.e = events;
|
|
142
|
+
existing = handlers[name] = entry;
|
|
143
|
+
for (const event of events)
|
|
144
|
+
el.addEventListener(event, entry, capture);
|
|
145
|
+
}
|
|
146
|
+
existing.c = next;
|
|
147
|
+
}
|
|
148
|
+
function createHostNode(type, isSvg, owner = document) {
|
|
149
|
+
if (isSvg || type === "svg") {
|
|
150
|
+
return owner.createElementNS(SVG_NS, type);
|
|
151
|
+
}
|
|
152
|
+
return owner.createElement(type);
|
|
153
|
+
}
|
|
154
|
+
import { isObject } from "../core/functions.js";
|
|
155
|
+
import { isFunction, isReservedProp } from "../core/functions.js";
|
|
156
|
+
function trackInputValue(el) {
|
|
157
|
+
el.__v = el.value;
|
|
158
|
+
}
|
|
159
|
+
export {
|
|
160
|
+
createHostNode,
|
|
161
|
+
isSvgElement,
|
|
162
|
+
setProp,
|
|
163
|
+
trackInputValue
|
|
164
|
+
};
|
|
165
|
+
//# sourceMappingURL=dom.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/dom/dom.ts"],
|
|
4
|
+
"sourcesContent": ["import { createSyntheticEvent } from './synthetic-event';\nimport { UNITLESS_STYLE } from '../core/unitless-style';\nimport { devToolsMetadata } from '../core/devtools';\nimport { formActions } from './form-actions';\nimport { attributeName, attributeValue } from '../core/attributes';\nimport { isString } from \"../core/functions\";\nconst SVG_NS = 'http://www.w3.org/2000/svg';\nconst IDL_ATTRS = /^(value|checked|selected|disabled|multiple|muted|readonly)$/;\nexport const isSvgElement = (el: Element): boolean => (el.namespaceURI === SVG_NS);\nexport function setProp(el: Element, name: string, next: any, prev: any, isSvg: boolean): void {\n if (isReservedProp(name))\n return;\n // These names need no alias or boolean-attribute normalization.\n if (/^(aria|data)-./.test(name)) {\n if (next == null)\n el.removeAttribute(name);\n else\n el.setAttribute(name, '' + next);\n return;\n }\n if (name === 'action' || name === 'formAction') {\n if (isFunction(next)) {\n formActions.set(el, next);\n el.removeAttribute(name.toLowerCase());\n return;\n }\n formActions.delete(el);\n }\n // defaultValue / defaultChecked are IDL-property-only — they seed the\n // initial value/checked of a form control on first mount and must NOT be\n // emitted as HTML attributes (which would leak as `defaultValue=\"...\"`).\n // Setting `el.defaultValue` on a fresh control also sets the initial\n // `el.value`, which is what consumers expect. Skip on hydrated DOM so we\n // don't clobber a live user-typed value.\n if (name === 'defaultValue' || name === 'defaultChecked') {\n if (prev === undefined && next != null) {\n try {\n ;\n (el as any)[name] = next;\n }\n catch { }\n }\n return;\n }\n if (name === 'className' && !isSvg) {\n ;\n (el as HTMLElement).className = next == null ? '' : '' + next;\n return;\n }\n if (name === 'style') {\n setStyle(el as HTMLElement, next, prev);\n return;\n }\n if (name === 'dangerouslySetInnerHTML') {\n const nextHtml = next?.__html ?? '';\n const prevHtml = prev?.__html ?? '';\n if (nextHtml !== prevHtml)\n (el as HTMLElement).innerHTML = nextHtml;\n return;\n }\n if (name[0] === 'o' && name[1] === 'n') {\n setEventHandler(el, name, next);\n return;\n }\n const attr = attributeName(name, isSvg);\n if (!isSvg && IDL_ATTRS.test(name) && name in el) {\n try {\n (el as any)[name] = next == null ? '' : next;\n return;\n } catch {}\n }\n const value = attributeValue(name, next, attr);\n if (value === null) el.removeAttribute(attr);\n else el.setAttribute(attr, value);\n}\nfunction setStyleProperty(style: CSSStyleDeclaration, key: string, value: any): void {\n if (key[0] === '-') {\n style.setProperty(key, value == null ? '' : '' + value);\n }\n else {\n ;\n (style as any)[key] = value == null || value === '' ? ''\n : value + (typeof value === 'number' && !UNITLESS_STYLE.test(key) ? 'px' : '');\n }\n}\nfunction setStyle(el: HTMLElement, next: any, prev: any): void {\n const style = el.style;\n if (isString(next)) {\n style.cssText = next;\n return;\n }\n if (isString(prev))\n style.cssText = '';\n if (prev && isObject(prev)) {\n for (const k in prev) {\n if (!next || !(k in next))\n setStyleProperty(style, k, '');\n }\n }\n if (next && isObject(next)) {\n for (const k in next) {\n if (!prev || prev[k] !== next[k])\n setStyleProperty(style, k, next[k]);\n }\n }\n}\nfunction setEventHandler(el: Element, name: string, next: any): void {\n // Only function handlers are accepted. Reject strings/objects/etc — the\n // legacy `onclick=\"...\"` HTML attribute (string handler) is a known XSS\n // vector if a parent spreads untrusted props onto a host element. React\n // also ignores non-function handlers.\n const enabled = isFunction(next);\n const capture = name.endsWith('Capture') && !name.endsWith('PointerCapture');\n const lower = name.slice(2, capture ? -7 : undefined).toLowerCase();\n const events = lower === 'change' && (el.tagName === 'TEXTAREA' ||\n (el.tagName === 'INPUT' && !/^(checkbox|radio|file)$/.test((el as HTMLInputElement).type)))\n ? ['input', 'change']\n : [lower === 'focus' ? 'focusin' : lower === 'blur' ? 'focusout' : lower === 'doubleclick' ? 'dblclick' : lower];\n // Key by the React prop name (not DOM event name) so `onChange` and\n // `onInput` on the same text input — which both dispatch from the native\n // `input` event — can coexist without clobbering each other's handlers.\n const handlers = ((el as any).__h ||= Object.create(null));\n let existing = handlers[name];\n // Replace the listener when a control's type changes its native event.\n if (existing && (!enabled || existing.e[0] !== events[0])) {\n for (const event of existing.e)\n el.removeEventListener(event, existing, capture);\n if (enabled) delete (el as any).__v;\n existing = handlers[name] = null;\n }\n if (!enabled)\n return;\n if (!existing) {\n const entry = ((e: Event) => {\n if (events.length > 1) {\n const value = (el as HTMLInputElement).value;\n if (e.type === 'change' && (el as any).__v === value)\n return;\n (el as any).__v = e.type === 'input' ? value : undefined;\n }\n const event = createSyntheticEvent(e);\n try {\n if (process.env.NODE_ENV !== 'production') {\n const previous = devToolsMetadata.current;\n devToolsMetadata.current = devToolsMetadata.hosts.get(el) || null;\n try { entry.c(event); } finally { devToolsMetadata.current = previous; }\n } else entry.c(event);\n } finally { event.currentTarget = null; }\n }) as ((e: Event) => void) & {\n c: Function;\n e: string[];\n };\n entry.e = events;\n existing = handlers[name] = entry;\n for (const event of events)\n el.addEventListener(event, entry, capture);\n }\n existing.c = next;\n}\n\nexport interface SyntheticEvent extends Event {\n nativeEvent: Event;\n isDefaultPrevented(): boolean;\n isPropagationStopped(): boolean;\n persist(): void;\n currentTarget: EventTarget & Element;\n}\nexport function createHostNode(type: string, isSvg: boolean, owner: Document = document): Element {\n if (isSvg || type === 'svg') {\n return owner.createElementNS(SVG_NS, type);\n }\n return owner.createElement(type);\n}\nimport { isObject } from '../core/functions';\nimport { isFunction, isReservedProp } from '../core/functions';\n\n// Renderer writes have already been observed by the app. Native change events\n// should only report a value that differs from that renderer-owned value.\nexport function trackInputValue(el: HTMLInputElement | HTMLTextAreaElement): void {\n (el as any).__v = el.value;\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,4BAA4B;AACrC,SAAS,sBAAsB;AAC/B,SAAS,wBAAwB;AACjC,SAAS,mBAAmB;AAC5B,SAAS,eAAe,sBAAsB;AAC9C,SAAS,gBAAgB;AACzB,MAAM,SAAS;AACf,MAAM,YAAY;AACX,MAAM,eAAe,CAAC,OAA0B,GAAG,iBAAiB;AACrE,SAAU,QAAQ,IAAa,MAAc,MAAW,MAAW,OAAc;AACnF,MAAI,eAAe,IAAI;AACnB;AAEJ,MAAI,iBAAiB,KAAK,IAAI,GAAG;AAC7B,QAAI,QAAQ;AACR,SAAG,gBAAgB,IAAI;;AAEvB,SAAG,aAAa,MAAM,KAAK,IAAI;AACnC;EACJ;AACA,MAAI,SAAS,YAAY,SAAS,cAAc;AAC5C,QAAI,WAAW,IAAI,GAAG;AAClB,kBAAY,IAAI,IAAI,IAAI;AACxB,SAAG,gBAAgB,KAAK,YAAW,CAAE;AACrC;IACJ;AACA,gBAAY,OAAO,EAAE;EACzB;AAOA,MAAI,SAAS,kBAAkB,SAAS,kBAAkB;AACtD,QAAI,SAAS,UAAa,QAAQ,MAAM;AACpC,UAAI;AACA;AACC,WAAW,IAAI,IAAI;MACxB,QACM;MAAE;IACZ;AACA;EACJ;AACA,MAAI,SAAS,eAAe,CAAC,OAAO;AAChC;AACC,OAAmB,YAAY,QAAQ,OAAO,KAAK,KAAK;AACzD;EACJ;AACA,MAAI,SAAS,SAA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AAY,6BAAiB,UAAU;UAAU;QAC3E;AAAO,gBAAM,EAAE,KAAK;MACxB;AAAY,cAAM,gBAAgB;MAAM;IAC5C;AAIA,UAAM,IAAI;AACV,eAAW,SAAS,IAAI,IAAI;AAC5B,eAAW,SAAS;AAChB,SAAG,iBAAiB,OAAO,OAAO,OAAO;EACjD;AACA,WAAS,IAAI;AACjB;AASM,SAAU,eAAe,MAAc,OAAgB,QAAkB,UAAQ;AACnF,MAAI,SAAS,SAAS,OAAO;AACzB,WAAO,MAAM,gBAAgB,QAAQ,IAAI;EAC7C;AACA,SAAO,MAAM,cAAc,IAAI;AACnC;AACA,SAAS,gBAAgB;AACzB,SAAS,YAAY,sBAAsB;AAIrC,SAAU,gBAAgB,IAA0C;AACrE,KAAW,MAAM,GAAG;AACzB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { isFunction } from "../core/functions.js";
|
|
2
|
+
function componentStack(fiber) {
|
|
3
|
+
let stack = "";
|
|
4
|
+
for (; fiber; fiber = fiber.p) {
|
|
5
|
+
let type = fiber.type;
|
|
6
|
+
while (type && isObject(type))
|
|
7
|
+
type = type.type || type.render;
|
|
8
|
+
const name = isString(type) ? type : isFunction(type) ? type.displayName || type.name || "Anonymous" : fiber.t === 11 ? "Suspense" : fiber.t === 13 ? "Activity" : "";
|
|
9
|
+
if (name)
|
|
10
|
+
stack += "\n at " + name;
|
|
11
|
+
}
|
|
12
|
+
return stack;
|
|
13
|
+
}
|
|
14
|
+
import { isString } from "../core/functions.js";
|
|
15
|
+
import { isObject } from "../core/functions.js";
|
|
16
|
+
export {
|
|
17
|
+
componentStack
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=error-info.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/dom/error-info.ts"],
|
|
4
|
+
"sourcesContent": ["import { isFunction } from '../core/functions'\nimport { FiberTag, type Fiber } from '../core'\n\nexport function componentStack(fiber: Fiber | null): string {\n let stack = ''\n for (; fiber; fiber = fiber.p) {\n let type = fiber.type\n while (type && isObject(type)) type = type.type || type.render\n const name = isString(type) ? type\n : isFunction(type) ? type.displayName || type.name || 'Anonymous'\n : fiber.t === FiberTag.Suspense ? 'Suspense'\n : fiber.t === FiberTag.Activity ? 'Activity' : ''\n if (name) stack += '\\n at ' + name\n }\n return stack\n}\n\nimport { isString } from \"../core/functions\"\n\nimport { isObject } from '../core/functions'\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,kBAAkB;AAGrB,SAAU,eAAe,OAAmB;AAChD,MAAI,QAAQ;AACZ,SAAO,OAAO,QAAQ,MAAM,GAAG;AAC7B,QAAI,OAAO,MAAM;AACjB,WAAO,QAAQ,SAAS,IAAI;AAAG,aAAO,KAAK,QAAQ,KAAK;AACxD,UAAM,OAAO,SAAS,IAAI,IAAI,OAC1B,WAAW,IAAI,IAAI,KAAK,eAAe,KAAK,QAAQ,cACpD,MAAM,MAAC,KAAyB,aAChC,MAAM,MAAC,KAAyB,aAAa;AACjD,QAAI;AAAM,eAAS,cAAc;EACnC;AACA,SAAO;AACT;AAEA,SAAS,gBAAgB;AAEzB,SAAS,gBAAgB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Drain the `window.$RE_q` event buffer that the inline runtime populated
|
|
3
|
+
* before the main bundle was parsed. For each buffered event, re-dispatch a
|
|
4
|
+
* synthesized event at the original target so handlers attached during
|
|
5
|
+
* hydration see it.
|
|
6
|
+
*
|
|
7
|
+
* Lossy by design: only the event type and target are preserved. Modifier
|
|
8
|
+
* keys, pointer positions, etc. are zeroed. This is acceptable because the
|
|
9
|
+
* replay window is a fraction of a second between shell render and full
|
|
10
|
+
* hydration of a streaming page; users who need pixel-accurate replay won't
|
|
11
|
+
* lose much beyond that.
|
|
12
|
+
*/
|
|
13
|
+
export declare function drainReplayQueue(): void;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
function drainReplayQueue() {
|
|
2
|
+
const g = globalThis;
|
|
3
|
+
const q = g.$RE_q;
|
|
4
|
+
if (!q)
|
|
5
|
+
return;
|
|
6
|
+
try {
|
|
7
|
+
g.$RE_stop?.();
|
|
8
|
+
} catch {
|
|
9
|
+
}
|
|
10
|
+
for (const [type, target] of q.splice(0)) {
|
|
11
|
+
try {
|
|
12
|
+
target.dispatchEvent(createEvent(type));
|
|
13
|
+
} catch {
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function createEvent(type) {
|
|
18
|
+
const options = { bubbles: true, cancelable: true };
|
|
19
|
+
return type === "click" ? new MouseEvent(type, options) : type === "keydown" ? new KeyboardEvent(type, options) : type === "input" ? new InputEvent(type, options) : new Event(type, options);
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
drainReplayQueue
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=event-replay.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/dom/event-replay.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Drain the `window.$RE_q` event buffer that the inline runtime populated\n * before the main bundle was parsed. For each buffered event, re-dispatch a\n * synthesized event at the original target so handlers attached during\n * hydration see it.\n *\n * Lossy by design: only the event type and target are preserved. Modifier\n * keys, pointer positions, etc. are zeroed. This is acceptable because the\n * replay window is a fraction of a second between shell render and full\n * hydration of a streaming page; users who need pixel-accurate replay won't\n * lose much beyond that.\n */\nexport function drainReplayQueue(): void {\n const g = globalThis as any\n const q = g.$RE_q as Array<[string, EventTarget, number]> | undefined\n\n if (!q) return\n // Stop capturing before replaying so we don't re-capture what we dispatch.\n try {\n g.$RE_stop?.()\n } catch {}\n\n for (const [type, target] of q.splice(0)) {\n try {\n target.dispatchEvent(createEvent(type))\n } catch {}\n }\n}\n\nfunction createEvent(type: string): Event {\n const options = { bubbles: true, cancelable: true }\n return type === 'click'\n ? new MouseEvent(type, options)\n : type === 'keydown'\n ? new KeyboardEvent(type, options)\n : type === 'input'\n ? new InputEvent(type, options)\n : new Event(type, options)\n}\n"],
|
|
5
|
+
"mappings": "AAYM,SAAU,mBAAgB;AAC9B,QAAM,IAAI;AACV,QAAM,IAAI,EAAE;AAEZ,MAAI,CAAC;AAAG;AAER,MAAI;AACF,MAAE,WAAU;EACd,QAAQ;EAAC;AAET,aAAW,CAAC,MAAM,MAAM,KAAK,EAAE,OAAO,CAAC,GAAG;AACxC,QAAI;AACF,aAAO,cAAc,YAAY,IAAI,CAAC;IACxC,QAAQ;IAAC;EACX;AACF;AAEA,SAAS,YAAY,MAAY;AAC/B,QAAM,UAAU,EAAE,SAAS,MAAM,YAAY,KAAI;AACjD,SAAO,SAAS,UACZ,IAAI,WAAW,MAAM,OAAO,IAC5B,SAAS,YACP,IAAI,cAAc,MAAM,OAAO,IAC/B,SAAS,UACP,IAAI,WAAW,MAAM,OAAO,IAC5B,IAAI,MAAM,MAAM,OAAO;AACjC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { queueMutation } from "../../commit.js";
|
|
2
|
+
import { REACT_ACTIVITY_TYPE } from "../../../react/activity.js";
|
|
3
|
+
import { attachRef, detachRef, enqueueEffect, findRoot, flushFiberCommits, getCurrentRoot, invokeCommit, installCapability, reconcileRaw, installRenderer, registerTypeMatcher, scheduleLifecycle, scheduleUpdate } from "../../reconcile.js";
|
|
4
|
+
import { disconnectClass, inSuspensePrimary, setRetainedFlag, walkRetained as walk } from "../../retained-effects.js";
|
|
5
|
+
function isHidden(fiber) {
|
|
6
|
+
if (!(fiber.r ?? findRoot(fiber))?.a)
|
|
7
|
+
return false;
|
|
8
|
+
for (let parent = fiber; parent; parent = parent.p) {
|
|
9
|
+
if (parent.t === 13 && parent.v?.mode === "hidden")
|
|
10
|
+
return true;
|
|
11
|
+
}
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
function renderActivity(fiber) {
|
|
15
|
+
const root = fiber.r ?? findRoot(fiber);
|
|
16
|
+
if (root)
|
|
17
|
+
root.a = true;
|
|
18
|
+
const props = fiber.v ?? {};
|
|
19
|
+
if (getCurrentRoot()?.h && props.mode === "hidden" && !fiber.m) {
|
|
20
|
+
fiber.m = props;
|
|
21
|
+
queueMicrotask(() => scheduleUpdate(fiber));
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
if (isHidden(fiber))
|
|
25
|
+
walk(fiber, prepare);
|
|
26
|
+
else
|
|
27
|
+
walk(fiber, syncDom);
|
|
28
|
+
reconcileRaw(fiber, props.children);
|
|
29
|
+
walk(fiber, reconnect, true);
|
|
30
|
+
fiber.m = props;
|
|
31
|
+
}
|
|
32
|
+
function needsHiddenDom(fiber) {
|
|
33
|
+
for (let parent = fiber.p; parent; parent = parent.p) {
|
|
34
|
+
if (parent.t === 13 && parent.v?.mode === "hidden")
|
|
35
|
+
return true;
|
|
36
|
+
if (parent.t === 0)
|
|
37
|
+
return false;
|
|
38
|
+
if (parent.t === 5)
|
|
39
|
+
return isHidden(parent);
|
|
40
|
+
}
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
function finish(fiber) {
|
|
44
|
+
if (fiber.t === 11 && (fiber.r ?? findRoot(fiber))?.a)
|
|
45
|
+
walk(fiber, reconnect, true);
|
|
46
|
+
else
|
|
47
|
+
syncDom(fiber);
|
|
48
|
+
}
|
|
49
|
+
function prepare(fiber) {
|
|
50
|
+
if (!isHidden(fiber) || !!fiber.ad)
|
|
51
|
+
return;
|
|
52
|
+
if (fiber.m == null)
|
|
53
|
+
setRetainedFlag(fiber, "ad", true);
|
|
54
|
+
else
|
|
55
|
+
disconnect(fiber);
|
|
56
|
+
}
|
|
57
|
+
function disconnect(fiber) {
|
|
58
|
+
if (!!fiber.ad)
|
|
59
|
+
return;
|
|
60
|
+
setRetainedFlag(fiber, "ad", true);
|
|
61
|
+
queueMutation(() => {
|
|
62
|
+
const insertion = /* @__PURE__ */ new Set();
|
|
63
|
+
for (const [hook, effect] of fiber.ef ?? []) {
|
|
64
|
+
if (effect.t === 2 && hook.c)
|
|
65
|
+
insertion.add(hook.c);
|
|
66
|
+
}
|
|
67
|
+
if (fiber.e) {
|
|
68
|
+
const keep = fiber.e.filter((cleanup) => insertion.has(cleanup));
|
|
69
|
+
for (const cleanup of fiber.e) {
|
|
70
|
+
if (!insertion.has(cleanup))
|
|
71
|
+
invokeCommit(fiber, cleanup);
|
|
72
|
+
}
|
|
73
|
+
fiber.e = keep.length ? keep : null;
|
|
74
|
+
}
|
|
75
|
+
for (const [hook, effect] of fiber.ef ?? []) {
|
|
76
|
+
if (effect.t !== 2)
|
|
77
|
+
hook.c = null;
|
|
78
|
+
}
|
|
79
|
+
detachRef(fiber.cr ?? fiber.ref);
|
|
80
|
+
fiber.cr = null;
|
|
81
|
+
fiber.rc = null;
|
|
82
|
+
if (!fiber.ld)
|
|
83
|
+
disconnectClass(fiber);
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
function reconnect(fiber) {
|
|
87
|
+
syncDom(fiber);
|
|
88
|
+
if (isHidden(fiber) || inSuspensePrimary(fiber) || !setRetainedFlag(fiber, "ad", false))
|
|
89
|
+
return;
|
|
90
|
+
setRetainedFlag(fiber, "ld", false);
|
|
91
|
+
const instance = fiber.i?._f === fiber ? fiber.i : null;
|
|
92
|
+
if (fiber.t === 0 || fiber.t === 14)
|
|
93
|
+
attachRef(fiber, fiber.n);
|
|
94
|
+
else if (instance || fiber.t === 4)
|
|
95
|
+
attachRef(fiber, fiber.i);
|
|
96
|
+
for (const effect of fiber.ef?.values() ?? []) {
|
|
97
|
+
if (effect.t !== 2)
|
|
98
|
+
enqueueEffect(fiber, effect);
|
|
99
|
+
}
|
|
100
|
+
if (instance?.componentDidMount) {
|
|
101
|
+
scheduleLifecycle(fiber, () => instance.componentDidMount());
|
|
102
|
+
}
|
|
103
|
+
flushFiberCommits(fiber);
|
|
104
|
+
}
|
|
105
|
+
function syncDom(fiber) {
|
|
106
|
+
if (!(fiber.r ?? findRoot(fiber))?.a)
|
|
107
|
+
return;
|
|
108
|
+
if (!fiber.n || fiber.t !== 0 && fiber.t !== 1)
|
|
109
|
+
return;
|
|
110
|
+
if (needsHiddenDom(fiber)) {
|
|
111
|
+
setRetainedFlag(fiber, "ah", true);
|
|
112
|
+
queueMutation(() => {
|
|
113
|
+
if (fiber.t === 1)
|
|
114
|
+
fiber.n.nodeValue = "";
|
|
115
|
+
else
|
|
116
|
+
fiber.n.style.setProperty("display", "none", "important");
|
|
117
|
+
});
|
|
118
|
+
} else if (setRetainedFlag(fiber, "ah", false)) {
|
|
119
|
+
for (let parent = fiber.p; parent; parent = parent.p) {
|
|
120
|
+
if (parent.t === 11 && parent.b?.d?.some(([node]) => node === fiber.n))
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
const props = fiber.v;
|
|
124
|
+
queueMutation(() => {
|
|
125
|
+
if (fiber.t === 1)
|
|
126
|
+
fiber.n.nodeValue = props;
|
|
127
|
+
else {
|
|
128
|
+
const display = props?.style?.display;
|
|
129
|
+
fiber.n.style.display = display == null || typeof display === "boolean" ? "" : ("" + display).trim();
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
installCapability("i", isHidden);
|
|
135
|
+
installCapability("d", (fiber) => !!fiber.ad);
|
|
136
|
+
installCapability("p", prepare);
|
|
137
|
+
installCapability("s", finish);
|
|
138
|
+
registerTypeMatcher((type) => type === REACT_ACTIVITY_TYPE ? 13 : null);
|
|
139
|
+
installRenderer(13, renderActivity);
|
|
140
|
+
//# sourceMappingURL=full.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/dom/features/activity/full.ts"],
|
|
4
|
+
"sourcesContent": ["import { onCommitRollback, queueMutation } from '../../commit';\nimport { REACT_ACTIVITY_TYPE } from '../../../react/activity';\nimport { attachRef, childrenToArray, detachRef, enqueueEffect, findRoot, flushFiberCommits, getCurrentRoot, invokeCommit, installCapability, reconcileRaw, installRenderer, registerTypeMatcher, scheduleLifecycle, scheduleUpdate, } from '../../reconcile';\nimport { disconnectClass, inSuspensePrimary, setRetainedFlag, walkRetained as walk } from '../../retained-effects';\nimport { FiberTag, type Fiber } from '../../../core';\nfunction isHidden(fiber: Fiber): boolean {\n if (!(fiber.r ?? findRoot(fiber))?.a)\n return false;\n for (let parent: Fiber | null = fiber; parent; parent = parent.p) {\n if (parent.t === FiberTag.Activity && parent.v?.mode === 'hidden')\n return true;\n }\n return false;\n}\nfunction renderActivity(fiber: Fiber): void {\n const root = fiber.r ?? findRoot(fiber);\n if (root)\n root.a = true;\n const props = fiber.v ?? {};\n // Hidden content is absent from server HTML. Mount it after hydration so it\n // cannot consume a following visible sibling's hydration cursor.\n if (getCurrentRoot()?.h && props.mode === 'hidden' && !fiber.m) {\n fiber.m = props;\n queueMicrotask(() => scheduleUpdate(fiber));\n return;\n }\n if (isHidden(fiber))\n walk(fiber, prepare);\n else\n walk(fiber, syncDom);\n reconcileRaw(fiber, props.children);\n walk(fiber, reconnect, true);\n fiber.m = props;\n}\nfunction needsHiddenDom(fiber: Fiber): boolean {\n for (let parent = fiber.p; parent; parent = parent.p) {\n if (parent.t === FiberTag.Activity && parent.v?.mode === 'hidden')\n return true;\n if (parent.t === FiberTag.Host)\n return false;\n // A portal starts a new DOM tree, but keeps the parent's Activity state.\n if (parent.t === FiberTag.Portal)\n return isHidden(parent);\n }\n return false;\n}\nfunction finish(fiber: Fiber): void {\n if (fiber.t === FiberTag.Suspense && (fiber.r ?? findRoot(fiber))?.a)\n walk(fiber, reconnect, true);\n else\n syncDom(fiber);\n}\nfunction prepare(fiber: Fiber): void {\n if (!isHidden(fiber) || !!fiber.ad)\n return;\n if (fiber.m == null)\n setRetainedFlag(fiber, 'ad', true);\n else\n disconnect(fiber);\n}\nfunction disconnect(fiber: Fiber): void {\n if (!!fiber.ad)\n return;\n setRetainedFlag(fiber, 'ad', true);\n queueMutation(() => {\n // Insertion effects remain connected, just as they do in React.\n const insertion = new Set<() => void>();\n for (const [hook, effect] of fiber.ef ?? []) {\n if (effect.t === 2 && hook.c)\n insertion.add(hook.c);\n }\n if (fiber.e) {\n const keep = fiber.e.filter(cleanup => insertion.has(cleanup));\n for (const cleanup of fiber.e) {\n if (!insertion.has(cleanup))\n invokeCommit(fiber, cleanup);\n }\n fiber.e = keep.length ? keep : null;\n }\n for (const [hook, effect] of fiber.ef ?? []) {\n if (effect.t !== 2)\n hook.c = null;\n }\n detachRef(fiber.cr ?? fiber.ref);\n fiber.cr = null;\n fiber.rc = null;\n if (!fiber.ld)\n disconnectClass(fiber);\n });\n}\nfunction reconnect(fiber: Fiber): void {\n syncDom(fiber);\n if (isHidden(fiber) || inSuspensePrimary(fiber) || !setRetainedFlag(fiber, 'ad', false))\n return;\n setRetainedFlag(fiber, 'ld', false);\n const instance = fiber.i?._f === fiber ? fiber.i : null;\n if (fiber.t === FiberTag.Host || fiber.t === FiberTag.Resource)\n attachRef(fiber, fiber.n);\n else if (instance || fiber.t === FiberTag.Fragment)\n attachRef(fiber, fiber.i);\n for (const effect of fiber.ef?.values() ?? []) {\n if (effect.t !== 2)\n enqueueEffect(fiber, effect);\n }\n if (instance?.componentDidMount) {\n scheduleLifecycle(fiber, () => instance.componentDidMount());\n }\n flushFiberCommits(fiber);\n}\nfunction syncDom(fiber: Fiber): void {\n if (!(fiber.r ?? findRoot(fiber))?.a)\n return;\n if (!fiber.n || (fiber.t !== FiberTag.Host && fiber.t !== FiberTag.Text))\n return;\n if (needsHiddenDom(fiber)) {\n setRetainedFlag(fiber, 'ah', true);\n queueMutation(() => {\n if (fiber.t === FiberTag.Text)\n fiber.n!.nodeValue = '';\n else\n (fiber.n as HTMLElement).style.setProperty('display', 'none', 'important');\n });\n }\n else if (setRetainedFlag(fiber, 'ah', false)) {\n // A Suspense fallback can remain active after its Activity is revealed.\n // Its preserved primary DOM must stay hidden until that boundary resumes.\n for (let parent = fiber.p; parent; parent = parent.p) {\n if (parent.t === FiberTag.Suspense && parent.b?.d?.some(([node]: [\n Node,\n string\n ]) => node === fiber.n))\n return;\n }\n const props = fiber.v;\n queueMutation(() => {\n if (fiber.t === FiberTag.Text)\n fiber.n!.nodeValue = props;\n else {\n const display = props?.style?.display;\n (fiber.n as HTMLElement).style.display = display == null || typeof display === 'boolean' ? '' : ('' + display).trim();\n }\n });\n }\n}\ninstallCapability('i', isHidden);\ninstallCapability('d', fiber => !!fiber.ad);\ninstallCapability('p', prepare);\ninstallCapability('s', finish);\nregisterTypeMatcher(type => type === REACT_ACTIVITY_TYPE ? FiberTag.Activity : null);\ninstallRenderer(FiberTag.Activity, renderActivity);\n"],
|
|
5
|
+
"mappings": "AAAA,SAA2B,qBAAqB;AAChD,SAAS,2BAA2B;AACpC,SAAS,WAA4B,WAAW,eAAe,UAAU,mBAAmB,gBAAgB,cAAc,mBAAmB,cAAc,iBAAiB,qBAAqB,mBAAmB,sBAAuB;AAC3O,SAAS,iBAAiB,mBAAmB,iBAAiB,gBAAgB,YAAY;AAE1F,SAAS,SAAS,OAAY;AAC1B,MAAI,EAAE,MAAM,KAAK,SAAS,KAAK,IAAI;AAC/B,WAAO;AACX,WAAS,SAAuB,OAAO,QAAQ,SAAS,OAAO,GAAG;AAC9D,QAAI,OAAO,MAAC,MAA0B,OAAO,GAAG,SAAS;AACrD,aAAO;EACf;AACA,SAAO;AACX;AACA,SAAS,eAAe,OAAY;AAChC,QAAM,OAAO,MAAM,KAAK,SAAS,KAAK;AACtC,MAAI;AACA,SAAK,IAAI;AACb,QAAM,QAAQ,MAAM,KAAK,CAAA;AAGzB,MAAI,eAAc,GAAI,KAAK,MAAM,SAAS,YAAY,CAAC,MAAM,GA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K,GAAG;AAG1C,aAAS,SAAS,MAAM,GAAG,QAAQ,SAAS,OAAO,GAAG;AAClD,UAAI,OAAO,MAAC,MAA0B,OAAO,GAAG,GAAG,KAAK,CAAC,CAAC,IAAI,MAGxD,SAAS,MAAM,CAAC;AAClB;IACR;AACA,UAAM,QAAQ,MAAM;AACpB,kBAAc,MAAK;AACf,UAAI,MAAM,MAAC;AACP,cAAM,EAAG,YAAY;WACpB;AACD,cAAM,UAAU,OAAO,OAAO;AAC7B,cAAM,EAAkB,MAAM,UAAU,WAAW,QAAQ,OAAO,YAAY,YAAY,MAAM,KAAK,SAAS,KAAI;MACvH;IACJ,CAAC;EACL;AACJ;AACA,kBAAkB,KAAK,QAAQ;AAC/B,kBAAkB,KAAK,WAAS,CAAC,CAAC,MAAM,EAAE;AAC1C,kBAAkB,KAAK,OAAO;AAC9B,kBAAkB,KAAK,MAAM;AAC7B,oBAAoB,UAAQ,SAAS,sBAAqB,KAAqB,IAAI;AACnF,gBAAe,IAAoB,cAAc;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./full.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { REACT_ACTIVITY_TYPE } from "../../../react/activity.js";
|
|
2
|
+
import { reconcileRaw, installRenderer, registerTypeMatcher } from "../../reconcile.js";
|
|
3
|
+
function renderActivity(fiber) {
|
|
4
|
+
const props = fiber.v ?? {};
|
|
5
|
+
reconcileRaw(fiber, props.mode === "hidden" ? null : props.children);
|
|
6
|
+
fiber.m = props;
|
|
7
|
+
}
|
|
8
|
+
registerTypeMatcher((type) => type === REACT_ACTIVITY_TYPE ? 13 : null);
|
|
9
|
+
installRenderer(13, renderActivity);
|
|
10
|
+
//# sourceMappingURL=stub.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/dom/features/activity/stub.ts"],
|
|
4
|
+
"sourcesContent": ["import { FiberTag, type Fiber } from '../../../core';\nimport { REACT_ACTIVITY_TYPE } from '../../../react/activity';\nimport { childrenToArray, reconcileRaw, installRenderer, registerTypeMatcher } from '../../reconcile';\n// Explicit small-preset downgrade: hidden children unmount instead of being\n// retained. Showing them again creates fresh state, DOM, effects, and refs.\nfunction renderActivity(fiber: Fiber): void {\n const props = fiber.v ?? {};\n reconcileRaw(fiber, props.mode === 'hidden' ? null : props.children);\n fiber.m = props;\n}\nregisterTypeMatcher(type => type === REACT_ACTIVITY_TYPE ? FiberTag.Activity : null);\ninstallRenderer(FiberTag.Activity, renderActivity);\n"],
|
|
5
|
+
"mappings": "AACA,SAAS,2BAA2B;AACpC,SAA0B,cAAc,iBAAiB,2BAA2B;AAGpF,SAAS,eAAe,OAAY;AAChC,QAAM,QAAQ,MAAM,KAAK,CAAA;AACzB,eAAa,OAAO,MAAM,SAAS,WAAW,OAAO,MAAM,QAAQ;AACnE,QAAM,IAAI;AACd;AACA,oBAAoB,UAAQ,SAAS,sBAAqB,KAAqB,IAAI;AACnF,gBAAe,IAAoB,cAAc;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function findDOMNode(instance: any): Node | null;
|