@designcrowd/library.brand-page 5.18.3-undo-37 → 5.18.3-undo-40

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 (24) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-CM2cOZlw.js → CreatedOnBrandCrowd-de-de-D_w411MF.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-rq4QquAm.js → CreatedOnBrandCrowd-en-us-DvJhv23Q.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-BgbxyKPJ.js → CreatedOnBrandCrowd-es-es-BvW6EBKl.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-Dm1XphSl.js → CreatedOnBrandCrowd-fr-ca-Bc4iL236.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-Dm1XphSl.js → CreatedOnBrandCrowd-fr-fr-Bc4iL236.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-B2a5OfdX.js → CreatedOnBrandCrowd-pt-br-C74D9eIB.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-B2a5OfdX.js → CreatedOnBrandCrowd-pt-pt-C74D9eIB.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-BClRSXzU.js → CreatedOnDcom-de-de-BVL3vDSq.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-Cg4PeKOO.js → CreatedOnDcom-en-us-B9Dow5pk.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-izSiOsWK.js → CreatedOnDcom-es-es-H2Dv6N8F.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-IHiZuyNO.js → CreatedOnDcom-fr-ca-sw4LRlLw.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-DLGYRMhZ.js → CreatedOnDcom-fr-fr-DnOriI4M.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-DAv_n1Hs.js → CreatedOnDcom-pt-br-BXs8zbRg.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-5DGgadD1.js → CreatedOnDcom-pt-pt-DmfOvW_0.js} +1 -1
  15. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.js +2 -4
  16. package/lib/src/brand-page-maker/composables/useUndoRedoFlag.d.ts +6 -5
  17. package/lib/src/brand-page-maker/composables/useUndoRedoFlag.js +9 -6
  18. package/lib/src/brand-page-maker/stores/history/history-store.js +8 -1
  19. package/lib/src/index.mjs +1 -1
  20. package/lib/src/{lib-pHQ0LDnY.js → lib-Dg2Zs9nH.js} +4091 -4090
  21. package/package.json +1 -1
  22. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.ts +2 -4
  23. package/src/brand-page-maker/composables/useUndoRedoFlag.ts +10 -6
  24. package/src/brand-page-maker/stores/history/history-store.ts +10 -1
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-pHQ0LDnY.js";
2
+ import { _ as t } from "./lib-Dg2Zs9nH.js";
3
3
  const i = {}, h = {
4
4
  width: "275",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-pHQ0LDnY.js";
2
+ import { _ as t } from "./lib-Dg2Zs9nH.js";
3
3
  const i = {}, h = {
4
4
  width: "251",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-pHQ0LDnY.js";
2
+ import { _ as t } from "./lib-Dg2Zs9nH.js";
3
3
  const i = {}, h = {
4
4
  width: "250",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-pHQ0LDnY.js";
2
+ import { _ as t } from "./lib-Dg2Zs9nH.js";
3
3
  const i = {}, h = {
4
4
  width: "237",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-pHQ0LDnY.js";
2
+ import { _ as t } from "./lib-Dg2Zs9nH.js";
3
3
  const i = {}, h = {
4
4
  width: "237",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-pHQ0LDnY.js";
2
+ import { _ as t } from "./lib-Dg2Zs9nH.js";
3
3
  const i = {}, h = {
4
4
  width: "263",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-pHQ0LDnY.js";
2
+ import { _ as t } from "./lib-Dg2Zs9nH.js";
3
3
  const i = {}, h = {
4
4
  width: "263",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-pHQ0LDnY.js";
2
+ import { _ as e } from "./lib-Dg2Zs9nH.js";
3
3
  const M = {}, Z = {
4
4
  width: "242",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-pHQ0LDnY.js";
2
+ import { _ as e } from "./lib-Dg2Zs9nH.js";
3
3
  const i = {}, M = {
4
4
  width: "231",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-pHQ0LDnY.js";
2
+ import { _ as e } from "./lib-Dg2Zs9nH.js";
3
3
  const M = {}, Z = {
4
4
  width: "230",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-pHQ0LDnY.js";
2
+ import { _ as e } from "./lib-Dg2Zs9nH.js";
3
3
  const i = {}, l = {
4
4
  width: "216",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-pHQ0LDnY.js";
2
+ import { _ as e } from "./lib-Dg2Zs9nH.js";
3
3
  const i = {}, l = {
4
4
  width: "216",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as M } from "./lib-pHQ0LDnY.js";
2
+ import { _ as M } from "./lib-Dg2Zs9nH.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as M } from "./lib-pHQ0LDnY.js";
2
+ import { _ as M } from "./lib-Dg2Zs9nH.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -192,10 +192,8 @@ export default defineComponent({
192
192
  // Mark brand page as fully loaded
193
193
  this.brandPageMakerStore.setIsBrandPageLoaded(true);
194
194
  // Capture baseline for undo/redo when the feature is active for this
195
- // session. `useUndoRedoFlag` requires both the LaunchDarkly feature
196
- // (`userStore.features.canUseUndoRedo`) AND the maker being a brand-site
197
- // — V1 scope is brand-site only; brand-page and brand-contact don't get
198
- // undo/redo. See useUndoRedoFlag.ts for the rationale.
195
+ // session — see useUndoRedoFlag.ts for the gate (LaunchDarkly flag +
196
+ // brand-site + non-admin maker).
199
197
  if (useUndoRedoFlag().value) {
200
198
  useHistoryStore().captureBaseline();
201
199
  }
@@ -1,7 +1,7 @@
1
1
  import { type ComputedRef } from 'vue';
2
2
  /**
3
- * Returns whether undo/redo is active for the current maker session. Two
4
- * conditions must hold:
3
+ * Returns whether undo/redo is active for the current maker session. All
4
+ * three conditions must hold:
5
5
  *
6
6
  * 1. `userStore.features.canUseUndoRedo` is true. The flag is populated by
7
7
  * the consumer (BrandCrowd.Net / web-renderer) via the
@@ -9,8 +9,9 @@ import { type ComputedRef } from 'vue';
9
9
  * same precedent as RichTextEditor / GettyVideos / AITextGenerator.
10
10
  * 2. The maker is a brand-site (Website Maker). V1 scope is brand-site
11
11
  * only; brand-page (single-page profile) and brand-contact (vCard) are
12
- * out of scope. The flag itself is global on LaunchDarkly so it can't
13
- * gate this on its own — `isBrandSite` is the per-session
14
- * discriminator.
12
+ * out of scope.
13
+ * 3. The session is NOT in admin-maker mode (`userStore.isAdmin`). The
14
+ * admin maker uses the same components but a different editing flow
15
+ * (template authoring) where undo/redo is out of scope.
15
16
  */
16
17
  export declare function useUndoRedoFlag(): ComputedRef<boolean>;
@@ -2,8 +2,8 @@ import { computed } from 'vue';
2
2
  import { useBrandPageMakerUserStore } from '@brand-page-maker/stores/user';
3
3
  import { useBrandPageMakerStore } from '@brand-page-maker/stores/brandpage-maker/brandpage-maker-store';
4
4
  /**
5
- * Returns whether undo/redo is active for the current maker session. Two
6
- * conditions must hold:
5
+ * Returns whether undo/redo is active for the current maker session. All
6
+ * three conditions must hold:
7
7
  *
8
8
  * 1. `userStore.features.canUseUndoRedo` is true. The flag is populated by
9
9
  * the consumer (BrandCrowd.Net / web-renderer) via the
@@ -11,12 +11,15 @@ import { useBrandPageMakerStore } from '@brand-page-maker/stores/brandpage-maker
11
11
  * same precedent as RichTextEditor / GettyVideos / AITextGenerator.
12
12
  * 2. The maker is a brand-site (Website Maker). V1 scope is brand-site
13
13
  * only; brand-page (single-page profile) and brand-contact (vCard) are
14
- * out of scope. The flag itself is global on LaunchDarkly so it can't
15
- * gate this on its own — `isBrandSite` is the per-session
16
- * discriminator.
14
+ * out of scope.
15
+ * 3. The session is NOT in admin-maker mode (`userStore.isAdmin`). The
16
+ * admin maker uses the same components but a different editing flow
17
+ * (template authoring) where undo/redo is out of scope.
17
18
  */
18
19
  export function useUndoRedoFlag() {
19
20
  const userStore = useBrandPageMakerUserStore();
20
21
  const brandPageMakerStore = useBrandPageMakerStore();
21
- return computed(() => userStore.features.canUseUndoRedo && brandPageMakerStore.isBrandSite);
22
+ return computed(() => userStore.features.canUseUndoRedo &&
23
+ brandPageMakerStore.isBrandSite &&
24
+ !userStore.isAdmin);
22
25
  }
@@ -10,6 +10,10 @@ import { useUiEditableLogoStore } from '@shared/logo-settings/store/editable-log
10
10
  // don't reset it; max-wait ceiling forces a commit during continuous typing.
11
11
  const CAPTURE_DEBOUNCE_MS = 1700;
12
12
  const CAPTURE_MAX_WAIT_MS = 10000;
13
+ // Merge bursts flush quickly — sync hydration writes land in <50ms,
14
+ // user typing takes >150ms, so a short debounce keeps user input out
15
+ // of the merge.
16
+ const MERGE_DEBOUNCE_MS = 50;
13
17
  // FR-12 / FR-13 / FR-13c. 25 MB per-entry accommodates a high-res BYO logo
14
18
  // rendered into 4 viewport sections + per-page logo blocks. Oversize
15
19
  // entries are skipped with telemetry; 100 MB total evicts oldest
@@ -260,7 +264,10 @@ export const useHistoryStore = defineStore('history', () => {
260
264
  pendingTimerIsMerge = true;
261
265
  mergeArmed.value = false;
262
266
  }
263
- idleTimerId = setTimeout(flush, CAPTURE_DEBOUNCE_MS);
267
+ const idle = pendingTimerIsMerge
268
+ ? MERGE_DEBOUNCE_MS
269
+ : CAPTURE_DEBOUNCE_MS;
270
+ idleTimerId = setTimeout(flush, idle);
264
271
  maxWaitTimerId = setTimeout(flush, CAPTURE_MAX_WAIT_MS);
265
272
  };
266
273
  watch(() => useBrandPageMakerStore().brandPageData, scheduleAutoCapture, {
package/lib/src/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { A as E, a as T, b as s, c as I, d as S, e as N, f as e, B as A, g as O, h as C, i as G, j as D, k as P, l as t, m as R, n as L, o as M, p as o, q as r, r as b, s as n, t as F, u as i, v as l, w as g, x as B, y as c, z as Y, C as U, D as d, E as u, F as H, G as p, H as y, I as K, J as k, K as m, L as V, M as X, N as h, O as v, P as W, Q as f, R as x, S as z, T as w, U as Z, V as j, W as Q, X as q, Y as J, Z as $, $ as aa, a0 as _a, a1 as Ea, a2 as Ta, a3 as sa, a4 as Ia, a5 as Sa, a6 as Na, a7 as ea, a8 as Aa, a9 as Oa, aa as Ca, ab as Ga, ac as Da, ad as Pa, ae as ta, af as Ra, ag as La, ah as Ma, ai as oa, aj as ra, ak as ba, al as na, am as Fa, an as ia, ao as la, ap as ga, aq as Ba, ar as ca, as as Ya, at as Ua, au as da, av as ua, aw as Ha, ax as pa, ay as ya, az as Ka, aA as ka, aB as ma, aC as Va, aD as Xa, aE as ha, aF as va, aG as Wa, aH as fa, aI as xa, aJ as za, aK as wa, aL as Za, aM as ja, aN as Qa, aO as qa, aP as Ja, aQ as $a, aR as a_, aS as __, aT as E_, aU as T_, aV as s_, aW as I_, aX as S_, aY as N_, aZ as e_, a_ as A_, a$ as O_, b0 as C_, b1 as G_, b2 as D_, b3 as P_, b4 as t_, b5 as R_, b6 as L_, b7 as M_, b8 as o_, b9 as r_, ba as b_, bb as n_, bc as F_, bd as i_, be as l_, bf as g_, bg as B_, bh as c_, bi as Y_, bj as U_, bk as d_, bl as u_, bm as H_, bn as p_, bo as y_, bp as K_, bq as k_, br as m_, bs as V_, bt as X_, bu as h_, bv as v_, bw as W_, bx as f_, by as x_, bz as z_, bA as w_, bB as Z_, bC as j_, bD as Q_, bE as q_, bF as J_, bG as $_, bH as aE, bI as _E, bJ as EE, bK as TE, bL as sE, bM as IE, bN as SE, bO as NE, bP as eE, bQ as AE, bR as OE, bS as CE, bT as GE, bU as DE, bV as PE, bW as tE, bX as RE, bY as LE, bZ as ME, b_ as oE, b$ as rE, c0 as bE, c1 as nE, c2 as FE, c3 as iE, c4 as lE, c5 as gE, c6 as BE, c7 as cE, c8 as YE, c9 as UE, ca as dE, cb as uE, cc as HE, cd as pE, ce as yE, cf as KE, cg as kE, ch as mE, ci as VE, cj as XE, ck as hE, cl as vE, cm as WE, cn as fE, co as xE } from "./lib-pHQ0LDnY.js";
1
+ import { A as E, a as T, b as s, c as I, d as S, e as N, f as e, B as A, g as O, h as C, i as G, j as D, k as P, l as t, m as R, n as L, o as M, p as o, q as r, r as b, s as n, t as F, u as i, v as l, w as g, x as B, y as c, z as Y, C as U, D as d, E as u, F as H, G as p, H as y, I as K, J as k, K as m, L as V, M as X, N as h, O as v, P as W, Q as f, R as x, S as z, T as w, U as Z, V as j, W as Q, X as q, Y as J, Z as $, $ as aa, a0 as _a, a1 as Ea, a2 as Ta, a3 as sa, a4 as Ia, a5 as Sa, a6 as Na, a7 as ea, a8 as Aa, a9 as Oa, aa as Ca, ab as Ga, ac as Da, ad as Pa, ae as ta, af as Ra, ag as La, ah as Ma, ai as oa, aj as ra, ak as ba, al as na, am as Fa, an as ia, ao as la, ap as ga, aq as Ba, ar as ca, as as Ya, at as Ua, au as da, av as ua, aw as Ha, ax as pa, ay as ya, az as Ka, aA as ka, aB as ma, aC as Va, aD as Xa, aE as ha, aF as va, aG as Wa, aH as fa, aI as xa, aJ as za, aK as wa, aL as Za, aM as ja, aN as Qa, aO as qa, aP as Ja, aQ as $a, aR as a_, aS as __, aT as E_, aU as T_, aV as s_, aW as I_, aX as S_, aY as N_, aZ as e_, a_ as A_, a$ as O_, b0 as C_, b1 as G_, b2 as D_, b3 as P_, b4 as t_, b5 as R_, b6 as L_, b7 as M_, b8 as o_, b9 as r_, ba as b_, bb as n_, bc as F_, bd as i_, be as l_, bf as g_, bg as B_, bh as c_, bi as Y_, bj as U_, bk as d_, bl as u_, bm as H_, bn as p_, bo as y_, bp as K_, bq as k_, br as m_, bs as V_, bt as X_, bu as h_, bv as v_, bw as W_, bx as f_, by as x_, bz as z_, bA as w_, bB as Z_, bC as j_, bD as Q_, bE as q_, bF as J_, bG as $_, bH as aE, bI as _E, bJ as EE, bK as TE, bL as sE, bM as IE, bN as SE, bO as NE, bP as eE, bQ as AE, bR as OE, bS as CE, bT as GE, bU as DE, bV as PE, bW as tE, bX as RE, bY as LE, bZ as ME, b_ as oE, b$ as rE, c0 as bE, c1 as nE, c2 as FE, c3 as iE, c4 as lE, c5 as gE, c6 as BE, c7 as cE, c8 as YE, c9 as UE, ca as dE, cb as uE, cc as HE, cd as pE, ce as yE, cf as KE, cg as kE, ch as mE, ci as VE, cj as XE, ck as hE, cl as vE, cm as WE, cn as fE, co as xE } from "./lib-Dg2Zs9nH.js";
2
2
  import { createPinia as wE, setActivePinia as ZE } from "pinia";
3
3
  export {
4
4
  E as ABOUT_SECTION_SETTINGS_CONFIG,