@useinsider/guido 3.19.0-beta.5794c8d → 3.19.0-beta.5f1bc84
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/@types/config/schemas.js +104 -91
- package/dist/components/Guido.vue.js +6 -6
- package/dist/components/Guido.vue2.js +96 -85
- package/dist/components/organisms/base/AuthErrorModal.vue.js +18 -0
- package/dist/components/organisms/base/AuthErrorModal.vue2.js +42 -0
- package/dist/components/wrappers/WpModal.vue.js +1 -1
- package/dist/components/wrappers/WpModal.vue2.js +4 -3
- package/dist/composables/useAuthError.js +52 -0
- package/dist/composables/useAutoSave.js +11 -11
- package/dist/composables/useCortexBlueprintBridge.js +122 -54
- package/dist/composables/useEmailTemplateApplier.js +111 -50
- package/dist/composables/useHttp.js +64 -54
- package/dist/composables/useStripo.js +24 -20
- package/dist/composables/useToaster.js +17 -15
- package/dist/composables/validators/useLiquidValidator.js +15 -15
- package/dist/config/migrator/index.js +14 -13
- package/dist/config/migrator/itemsBlockMigrator.js +236 -248
- package/dist/config/migrator/recommendationMigrator.js +28 -21
- package/dist/config/migrator/recommendationPartnerMigrator.js +56 -0
- package/dist/enums/extensions/recommendationBlock.js +30 -29
- package/dist/extensions/Blocks/Items/constants/cardLayout.js +20 -0
- package/dist/extensions/Blocks/Items/controls/name/trimming.js +18 -17
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +114 -105
- package/dist/extensions/Blocks/Items/enums/productEnums.js +14 -9
- package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +11 -9
- package/dist/extensions/Blocks/Items/template.js +219 -204
- package/dist/extensions/Blocks/Recommendation/block.js +15 -14
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +45 -38
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +72 -49
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +29 -29
- package/dist/extensions/Blocks/Recommendation/utils/partnerScope.js +25 -0
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +271 -192
- package/dist/package.json.js +1 -1
- package/dist/src/@types/config/schemas.d.ts +16 -0
- package/dist/src/components/organisms/base/AuthErrorModal.vue.d.ts +2 -0
- package/dist/src/components/wrappers/WpModal.vue.d.ts +5 -1
- package/dist/src/composables/useAuthError.d.ts +12 -0
- package/dist/src/composables/useConfig.d.ts +2 -0
- package/dist/src/composables/useCortexBlueprintBridge.d.ts +2 -3
- package/dist/src/composables/useEmailTemplateApplier.d.ts +18 -5
- package/dist/src/composables/useGuidoActions.d.ts +2 -0
- package/dist/src/composables/useHttp.d.ts +2 -0
- package/dist/src/config/migrator/index.d.ts +2 -1
- package/dist/src/config/migrator/recommendationPartnerMigrator.d.ts +19 -0
- package/dist/src/enums/extensions/recommendationBlock.d.ts +1 -1
- package/dist/src/extensions/Blocks/Checkbox/controls/blockBackground/index.d.ts +1 -0
- package/dist/src/extensions/Blocks/CouponBlock/controls/index.d.ts +8 -0
- package/dist/src/extensions/Blocks/Items/constants/cardLayout.d.ts +44 -0
- package/dist/src/extensions/Blocks/Items/controls/index.d.ts +40 -0
- package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +3 -0
- package/dist/src/extensions/Blocks/Items/template.d.ts +19 -0
- package/dist/src/extensions/Blocks/RadioButton/controls/blockBackground/index.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/blockBackground/index.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/index.d.ts +11 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/index.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/image/index.d.ts +2 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/index.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/index.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/index.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/index.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/title/index.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +6 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/partnerScope.d.ts +33 -0
- package/dist/src/extensions/Blocks/_Boilerplate/controls/blockBackground/index.d.ts +1 -0
- package/dist/src/extensions/Blocks/controlFactories.d.ts +22 -0
- package/dist/src/mock/cortexChatStore.d.ts +12 -0
- package/dist/src/stores/config.d.ts +20 -0
- package/dist/src/stores/guido-email-editor.d.ts +20 -10
- package/dist/src/stores/onboarding.d.ts +4 -0
- package/dist/src/stores/recommendation.d.ts +5 -0
- package/dist/src/utils/dateUtil.d.ts +10 -0
- package/dist/src/utils/genericUtil.d.ts +3 -0
- package/dist/static/styles/components/button.css.js +5 -0
- package/dist/static/styles/components/recommendation-strategy.css.js +9 -0
- package/dist/static/styles/components/version-history.css.js +2 -6
- package/dist/stores/guido-email-editor.js +3 -1
- package/dist/stores/onboarding.js +4 -0
- package/dist/utils/pairProductVariables.js +71 -71
- package/package.json +4 -3
package/dist/package.json.js
CHANGED
|
@@ -278,6 +278,14 @@ export declare const TemplateSchema: v.ObjectSchema<{
|
|
|
278
278
|
* mount. Non-numbers still fail, like every other field in this schema.
|
|
279
279
|
*/
|
|
280
280
|
readonly trackIdCounter: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, number>]>, 0>;
|
|
281
|
+
/**
|
|
282
|
+
* The variation's saved `recommendationCampaignUrls`, keyed by block id. A block
|
|
283
|
+
* that still names a strategy but has no entry here had it dropped by a
|
|
284
|
+
* cross-account duplicate, so Guido resets it on load (SD-151945). Omit it and
|
|
285
|
+
* that check is off, and so is any non-object value such as `null`, because a reset
|
|
286
|
+
* cannot be undone. Hosts send `[]` for an empty map.
|
|
287
|
+
*/
|
|
288
|
+
readonly recommendationCampaignUrls: v.OptionalSchema<v.SchemaWithPipe<readonly [v.UnknownSchema, v.TransformAction<unknown, Record<string, unknown> | undefined>]>, undefined>;
|
|
281
289
|
/** Migration-only inputs (legacy block configs) */
|
|
282
290
|
readonly migration: v.OptionalSchema<v.ObjectSchema<{
|
|
283
291
|
/**
|
|
@@ -701,6 +709,14 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
701
709
|
* mount. Non-numbers still fail, like every other field in this schema.
|
|
702
710
|
*/
|
|
703
711
|
readonly trackIdCounter: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, number>]>, 0>;
|
|
712
|
+
/**
|
|
713
|
+
* The variation's saved `recommendationCampaignUrls`, keyed by block id. A block
|
|
714
|
+
* that still names a strategy but has no entry here had it dropped by a
|
|
715
|
+
* cross-account duplicate, so Guido resets it on load (SD-151945). Omit it and
|
|
716
|
+
* that check is off, and so is any non-object value such as `null`, because a reset
|
|
717
|
+
* cannot be undone. Hosts send `[]` for an empty map.
|
|
718
|
+
*/
|
|
719
|
+
readonly recommendationCampaignUrls: v.OptionalSchema<v.SchemaWithPipe<readonly [v.UnknownSchema, v.TransformAction<unknown, Record<string, unknown> | undefined>]>, undefined>;
|
|
704
720
|
/** Migration-only inputs (legacy block configs) */
|
|
705
721
|
readonly migration: v.OptionalSchema<v.ObjectSchema<{
|
|
706
722
|
/**
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -3,6 +3,7 @@ type __VLS_Props = {
|
|
|
3
3
|
id: string;
|
|
4
4
|
title: string;
|
|
5
5
|
description?: string;
|
|
6
|
+
state?: 'default' | 'primary' | 'warning' | 'danger';
|
|
6
7
|
size?: 'X-small' | 'small' | 'medium' | 'large';
|
|
7
8
|
footerButtonOptions?: FooterButtonGroup;
|
|
8
9
|
closeButtonStatus?: boolean;
|
|
@@ -15,6 +16,7 @@ type __VLS_Slots = {} & {
|
|
|
15
16
|
};
|
|
16
17
|
declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
17
18
|
description: string;
|
|
19
|
+
state: string;
|
|
18
20
|
size: string;
|
|
19
21
|
footerButtonOptions: undefined;
|
|
20
22
|
closeButtonStatus: boolean;
|
|
@@ -26,6 +28,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
26
28
|
"secondary-action": () => void;
|
|
27
29
|
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
28
30
|
description: string;
|
|
31
|
+
state: string;
|
|
29
32
|
size: string;
|
|
30
33
|
footerButtonOptions: undefined;
|
|
31
34
|
closeButtonStatus: boolean;
|
|
@@ -34,9 +37,10 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
34
37
|
}>>>, {
|
|
35
38
|
size: "X-small" | "small" | "medium" | "large";
|
|
36
39
|
description: string;
|
|
37
|
-
|
|
40
|
+
state: "default" | "primary" | "warning" | "danger";
|
|
38
41
|
footerButtonOptions: FooterButtonGroup;
|
|
39
42
|
closeButtonStatus: boolean;
|
|
43
|
+
closeOnOutsideClick: boolean;
|
|
40
44
|
footerStatus: boolean;
|
|
41
45
|
}>;
|
|
42
46
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface AuthErrorState {
|
|
2
|
+
status: number;
|
|
3
|
+
data: Record<string, unknown> | null;
|
|
4
|
+
}
|
|
5
|
+
export declare const isPanelOrigin: (url: string) => boolean;
|
|
6
|
+
export declare const reportAuthError: (status: number, body: string, url: string) => void;
|
|
7
|
+
export declare const useAuthError: () => {
|
|
8
|
+
authError: import("vue").Ref<{
|
|
9
|
+
status: number;
|
|
10
|
+
data: Record<string, unknown> | null;
|
|
11
|
+
} | null>;
|
|
12
|
+
};
|
|
@@ -43,6 +43,7 @@ export declare const useConfig: () => {
|
|
|
43
43
|
selectedUnsubscribePages: number[];
|
|
44
44
|
forceRecreate: boolean;
|
|
45
45
|
trackIdCounter: number;
|
|
46
|
+
recommendationCampaignUrls?: Record<string, unknown> | undefined;
|
|
46
47
|
migration: {
|
|
47
48
|
recommendationConfigs: {
|
|
48
49
|
[x: string]: {
|
|
@@ -180,6 +181,7 @@ export declare const useConfig: () => {
|
|
|
180
181
|
selectedUnsubscribePages: number[];
|
|
181
182
|
forceRecreate: boolean;
|
|
182
183
|
trackIdCounter: number;
|
|
184
|
+
recommendationCampaignUrls?: Record<string, unknown> | undefined;
|
|
183
185
|
migration: {
|
|
184
186
|
recommendationConfigs: {
|
|
185
187
|
[x: string]: {
|
|
@@ -17,12 +17,11 @@
|
|
|
17
17
|
* - `error` segments (and message-level `isError` / `isCancelled`) trigger
|
|
18
18
|
* a localized toaster.
|
|
19
19
|
*
|
|
20
|
+
* Every apply settles into a terminal `applyAcks` entry, so cortex moves its button on the write, not the click.
|
|
21
|
+
*
|
|
20
22
|
* In dev (`import.meta.env.DEV`) every observed segment + message-level flag
|
|
21
23
|
* change is also `console.debug`-logged with the prefix `[guido:cortex]` so a
|
|
22
24
|
* developer can watch the agent stream in real time. In production this is
|
|
23
25
|
* gated behind `localStorage.guido:debug:ai === '1'`.
|
|
24
|
-
*
|
|
25
|
-
* If cortex-fe isn't loaded the chat store is undefined and the bridge is a
|
|
26
|
-
* no-op (intentional — Guido must still work standalone).
|
|
27
26
|
*/
|
|
28
27
|
export declare const useCortexBlueprintBridge: () => void;
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
type ApplyStatus = 'pending' | 'applying' | 'applied' | 'failed';
|
|
2
|
+
/**
|
|
3
|
+
* Terminal outcome of an apply; every promise here settles with one, since the bridge acks on it.
|
|
4
|
+
* `superseded`: a newer payload for the same key replaced this one and owns the ack.
|
|
5
|
+
*/
|
|
6
|
+
export type ApplyOutcome = {
|
|
7
|
+
status: 'applied';
|
|
8
|
+
} | {
|
|
9
|
+
status: 'failed';
|
|
10
|
+
error: unknown;
|
|
11
|
+
} | {
|
|
12
|
+
status: 'superseded';
|
|
13
|
+
};
|
|
2
14
|
/**
|
|
3
15
|
* Applies email_template blueprints from the chat agent to the Stripo editor.
|
|
4
16
|
*
|
|
@@ -9,18 +21,19 @@ type ApplyStatus = 'pending' | 'applying' | 'applied' | 'failed';
|
|
|
9
21
|
* - manual Apply click (first apply): immediate.
|
|
10
22
|
* - blueprint_update after the user has applied once: debounced 250 ms trailing
|
|
11
23
|
* so rapid mid-stream updates don't thrash updateHtmlAndCss.
|
|
24
|
+
* - a click before Stripo is ready is queued and flushed when `isStripoInitialized` flips.
|
|
12
25
|
*/
|
|
13
26
|
export declare const useEmailTemplateApplier: () => {
|
|
14
27
|
applyStatus: import("vue").Ref<Record<string, ApplyStatus>>;
|
|
15
|
-
markPending: (
|
|
16
|
-
applyTemplate: (
|
|
28
|
+
markPending: (key: string) => void;
|
|
29
|
+
applyTemplate: (key: string, data: {
|
|
17
30
|
html?: string;
|
|
18
31
|
css?: string;
|
|
19
|
-
}) =>
|
|
20
|
-
applyTemplateDebounced: (
|
|
32
|
+
}) => Promise<ApplyOutcome>;
|
|
33
|
+
applyTemplateDebounced: (key: string, data: {
|
|
21
34
|
html?: string;
|
|
22
35
|
css?: string;
|
|
23
|
-
}) =>
|
|
36
|
+
}) => Promise<ApplyOutcome>;
|
|
24
37
|
};
|
|
25
38
|
export declare const resetEmailTemplateApplier: () => void;
|
|
26
39
|
export {};
|
|
@@ -19,6 +19,8 @@ export declare const provideGuidoActions: (actions: {
|
|
|
19
19
|
}) => void;
|
|
20
20
|
/**
|
|
21
21
|
* Provides individual Guido action handlers
|
|
22
|
+
* @deprecated No consumer in src/ and not exported from library.ts — provideGuidoActions
|
|
23
|
+
* provides all four keys itself. Slated for deletion, see the SD-667788 dead-code ledger.
|
|
22
24
|
*/
|
|
23
25
|
export declare const provideBackHandler: (handler: BackHandler) => void;
|
|
24
26
|
export declare const provideSaveStartHandler: (handler: SaveStartHandler) => void;
|
|
@@ -16,6 +16,7 @@ export interface HttpError {
|
|
|
16
16
|
status?: number;
|
|
17
17
|
statusText?: string;
|
|
18
18
|
response?: Response;
|
|
19
|
+
authReported?: boolean;
|
|
19
20
|
}
|
|
20
21
|
export declare const useHttp: (defaultOptions?: HttpOptions) => {
|
|
21
22
|
loading: import("vue").ComputedRef<boolean>;
|
|
@@ -65,6 +66,7 @@ export declare const useHttp: (defaultOptions?: HttpOptions) => {
|
|
|
65
66
|
json: () => Promise<any>;
|
|
66
67
|
text: () => Promise<string>;
|
|
67
68
|
} | undefined;
|
|
69
|
+
authReported?: boolean | undefined;
|
|
68
70
|
} | null>;
|
|
69
71
|
hasError: import("vue").ComputedRef<boolean>;
|
|
70
72
|
request: <T = unknown>(method: HttpMethod, url: string, data?: unknown, options?: HttpOptions) => Promise<HttpResponse<T>>;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import type { LegacyRecommendationConfig } from '@@/Types/config';
|
|
2
|
-
|
|
2
|
+
import { type PartnerScopeMigrationOptions } from './recommendationPartnerMigrator';
|
|
3
|
+
export declare const migrate: (html: string, recommendationConfigs?: Record<string, LegacyRecommendationConfig>, partnerScope?: PartnerScopeMigrationOptions) => Promise<string>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Empties recommendation blocks copied in from another account and stamps the
|
|
3
|
+
* current one, before the editor ever sees the template (SD-151945).
|
|
4
|
+
*
|
|
5
|
+
* Runs at load rather than on document change: the stamp makes it a one-time
|
|
6
|
+
* pass per template, the campaign-URL rule only ever applies to the loaded HTML,
|
|
7
|
+
* and Stripo takes the result as the original document, so nothing is dirtied.
|
|
8
|
+
*/
|
|
9
|
+
export interface PartnerScopeMigrationOptions {
|
|
10
|
+
partnerName: string;
|
|
11
|
+
/** `undefined` when the host does not pass the map — the unstamped check is then off. */
|
|
12
|
+
campaignUrls?: Record<string, unknown>;
|
|
13
|
+
rrsEnabled: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @param html Template HTML, already normalized by `migrateRecommendation`.
|
|
17
|
+
* @returns Migrated HTML, or the original when no block needed a reset or a stamp.
|
|
18
|
+
*/
|
|
19
|
+
export declare function migrateRecommendationPartnerScope(html: string, { partnerName, campaignUrls, rrsEnabled }: PartnerScopeMigrationOptions): string;
|
|
@@ -8,8 +8,8 @@ export declare const URLS: {
|
|
|
8
8
|
NEWSLETTER_RECOMMENDATIONS_PATH: string;
|
|
9
9
|
MIGRATE_STRATEGIES_PATH: string;
|
|
10
10
|
TEMPLATE_MIGRATE_STRATEGIES_PATH: string;
|
|
11
|
-
RECOMMENDATION_STRATEGY_CREATE_PATH: string;
|
|
12
11
|
};
|
|
12
|
+
export declare const strategyCreatePath: () => string;
|
|
13
13
|
export declare const strategyEditPath: (strategyId: string | number) => string;
|
|
14
14
|
export declare const MIGRATION_PATHS: Record<RrsMigrationTarget['scope'], string>;
|
|
15
15
|
export declare const QUERY_PARAMS: {
|
|
@@ -10,5 +10,6 @@ export declare const CheckboxBlockBackgroundControl: {
|
|
|
10
10
|
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
11
11
|
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
12
12
|
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
13
|
+
getElementLockCategory(): import("@stripoinc/ui-editor-extensions").ElementLockCategory | undefined;
|
|
13
14
|
};
|
|
14
15
|
};
|
|
@@ -20,6 +20,7 @@ export declare const TextAlignControl: {
|
|
|
20
20
|
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
21
21
|
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
22
22
|
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
23
|
+
getElementLockCategory(): import("@stripoinc/ui-editor-extensions").ElementLockCategory | undefined;
|
|
23
24
|
};
|
|
24
25
|
};
|
|
25
26
|
export declare const TextColorControl: {
|
|
@@ -32,6 +33,7 @@ export declare const TextColorControl: {
|
|
|
32
33
|
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
33
34
|
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
34
35
|
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
36
|
+
getElementLockCategory(): import("@stripoinc/ui-editor-extensions").ElementLockCategory | undefined;
|
|
35
37
|
};
|
|
36
38
|
};
|
|
37
39
|
export declare const TextSizeControl: {
|
|
@@ -44,6 +46,7 @@ export declare const TextSizeControl: {
|
|
|
44
46
|
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
45
47
|
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
46
48
|
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
49
|
+
getElementLockCategory(): import("@stripoinc/ui-editor-extensions").ElementLockCategory | undefined;
|
|
47
50
|
};
|
|
48
51
|
};
|
|
49
52
|
export declare const TextStyleControl: {
|
|
@@ -56,6 +59,7 @@ export declare const TextStyleControl: {
|
|
|
56
59
|
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
57
60
|
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
58
61
|
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
62
|
+
getElementLockCategory(): import("@stripoinc/ui-editor-extensions").ElementLockCategory | undefined;
|
|
59
63
|
};
|
|
60
64
|
};
|
|
61
65
|
export declare const TextFontFamilyControl: {
|
|
@@ -68,6 +72,7 @@ export declare const TextFontFamilyControl: {
|
|
|
68
72
|
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
69
73
|
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
70
74
|
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
75
|
+
getElementLockCategory(): import("@stripoinc/ui-editor-extensions").ElementLockCategory | undefined;
|
|
71
76
|
};
|
|
72
77
|
};
|
|
73
78
|
export declare const TextBackgroundControl: {
|
|
@@ -80,6 +85,7 @@ export declare const TextBackgroundControl: {
|
|
|
80
85
|
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
81
86
|
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
82
87
|
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
88
|
+
getElementLockCategory(): import("@stripoinc/ui-editor-extensions").ElementLockCategory | undefined;
|
|
83
89
|
};
|
|
84
90
|
};
|
|
85
91
|
export declare const TextPaddingsControl: {
|
|
@@ -92,6 +98,7 @@ export declare const TextPaddingsControl: {
|
|
|
92
98
|
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
93
99
|
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
94
100
|
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
101
|
+
getElementLockCategory(): import("@stripoinc/ui-editor-extensions").ElementLockCategory | undefined;
|
|
95
102
|
};
|
|
96
103
|
};
|
|
97
104
|
export declare const TextLineSpacingControl: {
|
|
@@ -104,5 +111,6 @@ export declare const TextLineSpacingControl: {
|
|
|
104
111
|
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
105
112
|
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
106
113
|
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
114
|
+
getElementLockCategory(): import("@stripoinc/ui-editor-extensions").ElementLockCategory | undefined;
|
|
107
115
|
};
|
|
108
116
|
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single owner for the Items card orientation-dependent layout contract (SD-149368).
|
|
3
|
+
*
|
|
4
|
+
* Two things depend on a card's orientation and are written across several layers:
|
|
5
|
+
*
|
|
6
|
+
* 1. Name column width — a horizontal card lays the name in a narrow side-by-side
|
|
7
|
+
* column, so it is capped; a vertical card gives it a full-width row.
|
|
8
|
+
* 2. Block-cell padding — the collapsible price / original-price block-cell carries its
|
|
9
|
+
* own inter-cell spacing (horizontal cards pad left/right, vertical cards pad
|
|
10
|
+
* top/bottom) so a hidden element removes its own spacing instead of leaving a gap.
|
|
11
|
+
*
|
|
12
|
+
* Every layer that writes these — template render, layouts/horizontal.html,
|
|
13
|
+
* NameTrimmingControl (trimming toggle) and settingsControl (orientation change) — MUST
|
|
14
|
+
* derive them here, or a migrated / re-toggled card silently drifts out of sync with
|
|
15
|
+
* freshly generated markup (convention B1: cross-layer literals live in one module).
|
|
16
|
+
*/
|
|
17
|
+
export declare const NAME_HORIZONTAL_MAX_WIDTH = "130px";
|
|
18
|
+
export declare const NAME_VERTICAL_MAX_WIDTH = "100%";
|
|
19
|
+
/** Name max-width for a card orientation. Non-horizontal (incl. undefined) → full width. */
|
|
20
|
+
export declare const nameMaxWidthFor: (orientation?: string) => string;
|
|
21
|
+
/** Orientation-dependent inter-cell padding classes for a collapsible block-cell. */
|
|
22
|
+
export declare const BLOCK_CELL_PADDING: {
|
|
23
|
+
readonly VERTICAL: "es-p5b es-p5t";
|
|
24
|
+
readonly HORIZONTAL: "es-p5l es-p5r";
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Attribute the block-cell carries to mark its LAYOUT-owned padding orientation ('v'|'h').
|
|
28
|
+
* The orientation toggle keys off this marker so it only ever rewrites the padding the
|
|
29
|
+
* layout itself baked — a user's own es-p* padding classes are never matched or clobbered
|
|
30
|
+
* (SD-149368 F1), and a cell without the marker is left untouched rather than mis-swapped.
|
|
31
|
+
*/
|
|
32
|
+
export declare const BLOCK_CELL_PAD_ATTR = "data-items-cell-pad";
|
|
33
|
+
/** Marker attribute (`data-items-cell-pad="v|h"`) for a block-cell in the given orientation. */
|
|
34
|
+
export declare const blockCellPadMarker: (isVertical: boolean) => string;
|
|
35
|
+
/** Padding classes (leading space included) for a block-cell in the given orientation. */
|
|
36
|
+
export declare const blockCellPaddingFor: (isVertical: boolean) => string;
|
|
37
|
+
/**
|
|
38
|
+
* Rewrites a block-cell's LAYOUT-owned padding classes to the target orientation, keyed off
|
|
39
|
+
* the BLOCK_CELL_PAD_ATTR marker. The orientation-change rebuild re-injects existing cells
|
|
40
|
+
* via getOuterHTML(), which still carry the previous orientation's padding — swap only the
|
|
41
|
+
* layout pair (and flip the marker) so price/original-price cells stay padded after a toggle
|
|
42
|
+
* (SD-149368 F3), while a user's own padding and any unmarked cell are left alone (F1).
|
|
43
|
+
*/
|
|
44
|
+
export declare const reorientBlockCellPadding: (html: string, toVertical: boolean) => string;
|