@replohq/canopy-sdk 3.0.5-beta.repl-30952-actions-validation-canopy.7.1.ged5b844 → 3.0.6

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.
@@ -1,5 +1,15 @@
1
1
  /** Known symbol assets are not text typefaces; unknown families stay eligible. */
2
2
  export declare function isKnownSymbolFontFamily(family: string): boolean;
3
+ /** Words a family name carries for packaging rather than design: "Inter Display", "Avenir Web". */
4
+ export declare const FONT_DESCRIPTOR_WORDS: Set<string>;
5
+ /** Weight and style words a family name can carry: "Avenir Book", "Graphik Semibold". */
6
+ export declare const FONT_VARIANT_WORDS: Set<string>;
7
+ export declare const FONT_STYLE_WORDS: Set<string>;
8
+ export declare function stripCssQuotes(value: string): string;
9
+ /** "InterDisplay-Bold", "'Inter Display'" → "inter display bold", "inter display": camel case split, punctuation to spaces, lower case. */
10
+ export declare function normalizeFontFamilyName(value: string): string;
11
+ /** The key two family names share when they are the same typeface: Brand Studio's alias minus weight, style and packaging words ("Avenir Book" → "avenir"), stricter than the first-word alias. */
12
+ export declare function fontFamilyKey(family: string): string;
3
13
  export declare function getTypographyFonts<FontType extends {
4
14
  family: string;
5
15
  faces: {
@@ -48,10 +58,11 @@ export declare function fontFormatFromMimeType(mimeType: string): string;
48
58
  /**
49
59
  * The @font-face rule that makes a custom family renderable from its asset URL.
50
60
  */
51
- export declare function buildFontFaceCss({ family, faceUrl, format, weight, }: {
61
+ export declare function buildFontFaceCss({ family, faceUrl, format, weight, style, }: {
52
62
  family: string;
53
63
  faceUrl: string;
54
64
  format: string;
55
65
  weight?: number;
66
+ style?: "normal" | "italic";
56
67
  }): string;
57
68
  export declare const escapeFontFamilyName: (fontFamily: string) => string;
@@ -13,6 +13,43 @@ function isKnownSymbolFontFamily(family) {
13
13
  normalized.replace(/[\s_-]/gu, "")
14
14
  );
15
15
  }
16
+ var FONT_DESCRIPTOR_WORDS = /* @__PURE__ */ new Set([
17
+ "display",
18
+ "international",
19
+ "intl",
20
+ "m",
21
+ "text",
22
+ "web",
23
+ "webfont",
24
+ "webm"
25
+ ]);
26
+ var FONT_VARIANT_WORDS = /* @__PURE__ */ new Set([
27
+ "black",
28
+ "bold",
29
+ "book",
30
+ "extrabold",
31
+ "italic",
32
+ "light",
33
+ "medium",
34
+ "regular",
35
+ "semibold",
36
+ "thin"
37
+ ]);
38
+ var FONT_STYLE_WORDS = /* @__PURE__ */ new Set([
39
+ ...FONT_DESCRIPTOR_WORDS,
40
+ ...FONT_VARIANT_WORDS
41
+ ]);
42
+ function stripCssQuotes(value) {
43
+ return value.trim().replace(/\\(["'])/gu, "$1").replace(/^["']|["']$/gu, "");
44
+ }
45
+ function normalizeFontFamilyName(value) {
46
+ return stripCssQuotes(value).replace(/([a-z])([A-Z])/gu, "$1 $2").replace(/([A-Z])([A-Z][a-z])/gu, "$1 $2").replace(/[^a-z0-9]+/giu, " ").trim().replace(/\s+/gu, " ").toLowerCase();
47
+ }
48
+ function fontFamilyKey(family) {
49
+ const words = normalizeFontFamilyName(family).split(" ").filter(Boolean);
50
+ const kept = words.filter((word) => !FONT_STYLE_WORDS.has(word));
51
+ return (kept.length > 0 ? kept : words).join(" ");
52
+ }
16
53
  function getTypographyFonts(fonts) {
17
54
  return fonts.filter((font) => {
18
55
  return !isKnownSymbolFontFamily(font.family) && (font.faces.length === 0 || font.faces.some((face) => !isKnownSymbolFontFamily(face.cssFamily)));
@@ -61,16 +98,28 @@ function describeFontFile(fileName) {
61
98
  }
62
99
  function fontFormatFromExtension(extension) {
63
100
  const normalized = extension.toLowerCase().replace(/^\./u, "");
64
- if (normalized === "woff2") return "woff2";
65
- if (normalized === "woff") return "woff";
66
- if (normalized === "otf") return "opentype";
67
- if (normalized === "ttf") return "truetype";
101
+ if (normalized === "woff2") {
102
+ return "woff2";
103
+ }
104
+ if (normalized === "woff") {
105
+ return "woff";
106
+ }
107
+ if (normalized === "otf") {
108
+ return "opentype";
109
+ }
110
+ if (normalized === "ttf") {
111
+ return "truetype";
112
+ }
68
113
  return "woff2";
69
114
  }
70
115
  function fontFormatFromMimeType(mimeType) {
71
116
  const normalized = mimeType.toLowerCase();
72
- if (normalized.includes("woff2")) return "woff2";
73
- if (normalized.includes("woff")) return "woff";
117
+ if (normalized.includes("woff2")) {
118
+ return "woff2";
119
+ }
120
+ if (normalized.includes("woff")) {
121
+ return "woff";
122
+ }
74
123
  if (normalized.includes("otf") || normalized.includes("opentype")) {
75
124
  return "opentype";
76
125
  }
@@ -86,12 +135,13 @@ function buildFontFaceCss({
86
135
  family,
87
136
  faceUrl,
88
137
  format,
89
- weight = 400
138
+ weight = 400,
139
+ style = "normal"
90
140
  }) {
91
- return `@font-face{font-family:"${escapeCssString(family)}";font-weight:${weight};font-style:normal;src:url("${escapeCssString(faceUrl)}") format("${escapeCssString(format)}");font-display:swap;}`;
141
+ return `@font-face{font-family:"${escapeCssString(family)}";font-weight:${weight};font-style:${style};src:url("${escapeCssString(faceUrl)}") format("${escapeCssString(format)}");font-display:swap;}`;
92
142
  }
93
143
  var escapeFontFamilyName = (fontFamily) => {
94
144
  return fontFamily.replace(/"/g, '\\"').replace(/'/g, "\\'");
95
145
  };
96
146
 
97
- export { buildFontFaceCss, buildGoogleFontsCssUrl, describeFontFile, escapeFontFamilyName, fontFormatFromExtension, fontFormatFromMimeType, fontNameToCssVariable, fontNameToVariableName, getTypographyFonts, isKnownSymbolFontFamily, quoteFontFamily, slugifyFontFamily };
147
+ export { FONT_DESCRIPTOR_WORDS, FONT_STYLE_WORDS, FONT_VARIANT_WORDS, buildFontFaceCss, buildGoogleFontsCssUrl, describeFontFile, escapeFontFamilyName, fontFamilyKey, fontFormatFromExtension, fontFormatFromMimeType, fontNameToCssVariable, fontNameToVariableName, getTypographyFonts, isKnownSymbolFontFamily, normalizeFontFamilyName, quoteFontFamily, slugifyFontFamily, stripCssQuotes };
@@ -142,4 +142,8 @@ export declare function coerceNumberToString(value: string | number | null): str
142
142
  */
143
143
  export declare function formatFileSize(byteCount: number, decimalPlaces?: number): string;
144
144
  export declare const sleep: (ms: number) => Promise<unknown>;
145
+ export declare function sleepWithSignal({ delayMs, signal, }: {
146
+ delayMs: number;
147
+ signal: AbortSignal | null;
148
+ }): Promise<unknown>;
145
149
  export declare function errorMessage(error: unknown): string;
@@ -1,4 +1,4 @@
1
- export { coerceNumberToString, deepCloneAndMergeReplacingArrays, errorMessage, exhaustiveSwitch, formatFileSize, getFromRecordOrNull, hasOwnProperty, invariant, isEmpty, isFunction_default as isFunction, isNotNullish, isNullish, isPrimitive, mergeReplacingArrays, mergeReplacingObjects, noop, preventDefault, sleep, warning } from '../../../chunk-H36NDYLG.mjs';
1
+ export { coerceNumberToString, deepCloneAndMergeReplacingArrays, errorMessage, exhaustiveSwitch, formatFileSize, getFromRecordOrNull, hasOwnProperty, invariant, isEmpty, isFunction_default as isFunction, isNotNullish, isNullish, isPrimitive, mergeReplacingArrays, mergeReplacingObjects, noop, preventDefault, sleep, sleepWithSignal, warning } from '../../../chunk-EXI4VDHP.mjs';
2
2
  export { isNumber_default as isNumber, isString_default as isString } from '../../../chunk-ILGEM42C.mjs';
3
3
  import '../../../chunk-FNTGY7I5.mjs';
4
4
  import '../../../chunk-UJCSKKID.mjs';
@@ -1,4 +1,4 @@
1
- export { buildUrlSearchParams, fileExtensionFromUrl, isPreviewInternalHostname, isPreviewOrigin, isPublicHttpsUrl, isValidHttpUrl, isValidRoutePath, normalizeCustomDomain, normalizeUrlIncludingProtocolRelative, normalizeUrlScheme, parseUrl, safeHost, sanitizePublicHttpUrl, truncateDomain } from '../../../chunk-3A2F6BOM.mjs';
1
+ export { buildUrlSearchParams, fileExtensionFromUrl, isPreviewInternalHostname, isPreviewOrigin, isPublicHttpsUrl, isValidHttpUrl, isValidRoutePath, normalizeCustomDomain, normalizeUrlIncludingProtocolRelative, normalizeUrlScheme, parseUrl, safeHost, sanitizePublicHttpUrl, truncateDomain } from '../../../chunk-DINXH6YP.mjs';
2
2
  import '../../../chunk-AKZNN7F2.mjs';
3
3
  import '../../../chunk-FNTGY7I5.mjs';
4
4
  import '../../../chunk-UJCSKKID.mjs';
@@ -341,6 +341,29 @@ export declare const siteFontsSnapshotSchema: z.ZodObject<{
341
341
  }, z.core.$strip>>;
342
342
  defaultRole: z.ZodNullable<z.ZodString>;
343
343
  }, z.core.$strip>;
344
+ export declare const siteDesignLibraryStateSchema: z.ZodObject<{
345
+ siteId: z.ZodUUID;
346
+ globalsCss: z.ZodNullable<z.ZodObject<{
347
+ scopes: z.ZodArray<z.ZodObject<{
348
+ selector: z.ZodString;
349
+ tokens: z.ZodArray<z.ZodObject<{
350
+ name: z.ZodString;
351
+ value: z.ZodString;
352
+ }, z.core.$strip>>;
353
+ }, z.core.$strip>>;
354
+ }, z.core.$strip>>;
355
+ fonts: z.ZodNullable<z.ZodObject<{
356
+ roles: z.ZodArray<z.ZodObject<{
357
+ role: z.ZodString;
358
+ family: z.ZodNullable<z.ZodString>;
359
+ cssVar: z.ZodNullable<z.ZodString>;
360
+ rawValue: z.ZodString;
361
+ }, z.core.$strip>>;
362
+ defaultRole: z.ZodNullable<z.ZodString>;
363
+ }, z.core.$strip>>;
364
+ isLoading: z.ZodBoolean;
365
+ error: z.ZodNullable<z.ZodString>;
366
+ }, z.core.$strip>;
344
367
  export declare const DESIGN_LIBRARY_PREVIEW_MESSAGE_TYPE = "replo:design-library:applyOverrides";
345
368
  export declare const designLibraryPreviewFontSchema: z.ZodObject<{
346
369
  family: z.ZodString;
@@ -108,6 +108,13 @@ var siteFontsSnapshotSchema = z.object({
108
108
  roles: z.array(siteFontRoleSchema),
109
109
  defaultRole: z.string().nullable()
110
110
  }).describe("SiteFontsSnapshot");
111
+ var siteDesignLibraryStateSchema = z.object({
112
+ siteId: z.uuid(),
113
+ globalsCss: globalsCssSnapshotSchema.nullable(),
114
+ fonts: siteFontsSnapshotSchema.nullable(),
115
+ isLoading: z.boolean(),
116
+ error: z.string().nullable()
117
+ }).describe("SiteDesignLibraryState");
111
118
  var DESIGN_LIBRARY_PREVIEW_MESSAGE_TYPE = "replo:design-library:applyOverrides";
112
119
  var designLibraryPreviewFontSchema = z.object({
113
120
  family: z.string(),
@@ -122,4 +129,4 @@ var designLibraryPreviewMessageSchema = z.object({
122
129
  defaultFontCssVar: z.string().nullable()
123
130
  }).describe("DesignLibraryPreviewMessage");
124
131
 
125
- export { DESIGN_LIBRARY_PREVIEW_MESSAGE_TYPE, designLibraryPreviewFontSchema, designLibraryPreviewMessageSchema, designLibrarySavedStyleMetadataSchema, designLibrarySavedStylesSchema, designLibrarySchema, globalsCssScopeSchema, globalsCssSnapshotSchema, globalsCssTokenSchema, savedColorStyleSchema, savedTextStyleSchema, siteFontRoleSchema, siteFontsSnapshotSchema };
132
+ export { DESIGN_LIBRARY_PREVIEW_MESSAGE_TYPE, designLibraryPreviewFontSchema, designLibraryPreviewMessageSchema, designLibrarySavedStyleMetadataSchema, designLibrarySavedStylesSchema, designLibrarySchema, globalsCssScopeSchema, globalsCssSnapshotSchema, globalsCssTokenSchema, savedColorStyleSchema, savedTextStyleSchema, siteDesignLibraryStateSchema, siteFontRoleSchema, siteFontsSnapshotSchema };
@@ -59,6 +59,7 @@ export type ReploAuthenticationErrorConfig = {
59
59
  type: AuthErrorType;
60
60
  userFacingDetails?: ErrorUserFacingDetailsWithMessage;
61
61
  additionalData?: ReploErrorConfig["additionalData"];
62
+ cause?: ReploErrorConfig["cause"];
62
63
  };
63
64
  export declare class ReploAuthenticationError extends ReploError {
64
65
  type: AuthErrorType;
@@ -34,6 +34,17 @@ export type SelectModeBoundingRect = {
34
34
  width: number;
35
35
  height: number;
36
36
  };
37
+ export type SelectModeHoverRect = {
38
+ x: number;
39
+ y: number;
40
+ left: number;
41
+ top: number;
42
+ right: number;
43
+ bottom: number;
44
+ width: number;
45
+ height: number;
46
+ isSection?: boolean;
47
+ };
37
48
  export type SelectModeSelectionRect = {
38
49
  id: string;
39
50
  rect: SelectModeBoundingRect;
@@ -53,16 +64,50 @@ export type SelectModeDefinedStyle = {
53
64
  raw: string;
54
65
  resolved: string;
55
66
  };
67
+ export type SelectModeImageScope = {
68
+ kind: "all";
69
+ } | {
70
+ kind: "media";
71
+ media: string;
72
+ };
73
+ export type SelectModeImageSource = {
74
+ srcSet: string;
75
+ sizes: string;
76
+ media: string;
77
+ type: string;
78
+ previewUrl: string | null;
79
+ };
80
+ export type SelectModeImage = {
81
+ src: string;
82
+ currentSrc: string;
83
+ srcSet: string;
84
+ sizes: string;
85
+ previewUrl: string | null;
86
+ sources: SelectModeImageSource[];
87
+ };
88
+ export type SelectModeVideo = {
89
+ src: string;
90
+ currentSrc: string;
91
+ };
56
92
  export type SelectedElement = {
57
93
  kind: "react-element";
58
94
  selector: string;
95
+ section?: {
96
+ selector: string;
97
+ };
59
98
  tagName: string;
60
99
  elementType: string;
61
100
  textContent: string | null;
101
+ sectionLabel?: string;
62
102
  rect: SelectModeBoundingRect;
63
103
  textMetrics: SelectModeTextMetrics | null;
64
104
  outerHTML: string;
105
+ image?: SelectModeImage;
106
+ video?: SelectModeVideo;
65
107
  definedStyles: SelectModeDefinedStyle[];
108
+ authoredStyles: {
109
+ [x: string]: string;
110
+ };
66
111
  inheritedStyles: {
67
112
  [x: string]: string;
68
113
  };
@@ -85,6 +130,9 @@ export type SelectablePlanPayload = {
85
130
  export type SelectableDataPayload = SelectablePlanPayload;
86
131
  export type SelectableData = SelectedElement | SelectablePlanData;
87
132
  export type SelectModeOptimisticUpdatePayload = {
133
+ kind: "image";
134
+ image: SelectModeImage;
135
+ } | {
88
136
  kind: "css";
89
137
  fontSource?: "google" | "site";
90
138
  property: string;
@@ -1,4 +1,4 @@
1
- import type { SelectModeBoundingRect, DisplayMode, SelectModeSelectionType, SelectModeOptimisticUpdatePayload, SelectModeFormatCommand, SelectableData, SelectModeClickPosition, SelectModeSelectionRect, SelectModeTiptapActiveMarks } from "./selectMode";
1
+ import type { SelectModeBoundingRect, DisplayMode, SelectModeSelectionType, SelectModeOptimisticUpdatePayload, SelectModeFormatCommand, SelectableData, SelectModeHoverRect, SelectModeClickPosition, SelectModeSelectionRect, SelectModeTiptapActiveMarks } from "./selectMode";
2
2
  export type InlineEditFeedback = {
3
3
  status: "pending" | "unavailable" | "failed";
4
4
  rect: SelectModeBoundingRect;
@@ -11,6 +11,16 @@ export type IframeRuntimeBuildMetadata = {
11
11
  builtAt: string | null;
12
12
  };
13
13
  export type SelectModeParentMessage = {
14
+ method: "expandToSection";
15
+ data: {
16
+ targetSelector: string;
17
+ };
18
+ } | {
19
+ method: "setSectionPreview";
20
+ data: {
21
+ targetSelector: string | null;
22
+ };
23
+ } | {
14
24
  method: "setDisplayMode";
15
25
  data: {
16
26
  displayMode: DisplayMode;
@@ -67,7 +77,7 @@ export type SelectModeIframeMessage = {
67
77
  } | {
68
78
  method: "hoverElement";
69
79
  data: {
70
- rect: SelectModeBoundingRect | null;
80
+ rect: SelectModeHoverRect | null;
71
81
  };
72
82
  } | {
73
83
  method: "selectedElementRectUpdate";
@@ -1,5 +1,5 @@
1
1
  import { IframeRpcChannelConfigurationError, IframeRpcChannelUnsubscribedError, IframeRpcChannelUnknownMethodError, IframeRpcChannelInvalidInputError, IframeRpcChannelTargetUnavailableError, randomUUID, IframeRpcChannelTimeoutError, IframeRpcChannelRemoteError } from '../../chunk-VUXOGD76.mjs';
2
- import { isNullish } from '../../chunk-H36NDYLG.mjs';
2
+ import { isNullish } from '../../chunk-EXI4VDHP.mjs';
3
3
  import '../../chunk-ILGEM42C.mjs';
4
4
  import '../../chunk-FNTGY7I5.mjs';
5
5
  import '../../chunk-UJCSKKID.mjs';
@@ -1,7 +1,7 @@
1
1
  import '../../chunk-UJCSKKID.mjs';
2
2
 
3
- var migrationCommand = `pnpm add --ignore-workspace @replohq/sdk@latest @replohq/sandbox-runtime@latest && pnpm remove --ignore-workspace canopy-sdk
4
- (if package.json lists "@replohq/canopy-sdk" instead of the "canopy-sdk" alias, run: pnpm remove --ignore-workspace @replohq/canopy-sdk)`;
3
+ var migrationCommand = `pnpm add @replohq/sdk@latest @replohq/sandbox-runtime@latest && pnpm remove canopy-sdk
4
+ (if package.json lists "@replohq/canopy-sdk" instead of the "canopy-sdk" alias, run: pnpm remove @replohq/canopy-sdk)`;
5
5
  var providerComposition = `import { ReploProvider } from "@replohq/sdk/providers/replo-provider";
6
6
  import { SandboxRuntime } from "@replohq/sandbox-runtime";
7
7
 
@@ -1,5 +1,5 @@
1
1
  import { ReploError } from '../../chunk-VUXOGD76.mjs';
2
- import '../../chunk-H36NDYLG.mjs';
2
+ import '../../chunk-EXI4VDHP.mjs';
3
3
  import '../../chunk-ILGEM42C.mjs';
4
4
  import '../../chunk-FNTGY7I5.mjs';
5
5
  import { __commonJS, __toESM } from '../../chunk-UJCSKKID.mjs';
@@ -1,8 +1,8 @@
1
1
  import { getParamSegment, getRouteParams, hasRouteParam, matchSource } from '../../../chunk-VPEVERWE.mjs';
2
- import { parseUrl } from '../../../chunk-3A2F6BOM.mjs';
2
+ import { parseUrl } from '../../../chunk-DINXH6YP.mjs';
3
3
  import '../../../chunk-AKZNN7F2.mjs';
4
4
  import { ReploError } from '../../../chunk-VUXOGD76.mjs';
5
- import '../../../chunk-H36NDYLG.mjs';
5
+ import '../../../chunk-EXI4VDHP.mjs';
6
6
  import '../../../chunk-ILGEM42C.mjs';
7
7
  import '../../../chunk-FNTGY7I5.mjs';
8
8
  import '../../../chunk-UJCSKKID.mjs';
@@ -46,6 +46,17 @@ export declare const selectModeBoundingRectSchema: z.ZodObject<{
46
46
  width: z.ZodNumber;
47
47
  height: z.ZodNumber;
48
48
  }, z.core.$strip>;
49
+ export declare const selectModeHoverRectSchema: z.ZodObject<{
50
+ x: z.ZodNumber;
51
+ y: z.ZodNumber;
52
+ left: z.ZodNumber;
53
+ top: z.ZodNumber;
54
+ right: z.ZodNumber;
55
+ bottom: z.ZodNumber;
56
+ width: z.ZodNumber;
57
+ height: z.ZodNumber;
58
+ isSection: z.ZodOptional<z.ZodBoolean>;
59
+ }, z.core.$strip>;
49
60
  export declare const selectModeSelectionRectSchema: z.ZodObject<{
50
61
  id: z.ZodString;
51
62
  rect: z.ZodObject<{
@@ -98,12 +109,47 @@ export declare function transformPoint({ point, offset, scale, }: {
98
109
  scale?: number;
99
110
  }): SelectModeClickPosition;
100
111
  export declare function getIframeOffset(iframe: HTMLIFrameElement | null): RectOffset;
112
+ export declare const selectModeImageScopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
113
+ kind: z.ZodLiteral<"all">;
114
+ }, z.core.$strip>, z.ZodObject<{
115
+ kind: z.ZodLiteral<"media">;
116
+ media: z.ZodString;
117
+ }, z.core.$strip>], "kind">;
118
+ export declare const selectModeImageSourceSchema: z.ZodObject<{
119
+ srcSet: z.ZodString;
120
+ sizes: z.ZodString;
121
+ media: z.ZodString;
122
+ type: z.ZodString;
123
+ previewUrl: z.ZodNullable<z.ZodString>;
124
+ }, z.core.$strip>;
125
+ export declare const selectModeImageSchema: z.ZodObject<{
126
+ src: z.ZodString;
127
+ currentSrc: z.ZodString;
128
+ srcSet: z.ZodString;
129
+ sizes: z.ZodString;
130
+ previewUrl: z.ZodNullable<z.ZodString>;
131
+ sources: z.ZodArray<z.ZodObject<{
132
+ srcSet: z.ZodString;
133
+ sizes: z.ZodString;
134
+ media: z.ZodString;
135
+ type: z.ZodString;
136
+ previewUrl: z.ZodNullable<z.ZodString>;
137
+ }, z.core.$strip>>;
138
+ }, z.core.$strip>;
139
+ export declare const selectModeVideoSchema: z.ZodObject<{
140
+ src: z.ZodString;
141
+ currentSrc: z.ZodString;
142
+ }, z.core.$strip>;
101
143
  export declare const selectedElementSchema: z.ZodObject<{
102
144
  kind: z.ZodLiteral<"react-element">;
103
145
  selector: z.ZodString;
146
+ section: z.ZodOptional<z.ZodObject<{
147
+ selector: z.ZodString;
148
+ }, z.core.$strip>>;
104
149
  tagName: z.ZodString;
105
150
  elementType: z.ZodString;
106
151
  textContent: z.ZodNullable<z.ZodString>;
152
+ sectionLabel: z.ZodOptional<z.ZodString>;
107
153
  rect: z.ZodObject<{
108
154
  x: z.ZodNumber;
109
155
  y: z.ZodNumber;
@@ -120,6 +166,24 @@ export declare const selectedElementSchema: z.ZodObject<{
120
166
  lineHeight: z.ZodNumber;
121
167
  }, z.core.$strip>>;
122
168
  outerHTML: z.ZodString;
169
+ image: z.ZodOptional<z.ZodObject<{
170
+ src: z.ZodString;
171
+ currentSrc: z.ZodString;
172
+ srcSet: z.ZodString;
173
+ sizes: z.ZodString;
174
+ previewUrl: z.ZodNullable<z.ZodString>;
175
+ sources: z.ZodArray<z.ZodObject<{
176
+ srcSet: z.ZodString;
177
+ sizes: z.ZodString;
178
+ media: z.ZodString;
179
+ type: z.ZodString;
180
+ previewUrl: z.ZodNullable<z.ZodString>;
181
+ }, z.core.$strip>>;
182
+ }, z.core.$strip>>;
183
+ video: z.ZodOptional<z.ZodObject<{
184
+ src: z.ZodString;
185
+ currentSrc: z.ZodString;
186
+ }, z.core.$strip>>;
123
187
  definedStyles: z.ZodDefault<z.ZodArray<z.ZodObject<{
124
188
  property: z.ZodString;
125
189
  variant: z.ZodNullable<z.ZodObject<{
@@ -133,6 +197,7 @@ export declare const selectedElementSchema: z.ZodObject<{
133
197
  raw: z.ZodString;
134
198
  resolved: z.ZodString;
135
199
  }, z.core.$strip>>>;
200
+ authoredStyles: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
136
201
  inheritedStyles: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
137
202
  clickPosition: z.ZodObject<{
138
203
  x: z.ZodNumber;
@@ -185,9 +250,13 @@ export declare const selectableDataPayloadSchema: z.ZodDiscriminatedUnion<[z.Zod
185
250
  export declare const selectableDataSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
186
251
  kind: z.ZodLiteral<"react-element">;
187
252
  selector: z.ZodString;
253
+ section: z.ZodOptional<z.ZodObject<{
254
+ selector: z.ZodString;
255
+ }, z.core.$strip>>;
188
256
  tagName: z.ZodString;
189
257
  elementType: z.ZodString;
190
258
  textContent: z.ZodNullable<z.ZodString>;
259
+ sectionLabel: z.ZodOptional<z.ZodString>;
191
260
  rect: z.ZodObject<{
192
261
  x: z.ZodNumber;
193
262
  y: z.ZodNumber;
@@ -204,6 +273,24 @@ export declare const selectableDataSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
204
273
  lineHeight: z.ZodNumber;
205
274
  }, z.core.$strip>>;
206
275
  outerHTML: z.ZodString;
276
+ image: z.ZodOptional<z.ZodObject<{
277
+ src: z.ZodString;
278
+ currentSrc: z.ZodString;
279
+ srcSet: z.ZodString;
280
+ sizes: z.ZodString;
281
+ previewUrl: z.ZodNullable<z.ZodString>;
282
+ sources: z.ZodArray<z.ZodObject<{
283
+ srcSet: z.ZodString;
284
+ sizes: z.ZodString;
285
+ media: z.ZodString;
286
+ type: z.ZodString;
287
+ previewUrl: z.ZodNullable<z.ZodString>;
288
+ }, z.core.$strip>>;
289
+ }, z.core.$strip>>;
290
+ video: z.ZodOptional<z.ZodObject<{
291
+ src: z.ZodString;
292
+ currentSrc: z.ZodString;
293
+ }, z.core.$strip>>;
207
294
  definedStyles: z.ZodDefault<z.ZodArray<z.ZodObject<{
208
295
  property: z.ZodString;
209
296
  variant: z.ZodNullable<z.ZodObject<{
@@ -217,6 +304,7 @@ export declare const selectableDataSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
217
304
  raw: z.ZodString;
218
305
  resolved: z.ZodString;
219
306
  }, z.core.$strip>>>;
307
+ authoredStyles: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
220
308
  inheritedStyles: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
221
309
  clickPosition: z.ZodObject<{
222
310
  x: z.ZodNumber;
@@ -259,6 +347,7 @@ export type SelectModeBoundingRect = z.infer<typeof selectModeBoundingRectSchema
259
347
  export type SelectModeClickPosition = z.infer<typeof selectModeClickPositionSchema>;
260
348
  export type SelectableData = z.infer<typeof selectableDataSchema>;
261
349
  export type SelectableDataPayload = z.infer<typeof selectableDataPayloadSchema>;
350
+ export declare function isSelectedSection(data: SelectableData): boolean;
262
351
  export declare function transformSelectedElement({ element, offset, scale, }: {
263
352
  element: z.infer<typeof selectedElementSchema>;
264
353
  offset: RectOffset;
@@ -274,6 +363,22 @@ export declare function readSelectablePayload(rawPayload: string | null): {
274
363
  label: string;
275
364
  } | null;
276
365
  export declare const selectModeOptimisticUpdatePayloadSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
366
+ kind: z.ZodLiteral<"image">;
367
+ image: z.ZodObject<{
368
+ src: z.ZodString;
369
+ currentSrc: z.ZodString;
370
+ srcSet: z.ZodString;
371
+ sizes: z.ZodString;
372
+ previewUrl: z.ZodNullable<z.ZodString>;
373
+ sources: z.ZodArray<z.ZodObject<{
374
+ srcSet: z.ZodString;
375
+ sizes: z.ZodString;
376
+ media: z.ZodString;
377
+ type: z.ZodString;
378
+ previewUrl: z.ZodNullable<z.ZodString>;
379
+ }, z.core.$strip>>;
380
+ }, z.core.$strip>;
381
+ }, z.core.$strip>, z.ZodObject<{
277
382
  kind: z.ZodLiteral<"css">;
278
383
  fontSource: z.ZodOptional<z.ZodEnum<{
279
384
  google: "google";
@@ -347,9 +452,13 @@ export declare const selectModeSelectionSchema: z.ZodDiscriminatedUnion<[z.ZodOb
347
452
  data: z.ZodDiscriminatedUnion<[z.ZodObject<{
348
453
  kind: z.ZodLiteral<"react-element">;
349
454
  selector: z.ZodString;
455
+ section: z.ZodOptional<z.ZodObject<{
456
+ selector: z.ZodString;
457
+ }, z.core.$strip>>;
350
458
  tagName: z.ZodString;
351
459
  elementType: z.ZodString;
352
460
  textContent: z.ZodNullable<z.ZodString>;
461
+ sectionLabel: z.ZodOptional<z.ZodString>;
353
462
  rect: z.ZodObject<{
354
463
  x: z.ZodNumber;
355
464
  y: z.ZodNumber;
@@ -366,6 +475,24 @@ export declare const selectModeSelectionSchema: z.ZodDiscriminatedUnion<[z.ZodOb
366
475
  lineHeight: z.ZodNumber;
367
476
  }, z.core.$strip>>;
368
477
  outerHTML: z.ZodString;
478
+ image: z.ZodOptional<z.ZodObject<{
479
+ src: z.ZodString;
480
+ currentSrc: z.ZodString;
481
+ srcSet: z.ZodString;
482
+ sizes: z.ZodString;
483
+ previewUrl: z.ZodNullable<z.ZodString>;
484
+ sources: z.ZodArray<z.ZodObject<{
485
+ srcSet: z.ZodString;
486
+ sizes: z.ZodString;
487
+ media: z.ZodString;
488
+ type: z.ZodString;
489
+ previewUrl: z.ZodNullable<z.ZodString>;
490
+ }, z.core.$strip>>;
491
+ }, z.core.$strip>>;
492
+ video: z.ZodOptional<z.ZodObject<{
493
+ src: z.ZodString;
494
+ currentSrc: z.ZodString;
495
+ }, z.core.$strip>>;
369
496
  definedStyles: z.ZodDefault<z.ZodArray<z.ZodObject<{
370
497
  property: z.ZodString;
371
498
  variant: z.ZodNullable<z.ZodObject<{
@@ -379,6 +506,7 @@ export declare const selectModeSelectionSchema: z.ZodDiscriminatedUnion<[z.ZodOb
379
506
  raw: z.ZodString;
380
507
  resolved: z.ZodString;
381
508
  }, z.core.$strip>>>;
509
+ authoredStyles: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
382
510
  inheritedStyles: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
383
511
  clickPosition: z.ZodObject<{
384
512
  x: z.ZodNumber;
@@ -432,9 +560,13 @@ export declare const selectModeSelectionSchema: z.ZodDiscriminatedUnion<[z.ZodOb
432
560
  items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
433
561
  kind: z.ZodLiteral<"react-element">;
434
562
  selector: z.ZodString;
563
+ section: z.ZodOptional<z.ZodObject<{
564
+ selector: z.ZodString;
565
+ }, z.core.$strip>>;
435
566
  tagName: z.ZodString;
436
567
  elementType: z.ZodString;
437
568
  textContent: z.ZodNullable<z.ZodString>;
569
+ sectionLabel: z.ZodOptional<z.ZodString>;
438
570
  rect: z.ZodObject<{
439
571
  x: z.ZodNumber;
440
572
  y: z.ZodNumber;
@@ -451,6 +583,24 @@ export declare const selectModeSelectionSchema: z.ZodDiscriminatedUnion<[z.ZodOb
451
583
  lineHeight: z.ZodNumber;
452
584
  }, z.core.$strip>>;
453
585
  outerHTML: z.ZodString;
586
+ image: z.ZodOptional<z.ZodObject<{
587
+ src: z.ZodString;
588
+ currentSrc: z.ZodString;
589
+ srcSet: z.ZodString;
590
+ sizes: z.ZodString;
591
+ previewUrl: z.ZodNullable<z.ZodString>;
592
+ sources: z.ZodArray<z.ZodObject<{
593
+ srcSet: z.ZodString;
594
+ sizes: z.ZodString;
595
+ media: z.ZodString;
596
+ type: z.ZodString;
597
+ previewUrl: z.ZodNullable<z.ZodString>;
598
+ }, z.core.$strip>>;
599
+ }, z.core.$strip>>;
600
+ video: z.ZodOptional<z.ZodObject<{
601
+ src: z.ZodString;
602
+ currentSrc: z.ZodString;
603
+ }, z.core.$strip>>;
454
604
  definedStyles: z.ZodDefault<z.ZodArray<z.ZodObject<{
455
605
  property: z.ZodString;
456
606
  variant: z.ZodNullable<z.ZodObject<{
@@ -464,6 +614,7 @@ export declare const selectModeSelectionSchema: z.ZodDiscriminatedUnion<[z.ZodOb
464
614
  raw: z.ZodString;
465
615
  resolved: z.ZodString;
466
616
  }, z.core.$strip>>>;
617
+ authoredStyles: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
467
618
  inheritedStyles: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
468
619
  clickPosition: z.ZodObject<{
469
620
  x: z.ZodNumber;
@@ -1,6 +1,6 @@
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-VQASHJRQ.mjs';
1
+ export { SELECT_MODE_SELECTABLE_ATTRIBUTE, SELECT_MODE_SELECTABLE_PAYLOAD_ATTRIBUTE, displayModeSchema, getIframeOffset, isSelectedSection, readSelectablePayload, selectModeBoundingRectSchema, selectModeClickPositionSchema, selectModeDefinedStyleSchema, selectModeFiberChainEntrySchema, selectModeFormatCommandSchema, selectModeHoverRectSchema, selectModeImageSchema, selectModeImageScopeSchema, selectModeImageSourceSchema, selectModeInlineTextStatusSchema, selectModeOptimisticUpdatePayloadSchema, selectModeSelectionRectSchema, selectModeSelectionSchema, selectModeSelectionTypeSchema, selectModeSourceLocationSchema, selectModeStyleAtRuleSchema, selectModeStyleVariantSchema, selectModeTextMetricsSchema, selectModeTiptapActiveMarksSchema, selectModeVideoSchema, selectableDataPayloadSchema, selectableDataSchema, selectablePlanDataSchema, selectablePlanPayloadSchema, selectedElementSchema, transformPoint, transformRect, transformSelectableData, transformSelectedElement } from '../../chunk-RLFL66ST.mjs';
2
2
  import '../../chunk-HGXQNZW7.mjs';
3
- import '../../chunk-H36NDYLG.mjs';
3
+ import '../../chunk-EXI4VDHP.mjs';
4
4
  import '../../chunk-ILGEM42C.mjs';
5
5
  import '../../chunk-FNTGY7I5.mjs';
6
6
  import '../../chunk-UJCSKKID.mjs';