@contentstack/studio-client 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -0
- package/dist/breakpoints/BreakpointManager.js +65 -0
- package/dist/breakpoints/BreakpointManager.js.map +1 -0
- package/dist/breakpoints/breakpoint.constant.js +31 -0
- package/dist/breakpoints/breakpoint.constant.js.map +1 -0
- package/dist/breakpoints/breakpoint.js +41 -0
- package/dist/breakpoints/breakpoint.js.map +1 -0
- package/dist/canvas/canvas.type.js +10 -0
- package/dist/canvas/canvas.type.js.map +1 -0
- package/dist/canvas/canvas.utils.js +127 -0
- package/dist/canvas/canvas.utils.js.map +1 -0
- package/dist/composable-studio/data/pre-process-static-values.js +158 -0
- package/dist/composable-studio/data/pre-process-static-values.js.map +1 -0
- package/dist/composable-studio/initializer-sdk.js +33 -0
- package/dist/composable-studio/initializer-sdk.js.map +1 -0
- package/dist/composable-studio/sdk.js +527 -0
- package/dist/composable-studio/sdk.js.map +1 -0
- package/dist/composable-studio/weak-maps.js +7 -0
- package/dist/composable-studio/weak-maps.js.map +1 -0
- package/dist/config/config.constant.js +4 -0
- package/dist/config/config.constant.js.map +1 -0
- package/dist/config/config.schema.js +40 -0
- package/dist/config/config.schema.js.map +1 -0
- package/dist/config/default-config.js +20 -0
- package/dist/config/default-config.js.map +1 -0
- package/dist/config/process-user-config.js +43 -0
- package/dist/config/process-user-config.js.map +1 -0
- package/dist/config/stack-sdk-wrapper.js +128 -0
- package/dist/config/stack-sdk-wrapper.js.map +1 -0
- package/dist/context-menu/context-menu.js +43 -0
- package/dist/context-menu/context-menu.js.map +1 -0
- package/dist/design/create-class-name-uid.js +13 -0
- package/dist/design/create-class-name-uid.js.map +1 -0
- package/dist/design/fonts/fonts.constant.js +16 -0
- package/dist/design/fonts/fonts.constant.js.map +1 -0
- package/dist/design/fonts/index.js +62 -0
- package/dist/design/fonts/index.js.map +1 -0
- package/dist/design/handle-active-style-change.js +50 -0
- package/dist/design/handle-active-style-change.js.map +1 -0
- package/dist/dnd/dnd-event.js +29 -0
- package/dist/dnd/dnd-event.js.map +1 -0
- package/dist/dnd/dnd-manager.js +144 -0
- package/dist/dnd/dnd-manager.js.map +1 -0
- package/dist/dnd/utils.js +50 -0
- package/dist/dnd/utils.js.map +1 -0
- package/dist/emitted-events/event-emitter.js +7 -0
- package/dist/emitted-events/event-emitter.js.map +1 -0
- package/dist/emitted-events/events.constant.js +7 -0
- package/dist/emitted-events/events.constant.js.map +1 -0
- package/dist/get-active-node-screenshot/get-node-screenshot-event.js +30 -0
- package/dist/get-active-node-screenshot/get-node-screenshot-event.js.map +1 -0
- package/dist/get-composition-from-slug/get-composition-from-slug.js +59 -0
- package/dist/get-composition-from-slug/get-composition-from-slug.js.map +1 -0
- package/dist/hidden-element-notification/hidden-element-notification-event.js +26 -0
- package/dist/hidden-element-notification/hidden-element-notification-event.js.map +1 -0
- package/dist/highlight-node/highlight-node-manager.js +307 -0
- package/dist/highlight-node/highlight-node-manager.js.map +1 -0
- package/dist/highlight-node/highlight-node.js +213 -0
- package/dist/highlight-node/highlight-node.js.map +1 -0
- package/dist/highlight-spacing/highlight-spacing-events.js +31 -0
- package/dist/highlight-spacing/highlight-spacing-events.js.map +1 -0
- package/dist/index.d.ts +719 -0
- package/dist/index.js +43 -0
- package/dist/index.js.map +1 -0
- package/dist/json-rte-registry/index.js +47 -0
- package/dist/json-rte-registry/index.js.map +1 -0
- package/dist/utils/canvas.js +128 -0
- package/dist/utils/canvas.js.map +1 -0
- package/dist/utils/composable-studio-error.js +27 -0
- package/dist/utils/composable-studio-error.js.map +1 -0
- package/dist/utils/condition-block.utils.js +23 -0
- package/dist/utils/condition-block.utils.js.map +1 -0
- package/dist/utils/conditionBlock.js +127 -0
- package/dist/utils/conditionBlock.js.map +1 -0
- package/dist/utils/constants.js +19 -0
- package/dist/utils/constants.js.map +1 -0
- package/dist/utils/convertCompositionQueryInputToCompositionQuery.js +19 -0
- package/dist/utils/convertCompositionQueryInputToCompositionQuery.js.map +1 -0
- package/dist/utils/editor-utils.js +86 -0
- package/dist/utils/editor-utils.js.map +1 -0
- package/dist/utils/is-composition-being-edited.js +12 -0
- package/dist/utils/is-composition-being-edited.js.map +1 -0
- package/dist/utils/is-inside-visual-builder-frame.js +12 -0
- package/dist/utils/is-inside-visual-builder-frame.js.map +1 -0
- package/dist/utils/query-param.js +33 -0
- package/dist/utils/query-param.js.map +1 -0
- package/dist/utils/reference_fetcher.js +214 -0
- package/dist/utils/reference_fetcher.js.map +1 -0
- package/dist/utils/sdk.js +66 -0
- package/dist/utils/sdk.js.map +1 -0
- package/dist/visual-builder/composition-save-event.js +13 -0
- package/dist/visual-builder/composition-save-event.js.map +1 -0
- package/package.json +57 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,719 @@
|
|
|
1
|
+
import * as _contentstack_studio_internal from '@contentstack/studio-internal';
|
|
2
|
+
import { Node, PathNode, Path, Descendant, Operation, BindingType, Condition } from '@contentstack/studio-internal';
|
|
3
|
+
import * as _contentstack_studio_registry from '@contentstack/studio-registry';
|
|
4
|
+
import { StudioSpecData, RawStaticValue, ICSEntryReference, StaticValue, BreakpointInput, Breakpoint } from '@contentstack/studio-registry';
|
|
5
|
+
export { Breakpoint } from '@contentstack/studio-registry';
|
|
6
|
+
import * as _contentstack_studio_messenger from '@contentstack/studio-messenger';
|
|
7
|
+
import { CompositionQueryInput, ComposableStudioQueryParams, CompositionQuery, ComposableStudioQueryParamsKeys, HiddenElementNotificationEventData, POST_MESSAGE_EVENTS } from '@contentstack/studio-messenger';
|
|
8
|
+
export { IS_BROWSER } from '@contentstack/studio-messenger';
|
|
9
|
+
import { z } from 'zod';
|
|
10
|
+
import deliverySdk, { BaseAsset } from '@contentstack/delivery-sdk';
|
|
11
|
+
import { Stack } from 'contentstack';
|
|
12
|
+
import { InitMessage } from '@contentstack/studio-message-types/base';
|
|
13
|
+
import { HitboxDetails, SerializedEvent, RefetchSpecEventData, ApplySymbolOperationEventData } from '@contentstack/studio-message-types/latest';
|
|
14
|
+
export { ActiveBreakpointEventPayload, BaseHighlightEventPayload, ChangeActiveStyleGroupPayload, ComputedStyleSection, DraggerPosition, HighlightActiveNodeEventPayload, HighlightAncestorsEventPayload, HighlightFocusedNodeEventPayload, HighlightNodeEventPayload, HighlightSlotNodeEventPayload, HighlightStyleNodeEventPayload, HitboxDetails, MouseMoveEventPayload, MouseUpEventPayload, RefetchSpecEventData, RequestHighlightNodeEventPayload, SetCursorTypeEventPayload, TARGET_NODE, UpdateStyleEventPayload, ValidatePropEventPayload, handleActiveNodePayload, handleActiveSlotNode, handleFocusedNodePayload } from '@contentstack/studio-message-types/latest';
|
|
15
|
+
import { EventEmitter } from 'eventemitter3';
|
|
16
|
+
import { IJsonToHtmlOptions } from '@contentstack/json-rte-serializer';
|
|
17
|
+
|
|
18
|
+
type DeepRequired<T> = Required<{
|
|
19
|
+
[K in keyof T]: T[K] extends Required<T[K]> ? T[K] : DeepRequired<T[K]>;
|
|
20
|
+
}>;
|
|
21
|
+
|
|
22
|
+
declare const userConfigSchema: z.ZodObject<{
|
|
23
|
+
/**
|
|
24
|
+
* Visual type to be used for storing the UI
|
|
25
|
+
*/
|
|
26
|
+
contentTypeUid: z.ZodOptional<z.ZodString>;
|
|
27
|
+
stackSdk: z.ZodType<any, z.ZodTypeDef, any>;
|
|
28
|
+
cslp: z.ZodOptional<z.ZodObject<{
|
|
29
|
+
appendTags: z.ZodOptional<z.ZodBoolean>;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
appendTags?: boolean | undefined;
|
|
32
|
+
}, {
|
|
33
|
+
appendTags?: boolean | undefined;
|
|
34
|
+
}>>;
|
|
35
|
+
openInStudioButton: z.ZodOptional<z.ZodObject<{
|
|
36
|
+
enable: z.ZodOptional<z.ZodBoolean>;
|
|
37
|
+
position: z.ZodOptional<z.ZodEnum<["top", "top-left", "top-right", "top-center", "bottom", "bottom-left", "bottom-right", "bottom-center"]>>;
|
|
38
|
+
}, "strip", z.ZodTypeAny, {
|
|
39
|
+
enable?: boolean | undefined;
|
|
40
|
+
position?: "top" | "top-left" | "top-right" | "top-center" | "bottom" | "bottom-left" | "bottom-right" | "bottom-center" | undefined;
|
|
41
|
+
}, {
|
|
42
|
+
enable?: boolean | undefined;
|
|
43
|
+
position?: "top" | "top-left" | "top-right" | "top-center" | "bottom" | "bottom-left" | "bottom-right" | "bottom-center" | undefined;
|
|
44
|
+
}>>;
|
|
45
|
+
}, "strip", z.ZodTypeAny, {
|
|
46
|
+
contentTypeUid?: string | undefined;
|
|
47
|
+
stackSdk?: any;
|
|
48
|
+
cslp?: {
|
|
49
|
+
appendTags?: boolean | undefined;
|
|
50
|
+
} | undefined;
|
|
51
|
+
openInStudioButton?: {
|
|
52
|
+
enable?: boolean | undefined;
|
|
53
|
+
position?: "top" | "top-left" | "top-right" | "top-center" | "bottom" | "bottom-left" | "bottom-right" | "bottom-center" | undefined;
|
|
54
|
+
} | undefined;
|
|
55
|
+
}, {
|
|
56
|
+
contentTypeUid?: string | undefined;
|
|
57
|
+
stackSdk?: any;
|
|
58
|
+
cslp?: {
|
|
59
|
+
appendTags?: boolean | undefined;
|
|
60
|
+
} | undefined;
|
|
61
|
+
openInStudioButton?: {
|
|
62
|
+
enable?: boolean | undefined;
|
|
63
|
+
position?: "top" | "top-left" | "top-right" | "top-center" | "bottom" | "bottom-left" | "bottom-right" | "bottom-center" | undefined;
|
|
64
|
+
} | undefined;
|
|
65
|
+
}>;
|
|
66
|
+
|
|
67
|
+
type JSStack = Stack;
|
|
68
|
+
type TSStack = ReturnType<(typeof deliverySdk)["stack"]>;
|
|
69
|
+
declare class StackSDK {
|
|
70
|
+
sdk: JSStack | TSStack;
|
|
71
|
+
constructor(sdk: JSStack | TSStack);
|
|
72
|
+
isJavaScriptSDK(sdk: Stack | ReturnType<(typeof deliverySdk)["stack"]>): sdk is Stack;
|
|
73
|
+
livePreviewQuery(livePreviewHash: string): void;
|
|
74
|
+
ctQuery(contentTypeUid: string, options?: {
|
|
75
|
+
includeAll?: boolean;
|
|
76
|
+
includeAllDepth?: number;
|
|
77
|
+
references?: string[];
|
|
78
|
+
only?: [string, string][];
|
|
79
|
+
variantAlias?: string;
|
|
80
|
+
}): any;
|
|
81
|
+
entryQuery(contentTypeUid: string, entryUID: string, options?: {
|
|
82
|
+
only?: [string, string][];
|
|
83
|
+
variantAlias?: string;
|
|
84
|
+
}): any;
|
|
85
|
+
private isJsQuery;
|
|
86
|
+
where(query: ReturnType<StackSDK["ctQuery"]>, field: string, value: any): any;
|
|
87
|
+
get apiKey(): string;
|
|
88
|
+
get livePreviewConfig(): {
|
|
89
|
+
host?: string;
|
|
90
|
+
preview_token?: string;
|
|
91
|
+
enable?: boolean;
|
|
92
|
+
} | undefined;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
interface Config extends DeepRequired<Omit<UserConfig, "stackSdk">> {
|
|
96
|
+
stackSdk: StackSDK;
|
|
97
|
+
}
|
|
98
|
+
type LightConfig = Pick<Config, "openInStudioButton" | "contentTypeUid" | "cslp">;
|
|
99
|
+
type UserConfig = z.infer<typeof userConfigSchema>;
|
|
100
|
+
|
|
101
|
+
declare function getDefaultConfig(): Config;
|
|
102
|
+
|
|
103
|
+
declare const isBrowser: () => boolean;
|
|
104
|
+
declare const INCLUDE_DEPTH_COUNT = 5;
|
|
105
|
+
declare const COMPOSABLE_DATA_ATTRIBUTES: {
|
|
106
|
+
readonly BUILDER: "data-composable-studio-builder";
|
|
107
|
+
readonly PLACEHOLDER: "data-composable-studio-placeholder";
|
|
108
|
+
readonly LEAF: "data-composable-studio-leaf";
|
|
109
|
+
readonly NODE: "data-composable-studio-node";
|
|
110
|
+
readonly SLOT: "data-composable-studio-slot";
|
|
111
|
+
readonly ID: "data-composable-studio-id";
|
|
112
|
+
readonly SLOT_UID: "data-composable-studio-slot-uid";
|
|
113
|
+
readonly CSLP: "data-cslp";
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
declare const RendererMode: {
|
|
117
|
+
readonly PREVIEW: "preview";
|
|
118
|
+
readonly EDIT: "edit";
|
|
119
|
+
readonly SHOW_EDIT_BUTTON: "show_edit_button";
|
|
120
|
+
};
|
|
121
|
+
type ClientPreviewNodeInternalAttributes = {
|
|
122
|
+
[COMPOSABLE_DATA_ATTRIBUTES.CSLP]?: string;
|
|
123
|
+
};
|
|
124
|
+
type ClientEditableNodeInternalAttributes = {
|
|
125
|
+
[COMPOSABLE_DATA_ATTRIBUTES.BUILDER]: boolean;
|
|
126
|
+
[COMPOSABLE_DATA_ATTRIBUTES.NODE]: boolean;
|
|
127
|
+
[COMPOSABLE_DATA_ATTRIBUTES.ID]: string;
|
|
128
|
+
[COMPOSABLE_DATA_ATTRIBUTES.CSLP]?: string;
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
declare const findNearestBuilderNode: (ele: HTMLElement) => HTMLElement | null;
|
|
132
|
+
declare const findNearestSlotNode: (ele: HTMLElement) => HTMLElement | null;
|
|
133
|
+
declare const hasSlotDropzone: (event: MouseEvent) => boolean;
|
|
134
|
+
declare const getHitboxDirection: (event: MouseEvent, nodeBoundingBox: DOMRect) => "top" | "bottom" | "left" | "right";
|
|
135
|
+
declare const toggleNodeVisible: (node: Element, visible: boolean) => void;
|
|
136
|
+
declare const getComposableElement: (uid: string) => HTMLElement;
|
|
137
|
+
declare const getHitboxDetails: (event: MouseEvent) => HitboxDetails;
|
|
138
|
+
declare const getComputedStyles: (event: MouseEvent) => Record<string, string> | null;
|
|
139
|
+
declare const serializeEvent: (event: MouseEvent) => SerializedEvent;
|
|
140
|
+
|
|
141
|
+
type StudioSdk = ReturnType<typeof studioSdk.init>;
|
|
142
|
+
type ComposableStudioLightSdk = ReturnType<typeof studioSdk.lightInit>;
|
|
143
|
+
/**
|
|
144
|
+
* It must be wrapped by a root node.
|
|
145
|
+
*/
|
|
146
|
+
type CompositionEntryIncompleteUi = string;
|
|
147
|
+
interface CompositionEntry {
|
|
148
|
+
title: string;
|
|
149
|
+
connected_content_type?: string;
|
|
150
|
+
composable_uid: string;
|
|
151
|
+
tags: string[];
|
|
152
|
+
locale: string;
|
|
153
|
+
uid: string;
|
|
154
|
+
created_by: string;
|
|
155
|
+
updated_by: string;
|
|
156
|
+
created_at: string;
|
|
157
|
+
updated_at: string;
|
|
158
|
+
url?: string;
|
|
159
|
+
ui: CompositionEntryIncompleteUi;
|
|
160
|
+
data_sources: string;
|
|
161
|
+
static_value?: RawStaticValue;
|
|
162
|
+
symbols?: ICSEntryReference[];
|
|
163
|
+
}
|
|
164
|
+
interface SymbolEntry extends Omit<CompositionEntry, "ui"> {
|
|
165
|
+
ui_preview?: BaseAsset;
|
|
166
|
+
ui: Node;
|
|
167
|
+
tags: ["symbol"];
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* This spec is the one we get from our `fetchSpec()` method.
|
|
171
|
+
* It contains all the information we can derive from the compositionEntry.
|
|
172
|
+
* It lacks information like state data, which is resolved by the Composable component.
|
|
173
|
+
*/
|
|
174
|
+
interface StudioSpec {
|
|
175
|
+
data: StudioSpecData;
|
|
176
|
+
ui: Node;
|
|
177
|
+
compositionEntry: CompositionEntry;
|
|
178
|
+
symbols?: SymbolEntry[];
|
|
179
|
+
config?: LightConfig;
|
|
180
|
+
}
|
|
181
|
+
type SearchQueryInput = (Partial<ComposableStudioQueryParams> & {
|
|
182
|
+
[key: string]: string | string[] | undefined;
|
|
183
|
+
}) | URLSearchParams | string;
|
|
184
|
+
type CompositionQueryForSSR = CompositionQuery & {
|
|
185
|
+
/**
|
|
186
|
+
* Since the search query won't be available away from the server in the SSR environment,
|
|
187
|
+
* we need to pass the search query to the client.
|
|
188
|
+
*/
|
|
189
|
+
searchQuery: SearchQueryInput;
|
|
190
|
+
};
|
|
191
|
+
type CompositionQueryForSSRInput = CompositionQueryInput & {
|
|
192
|
+
/**
|
|
193
|
+
* Since the search query won't be available away from the server in the SSR environment,
|
|
194
|
+
* we need to pass the search query to the client.
|
|
195
|
+
*/
|
|
196
|
+
searchQuery: SearchQueryInput;
|
|
197
|
+
};
|
|
198
|
+
type CompositionQueryOptions = {
|
|
199
|
+
/**
|
|
200
|
+
* Support for fetching data of a specified variant.
|
|
201
|
+
*/
|
|
202
|
+
variantAlias?: string;
|
|
203
|
+
extendQuery?: {
|
|
204
|
+
[ct_uid: string]: {
|
|
205
|
+
includeReferences?: string[];
|
|
206
|
+
only?: (string | [string, string])[];
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
/**
|
|
211
|
+
* The query string we get after running URLSearchParams.toString()
|
|
212
|
+
*/
|
|
213
|
+
type URLSearchParamsString = string;
|
|
214
|
+
type StudioComponentFetchOptions = {
|
|
215
|
+
searchQuery: URLSearchParamsString;
|
|
216
|
+
compositionQuery: CompositionQuery;
|
|
217
|
+
config: LightConfig;
|
|
218
|
+
options?: CompositionQueryOptions;
|
|
219
|
+
mode: (typeof RendererMode)[keyof typeof RendererMode];
|
|
220
|
+
};
|
|
221
|
+
/**
|
|
222
|
+
* This object represents the information required to render the component.
|
|
223
|
+
* You can get this object by calling the spec fetcher methods or hooks.
|
|
224
|
+
*/
|
|
225
|
+
type StudioComponentSpecOptions = {
|
|
226
|
+
/**
|
|
227
|
+
* When the componen is rendered in SSR within the studio,
|
|
228
|
+
* we get the spec as null. YOU SHOULD NOT PASS IT AS NULL.
|
|
229
|
+
*/
|
|
230
|
+
spec: StudioSpec | null;
|
|
231
|
+
fetchOptions: StudioComponentFetchOptions;
|
|
232
|
+
/**
|
|
233
|
+
* This is used to determine whether the spec is available.
|
|
234
|
+
* If the spec is not available, we can show a 404 page.
|
|
235
|
+
*/
|
|
236
|
+
hasSpec: boolean;
|
|
237
|
+
/**
|
|
238
|
+
* This is used to determine whether the template (connected Template data)
|
|
239
|
+
* is available.
|
|
240
|
+
* If the template is not available, we can show a 404 page.
|
|
241
|
+
*
|
|
242
|
+
* This value is false if the template is not available or the composition
|
|
243
|
+
* is not connected to a template.
|
|
244
|
+
*/
|
|
245
|
+
hasTemplate: boolean;
|
|
246
|
+
/**
|
|
247
|
+
* The SEO metadata for the composition. This data can be added to the head
|
|
248
|
+
* of the HTML.
|
|
249
|
+
*/
|
|
250
|
+
seo: SeoMetadata | null;
|
|
251
|
+
};
|
|
252
|
+
interface SeoMetadata {
|
|
253
|
+
pageTitle: string;
|
|
254
|
+
pageDescription: string;
|
|
255
|
+
openGraphImage: string;
|
|
256
|
+
metaProps: MetaProp[];
|
|
257
|
+
}
|
|
258
|
+
interface MetaProp {
|
|
259
|
+
name: string;
|
|
260
|
+
value: string;
|
|
261
|
+
type: "text" | "number";
|
|
262
|
+
defaultValue: string;
|
|
263
|
+
previewValue: string;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
declare const studioSdk: {
|
|
267
|
+
init(userConfig: UserConfig): {
|
|
268
|
+
internal: {
|
|
269
|
+
getConfig(): Config;
|
|
270
|
+
isInsideStudioFrame: () => boolean;
|
|
271
|
+
fetchSpec: (queryOptions: _contentstack_studio_messenger.CompositionQuery, options?: CompositionQueryOptions) => Promise<StudioSpec>;
|
|
272
|
+
fetchTemplateEntry: (options: {
|
|
273
|
+
connected_content_type: string;
|
|
274
|
+
compositionQuery: _contentstack_studio_messenger.CompositionQuery;
|
|
275
|
+
includeQueries: string[];
|
|
276
|
+
onlyQueries: [string, string][];
|
|
277
|
+
composableUid: string;
|
|
278
|
+
variantAlias?: string;
|
|
279
|
+
}, data: _contentstack_studio_registry.StudioSpecData) => Promise<void>;
|
|
280
|
+
getSeoMetadata: (ui: _contentstack_studio_internal.Node) => SeoMetadata;
|
|
281
|
+
};
|
|
282
|
+
public: {
|
|
283
|
+
fetchCompositionData: (queryOptions: CompositionQueryForSSRInput, options?: CompositionQueryOptions) => Promise<StudioComponentSpecOptions>;
|
|
284
|
+
getConfig: () => Pick<Config, "contentTypeUid" | "cslp" | "openInStudioButton">;
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
lightInit(userConfig: LightConfig): {
|
|
288
|
+
internal: {
|
|
289
|
+
getConfig: () => Pick<LightConfig, "contentTypeUid" | "cslp" | "openInStudioButton">;
|
|
290
|
+
};
|
|
291
|
+
};
|
|
292
|
+
};
|
|
293
|
+
declare const sendInitMessage: (message: InitMessage) => void;
|
|
294
|
+
|
|
295
|
+
declare const ELEMENT_TO_NODE: WeakMap<HTMLElement, any>;
|
|
296
|
+
declare const NODE_TO_ELEMENT: WeakMap<any, HTMLElement>;
|
|
297
|
+
declare const NODE_TO_PATH_NODE: WeakMap<any, PathNode>;
|
|
298
|
+
declare const NODE_TO_PARENT: WeakMap<any, any>;
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Processes the raw static values and stored them against their static value UID.
|
|
302
|
+
*
|
|
303
|
+
* @param rawStaticValues It converts the raw static values to the required format.
|
|
304
|
+
* @returns The processed static values.
|
|
305
|
+
*
|
|
306
|
+
* @example
|
|
307
|
+
* const data = {
|
|
308
|
+
* text: [{
|
|
309
|
+
* key: "some-unique-key",
|
|
310
|
+
* value: "Some text value"
|
|
311
|
+
* }, {
|
|
312
|
+
* key: "another-unique-key",
|
|
313
|
+
* value: "Another text value"
|
|
314
|
+
* }]
|
|
315
|
+
*
|
|
316
|
+
* console.log(preProcessStaticValues(data));
|
|
317
|
+
*
|
|
318
|
+
* // Output
|
|
319
|
+
* // {
|
|
320
|
+
* // "some-unique-key": "Some text value",
|
|
321
|
+
* // "another-unique-key": "Another text value"
|
|
322
|
+
* // }
|
|
323
|
+
*
|
|
324
|
+
* }
|
|
325
|
+
*/
|
|
326
|
+
declare function preProcessStaticValues(rawStaticValues: RawStaticValue): StaticValue;
|
|
327
|
+
type ParsedStringResult = {
|
|
328
|
+
value: any;
|
|
329
|
+
} & ({
|
|
330
|
+
isValid: false;
|
|
331
|
+
error: string;
|
|
332
|
+
} | {
|
|
333
|
+
isValid: true;
|
|
334
|
+
});
|
|
335
|
+
/**
|
|
336
|
+
* Parses a string value and returns its parsed representation.
|
|
337
|
+
*
|
|
338
|
+
* @param input The string input to parse.
|
|
339
|
+
* @returns An object containing the parsed value, validity status, and optional error message.
|
|
340
|
+
*
|
|
341
|
+
* @example
|
|
342
|
+
* const result = parseStringValue('{"key": "value"}');
|
|
343
|
+
* console.log(result);
|
|
344
|
+
* // Output: { value: { key: 'value' }, isValid: true }
|
|
345
|
+
*/
|
|
346
|
+
declare function parseStringValue(input: string): ParsedStringResult;
|
|
347
|
+
|
|
348
|
+
declare function addContextMenuEventListeners(): {
|
|
349
|
+
removeEventListeners: () => void;
|
|
350
|
+
} | undefined;
|
|
351
|
+
|
|
352
|
+
declare const MAX_SCROLL_SPEED = 100;
|
|
353
|
+
declare const SCROLL_INTERVAL = 50;
|
|
354
|
+
declare const EDGE_PADDING = 50;
|
|
355
|
+
interface MousePosition {
|
|
356
|
+
clientX: number;
|
|
357
|
+
clientY: number;
|
|
358
|
+
}
|
|
359
|
+
declare class DNDManager {
|
|
360
|
+
started: boolean;
|
|
361
|
+
dragging: boolean;
|
|
362
|
+
scrollContainer: HTMLElement | null;
|
|
363
|
+
scrollInterval: ReturnType<typeof setInterval> | undefined;
|
|
364
|
+
startPosition: MousePosition | null;
|
|
365
|
+
hasMoved: boolean;
|
|
366
|
+
mouseDown: boolean;
|
|
367
|
+
constructor();
|
|
368
|
+
handleMouseDown(e: MouseEvent): void;
|
|
369
|
+
handleMouseUp(e: MouseEvent): void;
|
|
370
|
+
handleMouseLeave(e: MouseEvent): void;
|
|
371
|
+
start(e: MouseEvent): void;
|
|
372
|
+
startParent(): void;
|
|
373
|
+
end(): void;
|
|
374
|
+
mouseMove(e: MouseEvent): void;
|
|
375
|
+
get isStarted(): boolean;
|
|
376
|
+
get isDragging(): boolean;
|
|
377
|
+
hasExceededTolerance(start: MousePosition, end: MousePosition): boolean;
|
|
378
|
+
}
|
|
379
|
+
declare const dndManager: DNDManager;
|
|
380
|
+
|
|
381
|
+
declare const dndEventListener: () => {
|
|
382
|
+
removeEventListeners: () => void;
|
|
383
|
+
};
|
|
384
|
+
|
|
385
|
+
declare const getScrollableParent: (el: HTMLElement) => HTMLElement;
|
|
386
|
+
declare const getScrollContainerRect: () => DOMRect | {
|
|
387
|
+
top: number;
|
|
388
|
+
left: number;
|
|
389
|
+
right: number;
|
|
390
|
+
bottom: number;
|
|
391
|
+
width: number;
|
|
392
|
+
height: number;
|
|
393
|
+
} | null;
|
|
394
|
+
declare const getScrollContainer: () => HTMLElement | (Window & typeof globalThis) | null;
|
|
395
|
+
declare const calculateDynamicSpeed: (distance: number, padding: number, maxSpeed: number) => number;
|
|
396
|
+
|
|
397
|
+
declare function handleOnScroll(): void;
|
|
398
|
+
declare function handleResize(): void;
|
|
399
|
+
declare function addHighlightNodeEventListeners(): {
|
|
400
|
+
removeEventListeners: () => void;
|
|
401
|
+
} | undefined;
|
|
402
|
+
|
|
403
|
+
type OnStyleChangeCallback = (options: {
|
|
404
|
+
activeNodeUID: string;
|
|
405
|
+
element: HTMLElement;
|
|
406
|
+
componentClassName: string;
|
|
407
|
+
}) => void;
|
|
408
|
+
declare class HighlightNodeManager {
|
|
409
|
+
activeNodeUID: string | null;
|
|
410
|
+
focusedNodeUID: string | null;
|
|
411
|
+
activeNodePath: Path | null;
|
|
412
|
+
focusedNodePath: Path | null;
|
|
413
|
+
hoveredNodeUID: string | null;
|
|
414
|
+
activeSlotUID: string | null;
|
|
415
|
+
styleGroup: string | null;
|
|
416
|
+
onStyleChangeCallbacks: Set<OnStyleChangeCallback>;
|
|
417
|
+
onActiveNodeChangeCallbacks: Set<(uid: string, path: Path) => void>;
|
|
418
|
+
visible: boolean;
|
|
419
|
+
constructor();
|
|
420
|
+
private setActiveNodeUID;
|
|
421
|
+
private setFocusedNodeUID;
|
|
422
|
+
setHoveredNode(uid: string): void;
|
|
423
|
+
setActiveSlotUID(uid: string | null): void;
|
|
424
|
+
resetActiveNode(): void;
|
|
425
|
+
resetFocusedNode(): void;
|
|
426
|
+
/**
|
|
427
|
+
* Subscribe to changes in the active node.
|
|
428
|
+
*
|
|
429
|
+
* @param callback - Function that will be called whenever the active node changes.
|
|
430
|
+
* The callback receives the UID of the newly active node as a parameter.
|
|
431
|
+
* @param options - Configuration options
|
|
432
|
+
* @param options.syncToExistingValue - When true, the callback will be immediately called
|
|
433
|
+
* with the current active node's UID. When false, the callback will only be called on future changes.
|
|
434
|
+
* Defaults to false.
|
|
435
|
+
*
|
|
436
|
+
* @example
|
|
437
|
+
* ```ts
|
|
438
|
+
* highlightNodeManager.onActiveNodeChange((uid) => {
|
|
439
|
+
* console.log('Active node changed to:', uid);
|
|
440
|
+
* }, { syncToExistingValue: true });
|
|
441
|
+
* ```
|
|
442
|
+
*/
|
|
443
|
+
onActiveNodeChange(callback: (uid: string, path: Path) => void, options: {
|
|
444
|
+
syncToExistingValue: boolean;
|
|
445
|
+
}): void;
|
|
446
|
+
/**
|
|
447
|
+
* Unsubscribe from changes in the active node.
|
|
448
|
+
*
|
|
449
|
+
* @param callback - The callback function to unsubscribe.
|
|
450
|
+
*
|
|
451
|
+
* @example
|
|
452
|
+
* ```ts
|
|
453
|
+
* const onHighlight = (uid: string) => {
|
|
454
|
+
* console.log('Active node changed to:', uid);
|
|
455
|
+
* };
|
|
456
|
+
*
|
|
457
|
+
* highlightNodeManager.onActiveNodeChange(onHighlight);
|
|
458
|
+
* highlightNodeManager.unsubscribeFromActiveNodeChange(onHighlight);
|
|
459
|
+
* ```
|
|
460
|
+
*/
|
|
461
|
+
unsubscribeFromActiveNodeChange(callback: (uid: string, path: Path) => void): void;
|
|
462
|
+
private notifyActiveNodeChange;
|
|
463
|
+
removeNodeHighligher(): void;
|
|
464
|
+
hideActiveNode(): void;
|
|
465
|
+
setStyleGroup: (styleGroup: string | null) => void;
|
|
466
|
+
subscribeToOnStyleChange: (callback: OnStyleChangeCallback) => void;
|
|
467
|
+
unsubscribeFromOnStyleChange: (callback: OnStyleChangeCallback) => void;
|
|
468
|
+
resetStyleGroup(): void;
|
|
469
|
+
setAndHighlightActiveNode(uid: string): void;
|
|
470
|
+
setAndHighlightFocusedNode(uid: string): void;
|
|
471
|
+
setAndHighlightHoveredNode(uid: string): void;
|
|
472
|
+
setAndHighlightStyleNode(styleGroup: string, uid: string): {
|
|
473
|
+
styles: undefined;
|
|
474
|
+
} | {
|
|
475
|
+
styles: Partial<CSSStyleDeclaration>;
|
|
476
|
+
};
|
|
477
|
+
highlightActiveNode(): void;
|
|
478
|
+
highlightFocusedNode(): void;
|
|
479
|
+
highlightNodeOnHover(): void;
|
|
480
|
+
highlightStyleNode(): void;
|
|
481
|
+
sendStylesToClient(): {
|
|
482
|
+
styles: undefined;
|
|
483
|
+
} | {
|
|
484
|
+
styles: Partial<CSSStyleDeclaration>;
|
|
485
|
+
};
|
|
486
|
+
highlightSlotNode(): void;
|
|
487
|
+
private getStylesObject;
|
|
488
|
+
private getHighlightStyleNodePayload;
|
|
489
|
+
getBoundingRectOfDisplayContents(element: HTMLElement): DOMRect | null;
|
|
490
|
+
private getNodeRect;
|
|
491
|
+
private getNodePath;
|
|
492
|
+
getAncestorsElements(currEl: HTMLElement): HTMLElement[];
|
|
493
|
+
}
|
|
494
|
+
declare const highlightNodeManager: HighlightNodeManager;
|
|
495
|
+
|
|
496
|
+
declare function addHighlightSpacingEventListeners(): {
|
|
497
|
+
removeEventListeners: () => void;
|
|
498
|
+
} | undefined;
|
|
499
|
+
|
|
500
|
+
declare function addBreakpointEventListeners(): {
|
|
501
|
+
removeEventListeners: () => void;
|
|
502
|
+
} | undefined;
|
|
503
|
+
|
|
504
|
+
declare const DEFAULT_BREAKPOINTS: BreakpointInput;
|
|
505
|
+
|
|
506
|
+
declare class BreakpointManager {
|
|
507
|
+
private static instance;
|
|
508
|
+
private activeBreakpoint;
|
|
509
|
+
private breakpointRegistry;
|
|
510
|
+
private constructor();
|
|
511
|
+
static getInstance(): BreakpointManager;
|
|
512
|
+
setActiveBreakpoint(breakpoint: Breakpoint): void;
|
|
513
|
+
getActiveBreakpoint(): Breakpoint | null;
|
|
514
|
+
findMatchingBreakpoint(): Breakpoint;
|
|
515
|
+
registerBreakpoints(breakpoints: BreakpointInput): void;
|
|
516
|
+
getBreakpoints(): Breakpoint[];
|
|
517
|
+
private syncBreakpointsWithStudio;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
declare const findPath: (node: Descendant) => Path;
|
|
521
|
+
declare const findPathForElement: (el: HTMLElement) => Path;
|
|
522
|
+
declare const applyOperation: (editor: Node, operations: Operation[]) => Node;
|
|
523
|
+
|
|
524
|
+
declare function isCompositionBeingEdited(compositionUid: string): boolean;
|
|
525
|
+
|
|
526
|
+
declare const queryParam: {
|
|
527
|
+
get(key: ComposableStudioQueryParamsKeys): string | null;
|
|
528
|
+
has(key: ComposableStudioQueryParamsKeys): boolean;
|
|
529
|
+
};
|
|
530
|
+
declare const onlyParmasGenerator: (only: [string, string][]) => Record<string, string>;
|
|
531
|
+
|
|
532
|
+
declare const setTemplateEntryInDS: (dataSources: Record<string, any>, entry: unknown) => void;
|
|
533
|
+
declare const setStaticEntryInDS: (dataSources: Record<string, any>, ct_uid: string, _entries: unknown) => void;
|
|
534
|
+
declare const batchFetchEntries: (sdk: StackSDK, entries: ICSEntryReference[]) => Promise<[string, CompositionEntry[]][]>;
|
|
535
|
+
declare const getBindingStringForCS: (binding: BindingType) => string;
|
|
536
|
+
type EntriesResponse<T> = {
|
|
537
|
+
entries: T[];
|
|
538
|
+
} | [T[]];
|
|
539
|
+
declare function entriesFromResponse<T>(response: EntriesResponse<T>): T[];
|
|
540
|
+
|
|
541
|
+
declare const isInsideVisualBuilderFrame: () => boolean;
|
|
542
|
+
|
|
543
|
+
declare const ComposableStudioErrors: {
|
|
544
|
+
readonly COMPOSITION_NOT_FOUND: "COMPOSITION_NOT_FOUND";
|
|
545
|
+
readonly FETCHING_CONNECTED_DATA_FAILED: "FETCHING_CONNECTED_DATA_FAILED";
|
|
546
|
+
readonly RESOLVING_DATA_SOURCES_FAILED: "RESOLVING_DATA_SOURCES_FAILED";
|
|
547
|
+
readonly STACK_SDK_NOT_AVAILABLE: "STACK_SDK_NOT_AVAILABLE";
|
|
548
|
+
readonly INVALID_FETCH_SPEC_OPTIONS: "INVALID_FETCH_SPEC_OPTIONS";
|
|
549
|
+
};
|
|
550
|
+
declare class ComposableStudioError extends Error {
|
|
551
|
+
id: keyof typeof ComposableStudioErrors;
|
|
552
|
+
details: any;
|
|
553
|
+
constructor(id: keyof typeof ComposableStudioErrors, message: string, details?: any);
|
|
554
|
+
canFallback(): boolean;
|
|
555
|
+
}
|
|
556
|
+
declare const FALLBACK_POSSIBLE_ERRORS: readonly ["COMPOSITION_NOT_FOUND"];
|
|
557
|
+
type TFallbackError = (typeof FALLBACK_POSSIBLE_ERRORS)[number];
|
|
558
|
+
interface ComposableStudioClientError extends ComposableStudioError {
|
|
559
|
+
id: Exclude<keyof typeof ComposableStudioErrors, TFallbackError>;
|
|
560
|
+
}
|
|
561
|
+
interface ComposableStudioFallbackError extends ComposableStudioError {
|
|
562
|
+
id: TFallbackError;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
declare const evaluateCondition: (condition: Condition, data: any) => boolean;
|
|
566
|
+
|
|
567
|
+
declare class RendererModeUtil {
|
|
568
|
+
private searchParams;
|
|
569
|
+
private isServerWithoutParams;
|
|
570
|
+
constructor(searchParams?: URLSearchParams);
|
|
571
|
+
/**
|
|
572
|
+
* Checks if the current context is inside a Studio.
|
|
573
|
+
*
|
|
574
|
+
* @returns {boolean} True if inside a Studio, false otherwise.
|
|
575
|
+
*/
|
|
576
|
+
isInsideStudioFrame(): boolean;
|
|
577
|
+
/**
|
|
578
|
+
* Checks if the current context is inside an iframe.
|
|
579
|
+
*
|
|
580
|
+
* @returns {boolean} True if inside an iframe, false otherwise.
|
|
581
|
+
*/
|
|
582
|
+
isInsideIframe(): boolean;
|
|
583
|
+
/**
|
|
584
|
+
* Checks if the current context is inside a Visual Builder frame.
|
|
585
|
+
*
|
|
586
|
+
* Learn more about Visual Builder: {@link https://www.contentstack.com/docs/content-managers/visual-builder}
|
|
587
|
+
*
|
|
588
|
+
* @returns {boolean} True if inside a Visual Builder frame, false otherwise.
|
|
589
|
+
*/
|
|
590
|
+
isInsideVisualBuilderFrame(): boolean;
|
|
591
|
+
/**
|
|
592
|
+
* Checks if the current context is editing a specific composition.
|
|
593
|
+
*
|
|
594
|
+
* It is useful when you have multiple compositions in a single page
|
|
595
|
+
* and you want to know if the current context is editing a specific
|
|
596
|
+
* composition.
|
|
597
|
+
*
|
|
598
|
+
* @param compositionUid - The UID of the composition to check.
|
|
599
|
+
* @returns {boolean} True if editing the specified composition, false otherwise.
|
|
600
|
+
*/
|
|
601
|
+
isEditingCurrentComposition(compositionUid: string): boolean;
|
|
602
|
+
/**
|
|
603
|
+
* Determines the current renderer mode for a given composition UID.
|
|
604
|
+
*
|
|
605
|
+
* - Returns "edit" if the current composition is being edited.
|
|
606
|
+
* - Returns "show_edit_button" if inside the visual builder frame
|
|
607
|
+
* or if the composition is not currently being edited but should show the edit button.
|
|
608
|
+
* - Returns "preview" otherwise.
|
|
609
|
+
*
|
|
610
|
+
* This method is useful when you want to change the functionality of the
|
|
611
|
+
* component based on where it is being rendered.
|
|
612
|
+
*
|
|
613
|
+
* @param compositionUid - The UID of the composition to check.
|
|
614
|
+
* @returns RendererMode - The current mode (EDIT, SHOW_EDIT_BUTTON, or PREVIEW).
|
|
615
|
+
*/
|
|
616
|
+
getMode(compositionUid: string): "preview" | "edit" | "show_edit_button";
|
|
617
|
+
}
|
|
618
|
+
declare const clientRendererModeUtil: RendererModeUtil;
|
|
619
|
+
declare const serializeComputedStyles: (computedStyle: CSSStyleDeclaration) => Record<string, string>;
|
|
620
|
+
|
|
621
|
+
interface GoogleFont {
|
|
622
|
+
family: string;
|
|
623
|
+
variants: string[];
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
declare function loadGoogleFont(fontFamily: string): Promise<void>;
|
|
627
|
+
|
|
628
|
+
declare const GOOGLE_FONT_API = "https://fonts.googleapis.com/css2";
|
|
629
|
+
declare const FONTS: [{
|
|
630
|
+
readonly family: "ABeeZee";
|
|
631
|
+
readonly variants: ["regular", "italic"];
|
|
632
|
+
}];
|
|
633
|
+
declare const FONT_VARIANTS: {
|
|
634
|
+
[fontFamily: string]: string[];
|
|
635
|
+
};
|
|
636
|
+
|
|
637
|
+
/**
|
|
638
|
+
* this function creates a unique class name for the style group
|
|
639
|
+
* because we need an unique class name to fetch the default styles
|
|
640
|
+
* @param componentUid the uid of the component
|
|
641
|
+
* @param styleGroup the name of the style group
|
|
642
|
+
* @returns a unique class name for the style group
|
|
643
|
+
*/
|
|
644
|
+
declare function createClassNameUid(componentUid: string, styleGroup: string): string;
|
|
645
|
+
|
|
646
|
+
declare function updateStyleOnStyleNodeChange(): {
|
|
647
|
+
removeEventListeners: () => void;
|
|
648
|
+
};
|
|
649
|
+
|
|
650
|
+
declare const COMPOSABLE_STUDIO_EMITTED_EVENTS: {
|
|
651
|
+
readonly HIDDEN_ELEMENT_NOTIFICATION: "hidden-element-notification";
|
|
652
|
+
readonly REFETCH_SPEC: "refetch-spec";
|
|
653
|
+
};
|
|
654
|
+
|
|
655
|
+
type RefetchSpecHandler = (data: RefetchSpecEventData) => void;
|
|
656
|
+
type HiddenElementNotificationHandler = (data: HiddenElementNotificationEventData) => void;
|
|
657
|
+
type ApplySymbolOperationHandler = (data: ApplySymbolOperationEventData) => void;
|
|
658
|
+
/**
|
|
659
|
+
* Emitted events
|
|
660
|
+
*/
|
|
661
|
+
interface EmittedEvents {
|
|
662
|
+
[COMPOSABLE_STUDIO_EMITTED_EVENTS.REFETCH_SPEC]: RefetchSpecHandler;
|
|
663
|
+
[COMPOSABLE_STUDIO_EMITTED_EVENTS.HIDDEN_ELEMENT_NOTIFICATION]: HiddenElementNotificationHandler;
|
|
664
|
+
[POST_MESSAGE_EVENTS.APPLY_SYMBOL_OPERATION]: ApplySymbolOperationHandler;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
declare const composableStudioEventEmitter: EventEmitter<EmittedEvents, any>;
|
|
668
|
+
|
|
669
|
+
/**
|
|
670
|
+
* Registers a config for JSON RTE
|
|
671
|
+
* @param config - The config to register. This should have the following format:
|
|
672
|
+
* {
|
|
673
|
+
* customElementTypes: {
|
|
674
|
+
* [elementName]: {
|
|
675
|
+
* parse: (node: any) => any,
|
|
676
|
+
* render: (node: any) => any,
|
|
677
|
+
* },
|
|
678
|
+
* },
|
|
679
|
+
* }
|
|
680
|
+
* For more details, check the docs here: https://github.com/contentstack/json-rte-serializer/blob/main/README.md#custom-element-types
|
|
681
|
+
* @throws If the config is not provided
|
|
682
|
+
* @example
|
|
683
|
+
* registerJSONRTE({
|
|
684
|
+
* customElementTypes: {
|
|
685
|
+
* myComponent: {
|
|
686
|
+
* parse: (node) => node,
|
|
687
|
+
* render: (node) => (
|
|
688
|
+
* <div>
|
|
689
|
+
* <h3>My Component</h3>
|
|
690
|
+
* <p>{node.children[0].text}</p>
|
|
691
|
+
* </div>
|
|
692
|
+
* ),
|
|
693
|
+
* },
|
|
694
|
+
* },
|
|
695
|
+
* });
|
|
696
|
+
*/
|
|
697
|
+
declare function registerJSONRTE(config: IJsonToHtmlOptions): void;
|
|
698
|
+
/**
|
|
699
|
+
* Gets the current config for JSON RTE
|
|
700
|
+
* @returns The current config for JSON RTE
|
|
701
|
+
*/
|
|
702
|
+
declare function getJSONRTE(): IJsonToHtmlOptions;
|
|
703
|
+
|
|
704
|
+
declare const compositionSaveEventListener: () => {
|
|
705
|
+
unregister: () => void;
|
|
706
|
+
} | undefined;
|
|
707
|
+
|
|
708
|
+
declare function openHiddenElementNotification(uid: string): void;
|
|
709
|
+
declare function closeHiddenElementNotification(uid: string): void;
|
|
710
|
+
declare function hiddenElementNotificationEventEmitter(): {
|
|
711
|
+
unregister: () => void;
|
|
712
|
+
} | undefined;
|
|
713
|
+
|
|
714
|
+
declare function getNodeScreenshotEvent(): {
|
|
715
|
+
unregister: () => void;
|
|
716
|
+
} | undefined;
|
|
717
|
+
|
|
718
|
+
export { BreakpointManager, COMPOSABLE_DATA_ATTRIBUTES, COMPOSABLE_STUDIO_EMITTED_EVENTS, ComposableStudioError, ComposableStudioErrors, DEFAULT_BREAKPOINTS, EDGE_PADDING, ELEMENT_TO_NODE, FALLBACK_POSSIBLE_ERRORS, FONTS, FONT_VARIANTS, GOOGLE_FONT_API, INCLUDE_DEPTH_COUNT, MAX_SCROLL_SPEED, NODE_TO_ELEMENT, NODE_TO_PARENT, NODE_TO_PATH_NODE, RendererMode, RendererModeUtil, SCROLL_INTERVAL, addBreakpointEventListeners, addContextMenuEventListeners, addHighlightNodeEventListeners, addHighlightSpacingEventListeners, applyOperation, batchFetchEntries, calculateDynamicSpeed, clientRendererModeUtil, closeHiddenElementNotification, composableStudioEventEmitter, compositionSaveEventListener, createClassNameUid, studioSdk as default, dndEventListener, dndManager, entriesFromResponse, evaluateCondition, findNearestBuilderNode, findNearestSlotNode, findPath, findPathForElement, getBindingStringForCS, getComposableElement, getComputedStyles, getDefaultConfig, getHitboxDetails, getHitboxDirection, getJSONRTE, getNodeScreenshotEvent, getScrollContainer, getScrollContainerRect, getScrollableParent, handleOnScroll, handleResize, hasSlotDropzone, hiddenElementNotificationEventEmitter, highlightNodeManager, isBrowser, isCompositionBeingEdited, isInsideVisualBuilderFrame, loadGoogleFont, onlyParmasGenerator, openHiddenElementNotification, parseStringValue, preProcessStaticValues, queryParam, registerJSONRTE, sendInitMessage, serializeComputedStyles, serializeEvent, setStaticEntryInDS, setTemplateEntryInDS, studioSdk, toggleNodeVisible, updateStyleOnStyleNodeChange };
|
|
719
|
+
export type { ClientEditableNodeInternalAttributes, ClientPreviewNodeInternalAttributes, ComposableStudioClientError, ComposableStudioFallbackError, ComposableStudioLightSdk, CompositionEntry, CompositionEntryIncompleteUi, CompositionQueryForSSR, CompositionQueryForSSRInput, CompositionQueryOptions, Config, EmittedEvents, GoogleFont, HiddenElementNotificationHandler, LightConfig, MetaProp, ParsedStringResult, SearchQueryInput, SeoMetadata, StudioComponentFetchOptions, StudioComponentSpecOptions, StudioSdk, StudioSpec, SymbolEntry, URLSearchParamsString, UserConfig };
|