@useinsider/guido 3.18.2-beta.963f84e → 3.18.2-beta.9be830c

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 (89) hide show
  1. package/dist/@types/config/schemas.js +15 -13
  2. package/dist/components/Guido.vue.js +7 -7
  3. package/dist/components/Guido.vue2.js +30 -30
  4. package/dist/components/organisms/AutoSaveController.vue2.js +10 -8
  5. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +11 -13
  6. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +51 -70
  7. package/dist/components/organisms/extensions/recommendation/RemoveStrategyModal.vue2.js +37 -23
  8. package/dist/components/organisms/header/AutoSaveStatus.vue.js +17 -0
  9. package/dist/components/organisms/header/AutoSaveStatus.vue2.js +27 -0
  10. package/dist/components/organisms/header/EditorActions.vue.js +13 -13
  11. package/dist/components/organisms/header/EditorActions.vue2.js +36 -52
  12. package/dist/components/organisms/header/EditorActionsMenu.vue.js +20 -0
  13. package/dist/components/organisms/header/EditorActionsMenu.vue2.js +48 -0
  14. package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
  15. package/dist/components/organisms/header/HeaderWrapper.vue2.js +9 -17
  16. package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
  17. package/dist/components/organisms/header/LeftSlot.vue2.js +28 -23
  18. package/dist/components/organisms/header/MiddleSlot.vue.js +4 -4
  19. package/dist/components/organisms/header/MiddleSlot.vue2.js +8 -7
  20. package/dist/components/organisms/header/RightSlot.vue.js +9 -8
  21. package/dist/components/organisms/header/RightSlot.vue2.js +13 -18
  22. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue.js +18 -0
  23. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue2.js +37 -0
  24. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue.js +24 -0
  25. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue2.js +48 -0
  26. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue.js +19 -0
  27. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue2.js +82 -0
  28. package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +12 -12
  29. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +54 -38
  30. package/dist/composables/useAccessibilityApi.js +35 -0
  31. package/dist/composables/useCustomInterfaceAppearance.js +45 -52
  32. package/dist/composables/useHtmlValidator.js +82 -87
  33. package/dist/composables/useRecommendation.js +35 -40
  34. package/dist/composables/useStripo.js +30 -30
  35. package/dist/config/i18n/en/labels.json.js +36 -4
  36. package/dist/config/i18n/en/tooltips.json.js +2 -1
  37. package/dist/enums/extensions/recommendationBlock.js +31 -38
  38. package/dist/extensions/Blocks/Recommendation/block.js +39 -43
  39. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +20 -21
  40. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +35 -40
  41. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +52 -84
  42. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +74 -74
  43. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +90 -189
  44. package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +16 -26
  45. package/dist/extensions/Blocks/Recommendation/validation/requiredFields.js +12 -21
  46. package/dist/guido.css +1 -1
  47. package/dist/node_modules/@vueuse/core/index.js +102 -0
  48. package/dist/node_modules/@vueuse/shared/index.js +40 -28
  49. package/dist/sprite.svg +6 -0
  50. package/dist/src/@types/config/schemas.d.ts +4 -0
  51. package/dist/src/components/organisms/AutoSaveController.vue.d.ts +3 -1
  52. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -3
  53. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -3
  54. package/dist/src/components/organisms/header/accessibility/AccessibilityToolbar.vue.d.ts +2 -0
  55. package/dist/src/components/organisms/header/accessibility/ColorVisionSelect.vue.d.ts +2 -0
  56. package/dist/src/components/organisms/onboarding/EditorTabBarOnboarding.vue.d.ts +2 -0
  57. package/dist/src/composables/useAccessibilityApi.d.ts +15 -0
  58. package/dist/src/composables/useActionsApi.d.ts +2 -2
  59. package/dist/src/composables/useConfig.d.ts +2 -0
  60. package/dist/src/enums/extensions/recommendationBlock.d.ts +0 -2
  61. package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +0 -1
  62. package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
  63. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +0 -2
  64. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +0 -9
  65. package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +2 -7
  66. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +0 -75
  67. package/dist/src/extensions/Blocks/Recommendation/validation/requiredFields.d.ts +0 -4
  68. package/dist/src/stores/config.d.ts +18 -0
  69. package/dist/src/stores/editor.d.ts +107 -0
  70. package/dist/src/stores/onboarding.d.ts +195 -21
  71. package/dist/src/stores/version-history.d.ts +1 -1
  72. package/dist/src/utils/timeUtil.d.ts +10 -0
  73. package/dist/static/styles/components/accessibility.css.js +282 -0
  74. package/dist/static/styles/components/recommendation-strategy.css.js +4 -34
  75. package/dist/static/styles/variables.css.js +2 -0
  76. package/dist/stores/editor.js +13 -4
  77. package/dist/stores/onboarding.js +66 -50
  78. package/dist/utils/templatePreparation.js +55 -55
  79. package/dist/utils/timeUtil.js +7 -17
  80. package/package.json +1 -1
  81. package/dist/components/organisms/header/AutoSaveToggle.vue.js +0 -22
  82. package/dist/components/organisms/header/AutoSaveToggle.vue2.js +0 -19
  83. package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.js +0 -21
  84. package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue2.js +0 -47
  85. package/dist/extensions/Blocks/Recommendation/utils/strategyCommit.js +0 -24
  86. package/dist/src/extensions/Blocks/Recommendation/utils/strategyCommit.d.ts +0 -14
  87. package/dist/static/styles/components/skeleton.css.js +0 -23
  88. /package/dist/src/components/organisms/header/{AutoSaveToggle.vue.d.ts → AutoSaveStatus.vue.d.ts} +0 -0
  89. /package/dist/src/components/organisms/{onboarding/RecommendationStrategyOnboarding.vue.d.ts → header/EditorActionsMenu.vue.d.ts} +0 -0
@@ -0,0 +1,48 @@
1
+ import { defineComponent as p, ref as c, computed as m } from "vue";
2
+ import { useAccessibilityApi as u } from "../../../../composables/useAccessibilityApi.js";
3
+ import { useTranslations as v } from "../../../../composables/useTranslations.js";
4
+ import { useEditorStore as f } from "../../../../stores/editor.js";
5
+ import { InButtonV2 as y } from "@useinsider/design-system-vue";
6
+ import { onClickOutside as K } from "../../../../node_modules/@vueuse/core/index.js";
7
+ const A = /* @__PURE__ */ p({
8
+ __name: "ColorVisionSelect",
9
+ setup(b) {
10
+ const e = [
11
+ {
12
+ value: "",
13
+ labelKey: "email-editor.cvd-none"
14
+ },
15
+ {
16
+ value: "protanopia",
17
+ labelKey: "email-editor.cvd-protanopia",
18
+ descriptionKey: "email-editor.cvd-protanopia-description"
19
+ },
20
+ {
21
+ value: "deuteranopia",
22
+ labelKey: "email-editor.cvd-deuteranopia",
23
+ descriptionKey: "email-editor.cvd-deuteranopia-description"
24
+ },
25
+ {
26
+ value: "tritanopia",
27
+ labelKey: "email-editor.cvd-tritanopia",
28
+ descriptionKey: "email-editor.cvd-tritanopia-description"
29
+ },
30
+ {
31
+ value: "achromatopsia",
32
+ labelKey: "email-editor.cvd-achromatopsia",
33
+ descriptionKey: "email-editor.cvd-achromatopsia-description"
34
+ }
35
+ ], t = f(), a = v(), { setColorVisionDeficiency: r } = u(), o = c(!1), n = c(null), l = m(() => {
36
+ const i = e.find((d) => d.value === t.colorVisionDeficiency) ?? e[0];
37
+ return a(i.labelKey);
38
+ }), s = (i) => {
39
+ r(i), o.value = !1;
40
+ };
41
+ return K(n, () => {
42
+ o.value = !1;
43
+ }), { __sfc: !0, OPTIONS: e, editorStore: t, trans: a, setColorVisionDeficiency: r, isOpen: o, root: n, selectedLabel: l, select: s, InButtonV2: y };
44
+ }
45
+ });
46
+ export {
47
+ A as default
48
+ };
@@ -0,0 +1,19 @@
1
+ import e from "./EditorTabBarOnboarding.vue2.js";
2
+ /* empty css */
3
+ import i from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var s = function() {
5
+ var r, n;
6
+ var t = this, a = t._self._c, o = t._self._setupProxy;
7
+ return o.isVisible ? a(o.InOnboard, { key: "guido__tab-bar-onboard", staticClass: "w-21-s p-a z-11", class: (r = o.onboardingStore.getEditorTabBarCurrentCard) == null ? void 0 : r.classes, attrs: { id: o.CARD_ID, "is-multiple-page": "", visible: "", "image-source": "", title: "", "pages-config": o.onboardingStore.onboardings.editorTabBarOnboarding.config, "pointer-position": (n = o.onboardingStore.getEditorTabBarCurrentCard) == null ? void 0 : n.position, "right-position": o.placement.right, "top-position": o.placement.top }, on: { backButtonClick: o.handleBack, close: o.finish, nextButtonClick: o.handleNext } }) : t._e();
8
+ }, c = [], d = /* @__PURE__ */ i(
9
+ e,
10
+ s,
11
+ c,
12
+ !1,
13
+ null,
14
+ "af34c57a"
15
+ );
16
+ const g = d.exports;
17
+ export {
18
+ g as default
19
+ };
@@ -0,0 +1,82 @@
1
+ import { defineComponent as I, ref as q, computed as w, watch as E, nextTick as R } from "vue";
2
+ import { useConfig as P } from "../../../composables/useConfig.js";
3
+ import { useRibbonOffset as D } from "../../../composables/useRibbonOffset.js";
4
+ import { useTranslations as M } from "../../../composables/useTranslations.js";
5
+ import { useOnboardingStore as F } from "../../../stores/onboarding.js";
6
+ import { InOnboard as G } from "@useinsider/design-system-vue";
7
+ const J = /* @__PURE__ */ I({
8
+ __name: "EditorTabBarOnboarding",
9
+ setup($) {
10
+ const i = "editorTabBarOnboarding", l = "guido__tab-bar-onboard", n = M(), o = F(), { isFeatureEnabled: p } = P(), { getTopPosition: m } = D(), B = () => o.next(i), x = () => o.previous(i), k = () => void o.close(i), f = 4, T = 17, a = "#guido__kebab-button", s = ".editor-actions-menu__panel", r = (t, e, d) => ({
11
+ classes: "guido-tab-bar-onboarding",
12
+ position: "Right Top",
13
+ title: n(t),
14
+ description: n(e),
15
+ imageSource: "",
16
+ backButtonType: "text",
17
+ backButtonText: n("action-builder.back"),
18
+ backButtonClick: x,
19
+ nextButtonType: "text",
20
+ nextButtonText: n("action-builder.next"),
21
+ nextButtonClick: B,
22
+ ...d
23
+ }), _ = () => p("autosave") ? [{
24
+ card: r("email-editor.onboarding-autosave-title", "email-editor.onboarding-autosave-description", {}),
25
+ edge: s,
26
+ target: "#guido__kebab-autosave"
27
+ }] : [], C = () => [
28
+ {
29
+ card: r("email-editor.onboarding-kebab-title", "email-editor.onboarding-kebab-description", {
30
+ backButtonType: void 0,
31
+ backButtonText: void 0,
32
+ backButtonClick: () => {
33
+ }
34
+ }),
35
+ edge: a,
36
+ target: a
37
+ },
38
+ ..._(),
39
+ {
40
+ card: r("email-editor.onboarding-accessibility-title", "email-editor.onboarding-accessibility-description", {
41
+ nextButtonText: n("action-builder.ok"),
42
+ nextButtonClick: k
43
+ }),
44
+ edge: s,
45
+ target: "#guido__kebab-accessibility"
46
+ }
47
+ ], b = () => ({ top: m(56), right: "150px" });
48
+ let c = [];
49
+ const u = q(b()), g = async () => {
50
+ var y;
51
+ await R();
52
+ const t = c[o.onboardings.editorTabBarOnboarding.cardIndex], e = (y = document.getElementById(l)) == null ? void 0 : y.offsetParent, d = (t && document.querySelector(t.edge)) ?? document.querySelector(a), O = (t && document.querySelector(t.target)) ?? document.querySelector(a);
53
+ if (!e || !d || !O) {
54
+ u.value = b();
55
+ return;
56
+ }
57
+ const h = e.getBoundingClientRect(), v = O.getBoundingClientRect();
58
+ u.value = {
59
+ top: `${Math.round(v.top + v.height / 2 - h.top - T)}px`,
60
+ right: `${Math.round(h.right - d.getBoundingClientRect().left - f)}px`
61
+ };
62
+ }, S = w(
63
+ () => o.onboardings.editorTabBarOnboarding.config.length > 0 && o.onboardings.editorTabBarOnboarding.isActive
64
+ ), N = () => {
65
+ var t, e;
66
+ (e = (t = o.getEditorTabBarCurrentCard) == null ? void 0 : t.nextButtonClick) == null || e.call(t);
67
+ }, A = () => {
68
+ var t, e;
69
+ (e = (t = o.getEditorTabBarCurrentCard) == null ? void 0 : t.backButtonClick) == null || e.call(t);
70
+ };
71
+ return E(
72
+ () => o.onboardings.editorTabBarOnboarding.isActive,
73
+ async (t) => {
74
+ t && (await R(), c = C(), o.setConfig(i, c.map((e) => e.card)), await g());
75
+ },
76
+ { immediate: !0 }
77
+ ), E(() => o.onboardings.editorTabBarOnboarding.cardIndex, g), { __sfc: !0, ONBOARDING: i, CARD_ID: l, trans: n, onboardingStore: o, isFeatureEnabled: p, getTopPosition: m, goNext: B, goBack: x, finish: k, ANCHOR_GAP: f, POINTER_CENTER: T, KEBAB: a, MENU: s, card: r, autoSaveStep: _, buildSteps: C, designFallback: b, steps: c, placement: u, place: g, isVisible: S, handleNext: N, handleBack: A, InOnboard: G };
78
+ }
79
+ });
80
+ export {
81
+ J as default
82
+ };
@@ -1,21 +1,21 @@
1
- import t from "./OnboardingWrapper.vue2.js";
2
- import i from "../../../_virtual/_plugin-vue2_normalizer.js";
3
- var s = function() {
4
- var n = this, e = n._self._c, r = n._self._setupProxy;
5
- return e("div", n._l(r.visibleOnboardings, function(o) {
6
- return e(o.component, { key: o.type, tag: "component", on: { "onboarding-finished": function(p) {
7
- return r.emit("onboarding-finished");
1
+ import o from "./OnboardingWrapper.vue2.js";
2
+ import s from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var _ = function() {
4
+ var n = this, r = n._self._c, t = n._self._setupProxy;
5
+ return r("div", n._l(t.visibleOnboardings, function(e) {
6
+ return r(e.component, { key: e.type, tag: "component", on: { "onboarding-finished": function(l) {
7
+ return t.handleFinished(e.type);
8
8
  } } });
9
9
  }), 1);
10
- }, _ = [], a = /* @__PURE__ */ i(
11
- t,
12
- s,
10
+ }, i = [], a = /* @__PURE__ */ s(
11
+ o,
13
12
  _,
13
+ i,
14
14
  !1,
15
15
  null,
16
16
  null
17
17
  );
18
- const d = a.exports;
18
+ const f = a.exports;
19
19
  export {
20
- d as default
20
+ f as default
21
21
  };
@@ -1,48 +1,64 @@
1
- import { defineComponent as b, computed as e, onMounted as O, watch as t } from "vue";
2
- import u from "./AMPOnboarding.vue.js";
3
- import v from "./GenericOnboarding.vue.js";
4
- import y from "./ItemsOnboarding.vue.js";
5
- import l from "./NewVersionPopup.vue.js";
6
- import S from "./RecommendationStrategyOnboarding.vue.js";
7
- import h from "./TextBlockOnboarding.vue.js";
8
- import w from "./VersionHistoryOnboarding.vue.js";
9
- import { usePartner as P } from "../../../composables/usePartner.js";
10
- import { useEditorStore as _ } from "../../../stores/editor.js";
11
- import { useOnboardingStore as A } from "../../../stores/onboarding.js";
12
- import { usePreviewStore as H } from "../../../stores/preview.js";
13
- const N = /* @__PURE__ */ b({
1
+ import { defineComponent as h, computed as r, onMounted as w, watch as e, ref as S } from "vue";
2
+ import T from "./AMPOnboarding.vue.js";
3
+ import y from "./EditorTabBarOnboarding.vue.js";
4
+ import P from "./GenericOnboarding.vue.js";
5
+ import B from "./ItemsOnboarding.vue.js";
6
+ import A from "./NewVersionPopup.vue.js";
7
+ import M from "./TextBlockOnboarding.vue.js";
8
+ import _ from "./VersionHistoryOnboarding.vue.js";
9
+ import { useConfig as H } from "../../../composables/useConfig.js";
10
+ import { usePartner as V } from "../../../composables/usePartner.js";
11
+ import { useEditorStore as C } from "../../../stores/editor.js";
12
+ import { useOnboardingStore as F } from "../../../stores/onboarding.js";
13
+ import { usePreviewStore as x } from "../../../stores/preview.js";
14
+ const L = /* @__PURE__ */ h({
14
15
  __name: "OnboardingWrapper",
15
16
  emits: ["onboarding-finished"],
16
- setup(M, { emit: g }) {
17
- const o = A(), r = _(), s = H(), { isTestPartner: a } = P(), m = e(() => r.isStripoInitialized), p = e(() => a()), d = [
18
- { type: "newVersionPopup", component: l },
19
- { type: "genericOnboarding", component: v },
20
- { type: "textBlockOnboarding", component: h },
21
- { type: "versionHistoryOnboarding", component: w },
22
- { type: "ampOnboarding", component: u },
23
- { type: "itemsOnboarding", component: y },
24
- { type: "recommendationStrategyOnboarding", component: S }
25
- ], c = (n) => p.value || !m.value ? !1 : n === "newVersionPopup" ? o.shouldShowOnboarding(n) : o.isActive(n), f = e(() => d.filter((n) => c(n.type)));
26
- return O(async () => {
17
+ setup(E, { emit: b }) {
18
+ const o = F(), n = C(), c = x(), { isTestPartner: m } = V(), { isFeatureEnabled: g } = H(), a = r(() => n.isStripoInitialized), s = r(() => m()), f = [
19
+ { type: "newVersionPopup", component: A },
20
+ { type: "genericOnboarding", component: P },
21
+ { type: "textBlockOnboarding", component: M },
22
+ { type: "versionHistoryOnboarding", component: _ },
23
+ { type: "ampOnboarding", component: T },
24
+ { type: "itemsOnboarding", component: B },
25
+ { type: "editorTabBarOnboarding", component: y }
26
+ ], O = (i) => s.value || !a.value ? !1 : i === "newVersionPopup" ? o.shouldShowOnboarding(i) : o.isActive(i), l = r(() => f.filter((i) => O(i.type)));
27
+ w(async () => {
27
28
  await o.fetchUserModalState();
28
- }), t(
29
- () => r.isVersionHistoryOpen,
30
- (n, i) => {
31
- n && !i && o.shouldShowOnboarding("versionHistoryOnboarding") && o.start("versionHistoryOnboarding"), !n && i && o.isActive("versionHistoryOnboarding") && o.close("versionHistoryOnboarding");
29
+ }), e(
30
+ () => n.isVersionHistoryOpen,
31
+ (i, t) => {
32
+ i && !t && (o.isActive("editorTabBarOnboarding") && o.close("editorTabBarOnboarding"), o.shouldShowOnboarding("versionHistoryOnboarding") && o.start("versionHistoryOnboarding")), !i && t && o.isActive("versionHistoryOnboarding") && o.close("versionHistoryOnboarding");
32
33
  }
33
- ), t(
34
- () => s.emailFormat,
35
- (n, i) => {
36
- i !== "AMP" && n === "AMP" && o.shouldShowOnboarding("ampOnboarding") && o.start("ampOnboarding");
34
+ ), e(
35
+ () => c.emailFormat,
36
+ (i, t) => {
37
+ t !== "AMP" && i === "AMP" && o.shouldShowOnboarding("ampOnboarding") && o.start("ampOnboarding");
37
38
  }
38
- ), t(
39
- () => r.isPreviewModeOpen,
40
- (n) => {
41
- !n && o.isActive("ampOnboarding") && o.close("ampOnboarding");
39
+ ), e(
40
+ () => n.isPreviewModeOpen,
41
+ (i) => {
42
+ !i && o.isActive("ampOnboarding") && o.close("ampOnboarding");
42
43
  }
43
- ), { __sfc: !0, emit: g, onboardingStore: o, editorStore: r, previewStore: s, isTestPartner: a, isStripoReady: m, isTestPartnerActive: p, onboardingConfigs: d, shouldShow: c, visibleOnboardings: f };
44
+ );
45
+ const d = S(!1), v = (i) => {
46
+ i === "newVersionPopup" && (d.value = !0), b("onboarding-finished");
47
+ }, p = r(() => n.isNormalMode && !n.isPreviewModeOpen), u = r(() => a.value && o.isFetched && g("accessibilityTesting") && !s.value && p.value && !(o.shouldShowOnboarding("newVersionPopup") && !d.value) && !o.isOnboardingActive() && !o.closedThisSession.includes("editorTabBarOnboarding") && o.shouldShowOnboarding("editorTabBarOnboarding"));
48
+ return e(
49
+ u,
50
+ (i) => {
51
+ i && o.start("editorTabBarOnboarding");
52
+ },
53
+ { immediate: !0 }
54
+ ), e(
55
+ p,
56
+ (i) => {
57
+ !i && o.isActive("editorTabBarOnboarding") && o.close("editorTabBarOnboarding");
58
+ }
59
+ ), { __sfc: !0, emit: b, onboardingStore: o, editorStore: n, previewStore: c, isTestPartner: m, isFeatureEnabled: g, isStripoReady: a, isTestPartnerActive: s, onboardingConfigs: f, shouldShow: O, visibleOnboardings: l, isNewVersionPopupClosed: d, handleFinished: v, isTourAnchored: p, canStartTabBarTour: u };
44
60
  }
45
61
  });
46
62
  export {
47
- N as default
63
+ L as default
48
64
  };
@@ -0,0 +1,35 @@
1
+ import { useEditorStore as r } from "../stores/editor.js";
2
+ const A = () => {
3
+ const e = r(), i = () => window.StripoEditorApi.accessibilityApi, s = () => {
4
+ i().openAccessibilityTestingMode(), e.isAccessibilityTestingOpen = !0;
5
+ }, o = () => {
6
+ try {
7
+ i().closeAccessibilityTestingMode();
8
+ } finally {
9
+ e.isAccessibilityTestingOpen = !1, e.imagesHidden = !1, e.colorVisionDeficiency = "";
10
+ }
11
+ }, l = () => e.isAccessibilityTestingOpen ? o() : s(), g = () => i().isAccessibilityTestingModeOpen(), t = () => {
12
+ i().showImages(), e.imagesHidden = !1;
13
+ }, c = () => {
14
+ i().hideImages(), e.imagesHidden = !0;
15
+ };
16
+ return {
17
+ openAccessibilityTestingMode: s,
18
+ closeAccessibilityTestingMode: o,
19
+ toggleAccessibilityTestingMode: l,
20
+ isAccessibilityTestingModeOpen: g,
21
+ showImages: t,
22
+ hideImages: c,
23
+ toggleImages: () => e.imagesHidden ? t() : c(),
24
+ setColorVisionDeficiency: (n) => {
25
+ i().setColorVisionDeficiency(n), e.colorVisionDeficiency = n;
26
+ },
27
+ getColorVisionDeficiency: () => i().getColorVisionDeficiency(),
28
+ switchToDesktopPreview: () => i().switchToDesktopPreview(),
29
+ switchToMobilePreview: () => i().switchToMobilePreview(),
30
+ toggleCodeEditor: () => i().emitToggleCodeEditor()
31
+ };
32
+ };
33
+ export {
34
+ A as useAccessibilityApi
35
+ };
@@ -1,77 +1,70 @@
1
- import p from "../static/assets/icons/line-change.svg.js";
2
- import s from "../static/assets/icons/line-delete.svg.js";
3
- import a from "../static/assets/icons/line-plus.svg.js";
4
- import f from "../static/styles/base.css.js";
1
+ import S from "../static/assets/icons/line-change.svg.js";
2
+ import i from "../static/assets/icons/line-delete.svg.js";
3
+ import n from "../static/assets/icons/line-plus.svg.js";
4
+ import p from "../static/styles/base.css.js";
5
+ import s from "../static/styles/components/accessibility.css.js";
5
6
  import C from "../static/styles/components/alert-message.css.js";
6
7
  import c from "../static/styles/components/amp-block.css.js";
7
- import l from "../static/styles/components/base-input.css.js";
8
- import d from "../static/styles/components/button-group.css.js";
8
+ import f from "../static/styles/components/base-input.css.js";
9
+ import a from "../static/styles/components/button-group.css.js";
9
10
  import u from "../static/styles/components/button.css.js";
10
- import h from "../static/styles/components/combobox.css.js";
11
- import g from "../static/styles/components/counter.css.js";
12
- import w from "../static/styles/components/dropdown-menu.css.js";
13
- import y from "../static/styles/components/loader.css.js";
14
- import I from "../static/styles/components/narrow-panel.css.js";
15
- import A from "../static/styles/components/popup.css.js";
11
+ import l from "../static/styles/components/combobox.css.js";
12
+ import d from "../static/styles/components/counter.css.js";
13
+ import h from "../static/styles/components/dropdown-menu.css.js";
14
+ import g from "../static/styles/components/loader.css.js";
15
+ import y from "../static/styles/components/narrow-panel.css.js";
16
+ import I from "../static/styles/components/popup.css.js";
16
17
  import b from "../static/styles/components/recommendation-strategy.css.js";
17
- import B from "../static/styles/components/skeleton.css.js";
18
- import D from "../static/styles/components/switcher.css.js";
19
- import $ from "../static/styles/components/tabs.css.js";
20
- import P from "../static/styles/components/tools.css.js";
21
- import R from "../static/styles/components/version-history.css.js";
22
- import T from "../static/styles/components/wide-panel.css.js";
18
+ import w from "../static/styles/components/switcher.css.js";
19
+ import B from "../static/styles/components/tabs.css.js";
20
+ import $ from "../static/styles/components/tools.css.js";
21
+ import A from "../static/styles/components/version-history.css.js";
22
+ import P from "../static/styles/components/wide-panel.css.js";
23
23
  import x from "../static/styles/variables.css.js";
24
- function r(S, o) {
25
- return `--guido-icon-${S}: url("data:image/svg+xml,${encodeURIComponent(o.trim())}");`;
24
+ function r(t, o) {
25
+ return `--guido-icon-${t}: url("data:image/svg+xml,${encodeURIComponent(o.trim())}");`;
26
26
  }
27
- const M = `:host {
28
- ${r("line-change", p)}
29
- ${r("line-delete", s)}
30
- ${r("line-plus", a)}
31
- }`, O = [
27
+ const R = `:host {
28
+ ${r("line-change", S)}
29
+ ${r("line-delete", i)}
30
+ ${r("line-plus", n)}
31
+ }`, V = [
32
32
  x,
33
33
  // Must be on top
34
- M,
35
- f,
34
+ R,
35
+ p,
36
36
  // Must be on top
37
37
  C,
38
38
  c,
39
+ f,
40
+ a,
41
+ u,
39
42
  l,
40
43
  d,
41
- u,
42
44
  h,
43
45
  g,
44
- w,
45
46
  y,
46
47
  I,
47
- A,
48
+ w,
48
49
  B,
49
- D,
50
50
  $,
51
+ A,
51
52
  P,
52
- R,
53
- T,
54
- b
55
- // Last: overrides button.css / wide-panel.css defaults
53
+ b,
54
+ // Overrides button.css / wide-panel.css defaults
55
+ s
56
+ // Last: overrides button.css / tabs.css / tools.css defaults
56
57
  ].join(`
57
58
 
58
- `), V = 3e4;
59
- let e = null;
60
- function W() {
61
- return e || (e = new CSSStyleSheet(), e.replaceSync(O)), e;
62
- }
63
- const So = () => ({ importCss: () => {
64
- const o = W(), i = Date.now() + V, m = () => {
65
- var n;
66
- const t = (n = document.querySelector("ui-editor")) == null ? void 0 : n.shadowRoot;
67
- if (t) {
68
- t.adoptedStyleSheets.includes(o) || (t.adoptedStyleSheets = [...t.adoptedStyleSheets, o]);
69
- return;
70
- }
71
- Date.now() < i && requestAnimationFrame(m);
72
- };
73
- m();
59
+ `), _ = () => ({ importCss: () => {
60
+ const o = new CSSStyleSheet();
61
+ o.replaceSync(V);
62
+ const e = document.querySelector("ui-editor");
63
+ if (!e)
64
+ return;
65
+ const m = e.shadowRoot;
66
+ m && (m.adoptedStyleSheets = [o]);
74
67
  } });
75
68
  export {
76
- So as useCustomInterfaceAppearance
69
+ _ as useCustomInterfaceAppearance
77
70
  };