@templatical/editor 0.7.0 → 0.7.2

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 (74) hide show
  1. package/dist/{AiChatSidebar-BwLECwsO.js → AiChatSidebar-DWRONNm6.js} +1 -1
  2. package/dist/{AiFeatureMenu-CVHKharv.js → AiFeatureMenu-U7b4Z8OV.js} +1 -1
  3. package/dist/{CloudEditor-DdZatjUe.js → CloudEditor-DgiUCNMn.js} +5 -5
  4. package/dist/{CollaboratorBar-VZKOv_Zn.js → CollaboratorBar-BgeaMhrV.js} +1 -1
  5. package/dist/{DesignReferenceSidebar-Ci9HIGbf.js → DesignReferenceSidebar-C1W02bYt.js} +1 -1
  6. package/dist/{ModuleBrowserModal-D7IYx1Nh.js → ModuleBrowserModal-Bjh99_5c.js} +4 -4
  7. package/dist/{ModulePreviewCanvas-I-uMcK5G.js → ModulePreviewCanvas-DDDQmUI_.js} +1 -1
  8. package/dist/{ParagraphEditor-BRQTNDFO.js → ParagraphEditor-BSaEdasm.js} +1 -1
  9. package/dist/{SaveModuleDialog-DGGGNZfm.js → SaveModuleDialog-9fX6oSxf.js} +2 -2
  10. package/dist/{SnapshotHistory-C97Iw6xw.js → SnapshotHistory-gYW-IXkE.js} +1 -1
  11. package/dist/{TestEmailModal-B7S8H-VG.js → TestEmailModal-B_Rmnngq.js} +2 -2
  12. package/dist/{TitleEditor-DhFTYzrw.js → TitleEditor-XbFuw1Vy.js} +1 -1
  13. package/dist/{TplModal-BgABm6ju.js → TplModal-LY9rkDph.js} +1 -1
  14. package/dist/{blockTypeIcons-BSf-3RJ-.js → blockTypeIcons-CLT2H0yU.js} +1 -1
  15. package/dist/bundle-stats.json +6 -6
  16. package/dist/cdn/chunks/{AccessibilityPanel-kgNBRaZV.js → AccessibilityPanel-DaqF4Xzy.js} +3 -3
  17. package/dist/cdn/chunks/{AccessibilityPanel-kgNBRaZV.js.map → AccessibilityPanel-DaqF4Xzy.js.map} +1 -1
  18. package/dist/cdn/chunks/{AiFeatureMenu-CRkzwdMg.js → AiFeatureMenu-WhZ7G-Wr.js} +2 -2
  19. package/dist/cdn/chunks/{AiFeatureMenu-CRkzwdMg.js.map → AiFeatureMenu-WhZ7G-Wr.js.map} +1 -1
  20. package/dist/cdn/chunks/{BlockA11yBadge-BfuH2Hrg.js → BlockA11yBadge-BLKyO0lH.js} +2 -2
  21. package/dist/cdn/chunks/{BlockA11yBadge-BfuH2Hrg.js.map → BlockA11yBadge-BLKyO0lH.js.map} +1 -1
  22. package/dist/cdn/chunks/{CloudEditor-h5JXI8WQ.js → CloudEditor-BKEXPt3g.js} +7 -7
  23. package/dist/cdn/chunks/{CloudEditor-h5JXI8WQ.js.map → CloudEditor-BKEXPt3g.js.map} +1 -1
  24. package/dist/cdn/chunks/{CollaboratorBar-CMl3lAZU.js → CollaboratorBar-ASDiTitQ.js} +3 -3
  25. package/dist/cdn/chunks/{CollaboratorBar-CMl3lAZU.js.map → CollaboratorBar-ASDiTitQ.js.map} +1 -1
  26. package/dist/cdn/chunks/{CountdownBlock-D1RoaOgF.js → CountdownBlock-LAlYJYWL.js} +2 -2
  27. package/dist/cdn/chunks/{CountdownBlock-D1RoaOgF.js.map → CountdownBlock-LAlYJYWL.js.map} +1 -1
  28. package/dist/cdn/chunks/{CountdownToolbar-DltwuOer.js → CountdownToolbar-CbIKGP7u.js} +3 -3
  29. package/dist/cdn/chunks/{CountdownToolbar-DltwuOer.js.map → CountdownToolbar-CbIKGP7u.js.map} +1 -1
  30. package/dist/cdn/chunks/{ModuleBrowserModal-3uu2mXR9.js → ModuleBrowserModal-BjmdleNq.js} +5 -5
  31. package/dist/cdn/chunks/{ModuleBrowserModal-3uu2mXR9.js.map → ModuleBrowserModal-BjmdleNq.js.map} +1 -1
  32. package/dist/cdn/chunks/{ModulePreviewCanvas-K9CQFr7p.js → ModulePreviewCanvas-DsmACAdb.js} +2 -2
  33. package/dist/cdn/chunks/{ModulePreviewCanvas-K9CQFr7p.js.map → ModulePreviewCanvas-DsmACAdb.js.map} +1 -1
  34. package/dist/cdn/chunks/{NumberWithSuffix-BIFgtqGs.js → NumberWithSuffix-EEDNj1my.js} +2 -2
  35. package/dist/cdn/chunks/{NumberWithSuffix-BIFgtqGs.js.map → NumberWithSuffix-EEDNj1my.js.map} +1 -1
  36. package/dist/cdn/chunks/{ParagraphEditor-DlpZX_x4.js → ParagraphEditor-D6Dw5RtX.js} +5 -5
  37. package/dist/cdn/chunks/{ParagraphEditor-DlpZX_x4.js.map → ParagraphEditor-D6Dw5RtX.js.map} +1 -1
  38. package/dist/cdn/chunks/{RichTextEditorContent-CPGT8h-O.js → RichTextEditorContent-C2yj_yPM.js} +2 -2
  39. package/dist/cdn/chunks/{RichTextEditorContent-CPGT8h-O.js.map → RichTextEditorContent-C2yj_yPM.js.map} +1 -1
  40. package/dist/cdn/chunks/{SaveModuleDialog-_uaJscj1.js → SaveModuleDialog-DCcvwYat.js} +2 -2
  41. package/dist/cdn/chunks/{SaveModuleDialog-_uaJscj1.js.map → SaveModuleDialog-DCcvwYat.js.map} +1 -1
  42. package/dist/cdn/chunks/{TitleEditor-Kerz6US8.js → TitleEditor-isN_t0MJ.js} +5 -5
  43. package/dist/cdn/chunks/{TitleEditor-Kerz6US8.js.map → TitleEditor-isN_t0MJ.js.map} +1 -1
  44. package/dist/cdn/chunks/{blockTypeIcons-BeOhGtoo.js → blockTypeIcons-Bgn69Q1-.js} +3 -3
  45. package/dist/cdn/chunks/{blockTypeIcons-BeOhGtoo.js.map → blockTypeIcons-Bgn69Q1-.js.map} +1 -1
  46. package/dist/cdn/chunks/{extensions-BZYkPlKr.js → extensions-BPsjY5N8.js} +2 -2
  47. package/dist/cdn/chunks/{extensions-BZYkPlKr.js.map → extensions-BPsjY5N8.js.map} +1 -1
  48. package/dist/cdn/chunks/{features-DzIN-Nua.js → features-BouLRfOO.js} +106 -60
  49. package/dist/cdn/chunks/features-BouLRfOO.js.map +1 -0
  50. package/dist/cdn/chunks/{icons-Nvr6w13E.js → icons-BBuZkqC3.js} +2 -2
  51. package/dist/cdn/chunks/{icons-Nvr6w13E.js.map → icons-BBuZkqC3.js.map} +1 -1
  52. package/dist/cdn/chunks/{media-library-BzT7BoGU.js → media-library-C-DcHE6w.js} +3 -3
  53. package/dist/cdn/chunks/{media-library-BzT7BoGU.js.map → media-library-C-DcHE6w.js.map} +1 -1
  54. package/dist/cdn/chunks/{quality-C328caFm.js → quality-ConWSEB6.js} +2 -2
  55. package/dist/cdn/chunks/{quality-C328caFm.js.map → quality-ConWSEB6.js.map} +1 -1
  56. package/dist/cdn/chunks/renderer-F8cxEe3t.js +501 -0
  57. package/dist/cdn/chunks/renderer-F8cxEe3t.js.map +1 -0
  58. package/dist/cdn/chunks/{src-DKNTQJVO.js → src-C9rMok-R.js} +4 -4
  59. package/dist/cdn/chunks/{src-DKNTQJVO.js.map → src-C9rMok-R.js.map} +1 -1
  60. package/dist/cdn/chunks/{styles-DaTht5d7.js → styles-BRN0i_zg.js} +176 -174
  61. package/dist/cdn/chunks/styles-BRN0i_zg.js.map +1 -0
  62. package/dist/cdn/editor.css +1 -1
  63. package/dist/cdn/editor.js +6 -6
  64. package/dist/{cloud-a3VovHva.js → cloud-CTmfCSqf.js} +11 -0
  65. package/dist/index.d.ts +5 -5
  66. package/dist/style.css +1 -1
  67. package/dist/{styles-D_fEz49o.js → styles-j_3bu0Bo.js} +170 -168
  68. package/dist/templatical-editor.js +4 -4
  69. package/dist/{useEditorCore-uCU9Ny0M.js → useEditorCore-B1XrI6fY.js} +91 -56
  70. package/package.json +7 -7
  71. package/dist/cdn/chunks/features-DzIN-Nua.js.map +0 -1
  72. package/dist/cdn/chunks/renderer-DYpHh_uV.js +0 -548
  73. package/dist/cdn/chunks/renderer-DYpHh_uV.js.map +0 -1
  74. package/dist/cdn/chunks/styles-DaTht5d7.js.map +0 -1
@@ -452,36 +452,46 @@ function St(e) {
452
452
  function o(t) {
453
453
  return e.lockedBlocks?.value.has(t) ?? !1;
454
454
  }
455
- function s(e, n = !0) {
455
+ function s(e) {
456
+ let n = a(t.content.blocks, e);
457
+ if (!n) return null;
458
+ let r = n.blocks.findIndex((t) => t.id === e);
459
+ return r === -1 ? null : {
460
+ targetSectionId: n.sectionId,
461
+ columnIndex: n.columnIndex,
462
+ index: r
463
+ };
464
+ }
465
+ function c(e, n = !0) {
456
466
  t.content = e, n && (t.isDirty = !0);
457
467
  }
458
- function c(e) {
468
+ function l(e) {
459
469
  e && o(e) || (t.selectedBlockId = e);
460
470
  }
461
- function l(e) {
471
+ function u(e) {
462
472
  t.viewport = e;
463
473
  }
464
- function u(e) {
474
+ function d(e) {
465
475
  t.darkMode = e;
466
476
  }
467
- function d(e) {
477
+ function f(e) {
468
478
  t.uiTheme = e;
469
479
  }
470
- function f(e) {
480
+ function p(e) {
471
481
  t.previewMode = e, e && (t.selectedBlockId = null);
472
482
  }
473
- function p(e, n) {
483
+ function m(e, n) {
474
484
  if (o(e)) return;
475
485
  let r = i(t.content.blocks, e);
476
486
  r && (Object.assign(r, n), t.isDirty = !0);
477
487
  }
478
- function m(e) {
488
+ function h(e) {
479
489
  t.content.settings = {
480
490
  ...t.content.settings,
481
491
  ...e
482
492
  }, t.isDirty = !0;
483
493
  }
484
- function h(e, n, r = 0, a) {
494
+ function g(e, n, r = 0, a) {
485
495
  if (n) {
486
496
  if (o(n)) return;
487
497
  let s = i(t.content.blocks, n);
@@ -493,7 +503,7 @@ function St(e) {
493
503
  } else a !== void 0 && a < t.content.blocks.length ? t.content.blocks.splice(a, 0, e) : t.content.blocks.push(e);
494
504
  t.isDirty = !0;
495
505
  }
496
- function g(e) {
506
+ function _(e) {
497
507
  if (o(e)) return;
498
508
  let n = a(t.content.blocks, e);
499
509
  if (n) {
@@ -501,7 +511,7 @@ function St(e) {
501
511
  r !== -1 && (n.blocks.splice(r, 1), t.selectedBlockId === e && (t.selectedBlockId = null), t.isDirty = !0);
502
512
  }
503
513
  }
504
- function _(e, n, r, s = 0) {
514
+ function v(e, n, r, s = 0) {
505
515
  if (o(e) || r && o(r)) return;
506
516
  let c = a(t.content.blocks, e);
507
517
  if (!c) return;
@@ -516,7 +526,7 @@ function St(e) {
516
526
  let [d] = c.blocks.splice(l, 1);
517
527
  u.splice(n, 0, d), t.isDirty = !0;
518
528
  }
519
- function v() {
529
+ function b() {
520
530
  t.isDirty = !0;
521
531
  }
522
532
  return {
@@ -524,18 +534,19 @@ function St(e) {
524
534
  content: n,
525
535
  selectedBlock: r,
526
536
  isBlockLocked: o,
527
- setContent: s,
528
- selectBlock: c,
529
- setViewport: l,
530
- setDarkMode: u,
531
- setUiTheme: d,
532
- setPreviewMode: f,
533
- updateBlock: p,
534
- updateSettings: m,
535
- addBlock: h,
536
- removeBlock: g,
537
- moveBlock: _,
538
- markDirty: v
537
+ setContent: c,
538
+ selectBlock: l,
539
+ setViewport: u,
540
+ setDarkMode: d,
541
+ setUiTheme: f,
542
+ setPreviewMode: p,
543
+ updateBlock: m,
544
+ updateSettings: h,
545
+ addBlock: g,
546
+ removeBlock: _,
547
+ moveBlock: v,
548
+ markDirty: b,
549
+ findBlockLocation: s
539
550
  };
540
551
  }
541
552
  //#endregion
@@ -544,7 +555,14 @@ var Ct = 50, wt = 300, Tt = 1500;
544
555
  function Et(e) {
545
556
  let { content: t, setContent: n, isRemoteOperation: r, maxSize: i = Ct } = e, a = C([]), o = C([]), s = C(!1), c = null, l = null, u = y(() => a.value.length > 0), d = y(() => o.value.length > 0);
546
557
  function f() {
547
- return JSON.parse(JSON.stringify(t.value));
558
+ let e = /* @__PURE__ */ new WeakSet();
559
+ return JSON.parse(JSON.stringify(t.value, (t, n) => {
560
+ if (typeof n == "object" && n) {
561
+ if (e.has(n)) return;
562
+ e.add(n);
563
+ }
564
+ return n;
565
+ }));
548
566
  }
549
567
  function p(e) {
550
568
  a.value.push(e), a.value.length > i && a.value.splice(0, a.value.length - i);
@@ -609,29 +627,34 @@ function Et(e) {
609
627
  //#endregion
610
628
  //#region ../core/src/block-actions.ts
611
629
  function Dt(e) {
612
- let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i } = e;
613
- function a(n, r, a) {
630
+ let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
631
+ function o(n, r, a) {
614
632
  let o = st(n, e.blockDefaults);
615
633
  return t(o, r, a), i(o.id), o;
616
634
  }
617
- function o(e, n, r) {
618
- let a = JSON.parse(JSON.stringify(e));
619
- return a.id = W(), a.type === "section" && (a.children = a.children.map((e) => e.map((e) => {
635
+ function s(e, n, r) {
636
+ let o = JSON.parse(JSON.stringify(e));
637
+ if (o.id = W(), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
620
638
  let t = JSON.parse(JSON.stringify(e));
621
639
  return t.id = W(), t;
622
- }))), t(a, n, r), i(a.id), a;
640
+ }))), n !== void 0 || r !== void 0) t(o, n, r);
641
+ else {
642
+ let i = a?.(e.id) ?? null;
643
+ i ? t(o, i.targetSectionId, i.columnIndex, i.index + 1) : t(o, n, r);
644
+ }
645
+ return i(o.id), o;
623
646
  }
624
- function s(e) {
647
+ function c(e) {
625
648
  n(e);
626
649
  }
627
- function c(e, t, n) {
650
+ function l(e, t, n) {
628
651
  r(e, { [t]: n });
629
652
  }
630
653
  return {
631
- createAndAddBlock: a,
632
- duplicateBlock: o,
633
- deleteBlock: s,
634
- updateBlockProperty: c
654
+ createAndAddBlock: o,
655
+ duplicateBlock: s,
656
+ deleteBlock: c,
657
+ updateBlockProperty: l
635
658
  };
636
659
  }
637
660
  //#endregion
@@ -1293,7 +1316,7 @@ function tr(e) {
1293
1316
  o || l();
1294
1317
  async function l() {
1295
1318
  try {
1296
- let t = await import("./quality-C328caFm.js").then((e) => e.t);
1319
+ let t = await import("./quality-ConWSEB6.js").then((e) => e.t);
1297
1320
  if (c) return;
1298
1321
  a.value = t.lintAccessibility, r.value = !0, u(), s = rn(e.content, u, {
1299
1322
  debounce: e.debounce ?? 500,
@@ -2919,7 +2942,7 @@ var ga = ["innerHTML"], _a = /* @__PURE__ */ B({
2919
2942
  viewport: {}
2920
2943
  },
2921
2944
  setup(e) {
2922
- let t = e, n = E(() => import("./ParagraphEditor-DlpZX_x4.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = ha(() => t.block.content);
2945
+ let t = e, n = E(() => import("./ParagraphEditor-D6Dw5RtX.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = ha(() => t.block.content);
2923
2946
  return (t, l) => (f(), k("div", {
2924
2947
  ref_key: "blockRef",
2925
2948
  ref: i,
@@ -2983,7 +3006,7 @@ var ba = ["data-block-id", "data-block-type"], xa = ["aria-label"], Sa = [
2983
3006
  },
2984
3007
  emits: ["select"],
2985
3008
  setup(e, { emit: t }) {
2986
- let n = E(() => import("./BlockA11yBadge-BfuH2Hrg.js")), r = e, i = t, { t: a, format: s } = Y(), c = v(Gn, null), l = C(null), u = O(() => c?.liftedBlockId.value === r.block.id), d = O(() => u.value ? s(a.blockActions.dragLifted, { block: r.block.type }) : a.blockActions.drag);
3009
+ let n = E(() => import("./BlockA11yBadge-BLKyO0lH.js")), r = e, i = t, { t: a, format: s } = Y(), c = v(Gn, null), l = C(null), u = O(() => c?.liftedBlockId.value === r.block.id), d = O(() => u.value ? s(a.blockActions.dragLifted, { block: r.block.type }) : a.blockActions.drag);
2987
3010
  async function p() {
2988
3011
  await m(), l.value?.focus();
2989
3012
  }
@@ -3010,20 +3033,26 @@ var ba = ["data-block-id", "data-block-type"], xa = ["aria-label"], Sa = [
3010
3033
  desktop: a.viewport.desktop,
3011
3034
  tablet: a.viewport.tablet,
3012
3035
  mobile: a.viewport.mobile
3013
- }[r.viewport] ?? r.viewport : ""), y = O(() => !!r.block.displayCondition), b = v(kn, null), x = v(An, null), S = v(Wn, {}), w = O(() => !!S.savedModules), T = O(() => S.comments?.getBlockCount(r.block.id) ?? 0), ee = O(() => ya(r.block));
3014
- function te(e) {
3036
+ }[r.viewport] ?? r.viewport : ""), y = O(() => !!r.block.displayCondition), b = v(kn, null), x = v(An, null), S = v(Wn, {}), w = O(() => !!S.savedModules), T = O(() => S.comments?.getBlockCount(r.block.id) ?? 0), ee = O(() => ({ margin: ya(r.block).margin })), te = O(() => {
3037
+ let e = ya(r.block);
3038
+ return {
3039
+ padding: e.padding,
3040
+ backgroundColor: e.backgroundColor
3041
+ };
3042
+ });
3043
+ function ne(e) {
3015
3044
  r.previewMode || (e.stopPropagation(), i("select"));
3016
3045
  }
3017
- function ne() {
3046
+ function re() {
3018
3047
  b?.deleteBlock(r.block.id);
3019
3048
  }
3020
- function re() {
3049
+ function N() {
3021
3050
  b?.duplicateBlock(r.block);
3022
3051
  }
3023
- function N() {
3052
+ function ie() {
3024
3053
  S.savedModules?.openSaveDialog(r.block.id);
3025
3054
  }
3026
- function ie() {
3055
+ function P() {
3027
3056
  x?.toggleBlock(r.block.id);
3028
3057
  }
3029
3058
  return (t, r) => (f(), k("div", {
@@ -3035,8 +3064,7 @@ var ba = ["data-block-id", "data-block-type"], xa = ["aria-label"], Sa = [
3035
3064
  style: L(ee.value),
3036
3065
  "data-block-id": e.block.id,
3037
3066
  "data-block-type": e.block.type,
3038
- draggable: "false",
3039
- onClick: te
3067
+ onClick: ne
3040
3068
  }, [
3041
3069
  V(j(n), { "block-id": e.block.id }, null, 8, ["block-id"]),
3042
3070
  e.isSelected ? (f(), k("div", {
@@ -3062,7 +3090,7 @@ var ba = ["data-block-id", "data-block-type"], xa = ["aria-label"], Sa = [
3062
3090
  class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
3063
3091
  "aria-label": j(a).blockActions.duplicate,
3064
3092
  title: j(a).blockActions.duplicate,
3065
- onClick: M(re, ["stop"])
3093
+ onClick: M(N, ["stop"])
3066
3094
  }, [V(j(Rr), {
3067
3095
  size: 14,
3068
3096
  "stroke-width": 1.5
@@ -3072,7 +3100,7 @@ var ba = ["data-block-id", "data-block-type"], xa = ["aria-label"], Sa = [
3072
3100
  class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
3073
3101
  "aria-label": j(a).blockActions.saveAsModule,
3074
3102
  title: j(a).blockActions.saveAsModule,
3075
- onClick: M(N, ["stop"])
3103
+ onClick: M(ie, ["stop"])
3076
3104
  }, [V(j(Dr), {
3077
3105
  size: 14,
3078
3106
  "stroke-width": 1.5
@@ -3081,7 +3109,7 @@ var ba = ["data-block-id", "data-block-type"], xa = ["aria-label"], Sa = [
3081
3109
  class: "tpl-block-action-btn tpl-block-delete-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
3082
3110
  "aria-label": j(a).blockActions.delete,
3083
3111
  title: j(a).blockActions.delete,
3084
- onClick: M(ne, ["stop"])
3112
+ onClick: M(re, ["stop"])
3085
3113
  }, [V(j(ci), {
3086
3114
  size: 14,
3087
3115
  "stroke-width": 1.5
@@ -3095,7 +3123,7 @@ var ba = ["data-block-id", "data-block-type"], xa = ["aria-label"], Sa = [
3095
3123
  class: "tpl-condition-toggle tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1 tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-bg-elevated)] tpl:text-[var(--tpl-primary)] tpl:border tpl:border-[var(--tpl-border)]",
3096
3124
  "aria-label": j(a).blockActions.conditionToggle,
3097
3125
  title: e.block.displayCondition?.label,
3098
- onClick: M(ie, ["stop"])
3126
+ onClick: M(P, ["stop"])
3099
3127
  }, [V(j(Ur), {
3100
3128
  size: 12,
3101
3129
  "stroke-width": 2
@@ -3108,10 +3136,13 @@ var ba = ["data-block-id", "data-block-type"], xa = ["aria-label"], Sa = [
3108
3136
  size: 12,
3109
3137
  "stroke-width": 2.5
3110
3138
  }), z(" " + D(T.value), 1)], 8, ja)])) : A("", !0),
3111
- o(t.$slots, "default", {}, void 0, !0)
3139
+ I("div", {
3140
+ class: "tpl-block-content",
3141
+ style: L(te.value)
3142
+ }, [o(t.$slots, "default", {}, void 0, !0)], 4)
3112
3143
  ], 14, ba));
3113
3144
  }
3114
- }), [["__scopeId", "data-v-850614e7"]]);
3145
+ }), [["__scopeId", "data-v-7333e8d7"]]);
3115
3146
  //#endregion
3116
3147
  //#region src/utils/unwrapParagraph.ts
3117
3148
  function Na(e) {
@@ -3127,7 +3158,7 @@ var Pa = /* @__PURE__ */ B({
3127
3158
  viewport: {}
3128
3159
  },
3129
3160
  setup(e) {
3130
- let t = e, n = E(() => import("./TitleEditor-Kerz6US8.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = ha(() => t.block.content), l = O(() => {
3161
+ let t = e, n = E(() => import("./TitleEditor-isN_t0MJ.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = ha(() => t.block.content), l = O(() => {
3131
3162
  let e = {
3132
3163
  fontSize: `${pe[t.block.level]}px`,
3133
3164
  color: t.block.color,
@@ -3196,9 +3227,9 @@ var Pa = /* @__PURE__ */ B({
3196
3227
  return l.value[e] || [];
3197
3228
  }
3198
3229
  function p(e, t) {
3199
- let r = [...n.block.children];
3200
- for (; r.length <= e;) r.push([]);
3201
- r[e] = t, i.updateBlock(n.block.id, { children: r });
3230
+ let r = t.map((e) => JSON.parse(JSON.stringify(e))), a = [...n.block.children];
3231
+ for (; a.length <= e;) a.push([]);
3232
+ a[e] = r, i.updateBlock(n.block.id, { children: a });
3202
3233
  }
3203
3234
  function m(e) {
3204
3235
  return va(e, o, t);
@@ -3222,9 +3253,12 @@ var Pa = /* @__PURE__ */ B({
3222
3253
  },
3223
3254
  animation: 150,
3224
3255
  "ghost-class": "tpl-ghost",
3256
+ "drag-class": "tpl-dragging",
3257
+ handle: ".tpl-block-btn",
3225
3258
  "invert-swap": !0,
3226
3259
  "inverted-swap-threshold": .65,
3227
3260
  "empty-insert-threshold": 20,
3261
+ "force-fallback": !0,
3228
3262
  class: "tpl:min-h-[60px]",
3229
3263
  "onUpdate:modelValue": (e) => p(n, e)
3230
3264
  }, {
@@ -3687,7 +3721,7 @@ var so = ["src", "alt"], co = {
3687
3721
  table: ro,
3688
3722
  spacer: Za,
3689
3723
  html: $i,
3690
- countdown: E(() => import("./CountdownBlock-D1RoaOgF.js").then((e) => e.n))
3724
+ countdown: E(() => import("./CountdownBlock-LAlYJYWL.js").then((e) => e.n))
3691
3725
  };
3692
3726
  function go(e) {
3693
3727
  let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = Y(r);
@@ -3707,6 +3741,7 @@ function go(e) {
3707
3741
  removeBlock: t.removeBlock,
3708
3742
  updateBlock: t.updateBlock,
3709
3743
  selectBlock: t.selectBlock,
3744
+ findBlockLocation: t.findBlockLocation,
3710
3745
  blockDefaults: n.blockDefaults
3711
3746
  }), f = kt(t), m = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? Ot({
3712
3747
  content: t.content,
@@ -4387,12 +4422,23 @@ function Oo(e) {
4387
4422
  function ee() {
4388
4423
  n.isDirty = !0;
4389
4424
  }
4425
+ function D(e) {
4426
+ let t = s(n.content.blocks, e);
4427
+ if (!t) return null;
4428
+ let r = t.blocks.findIndex((t) => t.id === e);
4429
+ return r === -1 ? null : {
4430
+ targetSectionId: t.sectionId,
4431
+ columnIndex: t.columnIndex,
4432
+ index: r
4433
+ };
4434
+ }
4390
4435
  return {
4391
4436
  state: x(n),
4392
4437
  content: r,
4393
4438
  selectedBlock: i,
4394
4439
  savedBlockIds: a,
4395
4440
  isBlockLocked: c,
4441
+ findBlockLocation: D,
4396
4442
  setContent: l,
4397
4443
  selectBlock: u,
4398
4444
  setViewport: d,
@@ -6843,4 +6889,4 @@ var zl = {
6843
6889
  //#endregion
6844
6890
  export { Di as $, Mn as $t, go as A, xe as An, X as At, ya as B, Fn as Bt, Oo as C, Ee as Cn, Rr as Ct, Z as D, we as Dn, Mr as Dt, $ as E, _e as En, Pr as Et, za as F, pe as Fn, Kn as Ft, $i as G, In as Gt, _a as H, er as Ht, Va as I, de as In, Xn as It, Li as J, jn as Jt, Ji as K, Hn as Kt, Ra as L, fe as Ln, Un as Lt, ro as M, Te as Mn, lr as Mt, Za as N, he as Nn, nr as Nt, _o as O, ge as On, Ar as Ot, Ja as P, be as Pn, Y as Pt, ki as Q, $n as Qt, Pa as R, ue as Rn, Yn as Rt, Mo as S, ve as Sn, zr as St, wo as T, Ce as Tn, Ir as Tt, ma as U, Zn as Ut, va as V, Wn as Vt, ua as W, An as Wt, ji as X, Vn as Xt, Fi as Y, Rn as Yt, Ai as Z, Qn as Zt, Ho as _, vt as _n, Jr as _t, _l as a, q as an, di as at, Fo as b, ot as bn, Gr as bt, Es as c, Zt as cn, si as ct, Jo as d, At as dn, ri as dt, Nn as en, Oi as et, qo as f, St as fn, ni as ft, Uo as g, ht as gn, Yr as gt, Wo as h, yt as hn, Xr as ht, yl as i, yn as in, pi as it, mo as j, Se as jn, _r as jt, vo as k, me as kn, kr as kt, es as l, en as ln, oi as lt, Go as m, _t as mn, Zr as mt, gu as n, un as nn, vi as nt, hl as o, Tn as on, li as ot, Ko as p, lt as pn, ei as pt, Ki as q, Dn as qt, Nl as r, vn as rn, _i as rt, Bc as s, Sn as sn, ci as st, Mu as t, J as tn, Ti as tt, $o as u, tn as un, ii as ut, Vo as v, ct as vn, qr as vt, To as w, ye as wn, Lr as wt, No as x, W as xn, Br as xt, Io as y, st as yn, Kr as yt, Ma as z, Pn as zt };
6845
6891
 
6846
- //# sourceMappingURL=features-DzIN-Nua.js.map
6892
+ //# sourceMappingURL=features-BouLRfOO.js.map