@stll/folio-react 0.7.0 → 0.8.1

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.
@@ -1,12 +1,14 @@
1
- import { r as useFolioUI } from "./folio-ui-C-85DSuK.js";
1
+ import { r as useFolioUI } from "./folio-ui-BgDDRsUX.js";
2
2
  import { a as DIALOG_LABEL_CLASS, c as DIALOG_SECONDARY_BUTTON_CLASS, i as DIALOG_INPUT_CLASS, l as DIALOG_TITLE_CLASS, n as DIALOG_BODY_CLASS, o as DIALOG_POPUP_CLASS, r as DIALOG_FOOTER_CLASS, s as DIALOG_PRIMARY_BUTTON_CLASS, t as DIALOG_BACKDROP_CLASS, u as useCloseOnDialogOpenChange } from "./dialogChrome-BoGYPgeu.js";
3
3
  import { c } from "react-compiler-runtime";
4
4
  import { useEffect, useId, useState } from "react";
5
+ import { useTranslations } from "use-intl";
5
6
  import { jsx, jsxs } from "react/jsx-runtime";
6
7
  //#region src/components/dialogs/HyperlinkDialog.tsx
7
8
  function HyperlinkDialog({ isOpen, onClose, onSubmit, onRemove, currentData, selectedText, bookmarks = [] }) {
8
9
  const { Root: Dialog, Portal: DialogPortal, Backdrop: DialogBackdrop, Popup: DialogPopup, Title: DialogTitle, Close: DialogClose } = useFolioUI().Dialog;
9
10
  const handleOpenChange = useCloseOnDialogOpenChange(onClose);
11
+ const t = useTranslations("folio");
10
12
  const id = useId();
11
13
  const [targetType, setTargetType] = useState("url");
12
14
  const [url, setUrl] = useState("");
@@ -79,7 +81,7 @@ function HyperlinkDialog({ isOpen, onClose, onSubmit, onRemove, currentData, sel
79
81
  htmlFor: fieldIds.targetType,
80
82
  children: [/* @__PURE__ */ jsx("span", {
81
83
  className: "text-muted-foreground text-[13px]",
82
- children: "Link to"
84
+ children: t("dialogs.hyperlink.linkTo")
83
85
  }), /* @__PURE__ */ jsxs("select", {
84
86
  className: "border-input bg-background text-foreground rounded border px-2 py-1.5 text-[13px] outline-none",
85
87
  id: fieldIds.targetType,
@@ -87,10 +89,10 @@ function HyperlinkDialog({ isOpen, onClose, onSubmit, onRemove, currentData, sel
87
89
  value: targetType,
88
90
  children: [/* @__PURE__ */ jsx("option", {
89
91
  value: "url",
90
- children: "Web address"
92
+ children: t("dialogs.hyperlink.tabWebAddress")
91
93
  }), /* @__PURE__ */ jsx("option", {
92
94
  value: "bookmark",
93
- children: "Bookmark"
95
+ children: t("dialogs.hyperlink.tabBookmark")
94
96
  })]
95
97
  })]
96
98
  }),
@@ -100,7 +102,7 @@ function HyperlinkDialog({ isOpen, onClose, onSubmit, onRemove, currentData, sel
100
102
  children: [
101
103
  /* @__PURE__ */ jsx("span", {
102
104
  className: "text-muted-foreground text-[13px]",
103
- children: "Address"
105
+ children: t("dialogs.hyperlink.addressLabel")
104
106
  }),
105
107
  /* @__PURE__ */ jsx("input", {
106
108
  "aria-invalid": touched && urlError.length > 0,
@@ -122,7 +124,7 @@ function HyperlinkDialog({ isOpen, onClose, onSubmit, onRemove, currentData, sel
122
124
  htmlFor: fieldIds.bookmark,
123
125
  children: [/* @__PURE__ */ jsx("span", {
124
126
  className: "text-muted-foreground text-[13px]",
125
- children: "Bookmark"
127
+ children: t("dialogs.hyperlink.bookmarkLabel")
126
128
  }), /* @__PURE__ */ jsxs("select", {
127
129
  className: "border-input bg-background text-foreground rounded border px-2 py-1.5 text-[13px] outline-none",
128
130
  id: fieldIds.bookmark,
@@ -130,7 +132,7 @@ function HyperlinkDialog({ isOpen, onClose, onSubmit, onRemove, currentData, sel
130
132
  value: bookmark,
131
133
  children: [/* @__PURE__ */ jsx("option", {
132
134
  value: "",
133
- children: "Select a bookmark"
135
+ children: t("dialogs.hyperlink.bookmarkPlaceholder")
134
136
  }), bookmarks.map((option) => /* @__PURE__ */ jsx("option", {
135
137
  value: option.name,
136
138
  children: option.label ?? option.name
@@ -142,7 +144,7 @@ function HyperlinkDialog({ isOpen, onClose, onSubmit, onRemove, currentData, sel
142
144
  htmlFor: fieldIds.displayText,
143
145
  children: [/* @__PURE__ */ jsx("span", {
144
146
  className: DIALOG_LABEL_CLASS,
145
- children: "Text to display"
147
+ children: t("dialogs.hyperlink.displayTextPlaceholder")
146
148
  }), /* @__PURE__ */ jsx("input", {
147
149
  className: DIALOG_INPUT_CLASS,
148
150
  id: fieldIds.displayText,
@@ -155,7 +157,7 @@ function HyperlinkDialog({ isOpen, onClose, onSubmit, onRemove, currentData, sel
155
157
  htmlFor: fieldIds.tooltip,
156
158
  children: [/* @__PURE__ */ jsx("span", {
157
159
  className: DIALOG_LABEL_CLASS,
158
- children: "Screen tip"
160
+ children: t("dialogs.hyperlink.screenTipLabel")
159
161
  }), /* @__PURE__ */ jsx("input", {
160
162
  className: DIALOG_INPUT_CLASS,
161
163
  id: fieldIds.tooltip,
@@ -172,18 +174,18 @@ function HyperlinkDialog({ isOpen, onClose, onSubmit, onRemove, currentData, sel
172
174
  className: "text-destructive me-auto rounded px-4 py-1.5 text-[13px]",
173
175
  onClick: handleRemove,
174
176
  type: "button",
175
- children: "Remove"
177
+ children: t("common.remove")
176
178
  }),
177
179
  /* @__PURE__ */ jsx(DialogClose, {
178
180
  className: DIALOG_SECONDARY_BUTTON_CLASS,
179
- children: "Cancel"
181
+ children: t("common.cancel")
180
182
  }),
181
183
  /* @__PURE__ */ jsx("button", {
182
184
  className: DIALOG_PRIMARY_BUTTON_CLASS,
183
185
  disabled: !canSubmit,
184
186
  onClick: handleSubmit,
185
187
  type: "button",
186
- children: isEditing ? "Update" : "Insert"
188
+ children: isEditing ? t("common.update") : t("common.insert")
187
189
  })
188
190
  ]
189
191
  })
@@ -216,6 +218,7 @@ function normalizeUrl(value) {
216
218
  function InsertImageDialog({ isOpen, onClose, onInsert, accept = "image/png,image/jpeg,image/gif,image/webp" }) {
217
219
  const { Root: Dialog, Portal: DialogPortal, Backdrop: DialogBackdrop, Popup: DialogPopup, Title: DialogTitle, Close: DialogClose } = useFolioUI().Dialog;
218
220
  const handleOpenChange = useCloseOnDialogOpenChange(onClose);
221
+ const t = useTranslations("folio");
219
222
  const id = useId();
220
223
  const [file, setFile] = useState(null);
221
224
  const [alt, setAlt] = useState("");
@@ -254,7 +257,7 @@ function InsertImageDialog({ isOpen, onClose, onInsert, accept = "image/png,imag
254
257
  children: [
255
258
  /* @__PURE__ */ jsx(DialogTitle, {
256
259
  className: DIALOG_TITLE_CLASS,
257
- children: "Insert Image"
260
+ children: t("dialogs.insertImage.title")
258
261
  }),
259
262
  /* @__PURE__ */ jsxs("div", {
260
263
  className: DIALOG_BODY_CLASS,
@@ -264,7 +267,7 @@ function InsertImageDialog({ isOpen, onClose, onInsert, accept = "image/png,imag
264
267
  htmlFor: fieldIds.file,
265
268
  children: [/* @__PURE__ */ jsx("span", {
266
269
  className: DIALOG_LABEL_CLASS,
267
- children: "Image file"
270
+ children: t("dialogs.insertImage.imageFile")
268
271
  }), /* @__PURE__ */ jsx("input", {
269
272
  accept,
270
273
  className: DIALOG_INPUT_CLASS,
@@ -278,7 +281,7 @@ function InsertImageDialog({ isOpen, onClose, onInsert, accept = "image/png,imag
278
281
  htmlFor: fieldIds.alt,
279
282
  children: [/* @__PURE__ */ jsx("span", {
280
283
  className: DIALOG_LABEL_CLASS,
281
- children: "Alt text"
284
+ children: t("dialogs.insertImage.altText")
282
285
  }), /* @__PURE__ */ jsx("input", {
283
286
  className: DIALOG_INPUT_CLASS,
284
287
  id: fieldIds.alt,
@@ -294,7 +297,7 @@ function InsertImageDialog({ isOpen, onClose, onInsert, accept = "image/png,imag
294
297
  htmlFor: fieldIds.width,
295
298
  children: [/* @__PURE__ */ jsx("span", {
296
299
  className: DIALOG_LABEL_CLASS,
297
- children: "Width"
300
+ children: t("dialogs.imageProperties.widthLabel")
298
301
  }), /* @__PURE__ */ jsx("input", {
299
302
  className: DIALOG_INPUT_CLASS,
300
303
  id: fieldIds.width,
@@ -309,7 +312,7 @@ function InsertImageDialog({ isOpen, onClose, onInsert, accept = "image/png,imag
309
312
  htmlFor: fieldIds.height,
310
313
  children: [/* @__PURE__ */ jsx("span", {
311
314
  className: DIALOG_LABEL_CLASS,
312
- children: "Height"
315
+ children: t("dialogs.imageProperties.heightLabel")
313
316
  }), /* @__PURE__ */ jsx("input", {
314
317
  className: DIALOG_INPUT_CLASS,
315
318
  id: fieldIds.height,
@@ -327,13 +330,13 @@ function InsertImageDialog({ isOpen, onClose, onInsert, accept = "image/png,imag
327
330
  className: DIALOG_FOOTER_CLASS,
328
331
  children: [/* @__PURE__ */ jsx(DialogClose, {
329
332
  className: DIALOG_SECONDARY_BUTTON_CLASS,
330
- children: "Cancel"
333
+ children: t("common.cancel")
331
334
  }), /* @__PURE__ */ jsx("button", {
332
335
  className: DIALOG_PRIMARY_BUTTON_CLASS,
333
336
  disabled: !file,
334
337
  onClick: handleInsert,
335
338
  type: "button",
336
- children: "Insert"
339
+ children: t("common.insert")
337
340
  })]
338
341
  })
339
342
  ]
@@ -369,6 +372,7 @@ const DEFAULT_STYLE_OPTIONS = [
369
372
  function InsertTableDialog({ isOpen, onClose, onInsert, defaultRows = 3, defaultColumns = 3, styleOptions = DEFAULT_STYLE_OPTIONS }) {
370
373
  const { Root: Dialog, Portal: DialogPortal, Backdrop: DialogBackdrop, Popup: DialogPopup, Title: DialogTitle, Close: DialogClose } = useFolioUI().Dialog;
371
374
  const handleOpenChange = useCloseOnDialogOpenChange(onClose);
375
+ const t = useTranslations("folio");
372
376
  const id = useId();
373
377
  const [rows, setRows] = useState(defaultRows);
374
378
  const [columns, setColumns] = useState(defaultColumns);
@@ -416,7 +420,7 @@ function InsertTableDialog({ isOpen, onClose, onInsert, defaultRows = 3, default
416
420
  children: [
417
421
  /* @__PURE__ */ jsx(DialogTitle, {
418
422
  className: DIALOG_TITLE_CLASS,
419
- children: "Insert Table"
423
+ children: t("dialogs.insertTable.title")
420
424
  }),
421
425
  /* @__PURE__ */ jsxs("div", {
422
426
  className: DIALOG_BODY_CLASS,
@@ -457,7 +461,7 @@ function InsertTableDialog({ isOpen, onClose, onInsert, defaultRows = 3, default
457
461
  htmlFor: fieldIds.rows,
458
462
  children: [/* @__PURE__ */ jsx("span", {
459
463
  className: DIALOG_LABEL_CLASS,
460
- children: "Rows"
464
+ children: t("dialogs.insertTable.rowsLabel")
461
465
  }), /* @__PURE__ */ jsx("input", {
462
466
  className: DIALOG_INPUT_CLASS,
463
467
  id: fieldIds.rows,
@@ -472,7 +476,7 @@ function InsertTableDialog({ isOpen, onClose, onInsert, defaultRows = 3, default
472
476
  htmlFor: fieldIds.columns,
473
477
  children: [/* @__PURE__ */ jsx("span", {
474
478
  className: DIALOG_LABEL_CLASS,
475
- children: "Columns"
479
+ children: t("dialogs.insertTable.columnsLabel")
476
480
  }), /* @__PURE__ */ jsx("input", {
477
481
  className: DIALOG_INPUT_CLASS,
478
482
  id: fieldIds.columns,
@@ -494,7 +498,7 @@ function InsertTableDialog({ isOpen, onClose, onInsert, defaultRows = 3, default
494
498
  type: "checkbox"
495
499
  }), /* @__PURE__ */ jsx("span", {
496
500
  className: DIALOG_LABEL_CLASS,
497
- children: "Autofit to contents"
501
+ children: t("dialogs.insertTable.autofit")
498
502
  })]
499
503
  }),
500
504
  styleOptions.length > 0 && /* @__PURE__ */ jsxs("label", {
@@ -502,7 +506,7 @@ function InsertTableDialog({ isOpen, onClose, onInsert, defaultRows = 3, default
502
506
  htmlFor: fieldIds.style,
503
507
  children: [/* @__PURE__ */ jsx("span", {
504
508
  className: "text-muted-foreground text-[13px]",
505
- children: "Style"
509
+ children: t("dialogs.insertTable.style")
506
510
  }), /* @__PURE__ */ jsxs("select", {
507
511
  className: "border-input bg-background text-foreground rounded border px-2 py-1.5 text-[13px] outline-none",
508
512
  id: fieldIds.style,
@@ -510,7 +514,7 @@ function InsertTableDialog({ isOpen, onClose, onInsert, defaultRows = 3, default
510
514
  value: styleId,
511
515
  children: [/* @__PURE__ */ jsx("option", {
512
516
  value: "",
513
- children: "Plain table"
517
+ children: t("dialogs.insertTable.plainTable")
514
518
  }), styleOptions.map((style) => /* @__PURE__ */ jsx("option", {
515
519
  value: style.id,
516
520
  children: style.name
@@ -523,13 +527,13 @@ function InsertTableDialog({ isOpen, onClose, onInsert, defaultRows = 3, default
523
527
  className: DIALOG_FOOTER_CLASS,
524
528
  children: [/* @__PURE__ */ jsx(DialogClose, {
525
529
  className: DIALOG_SECONDARY_BUTTON_CLASS,
526
- children: "Cancel"
530
+ children: t("common.cancel")
527
531
  }), /* @__PURE__ */ jsx("button", {
528
532
  className: DIALOG_PRIMARY_BUTTON_CLASS,
529
533
  disabled: !canInsert,
530
534
  onClick: handleInsert,
531
535
  type: "button",
532
- children: "Insert"
536
+ children: t("common.insert")
533
537
  })]
534
538
  })
535
539
  ]
@@ -561,6 +565,7 @@ const PASTE_MODES = [
561
565
  function PasteSpecialDialog({ isOpen, onClose, onPaste, defaultMode = "plainText" }) {
562
566
  const { Root: Dialog, Portal: DialogPortal, Backdrop: DialogBackdrop, Popup: DialogPopup, Title: DialogTitle, Close: DialogClose } = useFolioUI().Dialog;
563
567
  const handleOpenChange = useCloseOnDialogOpenChange(onClose);
568
+ const t = useTranslations("folio");
564
569
  const id = useId();
565
570
  const [mode, setMode] = useState(defaultMode);
566
571
  useEffect(() => {
@@ -578,7 +583,7 @@ function PasteSpecialDialog({ isOpen, onClose, onPaste, defaultMode = "plainText
578
583
  children: [
579
584
  /* @__PURE__ */ jsx(DialogTitle, {
580
585
  className: DIALOG_TITLE_CLASS,
581
- children: "Paste Special"
586
+ children: t("dialogs.pasteSpecial.title")
582
587
  }),
583
588
  /* @__PURE__ */ jsx("div", {
584
589
  className: DIALOG_BODY_CLASS,
@@ -586,7 +591,7 @@ function PasteSpecialDialog({ isOpen, onClose, onPaste, defaultMode = "plainText
586
591
  className: "flex flex-col gap-3",
587
592
  children: [/* @__PURE__ */ jsx("legend", {
588
593
  className: DIALOG_LABEL_CLASS,
589
- children: "Paste mode"
594
+ children: t("dialogs.pasteSpecial.pasteMode")
590
595
  }), PASTE_MODES.map((option) => {
591
596
  const optionId = `${id}-paste-special-${option.value}`;
592
597
  return /* @__PURE__ */ jsxs("label", {
@@ -615,12 +620,12 @@ function PasteSpecialDialog({ isOpen, onClose, onPaste, defaultMode = "plainText
615
620
  className: DIALOG_FOOTER_CLASS,
616
621
  children: [/* @__PURE__ */ jsx(DialogClose, {
617
622
  className: DIALOG_SECONDARY_BUTTON_CLASS,
618
- children: "Cancel"
623
+ children: t("common.cancel")
619
624
  }), /* @__PURE__ */ jsx("button", {
620
625
  className: DIALOG_PRIMARY_BUTTON_CLASS,
621
626
  onClick: handlePaste,
622
627
  type: "button",
623
- children: "Paste"
628
+ children: t("paste")
624
629
  })]
625
630
  })
626
631
  ]
@@ -634,6 +639,7 @@ const MAX_PARTS = 63;
634
639
  function SplitCellDialog({ isOpen, onClose, onSplit, defaultRows = 1, defaultColumns = 2 }) {
635
640
  const { Root: Dialog, Portal: DialogPortal, Backdrop: DialogBackdrop, Popup: DialogPopup, Title: DialogTitle, Close: DialogClose } = useFolioUI().Dialog;
636
641
  const handleOpenChange = useCloseOnDialogOpenChange(onClose);
642
+ const t = useTranslations("folio");
637
643
  const id = useId();
638
644
  const [rows, setRows] = useState(defaultRows);
639
645
  const [columns, setColumns] = useState(defaultColumns);
@@ -673,7 +679,7 @@ function SplitCellDialog({ isOpen, onClose, onSplit, defaultRows = 1, defaultCol
673
679
  children: [
674
680
  /* @__PURE__ */ jsx(DialogTitle, {
675
681
  className: DIALOG_TITLE_CLASS,
676
- children: "Split Cell"
682
+ children: t("dialogs.splitCell.title")
677
683
  }),
678
684
  /* @__PURE__ */ jsxs("div", {
679
685
  className: DIALOG_BODY_CLASS,
@@ -684,7 +690,7 @@ function SplitCellDialog({ isOpen, onClose, onSplit, defaultRows = 1, defaultCol
684
690
  htmlFor: fieldIds.columns,
685
691
  children: [/* @__PURE__ */ jsx("span", {
686
692
  className: DIALOG_LABEL_CLASS,
687
- children: "Columns"
693
+ children: t("dialogs.insertTable.columnsLabel")
688
694
  }), /* @__PURE__ */ jsx("input", {
689
695
  className: DIALOG_INPUT_CLASS,
690
696
  id: fieldIds.columns,
@@ -699,7 +705,7 @@ function SplitCellDialog({ isOpen, onClose, onSplit, defaultRows = 1, defaultCol
699
705
  htmlFor: fieldIds.rows,
700
706
  children: [/* @__PURE__ */ jsx("span", {
701
707
  className: DIALOG_LABEL_CLASS,
702
- children: "Rows"
708
+ children: t("dialogs.insertTable.rowsLabel")
703
709
  }), /* @__PURE__ */ jsx("input", {
704
710
  className: DIALOG_INPUT_CLASS,
705
711
  id: fieldIds.rows,
@@ -720,7 +726,7 @@ function SplitCellDialog({ isOpen, onClose, onSplit, defaultRows = 1, defaultCol
720
726
  type: "checkbox"
721
727
  }), /* @__PURE__ */ jsx("span", {
722
728
  className: DIALOG_LABEL_CLASS,
723
- children: "Merge selected cells before splitting"
729
+ children: t("dialogs.splitCell.mergeBeforeSplit")
724
730
  })]
725
731
  })]
726
732
  }),
@@ -728,13 +734,13 @@ function SplitCellDialog({ isOpen, onClose, onSplit, defaultRows = 1, defaultCol
728
734
  className: DIALOG_FOOTER_CLASS,
729
735
  children: [/* @__PURE__ */ jsx(DialogClose, {
730
736
  className: DIALOG_SECONDARY_BUTTON_CLASS,
731
- children: "Cancel"
737
+ children: t("common.cancel")
732
738
  }), /* @__PURE__ */ jsx("button", {
733
739
  className: DIALOG_PRIMARY_BUTTON_CLASS,
734
740
  disabled: !canSplit,
735
741
  onClick: handleSplit,
736
742
  type: "button",
737
- children: "Split"
743
+ children: t("dialogs.splitCell.splitButton")
738
744
  })]
739
745
  })
740
746
  ]
@@ -748,10 +754,11 @@ function clampInteger(value) {
748
754
  //#region src/components/dialogs/WatermarkDialog.tsx
749
755
  const DEFAULT_TEXT_COLOR = "#C0C0C0";
750
756
  function WatermarkDialog(t0) {
751
- const $ = c(100);
757
+ const $ = c(127);
752
758
  const { isOpen, onClose, onApply, currentWatermark } = t0;
753
759
  const { Root: Dialog, Portal: DialogPortal, Backdrop: DialogBackdrop, Popup: DialogPopup, Title: DialogTitle, Close: DialogClose } = useFolioUI().Dialog;
754
760
  const handleOpenChange = useCloseOnDialogOpenChange(onClose);
761
+ const t = useTranslations("folio");
755
762
  const id = useId();
756
763
  const [mode, setMode] = useState("text");
757
764
  const [text, setText] = useState("CONFIDENTIAL");
@@ -912,82 +919,123 @@ function WatermarkDialog(t0) {
912
919
  $[36] = t17;
913
920
  } else t17 = $[36];
914
921
  let t18;
915
- if ($[37] !== DialogTitle) {
916
- t18 = /* @__PURE__ */ jsx(DialogTitle, {
917
- className: DIALOG_TITLE_CLASS,
918
- children: "Watermark"
919
- });
920
- $[37] = DialogTitle;
922
+ if ($[37] !== t) {
923
+ t18 = t("dialogs.watermark.title");
924
+ $[37] = t;
921
925
  $[38] = t18;
922
926
  } else t18 = $[38];
923
927
  let t19;
924
- if ($[39] === Symbol.for("react.memo_cache_sentinel")) {
925
- t19 = /* @__PURE__ */ jsx("span", {
926
- className: DIALOG_LABEL_CLASS,
927
- children: "Type"
928
+ if ($[39] !== DialogTitle || $[40] !== t18) {
929
+ t19 = /* @__PURE__ */ jsx(DialogTitle, {
930
+ className: DIALOG_TITLE_CLASS,
931
+ children: t18
928
932
  });
929
- $[39] = t19;
930
- } else t19 = $[39];
931
- let t20;
932
- if ($[40] === Symbol.for("react.memo_cache_sentinel")) {
933
- t20 = (e) => setMode(toWatermarkMode(e.target.value));
934
- $[40] = t20;
935
- } else t20 = $[40];
933
+ $[39] = DialogTitle;
934
+ $[40] = t18;
935
+ $[41] = t19;
936
+ } else t19 = $[41];
937
+ const t20 = fieldIds.mode;
936
938
  let t21;
939
+ if ($[42] !== t) {
940
+ t21 = t("dialogs.watermark.type");
941
+ $[42] = t;
942
+ $[43] = t21;
943
+ } else t21 = $[43];
937
944
  let t22;
938
- let t23;
939
- if ($[41] === Symbol.for("react.memo_cache_sentinel")) {
940
- t21 = /* @__PURE__ */ jsx("option", {
945
+ if ($[44] !== t21) {
946
+ t22 = /* @__PURE__ */ jsx("span", {
947
+ className: DIALOG_LABEL_CLASS,
948
+ children: t21
949
+ });
950
+ $[44] = t21;
951
+ $[45] = t22;
952
+ } else t22 = $[45];
953
+ const t23 = fieldIds.mode;
954
+ let t24;
955
+ if ($[46] === Symbol.for("react.memo_cache_sentinel")) {
956
+ t24 = (e) => setMode(toWatermarkMode(e.target.value));
957
+ $[46] = t24;
958
+ } else t24 = $[46];
959
+ let t25;
960
+ if ($[47] !== t) {
961
+ t25 = t("dialogs.watermark.textWatermark");
962
+ $[47] = t;
963
+ $[48] = t25;
964
+ } else t25 = $[48];
965
+ let t26;
966
+ if ($[49] !== t25) {
967
+ t26 = /* @__PURE__ */ jsx("option", {
941
968
  value: "text",
942
- children: "Text watermark"
969
+ children: t25
943
970
  });
944
- t22 = /* @__PURE__ */ jsx("option", {
971
+ $[49] = t25;
972
+ $[50] = t26;
973
+ } else t26 = $[50];
974
+ let t27;
975
+ if ($[51] !== t) {
976
+ t27 = t("dialogs.watermark.pictureWatermark");
977
+ $[51] = t;
978
+ $[52] = t27;
979
+ } else t27 = $[52];
980
+ let t28;
981
+ if ($[53] !== t27) {
982
+ t28 = /* @__PURE__ */ jsx("option", {
945
983
  value: "picture",
946
- children: "Picture watermark"
984
+ children: t27
947
985
  });
948
- t23 = /* @__PURE__ */ jsx("option", {
986
+ $[53] = t27;
987
+ $[54] = t28;
988
+ } else t28 = $[54];
989
+ let t29;
990
+ if ($[55] !== t) {
991
+ t29 = t("dialogs.watermark.noWatermark");
992
+ $[55] = t;
993
+ $[56] = t29;
994
+ } else t29 = $[56];
995
+ let t30;
996
+ if ($[57] !== t29) {
997
+ t30 = /* @__PURE__ */ jsx("option", {
949
998
  value: "none",
950
- children: "No watermark"
999
+ children: t29
951
1000
  });
952
- $[41] = t21;
953
- $[42] = t22;
954
- $[43] = t23;
955
- } else {
956
- t21 = $[41];
957
- t22 = $[42];
958
- t23 = $[43];
959
- }
960
- let t24;
961
- if ($[44] !== fieldIds.mode || $[45] !== mode) {
962
- t24 = /* @__PURE__ */ jsxs("select", {
1001
+ $[57] = t29;
1002
+ $[58] = t30;
1003
+ } else t30 = $[58];
1004
+ let t31;
1005
+ if ($[59] !== fieldIds.mode || $[60] !== mode || $[61] !== t26 || $[62] !== t28 || $[63] !== t30) {
1006
+ t31 = /* @__PURE__ */ jsxs("select", {
963
1007
  className: DIALOG_INPUT_CLASS,
964
- id: fieldIds.mode,
965
- onChange: t20,
1008
+ id: t23,
1009
+ onChange: t24,
966
1010
  value: mode,
967
1011
  children: [
968
- t21,
969
- t22,
970
- t23
1012
+ t26,
1013
+ t28,
1014
+ t30
971
1015
  ]
972
1016
  });
973
- $[44] = fieldIds.mode;
974
- $[45] = mode;
975
- $[46] = t24;
976
- } else t24 = $[46];
977
- let t25;
978
- if ($[47] !== fieldIds.mode || $[48] !== t24) {
979
- t25 = /* @__PURE__ */ jsxs("label", {
1017
+ $[59] = fieldIds.mode;
1018
+ $[60] = mode;
1019
+ $[61] = t26;
1020
+ $[62] = t28;
1021
+ $[63] = t30;
1022
+ $[64] = t31;
1023
+ } else t31 = $[64];
1024
+ let t32;
1025
+ if ($[65] !== fieldIds.mode || $[66] !== t22 || $[67] !== t31) {
1026
+ t32 = /* @__PURE__ */ jsxs("label", {
980
1027
  className: "flex flex-col gap-1",
981
- htmlFor: fieldIds.mode,
982
- children: [t19, t24]
1028
+ htmlFor: t20,
1029
+ children: [t22, t31]
983
1030
  });
984
- $[47] = fieldIds.mode;
985
- $[48] = t24;
986
- $[49] = t25;
987
- } else t25 = $[49];
988
- let t26;
989
- if ($[50] !== color || $[51] !== diagonal || $[52] !== fieldIds.color || $[53] !== fieldIds.diagonal || $[54] !== fieldIds.font || $[55] !== fieldIds.opacity || $[56] !== fieldIds.text || $[57] !== font || $[58] !== mode || $[59] !== opacityPercent || $[60] !== text) {
990
- t26 = mode === "text" && /* @__PURE__ */ jsxs("div", {
1031
+ $[65] = fieldIds.mode;
1032
+ $[66] = t22;
1033
+ $[67] = t31;
1034
+ $[68] = t32;
1035
+ } else t32 = $[68];
1036
+ let t33;
1037
+ if ($[69] !== color || $[70] !== diagonal || $[71] !== fieldIds.color || $[72] !== fieldIds.diagonal || $[73] !== fieldIds.font || $[74] !== fieldIds.opacity || $[75] !== fieldIds.text || $[76] !== font || $[77] !== mode || $[78] !== opacityPercent || $[79] !== t || $[80] !== text) {
1038
+ t33 = mode === "text" && /* @__PURE__ */ jsxs("div", {
991
1039
  className: "grid grid-cols-2 gap-3",
992
1040
  children: [
993
1041
  /* @__PURE__ */ jsxs("label", {
@@ -995,7 +1043,7 @@ function WatermarkDialog(t0) {
995
1043
  htmlFor: fieldIds.text,
996
1044
  children: [/* @__PURE__ */ jsx("span", {
997
1045
  className: "text-muted-foreground text-[13px]",
998
- children: "Text"
1046
+ children: t("dialogs.watermark.text")
999
1047
  }), /* @__PURE__ */ jsx("input", {
1000
1048
  className: "border-input bg-background text-foreground rounded border px-2 py-1.5 text-[13px] outline-none",
1001
1049
  id: fieldIds.text,
@@ -1008,7 +1056,7 @@ function WatermarkDialog(t0) {
1008
1056
  htmlFor: fieldIds.font,
1009
1057
  children: [/* @__PURE__ */ jsx("span", {
1010
1058
  className: "text-muted-foreground text-[13px]",
1011
- children: "Font"
1059
+ children: t("dialogs.watermark.font")
1012
1060
  }), /* @__PURE__ */ jsx("input", {
1013
1061
  className: "border-input bg-background text-foreground rounded border px-2 py-1.5 text-[13px] outline-none",
1014
1062
  id: fieldIds.font,
@@ -1021,7 +1069,7 @@ function WatermarkDialog(t0) {
1021
1069
  htmlFor: fieldIds.color,
1022
1070
  children: [/* @__PURE__ */ jsx("span", {
1023
1071
  className: "text-muted-foreground text-[13px]",
1024
- children: "Color"
1072
+ children: t("dialogs.watermark.color")
1025
1073
  }), /* @__PURE__ */ jsx("input", {
1026
1074
  className: `border-input bg-background text-foreground rounded border px-2 py-1.5 text-[13px] outline-none h-[34px]`,
1027
1075
  id: fieldIds.color,
@@ -1035,7 +1083,7 @@ function WatermarkDialog(t0) {
1035
1083
  htmlFor: fieldIds.opacity,
1036
1084
  children: [/* @__PURE__ */ jsx("span", {
1037
1085
  className: "text-muted-foreground text-[13px]",
1038
- children: "Opacity"
1086
+ children: t("dialogs.watermark.opacity")
1039
1087
  }), /* @__PURE__ */ jsx("input", {
1040
1088
  className: "border-input bg-background text-foreground rounded border px-2 py-1.5 text-[13px] outline-none",
1041
1089
  id: fieldIds.opacity,
@@ -1056,27 +1104,28 @@ function WatermarkDialog(t0) {
1056
1104
  type: "checkbox"
1057
1105
  }), /* @__PURE__ */ jsx("span", {
1058
1106
  className: "text-muted-foreground text-[13px]",
1059
- children: "Diagonal"
1107
+ children: t("dialogs.watermark.diagonal")
1060
1108
  })]
1061
1109
  })
1062
1110
  ]
1063
1111
  });
1064
- $[50] = color;
1065
- $[51] = diagonal;
1066
- $[52] = fieldIds.color;
1067
- $[53] = fieldIds.diagonal;
1068
- $[54] = fieldIds.font;
1069
- $[55] = fieldIds.opacity;
1070
- $[56] = fieldIds.text;
1071
- $[57] = font;
1072
- $[58] = mode;
1073
- $[59] = opacityPercent;
1074
- $[60] = text;
1075
- $[61] = t26;
1076
- } else t26 = $[61];
1077
- let t27;
1078
- if ($[62] !== fieldIds.imageRId || $[63] !== fieldIds.imageTarget || $[64] !== fieldIds.imageTargetExternal || $[65] !== fieldIds.scale || $[66] !== fieldIds.washout || $[67] !== imageRId || $[68] !== imageTarget || $[69] !== imageTargetExternal || $[70] !== mode || $[71] !== scalePercent || $[72] !== washout) {
1079
- t27 = mode === "picture" && /* @__PURE__ */ jsxs("div", {
1112
+ $[69] = color;
1113
+ $[70] = diagonal;
1114
+ $[71] = fieldIds.color;
1115
+ $[72] = fieldIds.diagonal;
1116
+ $[73] = fieldIds.font;
1117
+ $[74] = fieldIds.opacity;
1118
+ $[75] = fieldIds.text;
1119
+ $[76] = font;
1120
+ $[77] = mode;
1121
+ $[78] = opacityPercent;
1122
+ $[79] = t;
1123
+ $[80] = text;
1124
+ $[81] = t33;
1125
+ } else t33 = $[81];
1126
+ let t34;
1127
+ if ($[82] !== fieldIds.imageRId || $[83] !== fieldIds.imageTarget || $[84] !== fieldIds.imageTargetExternal || $[85] !== fieldIds.scale || $[86] !== fieldIds.washout || $[87] !== imageRId || $[88] !== imageTarget || $[89] !== imageTargetExternal || $[90] !== mode || $[91] !== scalePercent || $[92] !== t || $[93] !== washout) {
1128
+ t34 = mode === "picture" && /* @__PURE__ */ jsxs("div", {
1080
1129
  className: "grid grid-cols-2 gap-3",
1081
1130
  children: [
1082
1131
  /* @__PURE__ */ jsxs("label", {
@@ -1084,7 +1133,7 @@ function WatermarkDialog(t0) {
1084
1133
  htmlFor: fieldIds.imageRId,
1085
1134
  children: [/* @__PURE__ */ jsx("span", {
1086
1135
  className: "text-muted-foreground text-[13px]",
1087
- children: "Header image relationship id"
1136
+ children: t("dialogs.watermark.imageRelationshipId")
1088
1137
  }), /* @__PURE__ */ jsx("input", {
1089
1138
  className: "border-input bg-background text-foreground rounded border px-2 py-1.5 text-[13px] outline-none",
1090
1139
  id: fieldIds.imageRId,
@@ -1098,7 +1147,7 @@ function WatermarkDialog(t0) {
1098
1147
  htmlFor: fieldIds.imageTarget,
1099
1148
  children: [/* @__PURE__ */ jsx("span", {
1100
1149
  className: "text-muted-foreground text-[13px]",
1101
- children: "Image target"
1150
+ children: t("dialogs.watermark.imageTarget")
1102
1151
  }), /* @__PURE__ */ jsx("input", {
1103
1152
  className: "border-input bg-background text-foreground rounded border px-2 py-1.5 text-[13px] outline-none",
1104
1153
  id: fieldIds.imageTarget,
@@ -1112,7 +1161,7 @@ function WatermarkDialog(t0) {
1112
1161
  htmlFor: fieldIds.scale,
1113
1162
  children: [/* @__PURE__ */ jsx("span", {
1114
1163
  className: "text-muted-foreground text-[13px]",
1115
- children: "Scale"
1164
+ children: t("dialogs.watermark.scale")
1116
1165
  }), /* @__PURE__ */ jsx("input", {
1117
1166
  className: "border-input bg-background text-foreground rounded border px-2 py-1.5 text-[13px] outline-none",
1118
1167
  id: fieldIds.scale,
@@ -1133,7 +1182,7 @@ function WatermarkDialog(t0) {
1133
1182
  type: "checkbox"
1134
1183
  }), /* @__PURE__ */ jsx("span", {
1135
1184
  className: "text-muted-foreground text-[13px]",
1136
- children: "Washout"
1185
+ children: t("dialogs.watermark.washout")
1137
1186
  })]
1138
1187
  }),
1139
1188
  /* @__PURE__ */ jsxs("label", {
@@ -1146,110 +1195,125 @@ function WatermarkDialog(t0) {
1146
1195
  type: "checkbox"
1147
1196
  }), /* @__PURE__ */ jsx("span", {
1148
1197
  className: "text-muted-foreground text-[13px]",
1149
- children: "Target is an external URL"
1198
+ children: t("dialogs.watermark.targetIsExternalUrl")
1150
1199
  })]
1151
1200
  })
1152
1201
  ]
1153
1202
  });
1154
- $[62] = fieldIds.imageRId;
1155
- $[63] = fieldIds.imageTarget;
1156
- $[64] = fieldIds.imageTargetExternal;
1157
- $[65] = fieldIds.scale;
1158
- $[66] = fieldIds.washout;
1159
- $[67] = imageRId;
1160
- $[68] = imageTarget;
1161
- $[69] = imageTargetExternal;
1162
- $[70] = mode;
1163
- $[71] = scalePercent;
1164
- $[72] = washout;
1165
- $[73] = t27;
1166
- } else t27 = $[73];
1167
- let t28;
1168
- if ($[74] !== t25 || $[75] !== t26 || $[76] !== t27) {
1169
- t28 = /* @__PURE__ */ jsxs("div", {
1203
+ $[82] = fieldIds.imageRId;
1204
+ $[83] = fieldIds.imageTarget;
1205
+ $[84] = fieldIds.imageTargetExternal;
1206
+ $[85] = fieldIds.scale;
1207
+ $[86] = fieldIds.washout;
1208
+ $[87] = imageRId;
1209
+ $[88] = imageTarget;
1210
+ $[89] = imageTargetExternal;
1211
+ $[90] = mode;
1212
+ $[91] = scalePercent;
1213
+ $[92] = t;
1214
+ $[93] = washout;
1215
+ $[94] = t34;
1216
+ } else t34 = $[94];
1217
+ let t35;
1218
+ if ($[95] !== t32 || $[96] !== t33 || $[97] !== t34) {
1219
+ t35 = /* @__PURE__ */ jsxs("div", {
1170
1220
  className: DIALOG_BODY_CLASS,
1171
1221
  children: [
1172
- t25,
1173
- t26,
1174
- t27
1222
+ t32,
1223
+ t33,
1224
+ t34
1175
1225
  ]
1176
1226
  });
1177
- $[74] = t25;
1178
- $[75] = t26;
1179
- $[76] = t27;
1180
- $[77] = t28;
1181
- } else t28 = $[77];
1182
- let t29;
1183
- if ($[78] !== DialogClose) {
1184
- t29 = /* @__PURE__ */ jsx(DialogClose, {
1227
+ $[95] = t32;
1228
+ $[96] = t33;
1229
+ $[97] = t34;
1230
+ $[98] = t35;
1231
+ } else t35 = $[98];
1232
+ let t36;
1233
+ if ($[99] !== t) {
1234
+ t36 = t("common.cancel");
1235
+ $[99] = t;
1236
+ $[100] = t36;
1237
+ } else t36 = $[100];
1238
+ let t37;
1239
+ if ($[101] !== DialogClose || $[102] !== t36) {
1240
+ t37 = /* @__PURE__ */ jsx(DialogClose, {
1185
1241
  className: DIALOG_SECONDARY_BUTTON_CLASS,
1186
- children: "Cancel"
1242
+ children: t36
1187
1243
  });
1188
- $[78] = DialogClose;
1189
- $[79] = t29;
1190
- } else t29 = $[79];
1191
- const t30 = !canApply;
1192
- let t31;
1193
- if ($[80] !== handleApply || $[81] !== t30) {
1194
- t31 = /* @__PURE__ */ jsx("button", {
1244
+ $[101] = DialogClose;
1245
+ $[102] = t36;
1246
+ $[103] = t37;
1247
+ } else t37 = $[103];
1248
+ const t38 = !canApply;
1249
+ let t39;
1250
+ if ($[104] !== t) {
1251
+ t39 = t("common.apply");
1252
+ $[104] = t;
1253
+ $[105] = t39;
1254
+ } else t39 = $[105];
1255
+ let t40;
1256
+ if ($[106] !== handleApply || $[107] !== t38 || $[108] !== t39) {
1257
+ t40 = /* @__PURE__ */ jsx("button", {
1195
1258
  className: DIALOG_PRIMARY_BUTTON_CLASS,
1196
- disabled: t30,
1259
+ disabled: t38,
1197
1260
  onClick: handleApply,
1198
1261
  type: "button",
1199
- children: "Apply"
1262
+ children: t39
1200
1263
  });
1201
- $[80] = handleApply;
1202
- $[81] = t30;
1203
- $[82] = t31;
1204
- } else t31 = $[82];
1205
- let t32;
1206
- if ($[83] !== t29 || $[84] !== t31) {
1207
- t32 = /* @__PURE__ */ jsxs("div", {
1264
+ $[106] = handleApply;
1265
+ $[107] = t38;
1266
+ $[108] = t39;
1267
+ $[109] = t40;
1268
+ } else t40 = $[109];
1269
+ let t41;
1270
+ if ($[110] !== t37 || $[111] !== t40) {
1271
+ t41 = /* @__PURE__ */ jsxs("div", {
1208
1272
  className: DIALOG_FOOTER_CLASS,
1209
- children: [t29, t31]
1273
+ children: [t37, t40]
1210
1274
  });
1211
- $[83] = t29;
1212
- $[84] = t31;
1213
- $[85] = t32;
1214
- } else t32 = $[85];
1215
- let t33;
1216
- if ($[86] !== DialogPopup || $[87] !== t18 || $[88] !== t28 || $[89] !== t32) {
1217
- t33 = /* @__PURE__ */ jsxs(DialogPopup, {
1275
+ $[110] = t37;
1276
+ $[111] = t40;
1277
+ $[112] = t41;
1278
+ } else t41 = $[112];
1279
+ let t42;
1280
+ if ($[113] !== DialogPopup || $[114] !== t19 || $[115] !== t35 || $[116] !== t41) {
1281
+ t42 = /* @__PURE__ */ jsxs(DialogPopup, {
1218
1282
  className: DIALOG_POPUP_CLASS,
1219
1283
  children: [
1220
- t18,
1221
- t28,
1222
- t32
1284
+ t19,
1285
+ t35,
1286
+ t41
1223
1287
  ]
1224
1288
  });
1225
- $[86] = DialogPopup;
1226
- $[87] = t18;
1227
- $[88] = t28;
1228
- $[89] = t32;
1229
- $[90] = t33;
1230
- } else t33 = $[90];
1231
- let t34;
1232
- if ($[91] !== DialogPortal || $[92] !== t17 || $[93] !== t33) {
1233
- t34 = /* @__PURE__ */ jsxs(DialogPortal, { children: [t17, t33] });
1234
- $[91] = DialogPortal;
1235
- $[92] = t17;
1236
- $[93] = t33;
1237
- $[94] = t34;
1238
- } else t34 = $[94];
1239
- let t35;
1240
- if ($[95] !== Dialog || $[96] !== handleOpenChange || $[97] !== isOpen || $[98] !== t34) {
1241
- t35 = /* @__PURE__ */ jsx(Dialog, {
1289
+ $[113] = DialogPopup;
1290
+ $[114] = t19;
1291
+ $[115] = t35;
1292
+ $[116] = t41;
1293
+ $[117] = t42;
1294
+ } else t42 = $[117];
1295
+ let t43;
1296
+ if ($[118] !== DialogPortal || $[119] !== t17 || $[120] !== t42) {
1297
+ t43 = /* @__PURE__ */ jsxs(DialogPortal, { children: [t17, t42] });
1298
+ $[118] = DialogPortal;
1299
+ $[119] = t17;
1300
+ $[120] = t42;
1301
+ $[121] = t43;
1302
+ } else t43 = $[121];
1303
+ let t44;
1304
+ if ($[122] !== Dialog || $[123] !== handleOpenChange || $[124] !== isOpen || $[125] !== t43) {
1305
+ t44 = /* @__PURE__ */ jsx(Dialog, {
1242
1306
  open: isOpen,
1243
1307
  onOpenChange: handleOpenChange,
1244
- children: t34
1308
+ children: t43
1245
1309
  });
1246
- $[95] = Dialog;
1247
- $[96] = handleOpenChange;
1248
- $[97] = isOpen;
1249
- $[98] = t34;
1250
- $[99] = t35;
1251
- } else t35 = $[99];
1252
- return t35;
1310
+ $[122] = Dialog;
1311
+ $[123] = handleOpenChange;
1312
+ $[124] = isOpen;
1313
+ $[125] = t43;
1314
+ $[126] = t44;
1315
+ } else t44 = $[126];
1316
+ return t44;
1253
1317
  }
1254
1318
  function toWatermarkMode(value) {
1255
1319
  if (value === "none" || value === "picture" || value === "text") return value;