@designcrowd/library.brand-page 6.0.11 → 6.0.12
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/lib/src/{CreatedOnBrandCrowd-de-de-DopPc6g2.js → CreatedOnBrandCrowd-de-de-BfQcnhof.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-CSHmaAWm.js → CreatedOnBrandCrowd-en-us-B86JfNzV.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-C4vM0p2e.js → CreatedOnBrandCrowd-es-es-Dy70BV7X.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-ArpBbnxm.js → CreatedOnBrandCrowd-fr-ca-CQ8UhGRG.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-ArpBbnxm.js → CreatedOnBrandCrowd-fr-fr-CQ8UhGRG.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-CGAQLXiX.js → CreatedOnBrandCrowd-pt-br-c257u4q-.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-CGAQLXiX.js → CreatedOnBrandCrowd-pt-pt-c257u4q-.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-3WVSgB6t.js → CreatedOnDcom-de-de-cRZ_Lx3_.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-Dx-RHXrH.js → CreatedOnDcom-en-us-CrfHKR-1.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-CfnEYFMA.js → CreatedOnDcom-es-es-BFjhMPTR.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-BSHZTiUO.js → CreatedOnDcom-fr-ca-CZimjPcn.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-DtHssrQb.js → CreatedOnDcom-fr-fr-V1z3-WzE.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-CdX1aRI8.js → CreatedOnDcom-pt-br-NrmWKrvi.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-jy044FNL.js → CreatedOnDcom-pt-pt-CKLASXM9.js} +1 -1
- package/lib/src/index.mjs +84 -83
- package/lib/src/{lib-Bx7xK4dn.js → lib-CHfUKgt-.js} +19700 -20039
- package/lib/src/tracker.d.ts +2 -0
- package/lib/src/tracker.js +12 -0
- package/lib/src/tracker.mjs +12 -0
- package/lib/src/useEventTracker-DmQ6AkNn.js +356 -0
- package/package.json +16 -1
- package/src/tracker.ts +28 -0
- package/lib/src/metadata-builder/builders/reorder-pages-builder.d.ts +0 -13
- package/lib/src/metadata-builder/builders/reorder-pages-builder.js +0 -49
- package/src/metadata-builder/builders/reorder-pages-builder.ts +0 -80
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { useEventTracker, EVENTS, SELECT_LOCATIONS, UPGRADE_CTA_LOCATIONS, AI_CTA_LOCATIONS, TRIGGER_TYPE, PUBLISH_MODAL_CONTINUATION_EVENTS, GENERATE_TEXT_CONTINUATION_EVENTS, PUBLISH_OPTION_MODAL_CONTINUATION_EVENTS, } from './brand-page-maker/composables/useEventTracker';
|
|
2
|
+
export type { EventTracker, BpEventTrackerEvent, BpGlobalEventProps, BpUpsellEventProps, } from './brand-page-maker/composables/useEventTracker';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Lightweight subpath entry: `@designcrowd/library.brand-page/tracker`.
|
|
2
|
+
// Re-exports ONLY the analytics surface (useEventTracker + event constants),
|
|
3
|
+
// which depends solely on `vue`. This lets consumers import the tracker without
|
|
4
|
+
// pulling the full library graph (maker, TipTap, renderer). See
|
|
5
|
+
// docs/plans/multi-entrypoint-tree-shaking.md and the /tracker proposal.
|
|
6
|
+
//
|
|
7
|
+
// IMPORTANT: useEventTracker holds module-scoped pub/sub state (LISTENERS,
|
|
8
|
+
// GLOBAL_EVENT_PROPS). It MUST resolve to a single shared instance across this
|
|
9
|
+
// entry and the root `.` entry, or subscribers registered here won't receive
|
|
10
|
+
// events published via the root. The multi-entry build hoists it into a shared
|
|
11
|
+
// chunk (both `index` and `tracker` import it) — verified at build time.
|
|
12
|
+
export { useEventTracker, EVENTS, SELECT_LOCATIONS, UPGRADE_CTA_LOCATIONS, AI_CTA_LOCATIONS, TRIGGER_TYPE, PUBLISH_MODAL_CONTINUATION_EVENTS, GENERATE_TEXT_CONTINUATION_EVENTS, PUBLISH_OPTION_MODAL_CONTINUATION_EVENTS, } from './brand-page-maker/composables/useEventTracker';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { A as N, E as O, G as _, P as A, a as I, S as a, T as S, U as s, u as C } from "./useEventTracker-DmQ6AkNn.js";
|
|
2
|
+
export {
|
|
3
|
+
N as AI_CTA_LOCATIONS,
|
|
4
|
+
O as EVENTS,
|
|
5
|
+
_ as GENERATE_TEXT_CONTINUATION_EVENTS,
|
|
6
|
+
A as PUBLISH_MODAL_CONTINUATION_EVENTS,
|
|
7
|
+
I as PUBLISH_OPTION_MODAL_CONTINUATION_EVENTS,
|
|
8
|
+
a as SELECT_LOCATIONS,
|
|
9
|
+
S as TRIGGER_TYPE,
|
|
10
|
+
s as UPGRADE_CTA_LOCATIONS,
|
|
11
|
+
C as useEventTracker
|
|
12
|
+
};
|
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
import { shallowRef as A } from "vue";
|
|
2
|
+
const E = {
|
|
3
|
+
EXPERIMENT_STARTED: "$experiment_started",
|
|
4
|
+
WEBSITE_MAKER_ADD_CONTENT: "website_maker_add_content",
|
|
5
|
+
WEBSITE_MAKER_REMOVE_CONTENT: "website_maker_remove_content",
|
|
6
|
+
WEBSITE_MAKER_SELECT_CONTENT: "website_maker_select_content",
|
|
7
|
+
WEBSITE_MAKER_UPSELL_MODAL: "website_maker_upsell_modal",
|
|
8
|
+
WEBSITE_MAKER_PUBLISH_MODAL: "website_maker_publish_modal",
|
|
9
|
+
WEBSITE_MAKER_ADD_PAGE: "website_maker_add_page",
|
|
10
|
+
WEBSITE_MAKER_REMOVE_PAGE: "website_maker_remove_page",
|
|
11
|
+
WEBSITE_MAKER_REORDER_PAGE: "website_maker_reorder_page",
|
|
12
|
+
WEBSITE_MAKER_OPEN: "website_maker_open",
|
|
13
|
+
WEBSITE_MAKER_PUBLISH_UPSELL_OPTION_MODAL: "website_maker_publish_upsell_option_modal",
|
|
14
|
+
WEBSITE_MAKER_TEMPLATE_SEARCH: "website_maker_template_search",
|
|
15
|
+
WEBSITE_MAKER_TEMPLATE_SELECT: "website_maker_template_select",
|
|
16
|
+
WEBSITE_MAKER_TEMPLATE_CATEGORY_SELECT: "website_maker_template_category_select",
|
|
17
|
+
WEBSITE_SIDEBAR_TAB_CLICKED: "website_sidebar_tab_clicked",
|
|
18
|
+
WEBSITE_MAKER_HYPERLINK_ADD: "website_maker_hyperlink_add",
|
|
19
|
+
WEBSITE_MAKER_HYPERLINK_REMOVE: "website_maker_hyperlink_remove",
|
|
20
|
+
WEBSITE_MAKER_HYPERLINK_CLICK: "website_maker_hyperlink_click",
|
|
21
|
+
WEBSITE_MAKER_HYPERLINK_EDIT: "website_maker_hyperlink_edit",
|
|
22
|
+
WEBSITE_MAKER_CALENDLY_LINK_CLICKED: "website_maker_calendly_link_clicked",
|
|
23
|
+
WEBSITE_MAKER_UPSELL_OFFER: "website_maker_upsell_offer",
|
|
24
|
+
WEBSITE_MAKER_UPSELL_ACTION: "website_maker_upsell_action",
|
|
25
|
+
WEBSITE_MAKER_SWITCH_LOGO: "website_maker_switch_logo",
|
|
26
|
+
WEBSITE_MAKER_SWITCH_LOGO_MODAL: "website_maker_switch_logo_modal",
|
|
27
|
+
WEBSITE_MAKER_AI_SEND_PROMPT: "website_maker_ai_send_prompt",
|
|
28
|
+
WEBSITE_MAKER_AI_STOP_GENERATION: "website_maker_ai_stop_generation",
|
|
29
|
+
WEBSITE_SAVE_CONTACT: "website_save_contact",
|
|
30
|
+
WEBSITE_START_FOR_FREE: "website_start_for_free",
|
|
31
|
+
WEBSITE_FOOTER_LINK_CLICK: "website_footer_link_click",
|
|
32
|
+
WEBSITE_MAKER_AI_CLICK_SUGGESTED_PROMPT: "website_maker_ai_click_suggested_prompt",
|
|
33
|
+
WEBSITE_MAKER_DOMAIN_UPSELL_MODAL: "website_domain_upsell_modal",
|
|
34
|
+
WEBSITE_MAKER_DIGITAL_BUSINESS_CARDS_SAVE_CONTACT_TOGGLE: "website_maker_digital_business_cards_save_contact_toggle",
|
|
35
|
+
WEBSITE_MAKER_DIGITAL_BUSINESS_CARDS_HIDE_POPUP: "website_maker_digital_business_cards_hide_popup",
|
|
36
|
+
WEBSITE_MAKER_GETTY_VIDEO: "website_maker_getty_video",
|
|
37
|
+
WEBSITE_MAKER_SHIPPING_TOGGLE: "website_maker_shipping_toggle",
|
|
38
|
+
WEBSITE_MAKER_UNDO: "website_maker_undo",
|
|
39
|
+
WEBSITE_MAKER_REDO: "website_maker_redo",
|
|
40
|
+
WEBSITE_MAKER_HISTORY_CAPPED: "website_maker_history_capped",
|
|
41
|
+
WEBSITE_MAKER_HISTORY_OVERSIZED: "website_maker_history_oversized"
|
|
42
|
+
}, R = {
|
|
43
|
+
MAKER_PREVIEW: "maker_preview",
|
|
44
|
+
SIDEBAR: "sidebar"
|
|
45
|
+
}, p = {
|
|
46
|
+
MANAGE_WEBSITE: "manage_website",
|
|
47
|
+
MANAGE_WEBSITE_PUBLISH: "manage_website_publish",
|
|
48
|
+
MANAGE_WEBSITE_UPGRADE: "manage_website_upgrade",
|
|
49
|
+
REMOVE_WATERMARK: "remove_watermark",
|
|
50
|
+
REMOVE_WATERMARK_FOOTER_SETTINGS: "remove_watermark_footer_settings",
|
|
51
|
+
PREVIEW_WATERMARK: "preview_watermark",
|
|
52
|
+
ADD_NEW_PAGE: "add_new_page",
|
|
53
|
+
ADD_CONTENT: "add_content",
|
|
54
|
+
EDITOR_PUBLISH_TOP: "editor_publish_top",
|
|
55
|
+
EDITOR_PUBLISH_BOTTOM: "editor_publish_bottom",
|
|
56
|
+
SLUG_CHANGE_MAKER_SIDEBAR_SETTINGS: "slug_change_maker_sidebar_settings",
|
|
57
|
+
SLUG_CHANGE_MANAGE_PAGE: "slug_change_manage_page",
|
|
58
|
+
GOOGLE_ADSENSE: "google_adsense",
|
|
59
|
+
QUICK_LINKS: "quick_links",
|
|
60
|
+
SAVE_CONTACT_SETTINGS: "save_contact_settings",
|
|
61
|
+
NAV_TOP: "nav_top",
|
|
62
|
+
NAV_BOTTOM: "nav_bottom"
|
|
63
|
+
}, O = {
|
|
64
|
+
AI_BUILDER_TAB: "ai_builder_tab",
|
|
65
|
+
AI_BUILDER_CHAT_UPSELL: "ai_builder_chat_upsell"
|
|
66
|
+
}, S = {
|
|
67
|
+
AUTOMATIC: "automatic",
|
|
68
|
+
USER_TRIGGERED: "user_triggered",
|
|
69
|
+
AI_BUILDER: "ai_builder"
|
|
70
|
+
}, d = {
|
|
71
|
+
PUBLISH: "publish",
|
|
72
|
+
EXIT: "exit",
|
|
73
|
+
BUY_A_DOMAIN: "buy_a_domain",
|
|
74
|
+
SEARCH_A_DOMAIN: "search_a_domain",
|
|
75
|
+
COPY_LINK: "copy_link",
|
|
76
|
+
VIEW_WEBSITE: "view_website",
|
|
77
|
+
USE_EXISTING_DOMAIN: "use_existing_domain"
|
|
78
|
+
}, M = {
|
|
79
|
+
USE_TEXT: "use_text",
|
|
80
|
+
EXIT: "exit"
|
|
81
|
+
}, T = {
|
|
82
|
+
PREMIUM: "premium",
|
|
83
|
+
EXIT: "exit",
|
|
84
|
+
FREEMIUM: "freemium"
|
|
85
|
+
}, i = A(), n = A({
|
|
86
|
+
upsellOpenEventProps: {},
|
|
87
|
+
domainUpsellOpenEventProps: {},
|
|
88
|
+
publishOpenEventProps: {}
|
|
89
|
+
}), l = A([]), _ = (o, I, e = !1, t = "maker_editor") => {
|
|
90
|
+
l.value.forEach((s) => {
|
|
91
|
+
s({
|
|
92
|
+
scope: t,
|
|
93
|
+
eventName: o,
|
|
94
|
+
eventProps: {
|
|
95
|
+
...e ? {} : i.value,
|
|
96
|
+
...I
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
}, P = () => ({
|
|
101
|
+
sendExperimentStartedEvent: (e, t) => {
|
|
102
|
+
_(
|
|
103
|
+
E.EXPERIMENT_STARTED,
|
|
104
|
+
{
|
|
105
|
+
"Experiment name": e,
|
|
106
|
+
"Variant name": t
|
|
107
|
+
},
|
|
108
|
+
!0
|
|
109
|
+
);
|
|
110
|
+
},
|
|
111
|
+
setGlobalEventProps: (e) => {
|
|
112
|
+
const t = {
|
|
113
|
+
template_category: "website",
|
|
114
|
+
template_type: "brand-page",
|
|
115
|
+
location: "post_purchase",
|
|
116
|
+
domain_type: "Free"
|
|
117
|
+
};
|
|
118
|
+
i.value = { ...t, ...e };
|
|
119
|
+
},
|
|
120
|
+
setCustomGlobalEventProps: (e) => {
|
|
121
|
+
i.value = e;
|
|
122
|
+
},
|
|
123
|
+
setUpsellBridgeState: (e) => {
|
|
124
|
+
n.value.upsellOpenEventProps = e;
|
|
125
|
+
},
|
|
126
|
+
setDomainUpsellBridgeState: (e) => {
|
|
127
|
+
n.value.domainUpsellOpenEventProps = e;
|
|
128
|
+
},
|
|
129
|
+
subscribe: (e) => {
|
|
130
|
+
l.value.push(e);
|
|
131
|
+
},
|
|
132
|
+
// Publish event to subscriber
|
|
133
|
+
sendWebsiteEvent: (e) => {
|
|
134
|
+
_(e.eventName, e.eventProps);
|
|
135
|
+
},
|
|
136
|
+
// Open post or pre purchase maker
|
|
137
|
+
sendWebsiteMakerOpenEvent: (e) => {
|
|
138
|
+
_(E.WEBSITE_MAKER_OPEN, {
|
|
139
|
+
location: e
|
|
140
|
+
});
|
|
141
|
+
},
|
|
142
|
+
// Upsell
|
|
143
|
+
sendUpsellOpenEvent: (e) => {
|
|
144
|
+
_(E.WEBSITE_MAKER_UPSELL_MODAL, {
|
|
145
|
+
...n.value.upsellOpenEventProps,
|
|
146
|
+
continuation: null,
|
|
147
|
+
cta_location: e
|
|
148
|
+
});
|
|
149
|
+
},
|
|
150
|
+
sendDomainUpsellOpenEvent: () => {
|
|
151
|
+
_(E.WEBSITE_MAKER_DOMAIN_UPSELL_MODAL, {
|
|
152
|
+
...n.value.domainUpsellOpenEventProps,
|
|
153
|
+
continuation: null
|
|
154
|
+
});
|
|
155
|
+
},
|
|
156
|
+
sendDomainUpsellContinuationEvent: (e) => {
|
|
157
|
+
_(E.WEBSITE_MAKER_DOMAIN_UPSELL_MODAL, {
|
|
158
|
+
...n.value.domainUpsellOpenEventProps,
|
|
159
|
+
continuation: e
|
|
160
|
+
});
|
|
161
|
+
},
|
|
162
|
+
sendUpsellContinuationEvent: (e) => {
|
|
163
|
+
_(E.WEBSITE_MAKER_UPSELL_MODAL, {
|
|
164
|
+
...n.value.upsellOpenEventProps,
|
|
165
|
+
continuation: e
|
|
166
|
+
});
|
|
167
|
+
},
|
|
168
|
+
// Publish
|
|
169
|
+
sendPublishOpenEvent: () => {
|
|
170
|
+
_(E.WEBSITE_MAKER_PUBLISH_MODAL, {
|
|
171
|
+
...n.value.publishOpenEventProps,
|
|
172
|
+
continuation: null
|
|
173
|
+
});
|
|
174
|
+
},
|
|
175
|
+
appendPublishBridgeState: (e) => {
|
|
176
|
+
n.value.publishOpenEventProps = {
|
|
177
|
+
...n.value.publishOpenEventProps,
|
|
178
|
+
...e
|
|
179
|
+
};
|
|
180
|
+
},
|
|
181
|
+
sendPublishContinuationEvent: (e, t) => {
|
|
182
|
+
_(E.WEBSITE_MAKER_PUBLISH_MODAL, {
|
|
183
|
+
...n.value.publishOpenEventProps,
|
|
184
|
+
continuation: e,
|
|
185
|
+
domain: t
|
|
186
|
+
});
|
|
187
|
+
},
|
|
188
|
+
// Maker Page Management
|
|
189
|
+
sendWebsiteManageAddPageEvent: (e, t) => {
|
|
190
|
+
_(E.WEBSITE_MAKER_ADD_PAGE, {
|
|
191
|
+
page_name: e,
|
|
192
|
+
is_sub_page: !!t
|
|
193
|
+
});
|
|
194
|
+
},
|
|
195
|
+
sendWebsiteManageRemovePageEvent: (e, t) => {
|
|
196
|
+
_(E.WEBSITE_MAKER_REMOVE_PAGE, {
|
|
197
|
+
page_name: e,
|
|
198
|
+
is_sub_page: !!t
|
|
199
|
+
});
|
|
200
|
+
},
|
|
201
|
+
sendWebsiteManageReorderPageEvent: (e) => {
|
|
202
|
+
_(E.WEBSITE_MAKER_REORDER_PAGE, {
|
|
203
|
+
page_name: e
|
|
204
|
+
});
|
|
205
|
+
},
|
|
206
|
+
sendPublishOptionsForFreeEvent: () => {
|
|
207
|
+
_(E.WEBSITE_MAKER_PUBLISH_UPSELL_OPTION_MODAL, {
|
|
208
|
+
upsell_option_continuation: T.FREEMIUM
|
|
209
|
+
});
|
|
210
|
+
},
|
|
211
|
+
sendPublishOptionsForPremiumEvent: () => {
|
|
212
|
+
_(E.WEBSITE_MAKER_PUBLISH_UPSELL_OPTION_MODAL, {
|
|
213
|
+
upsell_option_continuation: T.PREMIUM
|
|
214
|
+
});
|
|
215
|
+
},
|
|
216
|
+
sendPublishOptionsForExitEvent: () => {
|
|
217
|
+
_(E.WEBSITE_MAKER_PUBLISH_UPSELL_OPTION_MODAL, {
|
|
218
|
+
upsell_option_continuation: T.EXIT
|
|
219
|
+
});
|
|
220
|
+
},
|
|
221
|
+
// Template sidebar events
|
|
222
|
+
sendTemplateSearchEvent: (e) => {
|
|
223
|
+
_(E.WEBSITE_MAKER_TEMPLATE_SEARCH, {
|
|
224
|
+
search_string: e
|
|
225
|
+
});
|
|
226
|
+
},
|
|
227
|
+
sendTemplateSelectEvent: (e) => {
|
|
228
|
+
_(E.WEBSITE_MAKER_TEMPLATE_SELECT, {
|
|
229
|
+
template_id: e
|
|
230
|
+
});
|
|
231
|
+
},
|
|
232
|
+
sendTemplateCategorySelectEvent: (e) => {
|
|
233
|
+
_(E.WEBSITE_MAKER_TEMPLATE_CATEGORY_SELECT, {
|
|
234
|
+
category: e
|
|
235
|
+
});
|
|
236
|
+
},
|
|
237
|
+
sendSidebarCategoryClickedEvent: (e) => {
|
|
238
|
+
_(E.WEBSITE_SIDEBAR_TAB_CLICKED, {
|
|
239
|
+
sidebar_category_tab_name: e
|
|
240
|
+
});
|
|
241
|
+
},
|
|
242
|
+
sendAddContentEvent: (e, t, s, a = S.USER_TRIGGERED) => {
|
|
243
|
+
_(E.WEBSITE_MAKER_ADD_CONTENT, {
|
|
244
|
+
content_type: e,
|
|
245
|
+
trigger_type: a,
|
|
246
|
+
select_location: t,
|
|
247
|
+
content_category: s
|
|
248
|
+
});
|
|
249
|
+
},
|
|
250
|
+
sendRemoveContentEvent: (e, t, s, a = S.USER_TRIGGERED) => {
|
|
251
|
+
_(E.WEBSITE_MAKER_REMOVE_CONTENT, {
|
|
252
|
+
content_type: e,
|
|
253
|
+
trigger_type: a,
|
|
254
|
+
select_location: t,
|
|
255
|
+
content_category: s
|
|
256
|
+
});
|
|
257
|
+
},
|
|
258
|
+
sendAddContentContinuationEvent: (e) => {
|
|
259
|
+
_(E.WEBSITE_MAKER_ADD_CONTENT, {
|
|
260
|
+
continuation: e
|
|
261
|
+
});
|
|
262
|
+
},
|
|
263
|
+
sendUpsellOfferEvent: (e) => {
|
|
264
|
+
_(E.WEBSITE_MAKER_UPSELL_OFFER, {
|
|
265
|
+
upsellType: e
|
|
266
|
+
});
|
|
267
|
+
},
|
|
268
|
+
sendUpsellOfferActionEvent: (e, t) => {
|
|
269
|
+
_(E.WEBSITE_MAKER_UPSELL_ACTION, {
|
|
270
|
+
upsellType: e,
|
|
271
|
+
action: t
|
|
272
|
+
});
|
|
273
|
+
},
|
|
274
|
+
sendAiSendPromptEvent: (e) => {
|
|
275
|
+
_(E.WEBSITE_MAKER_AI_SEND_PROMPT, {
|
|
276
|
+
cta_location: e
|
|
277
|
+
});
|
|
278
|
+
},
|
|
279
|
+
sendAiStopGenerationEvent: (e) => {
|
|
280
|
+
_(E.WEBSITE_MAKER_AI_STOP_GENERATION, {
|
|
281
|
+
cta_location: e
|
|
282
|
+
});
|
|
283
|
+
},
|
|
284
|
+
...{
|
|
285
|
+
sendGettyVideoAddEvent: () => {
|
|
286
|
+
_(E.WEBSITE_MAKER_GETTY_VIDEO, {
|
|
287
|
+
action: "add"
|
|
288
|
+
});
|
|
289
|
+
},
|
|
290
|
+
sendGettyVideoReplaceEvent: () => {
|
|
291
|
+
_(E.WEBSITE_MAKER_GETTY_VIDEO, {
|
|
292
|
+
action: "replace"
|
|
293
|
+
});
|
|
294
|
+
},
|
|
295
|
+
sendGettyVideoRemoveEvent: () => {
|
|
296
|
+
_(E.WEBSITE_MAKER_GETTY_VIDEO, {
|
|
297
|
+
action: "remove"
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
...{
|
|
302
|
+
sendSaveContactEvent: () => {
|
|
303
|
+
_(
|
|
304
|
+
E.WEBSITE_SAVE_CONTACT,
|
|
305
|
+
{},
|
|
306
|
+
!1,
|
|
307
|
+
"published_website"
|
|
308
|
+
);
|
|
309
|
+
},
|
|
310
|
+
sendStartForFreeEvent: () => {
|
|
311
|
+
_(
|
|
312
|
+
E.WEBSITE_START_FOR_FREE,
|
|
313
|
+
{},
|
|
314
|
+
!1,
|
|
315
|
+
"published_website"
|
|
316
|
+
);
|
|
317
|
+
},
|
|
318
|
+
sendFooterLinkClickEvent: (e) => {
|
|
319
|
+
_(
|
|
320
|
+
E.WEBSITE_FOOTER_LINK_CLICK,
|
|
321
|
+
{ link_type: e },
|
|
322
|
+
!1,
|
|
323
|
+
"published_website"
|
|
324
|
+
);
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
sendShippingToggleEvent: (e) => {
|
|
328
|
+
_(E.WEBSITE_MAKER_SHIPPING_TOGGLE, {
|
|
329
|
+
is_enabled: e
|
|
330
|
+
});
|
|
331
|
+
},
|
|
332
|
+
// Undo / Redo (BP-5506)
|
|
333
|
+
sendUndoEvent: (e) => {
|
|
334
|
+
_(E.WEBSITE_MAKER_UNDO, e);
|
|
335
|
+
},
|
|
336
|
+
sendRedoEvent: (e) => {
|
|
337
|
+
_(E.WEBSITE_MAKER_REDO, e);
|
|
338
|
+
},
|
|
339
|
+
sendHistoryCappedEvent: (e) => {
|
|
340
|
+
_(E.WEBSITE_MAKER_HISTORY_CAPPED, e);
|
|
341
|
+
},
|
|
342
|
+
sendHistoryOversizedEvent: (e) => {
|
|
343
|
+
_(E.WEBSITE_MAKER_HISTORY_OVERSIZED, e);
|
|
344
|
+
}
|
|
345
|
+
});
|
|
346
|
+
export {
|
|
347
|
+
O as A,
|
|
348
|
+
E,
|
|
349
|
+
M as G,
|
|
350
|
+
d as P,
|
|
351
|
+
R as S,
|
|
352
|
+
S as T,
|
|
353
|
+
p as U,
|
|
354
|
+
T as a,
|
|
355
|
+
P as u
|
|
356
|
+
};
|
package/package.json
CHANGED
|
@@ -1,12 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@designcrowd/library.brand-page",
|
|
3
3
|
"description": "A collection of Maker/Designer applications",
|
|
4
|
-
"version": "6.0.
|
|
4
|
+
"version": "6.0.12",
|
|
5
5
|
"author": "Design.com Eng",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"types": "./lib/src/index.d.ts",
|
|
9
9
|
"main": "./lib/src/index.mjs",
|
|
10
|
+
"sideEffects": [
|
|
11
|
+
"**/*.css"
|
|
12
|
+
],
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./lib/src/index.d.ts",
|
|
16
|
+
"import": "./lib/src/index.mjs"
|
|
17
|
+
},
|
|
18
|
+
"./tracker": {
|
|
19
|
+
"types": "./lib/src/tracker.d.ts",
|
|
20
|
+
"import": "./lib/src/tracker.mjs"
|
|
21
|
+
},
|
|
22
|
+
"./lib/src/css/*": "./lib/src/css/*",
|
|
23
|
+
"./package.json": "./package.json"
|
|
24
|
+
},
|
|
10
25
|
"files": [
|
|
11
26
|
"lib",
|
|
12
27
|
"src"
|
package/src/tracker.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// Lightweight subpath entry: `@designcrowd/library.brand-page/tracker`.
|
|
2
|
+
// Re-exports ONLY the analytics surface (useEventTracker + event constants),
|
|
3
|
+
// which depends solely on `vue`. This lets consumers import the tracker without
|
|
4
|
+
// pulling the full library graph (maker, TipTap, renderer). See
|
|
5
|
+
// docs/plans/multi-entrypoint-tree-shaking.md and the /tracker proposal.
|
|
6
|
+
//
|
|
7
|
+
// IMPORTANT: useEventTracker holds module-scoped pub/sub state (LISTENERS,
|
|
8
|
+
// GLOBAL_EVENT_PROPS). It MUST resolve to a single shared instance across this
|
|
9
|
+
// entry and the root `.` entry, or subscribers registered here won't receive
|
|
10
|
+
// events published via the root. The multi-entry build hoists it into a shared
|
|
11
|
+
// chunk (both `index` and `tracker` import it) — verified at build time.
|
|
12
|
+
export {
|
|
13
|
+
useEventTracker,
|
|
14
|
+
EVENTS,
|
|
15
|
+
SELECT_LOCATIONS,
|
|
16
|
+
UPGRADE_CTA_LOCATIONS,
|
|
17
|
+
AI_CTA_LOCATIONS,
|
|
18
|
+
TRIGGER_TYPE,
|
|
19
|
+
PUBLISH_MODAL_CONTINUATION_EVENTS,
|
|
20
|
+
GENERATE_TEXT_CONTINUATION_EVENTS,
|
|
21
|
+
PUBLISH_OPTION_MODAL_CONTINUATION_EVENTS,
|
|
22
|
+
} from './brand-page-maker/composables/useEventTracker';
|
|
23
|
+
export type {
|
|
24
|
+
EventTracker,
|
|
25
|
+
BpEventTrackerEvent,
|
|
26
|
+
BpGlobalEventProps,
|
|
27
|
+
BpUpsellEventProps,
|
|
28
|
+
} from './brand-page-maker/composables/useEventTracker';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { BrandPageModel } from '../../brand-page/models';
|
|
2
|
-
import { BaseMetadataBuilder, type BuilderResult, type MetadataBuilderRequest } from '../models';
|
|
3
|
-
import type { Logger } from '../logger';
|
|
4
|
-
export interface ReorderPagesPayload {
|
|
5
|
-
pageOrder: string[];
|
|
6
|
-
}
|
|
7
|
-
export declare class ReorderPagesBuilder extends BaseMetadataBuilder<ReorderPagesPayload> {
|
|
8
|
-
constructor(request: MetadataBuilderRequest<ReorderPagesPayload>, logger?: Logger);
|
|
9
|
-
validateAsync(): Promise<{
|
|
10
|
-
errors: string[];
|
|
11
|
-
}>;
|
|
12
|
-
buildAsync(model: BrandPageModel): Promise<BuilderResult>;
|
|
13
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { BaseMetadataBuilder, } from '../models';
|
|
2
|
-
export class ReorderPagesBuilder extends BaseMetadataBuilder {
|
|
3
|
-
constructor(request, logger) {
|
|
4
|
-
super(request, logger);
|
|
5
|
-
}
|
|
6
|
-
async validateAsync() {
|
|
7
|
-
const errors = [];
|
|
8
|
-
const payload = this.request.payload;
|
|
9
|
-
if (!payload?.pageOrder?.length) {
|
|
10
|
-
errors.push('page_order is required for reorder_pages');
|
|
11
|
-
}
|
|
12
|
-
return { errors };
|
|
13
|
-
}
|
|
14
|
-
async buildAsync(model) {
|
|
15
|
-
this.log('Build called');
|
|
16
|
-
const validation = await this.validateAsync();
|
|
17
|
-
if (validation.errors.length) {
|
|
18
|
-
return { request: this.request, model, errors: validation.errors };
|
|
19
|
-
}
|
|
20
|
-
const { pageOrder } = this.request.payload;
|
|
21
|
-
// Build pageId → routeId lookup from nav.routes
|
|
22
|
-
const pageIdToRouteId = new Map();
|
|
23
|
-
for (const route of model.nav.routes) {
|
|
24
|
-
pageIdToRouteId.set(route.pageId, route.id);
|
|
25
|
-
}
|
|
26
|
-
// Build new nav.orders from the flat page_order (array of pageIds)
|
|
27
|
-
const newOrders = [];
|
|
28
|
-
const seenRouteIds = new Set();
|
|
29
|
-
for (const pageId of pageOrder) {
|
|
30
|
-
const routeId = pageIdToRouteId.get(pageId);
|
|
31
|
-
if (!routeId)
|
|
32
|
-
continue;
|
|
33
|
-
newOrders.push({ routeId, subRoutes: [] });
|
|
34
|
-
seenRouteIds.add(routeId);
|
|
35
|
-
}
|
|
36
|
-
// Safety: append any routes not mentioned (don't lose pages)
|
|
37
|
-
for (const route of model.nav.routes) {
|
|
38
|
-
const routeId = pageIdToRouteId.get(route.pageId);
|
|
39
|
-
if (routeId && !seenRouteIds.has(routeId)) {
|
|
40
|
-
newOrders.push({ routeId, subRoutes: [] });
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
model.nav.orders = newOrders;
|
|
44
|
-
this.log({
|
|
45
|
-
message: `Reordered pages: ${pageOrder.join(', ')}`,
|
|
46
|
-
});
|
|
47
|
-
return { request: this.request, model };
|
|
48
|
-
}
|
|
49
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import type { BrandPageModel, NavOrder } from '../../brand-page/models';
|
|
2
|
-
import {
|
|
3
|
-
BaseMetadataBuilder,
|
|
4
|
-
type BuilderResult,
|
|
5
|
-
type MetadataBuilderRequest,
|
|
6
|
-
} from '../models';
|
|
7
|
-
import type { Logger } from '../logger';
|
|
8
|
-
|
|
9
|
-
export interface ReorderPagesPayload {
|
|
10
|
-
pageOrder: string[];
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export class ReorderPagesBuilder extends BaseMetadataBuilder<ReorderPagesPayload> {
|
|
14
|
-
constructor(
|
|
15
|
-
request: MetadataBuilderRequest<ReorderPagesPayload>,
|
|
16
|
-
logger?: Logger,
|
|
17
|
-
) {
|
|
18
|
-
super(request, logger);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
async validateAsync(): Promise<{ errors: string[] }> {
|
|
22
|
-
const errors: string[] = [];
|
|
23
|
-
const payload = this.request.payload;
|
|
24
|
-
|
|
25
|
-
if (!payload?.pageOrder?.length) {
|
|
26
|
-
errors.push('page_order is required for reorder_pages');
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
return { errors };
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
async buildAsync(model: BrandPageModel): Promise<BuilderResult> {
|
|
33
|
-
this.log('Build called');
|
|
34
|
-
|
|
35
|
-
const validation = await this.validateAsync();
|
|
36
|
-
|
|
37
|
-
if (validation.errors.length) {
|
|
38
|
-
return { request: this.request, model, errors: validation.errors };
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
const { pageOrder } = this.request.payload!;
|
|
42
|
-
|
|
43
|
-
// Build pageId → routeId lookup from nav.routes
|
|
44
|
-
const pageIdToRouteId = new Map<string, string>();
|
|
45
|
-
|
|
46
|
-
for (const route of model.nav.routes) {
|
|
47
|
-
pageIdToRouteId.set(route.pageId, route.id);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// Build new nav.orders from the flat page_order (array of pageIds)
|
|
51
|
-
const newOrders: NavOrder[] = [];
|
|
52
|
-
const seenRouteIds = new Set<string>();
|
|
53
|
-
|
|
54
|
-
for (const pageId of pageOrder) {
|
|
55
|
-
const routeId = pageIdToRouteId.get(pageId);
|
|
56
|
-
|
|
57
|
-
if (!routeId) continue;
|
|
58
|
-
|
|
59
|
-
newOrders.push({ routeId, subRoutes: [] });
|
|
60
|
-
seenRouteIds.add(routeId);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// Safety: append any routes not mentioned (don't lose pages)
|
|
64
|
-
for (const route of model.nav.routes) {
|
|
65
|
-
const routeId = pageIdToRouteId.get(route.pageId);
|
|
66
|
-
|
|
67
|
-
if (routeId && !seenRouteIds.has(routeId)) {
|
|
68
|
-
newOrders.push({ routeId, subRoutes: [] });
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
model.nav.orders = newOrders;
|
|
73
|
-
|
|
74
|
-
this.log({
|
|
75
|
-
message: `Reordered pages: ${pageOrder.join(', ')}`,
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
return { request: this.request, model };
|
|
79
|
-
}
|
|
80
|
-
}
|