@replohq/canopy-sdk 3.0.4 → 3.0.5
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/crypto.d.ts +2 -8
- package/_vendor/replo-utils/lib/fonts.d.ts +8 -0
- package/_vendor/replo-utils/lib/fonts.mjs +12 -3
- package/_vendor/replo-utils/lib/geometry.mjs +0 -1
- package/_vendor/replo-utils/lib/json.mjs +1 -1
- package/_vendor/replo-utils/lib/posthogReplay.mjs +0 -1
- package/_vendor/replo-utils/lib/string.d.ts +0 -2
- package/_vendor/replo-utils/lib/url.d.ts +6 -1
- package/_vendor/replo-utils/lib/url.mjs +1 -1
- package/_vendor/schemas/designLibrary.mjs +0 -1
- package/_vendor/schemas/errors.d.ts +2 -3
- package/_vendor/schemas/generated/errors.d.ts +3 -0
- package/_vendor/schemas/generated/selectModeIframeRpc.d.ts +10 -2
- package/_vendor/schemas/iframeRpcChannel.d.ts +1 -1
- package/_vendor/schemas/iframeRpcChannel.mjs +1 -7
- package/_vendor/schemas/loaderKeys.mjs +0 -2
- package/_vendor/schemas/money.d.ts +1 -1
- package/_vendor/schemas/money.mjs +1 -7
- package/_vendor/schemas/pageAnnotations.mjs +0 -2
- package/_vendor/schemas/routing/rules.mjs +2 -2
- package/_vendor/schemas/selectMode.d.ts +0 -4
- package/_vendor/schemas/selectMode.mjs +2 -2
- package/_vendor/schemas/selectModeIframeRpc.d.ts +132 -4
- package/_vendor/schemas/selectModeIframeRpc.mjs +17 -14
- package/analytics/analytics-provider.js +0 -1
- package/analytics/analytics-sink.js +0 -1
- package/analytics/get-analytics-sinks.js +0 -1
- package/analytics/hooks/use-product-viewed-analytics.js +0 -1
- package/analytics/replo-first-party-pixel.js +0 -1
- package/analytics/replo-pixel-script.js +0 -1
- package/analytics/sinks/ga4-sink.js +0 -2
- package/analytics/sinks/meta-sink.js +0 -2
- package/analytics/sinks/pinterest-sink.js +0 -2
- package/analytics/sinks/reddit-sink.js +0 -2
- package/analytics/sinks/replo-sink.js +0 -2
- package/analytics/sinks/snapchat-sink.js +0 -2
- package/analytics/sinks/tiktok-sink.js +0 -2
- package/analytics/sinks/window-sink.js +0 -3
- package/analytics/utils/analytics-utils.js +0 -1
- package/analytics/utils/navigation-tracker.js +0 -1
- package/analytics/utils/shopify-funnel-gate.js +0 -1
- package/cart/buy-now-action.js +0 -1
- package/cart/cart-actions.js +0 -1
- package/cart/cart-loader.js +0 -1
- package/cart/cart-provider.js +0 -1
- package/cart/cart-schema.js +0 -1
- package/cart/cart-types.js +0 -1
- package/cart/gateways/cart-constants.js +0 -1
- package/cart/gateways/cart-gateway.js +0 -1
- package/cart/gateways/cookie-cart-gateway.js +0 -1
- package/cart/gateways/default-cart-gateway.js +0 -1
- package/cart/gateways/resolver-cart-gateway.js +0 -1
- package/cart/gateways/stripe-cart-gateway.js +0 -1
- package/cart/hooks/use-add-to-cart.js +0 -1
- package/cart/hooks/use-buy-now.js +0 -1
- package/cart/utils/cart-utils.js +0 -1
- package/cart/utils/cookie-cart-persistence.js +0 -1
- package/cart/utils/variant-to-cart-line.js +0 -1
- package/{chunk-IQVZY6EV.mjs → chunk-3A2F6BOM.mjs} +9 -6
- package/{chunk-2BNHFQZH.mjs → chunk-544ZM65A.mjs} +1 -5
- package/chunk-AKZNN7F2.mjs +0 -11
- package/chunk-FNTGY7I5.mjs +0 -8
- package/chunk-H36NDYLG.mjs +5 -127
- package/{chunk-VKO7P3ED.mjs → chunk-HGXQNZW7.mjs} +2 -5
- package/chunk-ILGEM42C.mjs +0 -3
- package/{chunk-ZZPQ3E7S.mjs → chunk-QPGBIWJK.mjs} +1 -14
- package/chunk-UJCSKKID.mjs +0 -4
- package/chunk-VPEVERWE.mjs +0 -1
- package/consent/consent-action.js +0 -1
- package/consent/consent-actions.js +0 -1
- package/consent/consent-store.js +0 -1
- package/consent/cookie.js +0 -1
- package/consent/replo-scripts.js +0 -1
- package/consent/script-registration-store.js +0 -1
- package/consent/script-snippets.js +0 -1
- package/consent/types.js +0 -1
- package/consent/window-api.js +0 -1
- package/editor/ClientErrorBoundary.js +0 -1
- package/editor/DocumentReadyBeacon.js +0 -1
- package/editor/LinkInterceptor.js +0 -1
- package/editor/NextErrorReporter.js +0 -1
- package/editor/annotations/AnnotationLayerMount.js +0 -1
- package/editor/annotations/annotationController.js +0 -1
- package/editor/annotations/bridgeGate.js +0 -1
- package/editor/design-library-preview/DesignLibraryPreview.js +0 -1
- package/editor/posthog-relay.js +0 -1
- package/editor/select-mode/EditorSelection.js +0 -1
- package/editor/select-mode/annotationFrames.js +0 -1
- package/editor/select-mode/descriptor/elementDescriptor.js +0 -1
- package/editor/select-mode/descriptor/styleExtraction.js +0 -1
- package/editor/select-mode/displayModeStore.js +0 -1
- package/editor/select-mode/fast-refresh-relay.js +0 -1
- package/editor/select-mode/fiber.js +0 -1
- package/editor/select-mode/hooks/useCrosshairCursor.js +0 -1
- package/editor/select-mode/hooks/useEditModeStateMachine.js +0 -1
- package/editor/select-mode/hooks/useOptimisticOverrides.js +0 -1
- package/editor/select-mode/hooks/useParentMessaging.js +0 -1
- package/editor/select-mode/hooks/useSelectModeController.js +0 -1
- package/editor/select-mode/hooks/useSelectionHover.js +0 -1
- package/editor/select-mode/hooks/useSelectionInteractions.js +0 -1
- package/editor/select-mode/hooks/useSelectionScrollSync.js +0 -1
- package/editor/select-mode/hooks/useSiblingResolution.js +0 -1
- package/editor/select-mode/iframeRpcChannel.js +0 -1
- package/editor/select-mode/inlineTextMarks.js +0 -1
- package/editor/select-mode/interactions/selectionGeometry.js +0 -1
- package/editor/select-mode/selectModeSession.js +0 -1
- package/editor/select-mode/selectionFrame.js +0 -1
- package/editor/select-mode/symbolicate.js +0 -1
- package/editor/select-mode/tiptapInlineEditor.js +0 -1
- package/env.js +0 -1
- package/gateways/canopy-api.js +0 -4
- package/hooks/use-client-value.js +0 -1
- package/hooks/use-formatted-price.js +0 -1
- package/lib/canopy-error.js +0 -1
- package/lib/get-query-client.js +0 -1
- package/lib/integration-utils.js +0 -1
- package/lib/shopify-utils.js +0 -1
- package/lib/tombstone.js +0 -1
- package/lib/url-utils.js +0 -1
- package/loaders/collection-loader.js +0 -1
- package/loaders/collection-products-loader.js +0 -1
- package/loaders/contentful-entries-loader.js +0 -1
- package/loaders/contentful-entry-loader.js +0 -1
- package/loaders/invoke-loader-action.js +0 -1
- package/loaders/invoke-loader-server.js +0 -1
- package/loaders/invoke-loader.js +0 -1
- package/loaders/levanta-product-loader.js +0 -1
- package/loaders/loader-error-boundary.js +0 -1
- package/loaders/loader-keys.js +0 -1
- package/loaders/loader-schemas.js +0 -4
- package/loaders/metaobject-loader.js +0 -1
- package/loaders/metaobjects-loader.js +0 -1
- package/loaders/okendo-review-aggregate-loader.js +0 -1
- package/loaders/okendo-reviews-loader.js +0 -1
- package/loaders/prefetch-loaders.js +0 -1
- package/loaders/preview-placeholder.js +0 -1
- package/loaders/product-loader-args.js +0 -1
- package/loaders/product-loader.js +0 -1
- package/loaders/rebuy-recommendations-loader.js +0 -1
- package/loaders/reviews-io-review-aggregate-loader.js +0 -1
- package/loaders/reviews-io-reviews-loader.js +0 -1
- package/loaders/smile-earning-rules-loader.js +0 -1
- package/loaders/smile-rewards-loader.js +0 -1
- package/loaders/smile-vip-tiers-loader.js +0 -1
- package/loaders/statsig-experiment-loader.js +0 -1
- package/loaders/vendor-loader-keys.js +0 -1
- package/loaders/yotpo-review-aggregate-loader.js +0 -1
- package/loaders/yotpo-reviews-loader.js +0 -1
- package/money.js +0 -1
- package/next/config.js +0 -1
- package/next/image-loader.js +0 -1
- package/next/open-next.js +0 -1
- package/orders/order-status-schema.js +0 -4
- package/orders/order-status.js +0 -1
- package/package.json +1 -1
- package/providers/query-provider.js +0 -1
- package/providers/replo-provider.js +0 -1
- package/routing/evaluate.js +0 -1
- package/routing/rules.js +0 -1
- package/analytics/analytics-provider.js.map +0 -7
- package/analytics/analytics-sink.js.map +0 -7
- package/analytics/get-analytics-sinks.js.map +0 -7
- package/analytics/hooks/use-product-viewed-analytics.js.map +0 -7
- package/analytics/replo-first-party-pixel.js.map +0 -7
- package/analytics/replo-pixel-script.js.map +0 -7
- package/analytics/sinks/ga4-sink.js.map +0 -7
- package/analytics/sinks/meta-sink.js.map +0 -7
- package/analytics/sinks/pinterest-sink.js.map +0 -7
- package/analytics/sinks/reddit-sink.js.map +0 -7
- package/analytics/sinks/replo-sink.js.map +0 -7
- package/analytics/sinks/snapchat-sink.js.map +0 -7
- package/analytics/sinks/tiktok-sink.js.map +0 -7
- package/analytics/sinks/window-sink.js.map +0 -7
- package/analytics/utils/analytics-utils.js.map +0 -7
- package/analytics/utils/navigation-tracker.js.map +0 -7
- package/analytics/utils/shopify-funnel-gate.js.map +0 -7
- package/cart/buy-now-action.js.map +0 -7
- package/cart/cart-actions.js.map +0 -7
- package/cart/cart-loader.js.map +0 -7
- package/cart/cart-provider.js.map +0 -7
- package/cart/cart-schema.js.map +0 -7
- package/cart/cart-types.js.map +0 -7
- package/cart/gateways/cart-constants.js.map +0 -7
- package/cart/gateways/cart-gateway.js.map +0 -7
- package/cart/gateways/cookie-cart-gateway.js.map +0 -7
- package/cart/gateways/default-cart-gateway.js.map +0 -7
- package/cart/gateways/resolver-cart-gateway.js.map +0 -7
- package/cart/gateways/stripe-cart-gateway.js.map +0 -7
- package/cart/hooks/use-add-to-cart.js.map +0 -7
- package/cart/hooks/use-buy-now.js.map +0 -7
- package/cart/utils/cart-utils.js.map +0 -7
- package/cart/utils/cookie-cart-persistence.js.map +0 -7
- package/cart/utils/variant-to-cart-line.js.map +0 -7
- package/consent/consent-action.js.map +0 -7
- package/consent/consent-actions.js.map +0 -7
- package/consent/consent-store.js.map +0 -7
- package/consent/cookie.js.map +0 -7
- package/consent/replo-scripts.js.map +0 -7
- package/consent/script-registration-store.js.map +0 -7
- package/consent/script-snippets.js.map +0 -7
- package/consent/types.js.map +0 -7
- package/consent/window-api.js.map +0 -7
- package/editor/ClientErrorBoundary.js.map +0 -7
- package/editor/DocumentReadyBeacon.js.map +0 -7
- package/editor/LinkInterceptor.js.map +0 -7
- package/editor/NextErrorReporter.js.map +0 -7
- package/editor/annotations/AnnotationLayerMount.js.map +0 -7
- package/editor/annotations/annotationController.js.map +0 -7
- package/editor/annotations/bridgeGate.js.map +0 -7
- package/editor/design-library-preview/DesignLibraryPreview.js.map +0 -7
- package/editor/posthog-relay.js.map +0 -7
- package/editor/select-mode/EditorSelection.js.map +0 -7
- package/editor/select-mode/annotationFrames.js.map +0 -7
- package/editor/select-mode/descriptor/elementDescriptor.js.map +0 -7
- package/editor/select-mode/descriptor/styleExtraction.js.map +0 -7
- package/editor/select-mode/displayModeStore.js.map +0 -7
- package/editor/select-mode/fast-refresh-relay.js.map +0 -7
- package/editor/select-mode/fiber.js.map +0 -7
- package/editor/select-mode/hooks/useCrosshairCursor.js.map +0 -7
- package/editor/select-mode/hooks/useEditModeStateMachine.js.map +0 -7
- package/editor/select-mode/hooks/useOptimisticOverrides.js.map +0 -7
- package/editor/select-mode/hooks/useParentMessaging.js.map +0 -7
- package/editor/select-mode/hooks/useSelectModeController.js.map +0 -7
- package/editor/select-mode/hooks/useSelectionHover.js.map +0 -7
- package/editor/select-mode/hooks/useSelectionInteractions.js.map +0 -7
- package/editor/select-mode/hooks/useSelectionScrollSync.js.map +0 -7
- package/editor/select-mode/hooks/useSiblingResolution.js.map +0 -7
- package/editor/select-mode/iframeRpcChannel.js.map +0 -7
- package/editor/select-mode/inlineTextMarks.js.map +0 -7
- package/editor/select-mode/interactions/selectionGeometry.js.map +0 -7
- package/editor/select-mode/selectModeSession.js.map +0 -7
- package/editor/select-mode/selectionFrame.js.map +0 -7
- package/editor/select-mode/symbolicate.js.map +0 -7
- package/editor/select-mode/tiptapInlineEditor.js.map +0 -7
- package/env.js.map +0 -7
- package/gateways/canopy-api.js.map +0 -7
- package/hooks/use-client-value.js.map +0 -7
- package/hooks/use-formatted-price.js.map +0 -7
- package/lib/canopy-error.js.map +0 -7
- package/lib/get-query-client.js.map +0 -7
- package/lib/integration-utils.js.map +0 -7
- package/lib/shopify-utils.js.map +0 -7
- package/lib/tombstone.js.map +0 -7
- package/lib/url-utils.js.map +0 -7
- package/loaders/collection-loader.js.map +0 -7
- package/loaders/collection-products-loader.js.map +0 -7
- package/loaders/contentful-entries-loader.js.map +0 -7
- package/loaders/contentful-entry-loader.js.map +0 -7
- package/loaders/invoke-loader-action.js.map +0 -7
- package/loaders/invoke-loader-server.js.map +0 -7
- package/loaders/invoke-loader.js.map +0 -7
- package/loaders/levanta-product-loader.js.map +0 -7
- package/loaders/loader-error-boundary.js.map +0 -7
- package/loaders/loader-keys.js.map +0 -7
- package/loaders/loader-schemas.js.map +0 -7
- package/loaders/metaobject-loader.js.map +0 -7
- package/loaders/metaobjects-loader.js.map +0 -7
- package/loaders/okendo-review-aggregate-loader.js.map +0 -7
- package/loaders/okendo-reviews-loader.js.map +0 -7
- package/loaders/prefetch-loaders.js.map +0 -7
- package/loaders/preview-placeholder.js.map +0 -7
- package/loaders/product-loader-args.js.map +0 -7
- package/loaders/product-loader.js.map +0 -7
- package/loaders/rebuy-recommendations-loader.js.map +0 -7
- package/loaders/reviews-io-review-aggregate-loader.js.map +0 -7
- package/loaders/reviews-io-reviews-loader.js.map +0 -7
- package/loaders/smile-earning-rules-loader.js.map +0 -7
- package/loaders/smile-rewards-loader.js.map +0 -7
- package/loaders/smile-vip-tiers-loader.js.map +0 -7
- package/loaders/statsig-experiment-loader.js.map +0 -7
- package/loaders/vendor-loader-keys.js.map +0 -7
- package/loaders/yotpo-review-aggregate-loader.js.map +0 -7
- package/loaders/yotpo-reviews-loader.js.map +0 -7
- package/money.js.map +0 -7
- package/next/config.js.map +0 -7
- package/next/image-loader.js.map +0 -7
- package/next/open-next.js.map +0 -7
- package/orders/order-status-schema.js.map +0 -7
- package/orders/order-status.js.map +0 -7
- package/providers/query-provider.js.map +0 -7
- package/providers/replo-provider.js.map +0 -7
- package/routing/evaluate.js.map +0 -7
- package/routing/rules.js.map +0 -7
|
@@ -12,14 +12,8 @@ export declare function randomBase64Url(byteLength: number): string;
|
|
|
12
12
|
* `crypto.getRandomValues`, which carries no such restriction.
|
|
13
13
|
*/
|
|
14
14
|
export declare function randomUUID(): string;
|
|
15
|
-
/**
|
|
16
|
-
|
|
17
|
-
*
|
|
18
|
-
* Used for storing opaque secrets (e.g. public API tokens) where we want
|
|
19
|
-
* constant-length hex output suitable for a `VARCHAR(64)` column with a
|
|
20
|
-
* unique index.
|
|
21
|
-
*/
|
|
22
|
-
export declare function sha256Hex(input: string): Promise<string>;
|
|
15
|
+
/** Strings use UTF-8; binary inputs are hashed unchanged. */
|
|
16
|
+
export declare function sha256Hex(input: string | Parameters<typeof crypto.subtle.digest>[1]): Promise<string>;
|
|
23
17
|
export declare function constantTimeEqual({ left, right, }: {
|
|
24
18
|
left: Uint8Array;
|
|
25
19
|
right: Uint8Array;
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/** Known symbol assets are not text typefaces; unknown families stay eligible. */
|
|
2
|
+
export declare function isKnownSymbolFontFamily(family: string): boolean;
|
|
3
|
+
export declare function getTypographyFonts<FontType extends {
|
|
4
|
+
family: string;
|
|
5
|
+
faces: {
|
|
6
|
+
cssFamily: string;
|
|
7
|
+
}[];
|
|
8
|
+
}>(fonts: FontType[]): FontType[];
|
|
1
9
|
/**
|
|
2
10
|
* Slugified family name, matching how `fontNameToCssVariable` derives a CSS var
|
|
3
11
|
* (e.g. "DM Sans" → "dm-sans"), so a `--font-<slug>` var round-trips back to a
|
|
@@ -2,13 +2,22 @@ import { upperFirst_default, toString_default } from '../../../chunk-AKZNN7F2.mj
|
|
|
2
2
|
import '../../../chunk-FNTGY7I5.mjs';
|
|
3
3
|
import '../../../chunk-UJCSKKID.mjs';
|
|
4
4
|
|
|
5
|
-
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/capitalize.js
|
|
6
5
|
function capitalize(string) {
|
|
7
6
|
return upperFirst_default(toString_default(string).toLowerCase());
|
|
8
7
|
}
|
|
9
8
|
var capitalize_default = capitalize;
|
|
10
9
|
|
|
11
|
-
|
|
10
|
+
function isKnownSymbolFontFamily(family) {
|
|
11
|
+
const normalized = family.trim().replace(/^["']|["']$/gu, "");
|
|
12
|
+
return /(?:^|[\s_-])(?:icons?|symbols?)(?:$|[\s_-])/iu.test(normalized) || /^(?:webrupee|fontawesome(?:[0-9]+)?(?:free|pro|brands|duotone|sharp)?|icomoon|glyphicons|wingdings|webdings|materialicons)$/iu.test(
|
|
13
|
+
normalized.replace(/[\s_-]/gu, "")
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
function getTypographyFonts(fonts) {
|
|
17
|
+
return fonts.filter((font) => {
|
|
18
|
+
return !isKnownSymbolFontFamily(font.family) && (font.faces.length === 0 || font.faces.some((face) => !isKnownSymbolFontFamily(face.cssFamily)));
|
|
19
|
+
});
|
|
20
|
+
}
|
|
12
21
|
function slugifyFontFamily(family) {
|
|
13
22
|
return family.replace(/([a-z])([A-Z])/g, "$1-$2").split(/[\s_-]+/u).map((word) => word.toLowerCase()).join("-");
|
|
14
23
|
}
|
|
@@ -85,4 +94,4 @@ var escapeFontFamilyName = (fontFamily) => {
|
|
|
85
94
|
return fontFamily.replace(/"/g, '\\"').replace(/'/g, "\\'");
|
|
86
95
|
};
|
|
87
96
|
|
|
88
|
-
export { buildFontFaceCss, buildGoogleFontsCssUrl, describeFontFile, escapeFontFamilyName, fontFormatFromExtension, fontFormatFromMimeType, fontNameToCssVariable, fontNameToVariableName, quoteFontFamily, slugifyFontFamily };
|
|
97
|
+
export { buildFontFaceCss, buildGoogleFontsCssUrl, describeFontFile, escapeFontFamilyName, fontFormatFromExtension, fontFormatFromMimeType, fontNameToCssVariable, fontNameToVariableName, getTypographyFonts, isKnownSymbolFontFamily, quoteFontFamily, slugifyFontFamily };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import '../../../chunk-UJCSKKID.mjs';
|
|
2
2
|
|
|
3
|
-
// ../replo-utils/lib/geometry.ts
|
|
4
3
|
function isIntersecting(targetRect, destinationRect, { tolerance = 0 } = {}) {
|
|
5
4
|
return targetRect.left <= destinationRect.right + tolerance && targetRect.right >= destinationRect.left - tolerance && targetRect.top <= destinationRect.bottom + tolerance && targetRect.bottom >= destinationRect.top - tolerance;
|
|
6
5
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { jsonStringifyOrNull, omitJsonObjectFieldsOrNull, parseJsonOrNull } from '../../../chunk-
|
|
1
|
+
export { jsonStringifyOrNull, omitJsonObjectFieldsOrNull, parseJsonOrNull } from '../../../chunk-HGXQNZW7.mjs';
|
|
2
2
|
import '../../../chunk-ILGEM42C.mjs';
|
|
3
3
|
import '../../../chunk-FNTGY7I5.mjs';
|
|
4
4
|
import '../../../chunk-UJCSKKID.mjs';
|
|
@@ -4,8 +4,6 @@ export declare function metafieldContainsHtml(metafieldValue: string): boolean;
|
|
|
4
4
|
export declare function capitalizeFirstLetter(inputString: string): string;
|
|
5
5
|
/**
|
|
6
6
|
* Get url without query params.
|
|
7
|
-
*
|
|
8
|
-
* @author Kurt 2024-10-14
|
|
9
7
|
*/
|
|
10
8
|
export declare const getUrlWithoutQueryParams: (url: string) => string | undefined;
|
|
11
9
|
/**
|
|
@@ -64,6 +64,11 @@ export declare function fileExtensionFromUrl(url: string): string;
|
|
|
64
64
|
* Registration inputs are attacker-typeable, and the pipeline fetches them
|
|
65
65
|
* server-side — so only plain public https(+http) origins pass: no
|
|
66
66
|
* credentials, no ports, no IP literals, no localhost/RFC-6762 style names.
|
|
67
|
+
* Upgrades http to https and strips the fragment by default; `preserveProtocol`
|
|
68
|
+
* keeps the requested scheme.
|
|
67
69
|
*/
|
|
68
|
-
export declare function sanitizePublicHttpUrl(value: string | null
|
|
70
|
+
export declare function sanitizePublicHttpUrl(value: string | null, { preserveProtocol }?: {
|
|
71
|
+
preserveProtocol?: boolean;
|
|
72
|
+
}): string | null;
|
|
73
|
+
export declare function isPublicHttpsUrl(value: string): boolean;
|
|
69
74
|
export declare function safeHost(url: string): string | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { buildUrlSearchParams, fileExtensionFromUrl, isPreviewInternalHostname, isPreviewOrigin, isValidHttpUrl, isValidRoutePath, normalizeCustomDomain, normalizeUrlIncludingProtocolRelative, normalizeUrlScheme, parseUrl, safeHost, sanitizePublicHttpUrl, truncateDomain } from '../../../chunk-
|
|
1
|
+
export { buildUrlSearchParams, fileExtensionFromUrl, isPreviewInternalHostname, isPreviewOrigin, isPublicHttpsUrl, isValidHttpUrl, isValidRoutePath, normalizeCustomDomain, normalizeUrlIncludingProtocolRelative, normalizeUrlScheme, parseUrl, safeHost, sanitizePublicHttpUrl, truncateDomain } from '../../../chunk-3A2F6BOM.mjs';
|
|
2
2
|
import '../../../chunk-AKZNN7F2.mjs';
|
|
3
3
|
import '../../../chunk-FNTGY7I5.mjs';
|
|
4
4
|
import '../../../chunk-UJCSKKID.mjs';
|
|
@@ -186,9 +186,6 @@ export type ErrorDetails = {
|
|
|
186
186
|
* Map of error keys to custom user-facing details. Should ONLY be used
|
|
187
187
|
* in cases where we want to override the default behavior of ErrorUserFacingDetails
|
|
188
188
|
* from the backend.
|
|
189
|
-
*
|
|
190
|
-
* TODO (Noah, 2024-01-15): Clean up these custom configs, all of them
|
|
191
|
-
* are only used by Django (and 'base' can be moved directly into the reducer function)
|
|
192
189
|
*/
|
|
193
190
|
export declare const CUSTOM_ERROR_KEY_TO_PROPS: {
|
|
194
191
|
"shopifyArticle.failedToPublish": () => {
|
|
@@ -261,6 +258,7 @@ export declare const errorUserFacingDetailsMessageSchema: z.ZodObject<{
|
|
|
261
258
|
isRecoverable: z.ZodOptional<z.ZodBoolean>;
|
|
262
259
|
detail: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString>, z.ZodString]>>;
|
|
263
260
|
key: z.ZodString;
|
|
261
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
264
262
|
usage: z.ZodOptional<z.ZodObject<{
|
|
265
263
|
current: z.ZodNumber;
|
|
266
264
|
maximum: z.ZodNumber;
|
|
@@ -327,6 +325,7 @@ export declare const errorUserFacingDetailsSchema: z.ZodDiscriminatedUnion<[z.Zo
|
|
|
327
325
|
isRecoverable: z.ZodOptional<z.ZodBoolean>;
|
|
328
326
|
detail: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString>, z.ZodString]>>;
|
|
329
327
|
key: z.ZodString;
|
|
328
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
330
329
|
usage: z.ZodOptional<z.ZodObject<{
|
|
331
330
|
current: z.ZodNumber;
|
|
332
331
|
maximum: z.ZodNumber;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import type { DisplayMode, SelectModeSelectionType, SelectModeOptimisticUpdatePayload, SelectModeFormatCommand, SelectableData, SelectModeBoundingRect, SelectModeClickPosition, SelectModeSelectionRect, SelectModeTiptapActiveMarks } from "./selectMode";
|
|
1
|
+
import type { SelectedElement, DisplayMode, SelectModeSelectionType, SelectModeOptimisticUpdatePayload, SelectModeFormatCommand, SelectableData, SelectModeBoundingRect, SelectModeClickPosition, SelectModeSelectionRect, SelectModeTiptapActiveMarks } from "./selectMode";
|
|
2
|
+
export type SelectedComponentEditRequest = {
|
|
3
|
+
siteId: string;
|
|
4
|
+
element: SelectedElement;
|
|
5
|
+
};
|
|
2
6
|
export type IframeRuntimeBuildMetadata = {
|
|
3
7
|
packageName: string;
|
|
4
8
|
version: string;
|
|
@@ -7,6 +11,9 @@ export type IframeRuntimeBuildMetadata = {
|
|
|
7
11
|
builtAt: string | null;
|
|
8
12
|
};
|
|
9
13
|
export type SelectModeParentMessage = {
|
|
14
|
+
method: "editSelectedComponent";
|
|
15
|
+
data: SelectedComponentEditRequest;
|
|
16
|
+
} | {
|
|
10
17
|
method: "setDisplayMode";
|
|
11
18
|
data: {
|
|
12
19
|
displayMode: DisplayMode;
|
|
@@ -15,6 +22,7 @@ export type SelectModeParentMessage = {
|
|
|
15
22
|
method: "setSelectionType";
|
|
16
23
|
data: {
|
|
17
24
|
selectionType: SelectModeSelectionType;
|
|
25
|
+
selectors?: string[];
|
|
18
26
|
};
|
|
19
27
|
} | {
|
|
20
28
|
method: "applyOptimisticUpdate";
|
|
@@ -53,7 +61,7 @@ export type SelectModeParentMessage = {
|
|
|
53
61
|
};
|
|
54
62
|
export type SelectModeIframeMessage = {
|
|
55
63
|
method: "iframeReady";
|
|
56
|
-
data
|
|
64
|
+
data: IframeRuntimeBuildMetadata;
|
|
57
65
|
} | {
|
|
58
66
|
method: "elementSelected";
|
|
59
67
|
data: {
|
|
@@ -16,7 +16,7 @@ export type IframeRpcChannelHandlerMeta<OutgoingMethods extends IframeRpcChannel
|
|
|
16
16
|
channel: IframeRpcChannelRemote<OutgoingMethods>;
|
|
17
17
|
};
|
|
18
18
|
export type IframeRpcChannelHandlers<IncomingMethods extends IframeRpcChannelMethodConfig, OutgoingMethods extends IframeRpcChannelMethodConfig = IframeRpcChannelMethodConfig> = {
|
|
19
|
-
[Method in keyof IncomingMethods]: (input: z.output<IncomingMethods[Method]["inputSchema"]>, meta: IframeRpcChannelHandlerMeta<OutgoingMethods>) => IsVoidMethod<IncomingMethods, Method> extends true ? void :
|
|
19
|
+
[Method in keyof IncomingMethods]: (input: z.output<IncomingMethods[Method]["inputSchema"]>, meta: IframeRpcChannelHandlerMeta<OutgoingMethods>) => IsVoidMethod<IncomingMethods, Method> extends true ? void :
|
|
20
20
|
unknown | Promise<unknown>;
|
|
21
21
|
};
|
|
22
22
|
export type IframeRpcChannelInputHandlers<IncomingMethods extends IframeRpcChannelMethodConfig> = {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { IframeRpcChannelConfigurationError, IframeRpcChannelUnsubscribedError, IframeRpcChannelUnknownMethodError, IframeRpcChannelInvalidInputError, randomUUID, IframeRpcChannelTimeoutError, IframeRpcChannelRemoteError } from '../../chunk-
|
|
1
|
+
import { IframeRpcChannelConfigurationError, IframeRpcChannelUnsubscribedError, IframeRpcChannelUnknownMethodError, IframeRpcChannelInvalidInputError, randomUUID, IframeRpcChannelTimeoutError, IframeRpcChannelRemoteError } from '../../chunk-QPGBIWJK.mjs';
|
|
2
2
|
import { isNullish } from '../../chunk-H36NDYLG.mjs';
|
|
3
3
|
import '../../chunk-ILGEM42C.mjs';
|
|
4
4
|
import '../../chunk-FNTGY7I5.mjs';
|
|
5
5
|
import '../../chunk-UJCSKKID.mjs';
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
|
|
8
|
-
// ../replo-utils/lib/log.ts
|
|
9
8
|
var defaultLogger = {
|
|
10
9
|
info: console.log,
|
|
11
10
|
debug: console.debug,
|
|
@@ -147,7 +146,6 @@ function createIframeRpcChannel(options) {
|
|
|
147
146
|
}
|
|
148
147
|
try {
|
|
149
148
|
const handler = handlers[
|
|
150
|
-
// eslint-disable-next-line replo/no-as-cast -- NOTE (Noah, 2026-07-25): The method existence check above narrows this dynamic wire string to the configured handler keys.
|
|
151
149
|
message.method
|
|
152
150
|
];
|
|
153
151
|
const result = await handler(parsedInput.data, handlerMeta);
|
|
@@ -189,7 +187,6 @@ function createIframeRpcChannel(options) {
|
|
|
189
187
|
return;
|
|
190
188
|
}
|
|
191
189
|
const handler = handlers[
|
|
192
|
-
// eslint-disable-next-line replo/no-as-cast -- NOTE (Noah, 2026-08-07): Method existence check narrows this wire string to configured handler keys.
|
|
193
190
|
message.method
|
|
194
191
|
];
|
|
195
192
|
handler(parsedInput.data, handlerMeta);
|
|
@@ -332,9 +329,6 @@ function createIframeRpcChannel(options) {
|
|
|
332
329
|
}, timeoutMs);
|
|
333
330
|
pendingRequests.set(id, {
|
|
334
331
|
method,
|
|
335
|
-
// PendingRequest is shared across methods, so resolve is typed as
|
|
336
|
-
// unknown; handleResponse already validated against this method's
|
|
337
|
-
// outputSchema before calling it.
|
|
338
332
|
resolve: (value) => {
|
|
339
333
|
resolve(value);
|
|
340
334
|
},
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import '../../chunk-UJCSKKID.mjs';
|
|
2
2
|
|
|
3
|
-
// lib/tombstone.ts
|
|
4
3
|
var migrationCommand = `pnpm add --ignore-workspace @replohq/sdk@latest @replohq/sandbox-runtime@latest && pnpm remove --ignore-workspace canopy-sdk
|
|
5
4
|
(if package.json lists "@replohq/canopy-sdk" instead of the "canopy-sdk" alias, run: pnpm remove --ignore-workspace @replohq/canopy-sdk)`;
|
|
6
5
|
var providerComposition = `import { ReploProvider } from "@replohq/sdk/providers/replo-provider";
|
|
@@ -96,7 +95,6 @@ function canopyTombstoneObject(location) {
|
|
|
96
95
|
});
|
|
97
96
|
}
|
|
98
97
|
|
|
99
|
-
// loaders/vendor-loader-keys.ts
|
|
100
98
|
var DATA_LOADER_KEYS = canopyTombstoneObject({
|
|
101
99
|
symbol: "DATA_LOADER_KEYS",
|
|
102
100
|
subpath: "_vendor/schemas/loaderKeys"
|
|
@@ -15,7 +15,7 @@ export declare function fromMajorUnitsToMinorUnits({ amount, currencyCode, }: {
|
|
|
15
15
|
currencyCode: string;
|
|
16
16
|
}): number;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* safe companion to fromMajorUnitsToMinorUnits for
|
|
19
19
|
* possibly-blank or user/CSV/provider-entered decimal strings — returns null
|
|
20
20
|
* for blank or non-numeric input instead of throwing. Callers with a
|
|
21
21
|
* source-specific cleaning or validation policy sanitize first, then convert
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { ReploError } from '../../chunk-
|
|
1
|
+
import { ReploError } from '../../chunk-QPGBIWJK.mjs';
|
|
2
2
|
import '../../chunk-H36NDYLG.mjs';
|
|
3
3
|
import '../../chunk-ILGEM42C.mjs';
|
|
4
4
|
import '../../chunk-FNTGY7I5.mjs';
|
|
5
5
|
import { __commonJS, __toESM } from '../../chunk-UJCSKKID.mjs';
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
|
|
8
|
-
// ../../node_modules/.pnpm/first-match@0.0.1/node_modules/first-match/index.js
|
|
9
8
|
var require_first_match = __commonJS({
|
|
10
9
|
"../../node_modules/.pnpm/first-match@0.0.1/node_modules/first-match/index.js"(exports, module) {
|
|
11
10
|
function truthy(d) {
|
|
@@ -21,7 +20,6 @@ var require_first_match = __commonJS({
|
|
|
21
20
|
}
|
|
22
21
|
});
|
|
23
22
|
|
|
24
|
-
// ../../node_modules/.pnpm/nub@0.0.0/node_modules/nub/index.js
|
|
25
23
|
var require_nub = __commonJS({
|
|
26
24
|
"../../node_modules/.pnpm/nub@0.0.0/node_modules/nub/index.js"(exports, module) {
|
|
27
25
|
var nub = module.exports = function(xs, cmp) {
|
|
@@ -76,7 +74,6 @@ var require_nub = __commonJS({
|
|
|
76
74
|
}
|
|
77
75
|
});
|
|
78
76
|
|
|
79
|
-
// ../../node_modules/.pnpm/currency-codes@2.2.0/node_modules/currency-codes/data.js
|
|
80
77
|
var require_data = __commonJS({
|
|
81
78
|
"../../node_modules/.pnpm/currency-codes@2.2.0/node_modules/currency-codes/data.js"(exports, module) {
|
|
82
79
|
module.exports = [
|
|
@@ -1793,14 +1790,12 @@ var require_data = __commonJS({
|
|
|
1793
1790
|
}
|
|
1794
1791
|
});
|
|
1795
1792
|
|
|
1796
|
-
// ../../node_modules/.pnpm/currency-codes@2.2.0/node_modules/currency-codes/iso-4217-publish-date.js
|
|
1797
1793
|
var require_iso_4217_publish_date = __commonJS({
|
|
1798
1794
|
"../../node_modules/.pnpm/currency-codes@2.2.0/node_modules/currency-codes/iso-4217-publish-date.js"(exports, module) {
|
|
1799
1795
|
module.exports = "2024-06-25";
|
|
1800
1796
|
}
|
|
1801
1797
|
});
|
|
1802
1798
|
|
|
1803
|
-
// ../../node_modules/.pnpm/currency-codes@2.2.0/node_modules/currency-codes/index.js
|
|
1804
1799
|
var require_currency_codes = __commonJS({
|
|
1805
1800
|
"../../node_modules/.pnpm/currency-codes@2.2.0/node_modules/currency-codes/index.js"(exports) {
|
|
1806
1801
|
var first = require_first_match();
|
|
@@ -1860,7 +1855,6 @@ var require_currency_codes = __commonJS({
|
|
|
1860
1855
|
}
|
|
1861
1856
|
});
|
|
1862
1857
|
|
|
1863
|
-
// ../schemas/money.ts
|
|
1864
1858
|
var import_currency_codes = __toESM(require_currency_codes());
|
|
1865
1859
|
var InvalidAmountError = class extends ReploError {
|
|
1866
1860
|
};
|
|
@@ -9,8 +9,6 @@ var pageAnnotationMarkerSchema = z.object({
|
|
|
9
9
|
number: z.number().int().min(1).max(99),
|
|
10
10
|
color: pageAnnotationColorSchema,
|
|
11
11
|
selector: z.string().min(1).max(2e3),
|
|
12
|
-
// "pageTop" markers ignore the selector and stack near the top of the
|
|
13
|
-
// page (page-wide findings); "element" markers pin to their selector.
|
|
14
12
|
placement: pageAnnotationPlacementSchema.default("element")
|
|
15
13
|
}).describe("PageAnnotationMarker");
|
|
16
14
|
var pageAnnotationViewportRectSchema = z.object({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getParamSegment, getRouteParams, hasRouteParam, matchSource } from '../../../chunk-VPEVERWE.mjs';
|
|
2
|
-
import { parseUrl } from '../../../chunk-
|
|
2
|
+
import { parseUrl } from '../../../chunk-3A2F6BOM.mjs';
|
|
3
3
|
import '../../../chunk-AKZNN7F2.mjs';
|
|
4
|
-
import { ReploError } from '../../../chunk-
|
|
4
|
+
import { ReploError } from '../../../chunk-QPGBIWJK.mjs';
|
|
5
5
|
import '../../../chunk-H36NDYLG.mjs';
|
|
6
6
|
import '../../../chunk-ILGEM42C.mjs';
|
|
7
7
|
import '../../../chunk-FNTGY7I5.mjs';
|
|
@@ -312,8 +312,6 @@ export declare const selectModeFormatCommandSchema: z.ZodEnum<{
|
|
|
312
312
|
* are pinned to this enum via `Extract<SelectModeSelectionType, …>`
|
|
313
313
|
*
|
|
314
314
|
* Renaming or adding a variant here is a TS error in all three.
|
|
315
|
-
*
|
|
316
|
-
* @author Kevin O'Connell 2026-04-20
|
|
317
315
|
*/
|
|
318
316
|
export declare const selectModeSelectionTypeSchema: z.ZodEnum<{
|
|
319
317
|
none: "none";
|
|
@@ -337,8 +335,6 @@ export declare const selectModeSelectionTypeSchema: z.ZodEnum<{
|
|
|
337
335
|
* Distinct from the SDK-internal `SelectModeInteractionSession`, which
|
|
338
336
|
* holds live DOM `Element` refs and live pointer/scroll geometry. This
|
|
339
337
|
* type holds only the message-passable, serialized projection.
|
|
340
|
-
*
|
|
341
|
-
* @author Kevin O'Connell 2026-04-23
|
|
342
338
|
*/
|
|
343
339
|
export declare const selectModeSelectionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
344
340
|
type: z.ZodLiteral<"none">;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { SELECT_MODE_SELECTABLE_ATTRIBUTE, SELECT_MODE_SELECTABLE_PAYLOAD_ATTRIBUTE, displayModeSchema, getIframeOffset, readSelectablePayload, selectModeBoundingRectSchema, selectModeClickPositionSchema, selectModeDefinedStyleSchema, selectModeFiberChainEntrySchema, selectModeFormatCommandSchema, selectModeInlineTextStatusSchema, selectModeOptimisticUpdatePayloadSchema, selectModeSelectionRectSchema, selectModeSelectionSchema, selectModeSelectionTypeSchema, selectModeSourceLocationSchema, selectModeStyleAtRuleSchema, selectModeStyleVariantSchema, selectModeTextMetricsSchema, selectModeTiptapActiveMarksSchema, selectableDataPayloadSchema, selectableDataSchema, selectablePlanDataSchema, selectablePlanPayloadSchema, selectedElementSchema, transformPoint, transformRect, transformSelectableData, transformSelectedElement } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
export { SELECT_MODE_SELECTABLE_ATTRIBUTE, SELECT_MODE_SELECTABLE_PAYLOAD_ATTRIBUTE, displayModeSchema, getIframeOffset, readSelectablePayload, selectModeBoundingRectSchema, selectModeClickPositionSchema, selectModeDefinedStyleSchema, selectModeFiberChainEntrySchema, selectModeFormatCommandSchema, selectModeInlineTextStatusSchema, selectModeOptimisticUpdatePayloadSchema, selectModeSelectionRectSchema, selectModeSelectionSchema, selectModeSelectionTypeSchema, selectModeSourceLocationSchema, selectModeStyleAtRuleSchema, selectModeStyleVariantSchema, selectModeTextMetricsSchema, selectModeTiptapActiveMarksSchema, selectableDataPayloadSchema, selectableDataSchema, selectablePlanDataSchema, selectablePlanPayloadSchema, selectedElementSchema, transformPoint, transformRect, transformSelectableData, transformSelectedElement } from '../../chunk-544ZM65A.mjs';
|
|
2
|
+
import '../../chunk-HGXQNZW7.mjs';
|
|
3
3
|
import '../../chunk-H36NDYLG.mjs';
|
|
4
4
|
import '../../chunk-ILGEM42C.mjs';
|
|
5
5
|
import '../../chunk-FNTGY7I5.mjs';
|
|
@@ -9,6 +9,68 @@ export declare const iframeRuntimeBuildMetadataSchema: z.ZodObject<{
|
|
|
9
9
|
commit: z.ZodNullable<z.ZodString>;
|
|
10
10
|
builtAt: z.ZodNullable<z.ZodString>;
|
|
11
11
|
}, z.core.$strip>;
|
|
12
|
+
export declare const selectedComponentEditRequestSchema: z.ZodObject<{
|
|
13
|
+
siteId: z.ZodUUID;
|
|
14
|
+
element: z.ZodObject<{
|
|
15
|
+
kind: z.ZodLiteral<"react-element">;
|
|
16
|
+
selector: z.ZodString;
|
|
17
|
+
tagName: z.ZodString;
|
|
18
|
+
elementType: z.ZodString;
|
|
19
|
+
textContent: z.ZodNullable<z.ZodString>;
|
|
20
|
+
rect: z.ZodObject<{
|
|
21
|
+
x: z.ZodNumber;
|
|
22
|
+
y: z.ZodNumber;
|
|
23
|
+
left: z.ZodNumber;
|
|
24
|
+
top: z.ZodNumber;
|
|
25
|
+
right: z.ZodNumber;
|
|
26
|
+
bottom: z.ZodNumber;
|
|
27
|
+
width: z.ZodNumber;
|
|
28
|
+
height: z.ZodNumber;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
textMetrics: z.ZodNullable<z.ZodObject<{
|
|
31
|
+
tightWidth: z.ZodNumber;
|
|
32
|
+
lineCount: z.ZodNumber;
|
|
33
|
+
lineHeight: z.ZodNumber;
|
|
34
|
+
}, z.core.$strip>>;
|
|
35
|
+
outerHTML: z.ZodString;
|
|
36
|
+
definedStyles: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
37
|
+
property: z.ZodString;
|
|
38
|
+
variant: z.ZodNullable<z.ZodObject<{
|
|
39
|
+
atRules: z.ZodArray<z.ZodObject<{
|
|
40
|
+
type: z.ZodString;
|
|
41
|
+
text: z.ZodString;
|
|
42
|
+
}, z.core.$strip>>;
|
|
43
|
+
pseudo: z.ZodNullable<z.ZodString>;
|
|
44
|
+
}, z.core.$strip>>;
|
|
45
|
+
className: z.ZodNullable<z.ZodString>;
|
|
46
|
+
raw: z.ZodString;
|
|
47
|
+
resolved: z.ZodString;
|
|
48
|
+
}, z.core.$strip>>>;
|
|
49
|
+
inheritedStyles: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
50
|
+
clickPosition: z.ZodObject<{
|
|
51
|
+
x: z.ZodNumber;
|
|
52
|
+
y: z.ZodNumber;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
sourceLocation: z.ZodOptional<z.ZodObject<{
|
|
55
|
+
filePath: z.ZodString;
|
|
56
|
+
lineNumber: z.ZodNumber;
|
|
57
|
+
columnNumber: z.ZodOptional<z.ZodNumber>;
|
|
58
|
+
componentName: z.ZodOptional<z.ZodString>;
|
|
59
|
+
}, z.core.$strip>>;
|
|
60
|
+
fiberChain: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
61
|
+
sourceLocation: z.ZodObject<{
|
|
62
|
+
filePath: z.ZodString;
|
|
63
|
+
lineNumber: z.ZodNumber;
|
|
64
|
+
columnNumber: z.ZodOptional<z.ZodNumber>;
|
|
65
|
+
componentName: z.ZodOptional<z.ZodString>;
|
|
66
|
+
}, z.core.$strip>;
|
|
67
|
+
tagName: z.ZodOptional<z.ZodString>;
|
|
68
|
+
componentName: z.ZodOptional<z.ZodString>;
|
|
69
|
+
props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
70
|
+
}, z.core.$strip>>>;
|
|
71
|
+
siblingSelectors: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
72
|
+
}, z.core.$strip>;
|
|
73
|
+
}, z.core.$strip>;
|
|
12
74
|
export declare const websiteBuilderToCanopyMethodConfig: {
|
|
13
75
|
symbolicateSelectedElement: {
|
|
14
76
|
inputSchema: z.ZodObject<{
|
|
@@ -154,6 +216,7 @@ export declare const websiteBuilderToCanopyMethodConfig: {
|
|
|
154
216
|
area: "area";
|
|
155
217
|
drag: "drag";
|
|
156
218
|
}>;
|
|
219
|
+
selectors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
157
220
|
}, z.core.$strip>;
|
|
158
221
|
outputSchema: z.ZodVoid;
|
|
159
222
|
};
|
|
@@ -293,13 +356,13 @@ export declare const canopyToWebsiteBuilderMethodConfig: {
|
|
|
293
356
|
timeoutMs: number;
|
|
294
357
|
};
|
|
295
358
|
iframeReady: {
|
|
296
|
-
inputSchema: z.
|
|
359
|
+
inputSchema: z.ZodObject<{
|
|
297
360
|
packageName: z.ZodString;
|
|
298
361
|
version: z.ZodString;
|
|
299
362
|
branch: z.ZodNullable<z.ZodString>;
|
|
300
363
|
commit: z.ZodNullable<z.ZodString>;
|
|
301
364
|
builtAt: z.ZodNullable<z.ZodString>;
|
|
302
|
-
}, z.core.$strip
|
|
365
|
+
}, z.core.$strip>;
|
|
303
366
|
outputSchema: z.ZodVoid;
|
|
304
367
|
};
|
|
305
368
|
elementSelected: {
|
|
@@ -572,6 +635,70 @@ export declare const canopyToWebsiteBuilderMethodConfig: {
|
|
|
572
635
|
};
|
|
573
636
|
};
|
|
574
637
|
export declare const selectModeParentMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
638
|
+
method: z.ZodLiteral<"editSelectedComponent">;
|
|
639
|
+
data: z.ZodObject<{
|
|
640
|
+
siteId: z.ZodUUID;
|
|
641
|
+
element: z.ZodObject<{
|
|
642
|
+
kind: z.ZodLiteral<"react-element">;
|
|
643
|
+
selector: z.ZodString;
|
|
644
|
+
tagName: z.ZodString;
|
|
645
|
+
elementType: z.ZodString;
|
|
646
|
+
textContent: z.ZodNullable<z.ZodString>;
|
|
647
|
+
rect: z.ZodObject<{
|
|
648
|
+
x: z.ZodNumber;
|
|
649
|
+
y: z.ZodNumber;
|
|
650
|
+
left: z.ZodNumber;
|
|
651
|
+
top: z.ZodNumber;
|
|
652
|
+
right: z.ZodNumber;
|
|
653
|
+
bottom: z.ZodNumber;
|
|
654
|
+
width: z.ZodNumber;
|
|
655
|
+
height: z.ZodNumber;
|
|
656
|
+
}, z.core.$strip>;
|
|
657
|
+
textMetrics: z.ZodNullable<z.ZodObject<{
|
|
658
|
+
tightWidth: z.ZodNumber;
|
|
659
|
+
lineCount: z.ZodNumber;
|
|
660
|
+
lineHeight: z.ZodNumber;
|
|
661
|
+
}, z.core.$strip>>;
|
|
662
|
+
outerHTML: z.ZodString;
|
|
663
|
+
definedStyles: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
664
|
+
property: z.ZodString;
|
|
665
|
+
variant: z.ZodNullable<z.ZodObject<{
|
|
666
|
+
atRules: z.ZodArray<z.ZodObject<{
|
|
667
|
+
type: z.ZodString;
|
|
668
|
+
text: z.ZodString;
|
|
669
|
+
}, z.core.$strip>>;
|
|
670
|
+
pseudo: z.ZodNullable<z.ZodString>;
|
|
671
|
+
}, z.core.$strip>>;
|
|
672
|
+
className: z.ZodNullable<z.ZodString>;
|
|
673
|
+
raw: z.ZodString;
|
|
674
|
+
resolved: z.ZodString;
|
|
675
|
+
}, z.core.$strip>>>;
|
|
676
|
+
inheritedStyles: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
677
|
+
clickPosition: z.ZodObject<{
|
|
678
|
+
x: z.ZodNumber;
|
|
679
|
+
y: z.ZodNumber;
|
|
680
|
+
}, z.core.$strip>;
|
|
681
|
+
sourceLocation: z.ZodOptional<z.ZodObject<{
|
|
682
|
+
filePath: z.ZodString;
|
|
683
|
+
lineNumber: z.ZodNumber;
|
|
684
|
+
columnNumber: z.ZodOptional<z.ZodNumber>;
|
|
685
|
+
componentName: z.ZodOptional<z.ZodString>;
|
|
686
|
+
}, z.core.$strip>>;
|
|
687
|
+
fiberChain: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
688
|
+
sourceLocation: z.ZodObject<{
|
|
689
|
+
filePath: z.ZodString;
|
|
690
|
+
lineNumber: z.ZodNumber;
|
|
691
|
+
columnNumber: z.ZodOptional<z.ZodNumber>;
|
|
692
|
+
componentName: z.ZodOptional<z.ZodString>;
|
|
693
|
+
}, z.core.$strip>;
|
|
694
|
+
tagName: z.ZodOptional<z.ZodString>;
|
|
695
|
+
componentName: z.ZodOptional<z.ZodString>;
|
|
696
|
+
props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
697
|
+
}, z.core.$strip>>>;
|
|
698
|
+
siblingSelectors: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
699
|
+
}, z.core.$strip>;
|
|
700
|
+
}, z.core.$strip>;
|
|
701
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
575
702
|
method: z.ZodLiteral<"setDisplayMode">;
|
|
576
703
|
data: z.ZodObject<{
|
|
577
704
|
displayMode: z.ZodEnum<{
|
|
@@ -588,6 +715,7 @@ export declare const selectModeParentMessageSchema: z.ZodDiscriminatedUnion<[z.Z
|
|
|
588
715
|
area: "area";
|
|
589
716
|
drag: "drag";
|
|
590
717
|
}>;
|
|
718
|
+
selectors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
591
719
|
}, z.core.$strip>;
|
|
592
720
|
}, z.core.$strip>, z.ZodObject<{
|
|
593
721
|
method: z.ZodLiteral<"applyOptimisticUpdate">;
|
|
@@ -648,13 +776,13 @@ export declare const selectModeParentMessageSchema: z.ZodDiscriminatedUnion<[z.Z
|
|
|
648
776
|
}, z.core.$strip>], "method">;
|
|
649
777
|
export declare const selectModeIframeMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
650
778
|
method: z.ZodLiteral<"iframeReady">;
|
|
651
|
-
data: z.
|
|
779
|
+
data: z.ZodObject<{
|
|
652
780
|
packageName: z.ZodString;
|
|
653
781
|
version: z.ZodString;
|
|
654
782
|
branch: z.ZodNullable<z.ZodString>;
|
|
655
783
|
commit: z.ZodNullable<z.ZodString>;
|
|
656
784
|
builtAt: z.ZodNullable<z.ZodString>;
|
|
657
|
-
}, z.core.$strip
|
|
785
|
+
}, z.core.$strip>;
|
|
658
786
|
}, z.core.$strip>, z.ZodObject<{
|
|
659
787
|
method: z.ZodLiteral<"elementSelected">;
|
|
660
788
|
data: z.ZodObject<{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { selectModeFormatCommandSchema, selectModeOptimisticUpdatePayloadSchema, selectModeSelectionTypeSchema, displayModeSchema, selectModeTiptapActiveMarksSchema, selectModeBoundingRectSchema, selectableDataSchema, selectModeSelectionRectSchema, selectModeClickPositionSchema
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
import { selectedElementSchema, selectModeFormatCommandSchema, selectModeOptimisticUpdatePayloadSchema, selectModeSelectionTypeSchema, displayModeSchema, selectModeTiptapActiveMarksSchema, selectModeBoundingRectSchema, selectableDataSchema, selectModeSelectionRectSchema, selectModeClickPositionSchema } from '../../chunk-544ZM65A.mjs';
|
|
2
|
+
import '../../chunk-HGXQNZW7.mjs';
|
|
3
3
|
import '../../chunk-H36NDYLG.mjs';
|
|
4
4
|
import '../../chunk-ILGEM42C.mjs';
|
|
5
5
|
import '../../chunk-FNTGY7I5.mjs';
|
|
@@ -15,13 +15,16 @@ var iframeRuntimeBuildMetadataSchema = z.object({
|
|
|
15
15
|
commit: z.string().nullable(),
|
|
16
16
|
builtAt: z.string().nullable()
|
|
17
17
|
}).describe("IframeRuntimeBuildMetadata");
|
|
18
|
+
var selectedComponentEditRequestSchema = z.object({
|
|
19
|
+
siteId: z.uuid(),
|
|
20
|
+
element: selectedElementSchema
|
|
21
|
+
}).describe("SelectedComponentEditRequest");
|
|
18
22
|
var websiteBuilderToCanopyMethodConfig = {
|
|
19
23
|
symbolicateSelectedElement: {
|
|
20
24
|
inputSchema: selectedElementSchema,
|
|
21
25
|
outputSchema: selectedElementSchema,
|
|
22
26
|
timeoutMs: 1500
|
|
23
27
|
},
|
|
24
|
-
// Client-side transition command; fire-and-forget because success is observed as the `replo:navigated` echo.
|
|
25
28
|
navigateToRoute: {
|
|
26
29
|
inputSchema: z.object({ pathname: z.string() }),
|
|
27
30
|
outputSchema: z.void()
|
|
@@ -30,13 +33,11 @@ var websiteBuilderToCanopyMethodConfig = {
|
|
|
30
33
|
inputSchema: z.object({ displayMode: displayModeSchema }),
|
|
31
34
|
outputSchema: z.void()
|
|
32
35
|
},
|
|
33
|
-
// Declarative push of the parent's current selection type into the
|
|
34
|
-
// canopy iframe. Transitioning to `none` is canopy's signal to hide
|
|
35
|
-
// its in-iframe selection frame and drop any in-progress drag —
|
|
36
|
-
// there's no separate "clear" message because selection state always
|
|
37
|
-
// flows through agentUiState.
|
|
38
36
|
setSelectionType: {
|
|
39
|
-
inputSchema: z.object({
|
|
37
|
+
inputSchema: z.object({
|
|
38
|
+
selectionType: selectModeSelectionTypeSchema,
|
|
39
|
+
selectors: z.array(z.string()).optional()
|
|
40
|
+
}),
|
|
40
41
|
outputSchema: z.void()
|
|
41
42
|
},
|
|
42
43
|
applyOptimisticUpdate: {
|
|
@@ -93,7 +94,7 @@ var canopyToWebsiteBuilderMethodConfig = {
|
|
|
93
94
|
timeoutMs: 5e3
|
|
94
95
|
},
|
|
95
96
|
iframeReady: {
|
|
96
|
-
inputSchema: iframeRuntimeBuildMetadataSchema
|
|
97
|
+
inputSchema: iframeRuntimeBuildMetadataSchema,
|
|
97
98
|
outputSchema: z.void()
|
|
98
99
|
},
|
|
99
100
|
elementSelected: {
|
|
@@ -147,8 +148,6 @@ var canopyToWebsiteBuilderMethodConfig = {
|
|
|
147
148
|
editorStateUpdate: {
|
|
148
149
|
inputSchema: z.object({
|
|
149
150
|
activeMarks: selectModeTiptapActiveMarksSchema,
|
|
150
|
-
// Whether an inline text edit is currently open. Lets the parent show the
|
|
151
|
-
// inline formatting controls (and live mark state) only while editing.
|
|
152
151
|
isEditing: z.boolean()
|
|
153
152
|
}),
|
|
154
153
|
outputSchema: z.void()
|
|
@@ -159,6 +158,10 @@ var canopyToWebsiteBuilderMethodConfig = {
|
|
|
159
158
|
}
|
|
160
159
|
};
|
|
161
160
|
var selectModeParentMessageSchema = z.discriminatedUnion("method", [
|
|
161
|
+
z.object({
|
|
162
|
+
method: z.literal("editSelectedComponent"),
|
|
163
|
+
data: selectedComponentEditRequestSchema
|
|
164
|
+
}),
|
|
162
165
|
z.object({
|
|
163
166
|
method: z.literal("setDisplayMode"),
|
|
164
167
|
data: websiteBuilderToCanopyMethodConfig.setDisplayMode.inputSchema
|
|
@@ -197,7 +200,7 @@ var selectModeParentMessageSchema = z.discriminatedUnion("method", [
|
|
|
197
200
|
var selectModeIframeMessageSchema = z.discriminatedUnion("method", [
|
|
198
201
|
z.object({
|
|
199
202
|
method: z.literal("iframeReady"),
|
|
200
|
-
data: iframeRuntimeBuildMetadataSchema
|
|
203
|
+
data: iframeRuntimeBuildMetadataSchema
|
|
201
204
|
}),
|
|
202
205
|
z.object({
|
|
203
206
|
method: z.literal("elementSelected"),
|
|
@@ -236,4 +239,4 @@ var selectModeIframeMessageSchema = z.discriminatedUnion("method", [
|
|
|
236
239
|
})
|
|
237
240
|
]).describe("SelectModeIframeMessage");
|
|
238
241
|
|
|
239
|
-
export { SELECT_MODE_IFRAME_RPC_CHANNEL_ID, SELECT_MODE_IFRAME_RPC_CHANNEL_VERSION, canopyToWebsiteBuilderMethodConfig, iframeRuntimeBuildMetadataSchema, selectModeIframeMessageSchema, selectModeParentMessageSchema, websiteBuilderToCanopyMethodConfig };
|
|
242
|
+
export { SELECT_MODE_IFRAME_RPC_CHANNEL_ID, SELECT_MODE_IFRAME_RPC_CHANNEL_VERSION, canopyToWebsiteBuilderMethodConfig, iframeRuntimeBuildMetadataSchema, selectModeIframeMessageSchema, selectModeParentMessageSchema, selectedComponentEditRequestSchema, websiteBuilderToCanopyMethodConfig };
|