@stll/folio-react 0.32.0 → 0.32.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/dist/{CommentsSidebar-C9bLPobu.js → CommentsSidebar-DnxzLs1o.js} +2 -3
  2. package/dist/{FindReplaceDialog-C3njN6OI.js → FindReplaceDialog-B446W1cL.js} +5 -8
  3. package/dist/{FootnotePropertiesDialog-BEs7N62_.js → FootnotePropertiesDialog-J5zg-K3w.js} +4 -5
  4. package/dist/{ImagePositionDialog-Oap9knQ-.js → ImagePositionDialog-DdokSGoN.js} +4 -5
  5. package/dist/{ImagePropertiesDialog-lLMKHv0u.js → ImagePropertiesDialog-C-xQU8Eq.js} +4 -5
  6. package/dist/{InsertSymbolDialog-CepZECp0.js → InsertSymbolDialog-p7UOS4me.js} +4 -5
  7. package/dist/{PageSetupDialog-DTWCdPkX.js → PageSetupDialog-BXK9tKw5.js} +4 -5
  8. package/dist/{SetNumberingValueDialog-twVIZMLc.js → SetNumberingValueDialog-DZUrre78.js} +3 -4
  9. package/dist/{TablePropertiesDialog-uSTmyEcu.js → TablePropertiesDialog-edzovlyc.js} +4 -5
  10. package/dist/{TextContextMenu-DHe4vOW7.js → TextContextMenu-BxnNvhJg.js} +1 -2
  11. package/dist/compat/eigenpal.d.ts +1 -3
  12. package/dist/compat/eigenpal.js +3 -4
  13. package/dist/{dialogChrome-BoGYPgeu.js → dialogChrome-JDeVEuZn.js} +1 -2
  14. package/dist/{dialogs-DGa8PuE4.d.ts → dialogs-CQHVbEgA.d.ts} +0 -26
  15. package/dist/{dialogs-DGrcp10A.js → dialogs-CahXRDm_.js} +8 -14
  16. package/dist/dialogs.d.ts +1 -1
  17. package/dist/dialogs.js +8 -8
  18. package/dist/{folio-ui-ruRywxeb.js → folio-ui-B8i_O5aS.js} +12 -24
  19. package/dist/index.d.ts +2 -12
  20. package/dist/index.js +10 -10
  21. package/dist/messages-DjrCTI3y.js +6 -0
  22. package/dist/messages.js +1 -7
  23. package/dist/{renderAsync-BQ1iwDIr.js → renderAsync-BCste7wu.js} +75 -138
  24. package/dist/{renderAsync-POQXlmNh.d.ts → renderAsync-fuEtQwqD.d.ts} +0 -14
  25. package/dist/{rolldown-runtime-BBjsoOtd.js → rolldown-runtime-782esTHO.js} +1 -2
  26. package/package.json +5 -5
@@ -1,4 +1,4 @@
1
- import { a as useDrawerFocus, s as containedHandler } from "./renderAsync-BQ1iwDIr.js";
1
+ import { a as useDrawerFocus, s as containedHandler } from "./renderAsync-BCste7wu.js";
2
2
  import { useCallback, useEffect, useEffectEvent, useLayoutEffect, useMemo, useRef, useState } from "react";
3
3
  import { CheckIcon, MoreVerticalIcon } from "lucide-react";
4
4
  import { useLocale, useTranslations } from "use-intl";
@@ -9,7 +9,7 @@ import { sliceText } from "@stll/folio-core/utils/sliceText";
9
9
  import { getFindParagraphText } from "@stll/folio-core/utils/findReplace";
10
10
  import { PANEL_METRICS } from "@stll/folio-core/panel-layout";
11
11
  import { commentAnchorSelector } from "@stll/folio-core/render-dom/commentAnchorAttributes";
12
- //#region src/components/CommentsSidebar.tsx
12
+ // src/components/CommentsSidebar.tsx
13
13
  /**
14
14
  * Comments Sidebar
15
15
  *
@@ -903,5 +903,4 @@ const CommentsSidebar = ({ comments, onCommentClick, activeCommentId, onCommentR
903
903
  })
904
904
  });
905
905
  };
906
- //#endregion
907
906
  export { CommentsSidebar };
@@ -1,5 +1,5 @@
1
- import { t as __exportAll } from "./rolldown-runtime-BBjsoOtd.js";
2
- import { r as useFolioUI } from "./folio-ui-ruRywxeb.js";
1
+ import { t as __exportAll } from "./rolldown-runtime-782esTHO.js";
2
+ import { r as useFolioUI } from "./folio-ui-B8i_O5aS.js";
3
3
  import { c } from "react-compiler-runtime";
4
4
  import React, { useCallback, useEffect, useLayoutEffect, useRef, useState } from "react";
5
5
  import { ChevronDownIcon, ChevronUpIcon, SearchIcon, XIcon } from "lucide-react";
@@ -8,7 +8,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
8
8
  import { replaceEligibility } from "@stll/folio-core/utils/findReplace";
9
9
  import "@stll/folio-core/managers/FindReplaceManager";
10
10
  import { createFindQueryKey } from "@stll/folio-core/utils/findSearchKey";
11
- //#region src/components/dialogs/findReplaceDialogLayout.ts
11
+ // src/components/dialogs/findReplaceDialogLayout.ts
12
12
  const FIND_REPLACE_DIALOG_TOP = "var(--folio-find-replace-top, 7rem)";
13
13
  const FIND_REPLACE_DIALOG_LEFT = "var(--folio-find-replace-left, 5.5rem)";
14
14
  const FIND_REPLACE_DIALOG_RIGHT = "var(--folio-find-replace-right, 0px)";
@@ -20,14 +20,12 @@ function getFindReplaceOverlayStyle(style) {
20
20
  ...style
21
21
  };
22
22
  }
23
- //#endregion
24
- //#region src/components/dialogs/findReplaceInteraction.ts
23
+ // src/components/dialogs/findReplaceInteraction.ts
25
24
  function getFindEnterAction({ searchText, result, shiftKey }) {
26
25
  if (!searchText.trim() || !result || result.totalCount === 0) return "search";
27
26
  return shiftKey ? "previous" : "next";
28
27
  }
29
- //#endregion
30
- //#region src/components/dialogs/FindReplaceDialog.tsx
28
+ // src/components/dialogs/FindReplaceDialog.tsx
31
29
  /**
32
30
  * Find and Replace Dialog Component
33
31
  *
@@ -503,5 +501,4 @@ function FindReplaceDialogForm({ isOpen, onClose, onFind, onQueryChange, onFindN
503
501
  })
504
502
  });
505
503
  }
506
- //#endregion
507
504
  export { FindReplaceDialog_exports as n, FindReplaceDialog as t };
@@ -1,11 +1,11 @@
1
- import { t as __exportAll } from "./rolldown-runtime-BBjsoOtd.js";
2
- import { r as useFolioUI } from "./folio-ui-ruRywxeb.js";
3
- import { u as useCloseOnDialogOpenChange } from "./dialogChrome-BoGYPgeu.js";
1
+ import { t as __exportAll } from "./rolldown-runtime-782esTHO.js";
2
+ import { r as useFolioUI } from "./folio-ui-B8i_O5aS.js";
3
+ import { u as useCloseOnDialogOpenChange } from "./dialogChrome-JDeVEuZn.js";
4
4
  import { c } from "react-compiler-runtime";
5
5
  import { useId, useState } from "react";
6
6
  import { useTranslations } from "use-intl";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
- //#region src/components/dialogs/FootnotePropertiesDialog.tsx
8
+ // src/components/dialogs/FootnotePropertiesDialog.tsx
9
9
  /**
10
10
  * Footnote & Endnote Properties Dialog
11
11
  *
@@ -818,5 +818,4 @@ function FootnotePropertiesDialog(t0) {
818
818
  } else t100 = $[219];
819
819
  return t100;
820
820
  }
821
- //#endregion
822
821
  export { FootnotePropertiesDialog_exports as n, FootnotePropertiesDialog as t };
@@ -1,11 +1,11 @@
1
- import { t as __exportAll } from "./rolldown-runtime-BBjsoOtd.js";
2
- import { r as useFolioUI } from "./folio-ui-ruRywxeb.js";
3
- import { u as useCloseOnDialogOpenChange } from "./dialogChrome-BoGYPgeu.js";
1
+ import { t as __exportAll } from "./rolldown-runtime-782esTHO.js";
2
+ import { r as useFolioUI } from "./folio-ui-B8i_O5aS.js";
3
+ import { u as useCloseOnDialogOpenChange } from "./dialogChrome-JDeVEuZn.js";
4
4
  import { c } from "react-compiler-runtime";
5
5
  import { useId, useState } from "react";
6
6
  import { useTranslations } from "use-intl";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
- //#region src/components/dialogs/ImagePositionDialog.tsx
8
+ // src/components/dialogs/ImagePositionDialog.tsx
9
9
  /**
10
10
  * Image Position Dialog
11
11
  *
@@ -1035,5 +1035,4 @@ function ImagePositionDialogForm(t0) {
1035
1035
  } else t114 = $[265];
1036
1036
  return t114;
1037
1037
  }
1038
- //#endregion
1039
1038
  export { ImagePositionDialog_exports as n, ImagePositionDialog as t };
@@ -1,11 +1,11 @@
1
- import { t as __exportAll } from "./rolldown-runtime-BBjsoOtd.js";
2
- import { r as useFolioUI } from "./folio-ui-ruRywxeb.js";
3
- import { u as useCloseOnDialogOpenChange } from "./dialogChrome-BoGYPgeu.js";
1
+ import { t as __exportAll } from "./rolldown-runtime-782esTHO.js";
2
+ import { r as useFolioUI } from "./folio-ui-B8i_O5aS.js";
3
+ import { u as useCloseOnDialogOpenChange } from "./dialogChrome-JDeVEuZn.js";
4
4
  import { c } from "react-compiler-runtime";
5
5
  import { useId, useState } from "react";
6
6
  import { useTranslations } from "use-intl";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
- //#region src/components/dialogs/ImagePropertiesDialog.tsx
8
+ // src/components/dialogs/ImagePropertiesDialog.tsx
9
9
  /**
10
10
  * Image Properties Dialog
11
11
  *
@@ -603,5 +603,4 @@ function ImagePropertiesDialogForm(t0) {
603
603
  } else t65 = $[156];
604
604
  return t65;
605
605
  }
606
- //#endregion
607
606
  export { ImagePropertiesDialog_exports as n, ImagePropertiesDialog as t };
@@ -1,12 +1,12 @@
1
- import { t as __exportAll } from "./rolldown-runtime-BBjsoOtd.js";
2
- import { r as useFolioUI } from "./folio-ui-ruRywxeb.js";
3
- import { 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";
1
+ import { t as __exportAll } from "./rolldown-runtime-782esTHO.js";
2
+ import { r as useFolioUI } from "./folio-ui-B8i_O5aS.js";
3
+ import { 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-JDeVEuZn.js";
4
4
  import { c } from "react-compiler-runtime";
5
5
  import { useState } from "react";
6
6
  import { useTranslations } from "use-intl";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
  import { SYMBOL_CATEGORIES, filterSymbols } from "@stll/folio-core/symbols";
9
- //#region src/components/dialogs/InsertSymbolDialog.tsx
9
+ // src/components/dialogs/InsertSymbolDialog.tsx
10
10
  var InsertSymbolDialog_exports = /* @__PURE__ */ __exportAll({ InsertSymbolDialog: () => InsertSymbolDialog });
11
11
  const RECENT_LIMIT = 10;
12
12
  /** Format a character as its `U+XXXX` code point label. */
@@ -373,5 +373,4 @@ function InsertSymbolDialog(t0) {
373
373
  } else t26 = $[107];
374
374
  return t26;
375
375
  }
376
- //#endregion
377
376
  export { InsertSymbolDialog_exports as n, InsertSymbolDialog as t };
@@ -1,12 +1,12 @@
1
- import { t as __exportAll } from "./rolldown-runtime-BBjsoOtd.js";
2
- import { r as useFolioUI } from "./folio-ui-ruRywxeb.js";
3
- import { u as useCloseOnDialogOpenChange } from "./dialogChrome-BoGYPgeu.js";
1
+ import { t as __exportAll } from "./rolldown-runtime-782esTHO.js";
2
+ import { r as useFolioUI } from "./folio-ui-B8i_O5aS.js";
3
+ import { u as useCloseOnDialogOpenChange } from "./dialogChrome-JDeVEuZn.js";
4
4
  import { c } from "react-compiler-runtime";
5
5
  import { useId, useState } from "react";
6
6
  import { useTranslations } from "use-intl";
7
7
  import { TWIPS_PER_INCH } from "@stll/folio-core/utils/units";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
- //#region src/components/dialogs/PageSetupDialog.tsx
9
+ // src/components/dialogs/PageSetupDialog.tsx
10
10
  /**
11
11
  * Page Setup Dialog
12
12
  *
@@ -801,5 +801,4 @@ function _temp(size_0, i) {
801
801
  children: size_0.label
802
802
  }, size_0.label);
803
803
  }
804
- //#endregion
805
804
  export { PageSetupDialog_exports as n, PageSetupDialog as t };
@@ -1,10 +1,10 @@
1
- import { r as useFolioUI } from "./folio-ui-ruRywxeb.js";
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";
1
+ import { r as useFolioUI } from "./folio-ui-B8i_O5aS.js";
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-JDeVEuZn.js";
3
3
  import { c } from "react-compiler-runtime";
4
4
  import { useId, useState } from "react";
5
5
  import { useTranslations } from "use-intl";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
- //#region src/components/dialogs/SetNumberingValueDialog.tsx
7
+ // src/components/dialogs/SetNumberingValueDialog.tsx
8
8
  /** `w:startOverride` is a non-negative decimal; the input stops far below its limit. */
9
9
  const MIN_VALUE = 0;
10
10
  const MAX_VALUE = 32767;
@@ -229,5 +229,4 @@ function SetNumberingValueDialogForm(t0) {
229
229
  } else t21 = $[58];
230
230
  return t21;
231
231
  }
232
- //#endregion
233
232
  export { SetNumberingValueDialog };
@@ -1,12 +1,12 @@
1
- import { t as __exportAll } from "./rolldown-runtime-BBjsoOtd.js";
2
- import { r as useFolioUI } from "./folio-ui-ruRywxeb.js";
3
- import { u as useCloseOnDialogOpenChange } from "./dialogChrome-BoGYPgeu.js";
1
+ import { t as __exportAll } from "./rolldown-runtime-782esTHO.js";
2
+ import { r as useFolioUI } from "./folio-ui-B8i_O5aS.js";
3
+ import { u as useCloseOnDialogOpenChange } from "./dialogChrome-JDeVEuZn.js";
4
4
  import { c } from "react-compiler-runtime";
5
5
  import { useId, useState } from "react";
6
6
  import { useTranslations } from "use-intl";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
  import { TABLE_PROPERTY_JUSTIFICATIONS, toTablePropertyJustification } from "@stll/folio-core/utils/tableOperations";
9
- //#region src/components/dialogs/TablePropertiesDialog.tsx
9
+ // src/components/dialogs/TablePropertiesDialog.tsx
10
10
  /**
11
11
  * Table Properties Dialog — width type, width value, alignment.
12
12
  */
@@ -412,5 +412,4 @@ function TablePropertiesDialogForm(t0) {
412
412
  } else t43 = $[98];
413
413
  return t43;
414
414
  }
415
- //#endregion
416
415
  export { TablePropertiesDialog_exports as n, TablePropertiesDialog as t };
@@ -3,7 +3,7 @@ import { useCallback, useEffect, useRef, useState } from "react";
3
3
  import { ArrowDownToLine, ArrowLeftToLine, ArrowRightToLine, ArrowUpToLine, ClipboardPaste, Copy, Grid3x3, MessageSquarePlus, Scissors, SquareDashed, TextSelect, Trash2 } from "lucide-react";
4
4
  import { createPortal } from "react-dom";
5
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
- //#region src/components/TextContextMenu.tsx
6
+ // src/components/TextContextMenu.tsx
7
7
  /**
8
8
  * Text Context Menu Component
9
9
  *
@@ -440,5 +440,4 @@ const TextContextMenu = ({ isOpen, position, hasSelection, isEditable, hasClipbo
440
440
  children: menu
441
441
  }), document.body);
442
442
  };
443
- //#endregion
444
443
  export { TextContextMenu };
@@ -1,7 +1,6 @@
1
- import { c as DocxEditorRef, i as renderAsync, n as EditorHandle, r as RenderAsyncOptions, s as DocxEditorProps, t as DocxEditorHandle } from "../renderAsync-POQXlmNh.js";
1
+ import { c as DocxEditorRef, i as renderAsync, n as EditorHandle, r as RenderAsyncOptions, s as DocxEditorProps, t as DocxEditorHandle } from "../renderAsync-fuEtQwqD.js";
2
2
  import { ForwardRefExoticComponent, JSX, ReactNode, RefAttributes } from "react";
3
3
  import { CreateEmptyDocumentOptions, createDocumentWithText, createEmptyDocument } from "@stll/folio-core/utils/createDocument";
4
- //#region src/compat/eigenpal.d.ts
5
4
  export declare const VERSION = "folio-compat-eigenpal";
6
5
  type LegacyTranslations = {
7
6
  _lang?: string;
@@ -105,5 +104,4 @@ export declare const DocxEditor: ForwardRefExoticComponent<DocxEditorProps & {
105
104
  showOutlineButton?: boolean;
106
105
  watermarkPresets?: readonly string[];
107
106
  } & RefAttributes<DocxEditorRef>>;
108
- //#endregion
109
107
  export { type CreateEmptyDocumentOptions, type DocxEditorHandle, type DocxEditorRef, type EditorHandle, type RenderAsyncOptions, createDocumentWithText, createEmptyDocument, renderAsync };
@@ -1,12 +1,12 @@
1
- import { n as DocxEditor$1, t as renderAsync } from "../renderAsync-BQ1iwDIr.js";
2
- import { t as messages_exports } from "../messages.js";
1
+ import { n as DocxEditor$1, t as renderAsync } from "../renderAsync-BCste7wu.js";
2
+ import { t as messages_exports } from "../messages-DjrCTI3y.js";
3
3
  import { c } from "react-compiler-runtime";
4
4
  import { forwardRef } from "react";
5
5
  import { IntlProvider, useTranslations } from "use-intl";
6
6
  import { DEFAULT_KEYBOARD_SHORTCUT_SCOPE } from "@stll/folio-core/managers/editorShortcuts";
7
7
  import { jsx } from "react/jsx-runtime";
8
8
  import { createDocumentWithText, createEmptyDocument } from "@stll/folio-core/utils/createDocument";
9
- //#region src/compat/eigenpal.tsx
9
+ // src/compat/eigenpal.tsx
10
10
  const VERSION = "folio-compat-eigenpal";
11
11
  const en = { _lang: "en" };
12
12
  const de = { _lang: "de" };
@@ -131,5 +131,4 @@ const DocxEditor = forwardRef((t0, ref) => {
131
131
  });
132
132
  DocxEditor.displayName = "EigenpalCompatDocxEditor";
133
133
  const resolveLocale = (locale, i18n) => locale ?? i18n?._lang ?? "en";
134
- //#endregion
135
134
  export { DocxEditor, LocaleProvider, VERSION, createDocumentWithText, createEmptyDocument, de, en, fr, he, hi, locales, pl, ptBR, renderAsync, tr, useTranslation, zhCN };
@@ -1,6 +1,6 @@
1
1
  import { c } from "react-compiler-runtime";
2
2
  import "react";
3
- //#region src/components/dialogs/dialogChrome.ts
3
+ // src/components/dialogs/dialogChrome.ts
4
4
  function useCloseOnDialogOpenChange(onClose) {
5
5
  const $ = c(2);
6
6
  let t0;
@@ -22,5 +22,4 @@ const DIALOG_LABEL_CLASS = "text-muted-foreground text-[13px]";
22
22
  const DIALOG_INPUT_CLASS = "border-input bg-background text-foreground rounded border px-2 py-1.5 text-[13px] outline-none";
23
23
  const DIALOG_SECONDARY_BUTTON_CLASS = "border-input rounded border px-4 py-1.5 text-[13px]";
24
24
  const DIALOG_PRIMARY_BUTTON_CLASS = "bg-primary text-primary-foreground rounded px-4 py-1.5 text-[13px] font-medium disabled:cursor-not-allowed disabled:opacity-50";
25
- //#endregion
26
25
  export { DIALOG_LABEL_CLASS as a, DIALOG_SECONDARY_BUTTON_CLASS as c, DIALOG_INPUT_CLASS as i, DIALOG_TITLE_CLASS as l, DIALOG_BODY_CLASS as n, DIALOG_POPUP_CLASS as o, DIALOG_FOOTER_CLASS as r, DIALOG_PRIMARY_BUTTON_CLASS as s, DIALOG_BACKDROP_CLASS as t, useCloseOnDialogOpenChange as u };
@@ -3,7 +3,6 @@ import { EndnoteProperties, FootnoteProperties, SectionProperties } from "@stll/
3
3
  import { FindMatch as FindMatch$1, FindOptions as FindOptions$1, FindResult as FindResult$1, ReplaceAllSummary } from "@stll/folio-core/utils/findReplace";
4
4
  import { TablePropertiesCommand } from "@stll/folio-core/utils/tableOperations";
5
5
  import { Watermark } from "@stll/folio-core/watermark";
6
- //#region src/components/dialogs/FindReplaceDialog.d.ts
7
6
  /**
8
7
  * Props for the FindReplaceDialog component
9
8
  */
@@ -47,8 +46,6 @@ type FindReplaceDialogProps = {
47
46
  * FindReplaceDialog component - Modal for finding and replacing text
48
47
  */
49
48
  declare function FindReplaceDialog(props: FindReplaceDialogProps): React.ReactElement | null;
50
- //#endregion
51
- //#region src/components/dialogs/FootnotePropertiesDialog.d.ts
52
49
  type FootnotePropertiesDialogProps = {
53
50
  isOpen: boolean;
54
51
  onClose: () => void;
@@ -57,8 +54,6 @@ type FootnotePropertiesDialogProps = {
57
54
  endnotePr?: EndnoteProperties;
58
55
  };
59
56
  declare function FootnotePropertiesDialog({ isOpen, onClose, onApply, footnotePr, endnotePr }: FootnotePropertiesDialogProps): JSX.Element;
60
- //#endregion
61
- //#region src/components/dialogs/HyperlinkDialog.d.ts
62
57
  type HyperlinkBookmarkOption = {
63
58
  name: string;
64
59
  label?: string;
@@ -78,8 +73,6 @@ type HyperlinkDialogProps = {
78
73
  bookmarks?: readonly HyperlinkBookmarkOption[];
79
74
  };
80
75
  declare function HyperlinkDialog(props: HyperlinkDialogProps): JSX.Element | null;
81
- //#endregion
82
- //#region src/components/dialogs/ImagePositionDialog.d.ts
83
76
  type ImagePositionData = {
84
77
  horizontal?: {
85
78
  relativeTo?: string;
@@ -103,8 +96,6 @@ type ImagePositionDialogProps = {
103
96
  currentData?: ImagePositionData;
104
97
  };
105
98
  declare function ImagePositionDialog(props: ImagePositionDialogProps): JSX.Element | null;
106
- //#endregion
107
- //#region src/components/dialogs/ImagePropertiesDialog.d.ts
108
99
  type ImagePropertiesData = {
109
100
  alt?: string;
110
101
  borderWidth?: number;
@@ -118,8 +109,6 @@ type ImagePropertiesDialogProps = {
118
109
  currentData?: ImagePropertiesData;
119
110
  };
120
111
  declare function ImagePropertiesDialog(props: ImagePropertiesDialogProps): JSX.Element | null;
121
- //#endregion
122
- //#region src/components/dialogs/InsertImageDialog.d.ts
123
112
  type InsertImageDialogData = {
124
113
  file: File;
125
114
  alt?: string;
@@ -133,16 +122,12 @@ type InsertImageDialogProps = {
133
122
  accept?: string;
134
123
  };
135
124
  declare function InsertImageDialog(props: InsertImageDialogProps): JSX.Element | null;
136
- //#endregion
137
- //#region src/components/dialogs/InsertSymbolDialog.d.ts
138
125
  type InsertSymbolDialogProps = {
139
126
  isOpen: boolean;
140
127
  onClose: () => void;
141
128
  onInsert: (symbol: string) => void;
142
129
  };
143
130
  declare function InsertSymbolDialog({ isOpen, onClose, onInsert }: InsertSymbolDialogProps): JSX.Element;
144
- //#endregion
145
- //#region src/components/dialogs/InsertTableDialog.d.ts
146
131
  type InsertTableDialogData = {
147
132
  rows: number;
148
133
  columns: number;
@@ -162,8 +147,6 @@ type InsertTableDialogProps = {
162
147
  styleOptions?: readonly InsertTableStyleOption[];
163
148
  };
164
149
  declare function InsertTableDialog(props: InsertTableDialogProps): JSX.Element | null;
165
- //#endregion
166
- //#region src/components/dialogs/PageSetupDialog.d.ts
167
150
  type PageSetupDialogProps = {
168
151
  isOpen: boolean;
169
152
  onClose: () => void;
@@ -171,8 +154,6 @@ type PageSetupDialogProps = {
171
154
  currentProps?: SectionProperties;
172
155
  };
173
156
  declare function PageSetupDialog(props: PageSetupDialogProps): JSX.Element | null;
174
- //#endregion
175
- //#region src/components/dialogs/PasteSpecialDialog.d.ts
176
157
  type PasteSpecialMode = "keepFormatting" | "mergeFormatting" | "plainText";
177
158
  type PasteSpecialDialogProps = {
178
159
  isOpen: boolean;
@@ -181,8 +162,6 @@ type PasteSpecialDialogProps = {
181
162
  defaultMode?: PasteSpecialMode;
182
163
  };
183
164
  declare function PasteSpecialDialog(props: PasteSpecialDialogProps): JSX.Element | null;
184
- //#endregion
185
- //#region src/components/dialogs/SplitCellDialog.d.ts
186
165
  type SplitCellDialogData = {
187
166
  rows: number;
188
167
  columns: number;
@@ -196,8 +175,6 @@ type SplitCellDialogProps = {
196
175
  defaultColumns?: number;
197
176
  };
198
177
  declare function SplitCellDialog(props: SplitCellDialogProps): JSX.Element | null;
199
- //#endregion
200
- //#region src/components/dialogs/TablePropertiesDialog.d.ts
201
178
  type TableProperties = TablePropertiesCommand;
202
179
  type TablePropertiesDialogProps = {
203
180
  isOpen: boolean;
@@ -206,8 +183,6 @@ type TablePropertiesDialogProps = {
206
183
  currentProps?: TableProperties;
207
184
  };
208
185
  declare function TablePropertiesDialog(props: TablePropertiesDialogProps): JSX.Element | null;
209
- //#endregion
210
- //#region src/components/dialogs/WatermarkDialog.d.ts
211
186
  type WatermarkDialogProps = {
212
187
  isOpen: boolean;
213
188
  onClose: () => void;
@@ -215,5 +190,4 @@ type WatermarkDialogProps = {
215
190
  currentWatermark?: Watermark;
216
191
  };
217
192
  declare function WatermarkDialog(props: WatermarkDialogProps): JSX.Element | null;
218
- //#endregion
219
193
  export { HyperlinkDialog as A, ImagePropertiesData as C, ImagePositionDialog as D, ImagePositionData as E, FindReplaceDialog as F, FindReplaceDialogProps as I, HyperlinkDialogProps as M, FootnotePropertiesDialog as N, ImagePositionDialogProps as O, FootnotePropertiesDialogProps as P, InsertImageDialogProps as S, ImagePropertiesDialogProps as T, InsertTableStyleOption as _, TablePropertiesDialogProps as a, InsertImageDialog as b, SplitCellDialogProps as c, PasteSpecialMode as d, PageSetupDialog as f, InsertTableDialogProps as g, InsertTableDialogData as h, TablePropertiesDialog as i, HyperlinkDialogData as j, HyperlinkBookmarkOption as k, PasteSpecialDialog as l, InsertTableDialog as m, WatermarkDialogProps as n, SplitCellDialog as o, PageSetupDialogProps as p, TableProperties as r, SplitCellDialogData as s, WatermarkDialog as t, PasteSpecialDialogProps as u, InsertSymbolDialog as v, ImagePropertiesDialog as w, InsertImageDialogData as x, InsertSymbolDialogProps as y };
@@ -1,11 +1,11 @@
1
- import { r as useFolioUI } from "./folio-ui-ruRywxeb.js";
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";
1
+ import { r as useFolioUI } from "./folio-ui-B8i_O5aS.js";
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-JDeVEuZn.js";
3
3
  import { c } from "react-compiler-runtime";
4
4
  import { useId, useState } from "react";
5
5
  import { useTranslations } from "use-intl";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
7
  import { isAllowedExternalWatermarkImageUrl } from "@stll/folio-core/watermark";
8
- //#region src/components/dialogs/HyperlinkDialog.tsx
8
+ // src/components/dialogs/HyperlinkDialog.tsx
9
9
  function HyperlinkDialog(props) {
10
10
  const $ = c(6);
11
11
  if (!props.isOpen) return null;
@@ -211,8 +211,7 @@ function normalizeUrl(value) {
211
211
  if (/^(https?:\/\/|mailto:|tel:|ftp:\/\/)/iu.test(trimmed)) return trimmed;
212
212
  return `https://${trimmed}`;
213
213
  }
214
- //#endregion
215
- //#region src/components/dialogs/InsertImageDialog.tsx
214
+ // src/components/dialogs/InsertImageDialog.tsx
216
215
  function InsertImageDialog(props) {
217
216
  const $ = c(2);
218
217
  if (!props.isOpen) return null;
@@ -349,8 +348,7 @@ function toPositiveNumber(value) {
349
348
  const parsed = Number(value);
350
349
  return Number.isFinite(parsed) && parsed > 0 ? parsed : void 0;
351
350
  }
352
- //#endregion
353
- //#region src/components/dialogs/InsertTableDialog.tsx
351
+ // src/components/dialogs/InsertTableDialog.tsx
354
352
  const GRID_ROWS = 8;
355
353
  const GRID_COLUMNS = 10;
356
354
  const MIN_ROWS = 1;
@@ -551,8 +549,7 @@ function InsertTableDialogForm({ isOpen, onClose, onInsert, defaultRows = 3, def
551
549
  function clampInteger$1(value, min, max) {
552
550
  return Math.min(max, Math.max(min, Math.trunc(value)));
553
551
  }
554
- //#endregion
555
- //#region src/components/dialogs/PasteSpecialDialog.tsx
552
+ // src/components/dialogs/PasteSpecialDialog.tsx
556
553
  const PASTE_MODES = [
557
554
  {
558
555
  value: "keepFormatting",
@@ -655,8 +652,7 @@ function PasteSpecialDialogForm({ isOpen, onClose, onPaste, defaultMode = "plain
655
652
  })] })
656
653
  });
657
654
  }
658
- //#endregion
659
- //#region src/components/dialogs/SplitCellDialog.tsx
655
+ // src/components/dialogs/SplitCellDialog.tsx
660
656
  const MIN_PARTS = 1;
661
657
  const MAX_PARTS = 63;
662
658
  function SplitCellDialog(props) {
@@ -782,8 +778,7 @@ function SplitCellDialogForm({ isOpen, onClose, onSplit, defaultRows = 1, defaul
782
778
  function clampInteger(value) {
783
779
  return Math.min(MAX_PARTS, Math.max(MIN_PARTS, Math.trunc(value)));
784
780
  }
785
- //#endregion
786
- //#region src/components/dialogs/WatermarkDialog.tsx
781
+ // src/components/dialogs/WatermarkDialog.tsx
787
782
  const DEFAULT_TEXT_COLOR = "#C0C0C0";
788
783
  function WatermarkDialog(props) {
789
784
  const $ = c(5);
@@ -1381,5 +1376,4 @@ function toColorInputValue(value) {
1381
1376
  if (!value || value === "auto") return DEFAULT_TEXT_COLOR;
1382
1377
  return value.startsWith("#") ? value : `#${value}`;
1383
1378
  }
1384
- //#endregion
1385
1379
  export { InsertImageDialog as a, InsertTableDialog as i, SplitCellDialog as n, HyperlinkDialog as o, PasteSpecialDialog as r, WatermarkDialog as t };
package/dist/dialogs.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { A as HyperlinkDialog, C as ImagePropertiesData, D as ImagePositionDialog, E as ImagePositionData, F as FindReplaceDialog, I as FindReplaceDialogProps, M as HyperlinkDialogProps, N as FootnotePropertiesDialog, O as ImagePositionDialogProps, P as FootnotePropertiesDialogProps, S as InsertImageDialogProps, T as ImagePropertiesDialogProps, _ as InsertTableStyleOption, a as TablePropertiesDialogProps, b as InsertImageDialog, c as SplitCellDialogProps, d as PasteSpecialMode, f as PageSetupDialog, g as InsertTableDialogProps, h as InsertTableDialogData, i as TablePropertiesDialog, j as HyperlinkDialogData, k as HyperlinkBookmarkOption, l as PasteSpecialDialog, m as InsertTableDialog, n as WatermarkDialogProps, o as SplitCellDialog, p as PageSetupDialogProps, r as TableProperties, s as SplitCellDialogData, t as WatermarkDialog, u as PasteSpecialDialogProps, v as InsertSymbolDialog, w as ImagePropertiesDialog, x as InsertImageDialogData, y as InsertSymbolDialogProps } from "./dialogs-DGa8PuE4.js";
1
+ import { A as HyperlinkDialog, C as ImagePropertiesData, D as ImagePositionDialog, E as ImagePositionData, F as FindReplaceDialog, I as FindReplaceDialogProps, M as HyperlinkDialogProps, N as FootnotePropertiesDialog, O as ImagePositionDialogProps, P as FootnotePropertiesDialogProps, S as InsertImageDialogProps, T as ImagePropertiesDialogProps, _ as InsertTableStyleOption, a as TablePropertiesDialogProps, b as InsertImageDialog, c as SplitCellDialogProps, d as PasteSpecialMode, f as PageSetupDialog, g as InsertTableDialogProps, h as InsertTableDialogData, i as TablePropertiesDialog, j as HyperlinkDialogData, k as HyperlinkBookmarkOption, l as PasteSpecialDialog, m as InsertTableDialog, n as WatermarkDialogProps, o as SplitCellDialog, p as PageSetupDialogProps, r as TableProperties, s as SplitCellDialogData, t as WatermarkDialog, u as PasteSpecialDialogProps, v as InsertSymbolDialog, w as ImagePropertiesDialog, x as InsertImageDialogData, y as InsertSymbolDialogProps } from "./dialogs-CQHVbEgA.js";
2
2
  export { FindReplaceDialog, type FindReplaceDialogProps, FootnotePropertiesDialog, type FootnotePropertiesDialogProps, type HyperlinkBookmarkOption, HyperlinkDialog, type HyperlinkDialogData, type HyperlinkDialogProps, type ImagePositionData, ImagePositionDialog, type ImagePositionDialogProps, type ImagePropertiesData, ImagePropertiesDialog, type ImagePropertiesDialogProps, InsertImageDialog, type InsertImageDialogData, type InsertImageDialogProps, InsertSymbolDialog, type InsertSymbolDialogProps, InsertTableDialog, type InsertTableDialogData, type InsertTableDialogProps, type InsertTableStyleOption, PageSetupDialog, type PageSetupDialogProps, PasteSpecialDialog, type PasteSpecialDialogProps, type PasteSpecialMode, SplitCellDialog, type SplitCellDialogData, type SplitCellDialogProps, type TableProperties, TablePropertiesDialog, type TablePropertiesDialogProps, WatermarkDialog, type WatermarkDialogProps };
package/dist/dialogs.js CHANGED
@@ -1,9 +1,9 @@
1
- import { t as FindReplaceDialog } from "./FindReplaceDialog-C3njN6OI.js";
2
- import { t as FootnotePropertiesDialog } from "./FootnotePropertiesDialog-BEs7N62_.js";
3
- import { a as InsertImageDialog, i as InsertTableDialog, n as SplitCellDialog, o as HyperlinkDialog, r as PasteSpecialDialog, t as WatermarkDialog } from "./dialogs-DGrcp10A.js";
4
- import { t as ImagePositionDialog } from "./ImagePositionDialog-Oap9knQ-.js";
5
- import { t as ImagePropertiesDialog } from "./ImagePropertiesDialog-lLMKHv0u.js";
6
- import { t as InsertSymbolDialog } from "./InsertSymbolDialog-CepZECp0.js";
7
- import { t as PageSetupDialog } from "./PageSetupDialog-DTWCdPkX.js";
8
- import { t as TablePropertiesDialog } from "./TablePropertiesDialog-uSTmyEcu.js";
1
+ import { t as FindReplaceDialog } from "./FindReplaceDialog-B446W1cL.js";
2
+ import { t as FootnotePropertiesDialog } from "./FootnotePropertiesDialog-J5zg-K3w.js";
3
+ import { a as InsertImageDialog, i as InsertTableDialog, n as SplitCellDialog, o as HyperlinkDialog, r as PasteSpecialDialog, t as WatermarkDialog } from "./dialogs-CahXRDm_.js";
4
+ import { t as ImagePositionDialog } from "./ImagePositionDialog-DdokSGoN.js";
5
+ import { t as ImagePropertiesDialog } from "./ImagePropertiesDialog-C-xQU8Eq.js";
6
+ import { t as InsertSymbolDialog } from "./InsertSymbolDialog-p7UOS4me.js";
7
+ import { t as PageSetupDialog } from "./PageSetupDialog-BXK9tKw5.js";
8
+ import { t as TablePropertiesDialog } from "./TablePropertiesDialog-edzovlyc.js";
9
9
  export { FindReplaceDialog, FootnotePropertiesDialog, HyperlinkDialog, ImagePositionDialog, ImagePropertiesDialog, InsertImageDialog, InsertSymbolDialog, InsertTableDialog, PageSetupDialog, PasteSpecialDialog, SplitCellDialog, TablePropertiesDialog, WatermarkDialog };
@@ -9,13 +9,12 @@ import { Dialog } from "@base-ui/react/dialog";
9
9
  import { Input } from "@base-ui/react/input";
10
10
  import { Menu } from "@base-ui/react/menu";
11
11
  import { Select } from "@base-ui/react/select";
12
- //#region src/lib/utils.ts
12
+ // src/lib/utils.ts
13
13
  /** Merge class names, filtering out falsy values. */
14
14
  function cn(...inputs) {
15
15
  return inputs.filter(Boolean).join(" ");
16
16
  }
17
- //#endregion
18
- //#region src/ui/defaults/button.tsx
17
+ // src/ui/defaults/button.tsx
19
18
  /**
20
19
  * Built-in, dependency-free Button used when a consumer does not inject one.
21
20
  *
@@ -35,8 +34,7 @@ function DefaultButton({ variant = "default", size = "sm", className, children,
35
34
  children
36
35
  });
37
36
  }
38
- //#endregion
39
- //#region src/ui/defaults/checkbox.tsx
37
+ // src/ui/defaults/checkbox.tsx
40
38
  /**
41
39
  * Built-in, dependency-light Checkbox used when a consumer does not inject one.
42
40
  * Wraps `@base-ui/react`'s accessible Checkbox primitive with a minimal check
@@ -94,8 +92,7 @@ function DefaultCheckbox(t0) {
94
92
  } else t3 = $[8];
95
93
  return t3;
96
94
  }
97
- //#endregion
98
- //#region src/ui/defaults/color-picker.tsx
95
+ // src/ui/defaults/color-picker.tsx
99
96
  /**
100
97
  * Built-in, dependency-light ColorPicker used when a consumer does not inject
101
98
  * one. Wraps `@base-ui/react`'s Popover primitive (focus management,
@@ -199,8 +196,7 @@ function ColorSwatch(t0) {
199
196
  } else t7 = $[13];
200
197
  return t7;
201
198
  }
202
- //#endregion
203
- //#region src/ui/defaults/date-picker-popover.tsx
199
+ // src/ui/defaults/date-picker-popover.tsx
204
200
  /**
205
201
  * Built-in, dependency-light DatePickerPopover used when a consumer does not
206
202
  * inject one. Renders a native `<input type="date">` whose value is an ISO
@@ -226,8 +222,7 @@ function DefaultDatePickerPopover({ value, onChange, defaultOpen = false }) {
226
222
  value: toISODate(value)
227
223
  });
228
224
  }
229
- //#endregion
230
- //#region src/ui/defaults/dialog.tsx
225
+ // src/ui/defaults/dialog.tsx
231
226
  /**
232
227
  * Built-in, dependency-light Dialog parts used when a consumer does not inject
233
228
  * its own. Each part wraps the matching `@base-ui/react` primitive — the same
@@ -418,8 +413,7 @@ const DefaultDialog = {
418
413
  Title: DefaultDialogTitle,
419
414
  Close: DefaultDialogClose
420
415
  };
421
- //#endregion
422
- //#region src/ui/defaults/input.tsx
416
+ // src/ui/defaults/input.tsx
423
417
  /**
424
418
  * Built-in, dependency-light Input used when a consumer does not inject one.
425
419
  *
@@ -444,8 +438,7 @@ function DefaultInput({ className, size = "default", nativeInput = false, ...pro
444
438
  ...props
445
439
  });
446
440
  }
447
- //#endregion
448
- //#region src/ui/defaults/menu.tsx
441
+ // src/ui/defaults/menu.tsx
449
442
  /**
450
443
  * Built-in, dependency-light Menu parts used when a consumer does not inject
451
444
  * its own. Each part wraps the matching `@base-ui/react` primitive (real
@@ -658,8 +651,7 @@ const DefaultMenu = {
658
651
  GroupLabel: DefaultMenuGroupLabel,
659
652
  Separator: DefaultMenuSeparator
660
653
  };
661
- //#endregion
662
- //#region src/ui/defaults/outline-rail.tsx
654
+ // src/ui/defaults/outline-rail.tsx
663
655
  /**
664
656
  * Built-in, dependency-light OutlineRail used when a consumer does not inject
665
657
  * one. The editor mounts it inside the outline column, drawer or rail, so it
@@ -893,8 +885,7 @@ function useRailTickTops(t0) {
893
885
  } else tops = $[17];
894
886
  return tops;
895
887
  }
896
- //#endregion
897
- //#region src/ui/defaults/popover.tsx
888
+ // src/ui/defaults/popover.tsx
898
889
  /**
899
890
  * Built-in, dependency-light Popover parts used when a consumer does not inject
900
891
  * its own. Each part wraps the matching `@base-ui/react` primitive (real focus
@@ -952,8 +943,7 @@ const DefaultPopover = {
952
943
  Popup: DefaultPopoverPopup,
953
944
  Close: DefaultPopoverClose
954
945
  };
955
- //#endregion
956
- //#region src/ui/defaults/select.tsx
946
+ // src/ui/defaults/select.tsx
957
947
  /**
958
948
  * Built-in, dependency-light Select parts used when a consumer does not inject
959
949
  * its own. Each part wraps the matching `@base-ui/react` primitive (real
@@ -1154,8 +1144,7 @@ function DefaultSelectItem(t0) {
1154
1144
  } else t3 = $[11];
1155
1145
  return t3;
1156
1146
  }
1157
- //#endregion
1158
- //#region src/ui/folio-ui.tsx
1147
+ // src/ui/folio-ui.tsx
1159
1148
  const DEFAULT_COMPONENTS = {
1160
1149
  Button: DefaultButton,
1161
1150
  Dialog: DefaultDialog,
@@ -1211,5 +1200,4 @@ function FolioUIProvider(t0) {
1211
1200
  function useFolioUI() {
1212
1201
  return useContext(FolioUIContext);
1213
1202
  }
1214
- //#endregion
1215
1203
  export { cn as i, FolioUIProvider as n, useFolioUI as r, DEFAULT_COMPONENTS as t };