@stll/folio-react 0.6.0 → 0.7.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.
- package/dist/{CommentsSidebar-_utmEkA9.js → CommentsSidebar-B8X5a8JW.js} +126 -129
- package/dist/{FindReplaceDialog-DLdBekSR.js → FindReplaceDialog-Bx7QaFQ_.js} +23 -18
- package/dist/FootnotePropertiesDialog-2lmpg9m8.js +646 -0
- package/dist/ImagePositionDialog-D3MileYL.js +842 -0
- package/dist/ImagePropertiesDialog-CzK8HCaW.js +465 -0
- package/dist/InsertSymbolDialog-Df9dyLvn.js +376 -0
- package/dist/PageSetupDialog-PSs9YdPb.js +684 -0
- package/dist/TablePropertiesDialog-PQxKKM0Y.js +344 -0
- package/dist/{TextContextMenu-CG0V37wi.js → TextContextMenu-Ci7-M4oU.js} +199 -79
- package/dist/compat/eigenpal.d.ts +1 -1
- package/dist/compat/eigenpal.js +89 -17
- package/dist/dialogChrome-BoGYPgeu.js +26 -0
- package/dist/{dialogs-j7qyw17x.d.ts → dialogs-DK8OVUT_.d.ts} +13 -1
- package/dist/{dialogs-CzvXYJyG.js → dialogs-DsHnfN0g.js} +508 -316
- package/dist/dialogs.d.ts +2 -2
- package/dist/dialogs.js +9 -8
- package/dist/editor.css +1 -1
- package/dist/folio-ui-C-85DSuK.js +1011 -0
- package/dist/index.d.ts +5 -4
- package/dist/index.js +12 -11
- package/dist/{renderAsync-B7UJsZye.d.ts → renderAsync-ChQI9UJG.d.ts} +11 -3
- package/dist/{renderAsync-CwHTsxBN.js → renderAsync-evdyE_GW.js} +5593 -3256
- package/dist/standalone.css +1 -1
- package/package.json +8 -6
- package/dist/FootnotePropertiesDialog-CUjq9c6H.js +0 -267
- package/dist/ImagePositionDialog-BMuO9rLT.js +0 -395
- package/dist/ImagePropertiesDialog-C8iEgdmN.js +0 -198
- package/dist/PageSetupDialog-BKsSMCGb.js +0 -312
- package/dist/TablePropertiesDialog-Dw8gvL78.js +0 -159
- package/dist/useFindReplace-BPBpMWS9.js +0 -842
package/dist/compat/eigenpal.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { n as DocxEditor$1, t as renderAsync } from "../renderAsync-
|
|
1
|
+
import { n as DocxEditor$1, t as renderAsync } from "../renderAsync-evdyE_GW.js";
|
|
2
2
|
import { t as messages_exports } from "../messages.js";
|
|
3
|
+
import { c } from "react-compiler-runtime";
|
|
3
4
|
import { forwardRef } from "react";
|
|
4
5
|
import { IntlProvider, useTranslations } from "use-intl";
|
|
5
6
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -26,25 +27,96 @@ const locales = {
|
|
|
26
27
|
tr,
|
|
27
28
|
"zh-CN": zhCN
|
|
28
29
|
};
|
|
29
|
-
const LocaleProvider = (
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
const LocaleProvider = (t0) => {
|
|
31
|
+
const $ = c(10);
|
|
32
|
+
const { children, i18n, locale } = t0;
|
|
33
|
+
let T0;
|
|
34
|
+
let t1;
|
|
35
|
+
let t2;
|
|
36
|
+
if ($[0] !== i18n || $[1] !== locale) {
|
|
37
|
+
const resolvedLocale = resolveLocale(locale, i18n);
|
|
38
|
+
T0 = IntlProvider;
|
|
39
|
+
t1 = resolvedLocale;
|
|
40
|
+
t2 = (0, messages_exports.getFolioMessages)(resolvedLocale);
|
|
41
|
+
$[0] = i18n;
|
|
42
|
+
$[1] = locale;
|
|
43
|
+
$[2] = T0;
|
|
44
|
+
$[3] = t1;
|
|
45
|
+
$[4] = t2;
|
|
46
|
+
} else {
|
|
47
|
+
T0 = $[2];
|
|
48
|
+
t1 = $[3];
|
|
49
|
+
t2 = $[4];
|
|
50
|
+
}
|
|
51
|
+
let t3;
|
|
52
|
+
if ($[5] !== T0 || $[6] !== children || $[7] !== t1 || $[8] !== t2) {
|
|
53
|
+
t3 = /* @__PURE__ */ jsx(T0, {
|
|
54
|
+
locale: t1,
|
|
55
|
+
messages: t2,
|
|
56
|
+
children
|
|
57
|
+
});
|
|
58
|
+
$[5] = T0;
|
|
59
|
+
$[6] = children;
|
|
60
|
+
$[7] = t1;
|
|
61
|
+
$[8] = t2;
|
|
62
|
+
$[9] = t3;
|
|
63
|
+
} else t3 = $[9];
|
|
64
|
+
return t3;
|
|
36
65
|
};
|
|
37
66
|
const useTranslation = () => {
|
|
38
|
-
|
|
67
|
+
const $ = c(2);
|
|
68
|
+
const t0 = useTranslations("folio");
|
|
69
|
+
let t1;
|
|
70
|
+
if ($[0] !== t0) {
|
|
71
|
+
t1 = { t: t0 };
|
|
72
|
+
$[0] = t0;
|
|
73
|
+
$[1] = t1;
|
|
74
|
+
} else t1 = $[1];
|
|
75
|
+
return t1;
|
|
39
76
|
};
|
|
40
|
-
const DocxEditor = forwardRef((
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
77
|
+
const DocxEditor = forwardRef((t0, ref) => {
|
|
78
|
+
const $ = c(11);
|
|
79
|
+
let i18n;
|
|
80
|
+
let locale;
|
|
81
|
+
let props;
|
|
82
|
+
if ($[0] !== t0) {
|
|
83
|
+
const { agentPanel: _agentPanel, colorMode: _colorMode, commentsSidebarOpen: _commentsSidebarOpen, disableFindReplaceShortcuts: _disableFindReplaceShortcuts, documentName: _documentName, documentNameEditable: _documentNameEditable, externalContent: _externalContent, externalPlugins: _externalPlugins, i18n: t1, locale: t2, onCommentAdd: _onCommentAdd, onCommentDelete: _onCommentDelete, onCommentReply: _onCommentReply, onCommentResolve: _onCommentResolve, onCommentsSidebarOpenChange: _onCommentsSidebarOpenChange, onDocumentNameChange: _onDocumentNameChange, onOpen: _onOpen, onRenderedDomContextReady: _onRenderedDomContextReady, pluginOverlays: _pluginOverlays, pluginRenderedDomContext: _pluginRenderedDomContext, pluginSidebarItems: _pluginSidebarItems, printOptions: _printOptions, renderLogo: _renderLogo, renderTitleBarRight: _renderTitleBarRight, showFileOpen: _showFileOpen, showHelpMenu: _showHelpMenu, showOutlineButton: _showOutlineButton, watermarkPresets: _watermarkPresets, ...t3 } = t0;
|
|
84
|
+
i18n = t1;
|
|
85
|
+
locale = t2;
|
|
86
|
+
props = t3;
|
|
87
|
+
$[0] = t0;
|
|
88
|
+
$[1] = i18n;
|
|
89
|
+
$[2] = locale;
|
|
90
|
+
$[3] = props;
|
|
91
|
+
} else {
|
|
92
|
+
i18n = $[1];
|
|
93
|
+
locale = $[2];
|
|
94
|
+
props = $[3];
|
|
95
|
+
}
|
|
96
|
+
let t1;
|
|
97
|
+
if ($[4] !== props || $[5] !== ref) {
|
|
98
|
+
t1 = /* @__PURE__ */ jsx(DocxEditor$1, {
|
|
99
|
+
...props,
|
|
100
|
+
ref
|
|
101
|
+
});
|
|
102
|
+
$[4] = props;
|
|
103
|
+
$[5] = ref;
|
|
104
|
+
$[6] = t1;
|
|
105
|
+
} else t1 = $[6];
|
|
106
|
+
let t2;
|
|
107
|
+
if ($[7] !== i18n || $[8] !== locale || $[9] !== t1) {
|
|
108
|
+
t2 = /* @__PURE__ */ jsx(LocaleProvider, {
|
|
109
|
+
i18n,
|
|
110
|
+
locale,
|
|
111
|
+
children: t1
|
|
112
|
+
});
|
|
113
|
+
$[7] = i18n;
|
|
114
|
+
$[8] = locale;
|
|
115
|
+
$[9] = t1;
|
|
116
|
+
$[10] = t2;
|
|
117
|
+
} else t2 = $[10];
|
|
118
|
+
return t2;
|
|
119
|
+
});
|
|
48
120
|
DocxEditor.displayName = "EigenpalCompatDocxEditor";
|
|
49
121
|
const resolveLocale = (locale, i18n) => locale ?? i18n?._lang ?? "en";
|
|
50
122
|
//#endregion
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { c } from "react-compiler-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
//#region src/components/dialogs/dialogChrome.ts
|
|
4
|
+
function useCloseOnDialogOpenChange(onClose) {
|
|
5
|
+
const $ = c(2);
|
|
6
|
+
let t0;
|
|
7
|
+
if ($[0] !== onClose) {
|
|
8
|
+
t0 = (open) => {
|
|
9
|
+
if (!open) onClose();
|
|
10
|
+
};
|
|
11
|
+
$[0] = onClose;
|
|
12
|
+
$[1] = t0;
|
|
13
|
+
} else t0 = $[1];
|
|
14
|
+
return t0;
|
|
15
|
+
}
|
|
16
|
+
const DIALOG_BACKDROP_CLASS = "fixed inset-0 z-[10000] bg-black/50";
|
|
17
|
+
const DIALOG_POPUP_CLASS = "bg-popover fixed start-1/2 top-1/2 z-[10001] w-full max-w-[520px] min-w-[360px] -translate-x-1/2 -translate-y-1/2 rounded-lg border shadow-xl";
|
|
18
|
+
const DIALOG_TITLE_CLASS = "border-b px-5 py-3 text-base font-semibold";
|
|
19
|
+
const DIALOG_BODY_CLASS = "flex flex-col gap-4 px-5 py-4";
|
|
20
|
+
const DIALOG_FOOTER_CLASS = "flex justify-end gap-2 border-t px-5 py-3";
|
|
21
|
+
const DIALOG_LABEL_CLASS = "text-muted-foreground text-[13px]";
|
|
22
|
+
const DIALOG_INPUT_CLASS = "border-input bg-background text-foreground rounded border px-2 py-1.5 text-[13px] outline-none";
|
|
23
|
+
const DIALOG_SECONDARY_BUTTON_CLASS = "border-input rounded border px-4 py-1.5 text-[13px]";
|
|
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
|
+
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 };
|
|
@@ -197,6 +197,18 @@ declare function InsertImageDialog({
|
|
|
197
197
|
accept
|
|
198
198
|
}: InsertImageDialogProps): import("react").JSX.Element;
|
|
199
199
|
//#endregion
|
|
200
|
+
//#region src/components/dialogs/InsertSymbolDialog.d.ts
|
|
201
|
+
type InsertSymbolDialogProps = {
|
|
202
|
+
isOpen: boolean;
|
|
203
|
+
onClose: () => void;
|
|
204
|
+
onInsert: (symbol: string) => void;
|
|
205
|
+
};
|
|
206
|
+
declare function InsertSymbolDialog({
|
|
207
|
+
isOpen,
|
|
208
|
+
onClose,
|
|
209
|
+
onInsert
|
|
210
|
+
}: InsertSymbolDialogProps): import("react").JSX.Element;
|
|
211
|
+
//#endregion
|
|
200
212
|
//#region src/components/dialogs/InsertTableDialog.d.ts
|
|
201
213
|
type InsertTableDialogData = {
|
|
202
214
|
rows: number;
|
|
@@ -315,4 +327,4 @@ declare function WatermarkDialog({
|
|
|
315
327
|
currentWatermark
|
|
316
328
|
}: WatermarkDialogProps): import("react").JSX.Element;
|
|
317
329
|
//#endregion
|
|
318
|
-
export {
|
|
330
|
+
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 };
|