@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.
- package/dist/{CommentsSidebar-B8X5a8JW.js → CommentsSidebar-Byn5lyrt.js} +2 -2
- package/dist/{FindReplaceDialog-Bx7QaFQ_.js → FindReplaceDialog-CqKK82nE.js} +1 -1
- package/dist/FootnotePropertiesDialog-CixRdIiT.js +822 -0
- package/dist/ImagePositionDialog-DNodkoI2.js +1065 -0
- package/dist/ImagePropertiesDialog-CLsDIUWb.js +613 -0
- package/dist/{InsertSymbolDialog-Df9dyLvn.js → InsertSymbolDialog-DCFLmfzn.js} +1 -1
- package/dist/PageSetupDialog-COkgeOQn.js +820 -0
- package/dist/TablePropertiesDialog-B_AGrPR8.js +434 -0
- package/dist/compat/eigenpal.d.ts +1 -1
- package/dist/compat/eigenpal.js +1 -1
- package/dist/{dialogs-DsHnfN0g.js → dialogs-Bj2PdycR.js} +265 -201
- package/dist/dialogs.js +8 -8
- package/dist/{folio-ui-C-85DSuK.js → folio-ui-BgDDRsUX.js} +5 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -10
- package/dist/{renderAsync-ChQI9UJG.d.ts → renderAsync-BmxQE7iO.d.ts} +3 -2
- package/dist/{renderAsync-evdyE_GW.js → renderAsync-BtWYvQMT.js} +378 -273
- package/package.json +2 -2
- package/dist/FootnotePropertiesDialog-2lmpg9m8.js +0 -646
- package/dist/ImagePositionDialog-D3MileYL.js +0 -842
- package/dist/ImagePropertiesDialog-CzK8HCaW.js +0 -465
- package/dist/PageSetupDialog-PSs9YdPb.js +0 -684
- package/dist/TablePropertiesDialog-PQxKKM0Y.js +0 -344
package/dist/dialogs.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as FindReplaceDialog } from "./FindReplaceDialog-
|
|
2
|
-
import { t as FootnotePropertiesDialog } from "./FootnotePropertiesDialog-
|
|
3
|
-
import { a as InsertImageDialog, i as InsertTableDialog, n as SplitCellDialog, o as HyperlinkDialog, r as PasteSpecialDialog, t as WatermarkDialog } from "./dialogs-
|
|
4
|
-
import { t as ImagePositionDialog } from "./ImagePositionDialog-
|
|
5
|
-
import { t as ImagePropertiesDialog } from "./ImagePropertiesDialog-
|
|
6
|
-
import { t as InsertSymbolDialog } from "./InsertSymbolDialog-
|
|
7
|
-
import { t as PageSetupDialog } from "./PageSetupDialog-
|
|
8
|
-
import { t as TablePropertiesDialog } from "./TablePropertiesDialog-
|
|
1
|
+
import { t as FindReplaceDialog } from "./FindReplaceDialog-CqKK82nE.js";
|
|
2
|
+
import { t as FootnotePropertiesDialog } from "./FootnotePropertiesDialog-CixRdIiT.js";
|
|
3
|
+
import { a as InsertImageDialog, i as InsertTableDialog, n as SplitCellDialog, o as HyperlinkDialog, r as PasteSpecialDialog, t as WatermarkDialog } from "./dialogs-Bj2PdycR.js";
|
|
4
|
+
import { t as ImagePositionDialog } from "./ImagePositionDialog-DNodkoI2.js";
|
|
5
|
+
import { t as ImagePropertiesDialog } from "./ImagePropertiesDialog-CLsDIUWb.js";
|
|
6
|
+
import { t as InsertSymbolDialog } from "./InsertSymbolDialog-DCFLmfzn.js";
|
|
7
|
+
import { t as PageSetupDialog } from "./PageSetupDialog-COkgeOQn.js";
|
|
8
|
+
import { t as TablePropertiesDialog } from "./TablePropertiesDialog-B_AGrPR8.js";
|
|
9
9
|
export { FindReplaceDialog, FootnotePropertiesDialog, HyperlinkDialog, ImagePositionDialog, ImagePropertiesDialog, InsertImageDialog, InsertSymbolDialog, InsertTableDialog, PageSetupDialog, PasteSpecialDialog, SplitCellDialog, TablePropertiesDialog, WatermarkDialog };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { c } from "react-compiler-runtime";
|
|
2
2
|
import { createContext, useContext, useMemo } from "react";
|
|
3
|
+
import { useTranslations } from "use-intl";
|
|
3
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
5
|
import { Checkbox } from "@base-ui/react/checkbox";
|
|
5
6
|
import { Popover } from "@base-ui/react/popover";
|
|
@@ -107,6 +108,7 @@ const swatchColor = (preset) => preset.color ?? `#${preset.value}`;
|
|
|
107
108
|
const normalizeHex = (hex) => hex.replace(/^#/u, "").toUpperCase();
|
|
108
109
|
const EMPTY_PRESETS = [];
|
|
109
110
|
function DefaultColorPicker({ value, onSelect, onClear, presets = EMPTY_PRESETS, columns = 8, children }) {
|
|
111
|
+
const t = useTranslations("folio");
|
|
110
112
|
const trigger = useMemo(() => /* @__PURE__ */ jsx("div", { className: "folio-default-color-picker-trigger" }), []);
|
|
111
113
|
return /* @__PURE__ */ jsxs(Popover.Root, { children: [/* @__PURE__ */ jsx(Popover.Trigger, {
|
|
112
114
|
nativeButton: false,
|
|
@@ -123,7 +125,7 @@ function DefaultColorPicker({ value, onSelect, onClear, presets = EMPTY_PRESETS,
|
|
|
123
125
|
onClear && /* @__PURE__ */ jsx(Popover.Close, {
|
|
124
126
|
className: "folio-default-color-picker-clear",
|
|
125
127
|
onClick: onClear,
|
|
126
|
-
children: "
|
|
128
|
+
children: t("colorPicker.noColor")
|
|
127
129
|
}),
|
|
128
130
|
/* @__PURE__ */ jsx("div", {
|
|
129
131
|
className: "folio-default-color-picker-swatches",
|
|
@@ -136,8 +138,8 @@ function DefaultColorPicker({ value, onSelect, onClear, presets = EMPTY_PRESETS,
|
|
|
136
138
|
}),
|
|
137
139
|
/* @__PURE__ */ jsxs("label", {
|
|
138
140
|
className: "folio-default-color-picker-custom",
|
|
139
|
-
children: ["
|
|
140
|
-
"aria-label": "
|
|
141
|
+
children: [t("colorPicker.custom"), /* @__PURE__ */ jsx("input", {
|
|
142
|
+
"aria-label": t("colorPicker.customColor"),
|
|
141
143
|
onChange: (event) => onSelect?.(normalizeHex(event.target.value)),
|
|
142
144
|
type: "color",
|
|
143
145
|
value: value ? `#${normalizeHex(value)}` : "#000000"
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as FontDefinition, a as DocxEditorApplyDocumentOperationsOptions, c as DocxEditorRef, d as FontOption, f as ColorPreset, g as OutlineItem, h as FolioUIProvider, i as renderAsync, l as ToolbarProps, m as FolioUIComponents, n as EditorHandle, o as DocxEditorCollaboration, p as FolioButtonProps, r as RenderAsyncOptions, s as DocxEditorProps, t as DocxEditorHandle, u as EditorMode } from "./renderAsync-
|
|
1
|
+
import { _ as FontDefinition, a as DocxEditorApplyDocumentOperationsOptions, c as DocxEditorRef, d as FontOption, f as ColorPreset, g as OutlineItem, h as FolioUIProvider, i as renderAsync, l as ToolbarProps, m as FolioUIComponents, n as EditorHandle, o as DocxEditorCollaboration, p as FolioButtonProps, r as RenderAsyncOptions, s as DocxEditorProps, t as DocxEditorHandle, u as EditorMode } from "./renderAsync-BmxQE7iO.js";
|
|
2
2
|
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-DK8OVUT_.js";
|
|
3
3
|
import React, { CSSProperties, ReactNode, RefObject } from "react";
|
|
4
4
|
import { CreateEmptyDocumentOptions, createEmptyDocument } from "@stll/folio-core/utils/createDocument";
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { a as formatZoom, c as FormattingBar, i as clampZoom, l as ZoomControl, n as DocxEditor, o as parseZoom, r as ZOOM_PRESETS, s as useWheelZoom, t as renderAsync, u as AutocompleteCaretOverlay } from "./renderAsync-
|
|
2
|
-
import { n as FolioUIProvider } from "./folio-ui-
|
|
3
|
-
import { t as FindReplaceDialog } from "./FindReplaceDialog-
|
|
4
|
-
import { t as FootnotePropertiesDialog } from "./FootnotePropertiesDialog-
|
|
5
|
-
import { a as InsertImageDialog, i as InsertTableDialog, n as SplitCellDialog, o as HyperlinkDialog, r as PasteSpecialDialog, t as WatermarkDialog } from "./dialogs-
|
|
6
|
-
import { t as ImagePositionDialog } from "./ImagePositionDialog-
|
|
7
|
-
import { t as ImagePropertiesDialog } from "./ImagePropertiesDialog-
|
|
8
|
-
import { t as InsertSymbolDialog } from "./InsertSymbolDialog-
|
|
9
|
-
import { t as PageSetupDialog } from "./PageSetupDialog-
|
|
10
|
-
import { t as TablePropertiesDialog } from "./TablePropertiesDialog-
|
|
1
|
+
import { a as formatZoom, c as FormattingBar, i as clampZoom, l as ZoomControl, n as DocxEditor, o as parseZoom, r as ZOOM_PRESETS, s as useWheelZoom, t as renderAsync, u as AutocompleteCaretOverlay } from "./renderAsync-BtWYvQMT.js";
|
|
2
|
+
import { n as FolioUIProvider } from "./folio-ui-BgDDRsUX.js";
|
|
3
|
+
import { t as FindReplaceDialog } from "./FindReplaceDialog-CqKK82nE.js";
|
|
4
|
+
import { t as FootnotePropertiesDialog } from "./FootnotePropertiesDialog-CixRdIiT.js";
|
|
5
|
+
import { a as InsertImageDialog, i as InsertTableDialog, n as SplitCellDialog, o as HyperlinkDialog, r as PasteSpecialDialog, t as WatermarkDialog } from "./dialogs-Bj2PdycR.js";
|
|
6
|
+
import { t as ImagePositionDialog } from "./ImagePositionDialog-DNodkoI2.js";
|
|
7
|
+
import { t as ImagePropertiesDialog } from "./ImagePropertiesDialog-CLsDIUWb.js";
|
|
8
|
+
import { t as InsertSymbolDialog } from "./InsertSymbolDialog-DCFLmfzn.js";
|
|
9
|
+
import { t as PageSetupDialog } from "./PageSetupDialog-COkgeOQn.js";
|
|
10
|
+
import { t as TablePropertiesDialog } from "./TablePropertiesDialog-B_AGrPR8.js";
|
|
11
11
|
import { applyFolioAIEditOperations, createFolioAIEditSnapshot, diffWordSegments, hashFolioAIBlockText, normalizeFolioAIBlockText } from "@stll/folio-core/ai-edits";
|
|
12
12
|
import { insertImageFromFile, insertPageBreakInView, insertTableInView, insertTableOfContentsInView } from "@stll/folio-core/prosemirror";
|
|
13
13
|
import { createAICitationDecorationsPlugin, setAICitationsMeta, setActiveCitationMeta } from "@stll/folio-core/prosemirror/plugins/aiCitationDecorations";
|
|
@@ -3,7 +3,7 @@ import { EditorState, Plugin, Transaction } from "prosemirror-state";
|
|
|
3
3
|
import { EditorView } from "prosemirror-view";
|
|
4
4
|
import { XmlFragment } from "yjs";
|
|
5
5
|
import { FolioAIEditApplyMode, FolioAIEditApplyResult, FolioAIEditOperation, FolioAIEditSnapshot, FolioCommentAnchor, FolioReviewChange } from "@stll/folio-core/ai-edits";
|
|
6
|
-
import { FolioDocumentOperationBatch, FolioDocumentOperationResult } from "@stll/folio-core/server";
|
|
6
|
+
import { FolioDocumentOperationBatch, FolioDocumentOperationResult, FolioDocumentOperationUndoHandle, FolioDocumentOperationUndoResult } from "@stll/folio-core/server";
|
|
7
7
|
import { ContentControlFilter, SetContentControlContentInput, SetContentControlValueInput } from "@stll/folio-core/content-controls";
|
|
8
8
|
import { FolioEditor } from "@stll/folio-core/controller/folioEditor";
|
|
9
9
|
import { DocxCompatibility } from "@stll/folio-core/docx/compatibility";
|
|
@@ -758,7 +758,8 @@ type DocxEditorRef = {
|
|
|
758
758
|
focus?: boolean;
|
|
759
759
|
}) => void; /** Create the block snapshot that an external AI editor should reference. */
|
|
760
760
|
createAIEditSnapshot: () => FolioAIEditSnapshot | null; /** Apply a versioned document-operation batch against a previously created block snapshot. */
|
|
761
|
-
applyDocumentOperations: (options: DocxEditorApplyDocumentOperationsOptions) => FolioDocumentOperationResult; /**
|
|
761
|
+
applyDocumentOperations: (options: DocxEditorApplyDocumentOperationsOptions) => FolioDocumentOperationResult; /** Undo the latest unchanged document-operation batch. */
|
|
762
|
+
undoDocumentOperations: (undoHandle: FolioDocumentOperationUndoHandle) => FolioDocumentOperationUndoResult; /** Apply AI-authored operations against a previously created block snapshot. */
|
|
762
763
|
applyAIEditOperations: (options: {
|
|
763
764
|
snapshot: FolioAIEditSnapshot;
|
|
764
765
|
operations: FolioAIEditOperation[];
|