@useinsider/guido 2.0.0 → 2.1.0-beta.e6bf76b
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 +2 -0
- package/dist/@types/config/schemas.js +57 -39
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +15 -17
- package/dist/components/organisms/email-preview/PreviewContainer.vue.js +3 -3
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.js +6 -6
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue2.js +17 -13
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +6 -6
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +14 -12
- package/dist/components/organisms/email-preview/desktop-preview/DesktopBrowserHeader.vue.js +18 -0
- package/dist/components/organisms/email-preview/desktop-preview/DesktopBrowserHeader.vue2.js +15 -0
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +16 -15
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +14 -22
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +3 -3
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +12 -11
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.js +12 -10
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.js +11 -10
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue2.js +15 -14
- package/dist/components/organisms/header/EditorActions.vue.js +21 -0
- package/dist/components/organisms/header/EditorActions.vue2.js +41 -0
- package/dist/components/organisms/header/EditorToolbar.vue.js +18 -0
- package/dist/components/organisms/header/EditorToolbar.vue2.js +17 -0
- package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -5
- package/dist/components/organisms/header/LeftSlot.vue.js +9 -9
- package/dist/components/organisms/header/LeftSlot.vue2.js +12 -13
- package/dist/components/organisms/header/MiddleSlot.vue.js +7 -7
- package/dist/components/organisms/header/MiddleSlot.vue2.js +11 -15
- package/dist/components/organisms/header/RightSlot.vue.js +11 -14
- package/dist/components/organisms/header/RightSlot.vue2.js +13 -30
- package/dist/components/organisms/header/version-history/VersionHistory.vue.js +5 -5
- package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +15 -15
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +1 -1
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +20 -19
- package/dist/composables/useActionsApi.js +33 -30
- package/dist/composables/useConfig.js +29 -27
- package/dist/composables/useSave.js +13 -11
- package/dist/composables/useStripo.js +57 -56
- package/dist/config/migrator/index.js +9 -8
- package/dist/config/migrator/itemsBlockMigrator.js +334 -0
- package/dist/enums/academy.js +8 -0
- package/dist/enums/onboarding.js +1 -2
- package/dist/enums/unsubscribe.js +20 -21
- package/dist/extensions/Blocks/CouponBlock/constants.js +4 -0
- package/dist/extensions/Blocks/CouponBlock/controls/index.js +29 -0
- package/dist/extensions/Blocks/CouponBlock/extension.js +5 -4
- package/dist/extensions/Blocks/CouponBlock/settingsPanel.js +20 -14
- package/dist/extensions/Blocks/CouponBlock/template.js +22 -11
- package/dist/extensions/Blocks/Items/block.js +36 -40
- package/dist/extensions/Blocks/Items/controls/button/link.js +22 -29
- package/dist/extensions/Blocks/Items/controls/cardComposition.js +66 -46
- package/dist/extensions/Blocks/Items/controls/image/link.js +23 -30
- package/dist/extensions/Blocks/Items/controls/name/trimming.js +25 -25
- package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +19 -17
- package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +31 -29
- package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +44 -38
- package/dist/extensions/Blocks/Items/controls/price/hideDiscount.js +21 -19
- package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +29 -27
- package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +93 -0
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +146 -131
- package/dist/extensions/Blocks/Items/enums/controlEnums.js +2 -2
- package/dist/extensions/Blocks/Items/enums/productEnums.js +43 -45
- package/dist/extensions/Blocks/Items/enums/settingsEnums.js +4 -5
- package/dist/extensions/Blocks/Items/extension.js +11 -9
- package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +58 -49
- package/dist/extensions/Blocks/Items/layouts/vertical.html.js +48 -59
- package/dist/extensions/Blocks/Items/settingsPanel.js +27 -26
- package/dist/extensions/Blocks/Items/store/items-block.js +11 -7
- package/dist/extensions/Blocks/Items/template.js +389 -141
- package/dist/extensions/Blocks/Items/utils/nodeConfigUtils.js +176 -0
- package/dist/extensions/Blocks/Recommendation/control.js +1 -1
- package/dist/extensions/Blocks/Unsubscribe/extension.js +9 -9
- package/dist/extensions/Blocks/common-control.js +30 -32
- package/dist/extensions/Blocks/controlFactories.js +139 -118
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +370 -286
- package/dist/package.json.js +1 -1
- package/dist/services/stripoApi.js +6 -10
- package/dist/src/@types/config/index.d.ts +2 -2
- package/dist/src/@types/config/schemas.d.ts +34 -0
- package/dist/src/@types/config/types.d.ts +7 -1
- package/dist/src/components/organisms/email-preview/desktop-preview/DesktopBrowserHeader.vue.d.ts +2 -0
- package/dist/src/components/organisms/header/EditorActions.vue.d.ts +4 -0
- package/dist/src/components/organisms/header/EditorToolbar.vue.d.ts +2 -0
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -1
- package/dist/src/composables/useActionsApi.d.ts +1 -0
- package/dist/src/composables/useConfig.d.ts +10 -0
- package/dist/src/config/migrator/itemsBlockMigrator.d.ts +6 -0
- package/dist/src/enums/academy.d.ts +12 -0
- package/dist/src/enums/onboarding.d.ts +0 -1
- package/dist/src/enums/unsubscribe.d.ts +0 -1
- package/dist/src/extensions/Blocks/CouponBlock/constants.d.ts +14 -0
- package/dist/src/extensions/Blocks/CouponBlock/controls/index.d.ts +108 -0
- package/dist/src/extensions/Blocks/CouponBlock/template.d.ts +1 -1
- package/dist/src/extensions/Blocks/Items/controls/button/link.d.ts +0 -2
- package/dist/src/extensions/Blocks/Items/controls/cardComposition.d.ts +9 -0
- package/dist/src/extensions/Blocks/Items/controls/image/link.d.ts +0 -2
- package/dist/src/extensions/Blocks/Items/controls/price/priceOrientation.d.ts +1 -1
- package/dist/src/extensions/Blocks/Items/controls/price/singlePrice.d.ts +18 -0
- package/dist/src/extensions/Blocks/Items/controls/settingsControl.d.ts +0 -4
- package/dist/src/extensions/Blocks/Items/enums/controlEnums.d.ts +1 -0
- package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +24 -26
- package/dist/src/extensions/Blocks/Items/enums/settingsEnums.d.ts +1 -2
- package/dist/src/extensions/Blocks/Items/store/items-block.d.ts +2 -0
- package/dist/src/extensions/Blocks/Items/template.d.ts +22 -1
- package/dist/src/extensions/Blocks/Items/utils/nodeConfigUtils.d.ts +76 -0
- package/dist/src/extensions/Blocks/common-control.d.ts +10 -11
- package/dist/src/extensions/Blocks/controlFactories.d.ts +30 -7
- package/dist/src/stores/config.d.ts +181 -1
- package/dist/src/stores/editor.d.ts +21 -0
- package/dist/static/assets/desktop/desktop-mockup-center.svg.js +4 -0
- package/dist/static/assets/desktop/desktop-mockup-left.svg.js +4 -0
- package/dist/static/assets/desktop/desktop-mockup-right.svg.js +4 -0
- package/dist/static/assets/mobile/email-mockup.svg.js +4 -0
- package/dist/static/assets/mobile/inbox-mockup.svg.js +4 -0
- package/dist/static/styles/components/button.css.js +1 -1
- package/dist/static/styles/components/narrow-panel.css.js +0 -10
- package/dist/static/styles/components/wide-panel.css.js +1 -1
- package/dist/stores/config.js +7 -0
- package/dist/stores/editor.js +1 -0
- package/dist/utils/pairProductVariables.js +61 -58
- package/dist/utils/templatePreparation.js +17 -17
- package/package.json +3 -3
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.js +0 -17
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue2.js +0 -20
- package/dist/extensions/Blocks/Items/utils/configBlockUtils.js +0 -17
- package/dist/extensions/Blocks/Items/utils/syncAttributeFromConfigBlock.js +0 -28
- package/dist/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.js +0 -76
- package/dist/extensions/Blocks/Items/utils/updateAttributes.js +0 -46
- package/dist/src/extensions/Blocks/Items/utils/configBlockUtils.d.ts +0 -23
- package/dist/src/extensions/Blocks/Items/utils/syncAttributeFromConfigBlock.d.ts +0 -32
- package/dist/src/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.d.ts +0 -50
- package/dist/src/extensions/Blocks/Items/utils/updateAttributes.d.ts +0 -8
- package/dist/static/assets/inbox-mockup.svg.js +0 -4
- package/dist/static/assets/phone-mockup.svg.js +0 -4
|
@@ -10,6 +10,7 @@ interface ItemsBlockState {
|
|
|
10
10
|
currencySymbol: string;
|
|
11
11
|
currencyLocation: string;
|
|
12
12
|
formattedPrice: boolean;
|
|
13
|
+
singlePrice: boolean;
|
|
13
14
|
priceOrientation: 'vertical' | 'horizontal';
|
|
14
15
|
templateData: {
|
|
15
16
|
imageSrc: string;
|
|
@@ -31,6 +32,7 @@ export declare const useItemsBlockStore: import("pinia").StoreDefinition<"guidoI
|
|
|
31
32
|
setCurrencySymbol(currencySymbol: string): void;
|
|
32
33
|
setCurrencyLocation(currencyLocation: string): void;
|
|
33
34
|
setFormattedPrice(formattedPrice: boolean): void;
|
|
35
|
+
setSinglePrice(singlePrice: boolean): void;
|
|
34
36
|
setPriceOrientation(priceOrientation: "vertical" | "horizontal"): void;
|
|
35
37
|
setTemplateData(templateData: ItemsBlockState["templateData"]): void;
|
|
36
38
|
updateFromAttributes(attributes: {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { type ItemsBlockConfig } from './utils/nodeConfigUtils';
|
|
1
2
|
declare const migrationTemplate = "ADD YOUR MIGRATION HERE";
|
|
2
3
|
type ProductType = 'CART_ITEMS' | 'BROWSED_ITEMS' | 'PURCHASED_ITEMS';
|
|
3
4
|
type OrientationType = 'vertical' | 'horizontal';
|
|
5
|
+
type PriceOrientationType = 'vertical' | 'horizontal';
|
|
4
6
|
type TemplateParameters = {
|
|
5
7
|
orientation: OrientationType;
|
|
6
8
|
itemsType: ProductType;
|
|
@@ -8,6 +10,25 @@ type TemplateParameters = {
|
|
|
8
10
|
currencySymbol?: string;
|
|
9
11
|
currencyLocation?: string;
|
|
10
12
|
formattedPrice?: boolean;
|
|
13
|
+
/** Whether to show single product price (price divided by quantity) */
|
|
14
|
+
singlePrice?: boolean;
|
|
15
|
+
migrate?: boolean;
|
|
16
|
+
/** Legacy config format (data-* attributes for migration) */
|
|
17
|
+
configBlockAttributes?: Record<string, string>;
|
|
18
|
+
/** New config format (Stripo V2 nodeConfig from esd-ext-config) */
|
|
19
|
+
nodeConfig?: Partial<ItemsBlockConfig>;
|
|
20
|
+
/** Extracted styles from a[product-attr="name"] for migration */
|
|
21
|
+
nameStyles?: string;
|
|
22
|
+
/** Extracted styles from a.es-button for migration */
|
|
23
|
+
buttonStyles?: string;
|
|
24
|
+
/** Extracted styles from p[product-attr="price"] for migration */
|
|
25
|
+
priceStyles?: string;
|
|
26
|
+
/** Extracted styles from p[product-attr="originalPrice"] for migration */
|
|
27
|
+
originalPriceStyles?: string;
|
|
28
|
+
/** Extracted styles from p[product-attr="quantity"] for migration */
|
|
29
|
+
quantityStyles?: string;
|
|
30
|
+
/** Price orientation within the card ('vertical' = stacked, 'horizontal' = side-by-side) */
|
|
31
|
+
priceOrientation?: PriceOrientationType;
|
|
11
32
|
};
|
|
12
33
|
/**
|
|
13
34
|
* Generates the default template for the Items Block.
|
|
@@ -20,5 +41,5 @@ type TemplateParameters = {
|
|
|
20
41
|
* @param params.formattedPrice - Whether to use formatted price display
|
|
21
42
|
* @returns HTML template string for the Items Block
|
|
22
43
|
*/
|
|
23
|
-
export declare function getDefaultTemplate({ orientation, itemsType, itemId, currencySymbol, currencyLocation, formattedPrice, }: TemplateParameters): string;
|
|
44
|
+
export declare function getDefaultTemplate({ orientation, itemsType, itemId, currencySymbol, currencyLocation, migrate, formattedPrice, configBlockAttributes, nodeConfig, nameStyles, buttonStyles, priceStyles, originalPriceStyles, quantityStyles, priceOrientation, }: TemplateParameters): string;
|
|
24
45
|
export default migrationTemplate;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { OrientationType, ProductType } from '@@/Types/extensions/items';
|
|
2
|
+
import { ImmutableHtmlNode, ImmutableHtmlElementNode, ControlApi, BlockApi } from '@stripoinc/ui-editor-extensions';
|
|
3
|
+
/**
|
|
4
|
+
* Typed configuration object for Items Block.
|
|
5
|
+
* Configuration is stored directly on the block node using Stripo V2's getNodeConfig/setNodeConfig API.
|
|
6
|
+
*/
|
|
7
|
+
export interface ItemsBlockConfig {
|
|
8
|
+
initialized: boolean;
|
|
9
|
+
blockInstanceId: string;
|
|
10
|
+
source: ProductType;
|
|
11
|
+
type: ProductType;
|
|
12
|
+
itemsSelectValue: string;
|
|
13
|
+
orientation: OrientationType;
|
|
14
|
+
nameTrimming: boolean;
|
|
15
|
+
priceHideDiscount: boolean;
|
|
16
|
+
priceFormatted: boolean;
|
|
17
|
+
priceSinglePrice: boolean;
|
|
18
|
+
priceCurrencySymbol: string;
|
|
19
|
+
priceCurrencyLocation: string;
|
|
20
|
+
priceOrientation: 'vertical' | 'horizontal';
|
|
21
|
+
quantityControlEnabled: boolean;
|
|
22
|
+
buttonLink: string;
|
|
23
|
+
imageLink: string;
|
|
24
|
+
buttonLabel: string;
|
|
25
|
+
/** Whether button should be full width (true = es-fw class) or inline (false = es-il class) */
|
|
26
|
+
buttonFullWidth: boolean;
|
|
27
|
+
imageVisible: boolean;
|
|
28
|
+
nameVisible: boolean;
|
|
29
|
+
quantityVisible: boolean;
|
|
30
|
+
priceVisible: boolean;
|
|
31
|
+
originalPriceVisible: boolean;
|
|
32
|
+
buttonVisible: boolean;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Generates a unique block instance ID.
|
|
36
|
+
*/
|
|
37
|
+
export declare function generateBlockInstanceId(): string;
|
|
38
|
+
/**
|
|
39
|
+
* Escapes $ characters in a string for safe use in String.replace/replaceAll.
|
|
40
|
+
* Prevents currency symbols like "$", "R$", "HK$" from being interpreted as special replacement patterns.
|
|
41
|
+
*/
|
|
42
|
+
export declare const escapeReplacement: (str: string) => string;
|
|
43
|
+
/**
|
|
44
|
+
* Returns default ItemsBlockConfig values.
|
|
45
|
+
* These are used when initializing a new block or when migrating from legacy format.
|
|
46
|
+
*/
|
|
47
|
+
export declare function getDefaultItemsBlockConfig(): ItemsBlockConfig;
|
|
48
|
+
/**
|
|
49
|
+
* Gets the Items block container element from the current node.
|
|
50
|
+
* The container is identified by the `.items-block-v2` class (new) or `.esd-cart-items-block` (legacy).
|
|
51
|
+
* @param currentNode - The current node from the control (usually this.currentNode)
|
|
52
|
+
* @returns The container element or null if not found
|
|
53
|
+
*/
|
|
54
|
+
export declare function getItemsBlockContainer(currentNode: ImmutableHtmlNode | undefined): ImmutableHtmlElementNode | null;
|
|
55
|
+
/**
|
|
56
|
+
* Gets the node configuration from the Items block.
|
|
57
|
+
* Uses Stripo V2's getNodeConfig() API.
|
|
58
|
+
* Falls back to migrating from legacy config block if nodeConfig is empty.
|
|
59
|
+
* @param currentNode - The current node from the control
|
|
60
|
+
* @returns The ItemsBlockConfig object or null if not found
|
|
61
|
+
*/
|
|
62
|
+
export declare function getItemsBlockConfig(currentNode: ImmutableHtmlNode | undefined): ItemsBlockConfig | null;
|
|
63
|
+
/**
|
|
64
|
+
* Sets the node configuration on the Items block.
|
|
65
|
+
* Uses Stripo V2's setNodeConfig() API.
|
|
66
|
+
* @param currentNode - The current node from the control
|
|
67
|
+
* @param api - The API object (ControlApi or BlockApi)
|
|
68
|
+
* @param config - The configuration to set (partial update supported)
|
|
69
|
+
*/
|
|
70
|
+
export declare function setItemsBlockConfig(currentNode: ImmutableHtmlNode | undefined, api: ControlApi | BlockApi, config: Partial<ItemsBlockConfig>): void;
|
|
71
|
+
/**
|
|
72
|
+
* Gets the block instance ID from the node config.
|
|
73
|
+
* @param currentNode - The current node from the control
|
|
74
|
+
* @returns The block instance ID or null if not found
|
|
75
|
+
*/
|
|
76
|
+
export declare function getBlockInstanceIdFromConfig(currentNode: ImmutableHtmlNode | undefined): string | null;
|
|
@@ -56,26 +56,25 @@ export declare abstract class CommonControl extends Control {
|
|
|
56
56
|
onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
|
|
57
57
|
onDestroy(): void;
|
|
58
58
|
/**
|
|
59
|
-
* Gets the
|
|
60
|
-
* @returns The
|
|
59
|
+
* Gets the Items block container element from the current node.
|
|
60
|
+
* @returns The container element or null if not found
|
|
61
61
|
*/
|
|
62
|
-
protected
|
|
62
|
+
protected getItemsBlockContainer(): ImmutableHtmlElementNode | null;
|
|
63
63
|
/**
|
|
64
|
-
* Gets the current block instance ID from the config
|
|
65
|
-
* @param blockInstanceIdAttribute - The attribute name for block instance ID (default: 'data-block-instance-id')
|
|
64
|
+
* Gets the current block instance ID from the node config (Stripo V2).
|
|
66
65
|
* @returns The block instance ID or null if not found
|
|
67
66
|
*/
|
|
68
|
-
protected getBlockInstanceId(
|
|
67
|
+
protected getBlockInstanceId(): string | null;
|
|
69
68
|
/**
|
|
70
69
|
* Handles block instance change detection and syncing.
|
|
71
|
-
* This is a helper method for controls that need to sync
|
|
72
|
-
*
|
|
70
|
+
* This is a helper method for controls that need to sync config when switching between block instances.
|
|
71
|
+
* Uses Stripo V2 nodeConfig API for block instance tracking.
|
|
72
|
+
* @param syncFunction - Function to call when block instance changes (to sync from node config)
|
|
73
73
|
* @param updateUI - Function to call to update the UI (called both on change and when same block)
|
|
74
|
-
* @param blockInstanceIdAttribute - The attribute name for block instance ID (default: 'data-block-instance-id')
|
|
75
74
|
* @returns true if block instance changed, false otherwise
|
|
76
75
|
*/
|
|
77
|
-
protected handleBlockInstanceChange(syncFunction: (node: ImmutableHtmlNode) => void, updateUI: () => void
|
|
78
|
-
_GuLabel({ text, name
|
|
76
|
+
protected handleBlockInstanceChange(syncFunction: (node: ImmutableHtmlNode) => void, updateUI: () => void): boolean;
|
|
77
|
+
_GuLabel({ text, name }: LabelProps): string;
|
|
79
78
|
_GuToggle(name: string): string;
|
|
80
79
|
_GuSelectItem({ text, value }: {
|
|
81
80
|
text: string;
|
|
@@ -12,8 +12,9 @@
|
|
|
12
12
|
import { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
13
13
|
/**
|
|
14
14
|
* Factory function to create text align controls for different block elements
|
|
15
|
+
* When targetBlockId and containerSelector are not provided, applies directly to root
|
|
15
16
|
*/
|
|
16
|
-
export declare function createTextAlignControl(controlId: string, targetBlockId
|
|
17
|
+
export declare function createTextAlignControl(controlId: string, targetBlockId?: string, containerSelector?: string): {
|
|
17
18
|
new (): {
|
|
18
19
|
getId(): string;
|
|
19
20
|
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
@@ -27,8 +28,9 @@ export declare function createTextAlignControl(controlId: string, targetBlockId:
|
|
|
27
28
|
};
|
|
28
29
|
/**
|
|
29
30
|
* Factory function to create text color controls for different block elements
|
|
31
|
+
* When targetBlockId and containerSelector are not provided, applies directly to root
|
|
30
32
|
*/
|
|
31
|
-
export declare function createTextColorControl(controlId: string, targetBlockId
|
|
33
|
+
export declare function createTextColorControl(controlId: string, targetBlockId?: string, containerSelector?: string): {
|
|
32
34
|
new (): {
|
|
33
35
|
getId(): string;
|
|
34
36
|
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
@@ -42,8 +44,9 @@ export declare function createTextColorControl(controlId: string, targetBlockId:
|
|
|
42
44
|
};
|
|
43
45
|
/**
|
|
44
46
|
* Factory function to create text size controls for different block elements
|
|
47
|
+
* When targetBlockId and containerSelector are not provided, applies directly to root
|
|
45
48
|
*/
|
|
46
|
-
export declare function createTextSizeControl(controlId: string, targetBlockId
|
|
49
|
+
export declare function createTextSizeControl(controlId: string, targetBlockId?: string, containerSelector?: string): {
|
|
47
50
|
new (): {
|
|
48
51
|
getId(): string;
|
|
49
52
|
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
@@ -57,8 +60,9 @@ export declare function createTextSizeControl(controlId: string, targetBlockId:
|
|
|
57
60
|
};
|
|
58
61
|
/**
|
|
59
62
|
* Factory function to create text style controls for different block elements
|
|
63
|
+
* When targetBlockId and containerSelector are not provided, applies directly to root
|
|
60
64
|
*/
|
|
61
|
-
export declare function createTextStyleControl(controlId: string, targetBlockId
|
|
65
|
+
export declare function createTextStyleControl(controlId: string, targetBlockId?: string, containerSelector?: string): {
|
|
62
66
|
new (): {
|
|
63
67
|
getId(): string;
|
|
64
68
|
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
@@ -72,8 +76,9 @@ export declare function createTextStyleControl(controlId: string, targetBlockId:
|
|
|
72
76
|
};
|
|
73
77
|
/**
|
|
74
78
|
* Factory function to create text font family controls for different block elements
|
|
79
|
+
* When targetBlockId and containerSelector are not provided, applies directly to root
|
|
75
80
|
*/
|
|
76
|
-
export declare function createTextFontFamilyControl(controlId: string, targetBlockId
|
|
81
|
+
export declare function createTextFontFamilyControl(controlId: string, targetBlockId?: string, containerSelector?: string): {
|
|
77
82
|
new (): {
|
|
78
83
|
getId(): string;
|
|
79
84
|
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
@@ -87,8 +92,9 @@ export declare function createTextFontFamilyControl(controlId: string, targetBlo
|
|
|
87
92
|
};
|
|
88
93
|
/**
|
|
89
94
|
* Factory function to create text background color controls for different block elements
|
|
95
|
+
* When targetBlockId and containerSelector are not provided, applies directly to root
|
|
90
96
|
*/
|
|
91
|
-
export declare function createTextBackgroundColorControl(controlId: string, targetBlockId
|
|
97
|
+
export declare function createTextBackgroundColorControl(controlId: string, targetBlockId?: string, containerSelector?: string): {
|
|
92
98
|
new (): {
|
|
93
99
|
getId(): string;
|
|
94
100
|
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
@@ -102,8 +108,25 @@ export declare function createTextBackgroundColorControl(controlId: string, targ
|
|
|
102
108
|
};
|
|
103
109
|
/**
|
|
104
110
|
* Factory function to create paddings controls for different block elements
|
|
111
|
+
* When targetBlockId and containerSelector are not provided, applies directly to root
|
|
105
112
|
*/
|
|
106
|
-
export declare function createPaddingsControl(controlId: string, targetBlockId
|
|
113
|
+
export declare function createPaddingsControl(controlId: string, targetBlockId?: string, containerSelector?: string): {
|
|
114
|
+
new (): {
|
|
115
|
+
getId(): string;
|
|
116
|
+
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
117
|
+
getParentControlId(): string;
|
|
118
|
+
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
119
|
+
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
120
|
+
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
121
|
+
getAdditionalModifications(_root: ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
122
|
+
isVisible(_node: ImmutableHtmlNode): boolean;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* Factory function to create text line spacing controls for different block elements
|
|
127
|
+
* When targetBlockId and containerSelector are not provided, applies directly to root
|
|
128
|
+
*/
|
|
129
|
+
export declare function createTextLineSpacingControl(controlId: string, targetBlockId?: string, containerSelector?: string): {
|
|
107
130
|
new (): {
|
|
108
131
|
getId(): string;
|
|
109
132
|
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|