@replohq/canopy-sdk 2.6.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_vendor/replo-utils/lib/fonts.mjs +1 -0
- package/_vendor/replo-utils/lib/geometry.mjs +2 -0
- package/_vendor/replo-utils/lib/json.mjs +1 -0
- package/_vendor/replo-utils/lib/misc.mjs +1 -0
- package/_vendor/replo-utils/lib/posthogReplay.mjs +2 -0
- package/_vendor/replo-utils/lib/url.mjs +1 -0
- package/_vendor/replo-utils/react/use-iframe-rpc-channel.mjs +1 -1
- package/_vendor/schemas/designLibrary.mjs +1 -1
- package/_vendor/schemas/generated/consent.d.ts +2 -0
- package/_vendor/schemas/generated/selectModeIframeRpc.d.ts +8 -0
- package/_vendor/schemas/iframeRpcChannel.mjs +2 -1
- package/_vendor/schemas/loaderKeys.d.ts +1 -1
- package/_vendor/schemas/loaderKeys.mjs +103 -23
- package/_vendor/schemas/money.mjs +1860 -3
- package/_vendor/schemas/pageAnnotations.mjs +1 -1
- package/_vendor/schemas/routing/match.mjs +1 -0
- package/_vendor/schemas/routing/rules.mjs +2 -1
- package/_vendor/schemas/selectMode.d.ts +4 -4
- package/_vendor/schemas/selectMode.mjs +1 -0
- package/_vendor/schemas/selectModeIframeRpc.d.ts +25 -5
- package/_vendor/schemas/selectModeIframeRpc.mjs +12 -3
- package/analytics/analytics-provider.d.ts +5 -10
- package/analytics/analytics-provider.js +14 -101
- package/analytics/analytics-provider.js.map +2 -2
- package/analytics/get-analytics-sinks.d.ts +2 -19
- package/analytics/get-analytics-sinks.js +9 -46
- package/analytics/get-analytics-sinks.js.map +2 -2
- package/analytics/hooks/use-product-viewed-analytics.d.ts +2 -6
- package/analytics/hooks/use-product-viewed-analytics.js +6 -28
- package/analytics/hooks/use-product-viewed-analytics.js.map +2 -2
- package/analytics/replo-first-party-pixel.d.ts +3 -12
- package/analytics/replo-first-party-pixel.js +8 -24
- package/analytics/replo-first-party-pixel.js.map +2 -2
- package/analytics/replo-pixel-script.d.ts +4 -10
- package/analytics/replo-pixel-script.js +9 -23
- package/analytics/replo-pixel-script.js.map +2 -2
- package/analytics/sinks/ga4-sink.d.ts +10 -9
- package/analytics/sinks/ga4-sink.js +99 -50
- package/analytics/sinks/ga4-sink.js.map +2 -2
- package/analytics/sinks/meta-sink.d.ts +5 -4
- package/analytics/sinks/meta-sink.js +82 -29
- package/analytics/sinks/meta-sink.js.map +2 -2
- package/analytics/sinks/pinterest-sink.d.ts +7 -6
- package/analytics/sinks/pinterest-sink.js +82 -49
- package/analytics/sinks/pinterest-sink.js.map +2 -2
- package/analytics/sinks/reddit-sink.d.ts +8 -7
- package/analytics/sinks/reddit-sink.js +82 -53
- package/analytics/sinks/reddit-sink.js.map +2 -2
- package/analytics/sinks/replo-sink.d.ts +9 -8
- package/analytics/sinks/replo-sink.js +89 -37
- package/analytics/sinks/replo-sink.js.map +2 -2
- package/analytics/sinks/snapchat-sink.d.ts +6 -5
- package/analytics/sinks/snapchat-sink.js +82 -40
- package/analytics/sinks/snapchat-sink.js.map +2 -2
- package/analytics/sinks/tiktok-sink.d.ts +8 -7
- package/analytics/sinks/tiktok-sink.js +82 -52
- package/analytics/sinks/tiktok-sink.js.map +2 -2
- package/analytics/sinks/window-sink.d.ts +11 -14
- package/analytics/sinks/window-sink.js +101 -28
- package/analytics/sinks/window-sink.js.map +2 -2
- package/analytics/utils/analytics-utils.d.ts +4 -2
- package/analytics/utils/analytics-utils.js +19 -123
- package/analytics/utils/analytics-utils.js.map +2 -2
- package/analytics/utils/navigation-tracker.d.ts +2 -1
- package/analytics/utils/navigation-tracker.js +37 -30
- package/analytics/utils/navigation-tracker.js.map +2 -2
- package/analytics/utils/shopify-funnel-gate.d.ts +2 -7
- package/analytics/utils/shopify-funnel-gate.js +8 -15
- package/analytics/utils/shopify-funnel-gate.js.map +2 -2
- package/cart/buy-now-action.d.ts +2 -9
- package/cart/buy-now-action.js +5 -97
- package/cart/buy-now-action.js.map +2 -2
- package/cart/cart-actions.d.ts +12 -56
- package/cart/cart-actions.js +88 -68
- package/cart/cart-actions.js.map +2 -2
- package/cart/cart-loader.d.ts +3 -9
- package/cart/cart-loader.js +14 -6
- package/cart/cart-loader.js.map +2 -2
- package/cart/cart-provider.d.ts +6 -58
- package/cart/cart-provider.js +13 -359
- package/cart/cart-provider.js.map +3 -3
- package/cart/cart-schema.d.ts +2 -1
- package/cart/cart-schema.js +12 -64
- package/cart/cart-schema.js.map +2 -2
- package/cart/cart-types.d.ts +1 -1
- package/cart/cart-types.js +5 -4
- package/cart/cart-types.js.map +2 -2
- package/cart/gateways/cart-constants.d.ts +1 -0
- package/cart/gateways/cart-constants.js.map +2 -2
- package/cart/gateways/cart-gateway.d.ts +1 -0
- package/cart/gateways/cart-gateway.js +13 -12
- package/cart/gateways/cart-gateway.js.map +2 -2
- package/cart/gateways/cookie-cart-gateway.d.ts +8 -11
- package/cart/gateways/cookie-cart-gateway.js +93 -97
- package/cart/gateways/cookie-cart-gateway.js.map +2 -2
- package/cart/gateways/default-cart-gateway.d.ts +10 -16
- package/cart/gateways/default-cart-gateway.js +13 -23
- package/cart/gateways/default-cart-gateway.js.map +2 -2
- package/cart/gateways/resolver-cart-gateway.d.ts +1 -0
- package/cart/gateways/resolver-cart-gateway.js +13 -102
- package/cart/gateways/resolver-cart-gateway.js.map +2 -2
- package/cart/gateways/stripe-cart-gateway.d.ts +10 -16
- package/cart/gateways/stripe-cart-gateway.js +13 -21
- package/cart/gateways/stripe-cart-gateway.js.map +2 -2
- package/cart/hooks/use-add-to-cart.d.ts +3 -47
- package/cart/hooks/use-add-to-cart.js +10 -115
- package/cart/hooks/use-add-to-cart.js.map +2 -2
- package/cart/hooks/use-buy-now.d.ts +1 -39
- package/cart/hooks/use-buy-now.js +5 -55
- package/cart/hooks/use-buy-now.js.map +2 -2
- package/cart/utils/cart-utils.d.ts +8 -35
- package/cart/utils/cart-utils.js +21 -35
- package/cart/utils/cart-utils.js.map +2 -2
- package/cart/utils/cookie-cart-persistence.d.ts +16 -41
- package/cart/utils/cookie-cart-persistence.js +38 -143
- package/cart/utils/cookie-cart-persistence.js.map +2 -2
- package/cart/utils/variant-to-cart-line.d.ts +12 -42
- package/cart/utils/variant-to-cart-line.js +31 -147
- package/cart/utils/variant-to-cart-line.js.map +2 -2
- package/chunk-UJCSKKID.mjs +27 -0
- package/{chunk-OFU2QEDR.mjs → chunk-ZZPQ3E7S.mjs} +50 -5
- package/consent/consent-action.d.ts +2 -1
- package/consent/consent-action.js +10 -20
- package/consent/consent-action.js.map +2 -2
- package/consent/consent-actions.d.ts +2 -13
- package/consent/consent-actions.js +9 -29
- package/consent/consent-actions.js.map +2 -2
- package/consent/consent-store.d.ts +9 -36
- package/consent/consent-store.js +12 -182
- package/consent/consent-store.js.map +2 -2
- package/consent/cookie.d.ts +9 -12
- package/consent/cookie.js +32 -64
- package/consent/cookie.js.map +2 -2
- package/consent/replo-scripts.d.ts +5 -18
- package/consent/replo-scripts.js +11 -94
- package/consent/replo-scripts.js.map +2 -2
- package/consent/script-registration-store.d.ts +6 -2
- package/consent/script-registration-store.js +33 -47
- package/consent/script-registration-store.js.map +2 -2
- package/consent/script-snippets.d.ts +4 -18
- package/consent/script-snippets.js +19 -127
- package/consent/script-snippets.js.map +2 -2
- package/consent/window-api.d.ts +4 -15
- package/consent/window-api.js +8 -63
- package/consent/window-api.js.map +2 -2
- package/editor/ClientErrorBoundary.d.ts +4 -10
- package/editor/ClientErrorBoundary.js +7 -55
- package/editor/ClientErrorBoundary.js.map +2 -2
- package/editor/DocumentReadyBeacon.d.ts +3 -1
- package/editor/DocumentReadyBeacon.js +6 -3
- package/editor/DocumentReadyBeacon.js.map +2 -2
- package/editor/LinkInterceptor.d.ts +1 -0
- package/editor/LinkInterceptor.js +6 -121
- package/editor/LinkInterceptor.js.map +2 -2
- package/editor/NextErrorReporter.d.ts +1 -0
- package/editor/NextErrorReporter.js +6 -85
- package/editor/NextErrorReporter.js.map +2 -2
- package/editor/annotations/AnnotationLayerMount.d.ts +1 -0
- package/editor/annotations/AnnotationLayerMount.js +6 -6
- package/editor/annotations/AnnotationLayerMount.js.map +2 -2
- package/editor/annotations/annotationController.d.ts +1 -0
- package/editor/annotations/annotationController.js +6 -378
- package/editor/annotations/annotationController.js.map +2 -2
- package/editor/annotations/bridgeGate.d.ts +4 -7
- package/editor/annotations/bridgeGate.js +13 -15
- package/editor/annotations/bridgeGate.js.map +2 -2
- package/editor/design-library-preview/DesignLibraryPreview.d.ts +1 -0
- package/editor/design-library-preview/DesignLibraryPreview.js +6 -86
- package/editor/design-library-preview/DesignLibraryPreview.js.map +2 -2
- package/editor/posthog-relay.d.ts +1 -10
- package/editor/posthog-relay.js +6 -65
- package/editor/posthog-relay.js.map +2 -2
- package/editor/select-mode/EditorSelection.d.ts +1 -23
- package/editor/select-mode/EditorSelection.js +5 -87
- package/editor/select-mode/EditorSelection.js.map +2 -2
- package/editor/select-mode/annotationFrames.d.ts +9 -9
- package/editor/select-mode/annotationFrames.js +22 -103
- package/editor/select-mode/annotationFrames.js.map +2 -2
- package/editor/select-mode/descriptor/elementDescriptor.d.ts +6 -21
- package/editor/select-mode/descriptor/elementDescriptor.js +19 -192
- package/editor/select-mode/descriptor/elementDescriptor.js.map +3 -3
- package/editor/select-mode/descriptor/styleExtraction.d.ts +4 -2
- package/editor/select-mode/descriptor/styleExtraction.js +11 -262
- package/editor/select-mode/descriptor/styleExtraction.js.map +2 -2
- package/editor/select-mode/displayModeStore.d.ts +2 -0
- package/editor/select-mode/displayModeStore.js +14 -39
- package/editor/select-mode/displayModeStore.js.map +2 -2
- package/editor/select-mode/fast-refresh-relay.d.ts +2 -1
- package/editor/select-mode/fast-refresh-relay.js +7 -28
- package/editor/select-mode/fast-refresh-relay.js.map +2 -2
- package/editor/select-mode/fiber.d.ts +14 -7
- package/editor/select-mode/fiber.js +40 -286
- package/editor/select-mode/fiber.js.map +2 -2
- package/editor/select-mode/hooks/useCrosshairCursor.d.ts +2 -9
- package/editor/select-mode/hooks/useCrosshairCursor.js +7 -15
- package/editor/select-mode/hooks/useCrosshairCursor.js.map +2 -2
- package/editor/select-mode/hooks/useEditModeStateMachine.d.ts +5 -3
- package/editor/select-mode/hooks/useEditModeStateMachine.js +13 -228
- package/editor/select-mode/hooks/useEditModeStateMachine.js.map +2 -2
- package/editor/select-mode/hooks/useOptimisticOverrides.d.ts +2 -1
- package/editor/select-mode/hooks/useOptimisticOverrides.js +6 -277
- package/editor/select-mode/hooks/useOptimisticOverrides.js.map +2 -2
- package/editor/select-mode/hooks/useParentMessaging.d.ts +2 -20
- package/editor/select-mode/hooks/useParentMessaging.js +7 -69
- package/editor/select-mode/hooks/useParentMessaging.js.map +2 -2
- package/editor/select-mode/hooks/useSelectModeController.d.ts +2 -1
- package/editor/select-mode/hooks/useSelectModeController.js +6 -40
- package/editor/select-mode/hooks/useSelectModeController.js.map +2 -2
- package/editor/select-mode/hooks/useSelectionHover.d.ts +2 -16
- package/editor/select-mode/hooks/useSelectionHover.js +7 -105
- package/editor/select-mode/hooks/useSelectionHover.js.map +2 -2
- package/editor/select-mode/hooks/useSelectionInteractions.d.ts +2 -26
- package/editor/select-mode/hooks/useSelectionInteractions.js +7 -348
- package/editor/select-mode/hooks/useSelectionInteractions.js.map +2 -2
- package/editor/select-mode/hooks/useSelectionScrollSync.d.ts +2 -22
- package/editor/select-mode/hooks/useSelectionScrollSync.js +7 -65
- package/editor/select-mode/hooks/useSelectionScrollSync.js.map +2 -2
- package/editor/select-mode/hooks/useSiblingResolution.d.ts +4 -2
- package/editor/select-mode/hooks/useSiblingResolution.js +13 -52
- package/editor/select-mode/hooks/useSiblingResolution.js.map +2 -2
- package/editor/select-mode/iframeRpcChannel.d.ts +10 -349
- package/editor/select-mode/iframeRpcChannel.js +23 -79
- package/editor/select-mode/iframeRpcChannel.js.map +2 -2
- package/editor/select-mode/inlineTextMarks.d.ts +4 -6
- package/editor/select-mode/inlineTextMarks.js +13 -18
- package/editor/select-mode/inlineTextMarks.js.map +2 -2
- package/editor/select-mode/interactions/selectionGeometry.d.ts +19 -61
- package/editor/select-mode/interactions/selectionGeometry.js +57 -165
- package/editor/select-mode/interactions/selectionGeometry.js.map +2 -2
- package/editor/select-mode/selectModeSession.d.ts +1 -0
- package/editor/select-mode/selectModeSession.js +6 -3
- package/editor/select-mode/selectModeSession.js.map +2 -2
- package/editor/select-mode/selectionFrame.d.ts +9 -60
- package/editor/select-mode/selectionFrame.js +28 -116
- package/editor/select-mode/selectionFrame.js.map +2 -2
- package/editor/select-mode/symbolicate.d.ts +2 -1
- package/editor/select-mode/symbolicate.js +7 -195
- package/editor/select-mode/symbolicate.js.map +2 -2
- package/editor/select-mode/tiptapInlineEditor.d.ts +15 -2
- package/editor/select-mode/tiptapInlineEditor.js +6 -114
- package/editor/select-mode/tiptapInlineEditor.js.map +2 -2
- package/env.d.ts +2 -1
- package/env.js +10 -37
- package/env.js.map +2 -2
- package/gateways/canopy-api.d.ts +15 -12
- package/gateways/canopy-api.js +122 -160
- package/gateways/canopy-api.js.map +2 -2
- package/hooks/use-client-value.d.ts +2 -10
- package/hooks/use-client-value.js +10 -7
- package/hooks/use-client-value.js.map +2 -2
- package/hooks/use-formatted-price.d.ts +1 -14
- package/hooks/use-formatted-price.js +6 -14
- package/hooks/use-formatted-price.js.map +2 -2
- package/lib/canopy-error.d.ts +2 -5
- package/lib/canopy-error.js +10 -14
- package/lib/canopy-error.js.map +2 -2
- package/lib/get-query-client.d.ts +2 -1
- package/lib/get-query-client.js +8 -27
- package/lib/get-query-client.js.map +2 -2
- package/lib/integration-utils.d.ts +1 -0
- package/lib/integration-utils.js +9 -3
- package/lib/integration-utils.js.map +2 -2
- package/lib/shopify-utils.d.ts +2 -10
- package/lib/shopify-utils.js +10 -2
- package/lib/shopify-utils.js.map +2 -2
- package/lib/tombstone.d.ts +21 -0
- package/lib/tombstone.js +99 -0
- package/lib/tombstone.js.map +7 -0
- package/lib/url-utils.d.ts +2 -4
- package/lib/url-utils.js +10 -3
- package/lib/url-utils.js.map +2 -2
- package/loaders/collection-loader.d.ts +3 -2
- package/loaders/collection-loader.js +5 -48
- package/loaders/collection-loader.js.map +2 -2
- package/loaders/collection-products-loader.d.ts +3 -2
- package/loaders/collection-products-loader.js +5 -51
- package/loaders/collection-products-loader.js.map +2 -2
- package/loaders/contentful-entries-loader.d.ts +3 -2
- package/loaders/contentful-entries-loader.js +5 -71
- package/loaders/contentful-entries-loader.js.map +2 -2
- package/loaders/contentful-entry-loader.d.ts +3 -2
- package/loaders/contentful-entry-loader.js +5 -53
- package/loaders/contentful-entry-loader.js.map +2 -2
- package/loaders/invoke-loader-action.d.ts +2 -8
- package/loaders/invoke-loader-action.js +13 -8
- package/loaders/invoke-loader-action.js.map +2 -2
- package/loaders/invoke-loader-server.d.ts +2 -14
- package/loaders/invoke-loader-server.js +12 -34
- package/loaders/invoke-loader-server.js.map +2 -2
- package/loaders/invoke-loader.d.ts +6 -12
- package/loaders/invoke-loader.js +27 -29
- package/loaders/invoke-loader.js.map +2 -2
- package/loaders/levanta-product-loader.d.ts +3 -2
- package/loaders/levanta-product-loader.js +5 -46
- package/loaders/levanta-product-loader.js.map +2 -2
- package/loaders/loader-error-boundary.d.ts +9 -15
- package/loaders/loader-error-boundary.js +50 -13
- package/loaders/loader-error-boundary.js.map +2 -2
- package/loaders/loader-keys.d.ts +4 -12
- package/loaders/loader-keys.js +6 -1
- package/loaders/loader-keys.js.map +2 -2
- package/loaders/loader-schemas.d.ts +142 -61
- package/loaders/loader-schemas.js +253 -90
- package/loaders/loader-schemas.js.map +2 -2
- package/loaders/metaobject-loader.d.ts +3 -2
- package/loaders/metaobject-loader.js +5 -47
- package/loaders/metaobject-loader.js.map +2 -2
- package/loaders/metaobjects-loader.d.ts +3 -2
- package/loaders/metaobjects-loader.js +5 -53
- package/loaders/metaobjects-loader.js.map +2 -2
- package/loaders/okendo-review-aggregate-loader.d.ts +9 -10
- package/loaders/okendo-review-aggregate-loader.js +5 -49
- package/loaders/okendo-review-aggregate-loader.js.map +2 -2
- package/loaders/okendo-reviews-loader.d.ts +8 -16
- package/loaders/okendo-reviews-loader.js +5 -47
- package/loaders/okendo-reviews-loader.js.map +2 -2
- package/loaders/prefetch-loaders.d.ts +4 -26
- package/loaders/prefetch-loaders.js +5 -40
- package/loaders/prefetch-loaders.js.map +2 -2
- package/loaders/preview-placeholder.d.ts +8 -22
- package/loaders/preview-placeholder.js +47 -209
- package/loaders/preview-placeholder.js.map +2 -2
- package/loaders/product-loader-args.d.ts +2 -11
- package/loaders/product-loader-args.js +6 -12
- package/loaders/product-loader-args.js.map +2 -2
- package/loaders/product-loader.d.ts +3 -2
- package/loaders/product-loader.js +5 -45
- package/loaders/product-loader.js.map +2 -2
- package/loaders/rebuy-recommendations-loader.d.ts +8 -157
- package/loaders/rebuy-recommendations-loader.js +5 -50
- package/loaders/rebuy-recommendations-loader.js.map +2 -2
- package/loaders/reviews-io-review-aggregate-loader.d.ts +5 -4
- package/loaders/reviews-io-review-aggregate-loader.js +5 -36
- package/loaders/reviews-io-review-aggregate-loader.js.map +2 -2
- package/loaders/reviews-io-reviews-loader.d.ts +5 -4
- package/loaders/reviews-io-reviews-loader.js +5 -58
- package/loaders/reviews-io-reviews-loader.js.map +2 -2
- package/loaders/smile-earning-rules-loader.d.ts +10 -11
- package/loaders/smile-earning-rules-loader.js +5 -37
- package/loaders/smile-earning-rules-loader.js.map +2 -2
- package/loaders/smile-rewards-loader.d.ts +10 -11
- package/loaders/smile-rewards-loader.js +5 -37
- package/loaders/smile-rewards-loader.js.map +2 -2
- package/loaders/smile-vip-tiers-loader.d.ts +9 -10
- package/loaders/smile-vip-tiers-loader.js +5 -36
- package/loaders/smile-vip-tiers-loader.js.map +2 -2
- package/loaders/statsig-experiment-loader.d.ts +3 -8
- package/loaders/statsig-experiment-loader.js +5 -74
- package/loaders/statsig-experiment-loader.js.map +2 -2
- package/loaders/vendor-loader-keys.d.ts +4 -0
- package/loaders/vendor-loader-keys.js +9 -0
- package/loaders/vendor-loader-keys.js.map +7 -0
- package/loaders/yotpo-review-aggregate-loader.d.ts +5 -4
- package/loaders/yotpo-review-aggregate-loader.js +5 -43
- package/loaders/yotpo-review-aggregate-loader.js.map +2 -2
- package/loaders/yotpo-reviews-loader.d.ts +5 -4
- package/loaders/yotpo-reviews-loader.js +5 -58
- package/loaders/yotpo-reviews-loader.js.map +2 -2
- package/money.d.ts +9 -9
- package/money.js +25 -6
- package/money.js.map +2 -2
- package/next/config.d.ts +3 -1
- package/next/config.js +11 -85
- package/next/config.js.map +2 -2
- package/next/image-loader.d.ts +2 -1
- package/next/image-loader.js +7 -47
- package/next/image-loader.js.map +2 -2
- package/next/open-next.d.ts +4 -2
- package/next/open-next.js +6 -19
- package/next/open-next.js.map +2 -2
- package/orders/order-status-schema.d.ts +28 -13
- package/orders/order-status-schema.js +45 -13
- package/orders/order-status-schema.js.map +2 -2
- package/orders/order-status.d.ts +2 -8
- package/orders/order-status.js +6 -36
- package/orders/order-status.js.map +2 -2
- package/package.json +1 -12
- package/providers/query-provider.d.ts +3 -1
- package/providers/query-provider.js +10 -6
- package/providers/query-provider.js.map +2 -2
- package/providers/replo-provider.d.ts +3 -1
- package/providers/replo-provider.js +6 -37
- package/providers/replo-provider.js.map +2 -2
- package/routing/evaluate.d.ts +3 -3
- package/routing/evaluate.js +5 -40
- package/routing/evaluate.js.map +2 -2
- package/routing/rules.d.ts +3 -11
- package/routing/rules.js +7 -1
- package/routing/rules.js.map +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../editor/select-mode/descriptor/styleExtraction.ts"],
|
|
4
|
-
"sourcesContent": ["import type {
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import type { SelectModeDefinedStyle } from \"schemas/generated/selectMode\";\n\nimport { canopyTombstoneError } from \"../../../lib/tombstone\";\n\n/** @deprecated Mount SandboxRuntime from @replohq/sandbox-runtime instead. */\nexport function getDefinedStyles(_element: Element): SelectModeDefinedStyle[] {\n throw canopyTombstoneError({\n symbol: \"getDefinedStyles\",\n subpath: \"editor/select-mode/descriptor/styleExtraction\",\n replacement: { kind: \"sandbox-runtime\" },\n });\n}\n\n/** @deprecated Mount SandboxRuntime from @replohq/sandbox-runtime instead. */\nexport function getInheritedStyles(_element: Element): Record<string, string> {\n throw canopyTombstoneError({\n symbol: \"getInheritedStyles\",\n subpath: \"editor/select-mode/descriptor/styleExtraction\",\n replacement: { kind: \"sandbox-runtime\" },\n });\n}\n"],
|
|
5
|
+
"mappings": "AAEA,SAAS,4BAA4B;AAG9B,SAAS,iBAAiB,UAA6C;AAC5E,QAAM,qBAAqB;AAAA,IACzB,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,aAAa,EAAE,MAAM,kBAAkB;AAAA,EACzC,CAAC;AACH;AAGO,SAAS,mBAAmB,UAA2C;AAC5E,QAAM,qBAAqB;AAAA,IACzB,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,aAAa,EAAE,MAAM,kBAAkB;AAAA,EACzC,CAAC;AACH;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { DisplayMode } from "../../_vendor/schemas/generated/selectMode";
|
|
2
|
+
/** @deprecated Mount SandboxRuntime from @replohq/sandbox-runtime instead. */
|
|
2
3
|
export declare const displayModeStore: {
|
|
3
4
|
getSnapshot(): DisplayMode;
|
|
4
5
|
getServerSnapshot(): DisplayMode;
|
|
@@ -7,4 +8,5 @@ export declare const displayModeStore: {
|
|
|
7
8
|
/** Test-only: reset back to the default so specs don't leak state. */
|
|
8
9
|
reset(): void;
|
|
9
10
|
};
|
|
11
|
+
/** @deprecated Mount SandboxRuntime from @replohq/sandbox-runtime instead. */
|
|
10
12
|
export declare function useDisplayMode(): DisplayMode;
|
|
@@ -1,44 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
const displayModeStore = {
|
|
12
|
-
getSnapshot() {
|
|
13
|
-
return displayMode;
|
|
14
|
-
},
|
|
15
|
-
getServerSnapshot() {
|
|
16
|
-
return SERVER_SNAPSHOT;
|
|
17
|
-
},
|
|
18
|
-
subscribe(listener) {
|
|
19
|
-
listeners.add(listener);
|
|
20
|
-
return () => {
|
|
21
|
-
listeners.delete(listener);
|
|
22
|
-
};
|
|
23
|
-
},
|
|
24
|
-
setDisplayMode(nextDisplayMode) {
|
|
25
|
-
if (nextDisplayMode === displayMode) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
displayMode = nextDisplayMode;
|
|
29
|
-
notify();
|
|
30
|
-
},
|
|
31
|
-
/** Test-only: reset back to the default so specs don't leak state. */
|
|
32
|
-
reset() {
|
|
33
|
-
displayMode = "browse";
|
|
34
|
-
}
|
|
35
|
-
};
|
|
2
|
+
import {
|
|
3
|
+
canopyTombstoneError,
|
|
4
|
+
canopyTombstoneObject
|
|
5
|
+
} from "../../lib/tombstone";
|
|
6
|
+
const displayModeStore = canopyTombstoneObject({
|
|
7
|
+
symbol: "displayModeStore",
|
|
8
|
+
subpath: "editor/select-mode/displayModeStore",
|
|
9
|
+
replacement: { kind: "sandbox-runtime" }
|
|
10
|
+
});
|
|
36
11
|
function useDisplayMode() {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
displayModeStore
|
|
40
|
-
|
|
41
|
-
);
|
|
12
|
+
throw canopyTombstoneError({
|
|
13
|
+
symbol: "useDisplayMode",
|
|
14
|
+
subpath: "editor/select-mode/displayModeStore",
|
|
15
|
+
replacement: { kind: "sandbox-runtime" }
|
|
16
|
+
});
|
|
42
17
|
}
|
|
43
18
|
export {
|
|
44
19
|
displayModeStore,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../editor/select-mode/displayModeStore.ts"],
|
|
4
|
-
"sourcesContent": ["\"use client\";\n\nimport type { DisplayMode } from \"schemas/generated/selectMode\";\n\nimport {
|
|
5
|
-
"mappings": ";AAIA
|
|
4
|
+
"sourcesContent": ["\"use client\";\n\nimport type { DisplayMode } from \"schemas/generated/selectMode\";\n\nimport {\n canopyTombstoneError,\n canopyTombstoneObject,\n} from \"../../lib/tombstone\";\n\n/** @deprecated Mount SandboxRuntime from @replohq/sandbox-runtime instead. */\nexport const displayModeStore: {\n getSnapshot(): DisplayMode;\n getServerSnapshot(): DisplayMode;\n subscribe(listener: () => void): () => void;\n setDisplayMode(nextDisplayMode: DisplayMode): void;\n /** Test-only: reset back to the default so specs don't leak state. */\n reset(): void;\n} = canopyTombstoneObject<{\n getSnapshot(): DisplayMode;\n getServerSnapshot(): DisplayMode;\n subscribe(listener: () => void): () => void;\n setDisplayMode(nextDisplayMode: DisplayMode): void;\n /** Test-only: reset back to the default so specs don't leak state. */\n reset(): void;\n}>({\n symbol: \"displayModeStore\",\n subpath: \"editor/select-mode/displayModeStore\",\n replacement: { kind: \"sandbox-runtime\" },\n});\n\n/** @deprecated Mount SandboxRuntime from @replohq/sandbox-runtime instead. */\nexport function useDisplayMode(): DisplayMode {\n throw canopyTombstoneError({\n symbol: \"useDisplayMode\",\n subpath: \"editor/select-mode/displayModeStore\",\n replacement: { kind: \"sandbox-runtime\" },\n });\n}\n"],
|
|
5
|
+
"mappings": ";AAIA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAGA,MAAM,mBAOT,sBAOD;AAAA,EACD,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,aAAa,EAAE,MAAM,kBAAkB;AACzC,CAAC;AAGM,SAAS,iBAA8B;AAC5C,QAAM,qBAAqB;AAAA,IACzB,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,aAAa,EAAE,MAAM,kBAAkB;AAAA,EACzC,CAAC;AACH;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,31 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
if (hasInstalledFastRefreshRelay) {
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
hasInstalledFastRefreshRelay = true;
|
|
12
|
-
const originalLog = console.log;
|
|
13
|
-
const originalInfo = console.info;
|
|
14
|
-
const relayIfFastRefreshComplete = (...args) => {
|
|
15
|
-
const message = args.join(" ");
|
|
16
|
-
if (message.includes("[Fast Refresh] done")) {
|
|
17
|
-
getWebsiteBuilderRpc()?.fastRefreshComplete(void 0);
|
|
18
|
-
onFastRefreshComplete?.();
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
console.log = (...args) => {
|
|
22
|
-
relayIfFastRefreshComplete(...args);
|
|
23
|
-
originalLog(...args);
|
|
24
|
-
};
|
|
25
|
-
console.info = (...args) => {
|
|
26
|
-
relayIfFastRefreshComplete(...args);
|
|
27
|
-
originalInfo(...args);
|
|
28
|
-
};
|
|
1
|
+
import { canopyTombstoneError } from "../../lib/tombstone";
|
|
2
|
+
function installFastRefreshRelay(_args = {}) {
|
|
3
|
+
throw canopyTombstoneError({
|
|
4
|
+
symbol: "installFastRefreshRelay",
|
|
5
|
+
subpath: "editor/select-mode/fast-refresh-relay",
|
|
6
|
+
replacement: { kind: "sandbox-runtime" }
|
|
7
|
+
});
|
|
29
8
|
}
|
|
30
9
|
export {
|
|
31
10
|
installFastRefreshRelay
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../editor/select-mode/fast-refresh-relay.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["/* oxlint-disable replo/no-void-return-type -- Tombstone declarations preserve exact return types for consumer compatibility. */\nimport { canopyTombstoneError } from \"../../lib/tombstone\";\n\n/** @deprecated Mount SandboxRuntime from @replohq/sandbox-runtime instead. */\nexport function installFastRefreshRelay(\n _args: {\n onComplete?: () => void;\n } = {},\n): void {\n throw canopyTombstoneError({\n symbol: \"installFastRefreshRelay\",\n subpath: \"editor/select-mode/fast-refresh-relay\",\n replacement: { kind: \"sandbox-runtime\" },\n });\n}\n"],
|
|
5
|
+
"mappings": "AACA,SAAS,4BAA4B;AAG9B,SAAS,wBACd,QAEI,CAAC,GACC;AACN,QAAM,qBAAqB;AAAA,IACzB,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,aAAa,EAAE,MAAM,kBAAkB;AAAA,EACzC,CAAC;AACH;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -14,29 +14,36 @@ export interface ReactFiber {
|
|
|
14
14
|
memoizedProps?: Record<string, unknown>;
|
|
15
15
|
pendingProps?: Record<string, unknown>;
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
export declare function
|
|
19
|
-
|
|
17
|
+
/** @deprecated Mount SandboxRuntime from @replohq/sandbox-runtime instead. */
|
|
18
|
+
export declare function getFiberFromElement(_element: HTMLElement): ReactFiber | null;
|
|
19
|
+
/** @deprecated Mount SandboxRuntime from @replohq/sandbox-runtime instead. */
|
|
20
|
+
export declare function getComponentName(_fiber: ReactFiber | null | undefined): string | undefined;
|
|
21
|
+
/** @deprecated Mount SandboxRuntime from @replohq/sandbox-runtime instead. */
|
|
22
|
+
export declare function findDebugSource(_fiber: ReactFiber, _maxDepth?: number): {
|
|
20
23
|
source: ReactFiber["_debugSource"];
|
|
21
24
|
componentName?: string;
|
|
22
25
|
} | null;
|
|
23
|
-
|
|
26
|
+
/** @deprecated Mount SandboxRuntime from @replohq/sandbox-runtime instead. */
|
|
27
|
+
export declare function findDebugSourceReact19(_fiber: ReactFiber): {
|
|
24
28
|
source: ReactFiber["_debugSource"];
|
|
25
29
|
componentName?: string;
|
|
26
30
|
} | null;
|
|
27
|
-
|
|
31
|
+
/** @deprecated Mount SandboxRuntime from @replohq/sandbox-runtime instead. */
|
|
32
|
+
export declare function getSourceLocation(_element: HTMLElement): {
|
|
28
33
|
filePath: string;
|
|
29
34
|
lineNumber: number;
|
|
30
35
|
columnNumber: number | undefined;
|
|
31
36
|
componentName: string | undefined;
|
|
32
37
|
} | undefined;
|
|
33
|
-
|
|
38
|
+
/** @deprecated Mount SandboxRuntime from @replohq/sandbox-runtime instead. */
|
|
39
|
+
export declare function getHostSourceIdentity(_element: HTMLElement): {
|
|
34
40
|
filePath: string;
|
|
35
41
|
lineNumber: number;
|
|
36
42
|
columnNumber: number | undefined;
|
|
37
43
|
tagName: string;
|
|
38
44
|
} | null;
|
|
39
|
-
|
|
45
|
+
/** @deprecated Mount SandboxRuntime from @replohq/sandbox-runtime instead. */
|
|
46
|
+
export declare function getFiberChain(_element: HTMLElement): {
|
|
40
47
|
sourceLocation: {
|
|
41
48
|
filePath: string;
|
|
42
49
|
lineNumber: number;
|
|
@@ -1,298 +1,52 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
/react.*jsx-runtime/,
|
|
8
|
-
/react-dom\//,
|
|
9
|
-
/react\/cjs\/react\./,
|
|
10
|
-
/react-server-dom/,
|
|
11
|
-
/react_server_dom/,
|
|
12
|
-
/next[/_.]dist[/_.]compiled/,
|
|
13
|
-
/\/node_modules\/(next|react|react-dom)\//
|
|
14
|
-
];
|
|
15
|
-
function isReactInternalFrame(fileName) {
|
|
16
|
-
return REACT_INTERNAL_FRAME_PATTERNS.some((pattern) => {
|
|
17
|
-
return pattern.test(fileName);
|
|
1
|
+
import { canopyTombstoneError } from "../../lib/tombstone";
|
|
2
|
+
function getFiberFromElement(_element) {
|
|
3
|
+
throw canopyTombstoneError({
|
|
4
|
+
symbol: "getFiberFromElement",
|
|
5
|
+
subpath: "editor/select-mode/fiber",
|
|
6
|
+
replacement: { kind: "sandbox-runtime" }
|
|
18
7
|
});
|
|
19
8
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
];
|
|
26
|
-
function isReactInternalMethod(methodName) {
|
|
27
|
-
if (!methodName) {
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
|
-
return REACT_INTERNAL_METHOD_PATTERNS.some((pattern) => {
|
|
31
|
-
return pattern.test(methodName);
|
|
9
|
+
function getComponentName(_fiber) {
|
|
10
|
+
throw canopyTombstoneError({
|
|
11
|
+
symbol: "getComponentName",
|
|
12
|
+
subpath: "editor/select-mode/fiber",
|
|
13
|
+
replacement: { kind: "sandbox-runtime" }
|
|
32
14
|
});
|
|
33
15
|
}
|
|
34
|
-
function
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const stack = debugStack.stack;
|
|
40
|
-
if (typeof stack === "string") {
|
|
41
|
-
stackText = stack;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
if (!stackText) {
|
|
45
|
-
return null;
|
|
46
|
-
}
|
|
47
|
-
for (const rawLine of stackText.split("\n")) {
|
|
48
|
-
const line = rawLine.trim();
|
|
49
|
-
if (!line) {
|
|
50
|
-
continue;
|
|
51
|
-
}
|
|
52
|
-
const framedMatch = line.match(/^at\s+(.+?)\s+\((.*):(\d+):(\d+)\)$/);
|
|
53
|
-
const stackFrameMatch = framedMatch ?? line.match(/^at\s+(?:.*\()?(.*):(\d+):(\d+)\)?$/) ?? line.match(/^(.*):(\d+):(\d+)$/);
|
|
54
|
-
if (!stackFrameMatch) {
|
|
55
|
-
continue;
|
|
56
|
-
}
|
|
57
|
-
const methodName = framedMatch ? framedMatch[1].trim() : null;
|
|
58
|
-
const fileOffset = framedMatch ? 2 : 1;
|
|
59
|
-
const fileName = stackFrameMatch[fileOffset]?.trim();
|
|
60
|
-
const lineNumber = Number.parseInt(
|
|
61
|
-
stackFrameMatch[fileOffset + 1] ?? "",
|
|
62
|
-
10
|
|
63
|
-
);
|
|
64
|
-
const columnNumber = Number.parseInt(
|
|
65
|
-
stackFrameMatch[fileOffset + 2] ?? "",
|
|
66
|
-
10
|
|
67
|
-
);
|
|
68
|
-
if (!fileName || !Number.isFinite(lineNumber) || !Number.isFinite(columnNumber)) {
|
|
69
|
-
continue;
|
|
70
|
-
}
|
|
71
|
-
if (isReactInternalFrame(fileName) || isReactInternalMethod(methodName)) {
|
|
72
|
-
continue;
|
|
73
|
-
}
|
|
74
|
-
return {
|
|
75
|
-
fileName,
|
|
76
|
-
lineNumber,
|
|
77
|
-
columnNumber
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
return null;
|
|
81
|
-
}
|
|
82
|
-
function getFiberFromElement(element) {
|
|
83
|
-
if (!element || typeof element !== "object") {
|
|
84
|
-
return null;
|
|
85
|
-
}
|
|
86
|
-
const symbolKeys = Object.getOwnPropertySymbols(element);
|
|
87
|
-
const fiberSymbolKey = symbolKeys.find((symbolKey) => {
|
|
88
|
-
return symbolKey.toString().includes("reactFiber");
|
|
89
|
-
});
|
|
90
|
-
if (fiberSymbolKey) {
|
|
91
|
-
return (
|
|
92
|
-
// Legacy cast - may or may not be necessary
|
|
93
|
-
// eslint-disable-next-line replo/no-as-cast
|
|
94
|
-
element[fiberSymbolKey] ?? null
|
|
95
|
-
);
|
|
96
|
-
}
|
|
97
|
-
const keys = Object.keys(element);
|
|
98
|
-
const fiberKey = keys.find((key) => key.startsWith("__reactFiber$"));
|
|
99
|
-
if (fiberKey) {
|
|
100
|
-
return element[fiberKey] ?? null;
|
|
101
|
-
}
|
|
102
|
-
const instanceKey = keys.find((key) => {
|
|
103
|
-
return key.startsWith("__reactInternalInstance$");
|
|
16
|
+
function findDebugSource(_fiber, _maxDepth = 50) {
|
|
17
|
+
throw canopyTombstoneError({
|
|
18
|
+
symbol: "findDebugSource",
|
|
19
|
+
subpath: "editor/select-mode/fiber",
|
|
20
|
+
replacement: { kind: "sandbox-runtime" }
|
|
104
21
|
});
|
|
105
|
-
if (instanceKey) {
|
|
106
|
-
return (
|
|
107
|
-
// Legacy cast - may or may not be necessary
|
|
108
|
-
// eslint-disable-next-line replo/no-as-cast
|
|
109
|
-
element[instanceKey] ?? null
|
|
110
|
-
);
|
|
111
|
-
}
|
|
112
|
-
const possibleFiberKey = keys.find((key) => {
|
|
113
|
-
if (!key.startsWith("__react")) {
|
|
114
|
-
return false;
|
|
115
|
-
}
|
|
116
|
-
const value = element[key];
|
|
117
|
-
return value && typeof value === "object" && "_debugSource" in value;
|
|
118
|
-
});
|
|
119
|
-
if (possibleFiberKey) {
|
|
120
|
-
return (
|
|
121
|
-
// Legacy cast - may or may not be necessary
|
|
122
|
-
// eslint-disable-next-line replo/no-as-cast
|
|
123
|
-
element[possibleFiberKey] ?? null
|
|
124
|
-
);
|
|
125
|
-
}
|
|
126
|
-
return null;
|
|
127
|
-
}
|
|
128
|
-
function getComponentName(fiber) {
|
|
129
|
-
if (!fiber?.type) {
|
|
130
|
-
return void 0;
|
|
131
|
-
}
|
|
132
|
-
if (typeof fiber.type === "string") {
|
|
133
|
-
return void 0;
|
|
134
|
-
}
|
|
135
|
-
if (typeof fiber.type === "function") {
|
|
136
|
-
return fiber.type.name || void 0;
|
|
137
|
-
}
|
|
138
|
-
if (typeof fiber.type === "object") {
|
|
139
|
-
return fiber.type.displayName ?? fiber.type.name ?? void 0;
|
|
140
|
-
}
|
|
141
|
-
return void 0;
|
|
142
|
-
}
|
|
143
|
-
function findDebugSource(fiber, maxDepth = 50) {
|
|
144
|
-
let current = fiber;
|
|
145
|
-
let depth = 0;
|
|
146
|
-
while (current && depth < maxDepth) {
|
|
147
|
-
if (current._debugSource) {
|
|
148
|
-
return {
|
|
149
|
-
source: current._debugSource,
|
|
150
|
-
componentName: getComponentName(current)
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
if (current._debugOwner?._debugSource) {
|
|
154
|
-
return {
|
|
155
|
-
source: current._debugOwner._debugSource,
|
|
156
|
-
componentName: getComponentName(current._debugOwner)
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
current = current.return;
|
|
160
|
-
depth++;
|
|
161
|
-
}
|
|
162
|
-
return null;
|
|
163
|
-
}
|
|
164
|
-
function findDebugSourceReact19(fiber) {
|
|
165
|
-
let current = fiber;
|
|
166
|
-
let depth = 0;
|
|
167
|
-
const maxDepth = 50;
|
|
168
|
-
while (current && depth < maxDepth) {
|
|
169
|
-
const debugStackSource = parseDebugStackSource(current._debugStack) ?? parseDebugStackSource(current._debugOwner?._debugStack);
|
|
170
|
-
if (debugStackSource) {
|
|
171
|
-
return {
|
|
172
|
-
source: debugStackSource,
|
|
173
|
-
componentName: getComponentName(current)
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
current = current.return;
|
|
177
|
-
depth++;
|
|
178
|
-
}
|
|
179
|
-
return null;
|
|
180
|
-
}
|
|
181
|
-
function getSourceLocation(element) {
|
|
182
|
-
let currentElement = element;
|
|
183
|
-
while (currentElement) {
|
|
184
|
-
const fiber = getFiberFromElement(currentElement);
|
|
185
|
-
if (fiber) {
|
|
186
|
-
const debugInfo = findDebugSource(fiber) ?? findDebugSourceReact19(fiber);
|
|
187
|
-
if (debugInfo?.source) {
|
|
188
|
-
return {
|
|
189
|
-
filePath: debugInfo.source.fileName,
|
|
190
|
-
lineNumber: debugInfo.source.lineNumber,
|
|
191
|
-
columnNumber: debugInfo.source.columnNumber,
|
|
192
|
-
componentName: debugInfo.componentName ?? void 0
|
|
193
|
-
};
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
currentElement = currentElement.parentElement;
|
|
197
|
-
}
|
|
198
|
-
return void 0;
|
|
199
22
|
}
|
|
200
|
-
function
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
}
|
|
207
|
-
function getHostSourceIdentity(element) {
|
|
208
|
-
const fiber = getFiberFromElement(element);
|
|
209
|
-
if (!fiber) {
|
|
210
|
-
return null;
|
|
211
|
-
}
|
|
212
|
-
const source = getDebugSource(fiber);
|
|
213
|
-
if (!source) {
|
|
214
|
-
return null;
|
|
215
|
-
}
|
|
216
|
-
return {
|
|
217
|
-
filePath: source.fileName,
|
|
218
|
-
lineNumber: source.lineNumber,
|
|
219
|
-
columnNumber: source.columnNumber,
|
|
220
|
-
tagName: element.tagName.toLowerCase()
|
|
221
|
-
};
|
|
23
|
+
function findDebugSourceReact19(_fiber) {
|
|
24
|
+
throw canopyTombstoneError({
|
|
25
|
+
symbol: "findDebugSourceReact19",
|
|
26
|
+
subpath: "editor/select-mode/fiber",
|
|
27
|
+
replacement: { kind: "sandbox-runtime" }
|
|
28
|
+
});
|
|
222
29
|
}
|
|
223
|
-
function
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
}
|
|
230
|
-
if (Array.isArray(value)) {
|
|
231
|
-
return value.slice(0, 20).map(getSerializablePropValue);
|
|
232
|
-
}
|
|
233
|
-
if (typeof value === "object") {
|
|
234
|
-
return "[object]";
|
|
235
|
-
}
|
|
236
|
-
return void 0;
|
|
30
|
+
function getSourceLocation(_element) {
|
|
31
|
+
throw canopyTombstoneError({
|
|
32
|
+
symbol: "getSourceLocation",
|
|
33
|
+
subpath: "editor/select-mode/fiber",
|
|
34
|
+
replacement: { kind: "sandbox-runtime" }
|
|
35
|
+
});
|
|
237
36
|
}
|
|
238
|
-
function
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
0,
|
|
245
|
-
MAX_SERIALIZED_PROP_COUNT
|
|
246
|
-
)) {
|
|
247
|
-
if (key === "children" || key === "ref" || key.startsWith("on") || typeof value === "function" || typeof value === "symbol") {
|
|
248
|
-
continue;
|
|
249
|
-
}
|
|
250
|
-
const serializableValue = getSerializablePropValue(value);
|
|
251
|
-
if (serializableValue !== void 0) {
|
|
252
|
-
serializedProps[key] = serializableValue;
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
return Object.keys(serializedProps).length > 0 ? serializedProps : void 0;
|
|
37
|
+
function getHostSourceIdentity(_element) {
|
|
38
|
+
throw canopyTombstoneError({
|
|
39
|
+
symbol: "getHostSourceIdentity",
|
|
40
|
+
subpath: "editor/select-mode/fiber",
|
|
41
|
+
replacement: { kind: "sandbox-runtime" }
|
|
42
|
+
});
|
|
256
43
|
}
|
|
257
|
-
function getFiberChain(
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
while (currentFiber && depth < MAX_FIBER_CHAIN_DEPTH) {
|
|
264
|
-
const source = getDebugSource(currentFiber);
|
|
265
|
-
if (source) {
|
|
266
|
-
const tagName = getTagName(currentFiber);
|
|
267
|
-
const componentName = getComponentName(currentFiber);
|
|
268
|
-
const key = [
|
|
269
|
-
source.fileName,
|
|
270
|
-
source.lineNumber,
|
|
271
|
-
source.columnNumber ?? "",
|
|
272
|
-
tagName ?? "",
|
|
273
|
-
componentName ?? ""
|
|
274
|
-
].join(":");
|
|
275
|
-
if (!seenKeys.has(key)) {
|
|
276
|
-
seenKeys.add(key);
|
|
277
|
-
fiberChain.push({
|
|
278
|
-
sourceLocation: {
|
|
279
|
-
filePath: source.fileName,
|
|
280
|
-
lineNumber: source.lineNumber,
|
|
281
|
-
columnNumber: source.columnNumber,
|
|
282
|
-
componentName
|
|
283
|
-
},
|
|
284
|
-
tagName,
|
|
285
|
-
componentName,
|
|
286
|
-
props: getSerializableProps(
|
|
287
|
-
currentFiber.memoizedProps ?? currentFiber.pendingProps
|
|
288
|
-
)
|
|
289
|
-
});
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
currentFiber = currentFiber.return;
|
|
293
|
-
depth += 1;
|
|
294
|
-
}
|
|
295
|
-
return fiberChain;
|
|
44
|
+
function getFiberChain(_element) {
|
|
45
|
+
throw canopyTombstoneError({
|
|
46
|
+
symbol: "getFiberChain",
|
|
47
|
+
subpath: "editor/select-mode/fiber",
|
|
48
|
+
replacement: { kind: "sandbox-runtime" }
|
|
49
|
+
});
|
|
296
50
|
}
|
|
297
51
|
export {
|
|
298
52
|
findDebugSource,
|