@pptx-editor.dev/vue 0.4.0 → 0.5.0

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 (2) hide show
  1. package/dist/index.js +376 -288
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // src/index.ts
2
2
  import {
3
- defineComponent as defineComponent66,
3
+ defineComponent as defineComponent67,
4
4
  getCurrentInstance as getCurrentInstance3,
5
5
  h as h22,
6
6
  mergeProps as mergeProps2,
@@ -13,7 +13,7 @@ import {
13
13
 
14
14
  // src/components.ts
15
15
  import {
16
- defineComponent as defineComponent58,
16
+ defineComponent as defineComponent59,
17
17
  getCurrentInstance as getCurrentInstance2,
18
18
  h as h18,
19
19
  mergeProps,
@@ -30,7 +30,7 @@ import {
30
30
  localeContentKey,
31
31
  repaintSurfaceOf,
32
32
  reportFontError,
33
- translateKeyOrText as translateKeyOrText20,
33
+ translateKeyOrText as translateKeyOrText21,
34
34
  warnModulesChanged
35
35
  } from "@pptx-editor.dev/core/editor";
36
36
  import { createTranslator as createTranslator2 } from "@pptx-editor.dev/i18n";
@@ -8680,10 +8680,11 @@ function useCanvasContextMenu() {
8680
8680
  const open = (owner, at) => {
8681
8681
  const instance = editor.value;
8682
8682
  if (entry() === false || !instance || instance.snapshot().status !== "ready") return;
8683
+ const kind = canvasMenuKind(instance.snapshot());
8683
8684
  const state = {
8684
- // From the keyboard: open at the selection, or at the middle of the canvas.
8685
- at: canvasMenuPoint(owner, at),
8686
- kind: canvasMenuKind(instance.snapshot()),
8685
+ // From the keyboard: open at the caret, the selection, or the middle of the canvas.
8686
+ at: canvasMenuPoint(owner, at, instance.snapshot().selection.kind === "text"),
8687
+ kind,
8687
8688
  keyboard: at === null,
8688
8689
  owner
8689
8690
  };
@@ -8727,11 +8728,11 @@ function useCanvasContextMenu() {
8727
8728
  // src/SlideSorter.tsx
8728
8729
  import {
8729
8730
  computed as computed24,
8730
- defineComponent as defineComponent56,
8731
+ defineComponent as defineComponent57,
8731
8732
  onBeforeUnmount as onBeforeUnmount13,
8732
8733
  onMounted as onMounted20,
8733
8734
  onUpdated as onUpdated5,
8734
- ref as ref40,
8735
+ ref as ref41,
8735
8736
  shallowRef as shallowRef30,
8736
8737
  watch as watch37
8737
8738
  } from "vue";
@@ -8749,7 +8750,7 @@ import {
8749
8750
  slideSorterMounted,
8750
8751
  sorterKeyDown,
8751
8752
  trackNotesInset,
8752
- translateKeyOrText as translateKeyOrText19,
8753
+ translateKeyOrText as translateKeyOrText20,
8753
8754
  warnSlideSorterUnmounted
8754
8755
  } from "@pptx-editor.dev/core/editor";
8755
8756
 
@@ -8910,14 +8911,14 @@ var MasterViewBar = defineComponent29({
8910
8911
  // src/panes.tsx
8911
8912
  import {
8912
8913
  computed as computed22,
8913
- defineComponent as defineComponent54,
8914
+ defineComponent as defineComponent55,
8914
8915
  nextTick as nextTick9,
8915
8916
  onBeforeUnmount as onBeforeUnmount11,
8916
8917
  onMounted as onMounted19,
8917
8918
  onUnmounted as onUnmounted4,
8918
8919
  onUpdated as onUpdated4,
8919
8920
  provide as provide17,
8920
- ref as ref39,
8921
+ ref as ref40,
8921
8922
  shallowRef as shallowRef28,
8922
8923
  useId as useId21,
8923
8924
  watch as watch35
@@ -12208,10 +12209,10 @@ var SectionNode = defineComponent42({
12208
12209
  // src/SidePanel.tsx
12209
12210
  import {
12210
12211
  computed as computed21,
12211
- defineComponent as defineComponent53,
12212
+ defineComponent as defineComponent54,
12212
12213
  nextTick as nextTick8,
12213
12214
  onMounted as onMounted18,
12214
- ref as ref38,
12215
+ ref as ref39,
12215
12216
  watch as watch34
12216
12217
  } from "vue";
12217
12218
  import {
@@ -13647,15 +13648,15 @@ var DiagramTextPane = defineComponent46({
13647
13648
 
13648
13649
  // src/FormatPanel.tsx
13649
13650
  import {
13650
- defineComponent as defineComponent52,
13651
- ref as ref37,
13651
+ defineComponent as defineComponent53,
13652
+ ref as ref38,
13652
13653
  watch as watch33
13653
13654
  } from "vue";
13654
13655
  import {
13655
13656
  chromeControlForSlot as chromeControlForSlot7,
13656
13657
  formatSectionsOf,
13657
13658
  formatControlMixed,
13658
- formatTargetKey as formatTargetKey5,
13659
+ formatTargetKey as formatTargetKey6,
13659
13660
  formatSelectionCategory,
13660
13661
  formatSectionOpen,
13661
13662
  setFormatSectionOpen,
@@ -13785,26 +13786,110 @@ var FormatLineWidth = defineComponent48({
13785
13786
  }
13786
13787
  });
13787
13788
 
13789
+ // src/FormatFillTransparency.tsx
13790
+ import { defineComponent as defineComponent49, ref as ref35 } from "vue";
13791
+ import {
13792
+ formatFillTransparency,
13793
+ formatTargetKey as formatTargetKey3,
13794
+ translateKeyOrText as translateKeyOrText17
13795
+ } from "@pptx-editor.dev/core/editor";
13796
+ import { jsx as jsx41, jsxs as jsxs34 } from "vue/jsx-runtime";
13797
+ var FormatFillTransparency = defineComponent49({
13798
+ name: "FormatFillTransparency",
13799
+ setup() {
13800
+ const editor = usePptxEditor();
13801
+ const snapshot = useEditorState((s) => s);
13802
+ const { t } = useTranslation();
13803
+ const preview = ref35(null);
13804
+ const error = ref35(null);
13805
+ return () => {
13806
+ const field = formatFillTransparency(editor.value);
13807
+ if (!field) return null;
13808
+ const key = `${editor.value?.session?.id}:${formatTargetKey3(snapshot.value)}`;
13809
+ const commit = (percent) => {
13810
+ const instance = editor.value;
13811
+ if (!instance || `${instance.session?.id}:${formatTargetKey3(instance.snapshot())}` !== key)
13812
+ return t("disabled.invalidValue");
13813
+ if (percent === field.value) return null;
13814
+ const result = instance.exec({
13815
+ type: "patchShapeFormat",
13816
+ target: field.target,
13817
+ patch: field.patch(percent)
13818
+ });
13819
+ return result.ok ? null : translateKeyOrText17(t, result.reason);
13820
+ };
13821
+ const label = t(field.labelKey);
13822
+ const value = preview.value ?? field.value;
13823
+ const disabled = snapshot.value.mode === "view";
13824
+ return /* @__PURE__ */ jsxs34("div", { class: "pptx-format-transparency", "data-format-fill-transparency": "", children: [
13825
+ /* @__PURE__ */ jsx41(
13826
+ "input",
13827
+ {
13828
+ type: "range",
13829
+ class: "pptx-format-transparency__slider",
13830
+ "data-format-slider": field.id,
13831
+ "aria-label": label,
13832
+ "aria-valuetext": `${value}${field.unit}`,
13833
+ min: field.min,
13834
+ max: field.max,
13835
+ step: 1,
13836
+ value,
13837
+ disabled,
13838
+ onInput: (e) => {
13839
+ preview.value = Number(e.target.value);
13840
+ },
13841
+ onChange: (e) => {
13842
+ preview.value = null;
13843
+ error.value = commit(Number(e.target.value));
13844
+ },
13845
+ onBlur: () => {
13846
+ preview.value = null;
13847
+ }
13848
+ }
13849
+ ),
13850
+ /* @__PURE__ */ jsx41(
13851
+ FormatNumberField,
13852
+ {
13853
+ label,
13854
+ property: field.id,
13855
+ value: String(value),
13856
+ unit: field.unit,
13857
+ min: field.min,
13858
+ max: field.max,
13859
+ disabled,
13860
+ onCommit: (percent) => {
13861
+ error.value = null;
13862
+ return commit(percent);
13863
+ }
13864
+ },
13865
+ key
13866
+ ),
13867
+ error.value ? /* @__PURE__ */ jsx41("span", { class: "pptx-chart-pane__error", role: "alert", children: error.value }) : null
13868
+ ] });
13869
+ };
13870
+ }
13871
+ });
13872
+
13788
13873
  // src/FormatDetails.tsx
13789
- import { defineComponent as defineComponent50, ref as ref36, nextTick as nextTick7 } from "vue";
13874
+ import { defineComponent as defineComponent51, ref as ref37, nextTick as nextTick7 } from "vue";
13790
13875
  import {
13791
13876
  chromeControlForSlot as chromeControlForSlot6,
13792
13877
  createGradientStopIdentity,
13793
13878
  colorChoiceOf as colorChoiceOf2,
13794
13879
  colorPickOf as colorPickOf3,
13795
13880
  formatPropertyGroups,
13796
- formatTargetKey as formatTargetKey3,
13797
- translateKeyOrText as translateKeyOrText17
13881
+ formatTargetKey as formatTargetKey4,
13882
+ translateKeyOrText as translateKeyOrText18
13798
13883
  } from "@pptx-editor.dev/core/editor";
13799
13884
 
13800
13885
  // src/FormatGradientPicker.tsx
13801
- import { defineComponent as defineComponent49, ref as ref35 } from "vue";
13886
+ import { defineComponent as defineComponent50, ref as ref36 } from "vue";
13802
13887
  import {
13803
13888
  gradientPreviewCss,
13804
13889
  gradientPreviewStops
13805
13890
  } from "@pptx-editor.dev/core/editor";
13806
- import { jsx as jsx41, jsxs as jsxs34 } from "vue/jsx-runtime";
13807
- var FormatGradientPicker = defineComponent49({
13891
+ import { jsx as jsx42, jsxs as jsxs35 } from "vue/jsx-runtime";
13892
+ var FormatGradientPicker = defineComponent50({
13808
13893
  name: "FormatGradientPicker",
13809
13894
  props: {
13810
13895
  gradient: { type: Object, required: true },
@@ -13814,7 +13899,7 @@ var FormatGradientPicker = defineComponent49({
13814
13899
  setup(props) {
13815
13900
  const { t } = useTranslation();
13816
13901
  const rows = useEditorState((s) => s.themeColors);
13817
- const root = ref35(null);
13902
+ const root = ref36(null);
13818
13903
  return () => {
13819
13904
  const stops = gradientPreviewStops(props.gradient, rows.value);
13820
13905
  const background = gradientPreviewCss(stops);
@@ -13828,8 +13913,8 @@ var FormatGradientPicker = defineComponent49({
13828
13913
  );
13829
13914
  buttons?.[index]?.focus();
13830
13915
  };
13831
- return /* @__PURE__ */ jsxs34("div", { class: "pptx-gradient-picker", ref: root, children: [
13832
- /* @__PURE__ */ jsx41(
13916
+ return /* @__PURE__ */ jsxs35("div", { class: "pptx-gradient-picker", ref: root, children: [
13917
+ /* @__PURE__ */ jsx42(
13833
13918
  "div",
13834
13919
  {
13835
13920
  class: "pptx-gradient-picker__ramp",
@@ -13838,7 +13923,7 @@ var FormatGradientPicker = defineComponent49({
13838
13923
  "aria-label": t(background ? "gradient.preview" : "inspector.previewUnavailable")
13839
13924
  }
13840
13925
  ),
13841
- /* @__PURE__ */ jsx41("div", { class: "pptx-gradient-picker__markers", role: "group", "aria-label": t("gradient.stops"), children: stops.map((stop, index) => /* @__PURE__ */ jsx41(
13926
+ /* @__PURE__ */ jsx42("div", { class: "pptx-gradient-picker__markers", role: "group", "aria-label": t("gradient.stops"), children: stops.map((stop, index) => /* @__PURE__ */ jsx42(
13842
13927
  "button",
13843
13928
  {
13844
13929
  type: "button",
@@ -13856,7 +13941,7 @@ var FormatGradientPicker = defineComponent49({
13856
13941
  move(next);
13857
13942
  }
13858
13943
  },
13859
- children: /* @__PURE__ */ jsx41(
13944
+ children: /* @__PURE__ */ jsx42(
13860
13945
  "span",
13861
13946
  {
13862
13947
  style: stop.color ? { backgroundColor: stop.color, opacity: stop.opacity } : void 0
@@ -13865,16 +13950,16 @@ var FormatGradientPicker = defineComponent49({
13865
13950
  },
13866
13951
  stop.id
13867
13952
  )) }),
13868
- /* @__PURE__ */ jsxs34("label", { class: "pptx-field", children: [
13953
+ /* @__PURE__ */ jsxs35("label", { class: "pptx-field", children: [
13869
13954
  t("inspector.selectStop"),
13870
- /* @__PURE__ */ jsx41(
13955
+ /* @__PURE__ */ jsx42(
13871
13956
  "select",
13872
13957
  {
13873
13958
  "data-format-stop-select": "",
13874
13959
  "aria-label": t("inspector.selectStop"),
13875
13960
  value: props.selected,
13876
13961
  onChange: (e) => props.onSelect(e.target.value),
13877
- children: stops.map((stop, index) => /* @__PURE__ */ jsx41("option", { value: stop.id, children: label(index) }, stop.id))
13962
+ children: stops.map((stop, index) => /* @__PURE__ */ jsx42("option", { value: stop.id, children: label(index) }, stop.id))
13878
13963
  }
13879
13964
  )
13880
13965
  ] })
@@ -13884,35 +13969,35 @@ var FormatGradientPicker = defineComponent49({
13884
13969
  });
13885
13970
 
13886
13971
  // src/FormatDetails.tsx
13887
- import { jsx as jsx42, jsxs as jsxs35 } from "vue/jsx-runtime";
13888
- var FormatDetails = defineComponent50({
13972
+ import { jsx as jsx43, jsxs as jsxs36 } from "vue/jsx-runtime";
13973
+ var FormatDetails = defineComponent51({
13889
13974
  props: { section: { type: String, required: true } },
13890
13975
  setup(props) {
13891
13976
  const editor = usePptxEditor();
13892
13977
  const { t } = useTranslation();
13893
13978
  const snapshot = useEditorState((s) => s);
13894
13979
  const offered = useOfferedControl("shape.effects", chromeControlForSlot6("shape.effects"));
13895
- const root = ref36(null);
13980
+ const root = ref37(null);
13896
13981
  const stopIdentity = createGradientStopIdentity();
13897
- const selectedStop = ref36(null);
13898
- const error = ref36(null);
13982
+ const selectedStop = ref37(null);
13983
+ const error = ref37(null);
13899
13984
  return () => {
13900
13985
  const read = editor.value?.shapeFormat();
13901
13986
  if (snapshot.value.selection.kind === "shapes" && snapshot.value.selection.nodeIds.length > 1)
13902
13987
  return null;
13903
13988
  if (!read) return null;
13904
13989
  if (!read.ok)
13905
- return /* @__PURE__ */ jsx42("p", { class: "pptx-empty__body", role: "status", children: translateKeyOrText17(t, read.reason) });
13990
+ return /* @__PURE__ */ jsx43("p", { class: "pptx-empty__body", role: "status", children: translateKeyOrText18(t, read.reason) });
13906
13991
  const detail = read.format;
13907
13992
  if (props.section === "effects" && detail.effectsReason)
13908
- return /* @__PURE__ */ jsx42("p", { class: "pptx-empty__body", role: "status", children: translateKeyOrText17(t, detail.effectsReason) });
13993
+ return /* @__PURE__ */ jsx43("p", { class: "pptx-empty__body", role: "status", children: translateKeyOrText18(t, detail.effectsReason) });
13909
13994
  const identity = (id) => stopIdentity.identity(detail.gradient?.stops ?? [], id);
13910
13995
  const activeStop = detail.gradient?.stops.find(
13911
13996
  (stop) => selectedStop.value !== null && identity(stop.id) === selectedStop.value
13912
13997
  ) ?? detail.gradient?.stops[0];
13913
- const key = `${editor.value?.session?.id}:${formatTargetKey3(snapshot.value)}`;
13998
+ const key = `${editor.value?.session?.id}:${formatTargetKey4(snapshot.value)}`;
13914
13999
  const apply = (patch) => {
13915
- if (!editor.value || `${editor.value.session?.id}:${formatTargetKey3(editor.value.snapshot())}` !== key)
14000
+ if (!editor.value || `${editor.value.session?.id}:${formatTargetKey4(editor.value.snapshot())}` !== key)
13916
14001
  return t("disabled.invalidValue");
13917
14002
  const result = editor.value.exec({
13918
14003
  type: "patchShapeFormat",
@@ -13925,13 +14010,13 @@ var FormatDetails = defineComponent50({
13925
14010
  stopIdentity.patched(detail.gradient.stops, next.format.gradient.stops, patch);
13926
14011
  }
13927
14012
  }
13928
- return result.ok ? null : translateKeyOrText17(t, result.reason);
14013
+ return result.ok ? null : translateKeyOrText18(t, result.reason);
13929
14014
  };
13930
14015
  const disabled = snapshot.value.mode === "view";
13931
14016
  const effectsAvailable = offered.value?.options?.some((option) => option.value === "reflection.tightTouching") === true;
13932
14017
  const unavailable = (id) => !effectsAvailable && (id === "reflection" || id === "shadow" && detail.shadow?.kind === "inner");
13933
- return /* @__PURE__ */ jsxs35("div", { class: "pptx-format-details", ref: root, children: [
13934
- props.section === "fill" && detail.gradient && activeStop ? /* @__PURE__ */ jsx42(
14018
+ return /* @__PURE__ */ jsxs36("div", { class: "pptx-format-details", ref: root, children: [
14019
+ props.section === "fill" && detail.gradient && activeStop ? /* @__PURE__ */ jsx43(
13935
14020
  FormatGradientPicker,
13936
14021
  {
13937
14022
  gradient: detail.gradient,
@@ -13941,18 +14026,18 @@ var FormatDetails = defineComponent50({
13941
14026
  }
13942
14027
  }
13943
14028
  ) : null,
13944
- formatPropertyGroups(detail, props.section).filter((group) => group.index === void 0 || group.id === activeStop?.id).map((group) => /* @__PURE__ */ jsxs35(
14029
+ formatPropertyGroups(detail, props.section).filter((group) => group.index === void 0 || group.id === activeStop?.id).map((group) => /* @__PURE__ */ jsxs36(
13945
14030
  "fieldset",
13946
14031
  {
13947
14032
  class: "pptx-format-property-group",
13948
14033
  "data-format-stop": group.index,
13949
14034
  children: [
13950
- /* @__PURE__ */ jsx42("legend", { children: t(group.labelKey, group.index ? { index: group.index } : void 0) }),
13951
- /* @__PURE__ */ jsxs35("div", { class: "pptx-format-property-fields", children: [
13952
- unavailable(group.id) ? /* @__PURE__ */ jsx42("p", { class: "pptx-empty__body", role: "status", children: t("inspector.effectUnavailable") }) : null,
14035
+ /* @__PURE__ */ jsx43("legend", { children: t(group.labelKey, group.index ? { index: group.index } : void 0) }),
14036
+ /* @__PURE__ */ jsxs36("div", { class: "pptx-format-property-fields", children: [
14037
+ unavailable(group.id) ? /* @__PURE__ */ jsx43("p", { class: "pptx-empty__body", role: "status", children: t("inspector.effectUnavailable") }) : null,
13953
14038
  group.colors.map((field) => {
13954
14039
  const pick = field.color ? colorPickOf3(field.color) : "keep";
13955
- return /* @__PURE__ */ jsx42(
14040
+ return /* @__PURE__ */ jsx43(
13956
14041
  ColorField,
13957
14042
  {
13958
14043
  name: field.id,
@@ -13969,7 +14054,7 @@ var FormatDetails = defineComponent50({
13969
14054
  "color"
13970
14055
  );
13971
14056
  }),
13972
- group.numbers.map((field) => /* @__PURE__ */ jsx42(
14057
+ group.numbers.map((field) => /* @__PURE__ */ jsx43(
13973
14058
  FormatNumberField,
13974
14059
  {
13975
14060
  value: String(field.value),
@@ -13984,7 +14069,7 @@ var FormatDetails = defineComponent50({
13984
14069
  field.id.split(".").at(-1)
13985
14070
  ))
13986
14071
  ] }),
13987
- group.index !== void 0 ? /* @__PURE__ */ jsx42(
14072
+ group.index !== void 0 ? /* @__PURE__ */ jsx43(
13988
14073
  "button",
13989
14074
  {
13990
14075
  type: "button",
@@ -14012,7 +14097,7 @@ var FormatDetails = defineComponent50({
14012
14097
  },
14013
14098
  identity(group.id)
14014
14099
  )),
14015
- props.section === "fill" && detail.gradient ? /* @__PURE__ */ jsx42("div", { class: "pptx-format-detail-actions", children: /* @__PURE__ */ jsx42(
14100
+ props.section === "fill" && detail.gradient ? /* @__PURE__ */ jsx43("div", { class: "pptx-format-detail-actions", children: /* @__PURE__ */ jsx43(
14016
14101
  "button",
14017
14102
  {
14018
14103
  type: "button",
@@ -14040,14 +14125,14 @@ var FormatDetails = defineComponent50({
14040
14125
  children: t("gradient.add")
14041
14126
  }
14042
14127
  ) }) : null,
14043
- error.value ? /* @__PURE__ */ jsx42("p", { role: "alert", class: "pptx-chart-pane__error", children: error.value }) : null
14128
+ error.value ? /* @__PURE__ */ jsx43("p", { role: "alert", class: "pptx-chart-pane__error", children: error.value }) : null
14044
14129
  ] }, key);
14045
14130
  };
14046
14131
  }
14047
14132
  });
14048
14133
 
14049
14134
  // src/FormatGeometry.tsx
14050
- import { defineComponent as defineComponent51 } from "vue";
14135
+ import { defineComponent as defineComponent52 } from "vue";
14051
14136
  import {
14052
14137
  TABLE_OPTION_ROWS,
14053
14138
  elementKindLabelKey,
@@ -14055,13 +14140,13 @@ import {
14055
14140
  formatPanelSize,
14056
14141
  platformShortcuts as platformShortcuts2,
14057
14142
  formatPanelKeys,
14058
- formatTargetKey as formatTargetKey4,
14059
- translateKeyOrText as translateKeyOrText18
14143
+ formatTargetKey as formatTargetKey5,
14144
+ translateKeyOrText as translateKeyOrText19
14060
14145
  } from "@pptx-editor.dev/core/editor";
14061
- import { jsx as jsx43, jsxs as jsxs36 } from "vue/jsx-runtime";
14146
+ import { jsx as jsx44, jsxs as jsxs37 } from "vue/jsx-runtime";
14062
14147
  var EMU_PER_INCH = 914400;
14063
14148
  var inches = (emu) => String(Number((emu / EMU_PER_INCH).toFixed(6)));
14064
- var FormatGeometry = defineComponent51({
14149
+ var FormatGeometry = defineComponent52({
14065
14150
  name: "PptxFormatTab",
14066
14151
  setup() {
14067
14152
  const { t } = useTranslation();
@@ -14080,13 +14165,13 @@ var FormatGeometry = defineComponent51({
14080
14165
  return () => {
14081
14166
  const g = geometry.value;
14082
14167
  if (!g)
14083
- return selected.value > 1 ? /* @__PURE__ */ jsxs36("div", { class: "pptx-empty", children: [
14084
- /* @__PURE__ */ jsx43("p", { class: "pptx-empty__title", children: t("panel.format.multipleTitle", { count: selected.value }) }),
14085
- /* @__PURE__ */ jsx43("p", { class: "pptx-empty__body", children: platformShortcuts2(t("panel.format.multipleBody")) })
14168
+ return selected.value > 1 ? /* @__PURE__ */ jsxs37("div", { class: "pptx-empty", children: [
14169
+ /* @__PURE__ */ jsx44("p", { class: "pptx-empty__title", children: t("panel.format.multipleTitle", { count: selected.value }) }),
14170
+ /* @__PURE__ */ jsx44("p", { class: "pptx-empty__body", children: platformShortcuts2(t("panel.format.multipleBody")) })
14086
14171
  ] }) : [
14087
- /* @__PURE__ */ jsxs36("div", { class: "pptx-panel__section", children: [
14088
- /* @__PURE__ */ jsx43("h3", { class: "pptx-panel__title", children: t(panelTitle.value) }),
14089
- background.isAvailable.value ? /* @__PURE__ */ jsx43(
14172
+ /* @__PURE__ */ jsxs37("div", { class: "pptx-panel__section", children: [
14173
+ /* @__PURE__ */ jsx44("h3", { class: "pptx-panel__title", children: t(panelTitle.value) }),
14174
+ background.isAvailable.value ? /* @__PURE__ */ jsx44(
14090
14175
  "button",
14091
14176
  {
14092
14177
  type: "button",
@@ -14097,20 +14182,20 @@ var FormatGeometry = defineComponent51({
14097
14182
  }
14098
14183
  ) : null
14099
14184
  ] }),
14100
- /* @__PURE__ */ jsxs36("div", { class: "pptx-empty", children: [
14101
- /* @__PURE__ */ jsx43("p", { class: "pptx-empty__title", children: t("panel.format.emptyTitle") }),
14102
- /* @__PURE__ */ jsx43("p", { class: "pptx-empty__body", children: t(panelBody.value) })
14185
+ /* @__PURE__ */ jsxs37("div", { class: "pptx-empty", children: [
14186
+ /* @__PURE__ */ jsx44("p", { class: "pptx-empty__title", children: t("panel.format.emptyTitle") }),
14187
+ /* @__PURE__ */ jsx44("p", { class: "pptx-empty__body", children: t(panelBody.value) })
14103
14188
  ] })
14104
14189
  ];
14105
- const target = editor.value ? `${editor.value.session?.id}:${formatTargetKey4(editor.value.snapshot())}` : "";
14190
+ const target = editor.value ? `${editor.value.session?.id}:${formatTargetKey5(editor.value.snapshot())}` : "";
14106
14191
  const run = (command) => {
14107
- if (!editor.value || `${editor.value.session?.id}:${formatTargetKey4(editor.value.snapshot())}` !== target)
14192
+ if (!editor.value || `${editor.value.session?.id}:${formatTargetKey5(editor.value.snapshot())}` !== target)
14108
14193
  return t("disabled.invalidValue");
14109
14194
  const result = editor.value.exec(command);
14110
- return result.ok ? null : translateKeyOrText18(t, result.reason);
14195
+ return result.ok ? null : translateKeyOrText19(t, result.reason);
14111
14196
  };
14112
14197
  const move = (patch) => {
14113
- if (!editor.value || `${editor.value.session?.id}:${formatTargetKey4(editor.value.snapshot())}` !== target)
14198
+ if (!editor.value || `${editor.value.session?.id}:${formatTargetKey5(editor.value.snapshot())}` !== target)
14114
14199
  return t("disabled.invalidValue");
14115
14200
  const current = editor.value.snapshot().geometry;
14116
14201
  if (!current || current.nodeId !== g.nodeId) return t("disabled.invalidValue");
@@ -14129,10 +14214,10 @@ var FormatGeometry = defineComponent51({
14129
14214
  const tableSection = () => {
14130
14215
  const tb = table.value;
14131
14216
  if (!tb) return null;
14132
- return /* @__PURE__ */ jsxs36("div", { class: "pptx-panel__section", children: [
14133
- /* @__PURE__ */ jsx43("h3", { class: "pptx-panel__title", children: t("panel.format.table") }),
14134
- /* @__PURE__ */ jsxs36("div", { class: "pptx-panel__grid", children: [
14135
- /* @__PURE__ */ jsx43(
14217
+ return /* @__PURE__ */ jsxs37("div", { class: "pptx-panel__section", children: [
14218
+ /* @__PURE__ */ jsx44("h3", { class: "pptx-panel__title", children: t("panel.format.table") }),
14219
+ /* @__PURE__ */ jsxs37("div", { class: "pptx-panel__grid", children: [
14220
+ /* @__PURE__ */ jsx44(
14136
14221
  FormatNumberField,
14137
14222
  {
14138
14223
  label: t("panel.format.rowHeight"),
@@ -14144,7 +14229,7 @@ var FormatGeometry = defineComponent51({
14144
14229
  onCommit: (v) => run({ type: "setRowHeight", height: inch(v) })
14145
14230
  }
14146
14231
  ),
14147
- /* @__PURE__ */ jsx43(
14232
+ /* @__PURE__ */ jsx44(
14148
14233
  FormatNumberField,
14149
14234
  {
14150
14235
  label: t("panel.format.columnWidth"),
@@ -14157,8 +14242,8 @@ var FormatGeometry = defineComponent51({
14157
14242
  }
14158
14243
  )
14159
14244
  ] }),
14160
- /* @__PURE__ */ jsx43("div", { class: "pptx-radios", role: "group", "aria-label": t("panel.format.styleOptions"), children: TABLE_OPTION_ROWS.map(({ option, labelKey }) => /* @__PURE__ */ jsxs36("label", { class: "pptx-radio", children: [
14161
- /* @__PURE__ */ jsx43(
14245
+ /* @__PURE__ */ jsx44("div", { class: "pptx-radios", role: "group", "aria-label": t("panel.format.styleOptions"), children: TABLE_OPTION_ROWS.map(({ option, labelKey }) => /* @__PURE__ */ jsxs37("label", { class: "pptx-radio", children: [
14246
+ /* @__PURE__ */ jsx44(
14162
14247
  "input",
14163
14248
  {
14164
14249
  type: "checkbox",
@@ -14171,7 +14256,7 @@ var FormatGeometry = defineComponent51({
14171
14256
  ] }, option)) })
14172
14257
  ] });
14173
14258
  };
14174
- const field = (key, labelKey) => /* @__PURE__ */ jsx43(
14259
+ const field = (key, labelKey) => /* @__PURE__ */ jsx44(
14175
14260
  FormatNumberField,
14176
14261
  {
14177
14262
  label: t(labelKey),
@@ -14186,18 +14271,18 @@ var FormatGeometry = defineComponent51({
14186
14271
  }
14187
14272
  );
14188
14273
  return [
14189
- /* @__PURE__ */ jsxs36("div", { class: "pptx-panel__section", children: [
14190
- /* @__PURE__ */ jsx43("h3", { class: "pptx-panel__title", children: t("panel.format.element") }),
14191
- /* @__PURE__ */ jsx43("span", { class: "pptx-chip", children: t(elementKindLabelKey(g, table.value, { chart: chart.value, diagram: diagram.value })) })
14274
+ /* @__PURE__ */ jsxs37("div", { class: "pptx-panel__section", children: [
14275
+ /* @__PURE__ */ jsx44("h3", { class: "pptx-panel__title", children: t("panel.format.element") }),
14276
+ /* @__PURE__ */ jsx44("span", { class: "pptx-chip", children: t(elementKindLabelKey(g, table.value, { chart: chart.value, diagram: diagram.value })) })
14192
14277
  ] }),
14193
- /* @__PURE__ */ jsxs36("div", { class: "pptx-panel__section", children: [
14194
- /* @__PURE__ */ jsx43("h3", { class: "pptx-panel__title", children: t("panel.format.size") }),
14195
- /* @__PURE__ */ jsxs36("div", { class: "pptx-panel__grid", children: [
14278
+ /* @__PURE__ */ jsxs37("div", { class: "pptx-panel__section", children: [
14279
+ /* @__PURE__ */ jsx44("h3", { class: "pptx-panel__title", children: t("panel.format.size") }),
14280
+ /* @__PURE__ */ jsxs37("div", { class: "pptx-panel__grid", children: [
14196
14281
  field("cx", "panel.format.width"),
14197
14282
  field("cy", "panel.format.height")
14198
14283
  ] }),
14199
- /* @__PURE__ */ jsxs36("label", { class: "pptx-radio", children: [
14200
- /* @__PURE__ */ jsx43(
14284
+ /* @__PURE__ */ jsxs37("label", { class: "pptx-radio", children: [
14285
+ /* @__PURE__ */ jsx44(
14201
14286
  "input",
14202
14287
  {
14203
14288
  type: "checkbox",
@@ -14212,16 +14297,16 @@ var FormatGeometry = defineComponent51({
14212
14297
  t("imageProperties.lockAspect")
14213
14298
  ] })
14214
14299
  ] }),
14215
- /* @__PURE__ */ jsxs36("div", { class: "pptx-panel__section", children: [
14216
- /* @__PURE__ */ jsx43("h3", { class: "pptx-panel__title", children: t("panel.format.position") }),
14217
- /* @__PURE__ */ jsxs36("div", { class: "pptx-panel__grid", children: [
14300
+ /* @__PURE__ */ jsxs37("div", { class: "pptx-panel__section", children: [
14301
+ /* @__PURE__ */ jsx44("h3", { class: "pptx-panel__title", children: t("panel.format.position") }),
14302
+ /* @__PURE__ */ jsxs37("div", { class: "pptx-panel__grid", children: [
14218
14303
  field("x", "panel.format.x"),
14219
14304
  field("y", "panel.format.y")
14220
14305
  ] })
14221
14306
  ] }),
14222
- elementRotates(g, table.value) ? /* @__PURE__ */ jsxs36("div", { class: "pptx-panel__section", children: [
14223
- /* @__PURE__ */ jsx43("h3", { class: "pptx-panel__title", children: t("panel.format.rotation") }),
14224
- /* @__PURE__ */ jsx43("div", { class: "pptx-panel__grid", children: /* @__PURE__ */ jsx43(
14307
+ elementRotates(g, table.value) ? /* @__PURE__ */ jsxs37("div", { class: "pptx-panel__section", children: [
14308
+ /* @__PURE__ */ jsx44("h3", { class: "pptx-panel__title", children: t("panel.format.rotation") }),
14309
+ /* @__PURE__ */ jsx44("div", { class: "pptx-panel__grid", children: /* @__PURE__ */ jsx44(
14225
14310
  FormatNumberField,
14226
14311
  {
14227
14312
  label: t("panel.format.angle"),
@@ -14236,10 +14321,10 @@ var FormatGeometry = defineComponent51({
14236
14321
  ) })
14237
14322
  ] }) : null,
14238
14323
  tableSection(),
14239
- g.textFitting ? /* @__PURE__ */ jsxs36("div", { class: "pptx-panel__section", children: [
14240
- /* @__PURE__ */ jsx43("h3", { class: "pptx-panel__title", children: t("panel.format.textFitting") }),
14241
- /* @__PURE__ */ jsx43("div", { class: "pptx-radios", role: "radiogroup", "aria-label": t("panel.format.textFitting"), children: ["none", "shrink", "shape"].map((mode) => /* @__PURE__ */ jsxs36("label", { class: "pptx-radio", children: [
14242
- /* @__PURE__ */ jsx43(
14324
+ g.textFitting ? /* @__PURE__ */ jsxs37("div", { class: "pptx-panel__section", children: [
14325
+ /* @__PURE__ */ jsx44("h3", { class: "pptx-panel__title", children: t("panel.format.textFitting") }),
14326
+ /* @__PURE__ */ jsx44("div", { class: "pptx-radios", role: "radiogroup", "aria-label": t("panel.format.textFitting"), children: ["none", "shrink", "shape"].map((mode) => /* @__PURE__ */ jsxs37("label", { class: "pptx-radio", children: [
14327
+ /* @__PURE__ */ jsx44(
14243
14328
  "input",
14244
14329
  {
14245
14330
  type: "radio",
@@ -14258,11 +14343,11 @@ var FormatGeometry = defineComponent51({
14258
14343
  });
14259
14344
 
14260
14345
  // src/FormatPanel.tsx
14261
- import { jsx as jsx44, jsxs as jsxs37 } from "vue/jsx-runtime";
14346
+ import { jsx as jsx45, jsxs as jsxs38 } from "vue/jsx-runtime";
14262
14347
  var formatSectionProps = {
14263
14348
  section: { type: Object, required: true }
14264
14349
  };
14265
- var FormatSection = defineComponent52({
14350
+ var FormatSection = defineComponent53({
14266
14351
  name: "FormatSection",
14267
14352
  props: formatSectionProps,
14268
14353
  setup(props) {
@@ -14270,7 +14355,7 @@ var FormatSection = defineComponent52({
14270
14355
  const editor = usePptxEditor();
14271
14356
  const background = useEditorDialog("background");
14272
14357
  const snapshot = useEditorState((s) => s);
14273
- const expansion = ref37(0);
14358
+ const expansion = ref38(0);
14274
14359
  watch33(
14275
14360
  editor,
14276
14361
  (instance, _old, onCleanup) => {
@@ -14288,8 +14373,8 @@ var FormatSection = defineComponent52({
14288
14373
  const section = props.section;
14289
14374
  const category = formatSelectionCategory(snapshot.value);
14290
14375
  const expanded = formatSectionOpen(editor.value, category, section.id);
14291
- return /* @__PURE__ */ jsxs37("details", { class: "pptx-format-disclosure", open: expanded, children: [
14292
- /* @__PURE__ */ jsx44(
14376
+ return /* @__PURE__ */ jsxs38("details", { class: "pptx-format-disclosure", open: expanded, children: [
14377
+ /* @__PURE__ */ jsx45(
14293
14378
  "summary",
14294
14379
  {
14295
14380
  "data-format-toggle": section.id,
@@ -14301,14 +14386,17 @@ var FormatSection = defineComponent52({
14301
14386
  children: t(section.labelKey)
14302
14387
  }
14303
14388
  ),
14304
- /* @__PURE__ */ jsxs37("div", { class: "pptx-format-section-body", children: [
14305
- section.id === "geometry" ? /* @__PURE__ */ jsx44(FormatGeometry, {}) : null,
14306
- section.id === "fill" || section.id === "effects" ? /* @__PURE__ */ jsx44(FormatDetails, { section: section.id }) : null,
14307
- section.id === "geometry" ? null : section.id === "chart" ? /* @__PURE__ */ jsx44(ChartDataPane, {}) : section.id === "diagram" ? /* @__PURE__ */ jsx44(DiagramTextPane, {}) : /* @__PURE__ */ jsx44("div", { class: "pptx-format-controls", children: section.slots.filter((slot) => slot !== "slide.background" || background.isAvailable.value).map((slot) => /* @__PURE__ */ jsxs37("div", { class: "pptx-format-control", "data-format-slot": slot, children: [
14308
- slot !== "shape.lineWidth" ? /* @__PURE__ */ jsx44("span", { class: "pptx-format-control__label", children: t(chromeControlForSlot7(slot).labelKey) }) : null,
14309
- formatControlMixed(editor.value, slot) ? /* @__PURE__ */ jsx44("span", { class: "pptx-format-mixed", children: t("inspector.mixed") }) : null,
14310
- slot === "shape.lineWidth" ? /* @__PURE__ */ jsx44(FormatLineWidth, {}) : /* @__PURE__ */ jsx44(ToolbarSlot, { slotId: slot })
14311
- ] }, slot)) })
14389
+ /* @__PURE__ */ jsxs38("div", { class: "pptx-format-section-body", children: [
14390
+ section.id === "geometry" ? /* @__PURE__ */ jsx45(FormatGeometry, {}) : null,
14391
+ section.id === "fill" || section.id === "effects" ? /* @__PURE__ */ jsx45(FormatDetails, { section: section.id }) : null,
14392
+ section.id === "geometry" ? null : section.id === "chart" ? /* @__PURE__ */ jsx45(ChartDataPane, {}) : section.id === "diagram" ? /* @__PURE__ */ jsx45(DiagramTextPane, {}) : /* @__PURE__ */ jsx45("div", { class: "pptx-format-controls", children: section.slots.filter((slot) => slot !== "slide.background" || background.isAvailable.value).flatMap((slot) => [
14393
+ /* @__PURE__ */ jsxs38("div", { class: "pptx-format-control", "data-format-slot": slot, children: [
14394
+ slot !== "shape.lineWidth" ? /* @__PURE__ */ jsx45("span", { class: "pptx-format-control__label", children: t(chromeControlForSlot7(slot).labelKey) }) : null,
14395
+ formatControlMixed(editor.value, slot) ? /* @__PURE__ */ jsx45("span", { class: "pptx-format-mixed", children: t("inspector.mixed") }) : null,
14396
+ slot === "shape.lineWidth" ? /* @__PURE__ */ jsx45(FormatLineWidth, {}) : /* @__PURE__ */ jsx45(ToolbarSlot, { slotId: slot })
14397
+ ] }, slot),
14398
+ slot === "shape.fill" ? /* @__PURE__ */ jsx45(FormatFillTransparency, {}, "fill.transparency") : null
14399
+ ]) })
14312
14400
  ] })
14313
14401
  ] });
14314
14402
  };
@@ -14318,7 +14406,7 @@ var formatPanelProps = {
14318
14406
  sections: { type: Array, default: void 0 },
14319
14407
  className: { type: String, default: void 0 }
14320
14408
  };
14321
- var FormatPanel = defineComponent52({
14409
+ var FormatPanel = defineComponent53({
14322
14410
  name: "FormatPanel",
14323
14411
  props: formatPanelProps,
14324
14412
  slots: Object,
@@ -14326,7 +14414,7 @@ var FormatPanel = defineComponent52({
14326
14414
  const editor = usePptxEditor();
14327
14415
  const snapshot = useEditorState((s) => s);
14328
14416
  const { t } = useTranslation();
14329
- const root = ref37(null);
14417
+ const root = ref38(null);
14330
14418
  watch33(
14331
14419
  () => formatSelectionCategory(snapshot.value),
14332
14420
  (category, previous) => {
@@ -14337,14 +14425,14 @@ var FormatPanel = defineComponent52({
14337
14425
  },
14338
14426
  { flush: "post" }
14339
14427
  );
14340
- return () => /* @__PURE__ */ jsxs37("div", { ref: root, class: ["pptx-format-panel", props.className], children: [
14341
- snapshot.value.selection.kind === "shapes" && snapshot.value.selection.nodeIds.length > 1 ? /* @__PURE__ */ jsx44("p", { class: "pptx-panel__title", children: t("panel.format.multipleTitle", { count: snapshot.value.selection.nodeIds.length }) }) : snapshot.value.geometry ? /* @__PURE__ */ jsx44("p", { class: "pptx-panel__title", children: snapshot.value.geometry.name }) : null,
14342
- /* @__PURE__ */ jsx44("div", { class: "pptx-format-sections", children: formatSectionsOf(snapshot.value, props.sections).map((section) => /* @__PURE__ */ jsx44("div", { "data-format-section": section.id, children: slots[section.id] ? slots[section.id]() : /* @__PURE__ */ jsx44(
14428
+ return () => /* @__PURE__ */ jsxs38("div", { ref: root, class: ["pptx-format-panel", props.className], children: [
14429
+ snapshot.value.selection.kind === "shapes" && snapshot.value.selection.nodeIds.length > 1 ? /* @__PURE__ */ jsx45("p", { class: "pptx-panel__title", children: t("panel.format.multipleTitle", { count: snapshot.value.selection.nodeIds.length }) }) : snapshot.value.geometry ? /* @__PURE__ */ jsx45("p", { class: "pptx-panel__title", children: snapshot.value.geometry.name }) : null,
14430
+ /* @__PURE__ */ jsx45("div", { class: "pptx-format-sections", children: formatSectionsOf(snapshot.value, props.sections).map((section) => /* @__PURE__ */ jsx45("div", { "data-format-section": section.id, children: slots[section.id] ? slots[section.id]() : /* @__PURE__ */ jsx45(
14343
14431
  FormatSection,
14344
14432
  {
14345
14433
  section
14346
14434
  },
14347
- section.id === "diagram" ? section.id : formatTargetKey5(snapshot.value)
14435
+ section.id === "diagram" ? section.id : formatTargetKey6(snapshot.value)
14348
14436
  ) }, section.id)) }, editor.value?.session?.id),
14349
14437
  slots.default?.()
14350
14438
  ] });
@@ -14352,7 +14440,7 @@ var FormatPanel = defineComponent52({
14352
14440
  });
14353
14441
 
14354
14442
  // src/SidePanel.tsx
14355
- import { jsx as jsx45, jsxs as jsxs38 } from "vue/jsx-runtime";
14443
+ import { jsx as jsx46, jsxs as jsxs39 } from "vue/jsx-runtime";
14356
14444
  var sidePanelProps = {
14357
14445
  /** The panel's width in CSS pixels. */
14358
14446
  paneWidth: { type: Number, default: void 0 },
@@ -14366,17 +14454,17 @@ var sidePanelProps = {
14366
14454
  tab: { type: String, default: void 0 }
14367
14455
  };
14368
14456
  function packagedPane(tab, t) {
14369
- if (tab === "format") return /* @__PURE__ */ jsx45(FormatPanel, {});
14370
- if (tab === "chart") return /* @__PURE__ */ jsx45(ChartDataPane, {});
14371
- if (tab === "diagram") return /* @__PURE__ */ jsx45(DiagramTextPane, {});
14372
- if (tab === "selection") return /* @__PURE__ */ jsx45(PptxEditorSelectionPane, {});
14373
- if (tab === "animations") return /* @__PURE__ */ jsx45(AnimationsPane, {});
14374
- return /* @__PURE__ */ jsxs38("div", { class: "pptx-empty", children: [
14375
- /* @__PURE__ */ jsx45("p", { class: "pptx-empty__title", children: t("panel.comments.emptyTitle") }),
14376
- /* @__PURE__ */ jsx45("p", { class: "pptx-empty__body", children: t("panel.comments.emptyBody") })
14457
+ if (tab === "format") return /* @__PURE__ */ jsx46(FormatPanel, {});
14458
+ if (tab === "chart") return /* @__PURE__ */ jsx46(ChartDataPane, {});
14459
+ if (tab === "diagram") return /* @__PURE__ */ jsx46(DiagramTextPane, {});
14460
+ if (tab === "selection") return /* @__PURE__ */ jsx46(PptxEditorSelectionPane, {});
14461
+ if (tab === "animations") return /* @__PURE__ */ jsx46(AnimationsPane, {});
14462
+ return /* @__PURE__ */ jsxs39("div", { class: "pptx-empty", children: [
14463
+ /* @__PURE__ */ jsx46("p", { class: "pptx-empty__title", children: t("panel.comments.emptyTitle") }),
14464
+ /* @__PURE__ */ jsx46("p", { class: "pptx-empty__body", children: t("panel.comments.emptyBody") })
14377
14465
  ] });
14378
14466
  }
14379
- var PptxEditorSidePanel = defineComponent53({
14467
+ var PptxEditorSidePanel = defineComponent54({
14380
14468
  name: "PptxEditorSidePanel",
14381
14469
  inheritAttrs: false,
14382
14470
  props: sidePanelProps,
@@ -14391,7 +14479,7 @@ var PptxEditorSidePanel = defineComponent53({
14391
14479
  setup(props, { attrs, emit, slots }) {
14392
14480
  const { t } = useTranslation();
14393
14481
  const editor = usePptxEditor();
14394
- const own = ref38(props.tab ?? "format");
14482
+ const own = ref39(props.tab ?? "format");
14395
14483
  const tab = computed21(() => props.tab ?? own.value);
14396
14484
  const chartSelected = useEditorState((s) => !!s.chart);
14397
14485
  const diagramSelected = useEditorState((s) => !!s.diagram);
@@ -14403,7 +14491,7 @@ var PptxEditorSidePanel = defineComponent53({
14403
14491
  emit("tabChange", next);
14404
14492
  emit("update:tab", next);
14405
14493
  };
14406
- const root = ref38(null);
14494
+ const root = ref39(null);
14407
14495
  const focusTab = (pane) => void nextTick8(() => {
14408
14496
  const body = root.value?.querySelector(".pptx-panel__body");
14409
14497
  if (body?.contains(body.ownerDocument.activeElement)) return;
@@ -14435,7 +14523,7 @@ var PptxEditorSidePanel = defineComponent53({
14435
14523
  return () => {
14436
14524
  const { class: hostClass, style: hostStyle, ...rest } = attrs;
14437
14525
  const style = [hostStyle, props.style];
14438
- return /* @__PURE__ */ jsxs38(
14526
+ return /* @__PURE__ */ jsxs39(
14439
14527
  "aside",
14440
14528
  {
14441
14529
  ref: root,
@@ -14445,8 +14533,8 @@ var PptxEditorSidePanel = defineComponent53({
14445
14533
  style: props.paneWidth === void 0 ? style : [{ width: `${props.paneWidth}px` }, ...style],
14446
14534
  onMousedown: keepFocus,
14447
14535
  children: [
14448
- /* @__PURE__ */ jsxs38("div", { class: "pptx-panel__head", children: [
14449
- /* @__PURE__ */ jsx45(
14536
+ /* @__PURE__ */ jsxs39("div", { class: "pptx-panel__head", children: [
14537
+ /* @__PURE__ */ jsx46(
14450
14538
  "div",
14451
14539
  {
14452
14540
  class: "pptx-tabs",
@@ -14458,7 +14546,7 @@ var PptxEditorSidePanel = defineComponent53({
14458
14546
  setTab(next);
14459
14547
  e.currentTarget.querySelector(`[data-tab="${next}"]`)?.focus();
14460
14548
  },
14461
- children: tabs.value.map((id) => /* @__PURE__ */ jsxs38(
14549
+ children: tabs.value.map((id) => /* @__PURE__ */ jsxs39(
14462
14550
  "button",
14463
14551
  {
14464
14552
  type: "button",
@@ -14471,17 +14559,17 @@ var PptxEditorSidePanel = defineComponent53({
14471
14559
  tabindex: tab.value === id ? 0 : -1,
14472
14560
  onClick: () => setTab(id),
14473
14561
  children: [
14474
- /* @__PURE__ */ jsx45(Icon, { name: SIDE_PANEL_TAB_ICONS[id] }),
14475
- tab.value === id ? /* @__PURE__ */ jsx45("span", { class: "pptx-tabs__label", "aria-hidden": "true", children: t(`panel.tabs.${id}`) }) : null
14562
+ /* @__PURE__ */ jsx46(Icon, { name: SIDE_PANEL_TAB_ICONS[id] }),
14563
+ tab.value === id ? /* @__PURE__ */ jsx46("span", { class: "pptx-tabs__label", "aria-hidden": "true", children: t(`panel.tabs.${id}`) }) : null
14476
14564
  ]
14477
14565
  },
14478
14566
  id
14479
14567
  ))
14480
14568
  }
14481
14569
  ),
14482
- props.onClose ? /* @__PURE__ */ jsx45(ToolButton, { label: t("panel.close"), icon: "close", onClick: () => props.onClose?.() }) : null
14570
+ props.onClose ? /* @__PURE__ */ jsx46(ToolButton, { label: t("panel.close"), icon: "close", onClick: () => props.onClose?.() }) : null
14483
14571
  ] }),
14484
- /* @__PURE__ */ jsx45(
14572
+ /* @__PURE__ */ jsx46(
14485
14573
  "div",
14486
14574
  {
14487
14575
  class: "pptx-panel__body",
@@ -14498,11 +14586,11 @@ var PptxEditorSidePanel = defineComponent53({
14498
14586
  });
14499
14587
 
14500
14588
  // src/panes.tsx
14501
- import { jsx as jsx46, jsxs as jsxs39 } from "vue/jsx-runtime";
14589
+ import { jsx as jsx47, jsxs as jsxs40 } from "vue/jsx-runtime";
14502
14590
  var sameSlides2 = (a, b) => a.length === b.length && a.every((s, i) => s === b[i]);
14503
14591
  var sameIndices2 = (a, b) => a.length === b.length && a.every((v, i) => v === b[i]);
14504
14592
  var clickMode = slideClickMode;
14505
- var Thumbnail = defineComponent54({
14593
+ var Thumbnail = defineComponent55({
14506
14594
  name: "PptxThumbnail",
14507
14595
  props: {
14508
14596
  slide: { type: Object, required: true },
@@ -14510,7 +14598,7 @@ var Thumbnail = defineComponent54({
14510
14598
  },
14511
14599
  setup(props) {
14512
14600
  const editor = usePptxEditor();
14513
- const box = ref39(null);
14601
+ const box = ref40(null);
14514
14602
  let dispose = null;
14515
14603
  const paint = () => {
14516
14604
  dispose?.();
@@ -14522,7 +14610,7 @@ var Thumbnail = defineComponent54({
14522
14610
  dispose?.();
14523
14611
  dispose = null;
14524
14612
  });
14525
- return () => /* @__PURE__ */ jsx46(
14613
+ return () => /* @__PURE__ */ jsx47(
14526
14614
  "div",
14527
14615
  {
14528
14616
  ref: box,
@@ -14534,7 +14622,7 @@ var Thumbnail = defineComponent54({
14534
14622
  );
14535
14623
  }
14536
14624
  });
14537
- var RailItem = defineComponent54({
14625
+ var RailItem = defineComponent55({
14538
14626
  name: "PptxRailItem",
14539
14627
  props: {
14540
14628
  slide: { type: Object, required: true },
@@ -14554,7 +14642,7 @@ var RailItem = defineComponent54({
14554
14642
  setup(props) {
14555
14643
  return () => {
14556
14644
  const { slide: s, on } = props;
14557
- return /* @__PURE__ */ jsxs39(
14645
+ return /* @__PURE__ */ jsxs40(
14558
14646
  "li",
14559
14647
  {
14560
14648
  class: "pptx-rail__item",
@@ -14575,9 +14663,9 @@ var RailItem = defineComponent54({
14575
14663
  onClick: (e) => on.click(s.index, e),
14576
14664
  onContextmenu: (e) => on.menu(s.index, e),
14577
14665
  children: [
14578
- /* @__PURE__ */ jsx46("span", { class: "pptx-rail__number", "aria-hidden": "true", children: s.index + 1 }),
14579
- /* @__PURE__ */ jsx46("span", { class: "pptx-sr-only", children: props.name }),
14580
- /* @__PURE__ */ jsx46(Thumbnail, { slide: s, ratio: props.ratio })
14666
+ /* @__PURE__ */ jsx47("span", { class: "pptx-rail__number", "aria-hidden": "true", children: s.index + 1 }),
14667
+ /* @__PURE__ */ jsx47("span", { class: "pptx-sr-only", children: props.name }),
14668
+ /* @__PURE__ */ jsx47(Thumbnail, { slide: s, ratio: props.ratio })
14581
14669
  ]
14582
14670
  }
14583
14671
  );
@@ -14642,7 +14730,7 @@ function restAttrs(attrs) {
14642
14730
  return rest;
14643
14731
  }
14644
14732
  function usePaneOpen(props, emit) {
14645
- const own = ref39(props.defaultOpen ?? true);
14733
+ const own = ref40(props.defaultOpen ?? true);
14646
14734
  return {
14647
14735
  open: computed22(() => props.open ?? own.value),
14648
14736
  setOpen: (next) => {
@@ -14651,14 +14739,14 @@ function usePaneOpen(props, emit) {
14651
14739
  }
14652
14740
  };
14653
14741
  }
14654
- var SlideRailRoot = defineComponent54({
14742
+ var SlideRailRoot = defineComponent55({
14655
14743
  name: "PptxEditorSlideRail",
14656
14744
  inheritAttrs: false,
14657
14745
  props: slideRailProps,
14658
14746
  emits: { "update:open": (_open) => true },
14659
14747
  setup(props, { attrs, emit, slots }) {
14660
14748
  const pane = usePaneOpen(props, emit);
14661
- const rail = ref39(null);
14749
+ const rail = ref40(null);
14662
14750
  const listId = useId21();
14663
14751
  let focusToggle = false;
14664
14752
  const setOpen = (next) => {
@@ -14675,18 +14763,18 @@ var SlideRailRoot = defineComponent54({
14675
14763
  const selected = useEditorState((s) => s.selectedSlides, sameIndices2);
14676
14764
  const ratio = useEditorState((s) => s.slideHeight / s.slideWidth);
14677
14765
  const readOnly = useEditorState((s) => s.mode === "view");
14678
- const list = ref39(null);
14766
+ const list = ref40(null);
14679
14767
  const count = () => slides.value.length;
14680
14768
  const opening = useEditorState((s) => (s.pendingSlides ?? 0) > 0);
14681
14769
  const loading = useEditorState((s) => s.isOpening === true);
14682
- const grown = ref39(0);
14770
+ const grown = ref40(0);
14683
14771
  const mount = createProgressiveMount(() => grown.value += 1);
14684
14772
  onMounted19(() => mount.follow(count()));
14685
14773
  onUpdated4(() => mount.follow(count()));
14686
14774
  onUnmounted4(() => mount.dispose());
14687
14775
  const menu = shallowRef28(null);
14688
14776
  const gallery = shallowRef28(null);
14689
- const actions = ref39(null);
14777
+ const actions = ref40(null);
14690
14778
  const sections = useSlideSections();
14691
14779
  const grouped = computed22(() => groupSlideSections2(sections.value, count()));
14692
14780
  const orientation = () => resolveRailOrientation2(props.orientation, "PptxEditorSlideRail");
@@ -14708,7 +14796,7 @@ var SlideRailRoot = defineComponent54({
14708
14796
  onMounted19(readDirection);
14709
14797
  onUpdated4(readDirection);
14710
14798
  const collapsed = useCollapsedSections();
14711
- const renaming = ref39(null);
14799
+ const renaming = ref40(null);
14712
14800
  useOpenCurrentSection(grouped);
14713
14801
  useSectionRenameRequests(
14714
14802
  (id) => {
@@ -14821,7 +14909,7 @@ var SlideRailRoot = defineComponent54({
14821
14909
  const here = s.index === current.value;
14822
14910
  const drop = drag.marker(s.index);
14823
14911
  const inputs = [place?.setSize, place?.posInSet, ratio.value, chosen, here, role, props.t];
14824
- return memoItem(s, [...inputs, labels, drop, readOnly.value], () => /* @__PURE__ */ jsx46(
14912
+ return memoItem(s, [...inputs, labels, drop, readOnly.value], () => /* @__PURE__ */ jsx47(
14825
14913
  RailItem,
14826
14914
  {
14827
14915
  setSize: place?.setSize,
@@ -14843,7 +14931,7 @@ var SlideRailRoot = defineComponent54({
14843
14931
  return () => {
14844
14932
  if (masterView.value && props.open === false) return null;
14845
14933
  if (masterView.value)
14846
- return /* @__PURE__ */ jsx46(
14934
+ return /* @__PURE__ */ jsx47(
14847
14935
  MasterRail,
14848
14936
  {
14849
14937
  ...restAttrs(attrs),
@@ -14859,7 +14947,7 @@ var SlideRailRoot = defineComponent54({
14859
14947
  const style = [attrs.style, props.style];
14860
14948
  if (!open && !toggle) return null;
14861
14949
  if (!open)
14862
- return /* @__PURE__ */ jsx46(
14950
+ return /* @__PURE__ */ jsx47(
14863
14951
  "nav",
14864
14952
  {
14865
14953
  ...restAttrs(attrs),
@@ -14887,7 +14975,7 @@ var SlideRailRoot = defineComponent54({
14887
14975
  itemLimit = inView ? inView.limit : mounted;
14888
14976
  isSelected = new Set(selected.value);
14889
14977
  labels = slideItemLabels(t);
14890
- return /* @__PURE__ */ jsxs39(
14978
+ return /* @__PURE__ */ jsxs40(
14891
14979
  "nav",
14892
14980
  {
14893
14981
  ...restAttrs(attrs),
@@ -14898,7 +14986,7 @@ var SlideRailRoot = defineComponent54({
14898
14986
  "data-orientation": orientation(),
14899
14987
  style: paneStyle(props.paneWidth, style),
14900
14988
  children: [
14901
- /* @__PURE__ */ jsx46(
14989
+ /* @__PURE__ */ jsx47(
14902
14990
  "ol",
14903
14991
  {
14904
14992
  ref: list,
@@ -14915,7 +15003,7 @@ var SlideRailRoot = defineComponent54({
14915
15003
  },
14916
15004
  children: groups && inView ? inView.sections.map((sec) => {
14917
15005
  const shut = collapsed.value.includes(sec.id);
14918
- return /* @__PURE__ */ jsx46(
15006
+ return /* @__PURE__ */ jsx47(
14919
15007
  SectionNode,
14920
15008
  {
14921
15009
  section: sec,
@@ -14940,7 +15028,7 @@ var SlideRailRoot = defineComponent54({
14940
15028
  }) : slides.value.slice(0, mounted).map(item)
14941
15029
  }
14942
15030
  ),
14943
- /* @__PURE__ */ jsx46(
15031
+ /* @__PURE__ */ jsx47(
14944
15032
  "div",
14945
15033
  {
14946
15034
  ref: actions,
@@ -14950,7 +15038,7 @@ var SlideRailRoot = defineComponent54({
14950
15038
  children: content
14951
15039
  }
14952
15040
  ),
14953
- gallery.value ? /* @__PURE__ */ jsx46(
15041
+ gallery.value ? /* @__PURE__ */ jsx47(
14954
15042
  Popover,
14955
15043
  {
14956
15044
  anchor: gallery.value,
@@ -14958,7 +15046,7 @@ var SlideRailRoot = defineComponent54({
14958
15046
  gallery.value = null;
14959
15047
  },
14960
15048
  label: t("rail.chooseLayout"),
14961
- children: () => /* @__PURE__ */ jsx46(
15049
+ children: () => /* @__PURE__ */ jsx47(
14962
15050
  LayoutGallery,
14963
15051
  {
14964
15052
  onChange: (layoutId) => {
@@ -14969,7 +15057,7 @@ var SlideRailRoot = defineComponent54({
14969
15057
  )
14970
15058
  }
14971
15059
  ) : null,
14972
- /* @__PURE__ */ jsx46(
15060
+ /* @__PURE__ */ jsx47(
14973
15061
  RailMenuHost,
14974
15062
  {
14975
15063
  open: menu.value ? {
@@ -15005,7 +15093,7 @@ var zoomPillProps = {
15005
15093
  /** A class name added to the pill, as React's `className`. A host `class` also works. */
15006
15094
  className: { type: String, default: void 0 }
15007
15095
  };
15008
- var PptxEditorZoomPill = defineComponent54({
15096
+ var PptxEditorZoomPill = defineComponent55({
15009
15097
  name: "PptxEditorZoomPill",
15010
15098
  props: zoomPillProps,
15011
15099
  setup(props) {
@@ -15015,8 +15103,8 @@ var PptxEditorZoomPill = defineComponent54({
15015
15103
  const fit = useEditorState((s) => s.fitZoom);
15016
15104
  const off = useEditorState((s) => s.presentationView === "slideSorter");
15017
15105
  const reason = () => off.value ? t("disabled.sorterZoom") : null;
15018
- const anchor = ref39(null);
15019
- const open = ref39(false);
15106
+ const anchor = ref40(null);
15107
+ const open = ref40(false);
15020
15108
  watch35(off, (now) => {
15021
15109
  if (now) open.value = false;
15022
15110
  });
@@ -15035,7 +15123,7 @@ var PptxEditorZoomPill = defineComponent54({
15035
15123
  };
15036
15124
  return () => {
15037
15125
  const levelLabel = off.value ? t("zoom.ariaLabel") : t("zoom.levelAriaLabel", { percent: Math.round(zoom.value * 100) });
15038
- return /* @__PURE__ */ jsxs39(
15126
+ return /* @__PURE__ */ jsxs40(
15039
15127
  "div",
15040
15128
  {
15041
15129
  class: ["pptx-zoom", props.className],
@@ -15043,7 +15131,7 @@ var PptxEditorZoomPill = defineComponent54({
15043
15131
  "aria-label": t("zoom.ariaLabel"),
15044
15132
  onMousedown: keepFocus,
15045
15133
  children: [
15046
- /* @__PURE__ */ jsx46(
15134
+ /* @__PURE__ */ jsx47(
15047
15135
  ToolButton,
15048
15136
  {
15049
15137
  label: t("zoom.zoomOut"),
@@ -15053,7 +15141,7 @@ var PptxEditorZoomPill = defineComponent54({
15053
15141
  disabledReason: reason() ?? limit(-1)
15054
15142
  }
15055
15143
  ),
15056
- /* @__PURE__ */ jsxs39(
15144
+ /* @__PURE__ */ jsxs40(
15057
15145
  "button",
15058
15146
  {
15059
15147
  ref: anchor,
@@ -15070,12 +15158,12 @@ var PptxEditorZoomPill = defineComponent54({
15070
15158
  },
15071
15159
  children: [
15072
15160
  off.value ? "\u2013" : t("zoom.level", { percent: Math.round(zoom.value * 100) }),
15073
- /* @__PURE__ */ jsx46(Icon, { name: "arrow_drop_down", className: "pptx-icon pptx-toolbar__caret" })
15161
+ /* @__PURE__ */ jsx47(Icon, { name: "arrow_drop_down", className: "pptx-icon pptx-toolbar__caret" })
15074
15162
  ]
15075
15163
  }
15076
15164
  ),
15077
15165
  levelOff.note(),
15078
- /* @__PURE__ */ jsx46(
15166
+ /* @__PURE__ */ jsx47(
15079
15167
  ToolButton,
15080
15168
  {
15081
15169
  label: t("zoom.zoomIn"),
@@ -15085,7 +15173,7 @@ var PptxEditorZoomPill = defineComponent54({
15085
15173
  disabledReason: reason() ?? limit(1)
15086
15174
  }
15087
15175
  ),
15088
- open.value && !off.value ? /* @__PURE__ */ jsx46(
15176
+ open.value && !off.value ? /* @__PURE__ */ jsx47(
15089
15177
  Popover,
15090
15178
  {
15091
15179
  anchor: anchor.value,
@@ -15094,8 +15182,8 @@ var PptxEditorZoomPill = defineComponent54({
15094
15182
  },
15095
15183
  align: "end",
15096
15184
  children: () => [
15097
- /* @__PURE__ */ jsx46(MenuItem, { checked: fit.value, onSelect: () => pick("fit"), children: () => t("zoom.fit") }),
15098
- ...ZOOM_MENU_LEVELS.map((z) => /* @__PURE__ */ jsx46(
15185
+ /* @__PURE__ */ jsx47(MenuItem, { checked: fit.value, onSelect: () => pick("fit"), children: () => t("zoom.fit") }),
15186
+ ...ZOOM_MENU_LEVELS.map((z) => /* @__PURE__ */ jsx47(
15099
15187
  MenuItem,
15100
15188
  {
15101
15189
  checked: !fit.value && Math.abs(z - zoom.value) < 1e-3,
@@ -15117,7 +15205,7 @@ var PptxEditorZoomPill = defineComponent54({
15117
15205
  // src/EditNotice.tsx
15118
15206
  import {
15119
15207
  computed as computed23,
15120
- defineComponent as defineComponent55,
15208
+ defineComponent as defineComponent56,
15121
15209
  onBeforeUnmount as onBeforeUnmount12,
15122
15210
  onScopeDispose as onScopeDispose8,
15123
15211
  shallowRef as shallowRef29,
@@ -15135,7 +15223,7 @@ import {
15135
15223
  REMOVAL_NOTICE_MS,
15136
15224
  removalNoticeShows
15137
15225
  } from "@pptx-editor.dev/core/editor";
15138
- import { jsx as jsx47, jsxs as jsxs40 } from "vue/jsx-runtime";
15226
+ import { jsx as jsx48, jsxs as jsxs41 } from "vue/jsx-runtime";
15139
15227
  function rejectionMessage(t, rejection) {
15140
15228
  return editRejectionMessage(t, rejection);
15141
15229
  }
@@ -15144,7 +15232,7 @@ var pptxEditorEditNoticeProps = {
15144
15232
  /** A class name added to the notice, as React's `className`. A host `class` also works. */
15145
15233
  className: { type: String, default: void 0 }
15146
15234
  };
15147
- var PptxEditorEditNotice = defineComponent55({
15235
+ var PptxEditorEditNotice = defineComponent56({
15148
15236
  name: "PptxEditorEditNotice",
15149
15237
  inheritAttrs: false,
15150
15238
  props: pptxEditorEditNoticeProps,
@@ -15196,7 +15284,7 @@ var PptxEditorEditNotice = defineComponent55({
15196
15284
  const classes = ["pptx-edit-notice", attrs.class, props.className];
15197
15285
  const refused = rejection.value;
15198
15286
  if (!covered.value && editNoticeShows(refused, dismissed.value))
15199
- return /* @__PURE__ */ jsxs40(
15287
+ return /* @__PURE__ */ jsxs41(
15200
15288
  "div",
15201
15289
  {
15202
15290
  ...attrs,
@@ -15205,8 +15293,8 @@ var PptxEditorEditNotice = defineComponent55({
15205
15293
  role: "status",
15206
15294
  onMousedown: keepFocus,
15207
15295
  children: [
15208
- /* @__PURE__ */ jsx47("span", { class: "pptx-edit-notice__text", children: rejectionMessage(t, refused) }),
15209
- /* @__PURE__ */ jsx47(
15296
+ /* @__PURE__ */ jsx48("span", { class: "pptx-edit-notice__text", children: rejectionMessage(t, refused) }),
15297
+ /* @__PURE__ */ jsx48(
15210
15298
  ToolButton,
15211
15299
  {
15212
15300
  label: t("notice.dismiss"),
@@ -15221,7 +15309,7 @@ var PptxEditorEditNotice = defineComponent55({
15221
15309
  );
15222
15310
  const removed = removal.value;
15223
15311
  if (!removalNoticeShows(removed, closed.value)) return null;
15224
- return /* @__PURE__ */ jsxs40(
15312
+ return /* @__PURE__ */ jsxs41(
15225
15313
  "div",
15226
15314
  {
15227
15315
  ...attrs,
@@ -15234,8 +15322,8 @@ var PptxEditorEditNotice = defineComponent55({
15234
15322
  onFocusin: () => held.value = true,
15235
15323
  onFocusout: () => held.value = false,
15236
15324
  children: [
15237
- /* @__PURE__ */ jsx47("span", { class: "pptx-edit-notice__text", children: editRemovalMessage(t, removed) }),
15238
- /* @__PURE__ */ jsx47(
15325
+ /* @__PURE__ */ jsx48("span", { class: "pptx-edit-notice__text", children: editRemovalMessage(t, removed) }),
15326
+ /* @__PURE__ */ jsx48(
15239
15327
  "button",
15240
15328
  {
15241
15329
  type: "button",
@@ -15249,7 +15337,7 @@ var PptxEditorEditNotice = defineComponent55({
15249
15337
  children: t("notice.undo")
15250
15338
  }
15251
15339
  ),
15252
- /* @__PURE__ */ jsx47(
15340
+ /* @__PURE__ */ jsx48(
15253
15341
  ToolButton,
15254
15342
  {
15255
15343
  label: t("notice.dismiss"),
@@ -15268,13 +15356,13 @@ var PptxEditorEditNotice = defineComponent55({
15268
15356
  });
15269
15357
 
15270
15358
  // src/SlideSorter.tsx
15271
- import { jsx as jsx48, jsxs as jsxs41 } from "vue/jsx-runtime";
15359
+ import { jsx as jsx49, jsxs as jsxs42 } from "vue/jsx-runtime";
15272
15360
  var sameList = (a, b) => a.length === b.length && a.every((v, i) => v === b[i]);
15273
15361
  var slideSorterProps = {
15274
15362
  /** A class name added to the sorter, as React's `className`. A host `class` also works. */
15275
15363
  className: { type: String, default: void 0 }
15276
15364
  };
15277
- var PptxEditorSlideSorter = defineComponent56({
15365
+ var PptxEditorSlideSorter = defineComponent57({
15278
15366
  name: "PptxEditorSlideSorter",
15279
15367
  props: slideSorterProps,
15280
15368
  setup(props) {
@@ -15291,10 +15379,10 @@ var PptxEditorSlideSorter = defineComponent56({
15291
15379
  const collapsed = useCollapsedSections();
15292
15380
  useOpenCurrentSection(grouped);
15293
15381
  useSorterRegistration();
15294
- const list = ref40(null);
15382
+ const list = ref41(null);
15295
15383
  const drag = useSlideDrag("x", selected, readOnly, grouped);
15296
15384
  const menu = shallowRef30(null);
15297
- const renaming = ref40(null);
15385
+ const renaming = ref41(null);
15298
15386
  useSectionRenameRequests((id) => {
15299
15387
  renaming.value = id;
15300
15388
  });
@@ -15343,7 +15431,7 @@ var PptxEditorSlideSorter = defineComponent56({
15343
15431
  const groups = grouped.value;
15344
15432
  const own = sectionOfSlide2(groups, current.value);
15345
15433
  const shut = !!own && collapsed.value.includes(own.id);
15346
- const item = (s) => /* @__PURE__ */ jsxs41(
15434
+ const item = (s) => /* @__PURE__ */ jsxs42(
15347
15435
  "li",
15348
15436
  {
15349
15437
  class: "pptx-sorter__item",
@@ -15369,15 +15457,15 @@ var PptxEditorSlideSorter = defineComponent56({
15369
15457
  );
15370
15458
  },
15371
15459
  children: [
15372
- /* @__PURE__ */ jsx48(Thumbnail, { slide: s, ratio: ratio.value }),
15373
- /* @__PURE__ */ jsx48("span", { class: "pptx-sorter__number", "aria-hidden": "true", children: s.index + 1 }),
15374
- /* @__PURE__ */ jsx48("span", { class: "pptx-sr-only", children: slideItemName2(t, s) })
15460
+ /* @__PURE__ */ jsx49(Thumbnail, { slide: s, ratio: ratio.value }),
15461
+ /* @__PURE__ */ jsx49("span", { class: "pptx-sorter__number", "aria-hidden": "true", children: s.index + 1 }),
15462
+ /* @__PURE__ */ jsx49("span", { class: "pptx-sr-only", children: slideItemName2(t, s) })
15375
15463
  ]
15376
15464
  },
15377
15465
  s.id
15378
15466
  );
15379
- return /* @__PURE__ */ jsxs41("section", { class: ["pptx-sorter", props.className], "aria-label": t("sorter.ariaLabel"), children: [
15380
- /* @__PURE__ */ jsx48(
15467
+ return /* @__PURE__ */ jsxs42("section", { class: ["pptx-sorter", props.className], "aria-label": t("sorter.ariaLabel"), children: [
15468
+ /* @__PURE__ */ jsx49(
15381
15469
  "ol",
15382
15470
  {
15383
15471
  ref: list,
@@ -15390,7 +15478,7 @@ var PptxEditorSlideSorter = defineComponent56({
15390
15478
  trackFocus(e);
15391
15479
  trackCollapse(e);
15392
15480
  },
15393
- children: groups ? groups.map((sec) => /* @__PURE__ */ jsx48(
15481
+ children: groups ? groups.map((sec) => /* @__PURE__ */ jsx49(
15394
15482
  SectionNode,
15395
15483
  {
15396
15484
  section: sec,
@@ -15408,10 +15496,10 @@ var PptxEditorSlideSorter = defineComponent56({
15408
15496
  children: () => slides.value.slice(sec.firstSlide, sec.firstSlide + sec.slideCount).map(item)
15409
15497
  },
15410
15498
  sec.id
15411
- )) : /* @__PURE__ */ jsx48("li", { role: "presentation", class: "pptx-sorter__section", children: /* @__PURE__ */ jsx48("ol", { role: "group", class: "pptx-sorter__grid", children: slides.value.map(item) }) })
15499
+ )) : /* @__PURE__ */ jsx49("li", { role: "presentation", class: "pptx-sorter__section", children: /* @__PURE__ */ jsx49("ol", { role: "group", class: "pptx-sorter__grid", children: slides.value.map(item) }) })
15412
15500
  }
15413
15501
  ),
15414
- /* @__PURE__ */ jsx48(
15502
+ /* @__PURE__ */ jsx49(
15415
15503
  RailMenuHost,
15416
15504
  {
15417
15505
  open: menu.value ? {
@@ -15430,15 +15518,15 @@ var PptxEditorSlideSorter = defineComponent56({
15430
15518
  };
15431
15519
  }
15432
15520
  });
15433
- var ReadOnlyBadge = defineComponent56({
15521
+ var ReadOnlyBadge = defineComponent57({
15434
15522
  name: "ReadOnlyBadge",
15435
15523
  setup() {
15436
15524
  const { t } = useTranslation();
15437
15525
  const damaged = useEditorState((s) => s.readOnlyReason === "damaged-slide");
15438
- return () => damaged.value ? /* @__PURE__ */ jsx48("span", { class: "pptx-statusbar__read-only", role: "status", "data-reason": "damaged-slide", children: t("statusBar.readOnlyDamaged") }) : null;
15526
+ return () => damaged.value ? /* @__PURE__ */ jsx49("span", { class: "pptx-statusbar__read-only", role: "status", "data-reason": "damaged-slide", children: t("statusBar.readOnlyDamaged") }) : null;
15439
15527
  }
15440
15528
  });
15441
- var ViewSwitch = defineComponent56({
15529
+ var ViewSwitch = defineComponent57({
15442
15530
  name: "PptxViewSwitch",
15443
15531
  setup() {
15444
15532
  const { t } = useTranslation();
@@ -15446,7 +15534,7 @@ var ViewSwitch = defineComponent56({
15446
15534
  const options = STATUS_BAR_VIEW_OPTIONS;
15447
15535
  const off = computed24(() => !cmd.isEnabled.value);
15448
15536
  const reason = computed24(
15449
- () => cmd.disabledReason.value ? translateKeyOrText19(t, cmd.disabledReason.value) : null
15537
+ () => cmd.disabledReason.value ? translateKeyOrText20(t, cmd.disabledReason.value) : null
15450
15538
  );
15451
15539
  const offAttrs = useAriaDisabled(off, reason);
15452
15540
  const pick = (e, step) => {
@@ -15466,7 +15554,7 @@ var ViewSwitch = defineComponent56({
15466
15554
  ArrowRight: 1,
15467
15555
  ArrowDown: 1
15468
15556
  };
15469
- return () => /* @__PURE__ */ jsxs41(
15557
+ return () => /* @__PURE__ */ jsxs42(
15470
15558
  "div",
15471
15559
  {
15472
15560
  class: "pptx-zoom pptx-view-switch",
@@ -15478,7 +15566,7 @@ var ViewSwitch = defineComponent56({
15478
15566
  const on = cmd.value.value === o.value;
15479
15567
  const tabStop = on || i === 0 && !options.some((x) => x.value === cmd.value.value);
15480
15568
  const label = t(o.labelKey);
15481
- return /* @__PURE__ */ jsx48(
15569
+ return /* @__PURE__ */ jsx49(
15482
15570
  "button",
15483
15571
  {
15484
15572
  type: "button",
@@ -15500,7 +15588,7 @@ var ViewSwitch = defineComponent56({
15500
15588
  e.preventDefault();
15501
15589
  pick(e, step);
15502
15590
  },
15503
- children: /* @__PURE__ */ jsx48(Icon, { paths: o.paths ?? null })
15591
+ children: /* @__PURE__ */ jsx49(Icon, { paths: o.paths ?? null })
15504
15592
  },
15505
15593
  o.value
15506
15594
  );
@@ -15511,12 +15599,12 @@ var ViewSwitch = defineComponent56({
15511
15599
  );
15512
15600
  }
15513
15601
  });
15514
- var DefaultWorkspace = defineComponent56({
15602
+ var DefaultWorkspace = defineComponent57({
15515
15603
  name: "PptxDefaultWorkspace",
15516
15604
  setup(_props, { slots }) {
15517
15605
  const editor = usePptxEditor();
15518
15606
  const view = useEditorState((s) => s.presentationView ?? "normal");
15519
- const box = ref40(null);
15607
+ const box = ref41(null);
15520
15608
  watch37(
15521
15609
  view,
15522
15610
  () => {
@@ -15535,21 +15623,21 @@ var DefaultWorkspace = defineComponent56({
15535
15623
  inset?.dispose();
15536
15624
  inset = null;
15537
15625
  });
15538
- return () => /* @__PURE__ */ jsxs41("div", { ref: box, class: "pptx-default__views", children: [
15539
- view.value === "slideSorter" ? /* @__PURE__ */ jsx48("div", { class: "pptx-default__workspace", children: /* @__PURE__ */ jsxs41("div", { class: "pptx-default__main", children: [
15540
- /* @__PURE__ */ jsx48(PptxEditorSlideSorter, {}),
15541
- /* @__PURE__ */ jsx48(PptxEditorEditNotice, {})
15626
+ return () => /* @__PURE__ */ jsxs42("div", { ref: box, class: "pptx-default__views", children: [
15627
+ view.value === "slideSorter" ? /* @__PURE__ */ jsx49("div", { class: "pptx-default__workspace", children: /* @__PURE__ */ jsxs42("div", { class: "pptx-default__main", children: [
15628
+ /* @__PURE__ */ jsx49(PptxEditorSlideSorter, {}),
15629
+ /* @__PURE__ */ jsx49(PptxEditorEditNotice, {})
15542
15630
  ] }) }) : slots.normal?.(),
15543
15631
  slots.overlay?.(),
15544
- slots.status ? slots.status() : /* @__PURE__ */ jsxs41("div", { class: "pptx-statusbar", children: [
15545
- /* @__PURE__ */ jsx48(ReadOnlyBadge, {}),
15546
- /* @__PURE__ */ jsx48(ViewSwitch, {}),
15547
- /* @__PURE__ */ jsx48(PptxEditorZoomPill, {})
15632
+ slots.status ? slots.status() : /* @__PURE__ */ jsxs42("div", { class: "pptx-statusbar", children: [
15633
+ /* @__PURE__ */ jsx49(ReadOnlyBadge, {}),
15634
+ /* @__PURE__ */ jsx49(ViewSwitch, {}),
15635
+ /* @__PURE__ */ jsx49(PptxEditorZoomPill, {})
15548
15636
  ] })
15549
15637
  ] });
15550
15638
  }
15551
15639
  });
15552
- var SlideSorterWatch = defineComponent56({
15640
+ var SlideSorterWatch = defineComponent57({
15553
15641
  name: "PptxSlideSorterWatch",
15554
15642
  setup() {
15555
15643
  const editor = usePptxEditor();
@@ -15566,17 +15654,17 @@ var SlideSorterWatch = defineComponent56({
15566
15654
  });
15567
15655
 
15568
15656
  // src/ChromeTooltip.tsx
15569
- import { Teleport as Teleport4, defineComponent as defineComponent57, onMounted as onMounted21, onUnmounted as onUnmounted5, ref as ref41, shallowRef as shallowRef31, watch as watch38 } from "vue";
15657
+ import { Teleport as Teleport4, defineComponent as defineComponent58, onMounted as onMounted21, onUnmounted as onUnmounted5, ref as ref42, shallowRef as shallowRef31, watch as watch38 } from "vue";
15570
15658
  import {
15571
15659
  listenChromeTooltips,
15572
15660
  positionChromeTooltip
15573
15661
  } from "@pptx-editor.dev/core/editor";
15574
- import { jsx as jsx49, jsxs as jsxs42 } from "vue/jsx-runtime";
15575
- var ChromeTooltip = defineComponent57({
15662
+ import { jsx as jsx50, jsxs as jsxs43 } from "vue/jsx-runtime";
15663
+ var ChromeTooltip = defineComponent58({
15576
15664
  name: "ChromeTooltip",
15577
15665
  setup() {
15578
15666
  const state = shallowRef31(null);
15579
- const bubble = ref41(null);
15667
+ const bubble = ref42(null);
15580
15668
  let stop = null;
15581
15669
  onMounted21(() => {
15582
15670
  stop = listenChromeTooltips(document, (next) => state.value = next);
@@ -15592,7 +15680,7 @@ var ChromeTooltip = defineComponent57({
15592
15680
  return () => {
15593
15681
  const s = state.value;
15594
15682
  if (!s) return null;
15595
- return /* @__PURE__ */ jsx49(Teleport4, { to: s.scope, children: /* @__PURE__ */ jsxs42(
15683
+ return /* @__PURE__ */ jsx50(Teleport4, { to: s.scope, children: /* @__PURE__ */ jsxs43(
15596
15684
  "div",
15597
15685
  {
15598
15686
  ref: bubble,
@@ -15601,8 +15689,8 @@ var ChromeTooltip = defineComponent57({
15601
15689
  "aria-hidden": "true",
15602
15690
  "data-instant": s.instant || void 0,
15603
15691
  children: [
15604
- /* @__PURE__ */ jsx49("span", { class: "pptx-tooltip__label", children: s.label }),
15605
- s.reason ? /* @__PURE__ */ jsx49("span", { class: "pptx-tooltip__reason", children: s.reason }) : null
15692
+ /* @__PURE__ */ jsx50("span", { class: "pptx-tooltip__label", children: s.label }),
15693
+ s.reason ? /* @__PURE__ */ jsx50("span", { class: "pptx-tooltip__reason", children: s.reason }) : null
15606
15694
  ]
15607
15695
  }
15608
15696
  ) });
@@ -15665,7 +15753,7 @@ var pptxEditorRootProps = {
15665
15753
  function isElement(value) {
15666
15754
  return typeof value === "object" && value !== null && value.nodeType === 1;
15667
15755
  }
15668
- var PptxEditorRoot = defineComponent58({
15756
+ var PptxEditorRoot = defineComponent59({
15669
15757
  name: "PptxEditorRoot",
15670
15758
  props: pptxEditorRootProps,
15671
15759
  emits: {
@@ -15706,7 +15794,7 @@ var PptxEditorRoot = defineComponent58({
15706
15794
  ...props.readClipboardDrawing ? { readClipboardDrawing: props.readClipboardDrawing } : {},
15707
15795
  ...props.author ? { author: props.author } : {},
15708
15796
  onFontError,
15709
- translate: (key, params) => translateKeyOrText20(t.value, key, params)
15797
+ translate: (key, params) => translateKeyOrText21(t.value, key, params)
15710
15798
  });
15711
15799
  createdFonts = props.fonts;
15712
15800
  createdFamilies = props.fontFamilies;
@@ -15796,7 +15884,7 @@ var pptxEditorViewportProps = {
15796
15884
  */
15797
15885
  label: { type: [String, Boolean], default: void 0 }
15798
15886
  };
15799
- var PptxEditorViewport = defineComponent58({
15887
+ var PptxEditorViewport = defineComponent59({
15800
15888
  name: "PptxEditorViewport",
15801
15889
  props: pptxEditorViewportProps,
15802
15890
  setup(props, { slots }) {
@@ -15809,7 +15897,7 @@ var PptxEditorViewport = defineComponent58({
15809
15897
  class: ["pptx-editor", dark.value ? "dark" : null, props.className],
15810
15898
  ...props.label === false ? {} : {
15811
15899
  role: "region",
15812
- "aria-label": props.label ? translateKeyOrText20(t, props.label) : t("viewport.ariaLabel")
15900
+ "aria-label": props.label ? translateKeyOrText21(t, props.label) : t("viewport.ariaLabel")
15813
15901
  }
15814
15902
  },
15815
15903
  slots.default?.()
@@ -15820,7 +15908,7 @@ var pptxEditorContentProps = {
15820
15908
  /** A class name added to the canvas, as React's `className`. A host `class` also works. */
15821
15909
  className: { type: String, default: void 0 }
15822
15910
  };
15823
- var PptxEditorContent = defineComponent58({
15911
+ var PptxEditorContent = defineComponent59({
15824
15912
  name: "PptxEditorContent",
15825
15913
  // The canvas renders next to its context menu layer, so the host's attributes go on the canvas.
15826
15914
  inheritAttrs: false,
@@ -15872,7 +15960,7 @@ var PptxEditorContent = defineComponent58({
15872
15960
 
15873
15961
  // src/loading.ts
15874
15962
  import {
15875
- defineComponent as defineComponent59,
15963
+ defineComponent as defineComponent60,
15876
15964
  h as h19
15877
15965
  } from "vue";
15878
15966
  import { loadingSheetSize, sameLoadingSheetSize, showsLoading } from "@pptx-editor.dev/core/editor";
@@ -15880,7 +15968,7 @@ var loadingSpinnerProps = {
15880
15968
  /** A class name added to the spinner, as React's `className`. A host `class` also works. */
15881
15969
  className: { type: String, default: void 0 }
15882
15970
  };
15883
- var PptxEditorLoadingSpinner = defineComponent59({
15971
+ var PptxEditorLoadingSpinner = defineComponent60({
15884
15972
  name: "PptxEditorLoadingSpinner",
15885
15973
  props: loadingSpinnerProps,
15886
15974
  setup(props) {
@@ -15903,7 +15991,7 @@ var loadingProps = {
15903
15991
  /** Inline styles for the loading container, as React's `style`. */
15904
15992
  style: { type: Object, default: void 0 }
15905
15993
  };
15906
- var LoadingImpl = defineComponent59({
15994
+ var LoadingImpl = defineComponent60({
15907
15995
  name: "PptxEditorLoading",
15908
15996
  props: loadingProps,
15909
15997
  setup(props, { slots }) {
@@ -15952,10 +16040,10 @@ var PptxEditorLoading = Object.assign(LoadingImpl, {
15952
16040
  // src/NotesPane.tsx
15953
16041
  import {
15954
16042
  computed as computed25,
15955
- defineComponent as defineComponent61,
16043
+ defineComponent as defineComponent62,
15956
16044
  nextTick as nextTick10,
15957
16045
  onBeforeUnmount as onBeforeUnmount14,
15958
- ref as ref42,
16046
+ ref as ref43,
15959
16047
  shallowRef as shallowRef33,
15960
16048
  useId as useId22,
15961
16049
  watch as watch41
@@ -15980,7 +16068,7 @@ import {
15980
16068
  } from "@pptx-editor.dev/core/editor";
15981
16069
 
15982
16070
  // src/NotesView.tsx
15983
- import { defineComponent as defineComponent60, onMounted as onMounted23, watch as watch40 } from "vue";
16071
+ import { defineComponent as defineComponent61, onMounted as onMounted23, watch as watch40 } from "vue";
15984
16072
  import {
15985
16073
  notesFieldBeforeInput,
15986
16074
  notesFieldFocused,
@@ -15990,8 +16078,8 @@ import {
15990
16078
  renderNotes,
15991
16079
  selectNotes
15992
16080
  } from "@pptx-editor.dev/core/editor";
15993
- import { jsx as jsx50 } from "vue/jsx-runtime";
15994
- var NotesField = defineComponent60({
16081
+ import { jsx as jsx51 } from "vue/jsx-runtime";
16082
+ var NotesField = defineComponent61({
15995
16083
  name: "PptxNotesField",
15996
16084
  props: {
15997
16085
  id: { type: String, default: void 0 },
@@ -16040,7 +16128,7 @@ var NotesField = defineComponent60({
16040
16128
  const draft = (e) => {
16041
16129
  if (!props.readOnly) props.onDraft(notesFieldText(e.currentTarget));
16042
16130
  };
16043
- return () => /* @__PURE__ */ jsx50(
16131
+ return () => /* @__PURE__ */ jsx51(
16044
16132
  "div",
16045
16133
  {
16046
16134
  ref: props.field,
@@ -16078,7 +16166,7 @@ var NotesField = defineComponent60({
16078
16166
  });
16079
16167
 
16080
16168
  // src/NotesPane.tsx
16081
- import { jsx as jsx51, jsxs as jsxs43 } from "vue/jsx-runtime";
16169
+ import { jsx as jsx52, jsxs as jsxs44 } from "vue/jsx-runtime";
16082
16170
  var notesPaneProps = {
16083
16171
  /** Whether the pane is open, controlled. Use with the `update:open` event (`v-model:open`). */
16084
16172
  open: { type: Boolean, default: void 0 },
@@ -16096,8 +16184,8 @@ var notesPaneProps = {
16096
16184
  };
16097
16185
  function useNotesOpen(props, emit) {
16098
16186
  const shared = usePaneState();
16099
- const own = ref42(props.defaultOpen ?? true);
16100
- const owner = ref42(false);
16187
+ const own = ref43(props.defaultOpen ?? true);
16188
+ const owner = ref43(false);
16101
16189
  const open = computed25(
16102
16190
  () => props.open !== void 0 ? props.open : shared && owner.value ? shared.notesOpen.value ?? props.defaultOpen ?? true : own.value
16103
16191
  );
@@ -16132,7 +16220,7 @@ function useNotesOpen(props, emit) {
16132
16220
  );
16133
16221
  return { open, setOpen };
16134
16222
  }
16135
- var PptxEditorNotesPane = defineComponent61({
16223
+ var PptxEditorNotesPane = defineComponent62({
16136
16224
  name: "PptxEditorNotesPane",
16137
16225
  props: notesPaneProps,
16138
16226
  emits: { "update:open": (_open) => true },
@@ -16146,10 +16234,10 @@ var PptxEditorNotesPane = defineComponent61({
16146
16234
  const pane = useNotesOpen(props, emit);
16147
16235
  const notesId = useId22();
16148
16236
  const draft = shallowRef33(null);
16149
- const refusal = ref42(null);
16237
+ const refusal = ref43(null);
16150
16238
  const formats = shallowRef33(NO_NOTES_FORMATS);
16151
- const canFormat = ref42(false);
16152
- const field = ref42(null);
16239
+ const canFormat = ref43(false);
16240
+ const field = ref43(null);
16153
16241
  let pending = null;
16154
16242
  let bound = null;
16155
16243
  const restore = { value: null };
@@ -16218,7 +16306,7 @@ var PptxEditorNotesPane = defineComponent61({
16218
16306
  const ed = editor.value;
16219
16307
  if (ed && ed.snapshot().selection.kind !== "none") ed.setSelection({ kind: "none" });
16220
16308
  };
16221
- const active = ref42(false);
16309
+ const active = ref43(false);
16222
16310
  const target = () => ({
16223
16311
  formats: formats.value,
16224
16312
  readOnly: readOnly.value,
@@ -16252,7 +16340,7 @@ var PptxEditorNotesPane = defineComponent61({
16252
16340
  );
16253
16341
  const painter = createNotesFindPainter();
16254
16342
  let mounted = true;
16255
- const findCount = ref42(0);
16343
+ const findCount = ref43(0);
16256
16344
  const selectionKind = useEditorState((s) => s.selection.kind);
16257
16345
  const revision = useEditorState((s) => s.revision);
16258
16346
  watch41(
@@ -16354,7 +16442,7 @@ var PptxEditorNotesPane = defineComponent61({
16354
16442
  if (masterView.value) return null;
16355
16443
  const open = pane.open.value;
16356
16444
  const d = draft.value;
16357
- return /* @__PURE__ */ jsxs43(
16445
+ return /* @__PURE__ */ jsxs44(
16358
16446
  "section",
16359
16447
  {
16360
16448
  class: ["pptx-notes", props.className],
@@ -16362,9 +16450,9 @@ var PptxEditorNotesPane = defineComponent61({
16362
16450
  "aria-label": t("notes.title"),
16363
16451
  "data-open": open ? "true" : "false",
16364
16452
  children: [
16365
- /* @__PURE__ */ jsxs43("div", { class: "pptx-notes__head", onMousedown: keepFocus, children: [
16366
- /* @__PURE__ */ jsx51("span", { children: t("notes.title") }),
16367
- open && !readOnly.value && props.showFormatButtons ? /* @__PURE__ */ jsx51("div", { class: "pptx-notes__format", role: "group", "aria-label": t("notes.format"), children: NOTES_FORMAT_BUTTONS.map(([format, icon, key]) => /* @__PURE__ */ jsx51(
16453
+ /* @__PURE__ */ jsxs44("div", { class: "pptx-notes__head", onMousedown: keepFocus, children: [
16454
+ /* @__PURE__ */ jsx52("span", { children: t("notes.title") }),
16455
+ open && !readOnly.value && props.showFormatButtons ? /* @__PURE__ */ jsx52("div", { class: "pptx-notes__format", role: "group", "aria-label": t("notes.format"), children: NOTES_FORMAT_BUTTONS.map(([format, icon, key]) => /* @__PURE__ */ jsx52(
16368
16456
  ToolButton,
16369
16457
  {
16370
16458
  label: t(key),
@@ -16376,7 +16464,7 @@ var PptxEditorNotesPane = defineComponent61({
16376
16464
  },
16377
16465
  format
16378
16466
  )) }) : null,
16379
- /* @__PURE__ */ jsx51(
16467
+ /* @__PURE__ */ jsx52(
16380
16468
  ToolButton,
16381
16469
  {
16382
16470
  label: open ? t("notes.collapse") : t("notes.expand"),
@@ -16390,7 +16478,7 @@ var PptxEditorNotesPane = defineComponent61({
16390
16478
  }
16391
16479
  )
16392
16480
  ] }),
16393
- open ? /* @__PURE__ */ jsx51(
16481
+ open ? /* @__PURE__ */ jsx52(
16394
16482
  NotesField,
16395
16483
  {
16396
16484
  id: notesId,
@@ -16413,7 +16501,7 @@ var PptxEditorNotesPane = defineComponent61({
16413
16501
  onFocus
16414
16502
  }
16415
16503
  ) : null,
16416
- refusal.value ? /* @__PURE__ */ jsx51("p", { class: "pptx-notes__refusal", role: "alert", children: refusal.value }) : null
16504
+ refusal.value ? /* @__PURE__ */ jsx52("p", { class: "pptx-notes__refusal", role: "alert", children: refusal.value }) : null
16417
16505
  ]
16418
16506
  }
16419
16507
  );
@@ -16424,7 +16512,7 @@ var PptxEditorNotesPane = defineComponent61({
16424
16512
  // src/OpenFailure.tsx
16425
16513
  import {
16426
16514
  computed as computed26,
16427
- defineComponent as defineComponent62,
16515
+ defineComponent as defineComponent63,
16428
16516
  nextTick as nextTick11,
16429
16517
  shallowRef as shallowRef34,
16430
16518
  useId as useId23
@@ -16436,7 +16524,7 @@ import {
16436
16524
  openFailureKey,
16437
16525
  shownOpenFailure
16438
16526
  } from "@pptx-editor.dev/core/editor";
16439
- import { jsx as jsx52, jsxs as jsxs44 } from "vue/jsx-runtime";
16527
+ import { jsx as jsx53, jsxs as jsxs45 } from "vue/jsx-runtime";
16440
16528
  function useOpenFailure(options = {}) {
16441
16529
  const current = useEditorState(shownOpenFailure);
16442
16530
  const ready = useEditorState((s) => s.status === "ready");
@@ -16495,7 +16583,7 @@ var openFailureProps = {
16495
16583
  style: { type: Object, default: void 0 },
16496
16584
  ...chromeTranslateProp
16497
16585
  };
16498
- var PptxEditorOpenFailure = defineComponent62({
16586
+ var PptxEditorOpenFailure = defineComponent63({
16499
16587
  name: "PptxEditorOpenFailure",
16500
16588
  props: openFailureProps,
16501
16589
  emits: {
@@ -16529,7 +16617,7 @@ var PptxEditorOpenFailure = defineComponent62({
16529
16617
  if (focused) editor.value?.focus();
16530
16618
  };
16531
16619
  const context = { failure: shown, message: packaged, dismiss: close };
16532
- return /* @__PURE__ */ jsxs44(
16620
+ return /* @__PURE__ */ jsxs45(
16533
16621
  "div",
16534
16622
  {
16535
16623
  ref: rootRef,
@@ -16539,14 +16627,14 @@ var PptxEditorOpenFailure = defineComponent62({
16539
16627
  "aria-labelledby": titleId,
16540
16628
  "data-reason": shown.reason,
16541
16629
  children: [
16542
- /* @__PURE__ */ jsxs44("div", { class: "pptx-open-failure__text", role: "alert", children: [
16543
- /* @__PURE__ */ jsx52("p", { id: titleId, class: "pptx-open-failure__title", children: props.title ?? t("openFailure.title") }),
16544
- /* @__PURE__ */ jsx52("div", { class: "pptx-open-failure__message", children: slots.message ? slots.message(context) : typeof props.message === "function" ? props.message(shown) : props.message ?? packaged }),
16545
- kept.value ? /* @__PURE__ */ jsx52("p", { class: "pptx-open-failure__kept", children: t("openFailure.kept") }) : null,
16546
- props.showCode ? /* @__PURE__ */ jsx52("p", { class: "pptx-open-failure__code", children: t("openFailure.code", { code: shown.code }) }) : null
16630
+ /* @__PURE__ */ jsxs45("div", { class: "pptx-open-failure__text", role: "alert", children: [
16631
+ /* @__PURE__ */ jsx53("p", { id: titleId, class: "pptx-open-failure__title", children: props.title ?? t("openFailure.title") }),
16632
+ /* @__PURE__ */ jsx53("div", { class: "pptx-open-failure__message", children: slots.message ? slots.message(context) : typeof props.message === "function" ? props.message(shown) : props.message ?? packaged }),
16633
+ kept.value ? /* @__PURE__ */ jsx53("p", { class: "pptx-open-failure__kept", children: t("openFailure.kept") }) : null,
16634
+ props.showCode ? /* @__PURE__ */ jsx53("p", { class: "pptx-open-failure__code", children: t("openFailure.code", { code: shown.code }) }) : null
16547
16635
  ] }),
16548
- /* @__PURE__ */ jsx52("p", { class: "pptx-open-failure__status", role: "status", children: copyShown ? t(copyShown.copied ? "openFailure.copied" : "openFailure.copyFailed") : null }),
16549
- copyShown && !copyShown.copied ? /* @__PURE__ */ jsx52(
16636
+ /* @__PURE__ */ jsx53("p", { class: "pptx-open-failure__status", role: "status", children: copyShown ? t(copyShown.copied ? "openFailure.copied" : "openFailure.copyFailed") : null }),
16637
+ copyShown && !copyShown.copied ? /* @__PURE__ */ jsx53(
16550
16638
  "textarea",
16551
16639
  {
16552
16640
  ref: reportRef,
@@ -16558,9 +16646,9 @@ var PptxEditorOpenFailure = defineComponent62({
16558
16646
  onFocus: (e) => e.currentTarget.select()
16559
16647
  }
16560
16648
  ) : null,
16561
- /* @__PURE__ */ jsxs44("div", { class: "pptx-open-failure__actions", children: [
16649
+ /* @__PURE__ */ jsxs45("div", { class: "pptx-open-failure__actions", children: [
16562
16650
  slots.actions ? slots.actions(context) : props.actions?.(context),
16563
- props.showCopy ? /* @__PURE__ */ jsx52(
16651
+ props.showCopy ? /* @__PURE__ */ jsx53(
16564
16652
  "button",
16565
16653
  {
16566
16654
  type: "button",
@@ -16569,7 +16657,7 @@ var PptxEditorOpenFailure = defineComponent62({
16569
16657
  children: t("openFailure.copyDetails")
16570
16658
  }
16571
16659
  ) : null,
16572
- props.showClose ? /* @__PURE__ */ jsx52("button", { type: "button", class: "pptx-open-failure__action", onClick: close, children: props.closeLabel ?? t("openFailure.close") }) : null
16660
+ props.showClose ? /* @__PURE__ */ jsx53("button", { type: "button", class: "pptx-open-failure__action", onClick: close, children: props.closeLabel ?? t("openFailure.close") }) : null
16573
16661
  ] })
16574
16662
  ]
16575
16663
  },
@@ -16582,8 +16670,8 @@ var PptxEditorOpenFailure = defineComponent62({
16582
16670
  // src/FontNotice.tsx
16583
16671
  import {
16584
16672
  computed as computed27,
16585
- defineComponent as defineComponent63,
16586
- ref as ref43,
16673
+ defineComponent as defineComponent64,
16674
+ ref as ref44,
16587
16675
  shallowRef as shallowRef35,
16588
16676
  watch as watch42
16589
16677
  } from "vue";
@@ -16593,13 +16681,13 @@ import {
16593
16681
  fontNoticeFamilies,
16594
16682
  fontNoticeList
16595
16683
  } from "@pptx-editor.dev/core/editor";
16596
- import { jsx as jsx53, jsxs as jsxs45 } from "vue/jsx-runtime";
16684
+ import { jsx as jsx54, jsxs as jsxs46 } from "vue/jsx-runtime";
16597
16685
  var pptxEditorFontNoticeProps = {
16598
16686
  ...chromeTranslateProp,
16599
16687
  /** A class name added to the notice, as React's `className`. A host `class` also works. */
16600
16688
  className: { type: String, default: void 0 }
16601
16689
  };
16602
- var PptxEditorFontNotice = defineComponent63({
16690
+ var PptxEditorFontNotice = defineComponent64({
16603
16691
  name: "PptxEditorFontNotice",
16604
16692
  inheritAttrs: false,
16605
16693
  props: pptxEditorFontNoticeProps,
@@ -16613,7 +16701,7 @@ var PptxEditorFontNotice = defineComponent63({
16613
16701
  const dismissed = shallowRef35(null);
16614
16702
  const outcome = shallowRef35(null);
16615
16703
  const status = computed27(() => outcome.value?.key === key.value ? outcome.value.text : null);
16616
- const busy = ref43(false);
16704
+ const busy = ref44(false);
16617
16705
  let round = 0;
16618
16706
  watch42(loadState, () => {
16619
16707
  round += 1;
@@ -16636,7 +16724,7 @@ var PptxEditorFontNotice = defineComponent63({
16636
16724
  return () => {
16637
16725
  const families = missing.value;
16638
16726
  if (families.length === 0 && !status.value || dismissed.value === key.value) return null;
16639
- return /* @__PURE__ */ jsxs45(
16727
+ return /* @__PURE__ */ jsxs46(
16640
16728
  "div",
16641
16729
  {
16642
16730
  ...attrs,
@@ -16644,11 +16732,11 @@ var PptxEditorFontNotice = defineComponent63({
16644
16732
  role: "status",
16645
16733
  onMousedown: keepFocus,
16646
16734
  children: [
16647
- /* @__PURE__ */ jsxs45("span", { class: "pptx-font-notice__text", children: [
16735
+ /* @__PURE__ */ jsxs46("span", { class: "pptx-font-notice__text", children: [
16648
16736
  families.length ? t("fonts.notice", { families: fontNoticeList(families, t) }) : status.value,
16649
16737
  families.length && status.value ? ` ${status.value}` : ""
16650
16738
  ] }),
16651
- families.length && canQueryLocalFonts() ? /* @__PURE__ */ jsx53(
16739
+ families.length && canQueryLocalFonts() ? /* @__PURE__ */ jsx54(
16652
16740
  "button",
16653
16741
  {
16654
16742
  type: "button",
@@ -16658,7 +16746,7 @@ var PptxEditorFontNotice = defineComponent63({
16658
16746
  children: t("fonts.useLocal")
16659
16747
  }
16660
16748
  ) : null,
16661
- /* @__PURE__ */ jsx53(
16749
+ /* @__PURE__ */ jsx54(
16662
16750
  ToolButton,
16663
16751
  {
16664
16752
  label: t("fonts.dismiss"),
@@ -16677,11 +16765,11 @@ var PptxEditorFontNotice = defineComponent63({
16677
16765
 
16678
16766
  // src/ribbon.ts
16679
16767
  import {
16680
- defineComponent as defineComponent64,
16768
+ defineComponent as defineComponent65,
16681
16769
  h as h20,
16682
16770
  isVNode as isVNode7,
16683
16771
  normalizeClass as normalizeClass7,
16684
- ref as ref44,
16772
+ ref as ref45,
16685
16773
  watch as watch43,
16686
16774
  nextTick as nextTick12,
16687
16775
  Comment as Comment4,
@@ -16693,7 +16781,7 @@ import {
16693
16781
  ribbonInsertTab,
16694
16782
  ribbonShownTab,
16695
16783
  ribbonTabs,
16696
- translateKeyOrText as translateKeyOrText21,
16784
+ translateKeyOrText as translateKeyOrText22,
16697
16785
  warnRibbonChild
16698
16786
  } from "@pptx-editor.dev/core/editor";
16699
16787
  var ribbonTabProps = {
@@ -16710,7 +16798,7 @@ var ribbonTabProps = {
16710
16798
  /** A class name added to the tab's panel, as React's `className`. A host `class` also works. */
16711
16799
  className: { type: String, default: void 0 }
16712
16800
  };
16713
- var RibbonTab = defineComponent64({
16801
+ var RibbonTab = defineComponent65({
16714
16802
  name: "RibbonTab",
16715
16803
  props: ribbonTabProps,
16716
16804
  setup() {
@@ -16763,7 +16851,7 @@ var sameLayout = (a, b) => {
16763
16851
  return key(a) === key(b);
16764
16852
  };
16765
16853
  var PptxEditorRibbon = Object.assign(
16766
- defineComponent64({
16854
+ defineComponent65({
16767
16855
  name: "PptxEditorRibbon",
16768
16856
  props: ribbonProps,
16769
16857
  emits: {
@@ -16774,16 +16862,16 @@ var PptxEditorRibbon = Object.assign(
16774
16862
  const { t } = useTranslation();
16775
16863
  const baseId = useId24();
16776
16864
  const layout = useEditorState((s) => ribbonTabs(s), sameLayout);
16777
- const own = ref44(props.defaultTab);
16865
+ const own = ref45(props.defaultTab);
16778
16866
  const names = /* @__PURE__ */ new Map();
16779
- const root = ref44(null);
16867
+ const root = ref45(null);
16780
16868
  let focusInside = false;
16781
16869
  const select = (id) => {
16782
16870
  if (props.tab === void 0) own.value = id;
16783
16871
  emit("update:tab", id);
16784
16872
  emit("tabChange", id);
16785
16873
  };
16786
- const shown = ref44({
16874
+ const shown = ref45({
16787
16875
  id: void 0,
16788
16876
  fellBack: false
16789
16877
  });
@@ -16817,7 +16905,7 @@ var PptxEditorRibbon = Object.assign(
16817
16905
  layout.value,
16818
16906
  specs,
16819
16907
  props.preset,
16820
- (key) => translateKeyOrText21(t, key),
16908
+ (key) => translateKeyOrText22(t, key),
16821
16909
  "PptxEditorRibbon.Tab"
16822
16910
  );
16823
16911
  insertTab = ribbonInsertTab(tabs);
@@ -16925,7 +17013,7 @@ var PptxEditorRibbon = Object.assign(
16925
17013
 
16926
17014
  // src/status-bar.ts
16927
17015
  import {
16928
- defineComponent as defineComponent65,
17016
+ defineComponent as defineComponent66,
16929
17017
  h as h21,
16930
17018
  isVNode as isVNode8,
16931
17019
  normalizeClass as normalizeClass8
@@ -16940,7 +17028,7 @@ var partProps4 = {
16940
17028
  function keepFocus2(e) {
16941
17029
  if (chromeKeepsFocus2(e.target)) e.preventDefault();
16942
17030
  }
16943
- var StatusBarSlideNumber = defineComponent65({
17031
+ var StatusBarSlideNumber = defineComponent66({
16944
17032
  name: "StatusBarSlideNumber",
16945
17033
  props: partProps4,
16946
17034
  setup(props) {
@@ -16968,7 +17056,7 @@ var notesPartProps = {
16968
17056
  /** Render the one element of the default slot as the button: it gets the label, state, and click. */
16969
17057
  asChild: { type: Boolean, default: false }
16970
17058
  };
16971
- var StatusBarNotes = defineComponent65({
17059
+ var StatusBarNotes = defineComponent66({
16972
17060
  name: "StatusBarNotes",
16973
17061
  inheritAttrs: false,
16974
17062
  props: notesPartProps,
@@ -16997,7 +17085,7 @@ var StatusBarNotes = defineComponent65({
16997
17085
  };
16998
17086
  }
16999
17087
  });
17000
- var StatusBarViews = defineComponent65({
17088
+ var StatusBarViews = defineComponent66({
17001
17089
  name: "StatusBarViews",
17002
17090
  props: partProps4,
17003
17091
  setup(props) {
@@ -17006,7 +17094,7 @@ var StatusBarViews = defineComponent65({
17006
17094
  ]);
17007
17095
  }
17008
17096
  });
17009
- var StatusBarZoom = defineComponent65({
17097
+ var StatusBarZoom = defineComponent66({
17010
17098
  name: "StatusBarZoom",
17011
17099
  props: partProps4,
17012
17100
  setup(props) {
@@ -17040,7 +17128,7 @@ function flatten6(children, out = []) {
17040
17128
  return out;
17041
17129
  }
17042
17130
  var PptxEditorStatusBar = Object.assign(
17043
- defineComponent65({
17131
+ defineComponent66({
17044
17132
  name: "PptxEditorStatusBar",
17045
17133
  props: statusBarProps,
17046
17134
  setup(props, { slots }) {
@@ -17423,7 +17511,7 @@ var OPEN_FAILURE_ACTION_NAMES = {
17423
17511
  actions: "The #openFailureActions slot",
17424
17512
  off: ':open-failure="false"'
17425
17513
  };
17426
- var PptxEditorDefault = defineComponent66({
17514
+ var PptxEditorDefault = defineComponent67({
17427
17515
  name: "PptxEditor",
17428
17516
  // The root renders no element, so the host's attributes (`class`, `style`, `id`, `data-*`)
17429
17517
  // go onto the viewport, as React's `className` does.