@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,68 @@
|
|
|
1
|
+
import { drainReplayQueue } from '../../event-replay.js';
|
|
2
|
+
export { reactId, forkId, assignReactIds } from '../../react-ids.js';
|
|
3
|
+
import { type Fiber, type FiberRoot, type ReactNode } from '../../../core/index.js';
|
|
4
|
+
export { drainReplayQueue };
|
|
5
|
+
/**
|
|
6
|
+
* Hydration cursor: walks existing DOM children in document order so we can
|
|
7
|
+
* adopt them during fiber tree construction. One cursor per host parent.
|
|
8
|
+
*
|
|
9
|
+
* `endBefore` scopes the cursor to a subrange — used by rehydrateBoundary()
|
|
10
|
+
* so we only adopt DOM up to the closing `/$` marker for that boundary.
|
|
11
|
+
*/
|
|
12
|
+
export declare class HydrationCursor {
|
|
13
|
+
n: ChildNode | null;
|
|
14
|
+
p: Node;
|
|
15
|
+
e: ChildNode | null;
|
|
16
|
+
constructor(parent: Node, start?: ChildNode | null, endBefore?: ChildNode | null);
|
|
17
|
+
skipClaimedMarkers(): void;
|
|
18
|
+
take(): ChildNode | null;
|
|
19
|
+
has(): boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface HydrationBailoutError extends Error {
|
|
22
|
+
f: Fiber | null;
|
|
23
|
+
}
|
|
24
|
+
export declare const isHydrationBailout: (error: unknown) => error is HydrationBailoutError;
|
|
25
|
+
export declare function endHydration(root: FiberRoot): void;
|
|
26
|
+
interface HydrateRootOptions {
|
|
27
|
+
formState?: unknown[] | null;
|
|
28
|
+
identifierStrategy?: 'react';
|
|
29
|
+
identifierPrefix?: string;
|
|
30
|
+
onRecoverableError?: import('../../../core/index.js').RecoverableErrorHandler;
|
|
31
|
+
onCaughtError?: import('../../../core/index.js').RecoverableErrorHandler;
|
|
32
|
+
onUncaughtError?: import('../../../core/index.js').RecoverableErrorHandler;
|
|
33
|
+
}
|
|
34
|
+
interface HydratedRoot {
|
|
35
|
+
render(children: ReactNode): void;
|
|
36
|
+
unmount(): void;
|
|
37
|
+
}
|
|
38
|
+
export declare function queueHydrationEnd(root: FiberRoot): void;
|
|
39
|
+
export declare function beginHydration(root: FiberRoot): void;
|
|
40
|
+
/**
|
|
41
|
+
* Inspect the current cursor position for a streaming-suspense boundary
|
|
42
|
+
* marker emitted by the server. Returns info + advances the cursor past the
|
|
43
|
+
* marker pair (start comment + fallback/real content + end comment).
|
|
44
|
+
*/
|
|
45
|
+
export type BoundaryInfo = [
|
|
46
|
+
0 | 1 | 2 | 3,
|
|
47
|
+
number,
|
|
48
|
+
Comment,
|
|
49
|
+
Comment
|
|
50
|
+
];
|
|
51
|
+
export declare function finishHydration(fiber: Fiber, isTextarea: boolean): void;
|
|
52
|
+
export declare function adoptTextDom(fiber: Fiber, parent: Fiber, text: string): boolean;
|
|
53
|
+
export declare const getHydrationCursor: (hostFiber: Fiber) => HydrationCursor | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* Try to adopt a DOM node for this host fiber. Returns true if adopted.
|
|
56
|
+
* Attaches existing attrs/children via separate hydrate pass.
|
|
57
|
+
*/
|
|
58
|
+
export declare function adoptHostDom(fiber: Fiber, parent: Fiber): boolean;
|
|
59
|
+
export declare function findHostParent(fiber: Fiber): Fiber;
|
|
60
|
+
export declare function clearHydrationCursor(hostFiber: Fiber): void;
|
|
61
|
+
export declare function abortHydration(cause: unknown, fiber?: Fiber | null): never;
|
|
62
|
+
export declare function setHydrationCursor(hostFiber: Fiber, cursor: HydrationCursor): void;
|
|
63
|
+
export declare function resumeHydration(fiber: Fiber, root: FiberRoot): (() => void) | undefined;
|
|
64
|
+
export declare function tryConsumeBoundary(parent: Fiber): BoundaryInfo | null;
|
|
65
|
+
export declare function advanceCursorPast(parent: Fiber, node: Node): void;
|
|
66
|
+
export declare function recoverHydration(root: FiberRoot, error: unknown): boolean;
|
|
67
|
+
export declare function deferHydration(_fiber: Fiber, thenable: Promise<any>): boolean;
|
|
68
|
+
export declare function hydrateRootImpl(container: Element | Document, initialChildren: ReactNode, options: HydrateRootOptions): HydratedRoot;
|
|
@@ -0,0 +1,493 @@
|
|
|
1
|
+
import { devToolsMetadata, readOwnerStack, runWithOwnerStack } from "../../../core/devtools.js";
|
|
2
|
+
import { drainReplayQueue } from "../../event-replay.js";
|
|
3
|
+
import { attachRootFiber, createFiberRoot } from "../../root-internal.js";
|
|
4
|
+
import { createHostNode, setProp } from "../../dom.js";
|
|
5
|
+
import { attributeName, attributeValue, STRING_BOOLEAN_ATTRS } from "../../../core/attributes.js";
|
|
6
|
+
import { getCurrentRoot, discardPendingWork, discardPendingEffects, isThenable, findRoot, flushSyncWork, renderRoot, scheduleRootRender, recoverRootError, removeFiber } from "../../reconcile.js";
|
|
7
|
+
import { isFunction, isReservedProp } from "../../../core/functions.js";
|
|
8
|
+
import { clearHostContainer, documentMetadataParent, DOCUMENT_HEAD_TAGS, DOCUMENT_SHELL_TAGS } from "../../document-metadata.js";
|
|
9
|
+
import { componentStack } from "../../error-info.js";
|
|
10
|
+
import { reactId, forkId, assignReactIds } from "../../react-ids.js";
|
|
11
|
+
import { hydratedFormStates } from "../../../react/form-state.js";
|
|
12
|
+
import { queueBeforeMutation, queueMutation, queueProp, queueText, onCommitRollback, onCommitFailure } from "../../commit.js";
|
|
13
|
+
import { syncTextareaValue } from "../../form-controls.js";
|
|
14
|
+
function findNearestSafeHostAboveComposite(fiber) {
|
|
15
|
+
let host = null;
|
|
16
|
+
let f = fiber;
|
|
17
|
+
while (f) {
|
|
18
|
+
if (f.t === 0 && f.n) {
|
|
19
|
+
if (DOCUMENT_SHELL_TAGS.test(f.type.toLowerCase()))
|
|
20
|
+
return null;
|
|
21
|
+
const parentTag = f.p?.t;
|
|
22
|
+
if (!host || parentTag > 1 && parentTag < 11) {
|
|
23
|
+
host = f;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
f = f.p;
|
|
27
|
+
}
|
|
28
|
+
return host;
|
|
29
|
+
}
|
|
30
|
+
class HydrationCursor {
|
|
31
|
+
n;
|
|
32
|
+
p;
|
|
33
|
+
e;
|
|
34
|
+
constructor(parent, start = null, endBefore = null) {
|
|
35
|
+
this.p = parent;
|
|
36
|
+
this.n = start ?? parent.firstChild;
|
|
37
|
+
this.e = endBefore;
|
|
38
|
+
}
|
|
39
|
+
skipClaimedMarkers() {
|
|
40
|
+
while (this.n && (CLAIMED.has(this.n) || this.n.nodeType === 8 && /^\/?&$/.test(this.n.data)))
|
|
41
|
+
this.n = this.n.nextSibling;
|
|
42
|
+
}
|
|
43
|
+
take() {
|
|
44
|
+
while (this.n && this.n !== this.e) {
|
|
45
|
+
const n = this.n;
|
|
46
|
+
this.n = n.nextSibling;
|
|
47
|
+
if (!CLAIMED.has(n) && (n.nodeType === 1 || n.nodeType === 3))
|
|
48
|
+
return n;
|
|
49
|
+
}
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
has() {
|
|
53
|
+
const position = this.n;
|
|
54
|
+
const found = this.take() !== null;
|
|
55
|
+
this.n = position;
|
|
56
|
+
return found;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function findMetadata(parent, tag, props, fallback) {
|
|
60
|
+
const keys = HEAD_KEY_ATTRS[tag] ?? [];
|
|
61
|
+
for (const location of [parent, fallback]) {
|
|
62
|
+
if (!location)
|
|
63
|
+
continue;
|
|
64
|
+
const cursor = location instanceof HydrationCursor ? location : null;
|
|
65
|
+
scan: for (let node = cursor ? cursor.n : location.firstChild; node && node !== cursor?.e; node = node.nextSibling) {
|
|
66
|
+
const el = node;
|
|
67
|
+
if (el.localName !== tag || CLAIMED.has(el))
|
|
68
|
+
continue;
|
|
69
|
+
for (const key of keys) {
|
|
70
|
+
const value = props[key];
|
|
71
|
+
if (hydrationAttribute(el, attributeName(key)) !== (value == null ? null : String(value)))
|
|
72
|
+
continue scan;
|
|
73
|
+
}
|
|
74
|
+
claimHydrationNode(el);
|
|
75
|
+
return el;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
const PROD_HYDRATION_ERROR = "Hydration mismatch.";
|
|
81
|
+
const BOUNDARY_MARKER = /^(\$[?!E~]?)(\d*)$/;
|
|
82
|
+
const isHydrationBailout = (error) => !!error && error.f !== void 0;
|
|
83
|
+
function endHydration(root) {
|
|
84
|
+
root.h = false;
|
|
85
|
+
root.r.hc = void 0;
|
|
86
|
+
}
|
|
87
|
+
function queueHydrationEnd(root) {
|
|
88
|
+
if (root.h)
|
|
89
|
+
queueBeforeMutation(() => endHydration(root));
|
|
90
|
+
}
|
|
91
|
+
function beginHydration(root) {
|
|
92
|
+
if (process.env.NODE_ENV !== "production")
|
|
93
|
+
devToolsMetadata.hydratedRoots.add(root);
|
|
94
|
+
root.ic = 0;
|
|
95
|
+
root.h = true;
|
|
96
|
+
root.r.hc = new HydrationCursor(root.c);
|
|
97
|
+
}
|
|
98
|
+
const HEAD_KEY_ATTRS = {
|
|
99
|
+
link: ["rel", "href", "sizes", "type"],
|
|
100
|
+
meta: ["name", "property", "charSet", "httpEquiv"],
|
|
101
|
+
script: ["src", "type"],
|
|
102
|
+
style: ["id", "media", "nonce", "title"]
|
|
103
|
+
};
|
|
104
|
+
const CLAIMED = /* @__PURE__ */ new WeakSet();
|
|
105
|
+
function claimHydrationNode(node) {
|
|
106
|
+
CLAIMED.add(node);
|
|
107
|
+
const release = () => {
|
|
108
|
+
CLAIMED.delete(node);
|
|
109
|
+
};
|
|
110
|
+
onCommitRollback(release);
|
|
111
|
+
onCommitFailure(release);
|
|
112
|
+
}
|
|
113
|
+
const hydrationAttribute = (el, name) => name === "nonce" && "nonce" in el && el.hasAttribute(name) ? el.nonce ?? "" : el.getAttribute(name);
|
|
114
|
+
function failHydration(fiber, error = new Error(PROD_HYDRATION_ERROR), recoverInPlace) {
|
|
115
|
+
const root = findRoot(fiber);
|
|
116
|
+
if (root?.re) {
|
|
117
|
+
if (process.env.NODE_ENV !== "production")
|
|
118
|
+
runWithOwnerStack(readOwnerStack(fiber), () => root.re(error, { componentStack: componentStack(fiber) }));
|
|
119
|
+
else
|
|
120
|
+
root.re(error, { componentStack: componentStack(fiber) });
|
|
121
|
+
}
|
|
122
|
+
if (recoverInPlace)
|
|
123
|
+
return true;
|
|
124
|
+
abortHydration(error, findHostRecoveryParent(fiber) ?? fiber);
|
|
125
|
+
}
|
|
126
|
+
function onMismatch(fiber, actualNode) {
|
|
127
|
+
failHydration(fiber, process.env.NODE_ENV !== "production" ? new Error(`Hydration mismatch: expected <${fiber.type ?? "text"}> but found ${actualNode ? actualNode.nodeType === 1 ? actualNode.tagName : "text" : "nothing"}.`) : void 0);
|
|
128
|
+
}
|
|
129
|
+
function finishHydration(fiber, isTextarea) {
|
|
130
|
+
const root = fiber.r;
|
|
131
|
+
if (!root.h || isTextarea || fiber.v?.dangerouslySetInnerHTML != null)
|
|
132
|
+
return;
|
|
133
|
+
const tag = fiber.type.toLowerCase();
|
|
134
|
+
if (!DOCUMENT_SHELL_TAGS.test(tag) && fiber.hc?.has()) {
|
|
135
|
+
const error = new Error(process.env.NODE_ENV !== "production" ? `Hydration mismatch: server rendered extra nodes inside <${tag}>.` : PROD_HYDRATION_ERROR);
|
|
136
|
+
root.re?.(error, { componentStack: null });
|
|
137
|
+
abortHydration(error, fiber);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
function adoptTextDom(fiber, parent, text) {
|
|
141
|
+
const cursor = findHostParent(parent).hc;
|
|
142
|
+
if (!cursor)
|
|
143
|
+
return false;
|
|
144
|
+
const candidate = cursor.take();
|
|
145
|
+
if (candidate?.nodeType !== 3) {
|
|
146
|
+
onMismatch(fiber, candidate);
|
|
147
|
+
return false;
|
|
148
|
+
}
|
|
149
|
+
if (candidate.data !== text) {
|
|
150
|
+
failHydration(fiber, process.env.NODE_ENV !== "production" ? new Error(`Hydration text mismatch: expected "${text}" but found "${candidate.data}".`) : void 0, canRecoverHydrationPropMismatch(candidate));
|
|
151
|
+
queueText(candidate, text);
|
|
152
|
+
}
|
|
153
|
+
fiber.n = candidate;
|
|
154
|
+
return true;
|
|
155
|
+
}
|
|
156
|
+
const getHydrationCursor = (hostFiber) => hostFiber.hc;
|
|
157
|
+
let hydrationProbeDocument;
|
|
158
|
+
function hydrateProps(fiber, el, props, tag, isSvg) {
|
|
159
|
+
const recoverInPlace = canRecoverHydrationPropMismatch(el, tag);
|
|
160
|
+
let expected;
|
|
161
|
+
for (const k in props) {
|
|
162
|
+
const value = props[k];
|
|
163
|
+
if (isReservedProp(k) || k === "suppressHydrationWarning" || k === "suppressContentEditableWarning" || isHydrationFormProp(tag, k))
|
|
164
|
+
continue;
|
|
165
|
+
const event = isFunction(value) && (k === "action" || k === "formAction" || k[0] === "o" && k[1] === "n");
|
|
166
|
+
if (event)
|
|
167
|
+
queueProp(el, k, value, void 0, isSvg);
|
|
168
|
+
if (event || props.suppressHydrationWarning)
|
|
169
|
+
continue;
|
|
170
|
+
let mismatch;
|
|
171
|
+
if (k === "dangerouslySetInnerHTML") {
|
|
172
|
+
let html = value?.__html;
|
|
173
|
+
if (html == null || html === el.innerHTML)
|
|
174
|
+
continue;
|
|
175
|
+
if (tag !== "script" && tag !== "style") {
|
|
176
|
+
const probe = createHostNode(tag, isSvg, el.ownerDocument);
|
|
177
|
+
probe.innerHTML = html;
|
|
178
|
+
html = probe.innerHTML;
|
|
179
|
+
}
|
|
180
|
+
mismatch = el.innerHTML !== "" + html;
|
|
181
|
+
} else {
|
|
182
|
+
const attr = attributeName(k, isSvg);
|
|
183
|
+
if (k === "style" || k === "value" && value != null && value !== false) {
|
|
184
|
+
expected ??= createHostNode(tag, isSvg, hydrationProbeDocument ??= el.ownerDocument.implementation.createHTMLDocument(""));
|
|
185
|
+
setProp(expected, k, value, void 0, isSvg);
|
|
186
|
+
mismatch = k === "style" ? !hydrationStylesMatch(el.style, expected.style) : expected.getAttribute(attr) !== hydrationAttribute(el, attr);
|
|
187
|
+
} else {
|
|
188
|
+
const stringified = STRING_BOOLEAN_ATTRS.test(attr) || /^(aria|data)-./.test(k);
|
|
189
|
+
const desired = stringified ? value == null ? null : "" + value : value === false ? null : attributeValue(k, value, attr);
|
|
190
|
+
mismatch = desired !== hydrationAttribute(el, attr);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
if (mismatch) {
|
|
194
|
+
if (recoverInPlace)
|
|
195
|
+
queueProp(el, k, value, void 0, isSvg);
|
|
196
|
+
failHydration(fiber, process.env.NODE_ENV !== "production" ? new Error(`Hydration mismatch on <${tag}> for "${k}".`) : void 0, recoverInPlace);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
function adoptHostDom(fiber, parent) {
|
|
201
|
+
const hostParent = findHostParent(parent);
|
|
202
|
+
const cursor = hostParent.hc;
|
|
203
|
+
if (!cursor)
|
|
204
|
+
return false;
|
|
205
|
+
const tag = fiber.type.toLowerCase();
|
|
206
|
+
const props = fiber.v ?? {};
|
|
207
|
+
const documentHeadParent = documentMetadataParent(fiber) || (cursor.p.nodeType === 9 && DOCUMENT_HEAD_TAGS.test(tag) ? cursor.p.head : null);
|
|
208
|
+
const parentTag = cursor.p.localName;
|
|
209
|
+
const isHeadish = parentTag === "head" || parentTag === "html" || !!documentHeadParent;
|
|
210
|
+
const metadataParent = documentHeadParent || (isHeadish ? cursor.p : cursor.p.nodeType === 9 && tag !== "html" ? cursor.p.body : null);
|
|
211
|
+
const candidate = metadataParent ? findMetadata(metadataParent, tag, props, documentHeadParent ? cursor : void 0) : cursor.take();
|
|
212
|
+
if (!candidate) {
|
|
213
|
+
if (!isHeadish)
|
|
214
|
+
onMismatch(fiber, null);
|
|
215
|
+
return false;
|
|
216
|
+
}
|
|
217
|
+
if (candidate.localName?.toLowerCase() !== tag) {
|
|
218
|
+
onMismatch(fiber, candidate);
|
|
219
|
+
return false;
|
|
220
|
+
}
|
|
221
|
+
fiber.n = candidate;
|
|
222
|
+
const isSvg = tag === "svg" || candidate.namespaceURI === "http://www.w3.org/2000/svg" && tag !== "foreignobject";
|
|
223
|
+
if (tag === "input" || tag === "textarea")
|
|
224
|
+
queueHydrationFormState(candidate, props, tag);
|
|
225
|
+
hydrateProps(fiber, candidate, props, tag, isSvg);
|
|
226
|
+
if (isFunction(tag === "form" ? props.action : props.formAction)) {
|
|
227
|
+
for (const child of candidate.children) {
|
|
228
|
+
if (child.tagName === "INPUT" && child.getAttribute("type") === "hidden" && child.getAttribute("name")?.startsWith("$ACTION_"))
|
|
229
|
+
claimHydrationNode(child);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
if (fiber.r.hr !== candidate) {
|
|
233
|
+
fiber.hc = new HydrationCursor(candidate);
|
|
234
|
+
}
|
|
235
|
+
return true;
|
|
236
|
+
}
|
|
237
|
+
function findHostParent(fiber) {
|
|
238
|
+
let f = fiber;
|
|
239
|
+
while (f) {
|
|
240
|
+
if (f.hc || f.t === 0 || f.t === 12 || f.t === 5) {
|
|
241
|
+
return f;
|
|
242
|
+
}
|
|
243
|
+
f = f.p;
|
|
244
|
+
}
|
|
245
|
+
if (process.env.NODE_ENV !== "production") {
|
|
246
|
+
throw new Error("No host parent found");
|
|
247
|
+
}
|
|
248
|
+
throw new Error();
|
|
249
|
+
}
|
|
250
|
+
function clearHydrationCursor(hostFiber) {
|
|
251
|
+
hostFiber.hc = void 0;
|
|
252
|
+
}
|
|
253
|
+
function abortHydration(cause, fiber = null) {
|
|
254
|
+
throw Object.assign(new Error(PROD_HYDRATION_ERROR, { cause }), { f: fiber });
|
|
255
|
+
}
|
|
256
|
+
function setHydrationCursor(hostFiber, cursor) {
|
|
257
|
+
hostFiber.hc = cursor;
|
|
258
|
+
}
|
|
259
|
+
function resetAfterHydrationFailure(root, container, recoveryContainer = container) {
|
|
260
|
+
removeFiber(root.r, false);
|
|
261
|
+
discardPendingWork(root);
|
|
262
|
+
discardPendingEffects(root);
|
|
263
|
+
clearHydrationContainer(recoveryContainer);
|
|
264
|
+
attachRootFiber(root, container);
|
|
265
|
+
root.h = false;
|
|
266
|
+
}
|
|
267
|
+
const canRecoverHydrationPropMismatch = (node, tag) => DOCUMENT_SHELL_TAGS.test(tag) || !!node.ownerDocument?.head?.contains(node);
|
|
268
|
+
function findHostRecoveryParent(fiber) {
|
|
269
|
+
if (fiber.t === 1) {
|
|
270
|
+
let directHost = fiber.p;
|
|
271
|
+
while (directHost && (directHost.t !== 0 || !directHost.n)) {
|
|
272
|
+
directHost = directHost.p;
|
|
273
|
+
}
|
|
274
|
+
if (!directHost)
|
|
275
|
+
return null;
|
|
276
|
+
let hasEvent;
|
|
277
|
+
const props = directHost.v ?? directHost.m;
|
|
278
|
+
if (props) {
|
|
279
|
+
for (const k in props) {
|
|
280
|
+
if (k[0] === "o" && k[1] === "n" && isFunction(props[k])) {
|
|
281
|
+
hasEvent = true;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
return findNearestSafeHostAboveComposite(hasEvent || directHost.p?.t === 0 ? directHost.p : directHost);
|
|
286
|
+
}
|
|
287
|
+
return findNearestSafeHostAboveComposite(fiber.p);
|
|
288
|
+
}
|
|
289
|
+
function resumeHydration(fiber, root) {
|
|
290
|
+
if (fiber.b?.p !== true)
|
|
291
|
+
return;
|
|
292
|
+
delete fiber.b.p;
|
|
293
|
+
const previous = root.h;
|
|
294
|
+
root.h = true;
|
|
295
|
+
return () => {
|
|
296
|
+
root.h = previous;
|
|
297
|
+
clearHydrationCursor(fiber);
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
function tryConsumeBoundary(parent) {
|
|
301
|
+
const cursor = findHostParent(parent).hc;
|
|
302
|
+
if (!cursor)
|
|
303
|
+
return null;
|
|
304
|
+
cursor.skipClaimedMarkers();
|
|
305
|
+
const peek = cursor.n;
|
|
306
|
+
if (!peek || peek.nodeType !== 8)
|
|
307
|
+
return null;
|
|
308
|
+
const data = peek.data;
|
|
309
|
+
const m = BOUNDARY_MARKER.exec(data);
|
|
310
|
+
if (!m)
|
|
311
|
+
return null;
|
|
312
|
+
const kind = m[1] === "$?" || m[1] === "$~" ? 1 : m[1] === "$!" ? 2 : m[1] === "$E" ? 3 : 0;
|
|
313
|
+
const id = Number(m[2]);
|
|
314
|
+
const startMark = peek;
|
|
315
|
+
cursor.n = startMark.nextSibling;
|
|
316
|
+
let scan = startMark.nextSibling;
|
|
317
|
+
let depth = 0;
|
|
318
|
+
while (scan) {
|
|
319
|
+
if (scan.nodeType === 8) {
|
|
320
|
+
const data2 = scan.data;
|
|
321
|
+
if (BOUNDARY_MARKER.test(data2))
|
|
322
|
+
depth++;
|
|
323
|
+
else if (data2 === "/$" && depth-- === 0)
|
|
324
|
+
return [kind, id, startMark, scan];
|
|
325
|
+
}
|
|
326
|
+
scan = scan.nextSibling;
|
|
327
|
+
}
|
|
328
|
+
return null;
|
|
329
|
+
}
|
|
330
|
+
function queueHydrationFormState(el, props, tag) {
|
|
331
|
+
queueMutation(() => {
|
|
332
|
+
if (tag === "input") {
|
|
333
|
+
const input = el;
|
|
334
|
+
if (props.type != null)
|
|
335
|
+
input.type = props.type;
|
|
336
|
+
const value = props.value ?? props.defaultValue;
|
|
337
|
+
if (value != null && (props.value != null || input.type !== "submit" && input.type !== "reset")) {
|
|
338
|
+
input.defaultValue = "" + value;
|
|
339
|
+
}
|
|
340
|
+
input.checked = input.checked;
|
|
341
|
+
input.defaultChecked = !!(props.checked ?? props.defaultChecked);
|
|
342
|
+
} else {
|
|
343
|
+
syncTextareaValue(el, props, true);
|
|
344
|
+
}
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
function releaseClaims(container) {
|
|
348
|
+
for (const node of container.querySelectorAll("*"))
|
|
349
|
+
CLAIMED.delete(node);
|
|
350
|
+
}
|
|
351
|
+
function clearHydrationContainer(container) {
|
|
352
|
+
queueMutation(() => clearHostContainer(container));
|
|
353
|
+
}
|
|
354
|
+
function advanceCursorPast(parent, node) {
|
|
355
|
+
const cursor = findHostParent(parent).hc;
|
|
356
|
+
if (!cursor)
|
|
357
|
+
return;
|
|
358
|
+
cursor.n = node.nextSibling;
|
|
359
|
+
}
|
|
360
|
+
const isHydrationFormProp = (tag, key) => /^(input|textarea|select)$/.test(tag) && (key === "value" || key === "defaultValue") || tag === "input" && (key === "checked" || key === "defaultChecked") || tag === "option" && key === "selected";
|
|
361
|
+
function hydrationStylesMatch(actual, expected) {
|
|
362
|
+
for (let index = 0; index < expected.length; index++) {
|
|
363
|
+
const property = expected.item(index);
|
|
364
|
+
if (actual.getPropertyValue(property) !== expected.getPropertyValue(property) || actual.getPropertyPriority(property) !== expected.getPropertyPriority(property)) {
|
|
365
|
+
return false;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
return true;
|
|
369
|
+
}
|
|
370
|
+
function recoverHydration(root, error) {
|
|
371
|
+
if (!isHydrationBailout(error))
|
|
372
|
+
return false;
|
|
373
|
+
const container = root.c;
|
|
374
|
+
const children = root.r.v?.children ?? null;
|
|
375
|
+
const host = error.f;
|
|
376
|
+
const recoveryContainer = host?.t === 0 && host.n && findNearestSafeHostAboveComposite(host.p) ? host.n : container;
|
|
377
|
+
resetAfterHydrationFailure(root, container, recoveryContainer);
|
|
378
|
+
if (recoveryContainer !== container) {
|
|
379
|
+
releaseClaims(container);
|
|
380
|
+
root.hr = recoveryContainer;
|
|
381
|
+
beginHydration(root);
|
|
382
|
+
}
|
|
383
|
+
try {
|
|
384
|
+
flushSyncWork(() => renderRoot(root, children));
|
|
385
|
+
} catch (clientError) {
|
|
386
|
+
resetAfterHydrationFailure(root, container);
|
|
387
|
+
if (recoverRootError(clientError))
|
|
388
|
+
return true;
|
|
389
|
+
throw clientError;
|
|
390
|
+
} finally {
|
|
391
|
+
endHydration(root);
|
|
392
|
+
root.hr = void 0;
|
|
393
|
+
}
|
|
394
|
+
return true;
|
|
395
|
+
}
|
|
396
|
+
const formatHydrationValue = (value) => value == null ? "nothing" : JSON.stringify(value);
|
|
397
|
+
function deferHydration(_fiber, thenable) {
|
|
398
|
+
if (getCurrentRoot()?.h)
|
|
399
|
+
throw thenable;
|
|
400
|
+
return false;
|
|
401
|
+
}
|
|
402
|
+
function hydrateRootImpl(container, initialChildren, options) {
|
|
403
|
+
const root = createFiberRoot(container, options);
|
|
404
|
+
if (options.formState)
|
|
405
|
+
hydratedFormStates.set(root, {
|
|
406
|
+
value: options.formState[0],
|
|
407
|
+
consume(fiber) {
|
|
408
|
+
const cursor = findHostParent(fiber.p).hc;
|
|
409
|
+
cursor?.skipClaimedMarkers();
|
|
410
|
+
const marker = cursor?.n;
|
|
411
|
+
if (!marker || marker.nodeType !== 8 || !/^F!?$/.test(marker.data))
|
|
412
|
+
throw new Error(process.env.NODE_ENV !== "production" ? "Missing server form state marker during hydration." : "");
|
|
413
|
+
cursor.n = marker.nextSibling;
|
|
414
|
+
return marker.data === "F!";
|
|
415
|
+
}
|
|
416
|
+
});
|
|
417
|
+
let generation = 0;
|
|
418
|
+
let active = true;
|
|
419
|
+
function hydrate(children) {
|
|
420
|
+
const attempt = ++generation;
|
|
421
|
+
let hydrationError = null;
|
|
422
|
+
beginHydration(root);
|
|
423
|
+
try {
|
|
424
|
+
flushSyncWork(() => renderRoot(root, children));
|
|
425
|
+
} catch (error) {
|
|
426
|
+
hydrationError = error;
|
|
427
|
+
} finally {
|
|
428
|
+
endHydration(root);
|
|
429
|
+
}
|
|
430
|
+
if (isThenable(hydrationError)) {
|
|
431
|
+
discardPendingWork(root);
|
|
432
|
+
discardPendingEffects(root);
|
|
433
|
+
const retry = () => {
|
|
434
|
+
if (!active || attempt !== generation)
|
|
435
|
+
return;
|
|
436
|
+
releaseClaims(container);
|
|
437
|
+
hydrate(children);
|
|
438
|
+
};
|
|
439
|
+
hydrationError.then(retry, retry);
|
|
440
|
+
return;
|
|
441
|
+
}
|
|
442
|
+
if (hydrationError && !recoverHydration(root, hydrationError))
|
|
443
|
+
throw hydrationError;
|
|
444
|
+
drainReplayQueue();
|
|
445
|
+
}
|
|
446
|
+
hydrate(initialChildren);
|
|
447
|
+
return {
|
|
448
|
+
render(children) {
|
|
449
|
+
generation++;
|
|
450
|
+
if (root.r.m === null) {
|
|
451
|
+
releaseClaims(container);
|
|
452
|
+
hydrate(children);
|
|
453
|
+
} else
|
|
454
|
+
scheduleRootRender(root, () => renderRoot(root, children));
|
|
455
|
+
},
|
|
456
|
+
unmount() {
|
|
457
|
+
discardPendingWork(root);
|
|
458
|
+
active = false;
|
|
459
|
+
generation++;
|
|
460
|
+
const pending = root.r.m === null;
|
|
461
|
+
flushSyncWork(() => {
|
|
462
|
+
renderRoot(root, null);
|
|
463
|
+
if (pending)
|
|
464
|
+
clearHydrationContainer(container);
|
|
465
|
+
});
|
|
466
|
+
}
|
|
467
|
+
};
|
|
468
|
+
}
|
|
469
|
+
export {
|
|
470
|
+
HydrationCursor,
|
|
471
|
+
abortHydration,
|
|
472
|
+
adoptHostDom,
|
|
473
|
+
adoptTextDom,
|
|
474
|
+
advanceCursorPast,
|
|
475
|
+
assignReactIds,
|
|
476
|
+
beginHydration,
|
|
477
|
+
clearHydrationCursor,
|
|
478
|
+
deferHydration,
|
|
479
|
+
drainReplayQueue,
|
|
480
|
+
endHydration,
|
|
481
|
+
findHostParent,
|
|
482
|
+
finishHydration,
|
|
483
|
+
forkId,
|
|
484
|
+
getHydrationCursor,
|
|
485
|
+
hydrateRootImpl,
|
|
486
|
+
isHydrationBailout,
|
|
487
|
+
queueHydrationEnd,
|
|
488
|
+
reactId,
|
|
489
|
+
recoverHydration,
|
|
490
|
+
resumeHydration,
|
|
491
|
+
setHydrationCursor,
|
|
492
|
+
tryConsumeBoundary
|
|
493
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/dom/features/hydration/full.ts"],
|
|
4
|
+
"sourcesContent": ["import { readOwnerStack, runWithOwnerStack } from '../../../core/devtools';\nimport { drainReplayQueue } from '../../event-replay';\nimport { attachRootFiber, createFiberRoot } from '../../root-internal';\nimport { createHostNode, setProp } from '../../dom';\nimport { attributeName, attributeValue, STRING_BOOLEAN_ATTRS } from '../../../core/attributes';\nimport { getCurrentRoot, scheduleUpdate, discardPendingWork, discardPendingEffects, isThenable, findRoot, flushSyncWork, renderRoot, scheduleRootRender, recoverRootError, removeFiber } from '../../reconcile';\nimport { isFunction, isReservedProp } from '../../../core/functions';\nimport { clearHostContainer, documentMetadataParent, DOCUMENT_HEAD_TAGS, DOCUMENT_SHELL_TAGS } from '../../document-metadata';\nimport { componentStack } from '../../error-info';\nexport { reactId, forkId, assignReactIds } from '../../react-ids';\nimport { FiberTag, type Fiber, type FiberRoot, type ReactNode, } from '../../../core';\nimport { hydratedFormStates } from '../../../react/form-state';\nimport { queueMutation, queueProp, queueText } from '../../commit';\nimport { syncTextareaValue } from '../../form-controls';\n// Re-export from event-replay so all hydration concerns live behind one\n// feature boundary — the plugin's stub swap strips drainReplayQueue too.\nexport { drainReplayQueue };\nfunction findNearestSafeHostAboveComposite(fiber: Fiber | null): Fiber | null {\n let host: Fiber | null = null;\n let f = fiber;\n while (f) {\n if (f.t === FiberTag.Host && f.n) {\n if (!isSafeHostRecoveryElement(f))\n return null;\n const parentTag = f.p?.t as number;\n if (!host || (parentTag > FiberTag.Text && parentTag < FiberTag.Suspense)) {\n host = f;\n }\n }\n f = f.p;\n }\n return host;\n}\n/**\n * Hydration cursor: walks existing DOM children in document order so we can\n * adopt them during fiber tree construction. One cursor per host parent.\n *\n * `endBefore` scopes the cursor to a subrange — used by rehydrateBoundary()\n * so we only adopt DOM up to the closing `/$` marker for that boundary.\n */\nexport class HydrationCursor {\n n: ChildNode | null;\n p: Node;\n e: ChildNode | null;\n constructor(parent: Node, start: ChildNode | null = null, endBefore: ChildNode | null = null) {\n this.p = parent;\n this.n = start ?? parent.firstChild;\n this.e = endBefore;\n }\n skipClaimedMarkers(): void {\n while (this.n && (CLAIMED.has(this.n) || (this.n.nodeType === 8 && /^\\/?&$/.test((this.n as Comment).data))))\n this.n = this.n.nextSibling;\n }\n take(): ChildNode | null {\n while (this.n && this.n !== this.e) {\n const n = this.n;\n // Skip anything that isn't an element (1) or text (3):\n // comments (8), doctype (10), processing instructions (7), cdata (4).\n this.n = n.nextSibling;\n if (!CLAIMED.has(n) && (n.nodeType === 1 || n.nodeType === 3))\n return n;\n }\n return null;\n }\n /**\n * Position-insensitive lookup for head/html adoption. Scans forward past\n * non-matching nodes without removing them, matching by tag AND the key\n * attributes that identify head elements uniquely (rel/href for links,\n * name/property for meta, src for script). Non-matching nodes stay in\n * place so the SSR'd stylesheet/script order is preserved.\n */\n head(tag: string, props: Record<string, any>): ChildNode | null {\n const target = tag.toLowerCase();\n const keyAttrs = HEAD_KEY_ATTRS[target];\n let scan = this.p.firstChild;\n while (scan) {\n if (scan.nodeType === 1 &&\n (scan as Element).tagName.toLowerCase() === target &&\n headAttrsMatch(scan as Element, props, keyAttrs)) {\n CLAIMED.add(scan);\n return scan;\n }\n scan = scan.nextSibling;\n }\n return null;\n }\n has(): boolean {\n const position = this.n;\n const found = this.take() !== null;\n this.n = position;\n return found;\n }\n}\nconst PROD_HYDRATION_ERROR = 'Hydration mismatch.';\nconst BOUNDARY_MARKER = /^(\\$[?!E~]?)(\\d*)$/;\nexport interface HydrationBailoutError extends Error {\n f: Fiber | null;\n}\nexport const isHydrationBailout = (error: unknown): error is HydrationBailoutError => (!!error && (error as any).f !== undefined);\nexport function endHydration(root: FiberRoot): void {\n root.h = false;\n root.r.hc = undefined;\n}\ninterface HydrateRootOptions {\n formState?: unknown[] | null;\n identifierStrategy?: 'react';\n identifierPrefix?: string;\n onRecoverableError?: import('../../../core').RecoverableErrorHandler;\n onCaughtError?: import('../../../core').RecoverableErrorHandler;\n onUncaughtError?: import('../../../core').RecoverableErrorHandler;\n}\ninterface HydratedRoot {\n render(children: ReactNode): void;\n unmount(): void;\n}\nexport function beginHydration(root: FiberRoot): void {\n root.ic = 0;\n root.h = true;\n root.r.hc = new HydrationCursor(root.c);\n}\n// Head elements that we match against server DOM by attribute signature.\nconst HEAD_KEY_ATTRS: Record<string, ReadonlyArray<string>> = {\n link: ['rel', 'href', 'sizes', 'type'],\n meta: ['name', 'property', 'charSet', 'httpEquiv'],\n script: ['src', 'type'],\n style: ['id', 'media', 'nonce', 'title'],\n};\n// DOM elements already claimed by some fiber during this hydration pass.\nconst CLAIMED = new WeakSet<Node>();\nfunction headAttrsMatch(el: Element, props: Record<string, any>, keys: ReadonlyArray<string> | undefined): boolean {\n if (CLAIMED.has(el))\n return false;\n if (!keys)\n return true;\n for (const k of keys) {\n const propVal = props[k];\n const elVal = hydrationAttribute(el, attributeName(k));\n if (propVal == null ? elVal != null : String(propVal) !== elVal)\n return false;\n }\n return true;\n}\nfunction isSafeHostRecoveryElement(fiber: Fiber): boolean {\n return !DOCUMENT_SHELL_TAGS.test(fiber.type.toLowerCase());\n}\nconst hydrationAttribute = (el: Element, name: string): string | null => (name === 'nonce' && 'nonce' in el && el.hasAttribute(name)\n ? (el as HTMLElement).nonce ?? ''\n : el.getAttribute(name));\nfunction failHydration(fiber: Fiber, error: Error = new Error(PROD_HYDRATION_ERROR), recoverInPlace?: boolean): boolean {\n const root = findRoot(fiber);\n if (root?.re) {\n if (process.env.NODE_ENV !== 'production') runWithOwnerStack(readOwnerStack(fiber), () => root.re!(error, { componentStack: componentStack(fiber) }));\n else root.re(error, { componentStack: componentStack(fiber) });\n }\n if (recoverInPlace)\n return true;\n abortHydration(error, findHostRecoveryParent(fiber) ?? fiber);\n}\nfunction onMismatch(fiber: Fiber, actualNode: ChildNode | null): void {\n failHydration(fiber, process.env.NODE_ENV !== 'production'\n ? new Error(`Hydration mismatch: expected <${(fiber.type as string) ?? 'text'}> but found ${actualNode ? (actualNode.nodeType === 1 ? (actualNode as Element).tagName : 'text') : 'nothing'}.`)\n : undefined);\n}\n/**\n * Inspect the current cursor position for a streaming-suspense boundary\n * marker emitted by the server. Returns info + advances the cursor past the\n * marker pair (start comment + fallback/real content + end comment).\n */\nexport type BoundaryInfo = [\n 0 | 1 | 2 | 3,\n number,\n Comment,\n Comment\n];\nexport function finishHydration(fiber: Fiber, isTextarea: boolean): void {\n const root = fiber.r!;\n if (!root.h || isTextarea || fiber.v?.dangerouslySetInnerHTML != null)\n return;\n const tag = fiber.type.toLowerCase();\n if (!DOCUMENT_SHELL_TAGS.test(tag) && fiber.hc?.has()) {\n const error = new Error(process.env.NODE_ENV !== 'production'\n ? `Hydration mismatch: server rendered extra nodes inside <${tag}>.` : PROD_HYDRATION_ERROR);\n root.re?.(error, { componentStack: null });\n abortHydration(error, fiber);\n }\n}\nexport function adoptTextDom(fiber: Fiber, parent: Fiber, text: string): boolean {\n const cursor = findHostParent(parent).hc;\n if (!cursor)\n return false;\n const candidate = cursor.take();\n if (candidate?.nodeType !== 3) {\n onMismatch(fiber, candidate);\n return false;\n }\n if ((candidate as Text).data !== text) {\n failHydration(fiber, process.env.NODE_ENV !== 'production'\n ? new Error(`Hydration text mismatch: expected \"${text}\" but found \"${(candidate as Text).data}\".`)\n : undefined, canRecoverHydrationPropMismatch(candidate));\n queueText(candidate as Text, text);\n }\n fiber.n = candidate;\n return true;\n}\nexport const getHydrationCursor = (hostFiber: Fiber): HydrationCursor | undefined => (hostFiber.hc);\nlet hydrationProbeDocument: Document | undefined;\nfunction hydrateProps(fiber: Fiber, el: Element, props: Record<string, any>, tag: string, isSvg: boolean): void {\n const recoverInPlace = canRecoverHydrationPropMismatch(el, tag);\n let expected: Element | undefined;\n for (const k in props) {\n const value = props[k];\n if (isReservedProp(k) || k === 'suppressHydrationWarning' || k === 'suppressContentEditableWarning' || isHydrationFormProp(tag, k)) continue;\n const event = isFunction(value) && (k === 'action' || k === 'formAction' || k[0] === 'o' && k[1] === 'n');\n if (event) queueProp(el, k, value, undefined, isSvg);\n if (event || props.suppressHydrationWarning) continue;\n let mismatch: boolean;\n if (k === 'dangerouslySetInnerHTML') {\n let html = value?.__html;\n if (html == null || html === el.innerHTML) continue;\n if (tag !== 'script' && tag !== 'style') {\n // Raw HTML must use the live document's parsing context.\n // Template content treats noscript differently when scripting is enabled.\n const probe = createHostNode(tag, isSvg, el.ownerDocument);\n probe.innerHTML = html;\n html = probe.innerHTML;\n }\n mismatch = (el as HTMLElement).innerHTML !== '' + html;\n } else {\n const attr = attributeName(k, isSvg);\n if (k === 'style' || k === 'value' && value != null && value !== false) {\n expected ??= createHostNode(tag, isSvg, hydrationProbeDocument ??= el.ownerDocument.implementation.createHTMLDocument(''));\n setProp(expected, k, value, undefined, isSvg);\n mismatch = k === 'style'\n ? !hydrationStylesMatch((el as HTMLElement).style, (expected as HTMLElement).style)\n : expected.getAttribute(attr) !== hydrationAttribute(el, attr);\n } else {\n const stringified = STRING_BOOLEAN_ATTRS.test(attr) || /^(aria|data)-./.test(k);\n const desired = stringified ? value == null ? null : '' + value\n : value === false ? null : attributeValue(k, value, attr);\n mismatch = desired !== hydrationAttribute(el, attr);\n }\n }\n\n if (mismatch) {\n if (recoverInPlace) queueProp(el, k, value, undefined, isSvg);\n failHydration(fiber, process.env.NODE_ENV !== 'production' ? new Error(`Hydration mismatch on <${tag}> for \"${k}\".`) : undefined, recoverInPlace);\n }\n }\n}\n/**\n * Try to adopt a DOM node for this host fiber. Returns true if adopted.\n * Attaches existing attrs/children via separate hydrate pass.\n */\nexport function adoptHostDom(fiber: Fiber, parent: Fiber): boolean {\n const hostParent = findHostParent(parent);\n const cursor = hostParent.hc;\n if (!cursor)\n return false;\n const tag = (fiber.type as string).toLowerCase();\n const documentHeadParent = documentMetadataParent(fiber) || (cursor.p.nodeType === 9 && DOCUMENT_HEAD_TAGS.test(tag)\n ? (cursor.p as Document).head\n : null);\n const parentEl = cursor.p as Element;\n const parentTag = parentEl.nodeType === 1 ? (parentEl as Element).tagName.toLowerCase() : '';\n const isHeadish = parentTag === 'head' || parentTag === 'html' || !!documentHeadParent;\n let candidate: ChildNode | null;\n if (documentHeadParent) {\n // Adopt projected metadata from the same head used for client updates.\n candidate = new HydrationCursor(documentHeadParent).head(tag, fiber.v ?? {});\n }\n else if (cursor.p.nodeType === 9 && tag !== 'html') {\n candidate = new HydrationCursor((cursor.p as Document).body).head(tag, fiber.v ?? {});\n }\n else if (isHeadish) {\n // Head/html children are position-insensitive — server may emit them in\n // a different order than the React tree (React 19 head hoisting, etc.).\n // Scan forward without removing non-matching nodes; match on attribute\n // signature so we don't adopt the wrong <link> and clobber its props.\n candidate = cursor.head(tag, fiber.v ?? {});\n }\n else {\n candidate = cursor.take();\n }\n if (!candidate) {\n // Client expected a host here but the cursor is exhausted — server gave\n // fewer children than the client tree. Report the structural gap (React\n // fires `onRecoverableError` for this exact case) and let the reconciler\n // mount a fresh DOM for this fiber below.\n // Exception: <head> children are position-insensitive; a missing match\n // there means \"server didn't hoist this one yet\", which we silently mount.\n if (!isHeadish)\n onMismatch(fiber, null);\n return false;\n }\n if (candidate.nodeType !== 1 || (candidate as Element).tagName.toLowerCase() !== tag) {\n // mismatch — log and re-render fresh from this point\n onMismatch(fiber, candidate);\n return false;\n }\n fiber.n = candidate;\n // Apply props (attach events, sync IDL props). Don't re-set existing attrs.\n const props = fiber.v ?? {};\n const isSvg = tag === 'svg' ||\n ((candidate as Element).namespaceURI === 'http://www.w3.org/2000/svg' &&\n tag !== 'foreignobject');\n // Form defaults precede event registration so input type owns event mapping.\n if (tag === 'input' || tag === 'textarea')\n queueHydrationFormState(candidate as Element, props, tag);\n hydrateProps(fiber, candidate as Element, props, tag, isSvg);\n // React SSR adds transport fields for progressively enhanced Server Actions.\n // They have no corresponding client fibers and must not consume child slots.\n if (isFunction(tag === 'form' ? props.action : props.formAction)) {\n for (const child of (candidate as Element).children) {\n if (child.tagName === 'INPUT' && child.getAttribute('type') === 'hidden' && child.getAttribute('name')?.startsWith('$ACTION_'))\n CLAIMED.add(child);\n }\n }\n // Set up child cursor for this host's children\n // Recovery keeps the whole component tree, but mounts fresh children inside\n // the failed host. Hosts outside it still adopt the existing document shell.\n if (fiber.r!.hr !== candidate) {\n fiber.hc = new HydrationCursor(candidate);\n }\n return true;\n}\nfunction getRecoveryContainer(container: Element | Document, host: Fiber | null): Element | Document {\n if (host?.t === FiberTag.Host &&\n host.n &&\n findNearestSafeHostAboveComposite(host.p)) {\n return host.n as Element;\n }\n return container;\n}\nexport function findHostParent(fiber: Fiber): Fiber {\n let f: Fiber | null = fiber;\n while (f) {\n // A fiber explicitly holding a cursor acts as a boundary for hydration\n // (e.g. Suspense with a scoped cursor during fallback/boundary hydration).\n if (f.hc)\n return f;\n if (f.t === FiberTag.Host || f.t === FiberTag.Root || f.t === FiberTag.Portal) {\n return f;\n }\n f = f.p;\n }\n if (process.env.NODE_ENV !== 'production') {\n throw new Error('No host parent found');\n }\n throw new Error();\n}\nexport function clearHydrationCursor(hostFiber: Fiber): void {\n hostFiber.hc = undefined;\n}\nexport function abortHydration(cause: unknown, fiber: Fiber | null = null): never {\n throw Object.assign(new Error(PROD_HYDRATION_ERROR, { cause }), { f: fiber });\n}\nexport function setHydrationCursor(hostFiber: Fiber, cursor: HydrationCursor): void {\n hostFiber.hc = cursor;\n}\nfunction resetAfterHydrationFailure(root: FiberRoot, container: Element | Document, recoveryContainer: Element | Document = container): void {\n // Retire committed subscriptions and portals without removing the document shell.\n removeFiber(root.r, false);\n discardPendingWork(root);\n discardPendingEffects(root);\n clearHydrationContainer(recoveryContainer);\n attachRootFiber(root, container);\n root.h = false;\n}\nconst canRecoverHydrationPropMismatch = (node: Node, tag?: string): boolean => ((DOCUMENT_SHELL_TAGS.test(tag!) ||\n !!node.ownerDocument?.head?.contains(node)));\nfunction findHostRecoveryParent(fiber: Fiber): Fiber | null {\n if (fiber.t === FiberTag.Text) {\n let directHost = fiber.p;\n while (directHost && (directHost.t !== FiberTag.Host || !directHost.n)) {\n directHost = directHost.p;\n }\n if (!directHost)\n return null;\n let hasEvent;\n const props = directHost.v ?? directHost.m;\n if (props) {\n for (const k in props) {\n if (k[0] === 'o' && k[1] === 'n' && isFunction(props[k])) {\n hasEvent = true;\n }\n }\n }\n return findNearestSafeHostAboveComposite(hasEvent || directHost.p?.t === FiberTag.Host ? directHost.p : directHost);\n }\n return findNearestSafeHostAboveComposite(fiber.p);\n}\nexport function resumeHydration(fiber: Fiber, root: FiberRoot): (() => void) | undefined {\n if (fiber.b?.p !== true)\n return;\n delete fiber.b.p;\n const previous = root.h;\n root.h = true;\n return () => {\n root.h = previous;\n clearHydrationCursor(fiber);\n };\n}\nexport function tryConsumeBoundary(parent: Fiber): BoundaryInfo | null {\n const cursor = findHostParent(parent).hc;\n if (!cursor)\n return null;\n cursor.skipClaimedMarkers();\n const peek = cursor.n;\n if (!peek || peek.nodeType !== 8)\n return null;\n const data = (peek as Comment).data;\n const m = BOUNDARY_MARKER.exec(data);\n if (!m)\n return null;\n const kind = (m[1] === '$?' || m[1] === '$~') ? 1 : m[1] === '$!' ? 2 : m[1] === '$E' ? 3 : 0;\n const id = Number(m[2]);\n const startMark = peek as Comment;\n // Advance past the start comment\n cursor.n = startMark.nextSibling;\n // Locate end comment: closest <!--/$-->\n let scan = startMark.nextSibling;\n let depth = 0;\n while (scan) {\n if (scan.nodeType === 8) {\n const data = (scan as Comment).data;\n if (BOUNDARY_MARKER.test(data))\n depth++;\n else if (data === '/$' && depth-- === 0)\n return [kind, id, startMark, scan as Comment];\n }\n scan = scan.nextSibling;\n }\n return null;\n}\nfunction queueHydrationFormState(el: Element, props: any, tag: string): void {\n queueMutation(() => {\n if (tag === 'input') {\n const input = el as HTMLInputElement;\n if (props.type != null)\n input.type = props.type;\n const value = props.value ?? props.defaultValue;\n if (value != null && (props.value != null || (input.type !== 'submit' && input.type !== 'reset'))) {\n input.defaultValue = '' + value;\n }\n // Mark checked as dirty before changing its default, including clean SSR\n // inputs whose client default differs. This also preserves radio groups.\n input.checked = input.checked;\n input.defaultChecked = !!(props.checked ?? props.defaultChecked);\n }\n else {\n syncTextareaValue(el as HTMLTextAreaElement, props, true);\n }\n });\n}\nfunction releaseClaims(container: Element | Document): void {\n for (const node of container.querySelectorAll('*'))\n CLAIMED.delete(node);\n}\nfunction clearHydrationContainer(container: Element | Document): void {\n queueMutation(() => clearHostContainer(container));\n}\nexport function advanceCursorPast(parent: Fiber, node: Node): void {\n const cursor = findHostParent(parent).hc;\n if (!cursor)\n return;\n cursor.n = node.nextSibling;\n}\nconst isHydrationFormProp = (tag: string, key: string): boolean => (((/^(input|textarea|select)$/.test(tag) && (key === 'value' || key === 'defaultValue')) ||\n (tag === 'input' && (key === 'checked' || key === 'defaultChecked')) ||\n (tag === 'option' && key === 'selected')));\nfunction hydrationStylesMatch(actual: CSSStyleDeclaration, expected: CSSStyleDeclaration): boolean {\n for (let index = 0; index < expected.length; index++) {\n const property = expected.item(index);\n if (actual.getPropertyValue(property) !== expected.getPropertyValue(property) ||\n actual.getPropertyPriority(property) !== expected.getPropertyPriority(property)) {\n return false;\n }\n }\n return true;\n}\nexport function recoverHydration(root: FiberRoot, error: unknown): boolean {\n if (!isHydrationBailout(error))\n return false;\n const container = root.c as Element | Document;\n const children = root.r.v?.children ?? null;\n const recoveryContainer = getRecoveryContainer(container, error.f);\n resetAfterHydrationFailure(root, container, recoveryContainer);\n if (recoveryContainer !== container) {\n releaseClaims(container);\n root.hr = recoveryContainer;\n beginHydration(root);\n }\n try {\n flushSyncWork(() => renderRoot(root, children));\n }\n catch (clientError) {\n resetAfterHydrationFailure(root, container);\n if (recoverRootError(clientError))\n return true;\n throw clientError;\n }\n finally {\n endHydration(root);\n root.hr = undefined;\n }\n return true;\n}\nconst formatHydrationValue = (value: string | null): string => (value == null ? 'nothing' : JSON.stringify(value));\nexport function deferHydration(fiber: Fiber, thenable: Promise<any>, restartInitial?: boolean): boolean {\n const currentRoot = getCurrentRoot();\n if (!currentRoot?.h)\n return false;\n // Until the initial tree commits, a suspended component's host range is\n // unknown. Stop the pass instead of sharing its cursor with later siblings.\n const hostParent = findHostParent(fiber);\n if (restartInitial && (currentRoot.r.m === null || currentRoot.ri) || hostParent.t === FiberTag.Root)\n throw thenable;\n const inheritedCursor = getHydrationCursor(hostParent);\n if (inheritedCursor)\n setHydrationCursor(fiber, inheritedCursor);\n ((fiber.b ??= {}) as any).p = true;\n let sus: Fiber | null = fiber.p;\n while (sus && sus.t !== FiberTag.Suspense)\n sus = sus.p;\n if (sus && sus.b) {\n ;\n (sus.b as any).a = true;\n }\n const clearAwait = () => {\n if (sus && sus.b) {\n ;\n (sus.b as any).a = false;\n }\n scheduleUpdate(fiber);\n };\n thenable.then(clearAwait, clearAwait);\n return true;\n}\nexport function hydrateRootImpl(container: Element | Document, initialChildren: ReactNode, options: HydrateRootOptions): HydratedRoot {\n const root = createFiberRoot(container, options);\n if (options.formState)\n hydratedFormStates.set(root, {\n value: options.formState[0],\n consume(fiber) {\n const cursor = findHostParent(fiber.p!).hc;\n cursor?.skipClaimedMarkers();\n const marker = cursor?.n;\n if (!marker || marker.nodeType !== 8 || !/^F!?$/.test((marker as Comment).data))\n throw new Error(process.env.NODE_ENV !== 'production' ? 'Missing server form state marker during hydration.' : '');\n cursor!.n = marker.nextSibling;\n return (marker as Comment).data === 'F!';\n },\n });\n let generation = 0;\n let active = true;\n function hydrate(children: ReactNode): void {\n const attempt = ++generation;\n let hydrationError: unknown = null;\n beginHydration(root);\n try {\n flushSyncWork(() => renderRoot(root, children));\n }\n catch (error) {\n hydrationError = error;\n }\n finally {\n endHydration(root);\n }\n if (isThenable(hydrationError)) {\n discardPendingWork(root);\n discardPendingEffects(root);\n const retry = () => {\n if (!active || attempt !== generation)\n return;\n // Preparation was rolled back. The next pass must be able to claim\n // metadata and document siblings that the abandoned pass visited.\n releaseClaims(container);\n hydrate(children);\n };\n hydrationError.then(retry, retry);\n return;\n }\n if (hydrationError && !recoverHydration(root, hydrationError))\n throw hydrationError;\n drainReplayQueue();\n }\n hydrate(initialChildren);\n return {\n render(children) {\n generation++;\n if (root.r.m === null) {\n releaseClaims(container);\n hydrate(children);\n }\n else\n scheduleRootRender(root, () => renderRoot(root, children));\n },\n unmount() {\n active = false;\n generation++;\n const pending = root.r.m === null;\n flushSyncWork(() => {\n renderRoot(root, null);\n if (pending)\n clearHydrationContainer(container);\n });\n },\n };\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,gBAAgB,yBAAyB;AAClD,SAAS,wBAAwB;AACjC,SAAS,iBAAiB,uBAAuB;AACjD,SAAS,gBAAgB,eAAe;AACxC,SAAS,eAAe,gBAAgB,4BAA4B;AACpE,SAAS,gBAAgB,gBAAgB,oBAAoB,uBAAuB,YAAY,UAAU,eAAe,YAAY,oBAAoB,kBAAkB,mBAAmB;AAC9L,SAAS,YAAY,sBAAsB;AAC3C,SAAS,oBAAoB,wBAAwB,oBAAoB,2BAA2B;AACpG,SAAS,sBAAsB;AAC/B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