@elementor/editor-canvas 4.2.0-930 → 4.2.0-932

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/dist/index.d.mts CHANGED
@@ -1,8 +1,8 @@
1
+ import * as _elementor_editor_props from '@elementor/editor-props';
2
+ import { PropValue, Props, PropType, PropTypeKey, PropsSchema, AnyTransformable } from '@elementor/editor-props';
1
3
  import { V1Element, V1ElementModelProps, V1ElementConfig } from '@elementor/editor-elements';
2
4
  import { TwingArrayLoader, TwingEnvironment } from '@elementor/twing';
3
5
  import { Root } from 'react-dom/client';
4
- import * as _elementor_editor_props from '@elementor/editor-props';
5
- import { Props, PropValue, PropType, PropTypeKey, PropsSchema, AnyTransformable } from '@elementor/editor-props';
6
6
  import { StyleVariables, StyleDefinitionsMap, StyleDefinitionID, StyleDefinitionState } from '@elementor/editor-styles';
7
7
  import * as React$1 from 'react';
8
8
  import * as _elementor_utils from '@elementor/utils';
@@ -10,10 +10,18 @@ import * as _elementor_utils from '@elementor/utils';
10
10
  declare const BREAKPOINTS_SCHEMA_URI = "elementor://breakpoints/list";
11
11
  declare const BREAKPOINTS_SCHEMA_FULL_URI = "editor-canvas_elementor://breakpoints/list";
12
12
 
13
- declare const WIDGET_SCHEMA_URI = "elementor://widgets/schema/{widgetType}";
14
- declare const WIDGET_SCHEMA_FULL_URI = "editor-canvas_elementor://widgets/schema/{widgetType}";
15
- declare const STYLE_SCHEMA_URI = "elementor://styles/schema/{category}";
16
- declare const STYLE_SCHEMA_FULL_URI = "editor-canvas_elementor://styles/schema/{category}";
13
+ /**
14
+ * A flat CSS property→value map. A null value is an explicit reset: the server emits it as a null
15
+ * prop so the editor restores the property to its default.
16
+ */
17
+ type StyleDeclarations = Record<string, string | null>;
18
+ type StyleBlock = StyleDeclarations | string;
19
+ type CssConversionResult = {
20
+ props: Record<string, PropValue | null>;
21
+ customCss: string;
22
+ };
23
+ declare const convertStyleBlocksToAtomic: (styleByName: Record<string, StyleBlock>) => Promise<Record<string, CssConversionResult>>;
24
+ declare const convertCssToAtomic: (style: StyleDeclarations) => Promise<CssConversionResult>;
17
25
 
18
26
  declare function init(): void;
19
27
 
@@ -340,6 +348,9 @@ type ImportedGlobalStylesPayload = {
340
348
 
341
349
  declare const DOCUMENT_STRUCTURE_URI = "elementor://document/structure";
342
350
 
351
+ declare const WIDGET_SCHEMA_URI = "elementor://widgets/schema/{widgetType}";
352
+ declare const WIDGET_SCHEMA_FULL_URI = "editor-canvas_elementor://widgets/schema/{widgetType}";
353
+
343
354
  type SpotlightBackdropProps = {
344
355
  canvas: Document;
345
356
  element: HTMLElement | null;
@@ -392,4 +403,4 @@ declare function useEscapeOnCanvas(canvasDocument: Document | null | undefined,
392
403
 
393
404
  declare function doAfterRender(elementIds: string[], callback: (elementIds: string[]) => void): void;
394
405
 
395
- export { type AnyTransformer, BREAKPOINTS_SCHEMA_FULL_URI, BREAKPOINTS_SCHEMA_URI, type BackboneModel, type BackboneModelConstructor, type ContextMenuAction, type ContextMenuEventData, type ContextMenuGroup, type CreateNestedTemplatedElementTypeOptions, type CreateTemplatedElementTypeOptions, DOCUMENT_STRUCTURE_URI, type ElementModel, ElementType, ElementView, GLOBAL_STYLES_IMPORTED_EVENT, type ImportedGlobalStylesPayload, type LegacyWindow, type MarionetteExtendable, type NamespacedRenderContext, type NestedTemplatedElementConfig, type NestedTemplatedElementViewClass, type PropsResolver, type RenderContext, type ReplacementSettings, STYLE_SCHEMA_FULL_URI, STYLE_SCHEMA_URI, SpotlightBackdrop, TemplatedElementView, type TransformerOptions, UnknownStyleStateError, UnknownStyleTypeError, WIDGET_SCHEMA_FULL_URI, WIDGET_SCHEMA_URI, canBeNestedTemplated, createNestedTemplatedElementType, createNestedTemplatedElementView, createPropsResolver, createTemplatedElementView, createTransformer, createTransformersRegistry, doAfterRender, endDragElementFromPanel, formatGridTrackRepeat, init, isAtomicWidget, isGridTrackProperty, registerElementType, registerModelExtensions, settingsTransformersRegistry, startDragElementFromPanel, styleTransformersRegistry, stylesInheritanceTransformersRegistry, useCanvasDocument, useEscapeOnCanvas, waitForChildrenToComplete };
406
+ export { type AnyTransformer, BREAKPOINTS_SCHEMA_FULL_URI, BREAKPOINTS_SCHEMA_URI, type BackboneModel, type BackboneModelConstructor, type ContextMenuAction, type ContextMenuEventData, type ContextMenuGroup, type CreateNestedTemplatedElementTypeOptions, type CreateTemplatedElementTypeOptions, type CssConversionResult, DOCUMENT_STRUCTURE_URI, type ElementModel, ElementType, ElementView, GLOBAL_STYLES_IMPORTED_EVENT, type ImportedGlobalStylesPayload, type LegacyWindow, type MarionetteExtendable, type NamespacedRenderContext, type NestedTemplatedElementConfig, type NestedTemplatedElementViewClass, type PropsResolver, type RenderContext, type ReplacementSettings, SpotlightBackdrop, type StyleBlock, type StyleDeclarations, TemplatedElementView, type TransformerOptions, UnknownStyleStateError, UnknownStyleTypeError, WIDGET_SCHEMA_FULL_URI, WIDGET_SCHEMA_URI, canBeNestedTemplated, convertCssToAtomic, convertStyleBlocksToAtomic, createNestedTemplatedElementType, createNestedTemplatedElementView, createPropsResolver, createTemplatedElementView, createTransformer, createTransformersRegistry, doAfterRender, endDragElementFromPanel, formatGridTrackRepeat, init, isAtomicWidget, isGridTrackProperty, registerElementType, registerModelExtensions, settingsTransformersRegistry, startDragElementFromPanel, styleTransformersRegistry, stylesInheritanceTransformersRegistry, useCanvasDocument, useEscapeOnCanvas, waitForChildrenToComplete };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
+ import * as _elementor_editor_props from '@elementor/editor-props';
2
+ import { PropValue, Props, PropType, PropTypeKey, PropsSchema, AnyTransformable } from '@elementor/editor-props';
1
3
  import { V1Element, V1ElementModelProps, V1ElementConfig } from '@elementor/editor-elements';
2
4
  import { TwingArrayLoader, TwingEnvironment } from '@elementor/twing';
3
5
  import { Root } from 'react-dom/client';
4
- import * as _elementor_editor_props from '@elementor/editor-props';
5
- import { Props, PropValue, PropType, PropTypeKey, PropsSchema, AnyTransformable } from '@elementor/editor-props';
6
6
  import { StyleVariables, StyleDefinitionsMap, StyleDefinitionID, StyleDefinitionState } from '@elementor/editor-styles';
7
7
  import * as React$1 from 'react';
8
8
  import * as _elementor_utils from '@elementor/utils';
@@ -10,10 +10,18 @@ import * as _elementor_utils from '@elementor/utils';
10
10
  declare const BREAKPOINTS_SCHEMA_URI = "elementor://breakpoints/list";
11
11
  declare const BREAKPOINTS_SCHEMA_FULL_URI = "editor-canvas_elementor://breakpoints/list";
12
12
 
13
- declare const WIDGET_SCHEMA_URI = "elementor://widgets/schema/{widgetType}";
14
- declare const WIDGET_SCHEMA_FULL_URI = "editor-canvas_elementor://widgets/schema/{widgetType}";
15
- declare const STYLE_SCHEMA_URI = "elementor://styles/schema/{category}";
16
- declare const STYLE_SCHEMA_FULL_URI = "editor-canvas_elementor://styles/schema/{category}";
13
+ /**
14
+ * A flat CSS property→value map. A null value is an explicit reset: the server emits it as a null
15
+ * prop so the editor restores the property to its default.
16
+ */
17
+ type StyleDeclarations = Record<string, string | null>;
18
+ type StyleBlock = StyleDeclarations | string;
19
+ type CssConversionResult = {
20
+ props: Record<string, PropValue | null>;
21
+ customCss: string;
22
+ };
23
+ declare const convertStyleBlocksToAtomic: (styleByName: Record<string, StyleBlock>) => Promise<Record<string, CssConversionResult>>;
24
+ declare const convertCssToAtomic: (style: StyleDeclarations) => Promise<CssConversionResult>;
17
25
 
18
26
  declare function init(): void;
19
27
 
@@ -340,6 +348,9 @@ type ImportedGlobalStylesPayload = {
340
348
 
341
349
  declare const DOCUMENT_STRUCTURE_URI = "elementor://document/structure";
342
350
 
351
+ declare const WIDGET_SCHEMA_URI = "elementor://widgets/schema/{widgetType}";
352
+ declare const WIDGET_SCHEMA_FULL_URI = "editor-canvas_elementor://widgets/schema/{widgetType}";
353
+
343
354
  type SpotlightBackdropProps = {
344
355
  canvas: Document;
345
356
  element: HTMLElement | null;
@@ -392,4 +403,4 @@ declare function useEscapeOnCanvas(canvasDocument: Document | null | undefined,
392
403
 
393
404
  declare function doAfterRender(elementIds: string[], callback: (elementIds: string[]) => void): void;
394
405
 
395
- export { type AnyTransformer, BREAKPOINTS_SCHEMA_FULL_URI, BREAKPOINTS_SCHEMA_URI, type BackboneModel, type BackboneModelConstructor, type ContextMenuAction, type ContextMenuEventData, type ContextMenuGroup, type CreateNestedTemplatedElementTypeOptions, type CreateTemplatedElementTypeOptions, DOCUMENT_STRUCTURE_URI, type ElementModel, ElementType, ElementView, GLOBAL_STYLES_IMPORTED_EVENT, type ImportedGlobalStylesPayload, type LegacyWindow, type MarionetteExtendable, type NamespacedRenderContext, type NestedTemplatedElementConfig, type NestedTemplatedElementViewClass, type PropsResolver, type RenderContext, type ReplacementSettings, STYLE_SCHEMA_FULL_URI, STYLE_SCHEMA_URI, SpotlightBackdrop, TemplatedElementView, type TransformerOptions, UnknownStyleStateError, UnknownStyleTypeError, WIDGET_SCHEMA_FULL_URI, WIDGET_SCHEMA_URI, canBeNestedTemplated, createNestedTemplatedElementType, createNestedTemplatedElementView, createPropsResolver, createTemplatedElementView, createTransformer, createTransformersRegistry, doAfterRender, endDragElementFromPanel, formatGridTrackRepeat, init, isAtomicWidget, isGridTrackProperty, registerElementType, registerModelExtensions, settingsTransformersRegistry, startDragElementFromPanel, styleTransformersRegistry, stylesInheritanceTransformersRegistry, useCanvasDocument, useEscapeOnCanvas, waitForChildrenToComplete };
406
+ export { type AnyTransformer, BREAKPOINTS_SCHEMA_FULL_URI, BREAKPOINTS_SCHEMA_URI, type BackboneModel, type BackboneModelConstructor, type ContextMenuAction, type ContextMenuEventData, type ContextMenuGroup, type CreateNestedTemplatedElementTypeOptions, type CreateTemplatedElementTypeOptions, type CssConversionResult, DOCUMENT_STRUCTURE_URI, type ElementModel, ElementType, ElementView, GLOBAL_STYLES_IMPORTED_EVENT, type ImportedGlobalStylesPayload, type LegacyWindow, type MarionetteExtendable, type NamespacedRenderContext, type NestedTemplatedElementConfig, type NestedTemplatedElementViewClass, type PropsResolver, type RenderContext, type ReplacementSettings, SpotlightBackdrop, type StyleBlock, type StyleDeclarations, TemplatedElementView, type TransformerOptions, UnknownStyleStateError, UnknownStyleTypeError, WIDGET_SCHEMA_FULL_URI, WIDGET_SCHEMA_URI, canBeNestedTemplated, convertCssToAtomic, convertStyleBlocksToAtomic, createNestedTemplatedElementType, createNestedTemplatedElementView, createPropsResolver, createTemplatedElementView, createTransformer, createTransformersRegistry, doAfterRender, endDragElementFromPanel, formatGridTrackRepeat, init, isAtomicWidget, isGridTrackProperty, registerElementType, registerModelExtensions, settingsTransformersRegistry, startDragElementFromPanel, styleTransformersRegistry, stylesInheritanceTransformersRegistry, useCanvasDocument, useEscapeOnCanvas, waitForChildrenToComplete };