@designcrowd/library.brand-page 6.0.6-undo-10 → 6.0.6-undo-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-C2L1EZgT.js → CreatedOnBrandCrowd-de-de-BoBmsU5p.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-DHyH1IiM.js → CreatedOnBrandCrowd-en-us-VTBk9ZeK.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-A1e80jTb.js → CreatedOnBrandCrowd-es-es-CwYO5ZGB.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-DHVMHkEQ.js → CreatedOnBrandCrowd-fr-ca-ZNEyNVVj.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-DHVMHkEQ.js → CreatedOnBrandCrowd-fr-fr-ZNEyNVVj.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-Bte4ECWP.js → CreatedOnBrandCrowd-pt-br-D1q4-n_v.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-Bte4ECWP.js → CreatedOnBrandCrowd-pt-pt-D1q4-n_v.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-5c5j6YI-.js → CreatedOnDcom-de-de-CFvvAm2h.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-CXjiYOAe.js → CreatedOnDcom-en-us-B5WlETVx.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-Dd1HoC__.js → CreatedOnDcom-es-es-CatVjoa9.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-8l8Jgm76.js → CreatedOnDcom-fr-ca-uyrRJVf9.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-DOvBm9IA.js → CreatedOnDcom-fr-fr-CKSa6Crw.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-C67z2_nX.js → CreatedOnDcom-pt-br-BIcGDf-8.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-CrIk4yit.js → CreatedOnDcom-pt-pt-BhKpuziQ.js} +1 -1
- package/lib/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.js +1 -1
- package/lib/src/brand-page-maker/stores/history/history-store.js +12 -4
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-E0I6wyrj.js → lib-CtSZjhZb.js} +15300 -15298
- package/lib/src/shared/content-settings/components/GenericTextInput.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/GenericTextInput.mixin.js +1 -1
- package/lib/src/shared/content-settings/components/email-field/EmailField.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/tel-field/TelField.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/text-field/TextField.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/textarea-field/TextareaField.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/url-field/UrlField.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/youtube-video-field/YoutubeVideoField.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/store/content-settings-store.js +27 -33
- package/package.json +1 -1
- package/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.ts +1 -1
- package/src/brand-page-maker/stores/history/history-store.test.ts +34 -0
- package/src/brand-page-maker/stores/history/history-store.ts +12 -4
- package/src/shared/content-settings/components/GenericTextInput.mixin.test.ts +9 -9
- package/src/shared/content-settings/components/GenericTextInput.mixin.ts +5 -2
- package/src/shared/content-settings/store/content-settings-store.ts +28 -33
|
@@ -286,7 +286,7 @@ export const useRichTextEditor = (model, props, emit, fontSettings, fontStyleDro
|
|
|
286
286
|
// focuses it before formatting, so this doesn't occur — revisit if a
|
|
287
287
|
// consumer ever drives toolbar actions on an unfocused editor.
|
|
288
288
|
emit('update:modelValue', sanitizedData.sanitizedHtml, {
|
|
289
|
-
|
|
289
|
+
isHydrationWrite: !editor.isFocused,
|
|
290
290
|
});
|
|
291
291
|
});
|
|
292
292
|
editor.on('selectionUpdate', () => {
|
|
@@ -345,8 +345,12 @@ export const useHistoryStore = defineStore('history', () => {
|
|
|
345
345
|
// 1. Diff `cameFromIndex` against target — pages present in target
|
|
346
346
|
// but absent from source are being restored/added; navigate there
|
|
347
347
|
// (undo-of-delete, redo-of-add).
|
|
348
|
-
// 2. Walk back from
|
|
349
|
-
//
|
|
348
|
+
// 2. Walk back from the NEWER of the two entries: the mutation being
|
|
349
|
+
// applied-or-reverted is always the newer entry's, so its stamp is
|
|
350
|
+
// the page where that change is visible. Undo therefore stays on
|
|
351
|
+
// the page the user just edited instead of teleporting to the
|
|
352
|
+
// previous entry's page; older entries are the fallback when the
|
|
353
|
+
// stamped page doesn't survive the restore (undo-of-add).
|
|
350
354
|
async function applySnapshotString(snapshotStr, targetIndex, cameFromIndex) {
|
|
351
355
|
const brandPageMakerStore = useBrandPageMakerStore();
|
|
352
356
|
let snapshot;
|
|
@@ -384,9 +388,13 @@ export const useHistoryStore = defineStore('history', () => {
|
|
|
384
388
|
// Source snapshot unparseable — fall through to walk-back.
|
|
385
389
|
}
|
|
386
390
|
}
|
|
387
|
-
// Step 2: walk
|
|
391
|
+
// Step 2: walk back from the newer entry — for undo that's the entry
|
|
392
|
+
// being undone (stamped with the page the user made that edit on),
|
|
393
|
+
// for redo it's the target. Starting at targetIndex here teleported
|
|
394
|
+
// undo to the PREVIOUS entry's page whenever consecutive entries were
|
|
395
|
+
// captured on different pages.
|
|
388
396
|
if (!resolvedActivePageId) {
|
|
389
|
-
for (let i = targetIndex; i >= 0; i--) {
|
|
397
|
+
for (let i = Math.max(targetIndex, cameFromIndex); i >= 0; i--) {
|
|
390
398
|
const candidate = entries.value[i]?.activePageId;
|
|
391
399
|
if (candidate && restoredPageIds.has(candidate)) {
|
|
392
400
|
resolvedActivePageId = candidate;
|
package/lib/src/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as T, a as E, 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 t, j as G, k as D, l as P, m as R, n as L, o, p as M, q as r, r as n, s as b, t as l, u as F, v as i, w as c, x as g, y as B, 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 m, K as k, L as V, M as X, N as v, O as h, P as f, Q as W, R as x, S as z, T as w, U as Z, V as j, W as q, X as J, Y as Q, Z as $, $ as aa, a0 as _a, a1 as Ta, a2 as Ea, 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 ta, ac as Ga, ad as Da, ae as Pa, af as Ra, ag as La, ah as oa, ai as Ma, aj as ra, ak as na, al as ba, am as la, an as Fa, ao as ia, ap as ca, aq as ga, ar as Ba, 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 ma, aB as ka, aC as Va, aD as Xa, aE as va, aF as ha, aG as fa, aH as Wa, aI as xa, aJ as za, aK as wa, aL as Za, aM as ja, aN as qa, aO as Ja, aP as Qa, aQ as $a, aR as a_, aS as __, aT as T_, aU as E_, 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 t_, b2 as G_, b3 as D_, b4 as P_, b5 as R_, b6 as L_, b7 as o_, b8 as M_, b9 as r_, ba as n_, bb as b_, bc as l_, bd as F_, be as i_, bf as c_, bg as g_, bh as B_, 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 m_, br as k_, bs as V_, bt as X_, bu as v_, bv as h_, bw as f_, bx as W_, by as x_, bz as z_, bA as w_, bB as Z_, bC as j_, bD as q_, bE as J_, bF as Q_, bG as $_, bH as aT, bI as _T, bJ as TT, bK as ET, bL as sT, bM as IT, bN as ST, bO as NT, bP as eT, bQ as AT, bR as OT, bS as CT, bT as tT, bU as GT, bV as DT, bW as PT, bX as RT, bY as LT, bZ as oT, b_ as MT, b$ as rT, c0 as nT, c1 as bT, c2 as lT, c3 as FT, c4 as iT, c5 as cT, c6 as gT, c7 as BT, c8 as YT, c9 as UT, ca as dT, cb as uT, cc as HT, cd as pT, ce as yT, cf as KT, cg as mT, ch as kT, ci as VT, cj as XT, ck as vT, cl as hT, cm as fT, cn as WT, co as xT, cp as zT, cq as wT, cr as ZT, cs as jT, ct as qT, cu as JT } from "./lib-
|
|
1
|
+
import { A as T, a as E, 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 t, j as G, k as D, l as P, m as R, n as L, o, p as M, q as r, r as n, s as b, t as l, u as F, v as i, w as c, x as g, y as B, 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 m, K as k, L as V, M as X, N as v, O as h, P as f, Q as W, R as x, S as z, T as w, U as Z, V as j, W as q, X as J, Y as Q, Z as $, $ as aa, a0 as _a, a1 as Ta, a2 as Ea, 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 ta, ac as Ga, ad as Da, ae as Pa, af as Ra, ag as La, ah as oa, ai as Ma, aj as ra, ak as na, al as ba, am as la, an as Fa, ao as ia, ap as ca, aq as ga, ar as Ba, 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 ma, aB as ka, aC as Va, aD as Xa, aE as va, aF as ha, aG as fa, aH as Wa, aI as xa, aJ as za, aK as wa, aL as Za, aM as ja, aN as qa, aO as Ja, aP as Qa, aQ as $a, aR as a_, aS as __, aT as T_, aU as E_, 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 t_, b2 as G_, b3 as D_, b4 as P_, b5 as R_, b6 as L_, b7 as o_, b8 as M_, b9 as r_, ba as n_, bb as b_, bc as l_, bd as F_, be as i_, bf as c_, bg as g_, bh as B_, 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 m_, br as k_, bs as V_, bt as X_, bu as v_, bv as h_, bw as f_, bx as W_, by as x_, bz as z_, bA as w_, bB as Z_, bC as j_, bD as q_, bE as J_, bF as Q_, bG as $_, bH as aT, bI as _T, bJ as TT, bK as ET, bL as sT, bM as IT, bN as ST, bO as NT, bP as eT, bQ as AT, bR as OT, bS as CT, bT as tT, bU as GT, bV as DT, bW as PT, bX as RT, bY as LT, bZ as oT, b_ as MT, b$ as rT, c0 as nT, c1 as bT, c2 as lT, c3 as FT, c4 as iT, c5 as cT, c6 as gT, c7 as BT, c8 as YT, c9 as UT, ca as dT, cb as uT, cc as HT, cd as pT, ce as yT, cf as KT, cg as mT, ch as kT, ci as VT, cj as XT, ck as vT, cl as hT, cm as fT, cn as WT, co as xT, cp as zT, cq as wT, cr as ZT, cs as jT, ct as qT, cu as JT } from "./lib-CtSZjhZb.js";
|
|
2
2
|
import { createPinia as $T, setActivePinia as aE } from "pinia";
|
|
3
3
|
export {
|
|
4
4
|
T as ABOUT_SECTION_SETTINGS_CONFIG,
|