@useinsider/guido 3.18.2-beta.83b62a8 → 3.18.2-beta.ec25841
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 +0 -20
- package/dist/components/Guido.vue.js +3 -3
- package/dist/components/Guido.vue2.js +30 -30
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +13 -11
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +70 -52
- package/dist/components/organisms/extensions/recommendation/RemoveStrategyModal.vue2.js +23 -37
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +20 -18
- package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.js +21 -0
- package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue2.js +47 -0
- package/dist/composables/useCustomInterfaceAppearance.js +56 -46
- package/dist/composables/useGuidoStateBridge.js +24 -29
- package/dist/composables/useHtmlValidator.js +84 -79
- package/dist/composables/useRecommendation.js +40 -35
- package/dist/composables/useStripo.js +31 -31
- package/dist/enums/extensions/recommendationBlock.js +38 -31
- package/dist/extensions/Blocks/Recommendation/block.js +43 -39
- package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +21 -20
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +38 -33
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +84 -52
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +176 -79
- package/dist/extensions/Blocks/Recommendation/utils/strategyDetach.js +19 -0
- package/dist/extensions/Blocks/Recommendation/validation/requiredFields.js +21 -12
- package/dist/guido.css +1 -1
- package/dist/library.js +13 -15
- package/dist/src/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.d.ts +2 -0
- package/dist/src/composables/useGuidoStateBridge.d.ts +7 -11
- package/dist/src/enums/extensions/recommendationBlock.d.ts +2 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +2 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +9 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +75 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/strategyDetach.d.ts +12 -0
- package/dist/src/extensions/Blocks/Recommendation/validation/requiredFields.d.ts +4 -0
- package/dist/src/library.d.ts +0 -2
- package/dist/src/public/trackingIds.d.ts +2 -6
- package/dist/src/stores/editor.d.ts +0 -25
- package/dist/src/stores/guido-email-editor.d.ts +27 -27
- package/dist/src/stores/onboarding.d.ts +377 -0
- package/dist/static/styles/components/recommendation-strategy.css.js +34 -4
- package/dist/static/styles/components/skeleton.css.js +23 -0
- package/dist/stores/editor.js +0 -4
- package/dist/stores/guido-email-editor.js +4 -0
- package/dist/stores/onboarding.js +41 -36
- package/dist/utils/templatePreparation.js +52 -52
- package/package.json +1 -5
- package/dist/public/editorState.js +0 -4
- package/dist/src/public/editorState.d.ts +0 -14
|
@@ -10,4 +10,4 @@ export { RecommendationBlockId } from './blockIds';
|
|
|
10
10
|
export { RecommendationControlId } from './controlIds';
|
|
11
11
|
export { BLOCK_ROOT_SELECTOR, CONTAINER_SELECTOR, DESKTOP_CONTAINER_SELECTOR, MOBILE_CONTAINER_SELECTOR, MOBILE_ROW_SELECTOR, CSS_CLASS_RECO_BUTTON, CSS_CLASS_SKIP_COMPILE, RECOMMENDATION_VARIABLE_BUILTIN_ATTRIBUTES, CURRENCY_ATTR, ATTR_PRODUCT_IMAGE, ATTR_PRODUCT_NAME, ATTR_PRODUCT_PRICE, ATTR_PRODUCT_OLD_PRICE, ATTR_PRODUCT_OMNIBUS_PRICE, ATTR_PRODUCT_OMNIBUS_DISCOUNT, ATTR_PRODUCT_BUTTON, ATTR_RECOMMENDATION_TITLE, SELECTOR_TITLE_CELL, ATTR_CUSTOM_PREFIX, ATTR_DATA_CARD_COMPOSITION, ATTR_DATA_CUSTOM_ATTRIBUTES, ATTR_PRODUCT_ATTR, CSS_CLASS_ATTRIBUTE_ROW, CSS_CLASS_SPACER, SELECTOR_ATTRIBUTE_ROW, ATTR_DATA_ATTRIBUTE_TYPE, ATTR_DATA_VISIBILITY, PRODUCT_ATTRIBUTE_PREFIX, BUILT_IN_DEFAULT_ATTRIBUTES, } from './selectors';
|
|
12
12
|
export { LAYOUT_VALUES, LAYOUT_OPTIONS, DEFAULT_PRODUCTS_PER_ROW, DEFAULT_CARDS_IN_ROW, DEFAULT_MOBILE_CARDS_IN_ROW, MAX_PRODUCT_COUNT, MIN_PRODUCT_COUNT, MAX_PRODUCTS_PER_ROW, MIN_PRODUCTS_PER_ROW, MAX_MOBILE_PRODUCTS_PER_ROW, MIN_MOBILE_PRODUCTS_PER_ROW, DEFAULT_COLUMN_SPACING, DEFAULT_ROW_SPACING, DEFAULT_MOBILE_COLUMN_SPACING, DEFAULT_MOBILE_ROW_SPACING, MIN_SPACING, MAX_SPACING, SPACING_STEP, } from './layout';
|
|
13
|
-
export { DEFAULT_NODE_CONFIG, DEFAULT_CURRENCY, DEFAULT_COMPOSITION, DEFAULT_VISIBILITY, CURRENT_CONFIG_VERSION, PRE_RRS_CONFIG_VERSION, EXCLUDED_ALGORITHM_IDS, } from './defaultConfig';
|
|
13
|
+
export { DEFAULT_NODE_CONFIG, DEFAULT_CURRENCY, DEFAULT_COMPOSITION, DEFAULT_VISIBILITY, CURRENT_CONFIG_VERSION, PRE_RRS_CONFIG_VERSION, RRS_CONFIG_VERSION, EXCLUDED_ALGORITHM_IDS, } from './defaultConfig';
|
|
@@ -70,6 +70,8 @@ export declare class RecommendationBlockControl extends CommonControl {
|
|
|
70
70
|
* state was rebuilt with (SD-150347).
|
|
71
71
|
*/
|
|
72
72
|
private _syncNodeConfigIfChanged;
|
|
73
|
+
/** Whether the deferred write would move the node's strategyId — see the caller (SD-149916). */
|
|
74
|
+
private _isPendingStrategyIdChange;
|
|
73
75
|
private _capturePendingNodeConfigWrite;
|
|
74
76
|
/**
|
|
75
77
|
* Accumulates the pending write into `documentModifier` without applying, so the
|
|
@@ -2,6 +2,7 @@ import { CommonControl } from '../../../common-control';
|
|
|
2
2
|
export declare const STRATEGY_CONTROL_ID = "recommendation-strategy-control";
|
|
3
3
|
export declare class StrategyControl extends CommonControl {
|
|
4
4
|
private store;
|
|
5
|
+
private onboardingStore;
|
|
5
6
|
private storeUnsubscription;
|
|
6
7
|
private listeners;
|
|
7
8
|
private lastPaintedState;
|
|
@@ -9,6 +10,14 @@ export declare class StrategyControl extends CommonControl {
|
|
|
9
10
|
getTemplate(): string;
|
|
10
11
|
private _strategyAction;
|
|
11
12
|
onRender(): void;
|
|
13
|
+
/**
|
|
14
|
+
* Whether the document itself says this block has no strategy.
|
|
15
|
+
*
|
|
16
|
+
* Read the node, not the store: when the main control cannot resolve the block id off the
|
|
17
|
+
* node it never syncs the persisted config, so the store still holds defaults (empty
|
|
18
|
+
* strategyId) for an assigned block.
|
|
19
|
+
*/
|
|
20
|
+
private _isNodeUnassigned;
|
|
12
21
|
onDestroy(): void;
|
|
13
22
|
private _teardown;
|
|
14
23
|
private _setupButtonListeners;
|
|
@@ -83,8 +83,11 @@ interface StoreState {
|
|
|
83
83
|
strategies: RrsStrategy[];
|
|
84
84
|
strategiesLoading: boolean;
|
|
85
85
|
strategyUrlTemplates: Record<string, string>;
|
|
86
|
+
strategiesFetched: boolean;
|
|
87
|
+
strategiesSettled: boolean;
|
|
86
88
|
blockStates: Record<number, PerBlockState>;
|
|
87
89
|
currentRecommendationId: number | null;
|
|
90
|
+
strategyPanelOpen: boolean;
|
|
88
91
|
configVersion: number;
|
|
89
92
|
}
|
|
90
93
|
export declare const useRecommendationExtensionStore: import("pinia").StoreDefinition<"guidoRecommendationExtension", StoreState, {
|
|
@@ -111,8 +114,11 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
111
114
|
}[];
|
|
112
115
|
strategiesLoading: boolean;
|
|
113
116
|
strategyUrlTemplates: Record<string, string>;
|
|
117
|
+
strategiesFetched: boolean;
|
|
118
|
+
strategiesSettled: boolean;
|
|
114
119
|
blockStates: Record<number, PerBlockState>;
|
|
115
120
|
currentRecommendationId: number | null;
|
|
121
|
+
strategyPanelOpen: boolean;
|
|
116
122
|
configVersion: number;
|
|
117
123
|
} & import("pinia").PiniaCustomStateProperties<StoreState>): PerBlockConfigs;
|
|
118
124
|
/**
|
|
@@ -137,8 +143,11 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
137
143
|
}[];
|
|
138
144
|
strategiesLoading: boolean;
|
|
139
145
|
strategyUrlTemplates: Record<string, string>;
|
|
146
|
+
strategiesFetched: boolean;
|
|
147
|
+
strategiesSettled: boolean;
|
|
140
148
|
blockStates: Record<number, PerBlockState>;
|
|
141
149
|
currentRecommendationId: number | null;
|
|
150
|
+
strategyPanelOpen: boolean;
|
|
142
151
|
configVersion: number;
|
|
143
152
|
} & import("pinia").PiniaCustomStateProperties<StoreState>): RecommendationProduct[];
|
|
144
153
|
/**
|
|
@@ -163,8 +172,11 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
163
172
|
}[];
|
|
164
173
|
strategiesLoading: boolean;
|
|
165
174
|
strategyUrlTemplates: Record<string, string>;
|
|
175
|
+
strategiesFetched: boolean;
|
|
176
|
+
strategiesSettled: boolean;
|
|
166
177
|
blockStates: Record<number, PerBlockState>;
|
|
167
178
|
currentRecommendationId: number | null;
|
|
179
|
+
strategyPanelOpen: boolean;
|
|
168
180
|
configVersion: number;
|
|
169
181
|
} & import("pinia").PiniaCustomStateProperties<StoreState>): boolean;
|
|
170
182
|
assignStrategyDrawerStatus(state: {
|
|
@@ -186,8 +198,11 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
186
198
|
}[];
|
|
187
199
|
strategiesLoading: boolean;
|
|
188
200
|
strategyUrlTemplates: Record<string, string>;
|
|
201
|
+
strategiesFetched: boolean;
|
|
202
|
+
strategiesSettled: boolean;
|
|
189
203
|
blockStates: Record<number, PerBlockState>;
|
|
190
204
|
currentRecommendationId: number | null;
|
|
205
|
+
strategyPanelOpen: boolean;
|
|
191
206
|
configVersion: number;
|
|
192
207
|
} & import("pinia").PiniaCustomStateProperties<StoreState>): boolean;
|
|
193
208
|
removeStrategyModalStatus(state: {
|
|
@@ -209,8 +224,11 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
209
224
|
}[];
|
|
210
225
|
strategiesLoading: boolean;
|
|
211
226
|
strategyUrlTemplates: Record<string, string>;
|
|
227
|
+
strategiesFetched: boolean;
|
|
228
|
+
strategiesSettled: boolean;
|
|
212
229
|
blockStates: Record<number, PerBlockState>;
|
|
213
230
|
currentRecommendationId: number | null;
|
|
231
|
+
strategyPanelOpen: boolean;
|
|
214
232
|
configVersion: number;
|
|
215
233
|
} & import("pinia").PiniaCustomStateProperties<StoreState>): boolean;
|
|
216
234
|
assignedStrategy(state: {
|
|
@@ -232,8 +250,11 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
232
250
|
}[];
|
|
233
251
|
strategiesLoading: boolean;
|
|
234
252
|
strategyUrlTemplates: Record<string, string>;
|
|
253
|
+
strategiesFetched: boolean;
|
|
254
|
+
strategiesSettled: boolean;
|
|
235
255
|
blockStates: Record<number, PerBlockState>;
|
|
236
256
|
currentRecommendationId: number | null;
|
|
257
|
+
strategyPanelOpen: boolean;
|
|
237
258
|
configVersion: number;
|
|
238
259
|
} & import("pinia").PiniaCustomStateProperties<StoreState>): RrsStrategy | null;
|
|
239
260
|
/**
|
|
@@ -258,8 +279,11 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
258
279
|
}[];
|
|
259
280
|
strategiesLoading: boolean;
|
|
260
281
|
strategyUrlTemplates: Record<string, string>;
|
|
282
|
+
strategiesFetched: boolean;
|
|
283
|
+
strategiesSettled: boolean;
|
|
261
284
|
blockStates: Record<number, PerBlockState>;
|
|
262
285
|
currentRecommendationId: number | null;
|
|
286
|
+
strategyPanelOpen: boolean;
|
|
263
287
|
configVersion: number;
|
|
264
288
|
} & import("pinia").PiniaCustomStateProperties<StoreState>): boolean;
|
|
265
289
|
/**
|
|
@@ -284,8 +308,11 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
284
308
|
}[];
|
|
285
309
|
strategiesLoading: boolean;
|
|
286
310
|
strategyUrlTemplates: Record<string, string>;
|
|
311
|
+
strategiesFetched: boolean;
|
|
312
|
+
strategiesSettled: boolean;
|
|
287
313
|
blockStates: Record<number, PerBlockState>;
|
|
288
314
|
currentRecommendationId: number | null;
|
|
315
|
+
strategyPanelOpen: boolean;
|
|
289
316
|
configVersion: number;
|
|
290
317
|
} & import("pinia").PiniaCustomStateProperties<StoreState>): number;
|
|
291
318
|
hasFilters(): boolean;
|
|
@@ -311,8 +338,11 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
311
338
|
}[];
|
|
312
339
|
strategiesLoading: boolean;
|
|
313
340
|
strategyUrlTemplates: Record<string, string>;
|
|
341
|
+
strategiesFetched: boolean;
|
|
342
|
+
strategiesSettled: boolean;
|
|
314
343
|
blockStates: Record<number, PerBlockState>;
|
|
315
344
|
currentRecommendationId: number | null;
|
|
345
|
+
strategyPanelOpen: boolean;
|
|
316
346
|
configVersion: number;
|
|
317
347
|
} & import("pinia").PiniaCustomStateProperties<StoreState>) => {
|
|
318
348
|
text: string;
|
|
@@ -337,8 +367,11 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
337
367
|
}[];
|
|
338
368
|
strategiesLoading: boolean;
|
|
339
369
|
strategyUrlTemplates: Record<string, string>;
|
|
370
|
+
strategiesFetched: boolean;
|
|
371
|
+
strategiesSettled: boolean;
|
|
340
372
|
blockStates: Record<number, PerBlockState>;
|
|
341
373
|
currentRecommendationId: number | null;
|
|
374
|
+
strategyPanelOpen: boolean;
|
|
342
375
|
configVersion: number;
|
|
343
376
|
} & import("pinia").PiniaCustomStateProperties<StoreState>) => {
|
|
344
377
|
text: string;
|
|
@@ -363,8 +396,11 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
363
396
|
}[];
|
|
364
397
|
strategiesLoading: boolean;
|
|
365
398
|
strategyUrlTemplates: Record<string, string>;
|
|
399
|
+
strategiesFetched: boolean;
|
|
400
|
+
strategiesSettled: boolean;
|
|
366
401
|
blockStates: Record<number, PerBlockState>;
|
|
367
402
|
currentRecommendationId: number | null;
|
|
403
|
+
strategyPanelOpen: boolean;
|
|
368
404
|
configVersion: number;
|
|
369
405
|
} & import("pinia").PiniaCustomStateProperties<StoreState>) => {
|
|
370
406
|
text: string;
|
|
@@ -445,6 +481,40 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
445
481
|
openRemoveStrategyModal(): void;
|
|
446
482
|
closeRemoveStrategyModal(): void;
|
|
447
483
|
fetchStrategies(): Promise<void>;
|
|
484
|
+
invalidateStrategies(): void;
|
|
485
|
+
/**
|
|
486
|
+
* Opens a Smart Recommender strategy page in a new tab and refreshes the list every time
|
|
487
|
+
* the user comes back. `visibilitychange` only: a `focus` listener would also fire when
|
|
488
|
+
* focus merely returns from the Stripo canvas iframe to the panel, refetching and
|
|
489
|
+
* regenerating the canvas while the user never left the editor (SD-149916).
|
|
490
|
+
*
|
|
491
|
+
* Deliberately NOT one-shot: the strategy tab stays open, so a user can create a second
|
|
492
|
+
* strategy in it and come back again — a listener that disarmed on the first return would
|
|
493
|
+
* leave that one missing from the list. It disarms on the first return AFTER that tab is
|
|
494
|
+
* closed instead, so an ordinary alt-tab later in the session costs nothing. Armed only
|
|
495
|
+
* once the user actually opens a strategy page, so anyone who never does pays nothing.
|
|
496
|
+
*/
|
|
497
|
+
_armStrategyPageReturn(url: string): void;
|
|
498
|
+
/**
|
|
499
|
+
* Reloads the products of the block the user is on, so an edit made in the strategy tab
|
|
500
|
+
* lands on the canvas instead of waiting for the assign drawer to be reopened.
|
|
501
|
+
*
|
|
502
|
+
* Only the selected block: the canvas regeneration is driven off the active block's
|
|
503
|
+
* product array, so refreshing an unselected block would fetch without redrawing it.
|
|
504
|
+
*/
|
|
505
|
+
_refreshAssignedStrategyProducts(): Promise<void>;
|
|
506
|
+
/** Lets the editor tear the return listeners down when it unmounts. */
|
|
507
|
+
disposeStrategyPageReturn(): void;
|
|
508
|
+
/**
|
|
509
|
+
* Opens Smart Recommender's strategy creation page. Every return refreshes the list so the
|
|
510
|
+
* new strategy is offered; the user picks it themselves.
|
|
511
|
+
*/
|
|
512
|
+
openStrategyCreation(): void;
|
|
513
|
+
/**
|
|
514
|
+
* Opens the strategy's edit page. Every return refreshes the list so the block reflects the
|
|
515
|
+
* edited configuration.
|
|
516
|
+
*/
|
|
517
|
+
openStrategyEdit(strategyId: string | number): void;
|
|
448
518
|
resolveStrategyUrlTemplate(strategy: RrsStrategy, currency: string): Promise<string>;
|
|
449
519
|
assignStrategy(strategy: RrsStrategy): void;
|
|
450
520
|
removeStrategy(): void;
|
|
@@ -462,6 +532,11 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
462
532
|
* every block's recommendationConfigs across user edits.
|
|
463
533
|
*/
|
|
464
534
|
hasInvalidBlock(): boolean;
|
|
535
|
+
/**
|
|
536
|
+
* Which required fields are missing across the design's blocks, so the save
|
|
537
|
+
* toaster can name the cause instead of always showing the generic message.
|
|
538
|
+
*/
|
|
539
|
+
invalidBlockFields(): string[];
|
|
465
540
|
fetchRecommendationProducts(): Promise<void>;
|
|
466
541
|
_doFetchProducts(): Promise<void>;
|
|
467
542
|
_doFetchStrategyProducts(blockId: number): Promise<void>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Repaints a block whose strategy assignment was just cleared, straight to the document.
|
|
3
|
+
*
|
|
4
|
+
* Both callers are host-rendered UI outside `ui-editor`, so neither can leave this to the
|
|
5
|
+
* settings panel: the remove modal's click deselects the block and destroys the control, and
|
|
6
|
+
* the edit button opens the strategy page in the same gesture, so the panel's 500 ms debounced
|
|
7
|
+
* refetch races a tab that is already gone. Either way the canvas kept the old strategy's
|
|
8
|
+
* products while the block read as unassigned (SD-149916).
|
|
9
|
+
*
|
|
10
|
+
* Call AFTER the store assignment is cleared (`removeStrategy`).
|
|
11
|
+
*/
|
|
12
|
+
export declare function commitStrategyDetach(blockId: number): Promise<void>;
|
|
@@ -15,7 +15,11 @@ export interface RequiredField {
|
|
|
15
15
|
getAvailableOptions?: (store: ExtensionStoreSlice) => string[];
|
|
16
16
|
condition?: (config: PerBlockConfigs) => boolean;
|
|
17
17
|
}
|
|
18
|
+
/** Field key of the strategy/algorithm descriptor, used to pick the toaster message. */
|
|
19
|
+
export declare const STRATEGY_FIELD_KEY = "strategy";
|
|
18
20
|
export declare const REQUIRED_RECOMMENDATION_FIELDS: RequiredField[];
|
|
19
21
|
export declare const RecommendationRequiredFieldsKey = "newsletter.recommendation-fill-required-fields";
|
|
22
|
+
/** Shown instead of the generic message when the only thing missing is the strategy. */
|
|
23
|
+
export declare const RecommendationAssignStrategyKey = "newsletter.recommendation-assign-strategy";
|
|
20
24
|
export declare function getInvalidFields(config: PerBlockConfigs, store: ExtensionStoreSlice, fields?: RequiredField[]): string[];
|
|
21
25
|
export declare function isConfigValid(config: PerBlockConfigs, store: ExtensionStoreSlice): boolean;
|
package/dist/src/library.d.ts
CHANGED
|
@@ -2,7 +2,5 @@ export { default as Guido } from './components/Guido.vue';
|
|
|
2
2
|
export type { GuidoConfig, GuidoConfigInput, IdentityConfig, PartnerConfig, TemplateConfig, TemplateMigrationConfig, LegacyRecommendationConfig, EditorConfig, UIConfig, FeaturesConfig, BlocksConfig, CompilerConfig, DynamicContent, EmailHeader, DefaultBlockType, CustomBlockType, ValidationResult, ValidationError, } from './@types/config';
|
|
3
3
|
export { validateConfig, parseConfig, parseConfigSafe, isValidConfig, getValidationErrors, MessageType, ProductType, } from './@types/config';
|
|
4
4
|
export { assignTrackingIds, readTrackFloor, readTrackSeq } from './public/trackingIds';
|
|
5
|
-
export { useGuidoEmailEditorStore } from './public/editorState';
|
|
6
|
-
export type { GuidoEmailEditorState } from './public/editorState';
|
|
7
5
|
export type { StripoEventType } from './@types/events';
|
|
8
6
|
export type { PositionData, DynamicContentEvent, MergeTagClickEvent, MergeTag, BaseDynamicContent, DynamicContentNode, DynamicContentList, TooltipOptions, TextValueObject, L10n, } from './@types/generic';
|
|
@@ -4,10 +4,6 @@
|
|
|
4
4
|
* Importing from here pulls in nothing else, so the editor never enters a
|
|
5
5
|
* consumer's module graph. Re-export surface only: this is the contract,
|
|
6
6
|
* `utils/linkTrackingIds` is the implementation and stays free to move.
|
|
7
|
-
*
|
|
8
|
-
* Relative, not the `@@/Utils/` alias: vue-tsc copies the specifier into the emitted
|
|
9
|
-
* .d.ts verbatim, and a consumer's TypeScript cannot resolve our alias table. A relative
|
|
10
|
-
* path resolves against dist/src/, so the published types actually load.
|
|
11
7
|
*/
|
|
12
|
-
export { assignTrackingIds, readTrackFloor, readTrackSeq, TRACK_ID_ATTRIBUTE, TRACK_SEQ_ATTRIBUTE, } from '
|
|
13
|
-
export type { TrackingIdResult } from '
|
|
8
|
+
export { assignTrackingIds, readTrackFloor, readTrackSeq, TRACK_ID_ATTRIBUTE, TRACK_SEQ_ATTRIBUTE, } from '@@/Utils/linkTrackingIds';
|
|
9
|
+
export type { TrackingIdResult } from '@@/Utils/linkTrackingIds';
|
|
@@ -6,7 +6,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
6
6
|
isPreviewModeOpen: boolean;
|
|
7
7
|
editorVisualMode: string;
|
|
8
8
|
hasChanges: boolean;
|
|
9
|
-
changeSeq: number;
|
|
10
9
|
isStripoInitialized: boolean;
|
|
11
10
|
templateId: string;
|
|
12
11
|
syncModulesEnabled: boolean;
|
|
@@ -20,7 +19,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
20
19
|
isPreviewModeOpen: boolean;
|
|
21
20
|
editorVisualMode: string;
|
|
22
21
|
hasChanges: boolean;
|
|
23
|
-
changeSeq: number;
|
|
24
22
|
isStripoInitialized: boolean;
|
|
25
23
|
templateId: string;
|
|
26
24
|
syncModulesEnabled: boolean;
|
|
@@ -33,7 +31,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
33
31
|
isPreviewModeOpen: boolean;
|
|
34
32
|
editorVisualMode: string;
|
|
35
33
|
hasChanges: boolean;
|
|
36
|
-
changeSeq: number;
|
|
37
34
|
isStripoInitialized: boolean;
|
|
38
35
|
templateId: string;
|
|
39
36
|
syncModulesEnabled: boolean;
|
|
@@ -47,7 +44,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
47
44
|
isPreviewModeOpen: boolean;
|
|
48
45
|
editorVisualMode: string;
|
|
49
46
|
hasChanges: boolean;
|
|
50
|
-
changeSeq: number;
|
|
51
47
|
isStripoInitialized: boolean;
|
|
52
48
|
templateId: string;
|
|
53
49
|
syncModulesEnabled: boolean;
|
|
@@ -60,7 +56,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
60
56
|
isPreviewModeOpen: boolean;
|
|
61
57
|
editorVisualMode: string;
|
|
62
58
|
hasChanges: boolean;
|
|
63
|
-
changeSeq: number;
|
|
64
59
|
isStripoInitialized: boolean;
|
|
65
60
|
templateId: string;
|
|
66
61
|
syncModulesEnabled: boolean;
|
|
@@ -74,7 +69,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
74
69
|
isPreviewModeOpen: boolean;
|
|
75
70
|
editorVisualMode: string;
|
|
76
71
|
hasChanges: boolean;
|
|
77
|
-
changeSeq: number;
|
|
78
72
|
isStripoInitialized: boolean;
|
|
79
73
|
templateId: string;
|
|
80
74
|
syncModulesEnabled: boolean;
|
|
@@ -87,7 +81,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
87
81
|
isPreviewModeOpen: boolean;
|
|
88
82
|
editorVisualMode: string;
|
|
89
83
|
hasChanges: boolean;
|
|
90
|
-
changeSeq: number;
|
|
91
84
|
isStripoInitialized: boolean;
|
|
92
85
|
templateId: string;
|
|
93
86
|
syncModulesEnabled: boolean;
|
|
@@ -101,7 +94,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
101
94
|
isPreviewModeOpen: boolean;
|
|
102
95
|
editorVisualMode: string;
|
|
103
96
|
hasChanges: boolean;
|
|
104
|
-
changeSeq: number;
|
|
105
97
|
isStripoInitialized: boolean;
|
|
106
98
|
templateId: string;
|
|
107
99
|
syncModulesEnabled: boolean;
|
|
@@ -114,7 +106,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
114
106
|
isPreviewModeOpen: boolean;
|
|
115
107
|
editorVisualMode: string;
|
|
116
108
|
hasChanges: boolean;
|
|
117
|
-
changeSeq: number;
|
|
118
109
|
isStripoInitialized: boolean;
|
|
119
110
|
templateId: string;
|
|
120
111
|
syncModulesEnabled: boolean;
|
|
@@ -128,7 +119,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
128
119
|
isPreviewModeOpen: boolean;
|
|
129
120
|
editorVisualMode: string;
|
|
130
121
|
hasChanges: boolean;
|
|
131
|
-
changeSeq: number;
|
|
132
122
|
isStripoInitialized: boolean;
|
|
133
123
|
templateId: string;
|
|
134
124
|
syncModulesEnabled: boolean;
|
|
@@ -141,7 +131,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
141
131
|
isPreviewModeOpen: boolean;
|
|
142
132
|
editorVisualMode: string;
|
|
143
133
|
hasChanges: boolean;
|
|
144
|
-
changeSeq: number;
|
|
145
134
|
isStripoInitialized: boolean;
|
|
146
135
|
templateId: string;
|
|
147
136
|
syncModulesEnabled: boolean;
|
|
@@ -155,7 +144,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
155
144
|
isPreviewModeOpen: boolean;
|
|
156
145
|
editorVisualMode: string;
|
|
157
146
|
hasChanges: boolean;
|
|
158
|
-
changeSeq: number;
|
|
159
147
|
isStripoInitialized: boolean;
|
|
160
148
|
templateId: string;
|
|
161
149
|
syncModulesEnabled: boolean;
|
|
@@ -168,7 +156,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
168
156
|
isPreviewModeOpen: boolean;
|
|
169
157
|
editorVisualMode: string;
|
|
170
158
|
hasChanges: boolean;
|
|
171
|
-
changeSeq: number;
|
|
172
159
|
isStripoInitialized: boolean;
|
|
173
160
|
templateId: string;
|
|
174
161
|
syncModulesEnabled: boolean;
|
|
@@ -182,7 +169,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
182
169
|
isPreviewModeOpen: boolean;
|
|
183
170
|
editorVisualMode: string;
|
|
184
171
|
hasChanges: boolean;
|
|
185
|
-
changeSeq: number;
|
|
186
172
|
isStripoInitialized: boolean;
|
|
187
173
|
templateId: string;
|
|
188
174
|
syncModulesEnabled: boolean;
|
|
@@ -195,7 +181,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
195
181
|
isPreviewModeOpen: boolean;
|
|
196
182
|
editorVisualMode: string;
|
|
197
183
|
hasChanges: boolean;
|
|
198
|
-
changeSeq: number;
|
|
199
184
|
isStripoInitialized: boolean;
|
|
200
185
|
templateId: string;
|
|
201
186
|
syncModulesEnabled: boolean;
|
|
@@ -209,7 +194,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
209
194
|
isPreviewModeOpen: boolean;
|
|
210
195
|
editorVisualMode: string;
|
|
211
196
|
hasChanges: boolean;
|
|
212
|
-
changeSeq: number;
|
|
213
197
|
isStripoInitialized: boolean;
|
|
214
198
|
templateId: string;
|
|
215
199
|
syncModulesEnabled: boolean;
|
|
@@ -222,7 +206,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
222
206
|
isPreviewModeOpen: boolean;
|
|
223
207
|
editorVisualMode: string;
|
|
224
208
|
hasChanges: boolean;
|
|
225
|
-
changeSeq: number;
|
|
226
209
|
isStripoInitialized: boolean;
|
|
227
210
|
templateId: string;
|
|
228
211
|
syncModulesEnabled: boolean;
|
|
@@ -236,7 +219,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
236
219
|
isPreviewModeOpen: boolean;
|
|
237
220
|
editorVisualMode: string;
|
|
238
221
|
hasChanges: boolean;
|
|
239
|
-
changeSeq: number;
|
|
240
222
|
isStripoInitialized: boolean;
|
|
241
223
|
templateId: string;
|
|
242
224
|
syncModulesEnabled: boolean;
|
|
@@ -249,7 +231,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
249
231
|
isPreviewModeOpen: boolean;
|
|
250
232
|
editorVisualMode: string;
|
|
251
233
|
hasChanges: boolean;
|
|
252
|
-
changeSeq: number;
|
|
253
234
|
isStripoInitialized: boolean;
|
|
254
235
|
templateId: string;
|
|
255
236
|
syncModulesEnabled: boolean;
|
|
@@ -263,7 +244,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
263
244
|
isPreviewModeOpen: boolean;
|
|
264
245
|
editorVisualMode: string;
|
|
265
246
|
hasChanges: boolean;
|
|
266
|
-
changeSeq: number;
|
|
267
247
|
isStripoInitialized: boolean;
|
|
268
248
|
templateId: string;
|
|
269
249
|
syncModulesEnabled: boolean;
|
|
@@ -276,7 +256,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
276
256
|
isPreviewModeOpen: boolean;
|
|
277
257
|
editorVisualMode: string;
|
|
278
258
|
hasChanges: boolean;
|
|
279
|
-
changeSeq: number;
|
|
280
259
|
isStripoInitialized: boolean;
|
|
281
260
|
templateId: string;
|
|
282
261
|
syncModulesEnabled: boolean;
|
|
@@ -290,7 +269,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
290
269
|
isPreviewModeOpen: boolean;
|
|
291
270
|
editorVisualMode: string;
|
|
292
271
|
hasChanges: boolean;
|
|
293
|
-
changeSeq: number;
|
|
294
272
|
isStripoInitialized: boolean;
|
|
295
273
|
templateId: string;
|
|
296
274
|
syncModulesEnabled: boolean;
|
|
@@ -303,7 +281,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
303
281
|
isPreviewModeOpen: boolean;
|
|
304
282
|
editorVisualMode: string;
|
|
305
283
|
hasChanges: boolean;
|
|
306
|
-
changeSeq: number;
|
|
307
284
|
isStripoInitialized: boolean;
|
|
308
285
|
templateId: string;
|
|
309
286
|
syncModulesEnabled: boolean;
|
|
@@ -317,7 +294,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
317
294
|
isPreviewModeOpen: boolean;
|
|
318
295
|
editorVisualMode: string;
|
|
319
296
|
hasChanges: boolean;
|
|
320
|
-
changeSeq: number;
|
|
321
297
|
isStripoInitialized: boolean;
|
|
322
298
|
templateId: string;
|
|
323
299
|
syncModulesEnabled: boolean;
|
|
@@ -330,7 +306,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
330
306
|
isPreviewModeOpen: boolean;
|
|
331
307
|
editorVisualMode: string;
|
|
332
308
|
hasChanges: boolean;
|
|
333
|
-
changeSeq: number;
|
|
334
309
|
isStripoInitialized: boolean;
|
|
335
310
|
templateId: string;
|
|
336
311
|
syncModulesEnabled: boolean;
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Outbound contract Guido publishes to the host's shared Pinia singleton so
|
|
3
|
+
* cortex-fe can pick up the current editor state and forward it as
|
|
4
|
+
* `clientState.editor` on the next chat-stream POST.
|
|
5
|
+
*
|
|
6
|
+
* State + getters only — `useGuidoStateBridge` writes via `$patch`, no actions
|
|
7
|
+
* live here (architecture invariant).
|
|
8
|
+
*
|
|
9
|
+
* Store id `guidoEmailEditor` is cross-MFE: cortex-fe reads it via
|
|
10
|
+
* `pinia._s.get('guidoEmailEditor')` at runtime. The internal Guido editor
|
|
11
|
+
* store keeps id `guidoEditor` — these are intentionally separate. The
|
|
12
|
+
* internal store carries UI state that cortex-fe should not see; this public
|
|
13
|
+
* store carries the contract Guido is willing to share.
|
|
14
|
+
*/
|
|
15
|
+
export declare const useGuidoEmailEditorStore: import("pinia").StoreDefinition<"guidoEmailEditor", {
|
|
3
16
|
/** Current Stripo HTML — stripe tables only, no DOCTYPE/wrapper. */
|
|
4
17
|
html: string;
|
|
5
18
|
/** Current Stripo CSS — es-p* utility classes used by the html. */
|
|
6
19
|
css: string;
|
|
7
20
|
/** Wall-clock ms when html/css were last written by the bridge. */
|
|
8
21
|
lastUpdatedAt: number;
|
|
9
|
-
/** Template id from the editor config,
|
|
22
|
+
/** Template id from the editor config, for cortex-fe to scope per-template. */
|
|
10
23
|
templateId: string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Outbound contract Guido publishes to the host's shared Pinia singleton so a
|
|
14
|
-
* consumer can read the current editor state: cortex-fe forwards it as
|
|
15
|
-
* `clientState.editor` on the next chat-stream POST, email-fe scans it for the
|
|
16
|
-
* Array of Objects lock.
|
|
17
|
-
*
|
|
18
|
-
* Published as `@useinsider/guido/editor-state` and from the root barrel, so a
|
|
19
|
-
* consumer imports this store instead of re-declaring one under the same id.
|
|
20
|
-
*
|
|
21
|
-
* State + getters only, no actions. `useGuidoStateBridge` is the only intended
|
|
22
|
-
* writer, but that is Guido's own convention rather than something the store
|
|
23
|
-
* enforces: publishing the definition hands a consumer `$patch` as well, exactly
|
|
24
|
-
* as the runtime `pinia._s` probe always did.
|
|
25
|
-
*
|
|
26
|
-
* Store id `guidoEmailEditor` is cross-MFE: cortex-fe reads it via
|
|
27
|
-
* `pinia._s.get('guidoEmailEditor')` at runtime rather than importing it, so the
|
|
28
|
-
* id stays part of the contract. The internal Guido editor store keeps id
|
|
29
|
-
* `guidoEditor` — these are intentionally separate. The internal store carries
|
|
30
|
-
* UI state a consumer should not see; this public store carries the contract
|
|
31
|
-
* Guido is willing to share.
|
|
32
|
-
*/
|
|
33
|
-
export declare const useGuidoEmailEditorStore: import("pinia").StoreDefinition<"guidoEmailEditor", GuidoEmailEditorState, {
|
|
24
|
+
}, {
|
|
34
25
|
/** True once the bridge has published at least one snapshot. */
|
|
35
26
|
hasSnapshot: (state: {
|
|
36
27
|
html: string;
|
|
37
28
|
css: string;
|
|
38
29
|
lastUpdatedAt: number;
|
|
39
30
|
templateId: string;
|
|
40
|
-
} & import("pinia").PiniaCustomStateProperties<
|
|
31
|
+
} & import("pinia").PiniaCustomStateProperties<{
|
|
32
|
+
/** Current Stripo HTML — stripe tables only, no DOCTYPE/wrapper. */
|
|
33
|
+
html: string;
|
|
34
|
+
/** Current Stripo CSS — es-p* utility classes used by the html. */
|
|
35
|
+
css: string;
|
|
36
|
+
/** Wall-clock ms when html/css were last written by the bridge. */
|
|
37
|
+
lastUpdatedAt: number;
|
|
38
|
+
/** Template id from the editor config, for cortex-fe to scope per-template. */
|
|
39
|
+
templateId: string;
|
|
40
|
+
}>) => boolean;
|
|
41
41
|
}, {}>;
|