@useinsider/guido 3.21.2-beta.b6f3ef8 → 3.21.2-beta.d9d48aa

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.
Files changed (36) hide show
  1. package/README.md +13 -34
  2. package/dist/@types/config/schemas.js +35 -33
  3. package/dist/components/Guido.vue.js +6 -6
  4. package/dist/components/Guido.vue2.js +115 -121
  5. package/dist/components/organisms/unsubscribe/LegacyUnsubscribeConvertedModal.vue.js +17 -0
  6. package/dist/components/organisms/unsubscribe/LegacyUnsubscribeConvertedModal.vue2.js +30 -0
  7. package/dist/composables/useModuleRepair.js +32 -23
  8. package/dist/composables/useStripo.js +82 -94
  9. package/dist/config/migrator/index.js +10 -9
  10. package/dist/config/migrator/legacyUnsubscribeTextMigrator.js +16 -0
  11. package/dist/enums/academy.js +2 -1
  12. package/dist/guido.css +1 -1
  13. package/dist/library.js +10 -12
  14. package/dist/package.json.js +4 -6
  15. package/dist/src/@types/config/schemas.d.ts +4 -0
  16. package/dist/src/components/organisms/unsubscribe/LegacyUnsubscribeConvertedModal.vue.d.ts +2 -0
  17. package/dist/src/composables/useConfig.d.ts +2 -0
  18. package/dist/src/composables/useModuleRepair.d.ts +2 -11
  19. package/dist/src/config/migrator/legacyUnsubscribeTextMigrator.d.ts +1 -0
  20. package/dist/src/enums/academy.d.ts +1 -0
  21. package/dist/src/library.d.ts +0 -1
  22. package/dist/src/stores/config.d.ts +20 -0
  23. package/dist/src/stores/editor.d.ts +25 -0
  24. package/dist/src/utils/legacyUnsubscribeConversion.d.ts +10 -0
  25. package/dist/stores/editor.js +15 -14
  26. package/dist/utils/legacyUnsubscribeConversion.js +49 -0
  27. package/package.json +1 -6
  28. package/dist/composables/useEditorOpenMetrics.js +0 -164
  29. package/dist/public/prefetchRuntime.js +0 -4
  30. package/dist/src/composables/useEditorOpenMetrics.d.ts +0 -27
  31. package/dist/src/public/prefetchRuntime.d.ts +0 -1
  32. package/dist/src/utils/runtimePrefetch.d.ts +0 -4
  33. package/dist/src/utils/stripoRuntime.d.ts +0 -2
  34. package/dist/static/stripo-runtime-manifest.json.js +0 -9
  35. package/dist/utils/runtimePrefetch.js +0 -26
  36. package/dist/utils/stripoRuntime.js +0 -9
@@ -1,27 +0,0 @@
1
- export type TimedOpenPhase = 'migration' | 'default_template' | 'timer_clone';
2
- export type OpenPhase = 'setup' | 'host_ready' | `${TimedOpenPhase}_start` | `${TimedOpenPhase}_end` | 'plugin_start' | 'script_ready' | 'fonts_sync_ready' | 'blocks_config_ready' | 'init_editor' | 'token_start' | 'token_end' | 'ready';
3
- export type OpenOutcome = 'ready' | 'error' | 'abandoned';
4
- export interface OpenContext {
5
- partnerName: string;
6
- productType: number;
7
- templateId: string;
8
- variationId: string;
9
- }
10
- export interface OpenTemplate {
11
- html: string;
12
- css: string;
13
- forceRecreate: boolean;
14
- }
15
- export interface EditorOpenMetrics {
16
- mark: (phase: OpenPhase) => void;
17
- timed: <T>(phase: TimedOpenPhase, task: () => Promise<T>) => Promise<T>;
18
- setContext: (context: OpenContext) => void;
19
- setTemplate: (template: OpenTemplate) => void;
20
- setScriptPreloaded: (preloaded: boolean) => void;
21
- markReady: () => void;
22
- markFailed: () => void;
23
- dispose: () => void;
24
- }
25
- export declare const startEditorOpenMetrics: () => EditorOpenMetrics;
26
- /** Binds to the session open at call time, so a remounted editor never writes into its replacement's session. */
27
- export declare const useEditorOpenMetrics: () => EditorOpenMetrics;
@@ -1 +0,0 @@
1
- export { prefetchGuidoRuntime } from '../utils/runtimePrefetch';
@@ -1,4 +0,0 @@
1
- export type RuntimePrefetchState = 'none' | 'pending' | 'done';
2
- export declare const RUNTIME_PREFETCH_ATTRIBUTE = "data-guido-prefetch";
3
- export declare const prefetchGuidoRuntime: () => void;
4
- export declare const readRuntimePrefetchState: () => RuntimePrefetchState;
@@ -1,2 +0,0 @@
1
- /** Null when package.json does not pin `guido.stripo.version`. */
2
- export declare const getStripoRuntimeBaseUrl: () => string | null;
@@ -1,9 +0,0 @@
1
- const s = "2.81.1", n = ["UIEditor.js", "zone.js", "styles-BWH3PMR4.css", "polyfills-FF3RLU5F.js", "main-5LCHF56A.js", "chunk-2HYLRI4G.js", "chunk-4SN7BSQN.js", "chunk-5IY7ZG3R.js", "chunk-62K3AMOD.js", "chunk-GK543IRH.js", "chunk-L2EPGQ76.js", "chunk-LXS5IGCQ.js", "chunk-PNWIGF4L.js", "chunk-S2TYCIH3.js", "chunk-S5UZ4LUK.js", "chunk-V2AGQPVL.js", "chunk-XZ6MUAN5.js", "chunk-ZPL4VL4O.js", "assets/css/uiEditor.css", "assets/i18n/en.json", "assets/icons/ui-editor-icons.sprite.svg", "assets/icons/ui-editor-icons.map.json", "assets/imageeditor/scripts.min.js", "assets/imageeditor/assets/icons/merged.svg"], i = {
2
- version: s,
3
- files: n
4
- };
5
- export {
6
- i as default,
7
- n as files,
8
- s as version
9
- };
@@ -1,26 +0,0 @@
1
- import s from "../static/stripo-runtime-manifest.json.js";
2
- import { getStripoRuntimeBaseUrl as c } from "./stripoRuntime.js";
3
- const r = "data-guido-prefetch", d = "pending", o = "settled", i = `link[${r}]`, u = ["slow-2g", "2g"], l = /\.(?:js|json)$/, a = () => document.getElementById("UiEditorScript") !== null || window.UIEditor !== void 0, E = () => {
4
- const { connection: e } = navigator;
5
- return (e == null ? void 0 : e.saveData) === !0 || u.includes((e == null ? void 0 : e.effectiveType) ?? "");
6
- }, m = (e) => {
7
- const t = document.createElement("link"), n = () => t.setAttribute(r, o);
8
- t.rel = "prefetch", t.href = e, l.test(e) && t.setAttribute("crossorigin", "anonymous"), t.setAttribute(r, d), t.addEventListener("load", n, { once: !0 }), t.addEventListener("error", n, { once: !0 }), document.head.appendChild(t);
9
- }, T = () => {
10
- try {
11
- const e = c(), t = document.querySelector(i) !== null;
12
- if (!e || t || a() || E())
13
- return;
14
- s.files.forEach((n) => m(`${e}${n}`));
15
- } catch (e) {
16
- console.debug("guido: runtime prefetch skipped", e);
17
- }
18
- }, g = () => {
19
- const e = Array.from(document.querySelectorAll(i));
20
- return e.length ? e.every((t) => t.getAttribute(r) === o) ? "done" : "pending" : "none";
21
- };
22
- export {
23
- r as RUNTIME_PREFETCH_ATTRIBUTE,
24
- T as prefetchGuidoRuntime,
25
- g as readRuntimePrefetchState
26
- };
@@ -1,9 +0,0 @@
1
- import r from "../package.json.js";
2
- const e = "https://email-static.useinsider.com/guido/", n = () => {
3
- var s;
4
- const t = r.guido, o = (s = t == null ? void 0 : t.stripo) == null ? void 0 : s.version;
5
- return o ? `${e}${o}/` : null;
6
- };
7
- export {
8
- n as getStripoRuntimeBaseUrl
9
- };