@printstack/print-studio 0.1.1 → 0.1.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 (58) hide show
  1. package/README.md +121 -160
  2. package/assets/render.worker-DkH7TepL.js +109 -0
  3. package/{cloneDeep-PCw2ErRl.js → cloneDeep-waBDTGc3.js} +9 -4
  4. package/components/print-s-logo/print-s-logo.vue.d.ts +1 -1
  5. package/components/s-form/types.d.ts +1 -1
  6. package/core/coordinate-space.d.ts +16 -0
  7. package/core/document-model.d.ts +1 -1
  8. package/core/element-registry.d.ts +3 -8
  9. package/core/page-extensions.d.ts +1 -1
  10. package/core/types.d.ts +8 -0
  11. package/core.js +2 -2
  12. package/designer/commands/menu-adapter.d.ts +3 -3
  13. package/designer/commands/menu-types.d.ts +8 -1
  14. package/designer/commands/types.d.ts +2 -0
  15. package/designer/components/fields/use-table-draft.d.ts +0 -4
  16. package/designer/components/panels/layer-row-types.d.ts +37 -0
  17. package/designer/components/panels/layer-row.vue.d.ts +17 -0
  18. package/designer/components/stage/marquee-overlay.vue.d.ts +8 -0
  19. package/designer/components/stage/node-style.d.ts +3 -0
  20. package/designer/components/stage/selection-member.vue.d.ts +14 -0
  21. package/designer/composables/use-theme.d.ts +3 -0
  22. package/designer/facade/editing.d.ts +2 -2
  23. package/designer/facade/entities.d.ts +1156 -22
  24. package/designer/frame/view.d.ts +2 -0
  25. package/designer/interactions/marquee.d.ts +1 -1
  26. package/designer/interactions/move.d.ts +3 -1
  27. package/designer/mount-print-designer.d.ts +1 -1
  28. package/designer/plugins/plugin-manager.d.ts +3 -3
  29. package/designer/plugins/types.d.ts +1 -1
  30. package/designer/stores/document-store.d.ts +72 -0
  31. package/designer/stores/editor-store.d.ts +770 -14
  32. package/designer/stores/page-store.d.ts +25 -1
  33. package/designer/stores/template-store.d.ts +52 -4
  34. package/designer/stores/types.d.ts +1 -0
  35. package/designer/stores/ui-store.d.ts +232 -3
  36. package/designer/stores/view-store.d.ts +10 -1
  37. package/designer.d.ts +1 -1
  38. package/designer.js +3 -3
  39. package/{document-model-GhFP9OGp.js → document-model-Cc5RoO4j.js} +160 -179
  40. package/elements/table/table-style.d.ts +3 -10
  41. package/host-OAp3gFDx.js +123 -0
  42. package/index.js +5 -5
  43. package/locales/runtime.d.ts +7 -2
  44. package/locales/translations/zh-CN/designer.json.d.ts +9 -4
  45. package/{mount-print-designer-BLgVZOnm.js → mount-print-designer-DnHTrBE9.js} +4 -4
  46. package/{mount-print-preview-D7M-1AqH.js → mount-print-preview-Bcb08lJ-.js} +4 -3
  47. package/package.json +1 -1
  48. package/{presets-D3WhkbZK.js → presets-BunYODhE.js} +2 -2
  49. package/{registries-dZq8MewR.js → registries-sg39PGF1.js} +767 -780
  50. package/runtime.js +2 -2
  51. package/{saas-B1H161e1.js → saas-D-q51uTz.js} +1 -1
  52. package/saas.js +1 -1
  53. package/{studio-BFQYHZsg.js → studio-B3B6zI06.js} +796 -722
  54. package/studio-types.d.ts +1 -1
  55. package/style.css +1 -1
  56. package/vue.js +786 -693
  57. package/assets/render.worker-Ch4qWx3S.js +0 -109
  58. package/host-CuGR8rD6.js +0 -123
package/vue.js CHANGED
@@ -1,9 +1,9 @@
1
- import { $ as e, B as t, C as n, E as r, F as i, H as a, I as o, L as s, M as c, N as l, P as u, R as d, S as f, T as p, V as m, _ as h, a as g, b as _, c as v, d as y, f as b, g as x, h as S, j as C, l as w, m as T, o as E, p as D, s as O, u as k, v as A, w as j, x as ee, y as te, z as ne } from "./registries-dZq8MewR.js";
2
- import { a as re, i as ie, n as ae, o as oe, r as se, s as ce, t as le } from "./host-CuGR8rD6.js";
3
- import { G as ue, H as de, M as fe, V as pe, at as me, nt as he, ot as ge, p as _e } from "./document-model-GhFP9OGp.js";
4
- import { A as ve, B as ye, C as be, D as xe, E as Se, F as Ce, G as we, H as Te, I as Ee, K as De, L as Oe, M as ke, N as Ae, O as je, P as Me, R as Ne, S as Pe, T as Fe, W as Ie, _ as Le, a as Re, b as ze, d as Be, f as Ve, g as He, h as Ue, i as We, j as Ge, k as Ke, m as qe, n as Je, o as Ye, p as Xe, s as Ze, t as Qe, u as $e, v as et, w as tt } from "./studio-BFQYHZsg.js";
5
- import { A as nt, B as M, C as rt, D as it, E as at, F as ot, O as st, P as ct, R as lt, S as ut, T as dt, _ as ft, a as pt, b as mt, c as ht, d as gt, f as _t, g as vt, h as yt, i as bt, k as xt, l as St, m as Ct, n as wt, o as Tt, p as Et, r as Dt, s as Ot, t as kt, u as At, v as jt, w as Mt, x as Nt, y as Pt } from "./cloneDeep-PCw2ErRl.js";
6
- import { t as Ft } from "./presets-D3WhkbZK.js";
1
+ import { $ as e, B as t, C as n, E as r, F as i, H as a, I as o, L as s, M as c, N as l, P as u, R as d, S as f, T as p, V as m, _ as h, a as g, b as _, c as v, d as y, f as b, g as x, h as S, j as C, l as w, m as T, o as E, p as D, s as O, u as k, v as A, w as j, x as ee, y as te, z as ne } from "./registries-sg39PGF1.js";
2
+ import { a as re, i as ie, n as ae, o as oe, r as se, s as ce, t as le } from "./host-OAp3gFDx.js";
3
+ import { G as ue, H as de, M as fe, V as pe, at as me, it as he, p as ge, tt as _e } from "./document-model-Cc5RoO4j.js";
4
+ import { A as ve, B as ye, C as be, D as xe, E as Se, F as Ce, G as we, H as Te, I as Ee, K as De, L as Oe, M as ke, N as Ae, O as je, P as Me, R as Ne, S as Pe, T as Fe, W as Ie, _ as Le, a as Re, b as ze, d as Be, f as Ve, g as He, h as Ue, i as We, j as Ge, k as Ke, m as qe, n as Je, o as Ye, p as Xe, s as Ze, t as Qe, u as $e, v as et, w as tt } from "./studio-B3B6zI06.js";
5
+ import { A as nt, B as M, C as rt, D as it, E as at, F as ot, O as st, P as ct, R as lt, S as ut, T as dt, _ as ft, a as pt, b as mt, c as ht, d as gt, f as _t, g as vt, h as yt, i as bt, k as xt, l as St, m as Ct, n as wt, o as Tt, p as Et, r as Dt, s as Ot, t as kt, u as At, v as jt, w as Mt, x as Nt, y as Pt } from "./cloneDeep-waBDTGc3.js";
6
+ import { t as Ft } from "./presets-BunYODhE.js";
7
7
  import { t as It } from "./types-Vh_6jhVV.js";
8
8
  import { Comment as Lt, ErrorCodes as Rt, Fragment as N, Teleport as zt, Text as Bt, Transition as Vt, cloneVNode as Ht, computed as P, createBlock as F, createCommentVNode as I, createElementBlock as L, createElementVNode as R, createSlots as Ut, createTextVNode as Wt, createVNode as z, defineComponent as B, getCurrentInstance as Gt, getCurrentScope as Kt, guardReactiveProps as qt, h as Jt, handleError as Yt, hasInjectionContext as Xt, inject as Zt, isRef as Qt, isVNode as $t, markRaw as en, mergeModels as tn, mergeProps as V, nextTick as nn, normalizeClass as rn, normalizeProps as an, normalizeStyle as on, onBeforeUnmount as sn, onMounted as cn, onScopeDispose as ln, onUnmounted as un, onUpdated as dn, openBlock as H, provide as fn, reactive as pn, readonly as mn, ref as U, render as hn, renderList as gn, renderSlot as _n, resolveComponent as vn, resolveDirective as yn, resolveDynamicComponent as bn, shallowReactive as xn, shallowRef as Sn, toDisplayString as W, toRaw as Cn, toRefs as wn, toValue as Tn, unref as G, useId as En, useModel as Dn, useSlots as On, vShow as kn, watch as K, watchEffect as An, watchPostEffect as jn, withCtx as q, withDirectives as Mn, withModifiers as Nn } from "vue";
9
9
  import { AddIcon as Pn, AdjustmentIcon as Fn, ArrowDownIcon as In, ArrowRightIcon as Ln, ArrowUpIcon as Rn, BarcodeIcon as zn, BrowseIcon as Bn, BrowseOffIcon as Vn, CalendarIcon as Hn, CenterFocusStrongIcon as Un, CheckCircleFilledIcon as Wn, CheckIcon as Gn, CheckRectangleIcon as Kn, ChevronDownIcon as qn, ChevronLeftDoubleIcon as Jn, ChevronLeftIcon as Yn, ChevronRightDoubleIcon as Xn, ChevronRightIcon as Zn, ChevronUpIcon as Qn, CircleIcon as $n, ClearIcon as er, CloseCircleFilledIcon as tr, CloseIcon as nr, CopyIcon as rr, CursorIcon as ir, CutIcon as ar, DataBaseIcon as or, DeleteIcon as sr, DownloadIcon as cr, EditIcon as lr, EllipsisIcon as ur, ErrorCircleFilledIcon as dr, FileIcon as fr, FlipToBackIcon as pr, FlipToFrontIcon as mr, FolderIcon as hr, FolderOpenIcon as gr, FormatHorizontalAlignBottomIcon as _r, FormatHorizontalAlignCenterIcon as vr, FormatHorizontalAlignTopIcon as yr, FormatVerticalAlignCenterIcon as br, FormatVerticalAlignLeftIcon as xr, FormatVerticalAlignRightIcon as Sr, FullscreenExitIcon as Cr, FullscreenIcon as wr, GridViewIcon as Tr, HelpCircleIcon as Er, ImageIcon as Dr, InfoCircleFilledIcon as Or, KeyIcon as kr, LayersIcon as Ar, LinkIcon as jr, LinkUnlinkIcon as Mr, LockOffIcon as Nr, LockOnIcon as Pr, MergeCellsIcon as Fr, MinusIcon as Ir, MoreIcon as Lr, Move1Icon as Rr, MoveIcon as zr, PageFirstIcon as Br, PageLastIcon as Vr, PaletteIcon as Hr, PasteIcon as Ur, PrintIcon as Wr, QrcodeIcon as Gr, RectangleIcon as Kr, RefreshIcon as qr, RemoveIcon as Jr, RollbackIcon as Yr, RollfrontIcon as Xr, RotateIcon as Zr, RoundIcon as Qr, RulerIcon as $r, SlashIcon as ei, SwapIcon as ti, TableIcon as ni, TableSplitIcon as ri, TemplateIcon as ii, TextIcon as ai, TimeIcon as oi, UploadIcon as si, ViewColumnIcon as ci, ViewListIcon as li, ZoomInIcon as ui, ZoomOutIcon as di } from "tdesign-icons-vue-next";
@@ -866,7 +866,7 @@ function na(e) {
866
866
  icon: "zoom",
867
867
  id: "view.zoomIn",
868
868
  order: 1,
869
- run: (e) => e.store().view.setZoom(he(e.store().view.zoom * 1.25, .05, 8)),
869
+ run: (e) => e.store().view.setZoom(_e(e.store().view.zoom * 1.25, .05, 8)),
870
870
  shortcut: "Ctrl+=",
871
871
  get title() {
872
872
  return M("designer.builtins.zoomInTitle");
@@ -877,7 +877,7 @@ function na(e) {
877
877
  icon: "zoom-out",
878
878
  id: "view.zoomOut",
879
879
  order: 2,
880
- run: (e) => e.store().view.setZoom(he(e.store().view.zoom / 1.25, .05, 8)),
880
+ run: (e) => e.store().view.setZoom(_e(e.store().view.zoom / 1.25, .05, 8)),
881
881
  shortcut: "Ctrl+-",
882
882
  get title() {
883
883
  return M("designer.builtins.zoomOutTitle");
@@ -1040,6 +1040,31 @@ function na(e) {
1040
1040
  return M("designer.builtins.clearGuidesTitle");
1041
1041
  }
1042
1042
  },
1043
+ ...[
1044
+ "light",
1045
+ "dark",
1046
+ "system"
1047
+ ].map((e, t) => ({
1048
+ checked: () => n().ui.themeMode === e,
1049
+ dividerBefore: t === 0,
1050
+ group: "view",
1051
+ icon: "palette",
1052
+ id: `view.theme.${e}`,
1053
+ order: 40 + t,
1054
+ run: (t) => {
1055
+ t.store().ui.setThemeMode(e);
1056
+ },
1057
+ segment: {
1058
+ icon: "palette",
1059
+ id: "view.theme",
1060
+ get label() {
1061
+ return M("designer.theme.groupLabel");
1062
+ }
1063
+ },
1064
+ get title() {
1065
+ return M(`designer.theme.${e}`);
1066
+ }
1067
+ })),
1043
1068
  ...Ve.map((e) => ({
1044
1069
  checked: () => n().view.canvasBackgroundPreset === e.id,
1045
1070
  get help() {
@@ -1706,7 +1731,7 @@ function na(e) {
1706
1731
  return;
1707
1732
  }
1708
1733
  if (!(n instanceof KeyboardEvent)) return;
1709
- let r = me(n.shiftKey ? 5 : 1, e.store().view.zoom), i = n.key.toLowerCase(), { x: a = 0, y: o = 0 } = {
1734
+ let r = he(n.shiftKey ? 5 : 1, e.store().view.zoom), i = n.key.toLowerCase(), { x: a = 0, y: o = 0 } = {
1710
1735
  arrowdown: {
1711
1736
  x: 0,
1712
1737
  y: r
@@ -2213,7 +2238,7 @@ var Ra = [
2213
2238
  for (let e of Ra) Ma.register(e);
2214
2239
  // src/designer/components/variable-text/use-variable-text-bindings.ts
2215
2240
  function za(e) {
2216
- let t = vz().store();
2241
+ let t = Ez().store();
2217
2242
  function n(n) {
2218
2243
  return ja(n, t.dataSource.list, e());
2219
2244
  }
@@ -2265,7 +2290,7 @@ var Ba = { class: "variable-text-preview" }, Va = ["title"], Ha = /*@__PURE__*/
2265
2290
  pxPerMm: {}
2266
2291
  },
2267
2292
  setup(e) {
2268
- let t = e, n = vz().store(), r = P(() => {
2293
+ let t = e, n = Ez().store(), r = P(() => {
2269
2294
  let e = t.node.props.text;
2270
2295
  return typeof e == "string" ? e : "";
2271
2296
  }), i = P(() => E(t.node.props, t.pxPerMm));
@@ -23999,7 +24024,7 @@ var fM = 1, pM = r_(B({
23999
24024
  r_(lM);
24000
24025
  // src/designer/context/use-element-definition.ts
24001
24026
  function mM(e) {
24002
- let t = vz(), n = U(0), r = t.events.on("elements:changed", () => {
24027
+ let t = Ez(), n = U(0), r = t.events.on("elements:changed", () => {
24003
24028
  n.value += 1;
24004
24029
  });
24005
24030
  return ln(r), P(() => {
@@ -25463,7 +25488,7 @@ var kN = [
25463
25488
  icon: `space-${e}`,
25464
25489
  labelKey: `designer.alignGrid.${t}`
25465
25490
  }))
25466
- }, n = e, r = vz(), { commands: i } = r, a = r.store();
25491
+ }, n = e, r = Ez(), { commands: i } = r, a = r.store();
25467
25492
  function o(e) {
25468
25493
  let t = typeof e == "number" && Number.isFinite(e) ? e : null;
25469
25494
  a.view.updateAlignPanel({ spacing: t });
@@ -25519,7 +25544,7 @@ var kN = [
25519
25544
  }, VN = /* @__PURE__ */ B({
25520
25545
  __name: "align-target",
25521
25546
  setup(e) {
25522
- let t = vz(), n = t.store(), { onVisibleChange: r, popupProps: i } = hM({}, "popup"), a = P(() => [
25547
+ let t = Ez(), n = t.store(), { onVisibleChange: r, popupProps: i } = hM({}, "popup"), a = P(() => [
25523
25548
  {
25524
25549
  label: M("designer.alignGrid.targetSelectionLabel"),
25525
25550
  value: "selection"
@@ -25635,7 +25660,7 @@ var kN = [
25635
25660
  }), [["__scopeId", "data-v-d4b959c2"]]);
25636
25661
  // src/designer/composables/use-restored-ui-state.ts
25637
25662
  function QN(e, t) {
25638
- let n = vz().store().ui;
25663
+ let n = Ez().store().ui;
25639
25664
  K(() => n.restoredState, (n) => t(n[e]), {
25640
25665
  flush: "post",
25641
25666
  immediate: !0
@@ -26829,7 +26854,7 @@ var mF = {
26829
26854
  },
26830
26855
  emits: ["commit"],
26831
26856
  setup(e, { emit: t }) {
26832
- let n = e, r = t, i = { labelWidth: 0 }, a = vz(), o = a.store(), s = U(!1), c = U(), l = Sn(), u = U(), d = U(""), f = U(0), p = P(() => n.nodes ?? [n.node]), m = P(() => p.value.length > 1), h = P(() => {
26857
+ let n = e, r = t, i = { labelWidth: 0 }, a = Ez(), o = a.store(), s = U(!1), c = U(), l = Sn(), u = U(), d = U(""), f = U(0), p = P(() => n.nodes ?? [n.node]), m = P(() => p.value.length > 1), h = P(() => {
26833
26858
  let e = te(n.node, n.field);
26834
26859
  return p.value.some((t) => !xi(te(t, n.field), e));
26835
26860
  }), g = P(() => n.field.feedback?.(n.node)), v = P(() => p.value.every((e) => n.field.showIf?.(e.props) ?? !0)), y = P(() => n.field.stacked ?? n.field.type === "textarea"), b = P(() => {
@@ -27089,7 +27114,7 @@ var EF = { class: "flex w-full shrink-0 flex-col bg-panel pb-2" }, DF = { class:
27089
27114
  }, UF = { class: "truncate font-mono text-[10px] opacity-80" }, WF = { class: "flex gap-1" }, GF = /* @__PURE__ */ B({
27090
27115
  __name: "control-panel",
27091
27116
  setup(e) {
27092
- let { commands: t, elements: n } = vz(), r = vz().store(), i = U({ name: "" }), a = P(() => [{
27117
+ let { commands: t, elements: n } = Ez(), r = Ez().store(), i = U({ name: "" }), a = P(() => [{
27093
27118
  field: "name",
27094
27119
  label: M("designer.controlPanel.nameLabel"),
27095
27120
  props: { onBlur: function() {
@@ -27291,54 +27316,233 @@ function XF(e, t, n) {
27291
27316
  return i ? [YF(i, n, typeof t == "string" ? {} : t)] : [];
27292
27317
  });
27293
27318
  }
27294
- // src/designer/components/panels/layers-panel.vue?vue&type=script&setup=true&lang.ts
27295
- var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-center gap-2 border-b border-edge px-3 py-1.5" }, $F = { class: "shrink-0 text-[11px] text-ink-dim" }, eI = { class: "w-8 shrink-0 text-right text-[10px] text-ink-dim" }, tI = [
27296
- "data-layer-group-id",
27297
- "onClick",
27298
- "onDblclick",
27299
- "onDragstart",
27300
- "onDragover",
27301
- "onContextmenu"
27302
- ], nI = {
27319
+ // src/designer/components/panels/layer-row.vue?vue&type=script&setup=true&lang.ts
27320
+ var ZF = ["data-layer-group-id"], QF = {
27303
27321
  key: 1,
27304
27322
  class: "min-w-0 flex-1 truncate"
27305
- }, rI = { class: "shrink-0 text-[9px] text-ink-dim/60" }, iI = [
27306
- "data-layer-id",
27307
- "onClick",
27308
- "onDblclick",
27309
- "onDragstart",
27310
- "onDragover",
27311
- "onContextmenu"
27312
- ], aI = {
27323
+ }, $F = { class: "shrink-0 text-[9px] text-ink-dim/60" }, eI = ["data-layer-id"], tI = {
27313
27324
  key: 3,
27314
27325
  class: "shrink-0 text-[9px] text-ink-dim/60"
27315
- }, oI = {
27326
+ }, nI = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
27327
+ __name: "layer-row",
27328
+ props: {
27329
+ api: {},
27330
+ dropIndicator: {},
27331
+ renameText: {},
27332
+ renamingGroupId: {},
27333
+ row: {}
27334
+ },
27335
+ setup(e) {
27336
+ let t = e, n = Ez().store(), r = P(() => t.row.kind === "element" && n.selection.has(t.row.node.id)), i = P(() => t.row.kind === "element" && n.selection.hoverId === t.row.node.id && !n.selection.has(t.row.node.id)), a = P(() => t.row.kind === "element" ? n.selection.renamingId === t.row.node.id : t.renamingGroupId === t.row.group.id), o = P(() => t.row.kind === "group" && t.api.isGroupSelected(t.row.group)), s = P(() => {
27337
+ let e = [];
27338
+ return r.value && e.push("bg-accent-soft"), i.value && e.push("bg-panel-2"), e;
27339
+ });
27340
+ function c(e) {
27341
+ return Pe(n).get(e)?.icon ?? "dots";
27342
+ }
27343
+ function l() {
27344
+ return { paddingLeft: `${8 + t.row.depth * 14}px` };
27345
+ }
27346
+ return (t, i) => {
27347
+ let u = sy, d = jS;
27348
+ return e.row.kind === "group" ? (H(), L("div", {
27349
+ key: 0,
27350
+ "data-layer-group-id": e.row.group.id,
27351
+ draggable: "true",
27352
+ class: rn(["layers-panel__row group flex cursor-pointer items-center gap-1 border-b border-edge/40 py-1 pr-2 text-[11px] font-medium", o.value ? ["bg-accent-soft"] : ["hover:bg-panel-2"]]),
27353
+ style: on({
27354
+ ...l(),
27355
+ ...e.dropIndicator
27356
+ }),
27357
+ onClick: i[3] ||= (t) => e.api.onGroupClick(t, e.row.group),
27358
+ onDblclick: i[4] ||= (t) => e.api.startRenameGroup(e.row.group),
27359
+ onDragstart: i[5] ||= (t) => e.api.onDragStart(e.row),
27360
+ onDragend: i[6] ||= (...t) => e.api.clearDragState && e.api.clearDragState(...t),
27361
+ onDragover: i[7] ||= (t) => e.api.onDragOver(t, e.row),
27362
+ onContextmenu: i[8] ||= Nn((t) => e.api.onGroupContextMenu(t, e.row.group), ["prevent"])
27363
+ }, [
27364
+ z(u, {
27365
+ variant: "text",
27366
+ shape: "square",
27367
+ size: "small",
27368
+ class: rn(["h-5 w-5 shrink-0 rounded-sm text-ink-dim hover:text-ink", {
27369
+ "text-ink": G(n).elementGroup.isVisible(e.row.group.id),
27370
+ "text-ink-dim/40": !G(n).elementGroup.isVisible(e.row.group.id)
27371
+ }]),
27372
+ title: G(n).elementGroup.isVisible(e.row.group.id) ? G(M)("designer.layersPanel.hideLabel") : G(M)("designer.layersPanel.showLabel"),
27373
+ onClick: i[0] ||= Nn((t) => e.api.execute("elementGroup.toggleFlag", e.row.group.id, "visible"), ["stop"])
27374
+ }, {
27375
+ default: q(() => [z($, {
27376
+ name: G(n).elementGroup.isVisible(e.row.group.id) ? "eye" : "eye-off",
27377
+ class: "mx-auto h-3.5 w-3.5"
27378
+ }, null, 8, ["name"])]),
27379
+ _: 1
27380
+ }, 8, ["class", "title"]),
27381
+ z(u, {
27382
+ variant: "text",
27383
+ shape: "square",
27384
+ size: "small",
27385
+ class: rn(["h-5 w-5 shrink-0 rounded-sm text-ink-dim hover:text-ink", { "text-accent": G(n).elementGroup.isLocked(e.row.group.id) }]),
27386
+ title: G(n).elementGroup.isLocked(e.row.group.id) ? G(M)("designer.layersPanel.unlockLabel") : G(M)("designer.layersPanel.lockLabel"),
27387
+ onClick: i[1] ||= Nn((t) => e.api.execute("elementGroup.toggleFlag", e.row.group.id, "locked"), ["stop"])
27388
+ }, {
27389
+ default: q(() => [z($, {
27390
+ name: G(n).elementGroup.isLocked(e.row.group.id) ? "lock" : "unlock",
27391
+ class: "mx-auto h-3.5 w-3.5"
27392
+ }, null, 8, ["name"])]),
27393
+ _: 1
27394
+ }, 8, ["class", "title"]),
27395
+ z(u, {
27396
+ variant: "text",
27397
+ shape: "square",
27398
+ size: "small",
27399
+ class: "h-5 w-5 shrink-0 rounded-sm text-ink-dim hover:text-ink",
27400
+ title: G(n).elementGroup.isCollapsed(e.row.group.id) ? G(M)("designer.layersPanel.expandGroupLabel") : G(M)("designer.layersPanel.collapseGroupLabel"),
27401
+ onClick: i[2] ||= Nn((t) => e.api.execute("elementGroup.toggleCollapsed", e.row.group.id), ["stop"])
27402
+ }, {
27403
+ default: q(() => [z($, {
27404
+ name: G(n).elementGroup.isCollapsed(e.row.group.id) ? "chevron-right" : "chevron-down",
27405
+ class: "mx-auto h-3.5 w-3.5"
27406
+ }, null, 8, ["name"])]),
27407
+ _: 1
27408
+ }, 8, ["title"]),
27409
+ z($, {
27410
+ name: G(n).elementGroup.isCollapsed(e.row.group.id) ? "folder" : "folder-open",
27411
+ class: "h-3.5 w-3.5 shrink-0 text-accent/85"
27412
+ }, null, 8, ["name"]),
27413
+ a.value ? (H(), F(d, {
27414
+ key: 0,
27415
+ ref: e.api.setRenameInput,
27416
+ "model-value": e.renameText,
27417
+ class: "min-w-0 flex-1",
27418
+ "onUpdate:modelValue": e.api.updateRenameText,
27419
+ onBlur: e.api.commitRename,
27420
+ onClick: e.api.onRenameClick
27421
+ }, null, 8, [
27422
+ "model-value",
27423
+ "onUpdate:modelValue",
27424
+ "onBlur",
27425
+ "onClick"
27426
+ ])) : (H(), L("span", QF, W(e.row.group.name), 1)),
27427
+ R("span", $F, W(G(M)("designer.layersPanel.groupMemberCount", { count: e.row.group.elementIds.length })), 1)
27428
+ ], 46, ZF)) : (H(), L("div", {
27429
+ key: 1,
27430
+ "data-layer-id": e.row.node.id,
27431
+ draggable: "true",
27432
+ class: rn(["layers-panel__row group flex cursor-pointer items-center gap-1 border-b border-edge/40 py-1 pr-2 text-[11px]", [...r.value ? [] : ["hover:bg-panel-2"], ...s.value]]),
27433
+ style: on({
27434
+ ...l(),
27435
+ ...e.dropIndicator
27436
+ }),
27437
+ onClick: i[12] ||= (t) => e.api.onRowClick(t, e.row.node),
27438
+ onDblclick: i[13] ||= (t) => e.api.startRename(e.row.node),
27439
+ onDragstart: i[14] ||= (t) => e.api.onDragStart(e.row),
27440
+ onDragend: i[15] ||= (...t) => e.api.clearDragState && e.api.clearDragState(...t),
27441
+ onDragover: i[16] ||= (t) => e.api.onDragOver(t, e.row),
27442
+ onContextmenu: i[17] ||= Nn((t) => e.api.onRowContextMenu(t, e.row.node), ["prevent"])
27443
+ }, [
27444
+ z(u, {
27445
+ variant: "text",
27446
+ shape: "square",
27447
+ size: "small",
27448
+ class: rn(["h-5 w-5 shrink-0 rounded-sm text-ink-dim hover:text-ink", {
27449
+ "text-ink": e.row.node.visible,
27450
+ "text-ink-dim/40": !e.row.node.visible
27451
+ }]),
27452
+ title: e.row.node.visible ? G(M)("designer.layersPanel.hideLabel") : G(M)("designer.layersPanel.showLabel"),
27453
+ onClick: i[9] ||= Nn((t) => e.api.execute("element.toggleVisibility", e.row.node.id), ["stop"])
27454
+ }, {
27455
+ default: q(() => [z($, {
27456
+ name: e.row.node.visible ? "eye" : "eye-off",
27457
+ class: "mx-auto h-3.5 w-3.5"
27458
+ }, null, 8, ["name"])]),
27459
+ _: 1
27460
+ }, 8, ["class", "title"]),
27461
+ z(u, {
27462
+ variant: "text",
27463
+ shape: "square",
27464
+ size: "small",
27465
+ class: rn(["h-5 w-5 shrink-0 rounded-sm text-ink-dim hover:text-ink", { "text-accent": e.row.node.locked }]),
27466
+ title: e.row.node.locked ? G(M)("designer.layersPanel.unlockLabel") : G(M)("designer.layersPanel.lockLabel"),
27467
+ onClick: i[10] ||= Nn((t) => e.api.execute("element.toggleLock", e.row.node.id), ["stop"])
27468
+ }, {
27469
+ default: q(() => [z($, {
27470
+ name: e.row.node.locked ? "lock" : "unlock",
27471
+ class: "mx-auto h-3.5 w-3.5"
27472
+ }, null, 8, ["name"])]),
27473
+ _: 1
27474
+ }, 8, ["class", "title"]),
27475
+ z($, {
27476
+ name: c(e.row.node.type),
27477
+ class: "h-3.5 w-3.5 shrink-0 text-ink-dim"
27478
+ }, null, 8, ["name"]),
27479
+ e.row.group ? (H(), F(u, {
27480
+ key: 0,
27481
+ variant: "text",
27482
+ shape: "square",
27483
+ size: "small",
27484
+ type: "button",
27485
+ class: "h-5 w-5 shrink-0 rounded-sm text-accent/85 hover:bg-panel-3",
27486
+ title: G(M)("designer.layersPanel.repeatGroupTitle", {
27487
+ groupName: e.row.group.name,
27488
+ collection: e.row.group.collection || G(M)("designer.layersPanel.unboundCollection")
27489
+ }),
27490
+ onClick: i[11] ||= Nn((t) => G(n).selection.set([...e.row.group.elementIds]), ["stop"])
27491
+ }, {
27492
+ default: q(() => [z($, {
27493
+ name: "loop",
27494
+ class: "mx-auto h-3.5 w-3.5"
27495
+ })]),
27496
+ _: 1
27497
+ }, 8, ["title"])) : I("", !0),
27498
+ a.value ? (H(), F(d, {
27499
+ key: 1,
27500
+ ref: e.api.setRenameInput,
27501
+ "model-value": e.renameText,
27502
+ class: "min-w-0 flex-1",
27503
+ "onUpdate:modelValue": e.api.updateRenameText,
27504
+ onBlur: e.api.commitRename,
27505
+ onClick: e.api.onRenameClick
27506
+ }, null, 8, [
27507
+ "model-value",
27508
+ "onUpdate:modelValue",
27509
+ "onBlur",
27510
+ "onClick"
27511
+ ])) : (H(), L("span", {
27512
+ key: 2,
27513
+ class: rn(["min-w-0 flex-1 truncate", { "italic text-ink-dim/60": !e.row.node.visible }])
27514
+ }, W(e.row.node.name), 3)),
27515
+ e.row.node.locked ? (H(), L("span", tI, W(G(M)("designer.layersPanel.lockLabel")), 1)) : I("", !0)
27516
+ ], 46, eI));
27517
+ };
27518
+ }
27519
+ }), [["__scopeId", "data-v-c7146938"]]), rI = { class: "text-[10px] text-ink-dim/70" }, iI = { class: "flex items-center gap-2 border-b border-edge px-3 py-1.5" }, aI = { class: "shrink-0 text-[11px] text-ink-dim" }, oI = { class: "w-8 shrink-0 text-right text-[10px] text-ink-dim" }, sI = {
27316
27520
  key: 0,
27317
27521
  class: "px-3 py-6 text-center text-[11px] text-ink-dim/60"
27318
- }, sI = /* @__PURE__ */ B({
27522
+ }, cI = /* @__PURE__ */ B({
27319
27523
  __name: "layers-panel",
27320
27524
  setup(e) {
27321
- let t = vz().store(), n = vz(), r = U(null), i = U(null), a = P({
27525
+ let t = Ez().store(), n = Ez(), r = U(null), i = U(null), a = {}, o = { boxShadow: "inset 0 0 0 1.5px var(--color-accent)" }, s = { boxShadow: "inset 0 2px 0 0 var(--color-accent)" }, c = { boxShadow: "inset 0 -2px 0 0 var(--color-accent)" }, l = P({
27322
27526
  get: function() {
27323
27527
  return t.selection.renamingId;
27324
27528
  },
27325
27529
  set: function(e) {
27326
27530
  t.selection.setRenamingId(e);
27327
27531
  }
27328
- }), o = U(null), s = U(""), c = U(null);
27532
+ }), u = U(null), d = U(""), f = U(null);
27329
27533
  eP([{
27330
- run: k,
27534
+ run: j,
27331
27535
  shortcut: "Enter"
27332
27536
  }, {
27333
- run: O,
27537
+ run: A,
27334
27538
  shortcut: "Escape"
27335
27539
  }], {
27336
- enabled: () => a.value !== null || o.value !== null,
27540
+ enabled: () => l.value !== null || u.value !== null,
27337
27541
  isolate: !0,
27338
- target: c
27542
+ target: f
27339
27543
  });
27340
- let l = P(() => t.scope.active), u = P(() => l.value?.name ?? ""), d = P(() => {
27341
- let e = l.value;
27544
+ let p = P(() => t.scope.active), m = P(() => p.value?.name ?? ""), h = P(() => {
27545
+ let e = p.value;
27342
27546
  return e ? t.elementGroup.getRows(e.id).map((e) => e.kind === "group" ? {
27343
27547
  depth: e.depth,
27344
27548
  group: e.group,
@@ -27351,67 +27555,73 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
27351
27555
  kind: "element",
27352
27556
  node: e.node
27353
27557
  }) : [];
27354
- }), f = P(() => t.selection.single), p = P(() => f.value !== null), m = P(() => {
27355
- let e = f.value;
27558
+ }), g = P(() => t.selection.single), _ = P(() => g.value !== null), v = P(() => {
27559
+ let e = g.value;
27356
27560
  return e ? e.opacity : 1;
27357
- }), h = P(() => {
27358
- let e = f.value;
27561
+ }), y = P(() => {
27562
+ let e = g.value;
27359
27563
  return e ? `${Math.round(e.opacity * 100)}%` : "—";
27360
- }), g = P(() => t.selection.sameType ? "designer.layersPanel.elementSettingsTitle" : "designer.layersPanel.selectElementForSettingsTitle");
27361
- function _(e) {
27362
- let n = f.value;
27564
+ }), b = P(() => t.selection.sameType ? "designer.layersPanel.elementSettingsTitle" : "designer.layersPanel.selectElementForSettingsTitle"), x = {
27565
+ clearDragState: se,
27566
+ commitRename: j,
27567
+ execute: de,
27568
+ isGroupSelected: C,
27569
+ onDragOver: ie,
27570
+ onDragStart: ne,
27571
+ onGroupClick: E,
27572
+ onGroupContextMenu: le,
27573
+ onRenameClick: ee,
27574
+ onRowClick: T,
27575
+ onRowContextMenu: ce,
27576
+ setRenameInput: k,
27577
+ startRename: D,
27578
+ startRenameGroup: O,
27579
+ updateRenameText: w
27580
+ };
27581
+ function S(e) {
27582
+ let n = g.value;
27363
27583
  n && t.element.update(n.id, { opacity: Number(e) }, { transient: !0 });
27364
27584
  }
27365
- function v(e) {
27366
- return { paddingLeft: `${8 + e * 14}px` };
27367
- }
27368
- function y(e) {
27585
+ function C(e) {
27369
27586
  return e.elementIds.length > 0 && e.elementIds.every((e) => t.selection.has(e));
27370
27587
  }
27371
- function b(e) {
27372
- return Pe(t).get(e)?.icon ?? "dots";
27373
- }
27374
- function x(e) {
27375
- let n = [];
27376
- return t.selection.has(e.id) && n.push("bg-accent-soft"), t.selection.hoverId === e.id && !t.selection.has(e.id) && n.push("bg-panel-2"), n;
27588
+ function w(e) {
27589
+ d.value = e;
27377
27590
  }
27378
- function S(e, n) {
27591
+ function T(e, n) {
27379
27592
  e.ctrlKey || e.metaKey || e.shiftKey ? t.selection.set([n.id], !0) : t.selection.set([n.id]);
27380
27593
  }
27381
- function C(e, n) {
27594
+ function E(e, n) {
27382
27595
  if (!(e.ctrlKey || e.metaKey || e.shiftKey)) {
27383
- le("elementGroup.selectMembers", n.id);
27596
+ de("elementGroup.selectMembers", n.id);
27384
27597
  return;
27385
27598
  }
27386
27599
  let r = n.elementIds.filter((e) => !t.selection.has(e)), i = r.length > 0 ? r : [...n.elementIds];
27387
27600
  t.selection.set(i, !0);
27388
27601
  }
27389
- function w(e) {
27390
- return y(e) ? ["bg-accent-soft"] : ["hover:bg-panel-2"];
27391
- }
27392
- function T(e) {
27393
- o.value = null, a.value = e.id, s.value = e.name;
27602
+ function D(e) {
27603
+ u.value = null, l.value = e.id, d.value = e.name;
27394
27604
  }
27395
- function E(e) {
27396
- a.value = null, o.value = e.id, s.value = e.name;
27605
+ function O(e) {
27606
+ l.value = null, u.value = e.id, d.value = e.name;
27397
27607
  }
27398
- function D(e) {
27608
+ function k(e) {
27399
27609
  if (e && typeof e == "object" && "$el" in e && e.$el instanceof HTMLElement) {
27400
27610
  let t = e.$el.querySelector("input");
27401
- t !== c.value && (c.value = t, t?.focus(), t?.select());
27402
- } else c.value = null;
27611
+ t !== f.value && (f.value = t, t?.focus(), t?.select());
27612
+ } else f.value = null;
27403
27613
  }
27404
- function O() {
27405
- a.value = null, o.value = null;
27614
+ function A() {
27615
+ l.value = null, u.value = null;
27406
27616
  }
27407
- function k() {
27408
- let e = s.value.trim();
27409
- a.value && e && n.commands.invoke("element.setName", a.value, s.value), o.value && e && n.commands.invoke("elementGroup.rename", o.value, e), a.value = null, o.value = null;
27617
+ function j() {
27618
+ let e = d.value.trim();
27619
+ l.value && e && n.commands.invoke("element.setName", l.value, d.value), u.value && e && n.commands.invoke("elementGroup.rename", u.value, e), l.value = null, u.value = null;
27410
27620
  }
27411
- function A(e) {
27621
+ function ee(e) {
27412
27622
  e.e.stopPropagation();
27413
27623
  }
27414
- function j(e) {
27624
+ function te(e) {
27415
27625
  return e.kind === "group" ? {
27416
27626
  id: e.group.id,
27417
27627
  kind: "group"
@@ -27420,41 +27630,41 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
27420
27630
  kind: "element"
27421
27631
  };
27422
27632
  }
27423
- function ee(e) {
27424
- r.value = j(e);
27633
+ function ne(e) {
27634
+ r.value = te(e);
27425
27635
  }
27426
- function te(e, n) {
27636
+ function re(e, n) {
27427
27637
  let r = n.currentTarget.getBoundingClientRect(), i = (n.clientY - r.top) / r.height;
27428
27638
  return e.kind === "element" ? i > .5 ? "below" : "above" : i < .25 ? "above" : i > .75 && t.elementGroup.isCollapsed(e.group.id) ? "below" : "inside";
27429
27639
  }
27430
- function ne(e, t) {
27640
+ function ie(e, t) {
27431
27641
  r.value && (i.value = {
27432
- placement: te(t, e),
27642
+ placement: re(t, e),
27433
27643
  rowKey: t.key
27434
27644
  });
27435
27645
  }
27436
- function re(e) {
27437
- return i.value?.rowKey === e.key ? i.value.placement === "inside" ? { boxShadow: "inset 0 0 0 1.5px #4f7cff" } : i.value.placement === "below" ? { boxShadow: "inset 0 -2px 0 0 #4f7cff" } : { boxShadow: "inset 0 2px 0 0 #4f7cff" } : {};
27646
+ function ae(e) {
27647
+ return i.value?.rowKey === e.key ? i.value.placement === "inside" ? o : i.value.placement === "below" ? c : s : a;
27438
27648
  }
27439
- function ie() {
27440
- let e = r.value, a = t.scope.active, o = i.value, s = d.value.find((e) => e.key === o?.rowKey);
27441
- e && a && o && s && n.commands.invoke("element.moveLayerNodes", a.id, [e], j(s), o.placement), ae();
27649
+ function oe() {
27650
+ let e = r.value, a = t.scope.active, o = i.value, s = h.value.find((e) => e.key === o?.rowKey);
27651
+ e && a && o && s && n.commands.invoke("element.moveLayerNodes", a.id, [e], te(s), o.placement), se();
27442
27652
  }
27443
- function ae() {
27653
+ function se() {
27444
27654
  r.value = null, i.value = null;
27445
27655
  }
27446
- function oe(e, r) {
27656
+ function ce(e, r) {
27447
27657
  t.selection.has(r.id) || t.selection.set([r.id]), t.ui.openContextMenu(e.clientX, e.clientY, [
27448
- ...ce(["element.openSettings", "element.rename"]),
27658
+ ...ue(["element.openSettings", "element.rename"]),
27449
27659
  { type: "divider" },
27450
- ...ce([
27660
+ ...ue([
27451
27661
  "element.bringFront",
27452
27662
  "element.bringForward",
27453
27663
  "element.sendBackward",
27454
27664
  "element.sendBack"
27455
27665
  ]),
27456
27666
  { type: "divider" },
27457
- ...ce(["element.group", "element.ungroup"]),
27667
+ ...ue(["element.group", "element.ungroup"]),
27458
27668
  { type: "divider" },
27459
27669
  ...XF(n.commands, [
27460
27670
  {
@@ -27469,77 +27679,77 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
27469
27679
  args: [r.id],
27470
27680
  id: "edit.delete"
27471
27681
  }
27472
- ], le)
27682
+ ], de)
27473
27683
  ]);
27474
27684
  }
27475
- function se(e, n) {
27476
- y(n) || le("elementGroup.selectMembers", n.id);
27685
+ function le(e, n) {
27686
+ C(n) || de("elementGroup.selectMembers", n.id);
27477
27687
  let r = t.elementGroup.isVisible(n.id), i = t.elementGroup.isLocked(n.id);
27478
27688
  t.ui.openContextMenu(e.clientX, e.clientY, [
27479
27689
  qF(M("designer.builtins.renameTitle"), () => {
27480
- E(n);
27690
+ O(n);
27481
27691
  }, { icon: "rename" }),
27482
- qF(M("designer.layersPanel.ungroupLabel"), () => le("elementGroup.ungroup", n.id), { icon: "folder-open" }),
27692
+ qF(M("designer.layersPanel.ungroupLabel"), () => de("elementGroup.ungroup", n.id), { icon: "folder-open" }),
27483
27693
  KF(),
27484
- ...ce([
27694
+ ...ue([
27485
27695
  "element.bringFront",
27486
27696
  "element.bringForward",
27487
27697
  "element.sendBackward",
27488
27698
  "element.sendBack"
27489
27699
  ]),
27490
27700
  KF(),
27491
- qF(M(i ? "designer.layersPanel.unlockLabel" : "designer.layersPanel.lockLabel"), () => le("elementGroup.toggleFlag", n.id, "locked"), { icon: i ? "unlock" : "lock" }),
27492
- qF(M(r ? "designer.layersPanel.hideLabel" : "designer.layersPanel.showLabel"), () => le("elementGroup.toggleFlag", n.id, "visible"), { icon: r ? "eye-off" : "eye" }),
27701
+ qF(M(i ? "designer.layersPanel.unlockLabel" : "designer.layersPanel.lockLabel"), () => de("elementGroup.toggleFlag", n.id, "locked"), { icon: i ? "unlock" : "lock" }),
27702
+ qF(M(r ? "designer.layersPanel.hideLabel" : "designer.layersPanel.showLabel"), () => de("elementGroup.toggleFlag", n.id, "visible"), { icon: r ? "eye-off" : "eye" }),
27493
27703
  KF(),
27494
- qF(M("designer.layersPanel.groupDeleteLabel"), () => le("elementGroup.remove", n.id, !0), {
27704
+ qF(M("designer.layersPanel.groupDeleteLabel"), () => de("elementGroup.remove", n.id, !0), {
27495
27705
  danger: !0,
27496
27706
  icon: "trash"
27497
27707
  })
27498
27708
  ]);
27499
27709
  }
27500
- function ce(e) {
27501
- return XF(n.commands, e, le);
27710
+ function ue(e) {
27711
+ return XF(n.commands, e, de);
27502
27712
  }
27503
- function le(e, ...t) {
27713
+ function de(e, ...t) {
27504
27714
  n.commands.dispatch(e, ...t);
27505
27715
  }
27506
- return K(a, (e) => {
27507
- s.value = e ? t.element.get(e)?.name ?? "" : "";
27716
+ return K(l, (e) => {
27717
+ d.value = e ? t.element.get(e)?.name ?? "" : "";
27508
27718
  }, { flush: "sync" }), (e, n) => {
27509
- let r = dA, i = sy, c = jS;
27719
+ let r = dA, i = sy;
27510
27720
  return H(), F(ZN, {
27511
27721
  class: "min-h-[160px]",
27512
27722
  "panel-id": "layers",
27513
27723
  title: G(M)("designer.layersPanel.panelTitle")
27514
27724
  }, {
27515
- actions: q(() => [R("span", ZF, W(u.value), 1)]),
27516
- default: q(() => [R("div", QF, [
27517
- R("span", $F, W(G(M)("designer.layersPanel.opacityLabel")), 1),
27725
+ actions: q(() => [R("span", rI, W(m.value), 1)]),
27726
+ default: q(() => [R("div", iI, [
27727
+ R("span", aI, W(G(M)("designer.layersPanel.opacityLabel")), 1),
27518
27728
  z(r, {
27519
27729
  min: 0,
27520
27730
  max: 1,
27521
27731
  step: .05,
27522
- value: m.value,
27523
- disabled: !p.value,
27732
+ value: v.value,
27733
+ disabled: !_.value,
27524
27734
  class: "min-w-0 flex-1",
27525
27735
  "aria-label": G(M)("designer.layersPanel.opacityLabel"),
27526
- onChange: _,
27736
+ onChange: S,
27527
27737
  onChangeEnd: n[0] ||= (e) => G(t).history.commit()
27528
27738
  }, null, 8, [
27529
27739
  "value",
27530
27740
  "disabled",
27531
27741
  "aria-label"
27532
27742
  ]),
27533
- R("span", eI, W(h.value), 1),
27743
+ R("span", oI, W(y.value), 1),
27534
27744
  z(i, {
27535
27745
  variant: "text",
27536
27746
  shape: "square",
27537
27747
  size: "small",
27538
27748
  type: "button",
27539
27749
  class: rn(["flex h-5 w-5 shrink-0 items-center justify-center rounded-sm text-ink-dim hover:bg-panel-3 hover:text-ink disabled:cursor-not-allowed disabled:hover:bg-transparent disabled:hover:text-ink-dim", { "opacity-40": !G(t).selection.sameType }]),
27540
- title: G(M)(g.value),
27750
+ title: G(M)(b.value),
27541
27751
  disabled: !G(t).selection.sameType,
27542
- onClick: n[1] ||= (e) => le("element.openSettings")
27752
+ onClick: n[1] ||= (e) => de("element.openSettings")
27543
27753
  }, {
27544
27754
  default: q(() => [z($, {
27545
27755
  name: "sliders",
@@ -27553,230 +27763,74 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
27553
27763
  ])
27554
27764
  ]), R("div", {
27555
27765
  class: "min-h-0 flex-1 overflow-y-auto",
27556
- onDragover: n[4] ||= Nn(() => {}, ["prevent"]),
27557
- onDrop: ie
27558
- }, [(H(!0), L(N, null, gn(d.value, (e) => (H(), L(N, { key: e.key }, [e.kind === "group" ? (H(), L("div", {
27559
- key: 0,
27560
- "data-layer-group-id": e.group.id,
27561
- draggable: "true",
27562
- class: rn(["group flex cursor-pointer items-center gap-1 border-b border-edge/40 py-1 pr-2 text-[11px] font-medium", w(e.group)]),
27563
- style: on({
27564
- ...v(e.depth),
27565
- ...re(e)
27566
- }),
27567
- onClick: (t) => C(t, e.group),
27568
- onDblclick: (t) => E(e.group),
27569
- onDragstart: (t) => ee(e),
27570
- onDragend: ae,
27571
- onDragover: (t) => ne(t, e),
27572
- onContextmenu: Nn((t) => se(t, e.group), ["prevent"])
27573
- }, [
27574
- z(i, {
27575
- variant: "text",
27576
- shape: "square",
27577
- size: "small",
27578
- class: rn(["h-5 w-5 shrink-0 rounded-sm text-ink-dim hover:text-ink", {
27579
- "text-ink": G(t).elementGroup.isVisible(e.group.id),
27580
- "text-ink-dim/40": !G(t).elementGroup.isVisible(e.group.id)
27581
- }]),
27582
- title: G(t).elementGroup.isVisible(e.group.id) ? G(M)("designer.layersPanel.hideLabel") : G(M)("designer.layersPanel.showLabel"),
27583
- onClick: Nn((t) => le("elementGroup.toggleFlag", e.group.id, "visible"), ["stop"])
27584
- }, {
27585
- default: q(() => [z($, {
27586
- name: G(t).elementGroup.isVisible(e.group.id) ? "eye" : "eye-off",
27587
- class: "mx-auto h-3.5 w-3.5"
27588
- }, null, 8, ["name"])]),
27589
- _: 2
27590
- }, 1032, [
27591
- "class",
27592
- "title",
27593
- "onClick"
27594
- ]),
27595
- z(i, {
27596
- variant: "text",
27597
- shape: "square",
27598
- size: "small",
27599
- class: rn(["h-5 w-5 shrink-0 rounded-sm text-ink-dim hover:text-ink", { "text-accent": G(t).elementGroup.isLocked(e.group.id) }]),
27600
- title: G(t).elementGroup.isLocked(e.group.id) ? G(M)("designer.layersPanel.unlockLabel") : G(M)("designer.layersPanel.lockLabel"),
27601
- onClick: Nn((t) => le("elementGroup.toggleFlag", e.group.id, "locked"), ["stop"])
27602
- }, {
27603
- default: q(() => [z($, {
27604
- name: G(t).elementGroup.isLocked(e.group.id) ? "lock" : "unlock",
27605
- class: "mx-auto h-3.5 w-3.5"
27606
- }, null, 8, ["name"])]),
27607
- _: 2
27608
- }, 1032, [
27609
- "class",
27610
- "title",
27611
- "onClick"
27612
- ]),
27613
- z(i, {
27614
- variant: "text",
27615
- shape: "square",
27616
- size: "small",
27617
- class: "h-5 w-5 shrink-0 rounded-sm text-ink-dim hover:text-ink",
27618
- title: G(t).elementGroup.isCollapsed(e.group.id) ? G(M)("designer.layersPanel.expandGroupLabel") : G(M)("designer.layersPanel.collapseGroupLabel"),
27619
- onClick: Nn((t) => le("elementGroup.toggleCollapsed", e.group.id), ["stop"])
27620
- }, {
27621
- default: q(() => [z($, {
27622
- name: G(t).elementGroup.isCollapsed(e.group.id) ? "chevron-right" : "chevron-down",
27623
- class: "mx-auto h-3.5 w-3.5"
27624
- }, null, 8, ["name"])]),
27625
- _: 2
27626
- }, 1032, ["title", "onClick"]),
27627
- z($, {
27628
- name: G(t).elementGroup.isCollapsed(e.group.id) ? "folder" : "folder-open",
27629
- class: "h-3.5 w-3.5 shrink-0 text-accent/85"
27630
- }, null, 8, ["name"]),
27631
- o.value === e.group.id ? (H(), F(c, {
27632
- key: 0,
27633
- ref_for: !0,
27634
- ref: D,
27635
- modelValue: s.value,
27636
- "onUpdate:modelValue": n[2] ||= (e) => s.value = e,
27637
- class: "min-w-0 flex-1",
27638
- onBlur: k,
27639
- onClick: A
27640
- }, null, 8, ["modelValue"])) : (H(), L("span", nI, W(e.group.name), 1)),
27641
- R("span", rI, W(G(M)("designer.layersPanel.groupMemberCount", { count: e.group.elementIds.length })), 1)
27642
- ], 46, tI)) : (H(), L("div", {
27643
- key: 1,
27644
- "data-layer-id": e.node.id,
27645
- draggable: "true",
27646
- class: rn(["group flex cursor-pointer items-center gap-1 border-b border-edge/40 py-1 pr-2 text-[11px]", [...G(t).selection.has(e.node.id) ? [] : ["hover:bg-panel-2"], ...x(e.node)]]),
27647
- style: on({
27648
- ...v(e.depth),
27649
- ...re(e)
27650
- }),
27651
- onClick: (t) => S(t, e.node),
27652
- onDblclick: (t) => T(e.node),
27653
- onDragstart: (t) => ee(e),
27654
- onDragend: ae,
27655
- onDragover: (t) => ne(t, e),
27656
- onContextmenu: Nn((t) => oe(t, e.node), ["prevent"])
27657
- }, [
27658
- z(i, {
27659
- variant: "text",
27660
- shape: "square",
27661
- size: "small",
27662
- class: rn(["h-5 w-5 shrink-0 rounded-sm text-ink-dim hover:text-ink", {
27663
- "text-ink": e.node.visible,
27664
- "text-ink-dim/40": !e.node.visible
27665
- }]),
27666
- title: e.node.visible ? G(M)("designer.layersPanel.hideLabel") : G(M)("designer.layersPanel.showLabel"),
27667
- onClick: Nn((t) => le("element.toggleVisibility", e.node.id), ["stop"])
27668
- }, {
27669
- default: q(() => [z($, {
27670
- name: e.node.visible ? "eye" : "eye-off",
27671
- class: "mx-auto h-3.5 w-3.5"
27672
- }, null, 8, ["name"])]),
27673
- _: 2
27674
- }, 1032, [
27675
- "class",
27676
- "title",
27677
- "onClick"
27678
- ]),
27679
- z(i, {
27680
- variant: "text",
27681
- shape: "square",
27682
- size: "small",
27683
- class: rn(["h-5 w-5 shrink-0 rounded-sm text-ink-dim hover:text-ink", { "text-accent": e.node.locked }]),
27684
- title: e.node.locked ? G(M)("designer.layersPanel.unlockLabel") : G(M)("designer.layersPanel.lockLabel"),
27685
- onClick: Nn((t) => le("element.toggleLock", e.node.id), ["stop"])
27686
- }, {
27687
- default: q(() => [z($, {
27688
- name: e.node.locked ? "lock" : "unlock",
27689
- class: "mx-auto h-3.5 w-3.5"
27690
- }, null, 8, ["name"])]),
27691
- _: 2
27692
- }, 1032, [
27693
- "class",
27694
- "title",
27695
- "onClick"
27696
- ]),
27697
- z($, {
27698
- name: b(e.node.type),
27699
- class: "h-3.5 w-3.5 shrink-0 text-ink-dim"
27700
- }, null, 8, ["name"]),
27701
- e.group ? (H(), F(i, {
27702
- key: 0,
27703
- variant: "text",
27704
- shape: "square",
27705
- size: "small",
27706
- type: "button",
27707
- class: "h-5 w-5 shrink-0 rounded-sm text-accent/85 hover:bg-panel-3",
27708
- title: G(M)("designer.layersPanel.repeatGroupTitle", {
27709
- groupName: e.group.name,
27710
- collection: e.group.collection || G(M)("designer.layersPanel.unboundCollection")
27711
- }),
27712
- onClick: Nn((n) => G(t).selection.set([...e.group.elementIds]), ["stop"])
27713
- }, {
27714
- default: q(() => [z($, {
27715
- name: "loop",
27716
- class: "mx-auto h-3.5 w-3.5"
27717
- })]),
27718
- _: 1
27719
- }, 8, ["title", "onClick"])) : I("", !0),
27720
- a.value === e.node.id ? (H(), F(c, {
27721
- key: 1,
27722
- ref_for: !0,
27723
- ref: D,
27724
- modelValue: s.value,
27725
- "onUpdate:modelValue": n[3] ||= (e) => s.value = e,
27726
- class: "min-w-0 flex-1",
27727
- onBlur: k,
27728
- onClick: A
27729
- }, null, 8, ["modelValue"])) : (H(), L("span", {
27730
- key: 2,
27731
- class: rn(["min-w-0 flex-1 truncate", { "italic text-ink-dim/60": !e.node.visible }])
27732
- }, W(e.node.name), 3)),
27733
- e.node.locked ? (H(), L("span", aI, W(G(M)("designer.layersPanel.lockLabel")), 1)) : I("", !0)
27734
- ], 46, iI))], 64))), 128)), d.value.length === 0 ? (H(), L("div", oI, W(G(M)("designer.layersPanel.noElementsMessage")), 1)) : I("", !0)], 32)]),
27766
+ onDragover: n[2] ||= Nn(() => {}, ["prevent"]),
27767
+ onDrop: oe
27768
+ }, [(H(!0), L(N, null, gn(h.value, (e) => (H(), F(nI, {
27769
+ key: e.key,
27770
+ api: x,
27771
+ "drop-indicator": ae(e),
27772
+ "rename-text": d.value,
27773
+ "renaming-group-id": u.value,
27774
+ row: e
27775
+ }, null, 8, [
27776
+ "drop-indicator",
27777
+ "rename-text",
27778
+ "renaming-group-id",
27779
+ "row"
27780
+ ]))), 128)), h.value.length === 0 ? (H(), L("div", sI, W(G(M)("designer.layersPanel.noElementsMessage")), 1)) : I("", !0)], 32)]),
27735
27781
  _: 1
27736
27782
  }, 8, ["title"]);
27737
27783
  };
27738
27784
  }
27739
- }), cI = { class: "flex shrink-0 flex-col pb-2" }, lI = ["title", "aria-label"], uI = ["title", "aria-label"], dI = ["data-template-id", "onContextmenu"], fI = ["title"], pI = {
27785
+ }), lI = { class: "pages-panel flex shrink-0 flex-col pb-2" }, uI = ["title", "aria-label"], dI = ["title", "aria-label"], fI = ["data-template-id", "onContextmenu"], pI = { class: "pages-panel__identity" }, mI = ["title"], hI = { class: "pages-panel__detail truncate text-[10px] text-ink-dim/80" }, gI = { class: "pages-panel__template-status" }, _I = {
27740
27786
  key: 0,
27741
- class: "shrink-0 rounded-sm bg-panel-3 px-1 py-px text-[9px] text-ink-dim"
27742
- }, mI = { class: "shrink-0 text-[10px] text-ink-dim/80" }, hI = [
27787
+ class: "rounded-sm bg-panel-3 px-1 py-px text-[9px] text-ink-dim"
27788
+ }, vI = { class: "pages-panel__actions" }, yI = [
27743
27789
  "title",
27744
27790
  "aria-label",
27745
27791
  "onClick"
27746
- ], gI = [
27792
+ ], bI = [
27747
27793
  "title",
27748
27794
  "aria-label",
27749
27795
  "onClick"
27750
- ], _I = [
27796
+ ], xI = [
27751
27797
  "title",
27752
27798
  "aria-label",
27753
27799
  "onClick"
27754
- ], vI = ["title", "aria-label"], yI = [
27800
+ ], SI = [
27801
+ "title",
27802
+ "aria-label",
27803
+ "onClick"
27804
+ ], CI = ["title", "aria-label"], wI = [
27755
27805
  "data-page-row",
27756
27806
  "onClick",
27757
27807
  "onDblclick",
27758
27808
  "onContextmenu"
27759
- ], bI = { class: "w-4 shrink-0 text-right text-[10px] text-ink-dim/70" }, xI = ["title"], SI = { class: "shrink-0 text-[10px] text-ink-dim/60" }, CI = ["title"], wI = [
27809
+ ], TI = { class: "pages-panel__identity" }, EI = { class: "w-4 shrink-0 text-right text-[10px] text-ink-dim/70" }, DI = ["title"], OI = { class: "pages-panel__detail truncate text-[10px] text-ink-dim/60" }, kI = ["title"], AI = { class: "pages-panel__actions" }, jI = [
27760
27810
  "title",
27761
27811
  "aria-label",
27762
27812
  "onClick"
27763
- ], TI = [
27813
+ ], MI = [
27764
27814
  "title",
27765
27815
  "aria-label",
27766
27816
  "onClick"
27767
- ], EI = [
27817
+ ], NI = [
27768
27818
  "title",
27769
27819
  "aria-label",
27770
27820
  "onClick"
27771
- ], DI = [
27821
+ ], PI = [
27772
27822
  "title",
27773
27823
  "aria-label",
27774
27824
  "disabled",
27775
27825
  "onClick"
27776
- ], OI = /* @__PURE__ */ B({
27826
+ ], FI = [
27827
+ "title",
27828
+ "aria-label",
27829
+ "onClick"
27830
+ ], II = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
27777
27831
  __name: "pages-panel",
27778
27832
  setup(e) {
27779
- let t = vz(), n = t.store(), r = P(() => {
27833
+ let t = Ez(), n = t.store(), r = P(() => {
27780
27834
  let e = i.value;
27781
27835
  return e ? n.template.list.find((t) => t.id === e) : null;
27782
27836
  }), i = U(null), a = P(() => n.template.list.map((e) => ({
@@ -27830,7 +27884,20 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
27830
27884
  function _(e) {
27831
27885
  c("page.remove", e);
27832
27886
  }
27833
- function v(e, r) {
27887
+ function v(e) {
27888
+ if (e.type === "click" && e.currentTarget instanceof HTMLElement) {
27889
+ let t = e.currentTarget.getBoundingClientRect();
27890
+ return {
27891
+ x: t.left,
27892
+ y: t.bottom
27893
+ };
27894
+ }
27895
+ return {
27896
+ x: e.clientX,
27897
+ y: e.clientY
27898
+ };
27899
+ }
27900
+ function y(e, r) {
27834
27901
  let i = XF(t.commands, [
27835
27902
  "file.pageSetup",
27836
27903
  "page.applyTemplate",
@@ -27840,10 +27907,10 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
27840
27907
  ].map((e) => ({
27841
27908
  args: [r],
27842
27909
  id: e
27843
- })), c);
27844
- n.ui.openContextMenu(e.clientX, e.clientY, i);
27910
+ })), c), a = v(e);
27911
+ n.ui.openContextMenu(a.x, a.y, i);
27845
27912
  }
27846
- function y(e, r) {
27913
+ function b(e, r) {
27847
27914
  let i = n.template.list.find((e) => e.id === r);
27848
27915
  if (!i) return;
27849
27916
  let a = ["template.enterEdit", "template.applyRange"];
@@ -27853,8 +27920,8 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
27853
27920
  id: e
27854
27921
  })), (e, ...t) => {
27855
27922
  e === "template.remove" ? m(r) : c(e, ...t);
27856
- });
27857
- n.ui.openContextMenu(e.clientX, e.clientY, o);
27923
+ }), s = v(e);
27924
+ n.ui.openContextMenu(s.x, s.y, o);
27858
27925
  }
27859
27926
  return (e, t) => {
27860
27927
  let s = rP;
@@ -27862,7 +27929,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
27862
27929
  "panel-id": "pages",
27863
27930
  title: G(M)("designer.pagesPanel.panelTitle")
27864
27931
  }, {
27865
- default: q(() => [R("div", cI, [z(JN, { title: G(M)("designer.pagesPanel.templatesSection") }, {
27932
+ default: q(() => [R("div", lI, [z(JN, { title: G(M)("designer.pagesPanel.templatesSection") }, {
27866
27933
  actions: q(() => [R("button", {
27867
27934
  type: "button",
27868
27935
  class: "flex h-5 w-5 items-center justify-center rounded-sm text-ink-dim hover:bg-panel-3 hover:text-ink",
@@ -27872,7 +27939,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
27872
27939
  }, [z($, {
27873
27940
  name: "template",
27874
27941
  class: "h-3.5 w-3.5"
27875
- })], 8, lI), R("button", {
27942
+ })], 8, uI), R("button", {
27876
27943
  type: "button",
27877
27944
  class: "flex h-5 w-5 items-center justify-center rounded-sm text-ink-dim hover:bg-panel-3 hover:text-ink",
27878
27945
  title: G(M)("designer.pagesPanel.addTemplateTitle"),
@@ -27882,55 +27949,68 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
27882
27949
  }, [z($, {
27883
27950
  name: "plus",
27884
27951
  class: "h-3.5 w-3.5"
27885
- })], 8, uI)]),
27952
+ })], 8, dI)]),
27886
27953
  default: q(() => [(H(!0), L(N, null, gn(a.value, (e) => (H(), L("div", {
27887
27954
  key: e.id,
27888
27955
  "data-template-id": e.id,
27889
- class: rn(["group flex items-center gap-1.5 border-b border-edge/40 px-2 py-1 text-[11px] hover:bg-panel-2", { "bg-accent-soft": e.editing }]),
27890
- onContextmenu: Nn((t) => y(t, e.id), ["stop", "prevent"])
27956
+ class: rn(["pages-panel__row pages-panel__template-row group border-b border-edge/40 px-2 py-1 text-[11px] hover:bg-panel-2", { "bg-accent-soft": e.editing }]),
27957
+ onContextmenu: Nn((t) => b(t, e.id), ["stop", "prevent"])
27891
27958
  }, [
27892
- z($, {
27959
+ R("div", pI, [z($, {
27893
27960
  name: "template",
27894
- class: rn(["h-3.5 w-3.5 shrink-0", e.editing ? "text-accent" : "text-ink-dim"])
27895
- }, null, 8, ["class"]),
27896
- R("span", {
27897
- class: rn(["min-w-0 flex-1 cursor-default truncate", { "text-accent": e.editing }]),
27961
+ class: rn(["h-3.5 w-4 shrink-0", e.editing ? "text-accent" : "text-ink-dim"])
27962
+ }, null, 8, ["class"]), R("span", {
27963
+ class: rn(["pages-panel__name cursor-default truncate", { "text-accent": e.editing }]),
27898
27964
  title: e.name
27899
- }, W(e.name), 11, fI),
27900
- e.builtin ? (H(), L("span", pI, W(G(M)("designer.pagesPanel.builtinBadge")), 1)) : I("", !0),
27901
- R("span", mI, W(G(M)("designer.pagesPanel.usageCount", { count: e.usage })), 1),
27902
- R("button", {
27903
- type: "button",
27904
- class: "flex h-5 w-5 shrink-0 items-center justify-center rounded-sm text-ink-dim opacity-0 hover:bg-panel-3 hover:text-ink group-hover:opacity-100",
27905
- title: G(M)("designer.pagesPanel.editTemplateTitle"),
27906
- "aria-label": G(M)("designer.pagesPanel.editTemplateTitle"),
27907
- onClick: (t) => f(e.id)
27908
- }, [z($, {
27909
- name: "rename",
27910
- class: "h-3.5 w-3.5"
27911
- })], 8, hI),
27912
- R("button", {
27913
- type: "button",
27914
- class: "flex h-5 w-5 shrink-0 items-center justify-center rounded-sm text-ink-dim opacity-0 hover:bg-panel-3 hover:text-ink group-hover:opacity-100",
27915
- title: G(M)("designer.pagesPanel.applyRangeTitle"),
27916
- "aria-label": G(M)("designer.pagesPanel.applyRangeTitle"),
27917
- onClick: (t) => p(e.id)
27918
- }, [z($, {
27919
- name: "apply-template",
27920
- class: "h-3.5 w-3.5"
27921
- })], 8, gI),
27922
- e.builtin ? I("", !0) : (H(), L("button", {
27923
- key: 1,
27924
- type: "button",
27925
- class: "flex h-5 w-5 shrink-0 items-center justify-center rounded-sm text-ink-dim opacity-0 hover:bg-panel-3 hover:text-danger group-hover:opacity-100",
27926
- title: G(M)("designer.pagesPanel.removeTemplateTitle"),
27927
- "aria-label": G(M)("designer.pagesPanel.removeTemplateTitle"),
27928
- onClick: (t) => m(e.id)
27929
- }, [z($, {
27930
- name: "trash",
27931
- class: "h-3.5 w-3.5"
27932
- })], 8, _I))
27933
- ], 42, dI))), 128))]),
27965
+ }, W(e.name), 11, mI)]),
27966
+ R("span", hI, W(G(M)("designer.pagesPanel.usageCount", { count: e.usage })), 1),
27967
+ R("div", gI, [e.builtin ? (H(), L("span", _I, W(G(M)("designer.pagesPanel.builtinBadge")), 1)) : I("", !0)]),
27968
+ R("div", vI, [
27969
+ R("button", {
27970
+ type: "button",
27971
+ class: "pages-panel__action flex h-5 w-5 shrink-0 items-center justify-center rounded-sm text-ink-dim opacity-0 hover:bg-panel-3 hover:text-ink group-hover:opacity-100",
27972
+ title: G(M)("designer.pagesPanel.editTemplateTitle"),
27973
+ "aria-label": G(M)("designer.pagesPanel.editTemplateTitle"),
27974
+ onClick: (t) => f(e.id)
27975
+ }, [z($, {
27976
+ name: "rename",
27977
+ class: "h-3.5 w-3.5"
27978
+ })], 8, yI),
27979
+ R("button", {
27980
+ type: "button",
27981
+ class: "pages-panel__action flex h-5 w-5 shrink-0 items-center justify-center rounded-sm text-ink-dim opacity-0 hover:bg-panel-3 hover:text-ink group-hover:opacity-100",
27982
+ title: G(M)("designer.pagesPanel.applyRangeTitle"),
27983
+ "aria-label": G(M)("designer.pagesPanel.applyRangeTitle"),
27984
+ onClick: (t) => p(e.id)
27985
+ }, [z($, {
27986
+ name: "apply-template",
27987
+ class: "h-3.5 w-3.5"
27988
+ })], 8, bI),
27989
+ e.builtin ? I("", !0) : (H(), L("button", {
27990
+ key: 0,
27991
+ type: "button",
27992
+ class: "pages-panel__action flex h-5 w-5 shrink-0 items-center justify-center rounded-sm text-ink-dim opacity-0 hover:bg-panel-3 hover:text-danger group-hover:opacity-100",
27993
+ title: G(M)("designer.pagesPanel.removeTemplateTitle"),
27994
+ "aria-label": G(M)("designer.pagesPanel.removeTemplateTitle"),
27995
+ onClick: (t) => m(e.id)
27996
+ }, [z($, {
27997
+ name: "trash",
27998
+ class: "h-3.5 w-3.5"
27999
+ })], 8, xI)),
28000
+ R("button", {
28001
+ type: "button",
28002
+ class: "pages-panel__more h-5 w-5 shrink-0 items-center justify-center rounded-sm text-ink-dim hover:bg-panel-3 hover:text-ink",
28003
+ title: G(M)("designer.pagesPanel.moreActionsTitle"),
28004
+ "aria-label": G(M)("designer.pagesPanel.moreActionsTitle"),
28005
+ "aria-haspopup": "menu",
28006
+ onClick: Nn((t) => b(t, e.id), ["stop"]),
28007
+ onDblclick: t[0] ||= Nn(() => {}, ["stop"])
28008
+ }, [z($, {
28009
+ name: "dots",
28010
+ class: "h-3.5 w-3.5 rotate-90"
28011
+ })], 40, SI)
28012
+ ])
28013
+ ], 42, fI))), 128))]),
27934
28014
  _: 1
27935
28015
  }, 8, ["title"]), z(JN, { title: G(M)("designer.pagesPanel.pagesSection") }, {
27936
28016
  actions: q(() => [R("button", {
@@ -27938,71 +28018,84 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
27938
28018
  class: "flex h-5 w-5 items-center justify-center rounded-sm text-ink-dim hover:bg-panel-3 hover:text-ink",
27939
28019
  title: G(M)("designer.builtins.addPageTitle"),
27940
28020
  "aria-label": G(M)("designer.builtins.addPageTitle"),
27941
- onClick: t[0] ||= (e) => c("page.add")
28021
+ onClick: t[1] ||= (e) => c("page.add")
27942
28022
  }, [z($, {
27943
28023
  name: "plus",
27944
28024
  class: "h-3.5 w-3.5"
27945
- })], 8, vI)]),
28025
+ })], 8, CI)]),
27946
28026
  default: q(() => [(H(!0), L(N, null, gn(o.value, (e) => (H(), L("div", {
27947
28027
  key: e.id,
27948
28028
  "data-page-row": e.id,
27949
- class: rn(["group flex cursor-pointer items-center gap-1.5 border-b border-edge/40 px-2 py-1 text-[11px]", e.active ? "bg-accent-soft" : "hover:bg-panel-2"]),
28029
+ class: rn(["pages-panel__row pages-panel__page-row group cursor-pointer border-b border-edge/40 px-2 py-1 text-[11px]", e.active ? "bg-accent-soft" : "hover:bg-panel-2"]),
27950
28030
  onClick: (t) => l(e.id),
27951
28031
  onDblclick: (t) => c("file.pageSetup", e.id),
27952
- onContextmenu: Nn((t) => v(t, e.id), ["stop", "prevent"])
28032
+ onContextmenu: Nn((t) => y(t, e.id), ["stop", "prevent"])
27953
28033
  }, [
27954
- R("span", bI, W(e.index + 1), 1),
27955
- R("span", {
27956
- class: rn(["min-w-0 flex-1 truncate", { "text-accent": e.active }]),
28034
+ R("div", TI, [R("span", EI, W(e.index + 1), 1), R("span", {
28035
+ class: rn(["pages-panel__name truncate", { "text-accent": e.active }]),
27957
28036
  title: e.name
27958
- }, W(e.name), 11, xI),
27959
- R("span", SI, W(e.sizeText), 1),
28037
+ }, W(e.name), 11, DI)]),
28038
+ R("span", OI, W(e.sizeText), 1),
27960
28039
  R("span", {
27961
- class: rn(["max-w-[86px] shrink-0 truncate rounded-sm px-1 py-px text-[9px]", e.usesCustomTemplate ? "bg-accent-soft text-accent" : "bg-panel-3 text-ink-dim"]),
28040
+ class: rn(["pages-panel__applied-template truncate rounded-sm px-1 py-px text-[9px]", e.usesCustomTemplate ? "bg-accent-soft text-accent" : "bg-panel-3 text-ink-dim"]),
27962
28041
  title: G(M)("designer.pagesPanel.appliedTemplateTitle", { templateName: e.templateName })
27963
- }, W(e.templateName), 11, CI),
27964
- R("button", {
27965
- type: "button",
27966
- class: "flex h-5 w-5 shrink-0 items-center justify-center rounded-sm text-ink-dim opacity-0 hover:bg-panel-3 hover:text-ink group-hover:opacity-100",
27967
- title: G(M)("designer.pagesPanel.applyTemplateTitle"),
27968
- "aria-label": G(M)("designer.pagesPanel.applyTemplateTitle"),
27969
- onClick: Nn((t) => g(e.id), ["stop"])
27970
- }, [z($, {
27971
- name: "apply-template",
27972
- class: "h-3.5 w-3.5"
27973
- })], 8, wI),
27974
- R("button", {
27975
- type: "button",
27976
- class: "flex h-5 w-5 shrink-0 items-center justify-center rounded-sm text-ink-dim opacity-0 hover:bg-panel-3 hover:text-ink group-hover:opacity-100",
27977
- title: G(M)("designer.builtins.duplicatePageTitle"),
27978
- "aria-label": G(M)("designer.builtins.duplicatePageTitle"),
27979
- onClick: Nn((t) => c("page.copy", e.id), ["stop"])
27980
- }, [z($, {
27981
- name: "copy",
27982
- class: "h-3.5 w-3.5"
27983
- })], 8, TI),
27984
- R("button", {
27985
- type: "button",
27986
- class: "flex h-5 w-5 shrink-0 items-center justify-center rounded-sm text-ink-dim opacity-0 hover:bg-panel-3 hover:text-ink group-hover:opacity-100",
27987
- title: G(M)("designer.templateBanner.detachTitle"),
27988
- "aria-label": G(M)("designer.templateBanner.detachTitle"),
27989
- onClick: Nn((t) => c("page.detachTemplate", e.id), ["stop"])
27990
- }, [z($, {
27991
- name: "copy",
27992
- class: "h-3.5 w-3.5"
27993
- })], 8, EI),
27994
- R("button", {
27995
- type: "button",
27996
- class: "flex h-5 w-5 shrink-0 items-center justify-center rounded-sm text-ink-dim opacity-0 hover:bg-panel-3 hover:text-danger group-hover:opacity-100",
27997
- title: G(M)("designer.builtins.deletePageTitle"),
27998
- "aria-label": G(M)("designer.builtins.deletePageTitle"),
27999
- disabled: G(n).page.list.length <= 1,
28000
- onClick: Nn((t) => _(e.id), ["stop"])
28001
- }, [z($, {
28002
- name: "trash",
28003
- class: "h-3.5 w-3.5"
28004
- })], 8, DI)
28005
- ], 42, yI))), 128))]),
28042
+ }, W(e.templateName), 11, kI),
28043
+ R("div", AI, [
28044
+ R("button", {
28045
+ type: "button",
28046
+ class: "pages-panel__action flex h-5 w-5 shrink-0 items-center justify-center rounded-sm text-ink-dim opacity-0 hover:bg-panel-3 hover:text-ink group-hover:opacity-100",
28047
+ title: G(M)("designer.pagesPanel.applyTemplateTitle"),
28048
+ "aria-label": G(M)("designer.pagesPanel.applyTemplateTitle"),
28049
+ onClick: Nn((t) => g(e.id), ["stop"])
28050
+ }, [z($, {
28051
+ name: "apply-template",
28052
+ class: "h-3.5 w-3.5"
28053
+ })], 8, jI),
28054
+ R("button", {
28055
+ type: "button",
28056
+ class: "pages-panel__action flex h-5 w-5 shrink-0 items-center justify-center rounded-sm text-ink-dim opacity-0 hover:bg-panel-3 hover:text-ink group-hover:opacity-100",
28057
+ title: G(M)("designer.builtins.duplicatePageTitle"),
28058
+ "aria-label": G(M)("designer.builtins.duplicatePageTitle"),
28059
+ onClick: Nn((t) => c("page.copy", e.id), ["stop"])
28060
+ }, [z($, {
28061
+ name: "copy",
28062
+ class: "h-3.5 w-3.5"
28063
+ })], 8, MI),
28064
+ R("button", {
28065
+ type: "button",
28066
+ class: "pages-panel__action flex h-5 w-5 shrink-0 items-center justify-center rounded-sm text-ink-dim opacity-0 hover:bg-panel-3 hover:text-ink group-hover:opacity-100",
28067
+ title: G(M)("designer.templateBanner.detachTitle"),
28068
+ "aria-label": G(M)("designer.templateBanner.detachTitle"),
28069
+ onClick: Nn((t) => c("page.detachTemplate", e.id), ["stop"])
28070
+ }, [z($, {
28071
+ name: "copy",
28072
+ class: "h-3.5 w-3.5"
28073
+ })], 8, NI),
28074
+ R("button", {
28075
+ type: "button",
28076
+ class: "pages-panel__action flex h-5 w-5 shrink-0 items-center justify-center rounded-sm text-ink-dim opacity-0 hover:bg-panel-3 hover:text-danger group-hover:opacity-100",
28077
+ title: G(M)("designer.builtins.deletePageTitle"),
28078
+ "aria-label": G(M)("designer.builtins.deletePageTitle"),
28079
+ disabled: G(n).page.list.length <= 1,
28080
+ onClick: Nn((t) => _(e.id), ["stop"])
28081
+ }, [z($, {
28082
+ name: "trash",
28083
+ class: "h-3.5 w-3.5"
28084
+ })], 8, PI),
28085
+ R("button", {
28086
+ type: "button",
28087
+ class: "pages-panel__more h-5 w-5 shrink-0 items-center justify-center rounded-sm text-ink-dim hover:bg-panel-3 hover:text-ink",
28088
+ title: G(M)("designer.pagesPanel.moreActionsTitle"),
28089
+ "aria-label": G(M)("designer.pagesPanel.moreActionsTitle"),
28090
+ "aria-haspopup": "menu",
28091
+ onClick: Nn((t) => y(t, e.id), ["stop"]),
28092
+ onDblclick: t[2] ||= Nn(() => {}, ["stop"])
28093
+ }, [z($, {
28094
+ name: "dots",
28095
+ class: "h-3.5 w-3.5 rotate-90"
28096
+ })], 40, FI)
28097
+ ])
28098
+ ], 42, wI))), 128))]),
28006
28099
  _: 1
28007
28100
  }, 8, ["title"])])]),
28008
28101
  _: 1
@@ -28016,15 +28109,15 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28016
28109
  theme: "danger"
28017
28110
  },
28018
28111
  onConfirm: h,
28019
- onClose: t[1] ||= (e) => i.value = null,
28020
- onCancel: t[2] ||= (e) => i.value = null
28112
+ onClose: t[3] ||= (e) => i.value = null,
28113
+ onCancel: t[4] ||= (e) => i.value = null
28021
28114
  }, {
28022
28115
  default: q(() => [Wt(W(G(M)("designer.pagesPanel.removeConfirmMessage", { templateName: r.value.name })), 1)]),
28023
28116
  _: 1
28024
28117
  }, 8, ["title", "confirm-btn"])) : I("", !0)], 64);
28025
28118
  };
28026
28119
  }
28027
- }), kI = {
28120
+ }), [["__scopeId", "data-v-d7fdb82f"]]), LI = {
28028
28121
  name: "builtin:panels",
28029
28122
  setup(e) {
28030
28123
  let t = e.store().panel, n = [
@@ -28037,7 +28130,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28037
28130
  }
28038
28131
  }),
28039
28132
  t.register({
28040
- component: OI,
28133
+ component: II,
28041
28134
  icon: "file",
28042
28135
  id: "pages",
28043
28136
  title: function() {
@@ -28045,7 +28138,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28045
28138
  }
28046
28139
  }),
28047
28140
  t.register({
28048
- component: sI,
28141
+ component: cI,
28049
28142
  icon: "layers",
28050
28143
  id: "layers",
28051
28144
  title: function() {
@@ -28070,10 +28163,10 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28070
28163
  e.commands.get(i.id) === i && (e.commands.unregister(i.id), r && e.commands.register(r));
28071
28164
  };
28072
28165
  }
28073
- }, AI = {
28166
+ }, RI = {
28074
28167
  key: 2,
28075
28168
  class: "text-ink-dim"
28076
- }, jI = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
28169
+ }, zI = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
28077
28170
  __name: "field-boolean",
28078
28171
  props: /*@__PURE__*/ tn({
28079
28172
  disabled: { type: Boolean },
@@ -28135,13 +28228,13 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28135
28228
  "model-value",
28136
28229
  "disabled",
28137
28230
  "aria-label"
28138
- ])), e.mixed ? I("", !0) : (H(), L("span", AI, W(i.value ? G(M)("designer.fieldBoolean.enabledLabel") : G(M)("designer.fieldBoolean.disabledLabel")), 1))], 512);
28231
+ ])), e.mixed ? I("", !0) : (H(), L("span", RI, W(i.value ? G(M)("designer.fieldBoolean.enabledLabel") : G(M)("designer.fieldBoolean.disabledLabel")), 1))], 512);
28139
28232
  };
28140
28233
  }
28141
- }), [["__scopeId", "data-v-e09fcb7f"]]), MI = { class: "flex min-w-0 items-center gap-1" }, NI = {
28234
+ }), [["__scopeId", "data-v-e09fcb7f"]]), BI = { class: "flex min-w-0 items-center gap-1" }, VI = {
28142
28235
  class: "field-color__swatch",
28143
28236
  "aria-hidden": "true"
28144
- }, PI = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
28237
+ }, HI = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
28145
28238
  __name: "field-color",
28146
28239
  props: /*@__PURE__*/ tn({
28147
28240
  allowNone: { type: Boolean },
@@ -28153,7 +28246,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28153
28246
  }),
28154
28247
  emits: /*@__PURE__*/ tn(["commit"], ["update:modelValue"]),
28155
28248
  setup(e, { emit: t }) {
28156
- let n = e, r = vz(), { popupProps: i } = hM({ onVisibleChange: f }), a = ["monochrome"], o = t, s = Dn(e, "modelValue"), c = P(() => s.value || "#ffffff");
28249
+ let n = e, r = Ez(), { popupProps: i } = hM({ onVisibleChange: f }), a = ["monochrome"], o = t, s = Dn(e, "modelValue"), c = P(() => s.value || "#ffffff");
28157
28250
  function l(e) {
28158
28251
  s.value = String(e);
28159
28252
  }
@@ -28179,7 +28272,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28179
28272
  }
28180
28273
  return (t, n) => {
28181
28274
  let r = sy, o = Zj;
28182
- return H(), L("div", MI, [
28275
+ return H(), L("div", BI, [
28183
28276
  z(o, {
28184
28277
  class: "shrink-0",
28185
28278
  "model-value": c.value,
@@ -28195,7 +28288,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28195
28288
  variant: "outline",
28196
28289
  "aria-label": G(M)("designer.canvasColorDialog.colorLabel")
28197
28290
  }, {
28198
- default: q(() => [R("span", NI, [R("span", {
28291
+ default: q(() => [R("span", VI, [R("span", {
28199
28292
  class: "field-color__fill",
28200
28293
  style: on({ backgroundColor: e.mixed ? void 0 : c.value })
28201
28294
  }, null, 4)])]),
@@ -28254,7 +28347,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28254
28347
  ]);
28255
28348
  };
28256
28349
  }
28257
- }), [["__scopeId", "data-v-26436bed"]]), FI = { class: "field-data-preview" }, II = { class: "field-data-preview__table" }, LI = { class: "field-data-preview__row field-data-preview__row--head" }, RI = ["title"], zI = ["title"], BI = 5, VI = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
28350
+ }), [["__scopeId", "data-v-26436bed"]]), UI = { class: "field-data-preview" }, WI = { class: "field-data-preview__table" }, GI = { class: "field-data-preview__row field-data-preview__row--head" }, KI = ["title"], qI = ["title"], JI = 5, YI = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
28258
28351
  __name: "field-data-preview",
28259
28352
  props: {
28260
28353
  bindings: {},
@@ -28263,11 +28356,11 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28263
28356
  node: {}
28264
28357
  },
28265
28358
  setup(e) {
28266
- let n = e, r = vz().store(), a = P(() => n.bindings?.rows), o = P(() => Array.isArray(n.columns) ? n.columns : []), s = P(() => {
28359
+ let n = e, r = Ez().store(), a = P(() => n.bindings?.rows), o = P(() => Array.isArray(n.columns) ? n.columns : []), s = P(() => {
28267
28360
  let e = a.value;
28268
28361
  if (!e) return null;
28269
28362
  let n = ct(r.document.data), o = i(n), s = t(o, e);
28270
- return Array.isArray(s) ? s.slice(0, BI) : null;
28363
+ return Array.isArray(s) ? s.slice(0, JI) : null;
28271
28364
  }), c = P(() => {
28272
28365
  let e = a.value;
28273
28366
  if (!e) return 0;
@@ -28283,21 +28376,21 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28283
28376
  }), s = t(o, r);
28284
28377
  return s == null ? "" : String(s);
28285
28378
  }
28286
- return (e, t) => (H(), L("div", FI, [a.value ? !s.value || s.value.length === 0 ? (H(), F(HN, {
28379
+ return (e, t) => (H(), L("div", UI, [a.value ? !s.value || s.value.length === 0 ? (H(), F(HN, {
28287
28380
  key: 1,
28288
28381
  text: G(M)("designer.fieldDataPreview.emptyTitle")
28289
- }, null, 8, ["text"])) : (H(), L(N, { key: 2 }, [R("div", II, [R("div", LI, [(H(!0), L(N, null, gn(o.value, (e, t) => (H(), L("span", {
28382
+ }, null, 8, ["text"])) : (H(), L(N, { key: 2 }, [R("div", WI, [R("div", GI, [(H(!0), L(N, null, gn(o.value, (e, t) => (H(), L("span", {
28290
28383
  key: t,
28291
28384
  class: "field-data-preview__cell",
28292
28385
  title: e.title
28293
- }, W(e.title || G(M)("designer.fieldDataPreview.unboundColumnHint")), 9, RI))), 128))]), (H(!0), L(N, null, gn(s.value, (e, t) => (H(), L("div", {
28386
+ }, W(e.title || G(M)("designer.fieldDataPreview.unboundColumnHint")), 9, KI))), 128))]), (H(!0), L(N, null, gn(s.value, (e, t) => (H(), L("div", {
28294
28387
  key: t,
28295
28388
  class: "field-data-preview__row"
28296
28389
  }, [(H(!0), L(N, null, gn(o.value, (n, r) => (H(), L("span", {
28297
28390
  key: r,
28298
28391
  class: "field-data-preview__cell",
28299
28392
  title: l(e, t, n.bind)
28300
- }, W(l(e, t, n.bind)), 9, zI))), 128))]))), 128))]), z(HN, { text: G(M)("designer.fieldDataPreview.rowsLabel", {
28393
+ }, W(l(e, t, n.bind)), 9, qI))), 128))]))), 128))]), z(HN, { text: G(M)("designer.fieldDataPreview.rowsLabel", {
28301
28394
  previewCount: s.value.length,
28302
28395
  rowCount: c.value
28303
28396
  }) }, null, 8, ["text"])], 64)) : (H(), F(HN, {
@@ -28305,10 +28398,10 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28305
28398
  text: G(M)("designer.fieldDataPreview.unboundTitle")
28306
28399
  }, null, 8, ["text"]))]));
28307
28400
  }
28308
- }), [["__scopeId", "data-v-541f8e52"]]), HI = { class: "flex flex-col gap-2" }, UI = { class: "field-image__source" }, WI = {
28401
+ }), [["__scopeId", "data-v-541f8e52"]]), XI = { class: "flex flex-col gap-2" }, ZI = { class: "field-image__source" }, QI = {
28309
28402
  key: 0,
28310
28403
  class: "flex h-20 items-center justify-center rounded-sm border border-edge bg-panel-3 p-1"
28311
- }, GI = ["src"], KI = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
28404
+ }, $I = ["src"], eL = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
28312
28405
  __name: "field-image",
28313
28406
  props: {
28314
28407
  modelValue: {},
@@ -28363,8 +28456,8 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28363
28456
  }
28364
28457
  return (e, t) => {
28365
28458
  let n = jS;
28366
- return H(), L("div", HI, [
28367
- R("div", UI, [z(n, {
28459
+ return H(), L("div", XI, [
28460
+ R("div", ZI, [z(n, {
28368
28461
  modelValue: r.value,
28369
28462
  "onUpdate:modelValue": t[0] ||= (e) => r.value = e,
28370
28463
  class: "min-w-0 flex-1",
@@ -28375,10 +28468,10 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28375
28468
  actions: a.value,
28376
28469
  gap: 1
28377
28470
  }, null, 8, ["actions"])]),
28378
- r.value ? (H(), L("div", WI, [R("img", {
28471
+ r.value ? (H(), L("div", QI, [R("img", {
28379
28472
  src: r.value,
28380
28473
  class: "h-full w-full object-contain"
28381
- }, null, 8, GI)])) : I("", !0),
28474
+ }, null, 8, $I)])) : I("", !0),
28382
28475
  R("input", {
28383
28476
  ref_key: "fileRef",
28384
28477
  ref: i,
@@ -28390,10 +28483,10 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28390
28483
  ]);
28391
28484
  };
28392
28485
  }
28393
- }), [["__scopeId", "data-v-23c1c524"]]), qI = {
28486
+ }), [["__scopeId", "data-v-23c1c524"]]), tL = {
28394
28487
  key: 0,
28395
28488
  class: "field-borders field-borders--single"
28396
- }, JI = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
28489
+ }, nL = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
28397
28490
  __name: "field-table-borders",
28398
28491
  props: /*@__PURE__*/ tn({
28399
28492
  inheritable: { type: Boolean },
@@ -28500,13 +28593,13 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28500
28593
  }
28501
28594
  return (t, s) => {
28502
28595
  let g = hC, _ = MT, v = fA;
28503
- return e.sideMode ? (H(), L("div", qI, [
28596
+ return e.sideMode ? (H(), L("div", tL, [
28504
28597
  z(fP, {
28505
28598
  class: "field-borders__row",
28506
28599
  label: G(M)("designer.fieldBorders.colorTitle"),
28507
28600
  "label-width": 56
28508
28601
  }, {
28509
- default: q(() => [z(PI, {
28602
+ default: q(() => [z(HI, {
28510
28603
  "model-value": l.value.color,
28511
28604
  "reset-value": G(c).color,
28512
28605
  "allow-none": "",
@@ -28583,7 +28676,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28583
28676
  label: G(M)("designer.fieldBorders.colorTitle"),
28584
28677
  "label-width": 56
28585
28678
  }, {
28586
- default: q(() => [z(PI, {
28679
+ default: q(() => [z(HI, {
28587
28680
  "model-value": u.value.outer.color,
28588
28681
  "reset-value": G(c).color,
28589
28682
  "onUpdate:modelValue": s[9] ||= (e) => m({ outer: {
@@ -28643,7 +28736,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28643
28736
  label: G(M)("designer.fieldBorders.colorTitle"),
28644
28737
  "label-width": 56
28645
28738
  }, {
28646
- default: q(() => [z(PI, {
28739
+ default: q(() => [z(HI, {
28647
28740
  "model-value": u.value.inner.color,
28648
28741
  "reset-value": G(c).color,
28649
28742
  "allow-none": "",
@@ -28705,7 +28798,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28705
28798
  label: G(M)("designer.fieldBorders.colorTitle"),
28706
28799
  "label-width": 56
28707
28800
  }, {
28708
- default: q(() => [z(PI, {
28801
+ default: q(() => [z(HI, {
28709
28802
  "model-value": u.value[e.key]?.color ?? u.value.outer.color,
28710
28803
  "reset-value": u.value.outer.color,
28711
28804
  "allow-none": "",
@@ -28762,7 +28855,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28762
28855
  ], 64)) : I("", !0)], 2));
28763
28856
  };
28764
28857
  }
28765
- }), [["__scopeId", "data-v-d84f9db1"]]), YI = { class: "continuation-layout" }, XI = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
28858
+ }), [["__scopeId", "data-v-d84f9db1"]]), rL = { class: "continuation-layout" }, iL = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
28766
28859
  __name: "field-table-continuation-layout",
28767
28860
  props: {
28768
28861
  modelValue: {},
@@ -28771,7 +28864,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28771
28864
  },
28772
28865
  emits: ["update:modelValue"],
28773
28866
  setup(e) {
28774
- let t = e, n = vz(), r = n.store(), i = P(() => r.template.get(t.modelValue?.templateId ?? "")), a = P(() => {
28867
+ let t = e, n = Ez(), r = n.store(), i = P(() => r.template.get(t.modelValue?.templateId ?? "")), a = P(() => {
28775
28868
  let e = i.value;
28776
28869
  if (!e) return "";
28777
28870
  let n = e.page.elements.find((e) => e.id === t.modelValue?.elementId);
@@ -28785,7 +28878,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28785
28878
  }
28786
28879
  return (e, t) => {
28787
28880
  let n = sy;
28788
- return H(), L("div", YI, [z(n, {
28881
+ return H(), L("div", rL, [z(n, {
28789
28882
  size: "small",
28790
28883
  variant: "outline",
28791
28884
  disabled: !i.value,
@@ -28804,7 +28897,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28804
28897
  }, null, 8, ["text"]))]);
28805
28898
  };
28806
28899
  }
28807
- }), [["__scopeId", "data-v-2567153b"]]), ZI = { class: "flex flex-col gap-1" }, QI = { class: "min-w-0 truncate" }, $I = /* @__PURE__ */ B({
28900
+ }), [["__scopeId", "data-v-2567153b"]]), aL = { class: "flex flex-col gap-1" }, oL = { class: "min-w-0 truncate" }, sL = /* @__PURE__ */ B({
28808
28901
  __name: "collection-picker-field",
28809
28902
  props: {
28810
28903
  modelValue: {},
@@ -28815,7 +28908,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28815
28908
  let t = Dn(e, "modelValue");
28816
28909
  return (e, n) => {
28817
28910
  let r = sy;
28818
- return H(), L("div", ZI, [z(r, {
28911
+ return H(), L("div", aL, [z(r, {
28819
28912
  variant: "outline",
28820
28913
  block: "",
28821
28914
  type: "button",
@@ -28827,17 +28920,17 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28827
28920
  default: q(() => [t.value ? (H(), L(N, { key: 0 }, [z($, {
28828
28921
  name: "link",
28829
28922
  class: "mr-1 inline h-3 w-3 shrink-0 text-accent"
28830
- }), R("span", QI, W(t.value), 1)], 64)) : (H(), L(N, { key: 1 }, [Wt(W(G(M)("designer.collectionPickerField.unboundPlaceholder")), 1)], 64))]),
28923
+ }), R("span", oL, W(t.value), 1)], 64)) : (H(), L(N, { key: 1 }, [Wt(W(G(M)("designer.collectionPickerField.unboundPlaceholder")), 1)], 64))]),
28831
28924
  _: 1
28832
28925
  }, 8, ["theme", "title"])]);
28833
28926
  };
28834
28927
  }
28835
28928
  });
28836
28929
  // src/elements/table/table-structure.ts
28837
- function eL(e) {
28930
+ function cL(e) {
28838
28931
  return e.headerRows?.length ? e.headerRows : [e.columns.map((e) => e.title)];
28839
28932
  }
28840
- function tL(e, t) {
28933
+ function lL(e, t) {
28841
28934
  let n = [];
28842
28935
  for (let r of e) {
28843
28936
  let e = t.flatMap((e, t) => e >= r.col && e < r.col + r.colspan ? [t] : []);
@@ -28849,8 +28942,8 @@ function tL(e, t) {
28849
28942
  }
28850
28943
  return n;
28851
28944
  }
28852
- function nL(e, t, n) {
28853
- let r = tL(e.headerMerges ?? [], t), i = tL(e.merges ?? [], t);
28945
+ function uL(e, t, n) {
28946
+ let r = lL(e.headerMerges ?? [], t), i = lL(e.merges ?? [], t);
28854
28947
  if (!r || !i) return null;
28855
28948
  let a = t.map((t) => {
28856
28949
  let r = e.columns[t] ?? n;
@@ -28885,7 +28978,7 @@ function nL(e, t, n) {
28885
28978
  }
28886
28979
  };
28887
28980
  }
28888
- function rL(e, t, n) {
28981
+ function dL(e, t, n) {
28889
28982
  let r = Math.min(e.col, t.col), i = Math.max(e.col, t.col) + 1, a = Math.min(e.row, t.row), o = Math.max(e.row, t.row) + 1, s = !0;
28890
28983
  for (; s;) {
28891
28984
  s = !1;
@@ -28907,7 +29000,7 @@ function rL(e, t, n) {
28907
29000
  rowspan: o - a
28908
29001
  };
28909
29002
  }
28910
- function iL(e, t, n, r) {
29003
+ function fL(e, t, n, r) {
28911
29004
  let i = n + 1, a = t[n] + t[i], o = e[n], s = e[i];
28912
29005
  if (!o || !s || !Number.isFinite(a)) return e;
28913
29006
  let c = Math.max(.2, o.minWidthMm ?? 0, a - (s.maxWidthMm || a)), l = Math.min(a - Math.max(.2, s.minWidthMm ?? 0), o.maxWidthMm || a);
@@ -28917,46 +29010,46 @@ function iL(e, t, n, r) {
28917
29010
  let o = t[r];
28918
29011
  return r === n ? o = u : r === i && (o = a - u), {
28919
29012
  ...e,
28920
- width: ge(o, 2),
29013
+ width: me(o, 2),
28921
29014
  widthMode: "fixed"
28922
29015
  };
28923
29016
  });
28924
29017
  }
28925
29018
  // src/designer/services/text-input.ts
28926
- var aL = /* @__PURE__ */ new WeakMap();
28927
- function oL(e) {
28928
- return aL.set(e.element, e), () => {
28929
- aL.get(e.element) === e && aL.delete(e.element);
29019
+ var pL = /* @__PURE__ */ new WeakMap();
29020
+ function mL(e) {
29021
+ return pL.set(e.element, e), () => {
29022
+ pL.get(e.element) === e && pL.delete(e.element);
28930
29023
  };
28931
29024
  }
28932
29025
  // src/designer/components/variable-text/use-variable-text-editor.ts
28933
- var sL = String.fromCodePoint(8203);
28934
- function cL(e) {
29026
+ var hL = String.fromCodePoint(8203);
29027
+ function gL(e) {
28935
29028
  return e instanceof HTMLElement && e.dataset.expression !== void 0;
28936
29029
  }
28937
- function lL(e) {
28938
- return e?.nodeType === Node.TEXT_NODE && (e.textContent ?? "").replaceAll(sL, "") === "";
29030
+ function _L(e) {
29031
+ return e?.nodeType === Node.TEXT_NODE && (e.textContent ?? "").replaceAll(hL, "") === "";
28939
29032
  }
28940
- function uL(e, t) {
28941
- if (e.nodeType === Node.TEXT_NODE) return (e.textContent ?? "").replaceAll(sL, "");
29033
+ function vL(e, t) {
29034
+ if (e.nodeType === Node.TEXT_NODE) return (e.textContent ?? "").replaceAll(hL, "");
28942
29035
  if (!(e instanceof HTMLElement)) return "";
28943
29036
  if (e.dataset.expression !== void 0) return e.dataset.expression;
28944
29037
  if (e.dataset.sentinel !== void 0) return "";
28945
29038
  if (e.tagName === "BR") return "\n";
28946
- let n = dL(e.childNodes);
29039
+ let n = yL(e.childNodes);
28947
29040
  return (e.tagName === "DIV" || e.tagName === "P") && !t ? `\n${n}` : n;
28948
29041
  }
28949
- function dL(e) {
28950
- return [...e].map((e, t) => uL(e, t === 0)).join("");
29042
+ function yL(e) {
29043
+ return [...e].map((e, t) => vL(e, t === 0)).join("");
28951
29044
  }
28952
- function fL(e) {
29045
+ function bL(e) {
28953
29046
  let t = null;
28954
29047
  function n() {
28955
29048
  return e.root.value;
28956
29049
  }
28957
29050
  function r() {
28958
29051
  let e = n();
28959
- return e ? dL(e.childNodes) : "";
29052
+ return e ? yL(e.childNodes) : "";
28960
29053
  }
28961
29054
  function i(t, n) {
28962
29055
  let r = Oa(n.replace(/^\{\{|\}\}$/g, "")), i = e.describe(r);
@@ -28975,8 +29068,8 @@ function fL(e) {
28975
29068
  e.querySelectorAll("[data-sentinel]").forEach((e) => {
28976
29069
  e.remove();
28977
29070
  });
28978
- for (let t of [...e.childNodes]) cL(t) && t.previousSibling?.nodeType !== Node.TEXT_NODE && e.insertBefore(document.createTextNode(sL), t);
28979
- if (cL(e.lastChild) && e.append(document.createTextNode(sL)), r().endsWith("\n")) {
29071
+ for (let t of [...e.childNodes]) gL(t) && t.previousSibling?.nodeType !== Node.TEXT_NODE && e.insertBefore(document.createTextNode(hL), t);
29072
+ if (gL(e.lastChild) && e.append(document.createTextNode(hL)), r().endsWith("\n")) {
28980
29073
  let t = document.createElement("br");
28981
29074
  t.dataset.sentinel = "", e.append(t);
28982
29075
  }
@@ -29070,11 +29163,11 @@ function fL(e) {
29070
29163
  let i;
29071
29164
  if (n.nodeType === Node.TEXT_NODE) {
29072
29165
  let t = n.textContent ?? "";
29073
- if ((e === "backward" ? t.slice(0, r) : t.slice(r)).replaceAll(sL, "") !== "") return null;
29166
+ if ((e === "backward" ? t.slice(0, r) : t.slice(r)).replaceAll(hL, "") !== "") return null;
29074
29167
  i = e === "backward" ? n.previousSibling : n.nextSibling;
29075
29168
  } else i = e === "backward" ? n.childNodes[r - 1] : n.childNodes[r];
29076
- for (; lL(i);) i = e === "backward" ? i?.previousSibling : i?.nextSibling;
29077
- return cL(i) ? i : null;
29169
+ for (; _L(i);) i = e === "backward" ? i?.previousSibling : i?.nextSibling;
29170
+ return gL(i) ? i : null;
29078
29171
  }
29079
29172
  function w(e, t) {
29080
29173
  let n = C(e);
@@ -29085,7 +29178,7 @@ function fL(e) {
29085
29178
  }
29086
29179
  function E() {
29087
29180
  let e = document.getSelection();
29088
- return !e || e.rangeCount === 0 ? "" : dL(e.getRangeAt(0).cloneContents().childNodes);
29181
+ return !e || e.rangeCount === 0 ? "" : yL(e.getRangeAt(0).cloneContents().childNodes);
29089
29182
  }
29090
29183
  function D(e) {
29091
29184
  let t = E();
@@ -29123,13 +29216,13 @@ function fL(e) {
29123
29216
  };
29124
29217
  }
29125
29218
  // src/designer/components/variable-text/variable-formatter-editor.vue?vue&type=script&setup=true&lang.ts
29126
- var pL = {
29219
+ var xL = {
29127
29220
  class: "variable-formatter",
29128
29221
  role: "dialog"
29129
- }, mL = { class: "variable-formatter__heading" }, hL = { class: "min-w-0 truncate" }, gL = {
29222
+ }, SL = { class: "variable-formatter__heading" }, CL = { class: "min-w-0 truncate" }, wL = {
29130
29223
  key: 0,
29131
29224
  class: "variable-formatter__type"
29132
- }, _L = { class: "variable-formatter__path" }, vL = { class: "variable-formatter__actions" }, yL = "", bL = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
29225
+ }, TL = { class: "variable-formatter__path" }, EL = { class: "variable-formatter__actions" }, DL = "", OL = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
29133
29226
  __name: "variable-formatter-editor",
29134
29227
  props: {
29135
29228
  field: {},
@@ -29148,17 +29241,17 @@ var pL = {
29148
29241
  }));
29149
29242
  return [{
29150
29243
  label: M("designer.variableText.originalFormat"),
29151
- value: yL
29244
+ value: DL
29152
29245
  }, ...e];
29153
29246
  }), s = P(() => n.variable.formatter ? Ma.get(n.variable.formatter) : void 0), c = P(() => {
29154
29247
  let e = n.variable.formatter;
29155
29248
  return !!e && !Na(e ?? "", n.field?.type);
29156
- }), l = P(() => c.value ? void 0 : n.variable.formatter ?? yL), u = P(() => {
29249
+ }), l = P(() => c.value ? void 0 : n.variable.formatter ?? DL), u = P(() => {
29157
29250
  let e = s.value;
29158
29251
  return e ? Pa(e, n.variable.args) : [];
29159
29252
  });
29160
29253
  function d(e) {
29161
- let t = String(e ?? yL), i = Ma.get(t);
29254
+ let t = String(e ?? DL), i = Ma.get(t);
29162
29255
  !t || !i ? r("update:variable", {
29163
29256
  args: [],
29164
29257
  path: n.variable.path
@@ -29186,16 +29279,16 @@ var pL = {
29186
29279
  }
29187
29280
  return (t, n) => {
29188
29281
  let m = MT, h = hC, g = sy;
29189
- return H(), L("div", pL, [
29190
- R("div", mL, [
29282
+ return H(), L("div", xL, [
29283
+ R("div", SL, [
29191
29284
  z($, {
29192
29285
  name: "link",
29193
29286
  class: "h-3.5 w-3.5 text-accent"
29194
29287
  }),
29195
- R("strong", hL, W(e.field?.label ?? e.variable.path), 1),
29196
- e.field?.type ? (H(), L("span", gL, W(G(M)(`designer.fieldTree.${e.field.type}`)), 1)) : I("", !0)
29288
+ R("strong", CL, W(e.field?.label ?? e.variable.path), 1),
29289
+ e.field?.type ? (H(), L("span", wL, W(G(M)(`designer.fieldTree.${e.field.type}`)), 1)) : I("", !0)
29197
29290
  ]),
29198
- R("code", _L, W(e.variable.path), 1),
29291
+ R("code", TL, W(e.variable.path), 1),
29199
29292
  z(fP, {
29200
29293
  label: G(M)("designer.variableText.formatterLabel"),
29201
29294
  stacked: ""
@@ -29263,7 +29356,7 @@ var pL = {
29263
29356
  ]))]),
29264
29357
  _: 2
29265
29358
  }, 1032, ["label"]))), 128)) : I("", !0),
29266
- R("div", vL, [z(g, {
29359
+ R("div", EL, [z(g, {
29267
29360
  theme: "danger",
29268
29361
  variant: "outline",
29269
29362
  size: "small",
@@ -29286,7 +29379,7 @@ var pL = {
29286
29379
  ]);
29287
29380
  };
29288
29381
  }
29289
- }), [["__scopeId", "data-v-4c47ca89"]]), xL = [
29382
+ }), [["__scopeId", "data-v-4c47ca89"]]), kL = [
29290
29383
  "contenteditable",
29291
29384
  "aria-label",
29292
29385
  "aria-multiline",
@@ -29295,7 +29388,7 @@ var pL = {
29295
29388
  "data-empty",
29296
29389
  "data-placeholder",
29297
29390
  "title"
29298
- ], SL = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
29391
+ ], AL = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
29299
29392
  __name: "variable-text-field",
29300
29393
  props: /*@__PURE__*/ tn({
29301
29394
  ariaLabel: {},
@@ -29317,10 +29410,10 @@ var pL = {
29317
29410
  "leave"
29318
29411
  ], ["update:modelValue"]),
29319
29412
  setup(e, { expose: t, emit: n }) {
29320
- let r = e, i = n, a = Dn(e, "modelValue"), o = za(() => r.relativeTo), s = vz().store(), c = U(), l = U(), u = U(), d = U(!1), f = Sn(null), p = U(null), m = U({}), { popupProps: h } = hM({}, "popup", () => f.value !== null), g = P(() => !r.disabled && !r.readonly), _ = P(() => {
29413
+ let r = e, i = n, a = Dn(e, "modelValue"), o = za(() => r.relativeTo), s = Ez().store(), c = U(), l = U(), u = U(), d = U(!1), f = Sn(null), p = U(null), m = U({}), { popupProps: h } = hM({}, "popup", () => f.value !== null), g = P(() => !r.disabled && !r.readonly), _ = P(() => {
29321
29414
  let e = p.value;
29322
29415
  if (e) return o.resolveField(e.path);
29323
- }), v = fL({
29416
+ }), v = bL({
29324
29417
  describe: o.describe,
29325
29418
  editable: () => g.value,
29326
29419
  getValue: () => a.value ?? "",
@@ -29424,7 +29517,7 @@ var pL = {
29424
29517
  ], () => {
29425
29518
  v.refreshChips();
29426
29519
  }, { deep: !0 }), cn(() => {
29427
- v.syncFromValue(), c.value && (y = oL({
29520
+ v.syncFromValue(), c.value && (y = mL({
29428
29521
  editable: () => g.value,
29429
29522
  element: c.value,
29430
29523
  multiline: () => !!r.multiline,
@@ -29468,7 +29561,7 @@ var pL = {
29468
29561
  onCut: n[2] ||= (...e) => G(v).onCut && G(v).onCut(...e),
29469
29562
  onInput: T,
29470
29563
  onPaste: n[3] ||= (...e) => G(v).onPaste && G(v).onPaste(...e)
29471
- }, null, 40, xL),
29564
+ }, null, 40, kL),
29472
29565
  g.value ? (H(), L("div", {
29473
29566
  key: 0,
29474
29567
  class: "variable-text__actions",
@@ -29498,7 +29591,7 @@ var pL = {
29498
29591
  content: q(() => [R("div", {
29499
29592
  ref_key: "formatterRef",
29500
29593
  ref: u
29501
- }, [p.value ? (H(), F(bL, {
29594
+ }, [p.value ? (H(), F(OL, {
29502
29595
  key: 0,
29503
29596
  variable: p.value,
29504
29597
  field: _.value,
@@ -29529,11 +29622,11 @@ var pL = {
29529
29622
  ], 34);
29530
29623
  };
29531
29624
  }
29532
- }), [["__scopeId", "data-v-fbc139e6"]]), CL = { class: "field-table__merge-rules" }, wL = { class: "field-table__merge-toolbar" }, TL = [
29625
+ }), [["__scopeId", "data-v-fbc139e6"]]), jL = { class: "field-table__merge-rules" }, ML = { class: "field-table__merge-toolbar" }, NL = [
29533
29626
  "aria-expanded",
29534
29627
  "aria-controls",
29535
29628
  "onClick"
29536
- ], EL = { class: "field-table__merge-title" }, DL = ["title"], OL = ["id"], kL = { class: "field-table__merge-fields" }, AL = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
29629
+ ], PL = { class: "field-table__merge-title" }, FL = ["title"], IL = ["id"], LL = { class: "field-table__merge-fields" }, RL = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
29537
29630
  __name: "field-table-merge-rules",
29538
29631
  props: {
29539
29632
  bindings: {},
@@ -29541,7 +29634,7 @@ var pL = {
29541
29634
  },
29542
29635
  emits: ["commit", "update:propsObject"],
29543
29636
  setup(e, { emit: t }) {
29544
- let n = e, r = t, i = vz().store(), a = En(), o = U([]), s = U([]), c = U([]), l = U(null), u = U(null), d = P(() => n.propsObject.columns ?? []), f = P(() => n.bindings?.rows);
29637
+ let n = e, r = t, i = Ez().store(), a = En(), o = U([]), s = U([]), c = U([]), l = U(null), u = U(null), d = P(() => n.propsObject.columns ?? []), f = P(() => n.bindings?.rows);
29545
29638
  function p() {
29546
29639
  o.value = T(n.propsObject.mergeRules), s.value = o.value.map((e) => e.columns.map((e) => e + 1).join(",")), c.value = o.value.map((e) => (e.fields ?? []).join(",")), l.value !== null && l.value >= o.value.length && (l.value = null);
29547
29640
  }
@@ -29606,10 +29699,10 @@ var pL = {
29606
29699
  default: q(() => [Wt(" " + W(G(M)("elements.tableElement.mergeAddLabel")), 1)]),
29607
29700
  _: 1
29608
29701
  })]),
29609
- default: q(() => [R("div", CL, [(H(!0), L(N, null, gn(o.value, (e, t) => (H(), L("div", {
29702
+ default: q(() => [R("div", jL, [(H(!0), L(N, null, gn(o.value, (e, t) => (H(), L("div", {
29610
29703
  key: t,
29611
29704
  class: "field-table__merge-rule"
29612
- }, [R("div", wL, [R("button", {
29705
+ }, [R("div", ML, [R("button", {
29613
29706
  type: "button",
29614
29707
  class: "field-table__merge-toggle",
29615
29708
  "aria-expanded": l.value === t,
@@ -29620,12 +29713,12 @@ var pL = {
29620
29713
  name: l.value === t ? "chevron-down" : "chevron-right",
29621
29714
  class: "h-3.5 w-3.5 shrink-0"
29622
29715
  }, null, 8, ["name"]),
29623
- R("span", EL, W(G(M)("elements.tableElement.mergeRuleTitle", { number: t + 1 })), 1),
29716
+ R("span", PL, W(G(M)("elements.tableElement.mergeRuleTitle", { number: t + 1 })), 1),
29624
29717
  R("span", {
29625
29718
  class: "field-table__merge-summary",
29626
29719
  title: v(e)
29627
- }, W(v(e)), 9, DL)
29628
- ], 8, TL), z(n, {
29720
+ }, W(v(e)), 9, FL)
29721
+ ], 8, NL), z(n, {
29629
29722
  class: "field-table__merge-remove",
29630
29723
  variant: "text",
29631
29724
  theme: "danger",
@@ -29646,7 +29739,7 @@ var pL = {
29646
29739
  ])]), Mn(R("div", {
29647
29740
  id: `${G(a)}-${t}`,
29648
29741
  class: "field-table__merge-content"
29649
- }, [R("div", kL, [z(fP, {
29742
+ }, [R("div", LL, [z(fP, {
29650
29743
  stacked: "",
29651
29744
  label: G(M)("elements.tableElement.mergeColumnsLabel"),
29652
29745
  help: G(M)("elements.tableElement.mergeColumnsHelp")
@@ -29702,7 +29795,7 @@ var pL = {
29702
29795
  }, 1032, ["label", "help"])]), z(HN, {
29703
29796
  variant: "accent",
29704
29797
  text: G(M)("elements.tableElement.mergeFieldsWarning")
29705
- }, null, 8, ["text"])], 8, OL), [[kn, l.value === t]])]))), 128))]), u.value === null ? I("", !0) : (H(), F(cF, {
29798
+ }, null, 8, ["text"])], 8, IL), [[kn, l.value === t]])]))), 128))]), u.value === null ? I("", !0) : (H(), F(cF, {
29706
29799
  key: 0,
29707
29800
  sources: G(i).dataSource.list,
29708
29801
  mode: "field",
@@ -29719,7 +29812,7 @@ var pL = {
29719
29812
  }, 8, ["title", "hint"]);
29720
29813
  };
29721
29814
  }
29722
- }), [["__scopeId", "data-v-658a10b2"]]), jL = { class: "table-cell-style" }, ML = { class: "table-cell-style__fields" }, NL = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
29815
+ }), [["__scopeId", "data-v-658a10b2"]]), zL = { class: "table-cell-style" }, BL = { class: "table-cell-style__fields" }, VL = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
29723
29816
  __name: "field-table-cell-style",
29724
29817
  props: {
29725
29818
  modelValue: {},
@@ -29746,7 +29839,7 @@ var pL = {
29746
29839
  }
29747
29840
  return (e, t) => {
29748
29841
  let r = hC, s = MT, c = fA, l = sy;
29749
- return H(), L("details", jL, [R("summary", null, W(G(M)("designer.elementWorkspace.cellStyleSummary", { inheritance: G(M)(n.value ? "designer.elementWorkspace.customize" : "designer.elementWorkspace.inherit") })), 1), R("div", ML, [
29842
+ return H(), L("details", zL, [R("summary", null, W(G(M)("designer.elementWorkspace.cellStyleSummary", { inheritance: G(M)(n.value ? "designer.elementWorkspace.customize" : "designer.elementWorkspace.inherit") })), 1), R("div", BL, [
29750
29843
  z(fP, {
29751
29844
  label: G(M)("elements.tableElement.fontSizeLabel"),
29752
29845
  stacked: ""
@@ -29776,7 +29869,7 @@ var pL = {
29776
29869
  label: G(M)("elements.tableElement.summaryColorLabel"),
29777
29870
  stacked: ""
29778
29871
  }, {
29779
- default: q(() => [z(PI, {
29872
+ default: q(() => [z(HI, {
29780
29873
  "model-value": n.value?.color,
29781
29874
  "onUpdate:modelValue": t[2] ||= (e) => a({ color: String(e) })
29782
29875
  }, null, 8, ["model-value"])]),
@@ -29786,7 +29879,7 @@ var pL = {
29786
29879
  label: G(M)("elements.tableElement.summaryBackgroundLabel"),
29787
29880
  stacked: ""
29788
29881
  }, {
29789
- default: q(() => [z(PI, {
29882
+ default: q(() => [z(HI, {
29790
29883
  "model-value": n.value?.background,
29791
29884
  "allow-none": "",
29792
29885
  "onUpdate:modelValue": t[3] ||= (e) => a({ background: String(e) })
@@ -29813,10 +29906,10 @@ var pL = {
29813
29906
  ])]);
29814
29907
  };
29815
29908
  }
29816
- }), [["__scopeId", "data-v-5008fa97"]]), PL = /* @__PURE__ */ new WeakMap();
29817
- function FL(e) {
29909
+ }), [["__scopeId", "data-v-5008fa97"]]), HL = /* @__PURE__ */ new WeakMap();
29910
+ function UL(e) {
29818
29911
  let { pointerId: t, startPoint: n, target: r } = e, i = e.threshold ?? 0, a = !1, o = !1, s = e.tag ?? "unknown", c = e.startClient ?? n, l = r, u;
29819
- for (; l && !u;) u = PL.get(l), l = l.parentElement;
29912
+ for (; l && !u;) u = HL.get(l), l = l.parentElement;
29820
29913
  let d = u?.events ?? De();
29821
29914
  try {
29822
29915
  r.setPointerCapture?.(t);
@@ -29863,8 +29956,8 @@ function FL(e) {
29863
29956
  return u?.handles.add(v), v;
29864
29957
  }
29865
29958
  // src/designer/components/fields/use-table-selection.ts
29866
- function IL(e) {
29867
- let t = U(null), n = U(null), r, i = P(() => !t.value || !n.value || n.value.row >= e.rows.value.length || n.value.col >= e.columnCount.value ? null : rL(t.value, n.value, e.merges.value));
29959
+ function WL(e) {
29960
+ let t = U(null), n = U(null), r, i = P(() => !t.value || !n.value || n.value.row >= e.rows.value.length || n.value.col >= e.columnCount.value ? null : dL(t.value, n.value, e.merges.value));
29868
29961
  function a() {
29869
29962
  r?.(), r = void 0, t.value = null, n.value = null;
29870
29963
  }
@@ -29888,7 +29981,7 @@ function IL(e) {
29888
29981
  if (t.button !== 0) return;
29889
29982
  r?.(), o(n, i, t.shiftKey);
29890
29983
  let a = t.currentTarget;
29891
- r = FL({
29984
+ r = UL({
29892
29985
  onMove(t) {
29893
29986
  let n = document.elementFromPoint(t.lastPoint.x, t.lastPoint.y)?.closest(e.cellSelector);
29894
29987
  if (n && a.closest(e.rootSelector)?.contains(n)) {
@@ -29917,8 +30010,8 @@ function IL(e) {
29917
30010
  };
29918
30011
  }
29919
30012
  // src/designer/components/fields/use-table-cells.ts
29920
- function LL(e) {
29921
- let { columnCount: t, commit: n, merges: r, rows: i } = e, a = IL({
30013
+ function GL(e) {
30014
+ let { columnCount: t, commit: n, merges: r, rows: i } = e, a = WL({
29922
30015
  cellSelector: "[data-row]",
29923
30016
  columnCount: t,
29924
30017
  getCell(e) {
@@ -29993,7 +30086,7 @@ function LL(e) {
29993
30086
  };
29994
30087
  }
29995
30088
  // src/designer/components/fields/use-table-draft.ts
29996
- function RL(e, t) {
30089
+ function KL(e, t) {
29997
30090
  let n = U(c()), r = l("columns"), i = l("rows"), a = P({
29998
30091
  get: () => n.value.merges ?? [],
29999
30092
  set: (e) => {
@@ -30035,14 +30128,14 @@ function RL(e, t) {
30035
30128
  };
30036
30129
  }
30037
30130
  // src/designer/components/fields/field-table-rows.vue?vue&type=script&setup=true&lang.ts
30038
- var zL = { class: "table-rows" }, BL = { class: "table-rows__controls" }, VL = { class: "table-rows__toolbar" }, HL = { class: "table-rows__formula" }, UL = ["title"], WL = {
30131
+ var qL = { class: "table-rows" }, JL = { class: "table-rows__controls" }, YL = { class: "table-rows__toolbar" }, XL = { class: "table-rows__formula" }, ZL = ["title"], QL = {
30039
30132
  key: 1,
30040
30133
  class: "table-rows__editing"
30041
- }, GL = { class: "table-rows__viewport" }, KL = [
30134
+ }, $L = { class: "table-rows__viewport" }, eR = [
30042
30135
  "aria-label",
30043
30136
  "aria-rowcount",
30044
30137
  "aria-colcount"
30045
- ], qL = ["title"], JL = ["onClick"], YL = [
30138
+ ], tR = ["title"], nR = ["onClick"], rR = [
30046
30139
  "aria-label",
30047
30140
  "aria-selected",
30048
30141
  "aria-rowindex",
@@ -30053,7 +30146,7 @@ var zL = { class: "table-rows" }, BL = { class: "table-rows__controls" }, VL = {
30053
30146
  "onPointerdown",
30054
30147
  "onClick",
30055
30148
  "onDblclick"
30056
- ], XL = { key: 2 }, ZL = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
30149
+ ], iR = { key: 2 }, aR = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
30057
30150
  __name: "field-table-rows",
30058
30151
  props: {
30059
30152
  propsObject: {},
@@ -30061,7 +30154,7 @@ var zL = { class: "table-rows" }, BL = { class: "table-rows__controls" }, VL = {
30061
30154
  },
30062
30155
  emits: ["commit", "update:propsObject"],
30063
30156
  setup(e, { emit: t }) {
30064
- let n = e, r = t, { columnCount: i, columns: a, commit: o, merges: s, rows: c } = RL(() => n.propsObject, x), l = LL({
30157
+ let n = e, r = t, { columnCount: i, columns: a, commit: o, merges: s, rows: c } = KL(() => n.propsObject, x), l = GL({
30065
30158
  columnCount: i,
30066
30159
  commit: o,
30067
30160
  merges: s,
@@ -30176,12 +30269,12 @@ var zL = { class: "table-rows" }, BL = { class: "table-rows__controls" }, VL = {
30176
30269
  target: () => p.value?.$el
30177
30270
  }), sn(C), (t, n) => {
30178
30271
  let r = sy;
30179
- return H(), L("div", zL, [
30272
+ return H(), L("div", qL, [
30180
30273
  e.rowsBinding ? (H(), F(HN, {
30181
30274
  key: 0,
30182
30275
  text: G(M)("designer.fieldTable.boundRowsHint")
30183
30276
  }, null, 8, ["text"])) : I("", !0),
30184
- R("div", BL, [R("div", VL, [
30277
+ R("div", JL, [R("div", YL, [
30185
30278
  z(r, {
30186
30279
  size: "small",
30187
30280
  variant: "outline",
@@ -30218,10 +30311,10 @@ var zL = { class: "table-rows" }, BL = { class: "table-rows__controls" }, VL = {
30218
30311
  default: q(() => [Wt(W(G(M)("designer.fieldTable.deleteRowTitle")), 1)]),
30219
30312
  _: 1
30220
30313
  }, 8, ["disabled"])
30221
- ]), R("div", HL, [R("span", {
30314
+ ]), R("div", XL, [R("span", {
30222
30315
  class: "table-rows__address",
30223
30316
  title: G(M)("designer.fieldTable.currentCell")
30224
- }, W(_.value), 9, UL), m.value ? (H(), L("span", WL, W(G(M)("designer.fieldTable.inlineEditing")), 1)) : (H(), F(SL, {
30317
+ }, W(_.value), 9, ZL), m.value ? (H(), L("span", QL, W(G(M)("designer.fieldTable.inlineEditing")), 1)) : (H(), F(AL, {
30225
30318
  key: 0,
30226
30319
  ref_key: "editor",
30227
30320
  ref: p,
@@ -30239,7 +30332,7 @@ var zL = { class: "table-rows" }, BL = { class: "table-rows__controls" }, VL = {
30239
30332
  ]))])]),
30240
30333
  z(HN, { text: G(M)("designer.fieldTable.gridHelp") }, null, 8, ["text"]),
30241
30334
  z(HN, { text: G(M)("designer.fieldTable.mergePreservesContent") }, null, 8, ["text"]),
30242
- R("div", GL, [R("div", {
30335
+ R("div", $L, [R("div", {
30243
30336
  ref_key: "grid",
30244
30337
  ref: f,
30245
30338
  class: "table-rows__grid",
@@ -30256,7 +30349,7 @@ var zL = { class: "table-rows" }, BL = { class: "table-rows__controls" }, VL = {
30256
30349
  key: `title-${t}`,
30257
30350
  class: "table-rows__heading",
30258
30351
  title: e.title
30259
- }, W(S(0, t).replace(/1$/, "")) + " · " + W(e.title), 9, qL))), 128)),
30352
+ }, W(S(0, t).replace(/1$/, "")) + " · " + W(e.title), 9, tR))), 128)),
30260
30353
  (H(!0), L(N, null, gn(G(c), (e, t) => (H(), L(N, { key: t }, [R("button", {
30261
30354
  class: "table-rows__index",
30262
30355
  tabindex: "-1",
@@ -30265,7 +30358,7 @@ var zL = { class: "table-rows" }, BL = { class: "table-rows__controls" }, VL = {
30265
30358
  gridColumn: 1
30266
30359
  }),
30267
30360
  onClick: (e) => G(l).select(t, 0)
30268
- }, W(t + 1), 13, JL), (H(!0), L(N, null, gn(G(a), (r, i) => (H(), L(N, { key: i }, [G(l).coveredCells.value.has(`${t}:${i}`) ? I("", !0) : (H(), L("div", {
30361
+ }, W(t + 1), 13, nR), (H(!0), L(N, null, gn(G(a), (r, i) => (H(), L(N, { key: i }, [G(l).coveredCells.value.has(`${t}:${i}`) ? I("", !0) : (H(), L("div", {
30269
30362
  key: 0,
30270
30363
  class: rn(["table-rows__cell", {
30271
30364
  "table-rows__cell--selected": G(l).contains(t, i),
@@ -30289,7 +30382,7 @@ var zL = { class: "table-rows" }, BL = { class: "table-rows__controls" }, VL = {
30289
30382
  onPointerdown: n[3] ||= Nn(() => {}, ["stop"]),
30290
30383
  onClick: n[4] ||= Nn(() => {}, ["stop"]),
30291
30384
  onDblclick: n[5] ||= Nn(() => {}, ["stop"])
30292
- }, [z(SL, {
30385
+ }, [z(AL, {
30293
30386
  ref_for: !0,
30294
30387
  ref: b,
30295
30388
  modelValue: g.value,
@@ -30300,8 +30393,8 @@ var zL = { class: "table-rows" }, BL = { class: "table-rows__controls" }, VL = {
30300
30393
  }, null, 8, ["modelValue", "aria-label"])], 32)) : e[i]?.includes("{{") ? (H(), F(Wa, {
30301
30394
  key: 1,
30302
30395
  text: e[i]
30303
- }, null, 8, ["text"])) : (H(), L("span", XL, W(e[i] || "\xA0"), 1))], 46, YL))], 64))), 128))], 64))), 128))
30304
- ], 12, KL)]),
30396
+ }, null, 8, ["text"])) : (H(), L("span", iR, W(e[i] || "\xA0"), 1))], 46, rR))], 64))), 128))], 64))), 128))
30397
+ ], 12, eR)]),
30305
30398
  G(i) === 0 ? (H(), F(HN, {
30306
30399
  key: 1,
30307
30400
  text: G(M)("designer.fieldTable.noColumnsMessage")
@@ -30311,10 +30404,10 @@ var zL = { class: "table-rows" }, BL = { class: "table-rows__controls" }, VL = {
30311
30404
  }
30312
30405
  }), [["__scopeId", "data-v-6a072c2e"]]);
30313
30406
  // src/designer/components/fields/use-table-columns.ts
30314
- function QL(e) {
30407
+ function oR(e) {
30315
30408
  let t = U(null), n = U(null);
30316
30409
  function r(t) {
30317
- let n = nL(e.getProps(), t, e.createColumn(t.length));
30410
+ let n = uL(e.getProps(), t, e.createColumn(t.length));
30318
30411
  return n ? (e.write(n), !0) : (e.onBlocked(), !1);
30319
30412
  }
30320
30413
  function i() {
@@ -30357,21 +30450,21 @@ function QL(e) {
30357
30450
  };
30358
30451
  }
30359
30452
  // src/designer/components/fields/field-table.vue?vue&type=script&setup=true&lang.ts
30360
- var $L = { class: "field-table" }, eR = [
30453
+ var sR = { class: "field-table" }, cR = [
30361
30454
  "draggable",
30362
30455
  "onDragstart",
30363
30456
  "onDragover",
30364
30457
  "onDrop"
30365
- ], tR = ["title"], nR = {
30458
+ ], lR = ["title"], uR = {
30366
30459
  key: 1,
30367
30460
  class: "field-table__entry-head"
30368
- }, rR = { class: "field-table__entry-body" }, iR = { class: "field-table__width" }, aR = {
30461
+ }, dR = { class: "field-table__entry-body" }, fR = { class: "field-table__width" }, pR = {
30369
30462
  key: 2,
30370
30463
  class: "field-table__advanced"
30371
- }, oR = { class: "field-table__stack" }, sR = {
30464
+ }, mR = { class: "field-table__stack" }, hR = {
30372
30465
  key: 2,
30373
30466
  class: "field-table__summary"
30374
- }, cR = { class: "field-table__summary-title" }, lR = { class: "field-table__summary-fields" }, uR = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
30467
+ }, gR = { class: "field-table__summary-title" }, _R = { class: "field-table__summary-fields" }, vR = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
30375
30468
  __name: "field-table",
30376
30469
  props: {
30377
30470
  bindings: {},
@@ -30385,7 +30478,7 @@ var $L = { class: "field-table" }, eR = [
30385
30478
  },
30386
30479
  emits: ["commit", "update:propsObject"],
30387
30480
  setup(e, { emit: t }) {
30388
- let n = e, r = t, i = vz().store(), a = ae(), { onVisibleChange: o, popupProps: s } = hM({}, "popup"), { columns: c, commit: l, draft: u, replace: d, summary: f } = RL(() => n.propsObject, j), { addColumn: p, dragColumnIndex: m, dragOverColumnIndex: h, onColumnDragEnd: g, onColumnDragOver: _, onColumnDragStart: v, onColumnDrop: y, removeColumn: b } = QL({
30481
+ let n = e, r = t, i = Ez().store(), a = ae(), { onVisibleChange: o, popupProps: s } = hM({}, "popup"), { columns: c, commit: l, draft: u, replace: d, summary: f } = KL(() => n.propsObject, j), { addColumn: p, dragColumnIndex: m, dragOverColumnIndex: h, onColumnDragEnd: g, onColumnDragOver: _, onColumnDragStart: v, onColumnDrop: y, removeColumn: b } = oR({
30389
30482
  createColumn(e) {
30390
30483
  return {
30391
30484
  align: "left",
@@ -30525,7 +30618,7 @@ var $L = { class: "field-table" }, eR = [
30525
30618
  }
30526
30619
  return (t, n) => {
30527
30620
  let u = sy, d = jS, b = MT, j = hC, ae = fA;
30528
- return H(), L("div", $L, [e.tableMode === "columns" ? (H(), L(N, { key: 0 }, [
30621
+ return H(), L("div", sR, [e.tableMode === "columns" ? (H(), L(N, { key: 0 }, [
30529
30622
  !x.value && !e.embedded ? (H(), F(HN, {
30530
30623
  key: 0,
30531
30624
  text: G(M)("designer.fieldTable.bindRowsFirstTitle")
@@ -30550,14 +30643,14 @@ var $L = { class: "field-table" }, eR = [
30550
30643
  }, [z($, {
30551
30644
  name: "drag",
30552
30645
  class: "h-3.5 w-3.5"
30553
- })], 8, tR)),
30554
- e.embedded ? I("", !0) : (H(), L("div", nR, [
30646
+ })], 8, lR)),
30647
+ e.embedded ? I("", !0) : (H(), L("div", uR, [
30555
30648
  e.embedded ? I("", !0) : (H(), F(fP, {
30556
30649
  key: 0,
30557
30650
  label: G(M)("designer.fieldTable.columnTitleLabel"),
30558
30651
  class: "min-w-0 flex-1"
30559
30652
  }, {
30560
- default: q(() => [z(SL, {
30653
+ default: q(() => [z(AL, {
30561
30654
  modelValue: t.title,
30562
30655
  "onUpdate:modelValue": (e) => t.title = e,
30563
30656
  placeholder: G(M)("designer.fieldTable.columnTitlePlaceholder"),
@@ -30608,7 +30701,7 @@ var $L = { class: "field-table" }, eR = [
30608
30701
  "onClick"
30609
30702
  ]))
30610
30703
  ])),
30611
- R("div", rR, [z(fP, {
30704
+ R("div", dR, [z(fP, {
30612
30705
  label: G(M)("designer.fieldTable.bindingPlaceholder"),
30613
30706
  help: G(M)("designer.fieldTable.bindingTitle")
30614
30707
  }, {
@@ -30645,7 +30738,7 @@ var $L = { class: "field-table" }, eR = [
30645
30738
  ])]),
30646
30739
  _: 2
30647
30740
  }, 1032, ["label", "help"]), z(fP, { label: G(M)("designer.fieldTable.widthModeTitle") }, {
30648
- default: q(() => [R("div", iR, [z(b, {
30741
+ default: q(() => [R("div", fR, [z(b, {
30649
30742
  "model-value": t.widthMode ?? "weight",
30650
30743
  "popup-props": G(s),
30651
30744
  options: w.value,
@@ -30676,7 +30769,7 @@ var $L = { class: "field-table" }, eR = [
30676
30769
  ])])]),
30677
30770
  _: 2
30678
30771
  }, 1032, ["label"])]),
30679
- !e.widthOnly && (e.expanded || D.value === r) ? (H(), L("div", aR, [
30772
+ !e.widthOnly && (e.expanded || D.value === r) ? (H(), L("div", pR, [
30680
30773
  z(fP, { label: G(M)("designer.fieldTable.alignTitle") }, {
30681
30774
  default: q(() => [z(b, {
30682
30775
  modelValue: t.align,
@@ -30741,7 +30834,7 @@ var $L = { class: "field-table" }, eR = [
30741
30834
  _: 2
30742
30835
  }, 1032, ["label"]),
30743
30836
  z(fP, { label: G(M)("designer.fieldTable.textColorTitle") }, {
30744
- default: q(() => [z(PI, {
30837
+ default: q(() => [z(HI, {
30745
30838
  "model-value": t.color ?? "",
30746
30839
  "onUpdate:modelValue": (e) => {
30747
30840
  t.color = String(e), G(l)();
@@ -30750,7 +30843,7 @@ var $L = { class: "field-table" }, eR = [
30750
30843
  _: 2
30751
30844
  }, 1032, ["label"]),
30752
30845
  z(fP, { label: G(M)("designer.fieldTable.backgroundTitle") }, {
30753
- default: q(() => [z(PI, {
30846
+ default: q(() => [z(HI, {
30754
30847
  "model-value": t.background ?? "",
30755
30848
  "allow-none": "",
30756
30849
  "onUpdate:modelValue": (e) => {
@@ -30769,7 +30862,7 @@ var $L = { class: "field-table" }, eR = [
30769
30862
  _: 2
30770
30863
  }, 1032, ["label"]),
30771
30864
  z(fP, { label: G(M)("designer.fieldTable.formatTitle") }, {
30772
- default: q(() => [R("div", oR, [
30865
+ default: q(() => [R("div", mR, [
30773
30866
  z(b, {
30774
30867
  "model-value": t.format?.type ?? "none",
30775
30868
  "popup-props": G(s),
@@ -30890,7 +30983,7 @@ var $L = { class: "field-table" }, eR = [
30890
30983
  _: 2
30891
30984
  }, 1032, ["label"])
30892
30985
  ])) : I("", !0)
30893
- ], 42, eR)), [[kn, e.columnIndex === void 0 || e.columnIndex === r]])), 128)),
30986
+ ], 42, cR)), [[kn, e.columnIndex === void 0 || e.columnIndex === r]])), 128)),
30894
30987
  e.embedded ? I("", !0) : (H(), F(u, {
30895
30988
  key: 1,
30896
30989
  block: "",
@@ -30904,25 +30997,25 @@ var $L = { class: "field-table" }, eR = [
30904
30997
  default: q(() => [Wt(" " + W(G(M)("designer.fieldTable.addColumnButton")), 1)]),
30905
30998
  _: 1
30906
30999
  }, 8, ["onClick"])),
30907
- !e.embedded || e.showMergeRules ? (H(), F(AL, {
31000
+ !e.embedded || e.showMergeRules ? (H(), F(RL, {
30908
31001
  key: 2,
30909
31002
  "props-object": e.propsObject,
30910
31003
  bindings: e.bindings,
30911
31004
  "onUpdate:propsObject": n[2] ||= (e) => r("update:propsObject", e),
30912
31005
  onCommit: n[3] ||= (e) => r("commit")
30913
31006
  }, null, 8, ["props-object", "bindings"])) : I("", !0)
30914
- ], 64)) : e.tableMode === "rows" || e.tableMode === "headers" ? (H(), F(ZL, {
31007
+ ], 64)) : e.tableMode === "rows" || e.tableMode === "headers" ? (H(), F(aR, {
30915
31008
  key: 1,
30916
31009
  "props-object": e.propsObject,
30917
31010
  "rows-binding": x.value,
30918
31011
  "onUpdate:propsObject": n[4] ||= (e) => r("update:propsObject", e),
30919
31012
  onCommit: n[5] ||= (e) => r("commit")
30920
- }, null, 8, ["props-object", "rows-binding"])) : (H(), L("div", sR, [(H(!0), L(N, null, gn(G(c), (e, t) => (H(), L("div", {
31013
+ }, null, 8, ["props-object", "rows-binding"])) : (H(), L("div", hR, [(H(!0), L(N, null, gn(G(c), (e, t) => (H(), L("div", {
30921
31014
  key: t,
30922
31015
  class: "field-table__summary-column"
30923
31016
  }, [
30924
- R("div", cR, W(e.title || G(M)("designer.fieldTable.columnTitlePlaceholder")), 1),
30925
- R("div", lR, [z(fP, {
31017
+ R("div", gR, W(e.title || G(M)("designer.fieldTable.columnTitlePlaceholder")), 1),
31018
+ R("div", _R, [z(fP, {
30926
31019
  stacked: "",
30927
31020
  label: G(M)("designer.fieldTable.summaryTypeTitle")
30928
31021
  }, {
@@ -30947,7 +31040,7 @@ var $L = { class: "field-table" }, eR = [
30947
31040
  stacked: "",
30948
31041
  label: G(M)("designer.fieldTable.summaryTextTitle")
30949
31042
  }, {
30950
- default: q(() => [z(SL, {
31043
+ default: q(() => [z(AL, {
30951
31044
  "model-value": G(f).columns[String(t)]?.text ?? "",
30952
31045
  "onUpdate:modelValue": (e) => {
30953
31046
  ce(t, String(e));
@@ -30960,7 +31053,7 @@ var $L = { class: "field-table" }, eR = [
30960
31053
  ])]),
30961
31054
  _: 2
30962
31055
  }, 1032, ["label"])) : I("", !0)]),
30963
- z(NL, {
31056
+ z(VL, {
30964
31057
  "model-value": G(f).columns[String(t)]?.style,
30965
31058
  "onUpdate:modelValue": (e) => oe(t).style = e,
30966
31059
  onCommit: G(l)
@@ -30988,7 +31081,7 @@ var $L = { class: "field-table" }, eR = [
30988
31081
  }
30989
31082
  }), [["__scopeId", "data-v-d7760b2c"]]);
30990
31083
  // src/designer/components/fields/use-table-column-resize.ts
30991
- function dR(e) {
31084
+ function yR(e) {
30992
31085
  let t;
30993
31086
  function n(n, r) {
30994
31087
  if (n.button !== 0) return;
@@ -30996,13 +31089,13 @@ function dR(e) {
30996
31089
  let i = n.currentTarget, a = i.closest("table")?.getBoundingClientRect().width ?? 0;
30997
31090
  if (a <= 0) return;
30998
31091
  let o = [...e.widths.value], s = o.reduce((e, t) => e + t, 0), c = e.table.value.columns;
30999
- t = FL({
31092
+ t = UL({
31000
31093
  onEnd(t, n) {
31001
31094
  n && e.commit();
31002
31095
  },
31003
31096
  onMove(t) {
31004
31097
  let n = (t.lastPoint.x - t.startPoint.x) * s / a;
31005
- e.write({ columns: iL(c, o, r, n) });
31098
+ e.write({ columns: fL(c, o, r, n) });
31006
31099
  },
31007
31100
  pointerId: n.pointerId,
31008
31101
  startPoint: {
@@ -31017,8 +31110,8 @@ function dR(e) {
31017
31110
  return sn(() => t?.()), { resizeColumn: n };
31018
31111
  }
31019
31112
  // src/designer/components/fields/use-table-header-selection.ts
31020
- function fR(e) {
31021
- return IL({
31113
+ function bR(e) {
31114
+ return WL({
31022
31115
  ...e,
31023
31116
  cellSelector: "[data-header-row]",
31024
31117
  getCell(e) {
@@ -31032,8 +31125,8 @@ function fR(e) {
31032
31125
  });
31033
31126
  }
31034
31127
  // src/designer/components/fields/use-table-headers.ts
31035
- function pR(e) {
31036
- let { selection: n, table: r } = e, a = U(!1), s = P(() => eL(r.value)), c = P(() => !!r.value.headerRows?.length), l = P(() => {
31128
+ function xR(e) {
31129
+ let { selection: n, table: r } = e, a = U(!1), s = P(() => cL(r.value)), c = P(() => !!r.value.headerRows?.length), l = P(() => {
31037
31130
  let e = n.value;
31038
31131
  return !!(e && (e.colspan > 1 || e.rowspan > 1) && !(r.value.headerMerges ?? []).some((t) => e.row === t.row && e.col === t.col && e.rowspan === t.rowspan && e.colspan === t.colspan));
31039
31132
  }), u = P(() => (r.value.headerMerges ?? []).some(d));
@@ -31101,32 +31194,32 @@ function pR(e) {
31101
31194
  };
31102
31195
  }
31103
31196
  // src/designer/components/fields/field-table-structure.vue?vue&type=script&setup=true&lang.ts
31104
- var mR = { class: "table-structure" }, hR = { class: "table-structure__section-content" }, gR = {
31197
+ var SR = { class: "table-structure" }, CR = { class: "table-structure__section-content" }, wR = {
31105
31198
  key: 0,
31106
31199
  class: "table-structure__options"
31107
- }, _R = {
31200
+ }, TR = {
31108
31201
  key: 1,
31109
31202
  class: "table-structure__toolbar"
31110
- }, vR = { class: "table-structure__viewport" }, yR = ["onDrop"], bR = [
31203
+ }, ER = { class: "table-structure__viewport" }, DR = ["onDrop"], OR = [
31111
31204
  "draggable",
31112
31205
  "aria-pressed",
31113
31206
  "onClick",
31114
31207
  "onDragstart"
31115
- ], xR = {
31208
+ ], kR = {
31116
31209
  key: 0,
31117
31210
  class: "table-structure__binding"
31118
- }, SR = [
31211
+ }, AR = [
31119
31212
  "aria-label",
31120
31213
  "title",
31121
31214
  "onPointerdown",
31122
31215
  "onClick"
31123
- ], CR = [
31216
+ ], jR = [
31124
31217
  "colspan",
31125
31218
  "rowspan",
31126
31219
  "data-header-row",
31127
31220
  "data-header-col",
31128
31221
  "onPointerdown"
31129
- ], wR = { key: 0 }, TR = ["onClick"], ER = ["colspan", "rowspan"], DR = ["aria-label", "onClick"], OR = { class: "table-structure__section-content" }, kR = { class: "table-structure__selection" }, AR = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
31222
+ ], MR = { key: 0 }, NR = ["onClick"], PR = ["colspan", "rowspan"], FR = ["aria-label", "onClick"], IR = { class: "table-structure__section-content" }, LR = { class: "table-structure__selection" }, RR = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
31130
31223
  __name: "field-table-structure",
31131
31224
  props: /*@__PURE__*/ tn({
31132
31225
  bindings: {},
@@ -31138,7 +31231,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31138
31231
  }),
31139
31232
  emits: /*@__PURE__*/ tn(["commit"], ["update:modelValue"]),
31140
31233
  setup(e, { emit: t }) {
31141
- let n = e, r = Dn(e, "modelValue"), a = t, o = vz(), s = o.store(), c = U(0), u = U(!1), d = P(() => S(r.value)), f = P(() => eL(d.value)), p = P(() => k(d.value.columns.map((e) => ({
31234
+ let n = e, r = Dn(e, "modelValue"), a = t, o = Ez(), s = o.store(), c = U(0), u = U(!1), d = P(() => S(r.value)), f = P(() => cL(d.value)), p = P(() => k(d.value.columns.map((e) => ({
31142
31235
  ...e,
31143
31236
  mergeSame: !1
31144
31237
  })), f.value, d.value.headerMerges)), m = P(() => b(d.value, n.node?.width ?? 120)), h = P(() => m.value.reduce((e, t) => e + t, 0) || 1), g = P(() => Math.max(280, ...m.value.map((e) => 80 * h.value / e))), _ = P(() => {
@@ -31164,12 +31257,12 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31164
31257
  elementWidthMm: n.node?.width ?? 120,
31165
31258
  rows: e.rows.slice(0, 3)
31166
31259
  }).rows;
31167
- }), v = P(() => Math.min(c.value, Math.max(0, d.value.columns.length - 1))), { begin: y, clear: x, contains: C, focus: T, select: E, selection: D } = fR({
31260
+ }), v = P(() => Math.min(c.value, Math.max(0, d.value.columns.length - 1))), { begin: y, clear: x, contains: C, focus: T, select: E, selection: D } = bR({
31168
31261
  columnCount: P(() => d.value.columns.length),
31169
31262
  merges: P(() => d.value.headerMerges ?? []),
31170
31263
  onColumnSelect: me,
31171
31264
  rows: f
31172
- }), { addRow: O, canMerge: A, canSplit: j, commitText: ee, mergeSelection: te, removeRow: re, setText: ie, splitSelection: ae } = pR({
31265
+ }), { addRow: O, canMerge: A, canSplit: j, commitText: ee, mergeSelection: te, removeRow: re, setText: ie, splitSelection: ae } = xR({
31173
31266
  clearSelection: x,
31174
31267
  commit: ve,
31175
31268
  getInput: () => ct(s.document.data),
@@ -31178,7 +31271,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31178
31271
  selection: D,
31179
31272
  table: d,
31180
31273
  write: fe
31181
- }), { addColumn: oe, dragColumnIndex: se, moveColumn: ce, onColumnDrop: le, removeColumn: ue } = QL({
31274
+ }), { addColumn: oe, dragColumnIndex: se, moveColumn: ce, onColumnDrop: le, removeColumn: ue } = oR({
31182
31275
  createColumn(e) {
31183
31276
  return {
31184
31277
  align: "left",
@@ -31191,7 +31284,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31191
31284
  write(e) {
31192
31285
  fe({ ...e }), x(), ve();
31193
31286
  }
31194
- }), { resizeColumn: de } = dR({
31287
+ }), { resizeColumn: de } = yR({
31195
31288
  commit: ve,
31196
31289
  onColumnSelect: me,
31197
31290
  table: d,
@@ -31248,11 +31341,11 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31248
31341
  c.value = e ?? 0;
31249
31342
  }), (t, n) => {
31250
31343
  let i = sy;
31251
- return H(), L("div", mR, [
31344
+ return H(), L("div", SR, [
31252
31345
  z(JN, { title: G(M)("designer.tableStructure.headerSection") }, {
31253
- default: q(() => [R("div", hR, [
31254
- e.widthOnly ? I("", !0) : (H(), L("div", gR, [z(fP, { label: G(M)("elements.tableElement.showHeaderLabel") }, {
31255
- default: q(() => [z(jI, {
31346
+ default: q(() => [R("div", CR, [
31347
+ e.widthOnly ? I("", !0) : (H(), L("div", wR, [z(fP, { label: G(M)("elements.tableElement.showHeaderLabel") }, {
31348
+ default: q(() => [z(zI, {
31256
31349
  "model-value": d.value.headerVisible !== !1,
31257
31350
  "onUpdate:modelValue": n[0] ||= (e) => r.value = {
31258
31351
  ...r.value,
@@ -31262,7 +31355,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31262
31355
  }, null, 8, ["model-value"])]),
31263
31356
  _: 1
31264
31357
  }, 8, ["label"])])),
31265
- e.widthOnly ? I("", !0) : (H(), L("div", _R, [z(i, {
31358
+ e.widthOnly ? I("", !0) : (H(), L("div", TR, [z(i, {
31266
31359
  variant: "outline",
31267
31360
  size: "small",
31268
31361
  title: G(M)("designer.tableStructure.addColumn"),
@@ -31327,7 +31420,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31327
31420
  _: 1
31328
31421
  }, 8, ["disabled", "onClick"])
31329
31422
  ], 64))])),
31330
- R("div", vR, [R("table", {
31423
+ R("div", ER, [R("table", {
31331
31424
  class: "table-structure__table",
31332
31425
  style: on({ minWidth: `${g.value}px` })
31333
31426
  }, [
@@ -31354,8 +31447,8 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31354
31447
  class: "h-3.5 w-3.5"
31355
31448
  }),
31356
31449
  R("span", null, W(ye(r)), 1),
31357
- t.bind ? (H(), L("span", xR, W(t.bind), 1)) : I("", !0)
31358
- ], 40, bR), r < d.value.columns.length - 1 ? (H(), L("button", {
31450
+ t.bind ? (H(), L("span", kR, W(t.bind), 1)) : I("", !0)
31451
+ ], 40, OR), r < d.value.columns.length - 1 ? (H(), L("button", {
31359
31452
  key: 0,
31360
31453
  type: "button",
31361
31454
  class: "table-structure__resize",
@@ -31366,7 +31459,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31366
31459
  }, [z($, {
31367
31460
  name: "drag",
31368
31461
  class: "h-3.5 w-3.5"
31369
- })], 40, SR)) : I("", !0)], 40, yR))), 128))]), d.value.headerVisible === !1 ? I("", !0) : (H(!0), L(N, { key: 0 }, gn(f.value, (t, n) => (H(), L("tr", { key: n }, [(H(!0), L(N, null, gn(d.value.columns, (r, i) => (H(), L(N, { key: i }, [p.value.covered.has(`${n}:${i}`) ? I("", !0) : (H(), L("th", {
31462
+ })], 40, AR)) : I("", !0)], 40, DR))), 128))]), d.value.headerVisible === !1 ? I("", !0) : (H(!0), L(N, { key: 0 }, gn(f.value, (t, n) => (H(), L("tr", { key: n }, [(H(!0), L(N, null, gn(d.value.columns, (r, i) => (H(), L(N, { key: i }, [p.value.covered.has(`${n}:${i}`) ? I("", !0) : (H(), L("th", {
31370
31463
  key: 0,
31371
31464
  colspan: be(n, i).colspan,
31372
31465
  rowspan: be(n, i).rowspan,
@@ -31374,11 +31467,11 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31374
31467
  "data-header-col": i,
31375
31468
  class: rn({ "table-structure__header--selected": G(C)(n, i) }),
31376
31469
  onPointerdown: (t) => !e.widthOnly && G(y)(t, n, i)
31377
- }, [e.widthOnly ? (H(), L("span", wR, W(t[i] || "\xA0"), 1)) : (H(), L("div", {
31470
+ }, [e.widthOnly ? (H(), L("span", MR, W(t[i] || "\xA0"), 1)) : (H(), L("div", {
31378
31471
  key: 1,
31379
31472
  class: "table-structure__header-input",
31380
31473
  onClick: Nn((e) => G(E)(n, i, !0), ["shift"])
31381
- }, [z(SL, {
31474
+ }, [z(AL, {
31382
31475
  "model-value": t[i] ?? "",
31383
31476
  "aria-label": G(M)("designer.tableStructure.headerCell", {
31384
31477
  row: n + 1,
@@ -31393,7 +31486,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31393
31486
  "onUpdate:modelValue",
31394
31487
  "onFocus",
31395
31488
  "onCommit"
31396
- ])], 8, TR))], 42, CR))], 64))), 128))]))), 128))]),
31489
+ ])], 8, NR))], 42, jR))], 64))), 128))]))), 128))]),
31397
31490
  R("tbody", null, [(H(!0), L(N, null, gn(_.value, (e, t) => (H(), L("tr", { key: t }, [(H(!0), L(N, null, gn(e.cells, (e) => (H(), L("td", {
31398
31491
  key: e.col,
31399
31492
  colspan: e.colSpan,
@@ -31406,7 +31499,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31406
31499
  }, [z($, {
31407
31500
  name: "table",
31408
31501
  class: "h-3.5 w-3.5 shrink-0"
31409
- }), Wt(" " + W(e.text || "\xA0"), 1)], 8, DR)], 8, ER))), 128))]))), 128))])
31502
+ }), Wt(" " + W(e.text || "\xA0"), 1)], 8, FR)], 8, PR))), 128))]))), 128))])
31410
31503
  ], 4)])
31411
31504
  ])]),
31412
31505
  _: 1
@@ -31415,7 +31508,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31415
31508
  key: 0,
31416
31509
  title: G(M)("designer.tableStructure.columnSection")
31417
31510
  }, {
31418
- default: q(() => [R("div", OR, [R("div", kR, [
31511
+ default: q(() => [R("div", IR, [R("div", LR, [
31419
31512
  R("span", null, W(G(M)("designer.tableStructure.columnSettings", { number: v.value + 1 })), 1),
31420
31513
  e.widthOnly ? I("", !0) : (H(), F(i, {
31421
31514
  key: 0,
@@ -31489,7 +31582,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31489
31582
  })]),
31490
31583
  _: 1
31491
31584
  }, 8, ["title", "aria-label"]))
31492
- ]), d.value.columns.length ? (H(), F(uR, {
31585
+ ]), d.value.columns.length ? (H(), F(vR, {
31493
31586
  key: 0,
31494
31587
  "props-object": r.value,
31495
31588
  bindings: e.bindings,
@@ -31509,7 +31602,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31509
31602
  ])) : I("", !0)])]),
31510
31603
  _: 1
31511
31604
  }, 8, ["title"])) : I("", !0),
31512
- e.widthOnly ? I("", !0) : (H(), F(AL, {
31605
+ e.widthOnly ? I("", !0) : (H(), F(RL, {
31513
31606
  key: 1,
31514
31607
  "props-object": r.value,
31515
31608
  bindings: e.bindings,
@@ -31519,7 +31612,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31519
31612
  ]);
31520
31613
  };
31521
31614
  }
31522
- }), [["__scopeId", "data-v-c2e01866"]]), jR = /* @__PURE__ */ B({
31615
+ }), [["__scopeId", "data-v-c2e01866"]]), zR = /* @__PURE__ */ B({
31523
31616
  __name: "table-inspector-control",
31524
31617
  props: /*@__PURE__*/ tn({
31525
31618
  bindings: { default: void 0 },
@@ -31533,7 +31626,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31533
31626
  }),
31534
31627
  emits: /*@__PURE__*/ tn(["commit"], ["update:modelValue"]),
31535
31628
  setup(e, { emit: t }) {
31536
- let n = e, r = Dn(e, "modelValue"), i = t, a = vz(), o = P(() => n.tableMode !== "layout" || !n.node ? n.node : fe(a.store().document.data, {
31629
+ let n = e, r = Dn(e, "modelValue"), i = t, a = Ez(), o = P(() => n.tableMode !== "layout" || !n.node ? n.node : fe(a.store().document.data, {
31537
31630
  ...n.node,
31538
31631
  props: r.value
31539
31632
  }, a.elements)), s = P({
@@ -31547,7 +31640,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31547
31640
  function c() {
31548
31641
  i("commit");
31549
31642
  }
31550
- return (t, n) => e.tableMode === "structure" || e.tableMode === "layout" ? (H(), F(AR, {
31643
+ return (t, n) => e.tableMode === "structure" || e.tableMode === "layout" ? (H(), F(RR, {
31551
31644
  key: 0,
31552
31645
  modelValue: s.value,
31553
31646
  "onUpdate:modelValue": n[0] ||= (e) => s.value = e,
@@ -31560,7 +31653,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31560
31653
  "width-only",
31561
31654
  "bindings",
31562
31655
  "node"
31563
- ])) : (H(), F(uR, {
31656
+ ])) : (H(), F(vR, {
31564
31657
  key: 1,
31565
31658
  "props-object": r.value,
31566
31659
  "onUpdate:propsObject": n[1] ||= (e) => r.value = e,
@@ -31573,27 +31666,27 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31573
31666
  "table-mode"
31574
31667
  ]));
31575
31668
  }
31576
- }), MR = 0, NR;
31577
- function PR() {
31578
- --MR, MR === 0 && (NR?.(), NR = void 0);
31669
+ }), BR = 0, VR;
31670
+ function HR() {
31671
+ --BR, BR === 0 && (VR?.(), VR = void 0);
31579
31672
  }
31580
- var FR = {
31673
+ var UR = {
31581
31674
  get description() {
31582
31675
  return M("designer.tdesignForms.pluginDescription");
31583
31676
  },
31584
31677
  name: "builtin:tdesign-forms",
31585
31678
  setup: () => {
31586
- if (MR += 1, MR > 1) return PR;
31679
+ if (BR += 1, BR > 1) return HR;
31587
31680
  let e = [
31588
- ["tableContinuationLayoutField", XI],
31589
- ["booleanField", jI],
31590
- ["imageField", KI],
31591
- ["colorField", PI],
31592
- ["collectionPicker", $I],
31593
- ["tableField", jR],
31594
- ["tableBordersField", JI],
31595
- ["tableDataPreview", VI],
31596
- ["variableTextField", SL]
31681
+ ["tableContinuationLayoutField", iL],
31682
+ ["booleanField", zI],
31683
+ ["imageField", eL],
31684
+ ["colorField", HI],
31685
+ ["collectionPicker", sL],
31686
+ ["tableField", zR],
31687
+ ["tableBordersField", nL],
31688
+ ["tableDataPreview", YI],
31689
+ ["variableTextField", AL]
31597
31690
  ].map(([e, t]) => {
31598
31691
  let n = qM(e);
31599
31692
  return WM(e, t, { override: !0 }), function() {
@@ -31631,11 +31724,11 @@ var FR = {
31631
31724
  columns: n.props.columns
31632
31725
  },
31633
31726
  type: "tableDataPreview"
31634
- }))), NR = () => {
31727
+ }))), VR = () => {
31635
31728
  for (let t of e.reverse()) t();
31636
- }, PR;
31729
+ }, HR;
31637
31730
  }
31638
- }, IR = {
31731
+ }, WR = {
31639
31732
  name: "builtin:template-library",
31640
31733
  setup(e) {
31641
31734
  let t = e.templateLibrary.register(Xe()), n = e.commands.registerScoped([
@@ -31689,7 +31782,7 @@ var FR = {
31689
31782
  code: "document.invalid"
31690
31783
  });
31691
31784
  }
31692
- let { document: s, skippedTypes: c } = _e(o, e.elements);
31785
+ let { document: s, skippedTypes: c } = ge(o, e.elements);
31693
31786
  if (c.length) throw new nt(M("designer.documentStore.skippedElementTypesMessage", { elementTypes: c.join(", ") }), { code: "document.unsupported-elements" });
31694
31787
  await r.create(s);
31695
31788
  },
@@ -31726,21 +31819,21 @@ var FR = {
31726
31819
  }
31727
31820
  };
31728
31821
  // src/plugins/pen/editing-geometry.ts
31729
- function LR(e, t) {
31822
+ function GR(e, t) {
31730
31823
  let n = Ne(e.props), r = e.rotation * Math.PI / 180, i = (t.x / n.viewWidth - .5) * e.width, a = (t.y / n.viewHeight - .5) * e.height;
31731
31824
  return {
31732
31825
  x: e.x + e.width / 2 + i * Math.cos(r) - a * Math.sin(r),
31733
31826
  y: e.y + e.height / 2 + i * Math.sin(r) + a * Math.cos(r)
31734
31827
  };
31735
31828
  }
31736
- function RR(e, t) {
31829
+ function KR(e, t) {
31737
31830
  let n = Ne(e.props), r = e.rotation * Math.PI / 180, i = t.x - e.x - e.width / 2, a = t.y - e.y - e.height / 2;
31738
31831
  return {
31739
31832
  x: ((i * Math.cos(r) + a * Math.sin(r)) / e.width + .5) * n.viewWidth,
31740
31833
  y: ((-i * Math.sin(r) + a * Math.cos(r)) / e.height + .5) * n.viewHeight
31741
31834
  };
31742
31835
  }
31743
- function zR(e, t, n, r) {
31836
+ function qR(e, t, n, r) {
31744
31837
  let i = {
31745
31838
  incoming: { ...e.incoming },
31746
31839
  outgoing: { ...e.outgoing },
@@ -31759,8 +31852,8 @@ function zR(e, t, n, r) {
31759
31852
  }
31760
31853
  return i;
31761
31854
  }
31762
- function BR(e, t) {
31763
- let n = Ne(e.props), r = Ce(t, n.closed), i = LR(e, {
31855
+ function JR(e, t) {
31856
+ let n = Ne(e.props), r = Ce(t, n.closed), i = GR(e, {
31764
31857
  x: r.x + r.width / 2,
31765
31858
  y: r.y + r.height / 2
31766
31859
  }), a = r.width / n.viewWidth * e.width, o = r.height / n.viewHeight * e.height;
@@ -31778,13 +31871,13 @@ function BR(e, t) {
31778
31871
  };
31779
31872
  }
31780
31873
  // src/plugins/pen/pen-edit-surface.vue?vue&type=script&setup=true&lang.ts
31781
- var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
31874
+ var YR = ["aria-label"], XR = ["transform"], ZR = ["d", "stroke-width"], QR = [
31782
31875
  "x1",
31783
31876
  "y1",
31784
31877
  "x2",
31785
31878
  "y2",
31786
31879
  "stroke-width"
31787
- ], GR = [
31880
+ ], $R = [
31788
31881
  "data-pen-control",
31789
31882
  "data-anchor-index",
31790
31883
  "cx",
@@ -31792,7 +31885,7 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
31792
31885
  "r",
31793
31886
  "stroke-width",
31794
31887
  "onPointerdown"
31795
- ], KR = [
31888
+ ], ez = [
31796
31889
  "data-anchor-index",
31797
31890
  "x",
31798
31891
  "y",
@@ -31800,7 +31893,7 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
31800
31893
  "height",
31801
31894
  "stroke-width",
31802
31895
  "onPointerdown"
31803
- ], qR = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
31896
+ ], tz = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
31804
31897
  __name: "pen-edit-surface",
31805
31898
  props: {
31806
31899
  context: {},
@@ -31809,9 +31902,9 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
31809
31902
  },
31810
31903
  setup(e) {
31811
31904
  let t = e, n = U(), r = Sn(), i = P(() => t.context.canvas.pxPerMm), a = P(() => Ne(t.node.props).anchors.map((e) => ({
31812
- incoming: LR(t.node, e.incoming),
31813
- outgoing: LR(t.node, e.outgoing),
31814
- point: LR(t.node, e.point)
31905
+ incoming: GR(t.node, e.incoming),
31906
+ outgoing: GR(t.node, e.outgoing),
31907
+ point: GR(t.node, e.point)
31815
31908
  }))), o = `pen.edit.${t.node.id}`, s;
31816
31909
  eP([{
31817
31910
  run: () => c("cancel"),
@@ -31852,7 +31945,7 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
31852
31945
  edit: o,
31853
31946
  index: i,
31854
31947
  node: t.node,
31855
- origin: RR(t.node, l(e)),
31948
+ origin: KR(t.node, l(e)),
31856
31949
  pointerId: e.pointerId,
31857
31950
  pullHandles: s
31858
31951
  }, n.value?.focus({ preventScroll: !0 }), n.value?.setPointerCapture(e.pointerId);
@@ -31860,11 +31953,11 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
31860
31953
  function p(e) {
31861
31954
  let n = r.value;
31862
31955
  if (!n || e.pointerId !== n.pointerId || t.context.canvas.panning) return;
31863
- let i = RR(n.node, l(e)), a = n.anchors[n.index], o = {
31956
+ let i = KR(n.node, l(e)), a = n.anchors[n.index], o = {
31864
31957
  x: a[n.control].x + i.x - n.origin.x,
31865
31958
  y: a[n.control].y + i.y - n.origin.y
31866
- }, s = n.anchors.map((t, r) => r === n.index ? zR(t, n.control, o, e.altKey && !n.pullHandles) : t);
31867
- n.edit.update(BR(n.node, s)) || d(!1);
31959
+ }, s = n.anchors.map((t, r) => r === n.index ? qR(t, n.control, o, e.altKey && !n.pullHandles) : t);
31960
+ n.edit.update(JR(n.node, s)) || d(!1);
31868
31961
  }
31869
31962
  function m(e) {
31870
31963
  e.pointerId === r.value?.pointerId && h(() => d(!0));
@@ -31910,7 +32003,7 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
31910
32003
  fill: "none",
31911
32004
  stroke: "#287dff",
31912
32005
  "stroke-width": 1 / i.value
31913
- }, null, 8, UR), (H(!0), L(N, null, gn(a.value, (e, t) => (H(), L("g", { key: t }, [
32006
+ }, null, 8, ZR), (H(!0), L(N, null, gn(a.value, (e, t) => (H(), L("g", { key: t }, [
31914
32007
  R("line", {
31915
32008
  x1: e.incoming.x,
31916
32009
  y1: e.incoming.y,
@@ -31918,7 +32011,7 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
31918
32011
  y2: e.outgoing.y,
31919
32012
  stroke: "#287dff",
31920
32013
  "stroke-width": 1 / i.value
31921
- }, null, 8, WR),
32014
+ }, null, 8, QR),
31922
32015
  (H(), L(N, null, gn(["incoming", "outgoing"], (n) => R("circle", {
31923
32016
  key: n,
31924
32017
  "data-pen-control": n,
@@ -31931,7 +32024,7 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
31931
32024
  stroke: "#287dff",
31932
32025
  "stroke-width": 1 / i.value,
31933
32026
  onPointerdown: (e) => h(() => f(e, t, n))
31934
- }, null, 40, GR)), 64)),
32027
+ }, null, 40, $R)), 64)),
31935
32028
  R("rect", {
31936
32029
  "data-pen-control": "point",
31937
32030
  "data-anchor-index": t,
@@ -31944,30 +32037,30 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
31944
32037
  stroke: "white",
31945
32038
  "stroke-width": 1 / i.value,
31946
32039
  onPointerdown: (e) => h(() => f(e, t, "point"))
31947
- }, null, 40, KR)
31948
- ]))), 128))], 8, HR)], 40, VR));
32040
+ }, null, 40, ez)
32041
+ ]))), 128))], 8, XR)], 40, YR));
31949
32042
  }
31950
- }), [["__scopeId", "data-v-f5c06aa3"]]), JR = ["aria-label"], YR = ["transform"], XR = ["d", "stroke-width"], ZR = [
32043
+ }), [["__scopeId", "data-v-f5c06aa3"]]), nz = ["aria-label"], rz = ["transform"], iz = ["d", "stroke-width"], az = [
31951
32044
  "x1",
31952
32045
  "y1",
31953
32046
  "x2",
31954
32047
  "y2",
31955
32048
  "stroke-width"
31956
- ], QR = [
32049
+ ], oz = [
31957
32050
  "cx",
31958
32051
  "cy",
31959
32052
  "r"
31960
- ], $R = [
32053
+ ], sz = [
31961
32054
  "cx",
31962
32055
  "cy",
31963
32056
  "r"
31964
- ], ez = [
32057
+ ], cz = [
31965
32058
  "x",
31966
32059
  "y",
31967
32060
  "width",
31968
32061
  "height",
31969
32062
  "stroke-width"
31970
- ], tz = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
32063
+ ], lz = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
31971
32064
  __name: "pen-surface",
31972
32065
  props: {
31973
32066
  context: {},
@@ -32121,7 +32214,7 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
32121
32214
  fill: "none",
32122
32215
  stroke: "#287dff",
32123
32216
  "stroke-width": 1.5 / c.value
32124
- }, null, 8, XR), (H(!0), L(N, null, gn(r.value, (e, t) => (H(), L("g", { key: t }, [
32217
+ }, null, 8, iz), (H(!0), L(N, null, gn(r.value, (e, t) => (H(), L("g", { key: t }, [
32125
32218
  R("line", {
32126
32219
  x1: e.incoming.x,
32127
32220
  y1: e.incoming.y,
@@ -32129,19 +32222,19 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
32129
32222
  y2: e.outgoing.y,
32130
32223
  stroke: "#287dff",
32131
32224
  "stroke-width": 1 / c.value
32132
- }, null, 8, ZR),
32225
+ }, null, 8, az),
32133
32226
  R("circle", {
32134
32227
  cx: e.incoming.x,
32135
32228
  cy: e.incoming.y,
32136
32229
  r: 2 / c.value,
32137
32230
  fill: "#287dff"
32138
- }, null, 8, QR),
32231
+ }, null, 8, oz),
32139
32232
  R("circle", {
32140
32233
  cx: e.outgoing.x,
32141
32234
  cy: e.outgoing.y,
32142
32235
  r: 2 / c.value,
32143
32236
  fill: "#287dff"
32144
- }, null, 8, $R),
32237
+ }, null, 8, sz),
32145
32238
  R("rect", {
32146
32239
  x: e.point.x - 3 / c.value,
32147
32240
  y: e.point.y - 3 / c.value,
@@ -32150,16 +32243,16 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
32150
32243
  fill: "white",
32151
32244
  stroke: "#287dff",
32152
32245
  "stroke-width": 1 / c.value
32153
- }, null, 8, ez)
32154
- ]))), 128))], 8, YR)], 42, JR));
32246
+ }, null, 8, cz)
32247
+ ]))), 128))], 8, rz)], 42, nz));
32155
32248
  }
32156
- }), [["__scopeId", "data-v-c9805a95"]]), nz = {
32249
+ }), [["__scopeId", "data-v-c9805a95"]]), uz = {
32157
32250
  key: 0,
32158
32251
  class: "pen-overlay__help"
32159
- }, rz = {
32252
+ }, dz = {
32160
32253
  key: 1,
32161
32254
  class: "pen-overlay__help"
32162
- }, iz = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
32255
+ }, fz = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
32163
32256
  __name: "pen-overlay",
32164
32257
  props: { context: {} },
32165
32258
  setup(e) {
@@ -32191,11 +32284,11 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
32191
32284
  ref: n,
32192
32285
  hidden: ""
32193
32286
  }, null, 512),
32194
- i.value ? (H(), L("div", nz, W(G(Ae)("help")), 1)) : a.value ? (H(), L("div", rz, W(G(Ae)("editHelp")), 1)) : I("", !0),
32287
+ i.value ? (H(), L("div", uz, W(G(Ae)("help")), 1)) : a.value ? (H(), L("div", dz, W(G(Ae)("editHelp")), 1)) : I("", !0),
32195
32288
  i.value || a.value ? (H(!0), L(N, { key: 2 }, gn(r.value, (t) => (H(), F(zt, {
32196
32289
  key: t.id,
32197
32290
  to: t.target
32198
- }, [i.value ? (H(), F(tz, {
32291
+ }, [i.value ? (H(), F(lz, {
32199
32292
  key: 0,
32200
32293
  context: e.context,
32201
32294
  "page-id": t.id,
@@ -32204,7 +32297,7 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
32204
32297
  "context",
32205
32298
  "page-id",
32206
32299
  "surface"
32207
- ])) : a.value && o.value === t.id ? (H(), F(qR, {
32300
+ ])) : a.value && o.value === t.id ? (H(), F(tz, {
32208
32301
  key: a.value.id,
32209
32302
  context: e.context,
32210
32303
  node: a.value,
@@ -32216,12 +32309,12 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
32216
32309
  ])) : I("", !0)], 8, ["to"]))), 128)) : I("", !0)
32217
32310
  ], 64));
32218
32311
  }
32219
- }), [["__scopeId", "data-v-7e06a67d"]]), az = ["viewBox"], oz = [
32312
+ }), [["__scopeId", "data-v-7e06a67d"]]), pz = ["viewBox"], mz = [
32220
32313
  "d",
32221
32314
  "fill",
32222
32315
  "stroke",
32223
32316
  "stroke-width"
32224
- ], sz = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
32317
+ ], hz = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
32225
32318
  __name: "pen-preview",
32226
32319
  props: {
32227
32320
  node: {},
@@ -32242,9 +32335,9 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
32242
32335
  "stroke-width": G(Oe)(e.node.props),
32243
32336
  "stroke-linecap": "round",
32244
32337
  "stroke-linejoin": "round"
32245
- }, null, 8, oz)], 8, az));
32338
+ }, null, 8, mz)], 8, pz));
32246
32339
  }
32247
- }), [["__scopeId", "data-v-60b47ca0"]]), cz = {
32340
+ }), [["__scopeId", "data-v-60b47ca0"]]), gz = {
32248
32341
  manifest: {
32249
32342
  apiVersion: "1.0",
32250
32343
  id: "print-studio:pen-tool",
@@ -32261,23 +32354,23 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
32261
32354
  e.locales.register(ke);
32262
32355
  let t = e.canvas.registerElement({
32263
32356
  ...Ge(),
32264
- previewComponent: en(sz)
32357
+ previewComponent: en(hz)
32265
32358
  }, { replace: !0 });
32266
32359
  return e.slots.add("designer.shell.after", "pen.overlay", {
32267
- component: en(iz),
32360
+ component: en(fz),
32268
32361
  props: { context: e }
32269
32362
  }), t;
32270
32363
  }
32271
- }, lz = {
32364
+ }, _z = {
32272
32365
  name: "builtin:pen-tool",
32273
32366
  setup(e) {
32274
- if (!e.plugins.has(cz.manifest.id)) return e.plugins.use(cz), () => {
32275
- e.plugins.dispose(cz.manifest.id);
32367
+ if (!e.plugins.has(gz.manifest.id)) return e.plugins.use(gz), () => {
32368
+ e.plugins.dispose(gz.manifest.id);
32276
32369
  };
32277
32370
  }
32278
32371
  };
32279
32372
  // src/designer/tutorials/scene.ts
32280
- function uz() {
32373
+ function vz() {
32281
32374
  let e = [], t = {}, n;
32282
32375
  function r(t) {
32283
32376
  e.push(t);
@@ -32328,8 +32421,8 @@ function uz() {
32328
32421
  };
32329
32422
  }
32330
32423
  // src/designer/tutorials/screenplay.ts
32331
- function dz(e, t) {
32332
- let n = [], r = uz(), i = {}, a = {
32424
+ function yz(e, t) {
32425
+ let n = [], r = vz(), i = {}, a = {
32333
32426
  key: "",
32334
32427
  label: "",
32335
32428
  schema: [{
@@ -32636,7 +32729,7 @@ function dz(e, t) {
32636
32729
  }), _(p(), M("designer.tutorialPlayback.printPreviewHint")), w(), m(), _({ selector: "[data-tutorial=\"canvas\"]" }, M("designer.tutorialPlayback.completeHint")), n;
32637
32730
  }
32638
32731
  // src/designer/plugins/tutorials.ts
32639
- var fz = {
32732
+ var bz = {
32640
32733
  name: "builtin:tutorials",
32641
32734
  setup(e) {
32642
32735
  let t = e.commands.registerScoped([
@@ -32645,7 +32738,7 @@ var fz = {
32645
32738
  run: (t, n) => {
32646
32739
  if (typeof n == "string") {
32647
32740
  let t = Ue.find((e) => e.id === n);
32648
- t && e.store().tutorial.start(n, () => dz(t, e.elements.get("text")));
32741
+ t && e.store().tutorial.start(n, () => yz(t, e.elements.get("text")));
32649
32742
  }
32650
32743
  },
32651
32744
  get title() {
@@ -32688,30 +32781,30 @@ var fz = {
32688
32781
  e.store().tutorial.finish(!1), e.store().tutorial.close(), t();
32689
32782
  };
32690
32783
  }
32691
- }, pz = {
32784
+ }, xz = {
32692
32785
  get description() {
32693
32786
  return M("designer.builtins.commandsPluginDescription");
32694
32787
  },
32695
32788
  name: "builtin:commands",
32696
32789
  setup: (e) => na(e)
32697
32790
  };
32698
- function mz(e, t = (t) => e.plugins.use(t)) {
32791
+ function Sz(e, t = (t) => e.plugins.use(t)) {
32699
32792
  e.plugins.has(be.name) || (e.plugins.trustHostPlugin(be), t(be)), Te(e);
32700
32793
  for (let n of [
32701
- pz,
32702
- fz,
32703
- IR,
32704
- kI,
32794
+ xz,
32795
+ bz,
32796
+ WR,
32797
+ LI,
32705
32798
  Ka,
32706
- lz,
32707
- FR,
32799
+ _z,
32800
+ UR,
32708
32801
  aa
32709
32802
  ]) e.plugins.has(n.name) || (e.plugins.trustHostPlugin(n), t(n));
32710
32803
  }
32711
32804
  // src/designer/context/editor-context.ts
32712
- var hz = null;
32713
- function gz() {
32714
- if (hz) return hz;
32805
+ var Cz = null;
32806
+ function wz() {
32807
+ if (Cz) return Cz;
32715
32808
  let e = De(), t = new ye(), n = {
32716
32809
  commands: new we(() => n, e),
32717
32810
  elements: ue,
@@ -32739,22 +32832,22 @@ function gz() {
32739
32832
  return n.store().zIndex;
32740
32833
  }
32741
32834
  };
32742
- return hz = n, n;
32835
+ return Cz = n, n;
32743
32836
  }
32744
- function _z(e, t = {}) {
32837
+ function Tz(e, t = {}) {
32745
32838
  let n = Ze(t);
32746
- return hz = n, n.store().config.configure(t), e.provide(Ye, n), e.provide(se, n.zIndex), Ci(e, n.errors), Si(n.errors), mz(n), n;
32839
+ return Cz = n, n.store().config.configure(t), e.provide(Ye, n), e.provide(se, n.zIndex), Ci(e, n.errors), Si(n.errors), Sz(n), n;
32747
32840
  }
32748
- function vz() {
32749
- return Zt(Ye, null) ?? gz();
32841
+ function Ez() {
32842
+ return Zt(Ye, null) ?? wz();
32750
32843
  }
32751
32844
  // src/designer/facade/use-print-studio.ts
32752
- function yz(e = {}) {
32845
+ function Dz(e = {}) {
32753
32846
  let t = Xt() ? Zt(Ye, null) : null, n = e.context ?? t, r = n ? Je(n, e) : Qe(e);
32754
32847
  return Kt() && ln(r.dispose), r;
32755
32848
  }
32756
32849
  // src/designer/frame/print-designer-frame.vue
32757
- var bz = /* @__PURE__ */ B({
32850
+ var Oz = /* @__PURE__ */ B({
32758
32851
  __name: "print-designer-frame",
32759
32852
  props: {
32760
32853
  context: {},
@@ -32846,4 +32939,4 @@ var bz = /* @__PURE__ */ B({
32846
32939
  }, null, 512));
32847
32940
  }
32848
32941
  });
32849
- export { bz as PrintDesigner, Ze as createEditorContext, It as definePlugin, _z as installDesigner, yz as usePrintStudio };
32942
+ export { Oz as PrintDesigner, Ze as createEditorContext, It as definePlugin, Tz as installDesigner, Dz as usePrintStudio };