@designcrowd/library.brand-page 5.18.3-undo-35 → 5.18.3-undo-38

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 (22) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-nGPiEkaH.js → CreatedOnBrandCrowd-de-de-ydEGYl5O.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-D3ibxOrN.js → CreatedOnBrandCrowd-en-us-BiJ8RmwM.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-BAq0PV5c.js → CreatedOnBrandCrowd-es-es-C8CyL1ny.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-9foHt2a-.js → CreatedOnBrandCrowd-fr-ca-BMh0yIJJ.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-9foHt2a-.js → CreatedOnBrandCrowd-fr-fr-BMh0yIJJ.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-DO739Uxl.js → CreatedOnBrandCrowd-pt-br-C0DghlQk.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-DO739Uxl.js → CreatedOnBrandCrowd-pt-pt-C0DghlQk.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-CFbNW8tl.js → CreatedOnDcom-de-de-CZEnW0qm.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-BL34V8eu.js → CreatedOnDcom-en-us-DPpRkfrD.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-BKXWvHkV.js → CreatedOnDcom-es-es-8yTtB23v.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-DCyU-m6J.js → CreatedOnDcom-fr-ca-DdGwSBLy.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-DEciA_zh.js → CreatedOnDcom-fr-fr-DRGbffC4.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-BVB2zdvU.js → CreatedOnDcom-pt-br-CWm_1vbQ.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-DatUuIK6.js → CreatedOnDcom-pt-pt-DZBR79tn.js} +1 -1
  15. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +64 -0
  16. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.js +5 -0
  17. package/lib/src/brand-page-maker/stores/history/history-store.js +8 -1
  18. package/lib/src/index.mjs +1 -1
  19. package/lib/src/{lib-C_Pc-5bF.js → lib-BZlXQjdd.js} +4458 -4456
  20. package/package.json +1 -1
  21. package/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.ts +5 -0
  22. 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-C_Pc-5bF.js";
2
+ import { _ as t } from "./lib-BZlXQjdd.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-C_Pc-5bF.js";
2
+ import { _ as t } from "./lib-BZlXQjdd.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-C_Pc-5bF.js";
2
+ import { _ as t } from "./lib-BZlXQjdd.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-C_Pc-5bF.js";
2
+ import { _ as t } from "./lib-BZlXQjdd.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-C_Pc-5bF.js";
2
+ import { _ as t } from "./lib-BZlXQjdd.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-C_Pc-5bF.js";
2
+ import { _ as t } from "./lib-BZlXQjdd.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-C_Pc-5bF.js";
2
+ import { _ as t } from "./lib-BZlXQjdd.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-C_Pc-5bF.js";
2
+ import { _ as e } from "./lib-BZlXQjdd.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-C_Pc-5bF.js";
2
+ import { _ as e } from "./lib-BZlXQjdd.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-C_Pc-5bF.js";
2
+ import { _ as e } from "./lib-BZlXQjdd.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-C_Pc-5bF.js";
2
+ import { _ as e } from "./lib-BZlXQjdd.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-C_Pc-5bF.js";
2
+ import { _ as e } from "./lib-BZlXQjdd.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-C_Pc-5bF.js";
2
+ import { _ as M } from "./lib-BZlXQjdd.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-C_Pc-5bF.js";
2
+ import { _ as M } from "./lib-BZlXQjdd.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -1171,6 +1171,70 @@ declare const _default: import("vue").DefineComponent<{}, {
1171
1171
  }): Promise<void>;
1172
1172
  toggleLogoBackground(): Promise<any>;
1173
1173
  }>;
1174
+ historyStore: import("pinia").Store<"history", Pick<{
1175
+ entries: import("vue").ShallowRef<import("@brand-page-maker/stores/history/history-store").HistoryEntry[], import("@brand-page-maker/stores/history/history-store").HistoryEntry[]>;
1176
+ currentIndex: import("vue").Ref<number, number>;
1177
+ isApplyingSnapshot: import("vue").Ref<boolean, boolean>;
1178
+ baselineCaptured: import("vue").Ref<boolean, boolean>;
1179
+ canUndo: import("vue").ComputedRef<boolean>;
1180
+ canRedo: import("vue").ComputedRef<boolean>;
1181
+ captureBaseline: () => void;
1182
+ capture: (args: {
1183
+ source: "manual_edit" | "template_switch" | "ai_changeset" | "rich_text";
1184
+ actor: "user" | "ai_builder";
1185
+ label?: string | undefined;
1186
+ }) => "committed" | "oversized" | "noop" | "skipped";
1187
+ captureTemplateSwitch: (label?: string | undefined) => "committed" | "oversized" | "noop" | "skipped";
1188
+ captureAiChangeset: (label?: string | undefined) => "committed" | "oversized" | "noop" | "skipped";
1189
+ mergeNextMutation: () => void;
1190
+ undo: () => Promise<void>;
1191
+ redo: () => Promise<void>;
1192
+ reset: () => void;
1193
+ getCurrentSizeBytes: () => number;
1194
+ getCurrentEntryCount: () => number;
1195
+ }, "entries" | "currentIndex" | "isApplyingSnapshot" | "baselineCaptured">, Pick<{
1196
+ entries: import("vue").ShallowRef<import("@brand-page-maker/stores/history/history-store").HistoryEntry[], import("@brand-page-maker/stores/history/history-store").HistoryEntry[]>;
1197
+ currentIndex: import("vue").Ref<number, number>;
1198
+ isApplyingSnapshot: import("vue").Ref<boolean, boolean>;
1199
+ baselineCaptured: import("vue").Ref<boolean, boolean>;
1200
+ canUndo: import("vue").ComputedRef<boolean>;
1201
+ canRedo: import("vue").ComputedRef<boolean>;
1202
+ captureBaseline: () => void;
1203
+ capture: (args: {
1204
+ source: "manual_edit" | "template_switch" | "ai_changeset" | "rich_text";
1205
+ actor: "user" | "ai_builder";
1206
+ label?: string | undefined;
1207
+ }) => "committed" | "oversized" | "noop" | "skipped";
1208
+ captureTemplateSwitch: (label?: string | undefined) => "committed" | "oversized" | "noop" | "skipped";
1209
+ captureAiChangeset: (label?: string | undefined) => "committed" | "oversized" | "noop" | "skipped";
1210
+ mergeNextMutation: () => void;
1211
+ undo: () => Promise<void>;
1212
+ redo: () => Promise<void>;
1213
+ reset: () => void;
1214
+ getCurrentSizeBytes: () => number;
1215
+ getCurrentEntryCount: () => number;
1216
+ }, "canUndo" | "canRedo">, Pick<{
1217
+ entries: import("vue").ShallowRef<import("@brand-page-maker/stores/history/history-store").HistoryEntry[], import("@brand-page-maker/stores/history/history-store").HistoryEntry[]>;
1218
+ currentIndex: import("vue").Ref<number, number>;
1219
+ isApplyingSnapshot: import("vue").Ref<boolean, boolean>;
1220
+ baselineCaptured: import("vue").Ref<boolean, boolean>;
1221
+ canUndo: import("vue").ComputedRef<boolean>;
1222
+ canRedo: import("vue").ComputedRef<boolean>;
1223
+ captureBaseline: () => void;
1224
+ capture: (args: {
1225
+ source: "manual_edit" | "template_switch" | "ai_changeset" | "rich_text";
1226
+ actor: "user" | "ai_builder";
1227
+ label?: string | undefined;
1228
+ }) => "committed" | "oversized" | "noop" | "skipped";
1229
+ captureTemplateSwitch: (label?: string | undefined) => "committed" | "oversized" | "noop" | "skipped";
1230
+ captureAiChangeset: (label?: string | undefined) => "committed" | "oversized" | "noop" | "skipped";
1231
+ mergeNextMutation: () => void;
1232
+ undo: () => Promise<void>;
1233
+ redo: () => Promise<void>;
1234
+ reset: () => void;
1235
+ getCurrentSizeBytes: () => number;
1236
+ getCurrentEntryCount: () => number;
1237
+ }, "reset" | "undo" | "redo" | "captureBaseline" | "capture" | "captureTemplateSwitch" | "captureAiChangeset" | "mergeNextMutation" | "getCurrentSizeBytes" | "getCurrentEntryCount">>;
1174
1238
  }, {
1175
1239
  isDraggingContent: boolean;
1176
1240
  isContentSelected: boolean;
@@ -15,6 +15,7 @@ import { transformToRTE, RTE_ALLOWED_SECTION_TYPES, } from '@brand-page-maker/ut
15
15
  import { useExternalRichTextEditor } from '@brand-page-maker/composables/rich-text-editor/useRichTextEditor';
16
16
  import { useUiStyleSettingsStore } from '@shared/style-settings/store';
17
17
  import { STYLE_THEME_KEYS } from '@brand-page/constants';
18
+ import { useHistoryStore } from '@brand-page-maker/stores/history/history-store';
18
19
  export default defineComponent({
19
20
  mixins: [PageMixin],
20
21
  setup() {
@@ -29,6 +30,7 @@ export default defineComponent({
29
30
  const eventTracker = useEventTracker();
30
31
  const { externalEditor } = useExternalRichTextEditor();
31
32
  const styleSettingsStore = useUiStyleSettingsStore();
33
+ const historyStore = useHistoryStore();
32
34
  return {
33
35
  items: computed(() => contentSettingsStore.items),
34
36
  selectedItemId: computed(() => contentSettingsStore.selectedItemId),
@@ -51,6 +53,7 @@ export default defineComponent({
51
53
  eventTracker,
52
54
  externalEditor,
53
55
  styleSettingsStore,
56
+ historyStore,
54
57
  };
55
58
  },
56
59
  data() {
@@ -214,6 +217,8 @@ export default defineComponent({
214
217
  selectedItem = currentItem.settings.content;
215
218
  }
216
219
  }
220
+ // RTE rewrap on section selection — fold into current head.
221
+ this.historyStore.mergeNextMutation();
217
222
  transformToRTE(this.pageSettingsStore, this.externalEditor, this.styleSettingsStore, selectedItem);
218
223
  }
219
224
  if (this.selectEventDebounceHandler) {
@@ -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-C_Pc-5bF.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-BZlXQjdd.js";
2
2
  import { createPinia as wE, setActivePinia as ZE } from "pinia";
3
3
  export {
4
4
  E as ABOUT_SECTION_SETTINGS_CONFIG,