@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,159 +1,9 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
title: z.ZodOptional<z.ZodString>;
|
|
8
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9
|
-
descriptionHtml: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
10
|
-
availableForSale: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
-
status: z.ZodOptional<z.ZodEnum<{
|
|
12
|
-
ACTIVE: "ACTIVE";
|
|
13
|
-
DRAFT: "DRAFT";
|
|
14
|
-
ARCHIVED: "ARCHIVED";
|
|
15
|
-
UNLISTED: "UNLISTED";
|
|
16
|
-
}>>;
|
|
17
|
-
featuredImage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
18
|
-
url: z.ZodString;
|
|
19
|
-
altText: z.ZodNullable<z.ZodString>;
|
|
20
|
-
width: z.ZodNullable<z.ZodNumber>;
|
|
21
|
-
height: z.ZodNullable<z.ZodNumber>;
|
|
22
|
-
}, z.core.$strip>>>;
|
|
23
|
-
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
24
|
-
id: z.ZodOptional<z.ZodString>;
|
|
25
|
-
name: z.ZodString;
|
|
26
|
-
values: z.ZodArray<z.ZodString>;
|
|
27
|
-
optionValues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
28
|
-
id: z.ZodString;
|
|
29
|
-
value: z.ZodString;
|
|
30
|
-
swatch: z.ZodNullable<z.ZodObject<{
|
|
31
|
-
color: z.ZodNullable<z.ZodString>;
|
|
32
|
-
imageUrl: z.ZodNullable<z.ZodString>;
|
|
33
|
-
}, z.core.$strip>>;
|
|
34
|
-
}, z.core.$strip>>>;
|
|
35
|
-
}, z.core.$strip>>>;
|
|
36
|
-
variants: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
37
|
-
id: z.ZodString;
|
|
38
|
-
title: z.ZodOptional<z.ZodString>;
|
|
39
|
-
availableForSale: z.ZodOptional<z.ZodBoolean>;
|
|
40
|
-
sku: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
41
|
-
selectedOptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
42
|
-
name: z.ZodString;
|
|
43
|
-
value: z.ZodString;
|
|
44
|
-
}, z.core.$strip>>>;
|
|
45
|
-
image: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
46
|
-
url: z.ZodString;
|
|
47
|
-
altText: z.ZodNullable<z.ZodString>;
|
|
48
|
-
width: z.ZodNullable<z.ZodNumber>;
|
|
49
|
-
height: z.ZodNullable<z.ZodNumber>;
|
|
50
|
-
}, z.core.$strip>>>;
|
|
51
|
-
price: z.ZodOptional<z.ZodObject<{
|
|
52
|
-
amount: z.ZodString;
|
|
53
|
-
currencyCode: z.ZodString;
|
|
54
|
-
}, z.core.$strip>>;
|
|
55
|
-
compareAtPrice: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
56
|
-
amount: z.ZodString;
|
|
57
|
-
currencyCode: z.ZodString;
|
|
58
|
-
}, z.core.$strip>>>;
|
|
59
|
-
sellingPlanIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
60
|
-
}, z.core.$strip>>>;
|
|
61
|
-
minPrice: z.ZodOptional<z.ZodObject<{
|
|
62
|
-
amount: z.ZodString;
|
|
63
|
-
currencyCode: z.ZodString;
|
|
64
|
-
}, z.core.$strip>>;
|
|
65
|
-
maxPrice: z.ZodOptional<z.ZodObject<{
|
|
66
|
-
amount: z.ZodString;
|
|
67
|
-
currencyCode: z.ZodString;
|
|
68
|
-
}, z.core.$strip>>;
|
|
69
|
-
compareAtMinPrice: z.ZodOptional<z.ZodObject<{
|
|
70
|
-
amount: z.ZodString;
|
|
71
|
-
currencyCode: z.ZodString;
|
|
72
|
-
}, z.core.$strip>>;
|
|
73
|
-
compareAtMaxPrice: z.ZodOptional<z.ZodObject<{
|
|
74
|
-
amount: z.ZodString;
|
|
75
|
-
currencyCode: z.ZodString;
|
|
76
|
-
}, z.core.$strip>>;
|
|
77
|
-
images: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
78
|
-
url: z.ZodString;
|
|
79
|
-
altText: z.ZodNullable<z.ZodString>;
|
|
80
|
-
width: z.ZodNullable<z.ZodNumber>;
|
|
81
|
-
height: z.ZodNullable<z.ZodNumber>;
|
|
82
|
-
}, z.core.$strip>>>;
|
|
83
|
-
media: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
84
|
-
type: z.ZodLiteral<"image">;
|
|
85
|
-
alt: z.ZodNullable<z.ZodString>;
|
|
86
|
-
url: z.ZodString;
|
|
87
|
-
width: z.ZodNullable<z.ZodNumber>;
|
|
88
|
-
height: z.ZodNullable<z.ZodNumber>;
|
|
89
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
90
|
-
type: z.ZodLiteral<"video">;
|
|
91
|
-
alt: z.ZodNullable<z.ZodString>;
|
|
92
|
-
sources: z.ZodArray<z.ZodObject<{
|
|
93
|
-
url: z.ZodString;
|
|
94
|
-
mimeType: z.ZodString;
|
|
95
|
-
format: z.ZodString;
|
|
96
|
-
width: z.ZodNullable<z.ZodNumber>;
|
|
97
|
-
height: z.ZodNullable<z.ZodNumber>;
|
|
98
|
-
}, z.core.$strip>>;
|
|
99
|
-
previewImage: z.ZodNullable<z.ZodObject<{
|
|
100
|
-
alt: z.ZodNullable<z.ZodString>;
|
|
101
|
-
url: z.ZodString;
|
|
102
|
-
width: z.ZodNullable<z.ZodNumber>;
|
|
103
|
-
height: z.ZodNullable<z.ZodNumber>;
|
|
104
|
-
}, z.core.$strip>>;
|
|
105
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
106
|
-
type: z.ZodLiteral<"externalVideo">;
|
|
107
|
-
alt: z.ZodNullable<z.ZodString>;
|
|
108
|
-
embedUrl: z.ZodString;
|
|
109
|
-
host: z.ZodString;
|
|
110
|
-
originUrl: z.ZodString;
|
|
111
|
-
previewImage: z.ZodNullable<z.ZodObject<{
|
|
112
|
-
alt: z.ZodNullable<z.ZodString>;
|
|
113
|
-
url: z.ZodString;
|
|
114
|
-
width: z.ZodNullable<z.ZodNumber>;
|
|
115
|
-
height: z.ZodNullable<z.ZodNumber>;
|
|
116
|
-
}, z.core.$strip>>;
|
|
117
|
-
}, z.core.$strip>], "type">>>;
|
|
118
|
-
vendor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
119
|
-
productType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
120
|
-
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
121
|
-
sellingPlanGroups: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
122
|
-
appId: z.ZodNullable<z.ZodString>;
|
|
123
|
-
options: z.ZodArray<z.ZodObject<{
|
|
124
|
-
name: z.ZodString;
|
|
125
|
-
values: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
126
|
-
}, z.core.$strip>>;
|
|
127
|
-
sellingPlans: z.ZodArray<z.ZodObject<{
|
|
128
|
-
id: z.ZodString;
|
|
129
|
-
name: z.ZodString;
|
|
130
|
-
description: z.ZodNullable<z.ZodString>;
|
|
131
|
-
optionValues: z.ZodArray<z.ZodObject<{
|
|
132
|
-
name: z.ZodOptional<z.ZodString>;
|
|
133
|
-
value: z.ZodString;
|
|
134
|
-
}, z.core.$strip>>;
|
|
135
|
-
priceAdjustments: z.ZodArray<z.ZodObject<{
|
|
136
|
-
value: z.ZodNumber;
|
|
137
|
-
valueType: z.ZodEnum<{
|
|
138
|
-
price: "price";
|
|
139
|
-
percentage: "percentage";
|
|
140
|
-
fixedAmount: "fixedAmount";
|
|
141
|
-
}>;
|
|
142
|
-
}, z.core.$strip>>;
|
|
143
|
-
appId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
144
|
-
price: z.ZodOptional<z.ZodString>;
|
|
145
|
-
externalId: z.ZodNullable<z.ZodString>;
|
|
146
|
-
}, z.core.$strip>>;
|
|
147
|
-
}, z.core.$strip>>>;
|
|
148
|
-
metafields: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
149
|
-
key: z.ZodString;
|
|
150
|
-
namespace: z.ZodString;
|
|
151
|
-
type: z.ZodString;
|
|
152
|
-
value: z.ZodString;
|
|
153
|
-
}, z.core.$strip>>>;
|
|
154
|
-
}, z.core.$strip>>;
|
|
155
|
-
}, z.core.$strip>;
|
|
156
|
-
type RebuyRecommendationsData = z.infer<typeof rebuyRecommendationsOutputSchema>;
|
|
1
|
+
import type { ReactElement, ReactNode } from "react";
|
|
2
|
+
import type { z } from "zod";
|
|
3
|
+
import type { productSchema } from "./loader-schemas";
|
|
4
|
+
type RebuyRecommendationsData = {
|
|
5
|
+
products: z.infer<typeof productSchema>[];
|
|
6
|
+
};
|
|
157
7
|
type RebuyRecommendationsLoaderProps = {
|
|
158
8
|
loaderKey: string;
|
|
159
9
|
shopifyProductIds: string;
|
|
@@ -161,5 +11,6 @@ type RebuyRecommendationsLoaderProps = {
|
|
|
161
11
|
children: (data: RebuyRecommendationsData) => ReactNode;
|
|
162
12
|
fallback?: ReactNode;
|
|
163
13
|
};
|
|
164
|
-
|
|
14
|
+
/** @deprecated Use RebuyRecommendationsLoader from @replohq/sdk/loaders/rebuy-recommendations-loader. */
|
|
15
|
+
export declare function RebuyRecommendationsLoader(_props: RebuyRecommendationsLoaderProps): ReactElement;
|
|
165
16
|
export {};
|
|
@@ -1,55 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { LoaderErrorBoundary } from "./loader-error-boundary";
|
|
8
|
-
import { productSchema } from "./loader-schemas";
|
|
9
|
-
const rebuyRecommendationsOutputSchema = z.object({
|
|
10
|
-
products: z.array(productSchema)
|
|
11
|
-
});
|
|
12
|
-
function RebuyRecommendationsLoaderInner({
|
|
13
|
-
loaderKey,
|
|
14
|
-
shopifyProductIds,
|
|
15
|
-
limit,
|
|
16
|
-
children
|
|
17
|
-
}) {
|
|
18
|
-
const queryResult = useSuspenseQuery({
|
|
19
|
-
queryKey: [loaderKey, { shopifyProductIds, limit }],
|
|
20
|
-
queryFn: async () => {
|
|
21
|
-
const loadedData = await invokeLoader({
|
|
22
|
-
loaderKey,
|
|
23
|
-
args: { shopifyProductIds, limit }
|
|
24
|
-
});
|
|
25
|
-
return rebuyRecommendationsOutputSchema.parse(loadedData);
|
|
26
|
-
}
|
|
2
|
+
import { canopyTombstoneError } from "../lib/tombstone";
|
|
3
|
+
function RebuyRecommendationsLoader(_props) {
|
|
4
|
+
throw canopyTombstoneError({
|
|
5
|
+
symbol: "RebuyRecommendationsLoader",
|
|
6
|
+
subpath: "loaders/rebuy-recommendations-loader"
|
|
27
7
|
});
|
|
28
|
-
return /* @__PURE__ */ jsx(Fragment, { children: children(queryResult.data) });
|
|
29
|
-
}
|
|
30
|
-
function RebuyRecommendationsLoader({
|
|
31
|
-
loaderKey,
|
|
32
|
-
shopifyProductIds,
|
|
33
|
-
limit,
|
|
34
|
-
children,
|
|
35
|
-
fallback
|
|
36
|
-
}) {
|
|
37
|
-
return /* @__PURE__ */ jsx(
|
|
38
|
-
LoaderErrorBoundary,
|
|
39
|
-
{
|
|
40
|
-
fallback: fallback ?? null,
|
|
41
|
-
resetKey: `${loaderKey}:${shopifyProductIds}:${limit ?? ""}`,
|
|
42
|
-
children: /* @__PURE__ */ jsx(Suspense, { fallback: fallback ?? null, children: /* @__PURE__ */ jsx(
|
|
43
|
-
RebuyRecommendationsLoaderInner,
|
|
44
|
-
{
|
|
45
|
-
loaderKey,
|
|
46
|
-
shopifyProductIds,
|
|
47
|
-
limit,
|
|
48
|
-
children
|
|
49
|
-
}
|
|
50
|
-
) })
|
|
51
|
-
}
|
|
52
|
-
);
|
|
53
8
|
}
|
|
54
9
|
export {
|
|
55
10
|
RebuyRecommendationsLoader
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../loaders/rebuy-recommendations-loader.tsx"],
|
|
4
|
-
"sourcesContent": ["\"use client\";\n\nimport type { ReactNode } from \"react\";\
|
|
5
|
-
"mappings": ";
|
|
4
|
+
"sourcesContent": ["\"use client\";\n\nimport type { ReactElement, ReactNode } from \"react\";\nimport type { z } from \"zod\";\nimport type { productSchema } from \"./loader-schemas\";\n\nimport { canopyTombstoneError } from \"../lib/tombstone\";\n\ntype RebuyRecommendationsData = {\n products: z.infer<typeof productSchema>[];\n};\n\ntype RebuyRecommendationsLoaderProps = {\n loaderKey: string;\n shopifyProductIds: string;\n limit?: number;\n children: (data: RebuyRecommendationsData) => ReactNode;\n fallback?: ReactNode;\n};\n\n/** @deprecated Use RebuyRecommendationsLoader from @replohq/sdk/loaders/rebuy-recommendations-loader. */\nexport function RebuyRecommendationsLoader(\n _props: RebuyRecommendationsLoaderProps,\n): ReactElement {\n throw canopyTombstoneError({\n symbol: \"RebuyRecommendationsLoader\",\n subpath: \"loaders/rebuy-recommendations-loader\",\n });\n}\n"],
|
|
5
|
+
"mappings": ";AAMA,SAAS,4BAA4B;AAe9B,SAAS,2BACd,QACc;AACd,QAAM,qBAAqB;AAAA,IACzB,QAAQ;AAAA,IACR,SAAS;AAAA,EACX,CAAC;AACH;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
import { reviewsIoProductReviewAggregateLoaderOutputSchema } from "./loader-schemas";
|
|
1
|
+
import type { ReactElement, ReactNode } from "react";
|
|
2
|
+
import type { z } from "zod";
|
|
3
|
+
import type { reviewsIoProductReviewAggregateLoaderOutputSchema } from "./loader-schemas";
|
|
4
4
|
type ReviewsIoReviewAggregateData = z.infer<typeof reviewsIoProductReviewAggregateLoaderOutputSchema>;
|
|
5
5
|
type ReviewsIoReviewAggregateLoaderProps = {
|
|
6
6
|
loaderKey: string;
|
|
@@ -8,5 +8,6 @@ type ReviewsIoReviewAggregateLoaderProps = {
|
|
|
8
8
|
children: (data: ReviewsIoReviewAggregateData) => ReactNode;
|
|
9
9
|
fallback?: ReactNode;
|
|
10
10
|
};
|
|
11
|
-
|
|
11
|
+
/** @deprecated Use ReviewsIoReviewAggregateLoader from @replohq/sdk/loaders/reviews-io-review-aggregate-loader. */
|
|
12
|
+
export declare function ReviewsIoReviewAggregateLoader(_props: ReviewsIoReviewAggregateLoaderProps): ReactElement;
|
|
12
13
|
export {};
|
|
@@ -1,41 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { reviewsIoProductReviewAggregateLoaderOutputSchema } from "./loader-schemas";
|
|
8
|
-
function ReviewsIoReviewAggregateLoaderInner({
|
|
9
|
-
loaderKey,
|
|
10
|
-
sku,
|
|
11
|
-
children
|
|
12
|
-
}) {
|
|
13
|
-
const args = { sku };
|
|
14
|
-
const { data } = useSuspenseQuery({
|
|
15
|
-
queryKey: [loaderKey, args],
|
|
16
|
-
queryFn: async () => {
|
|
17
|
-
const loadedData = await invokeLoader({ loaderKey, args });
|
|
18
|
-
return reviewsIoProductReviewAggregateLoaderOutputSchema.parse(
|
|
19
|
-
loadedData
|
|
20
|
-
);
|
|
21
|
-
}
|
|
2
|
+
import { canopyTombstoneError } from "../lib/tombstone";
|
|
3
|
+
function ReviewsIoReviewAggregateLoader(_props) {
|
|
4
|
+
throw canopyTombstoneError({
|
|
5
|
+
symbol: "ReviewsIoReviewAggregateLoader",
|
|
6
|
+
subpath: "loaders/reviews-io-review-aggregate-loader"
|
|
22
7
|
});
|
|
23
|
-
return /* @__PURE__ */ jsx(Fragment, { children: children(data) });
|
|
24
|
-
}
|
|
25
|
-
function ReviewsIoReviewAggregateLoader({
|
|
26
|
-
loaderKey,
|
|
27
|
-
sku,
|
|
28
|
-
children,
|
|
29
|
-
fallback
|
|
30
|
-
}) {
|
|
31
|
-
return /* @__PURE__ */ jsx(
|
|
32
|
-
LoaderErrorBoundary,
|
|
33
|
-
{
|
|
34
|
-
fallback: fallback ?? null,
|
|
35
|
-
resetKey: `${loaderKey}:${sku}`,
|
|
36
|
-
children: /* @__PURE__ */ jsx(Suspense, { fallback: fallback ?? null, children: /* @__PURE__ */ jsx(ReviewsIoReviewAggregateLoaderInner, { loaderKey, sku, children }) })
|
|
37
|
-
}
|
|
38
|
-
);
|
|
39
8
|
}
|
|
40
9
|
export {
|
|
41
10
|
ReviewsIoReviewAggregateLoader
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../loaders/reviews-io-review-aggregate-loader.tsx"],
|
|
4
|
-
"sourcesContent": ["\"use client\";\n\nimport type { ReactNode } from \"react\";\
|
|
5
|
-
"mappings": ";
|
|
4
|
+
"sourcesContent": ["\"use client\";\n\nimport type { ReactElement, ReactNode } from \"react\";\nimport type { z } from \"zod\";\nimport type { reviewsIoProductReviewAggregateLoaderOutputSchema } from \"./loader-schemas\";\n\nimport { canopyTombstoneError } from \"../lib/tombstone\";\n\ntype ReviewsIoReviewAggregateData = z.infer<\n typeof reviewsIoProductReviewAggregateLoaderOutputSchema\n>;\n\ntype ReviewsIoReviewAggregateLoaderProps = {\n loaderKey: string;\n sku: string;\n children: (data: ReviewsIoReviewAggregateData) => ReactNode;\n fallback?: ReactNode;\n};\n\n/** @deprecated Use ReviewsIoReviewAggregateLoader from @replohq/sdk/loaders/reviews-io-review-aggregate-loader. */\nexport function ReviewsIoReviewAggregateLoader(\n _props: ReviewsIoReviewAggregateLoaderProps,\n): ReactElement {\n throw canopyTombstoneError({\n symbol: \"ReviewsIoReviewAggregateLoader\",\n subpath: \"loaders/reviews-io-review-aggregate-loader\",\n });\n}\n"],
|
|
5
|
+
"mappings": ";AAMA,SAAS,4BAA4B;AAc9B,SAAS,+BACd,QACc;AACd,QAAM,qBAAqB;AAAA,IACzB,QAAQ;AAAA,IACR,SAAS;AAAA,EACX,CAAC;AACH;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
import { reviewsIoProductReviewsLoaderOutputSchema } from "./loader-schemas";
|
|
1
|
+
import type { ReactElement, ReactNode } from "react";
|
|
2
|
+
import type { z } from "zod";
|
|
3
|
+
import type { reviewsIoProductReviewsLoaderOutputSchema } from "./loader-schemas";
|
|
4
4
|
type ReviewsIoReviewsData = z.infer<typeof reviewsIoProductReviewsLoaderOutputSchema>;
|
|
5
5
|
type ReviewsIoReviewsLoaderProps = {
|
|
6
6
|
loaderKey: string;
|
|
@@ -10,5 +10,6 @@ type ReviewsIoReviewsLoaderProps = {
|
|
|
10
10
|
children: (data: ReviewsIoReviewsData) => ReactNode;
|
|
11
11
|
fallback?: ReactNode;
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
/** @deprecated Use ReviewsIoReviewsLoader from @replohq/sdk/loaders/reviews-io-reviews-loader. */
|
|
14
|
+
export declare function ReviewsIoReviewsLoader(_props: ReviewsIoReviewsLoaderProps): ReactElement;
|
|
14
15
|
export {};
|
|
@@ -1,63 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { reviewsIoProductReviewsLoaderOutputSchema } from "./loader-schemas";
|
|
8
|
-
function buildReviewsArgs({
|
|
9
|
-
sku,
|
|
10
|
-
perPage,
|
|
11
|
-
page
|
|
12
|
-
}) {
|
|
13
|
-
return {
|
|
14
|
-
sku,
|
|
15
|
-
...perPage !== void 0 ? { perPage } : {},
|
|
16
|
-
...page !== void 0 ? { page } : {}
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
function ReviewsIoReviewsLoaderInner({
|
|
20
|
-
loaderKey,
|
|
21
|
-
sku,
|
|
22
|
-
perPage,
|
|
23
|
-
page,
|
|
24
|
-
children
|
|
25
|
-
}) {
|
|
26
|
-
const args = buildReviewsArgs({ sku, perPage, page });
|
|
27
|
-
const { data } = useSuspenseQuery({
|
|
28
|
-
queryKey: [loaderKey, args],
|
|
29
|
-
queryFn: async () => {
|
|
30
|
-
const loadedData = await invokeLoader({ loaderKey, args });
|
|
31
|
-
return reviewsIoProductReviewsLoaderOutputSchema.parse(loadedData);
|
|
32
|
-
}
|
|
2
|
+
import { canopyTombstoneError } from "../lib/tombstone";
|
|
3
|
+
function ReviewsIoReviewsLoader(_props) {
|
|
4
|
+
throw canopyTombstoneError({
|
|
5
|
+
symbol: "ReviewsIoReviewsLoader",
|
|
6
|
+
subpath: "loaders/reviews-io-reviews-loader"
|
|
33
7
|
});
|
|
34
|
-
return /* @__PURE__ */ jsx(Fragment, { children: children(data) });
|
|
35
|
-
}
|
|
36
|
-
function ReviewsIoReviewsLoader({
|
|
37
|
-
loaderKey,
|
|
38
|
-
sku,
|
|
39
|
-
perPage,
|
|
40
|
-
page,
|
|
41
|
-
children,
|
|
42
|
-
fallback
|
|
43
|
-
}) {
|
|
44
|
-
return /* @__PURE__ */ jsx(
|
|
45
|
-
LoaderErrorBoundary,
|
|
46
|
-
{
|
|
47
|
-
fallback: fallback ?? null,
|
|
48
|
-
resetKey: `${loaderKey}:${sku}:${perPage ?? ""}:${page ?? ""}`,
|
|
49
|
-
children: /* @__PURE__ */ jsx(Suspense, { fallback: fallback ?? null, children: /* @__PURE__ */ jsx(
|
|
50
|
-
ReviewsIoReviewsLoaderInner,
|
|
51
|
-
{
|
|
52
|
-
loaderKey,
|
|
53
|
-
sku,
|
|
54
|
-
perPage,
|
|
55
|
-
page,
|
|
56
|
-
children
|
|
57
|
-
}
|
|
58
|
-
) })
|
|
59
|
-
}
|
|
60
|
-
);
|
|
61
8
|
}
|
|
62
9
|
export {
|
|
63
10
|
ReviewsIoReviewsLoader
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../loaders/reviews-io-reviews-loader.tsx"],
|
|
4
|
-
"sourcesContent": ["\"use client\";\n\nimport type { ReactNode } from \"react\";\
|
|
5
|
-
"mappings": ";
|
|
4
|
+
"sourcesContent": ["\"use client\";\n\nimport type { ReactElement, ReactNode } from \"react\";\nimport type { z } from \"zod\";\nimport type { reviewsIoProductReviewsLoaderOutputSchema } from \"./loader-schemas\";\n\nimport { canopyTombstoneError } from \"../lib/tombstone\";\n\ntype ReviewsIoReviewsData = z.infer<\n typeof reviewsIoProductReviewsLoaderOutputSchema\n>;\n\ntype ReviewsIoReviewsLoaderProps = {\n loaderKey: string;\n sku: string;\n perPage?: number;\n page?: number;\n children: (data: ReviewsIoReviewsData) => ReactNode;\n fallback?: ReactNode;\n};\n\n/** @deprecated Use ReviewsIoReviewsLoader from @replohq/sdk/loaders/reviews-io-reviews-loader. */\nexport function ReviewsIoReviewsLoader(\n _props: ReviewsIoReviewsLoaderProps,\n): ReactElement {\n throw canopyTombstoneError({\n symbol: \"ReviewsIoReviewsLoader\",\n subpath: \"loaders/reviews-io-reviews-loader\",\n });\n}\n"],
|
|
5
|
+
"mappings": ";AAMA,SAAS,4BAA4B;AAgB9B,SAAS,uBACd,QACc;AACd,QAAM,qBAAqB;AAAA,IACzB,QAAQ;AAAA,IACR,SAAS;AAAA,EACX,CAAC;AACH;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}, z.core.$strip>;
|
|
10
|
-
export type SmileEarningRule = z.infer<typeof smileEarningRuleSchema>;
|
|
1
|
+
import type { ReactElement, ReactNode } from "react";
|
|
2
|
+
export type SmileEarningRule = {
|
|
3
|
+
id: number;
|
|
4
|
+
name: string;
|
|
5
|
+
pointsAwarded: number | null;
|
|
6
|
+
pointsAwardedType: string;
|
|
7
|
+
activityToken: string;
|
|
8
|
+
};
|
|
11
9
|
type SmileEarningRulesLoaderProps = {
|
|
12
10
|
loaderKey: string;
|
|
13
11
|
children: (data: {
|
|
@@ -15,5 +13,6 @@ type SmileEarningRulesLoaderProps = {
|
|
|
15
13
|
}) => ReactNode;
|
|
16
14
|
fallback?: ReactNode;
|
|
17
15
|
};
|
|
18
|
-
|
|
16
|
+
/** @deprecated Use SmileEarningRulesLoader from @replohq/sdk/loaders/smile-earning-rules-loader. */
|
|
17
|
+
export declare function SmileEarningRulesLoader(_props: SmileEarningRulesLoaderProps): ReactElement;
|
|
19
18
|
export {};
|
|
@@ -1,42 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { LoaderErrorBoundary } from "./loader-error-boundary";
|
|
8
|
-
const smileEarningRuleSchema = z.object({
|
|
9
|
-
id: z.number(),
|
|
10
|
-
name: z.string(),
|
|
11
|
-
pointsAwarded: z.number().nullable(),
|
|
12
|
-
pointsAwardedType: z.string(),
|
|
13
|
-
activityToken: z.string()
|
|
14
|
-
});
|
|
15
|
-
const smileEarningRulesOutputSchema = z.object({
|
|
16
|
-
earningRules: z.array(smileEarningRuleSchema)
|
|
17
|
-
});
|
|
18
|
-
function SmileEarningRulesLoaderInner({
|
|
19
|
-
loaderKey,
|
|
20
|
-
children
|
|
21
|
-
}) {
|
|
22
|
-
const queryResult = useSuspenseQuery({
|
|
23
|
-
queryKey: [loaderKey, {}],
|
|
24
|
-
queryFn: async () => {
|
|
25
|
-
const loadedData = await invokeLoader({
|
|
26
|
-
loaderKey,
|
|
27
|
-
args: {}
|
|
28
|
-
});
|
|
29
|
-
return smileEarningRulesOutputSchema.parse(loadedData);
|
|
30
|
-
}
|
|
2
|
+
import { canopyTombstoneError } from "../lib/tombstone";
|
|
3
|
+
function SmileEarningRulesLoader(_props) {
|
|
4
|
+
throw canopyTombstoneError({
|
|
5
|
+
symbol: "SmileEarningRulesLoader",
|
|
6
|
+
subpath: "loaders/smile-earning-rules-loader"
|
|
31
7
|
});
|
|
32
|
-
return /* @__PURE__ */ jsx(Fragment, { children: children(queryResult.data) });
|
|
33
|
-
}
|
|
34
|
-
function SmileEarningRulesLoader({
|
|
35
|
-
loaderKey,
|
|
36
|
-
children,
|
|
37
|
-
fallback
|
|
38
|
-
}) {
|
|
39
|
-
return /* @__PURE__ */ jsx(LoaderErrorBoundary, { fallback: fallback ?? null, resetKey: loaderKey, children: /* @__PURE__ */ jsx(Suspense, { fallback: fallback ?? null, children: /* @__PURE__ */ jsx(SmileEarningRulesLoaderInner, { loaderKey, children }) }) });
|
|
40
8
|
}
|
|
41
9
|
export {
|
|
42
10
|
SmileEarningRulesLoader
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../loaders/smile-earning-rules-loader.tsx"],
|
|
4
|
-
"sourcesContent": ["\"use client\";\n\nimport type { ReactNode } from \"react\";\n\nimport {
|
|
5
|
-
"mappings": ";
|
|
4
|
+
"sourcesContent": ["\"use client\";\n\nimport type { ReactElement, ReactNode } from \"react\";\n\nimport { canopyTombstoneError } from \"../lib/tombstone\";\n\nexport type SmileEarningRule = {\n id: number;\n name: string;\n pointsAwarded: number | null;\n pointsAwardedType: string;\n activityToken: string;\n};\n\ntype SmileEarningRulesLoaderProps = {\n loaderKey: string;\n children: (data: { earningRules: SmileEarningRule[] }) => ReactNode;\n fallback?: ReactNode;\n};\n\n/** @deprecated Use SmileEarningRulesLoader from @replohq/sdk/loaders/smile-earning-rules-loader. */\nexport function SmileEarningRulesLoader(\n _props: SmileEarningRulesLoaderProps,\n): ReactElement {\n throw canopyTombstoneError({\n symbol: \"SmileEarningRulesLoader\",\n subpath: \"loaders/smile-earning-rules-loader\",\n });\n}\n"],
|
|
5
|
+
"mappings": ";AAIA,SAAS,4BAA4B;AAiB9B,SAAS,wBACd,QACc;AACd,QAAM,qBAAqB;AAAA,IACzB,QAAQ;AAAA,IACR,SAAS;AAAA,EACX,CAAC;AACH;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}, z.core.$strip>;
|
|
10
|
-
export type SmileReward = z.infer<typeof smileRewardSchema>;
|
|
1
|
+
import type { ReactElement, ReactNode } from "react";
|
|
2
|
+
export type SmileReward = {
|
|
3
|
+
id: number;
|
|
4
|
+
name: string;
|
|
5
|
+
pointsCost: number;
|
|
6
|
+
rewardType: string;
|
|
7
|
+
discountValue: string | null;
|
|
8
|
+
};
|
|
11
9
|
type SmileRewardsLoaderProps = {
|
|
12
10
|
loaderKey: string;
|
|
13
11
|
children: (data: {
|
|
@@ -15,5 +13,6 @@ type SmileRewardsLoaderProps = {
|
|
|
15
13
|
}) => ReactNode;
|
|
16
14
|
fallback?: ReactNode;
|
|
17
15
|
};
|
|
18
|
-
|
|
16
|
+
/** @deprecated Use SmileRewardsLoader from @replohq/sdk/loaders/smile-rewards-loader. */
|
|
17
|
+
export declare function SmileRewardsLoader(_props: SmileRewardsLoaderProps): ReactElement;
|
|
19
18
|
export {};
|
|
@@ -1,42 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { LoaderErrorBoundary } from "./loader-error-boundary";
|
|
8
|
-
const smileRewardSchema = z.object({
|
|
9
|
-
id: z.number(),
|
|
10
|
-
name: z.string(),
|
|
11
|
-
pointsCost: z.number(),
|
|
12
|
-
rewardType: z.string(),
|
|
13
|
-
discountValue: z.string().nullable()
|
|
14
|
-
});
|
|
15
|
-
const smileRewardsOutputSchema = z.object({
|
|
16
|
-
rewards: z.array(smileRewardSchema)
|
|
17
|
-
});
|
|
18
|
-
function SmileRewardsLoaderInner({
|
|
19
|
-
loaderKey,
|
|
20
|
-
children
|
|
21
|
-
}) {
|
|
22
|
-
const queryResult = useSuspenseQuery({
|
|
23
|
-
queryKey: [loaderKey, {}],
|
|
24
|
-
queryFn: async () => {
|
|
25
|
-
const loadedData = await invokeLoader({
|
|
26
|
-
loaderKey,
|
|
27
|
-
args: {}
|
|
28
|
-
});
|
|
29
|
-
return smileRewardsOutputSchema.parse(loadedData);
|
|
30
|
-
}
|
|
2
|
+
import { canopyTombstoneError } from "../lib/tombstone";
|
|
3
|
+
function SmileRewardsLoader(_props) {
|
|
4
|
+
throw canopyTombstoneError({
|
|
5
|
+
symbol: "SmileRewardsLoader",
|
|
6
|
+
subpath: "loaders/smile-rewards-loader"
|
|
31
7
|
});
|
|
32
|
-
return /* @__PURE__ */ jsx(Fragment, { children: children(queryResult.data) });
|
|
33
|
-
}
|
|
34
|
-
function SmileRewardsLoader({
|
|
35
|
-
loaderKey,
|
|
36
|
-
children,
|
|
37
|
-
fallback
|
|
38
|
-
}) {
|
|
39
|
-
return /* @__PURE__ */ jsx(LoaderErrorBoundary, { fallback: fallback ?? null, resetKey: loaderKey, children: /* @__PURE__ */ jsx(Suspense, { fallback: fallback ?? null, children: /* @__PURE__ */ jsx(SmileRewardsLoaderInner, { loaderKey, children }) }) });
|
|
40
8
|
}
|
|
41
9
|
export {
|
|
42
10
|
SmileRewardsLoader
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../loaders/smile-rewards-loader.tsx"],
|
|
4
|
-
"sourcesContent": ["\"use client\";\n\nimport type { ReactNode } from \"react\";\n\nimport {
|
|
5
|
-
"mappings": ";
|
|
4
|
+
"sourcesContent": ["\"use client\";\n\nimport type { ReactElement, ReactNode } from \"react\";\n\nimport { canopyTombstoneError } from \"../lib/tombstone\";\n\nexport type SmileReward = {\n id: number;\n name: string;\n pointsCost: number;\n rewardType: string;\n discountValue: string | null;\n};\n\ntype SmileRewardsLoaderProps = {\n loaderKey: string;\n children: (data: { rewards: SmileReward[] }) => ReactNode;\n fallback?: ReactNode;\n};\n\n/** @deprecated Use SmileRewardsLoader from @replohq/sdk/loaders/smile-rewards-loader. */\nexport function SmileRewardsLoader(\n _props: SmileRewardsLoaderProps,\n): ReactElement {\n throw canopyTombstoneError({\n symbol: \"SmileRewardsLoader\",\n subpath: \"loaders/smile-rewards-loader\",\n });\n}\n"],
|
|
5
|
+
"mappings": ";AAIA,SAAS,4BAA4B;AAiB9B,SAAS,mBACd,QACc;AACd,QAAM,qBAAqB;AAAA,IACzB,QAAQ;AAAA,IACR,SAAS;AAAA,EACX,CAAC;AACH;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|