oasis-editor 0.0.120 → 0.0.122
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/{OasisEditorApp-1pwk-3zw.js → OasisEditorApp-Dwc5ee9G.js} +1995 -920
- package/dist/adapters/vue.d.ts +5 -4
- package/dist/app/controllers/EditorCommandsController.d.ts +3 -1
- package/dist/app/controllers/tableOpsCellSpanCommands.d.ts +2 -1
- package/dist/app/controllers/tableOpsGuards.d.ts +2 -1
- package/dist/app/controllers/tableOpsRowColumnCommands.d.ts +2 -1
- package/dist/app/controllers/tableOpsSelectionAwareCommands.d.ts +2 -1
- package/dist/app/controllers/tableOpsSelectionRanges.d.ts +2 -1
- package/dist/app/controllers/useEditorClipboard.d.ts +3 -1
- package/dist/app/controllers/useEditorDocumentIO.d.ts +2 -1
- package/dist/app/controllers/useEditorHistoryActions.d.ts +3 -1
- package/dist/app/controllers/useEditorImageOperations.d.ts +7 -7
- package/dist/app/controllers/useEditorKeyboard.d.ts +2 -1
- package/dist/app/controllers/useEditorLayout.d.ts +4 -3
- package/dist/app/controllers/useEditorNavigation.d.ts +3 -1
- package/dist/app/controllers/useEditorRevision.d.ts +3 -1
- package/dist/app/controllers/useEditorStyle.d.ts +2 -1
- package/dist/app/controllers/useEditorSurfaceEvents.d.ts +3 -1
- package/dist/app/controllers/useEditorTableDrag.d.ts +7 -0
- package/dist/app/controllers/useEditorTableOperations.d.ts +3 -1
- package/dist/app/controllers/useEditorTextBoxOperations.d.ts +3 -1
- package/dist/app/controllers/useEditorTextDrag.d.ts +3 -1
- package/dist/app/controllers/useEditorTextInput.d.ts +3 -1
- package/dist/assets/{importDocxWorker-nIS-zjkj.js → importDocxWorker-A73eR_fM.js} +1 -1
- package/dist/core/model/types/styles.d.ts +2 -0
- package/dist/core/textStyle/textStyleKeys.d.ts +1 -1
- package/dist/i18n/locales/en.d.ts +42 -0
- package/dist/i18n/locales/pt-BR.d.ts +42 -0
- package/dist/{index-rlmjHSGT.js → index-YMlNF1Ya.js} +757 -466
- package/dist/oasis-editor.css +1 -1
- package/dist/oasis-editor.js +71 -71
- package/dist/oasis-editor.umd.cjs +4 -4
- package/dist/ui/OasisEditorApp.d.ts +2 -1
- package/dist/ui/OasisEditorAppLazy.d.ts +2 -1
- package/dist/ui/OasisEditorContainer.d.ts +2 -1
- package/dist/ui/app/EditorDialogsLayer.d.ts +3 -2
- package/dist/ui/app/EditorDragLayers.d.ts +2 -1
- package/dist/ui/app/EditorWorkspace.d.ts +2 -2
- package/dist/ui/app/createAppCommandsController.d.ts +2 -1
- package/dist/ui/app/createEditorChrome.d.ts +3 -1
- package/dist/ui/app/createEditorCommandRuntime.d.ts +2 -1
- package/dist/ui/app/createEditorDocumentRuntime.d.ts +2 -1
- package/dist/ui/app/createEditorEssentialsPlugin.d.ts +2 -1
- package/dist/ui/app/createEditorInteractionRuntime.d.ts +6 -7
- package/dist/ui/app/useEditorAppState.d.ts +2 -1
- package/dist/ui/app/useEditorContextMenuClipboard.d.ts +2 -1
- package/dist/ui/app/useEditorDialogs.d.ts +18 -16
- package/dist/ui/app/useEditorFocus.d.ts +7 -4
- package/dist/ui/app/useEditorFontOptions.d.ts +3 -1
- package/dist/ui/app/useEditorTransactions.d.ts +3 -1
- package/dist/ui/app/useEditorUiOptions.d.ts +3 -3
- package/dist/ui/app/useParagraphDialogBridge.d.ts +1 -0
- package/dist/ui/components/CanvasEditorSurface.d.ts +2 -1
- package/dist/ui/components/CaretOverlay.d.ts +3 -1
- package/dist/ui/components/CommentHighlightOverlay.d.ts +2 -2
- package/dist/ui/components/ContextMenu/ContextMenu.d.ts +2 -1
- package/dist/ui/components/Dialogs/FontDialog.d.ts +2 -1
- package/dist/ui/components/Dialogs/ImageAltDialog.d.ts +3 -1
- package/dist/ui/components/Dialogs/ImageCaptionDialog.d.ts +3 -1
- package/dist/ui/components/Dialogs/LineSpacingDialog.d.ts +3 -1
- package/dist/ui/components/Dialogs/LinkDialog.d.ts +3 -1
- package/dist/ui/components/Dialogs/ParagraphDialog.d.ts +25 -2
- package/dist/ui/components/Dialogs/TabStopsDialog.d.ts +10 -0
- package/dist/ui/components/Dialogs/TablePropertiesDialog.d.ts +2 -1
- package/dist/ui/components/Dialogs/TextInputDialog.d.ts +3 -1
- package/dist/ui/components/Dialogs/font-dialog/AdvancedFontTab.d.ts +2 -1
- package/dist/ui/components/Dialogs/font-dialog/FontPreview.d.ts +3 -1
- package/dist/ui/components/Dialogs/table-properties/AltTextTabPanel.d.ts +2 -1
- package/dist/ui/components/Dialogs/table-properties/CellTabPanel.d.ts +2 -1
- package/dist/ui/components/Dialogs/table-properties/ColumnTabPanel.d.ts +2 -1
- package/dist/ui/components/Dialogs/table-properties/RowTabPanel.d.ts +2 -1
- package/dist/ui/components/Dialogs/table-properties/TableTabPanel.d.ts +2 -1
- package/dist/ui/components/DropCaret.d.ts +2 -1
- package/dist/ui/components/FindReplace/FindReplaceDialog.d.ts +2 -1
- package/dist/ui/components/Menubar/Menubar.d.ts +2 -1
- package/dist/ui/components/Outline/OutlinePanel.d.ts +2 -1
- package/dist/ui/components/PageBreak.d.ts +3 -1
- package/dist/ui/components/RevisionOverlay.d.ts +2 -1
- package/dist/ui/components/Ruler/HorizontalRuler.d.ts +2 -2
- package/dist/ui/components/SelectionOverlay.d.ts +3 -1
- package/dist/ui/components/Toolbar/LineSpacingButton.d.ts +2 -1
- package/dist/ui/components/Toolbar/groups/MetricGroup.d.ts +2 -1
- package/dist/ui/components/Toolbar/groups/TableGroup.d.ts +2 -1
- package/dist/ui/components/Toolbar/ribbon/RibbonRow.d.ts +2 -1
- package/dist/ui/components/Toolbar/ribbon/RibbonTabs.d.ts +2 -2
- package/dist/ui/components/WelcomeOverlay.d.ts +3 -1
- package/dist/ui/overlays/ResizeHandlesOverlay.d.ts +2 -1
- package/dist/ui/shells/BalloonShell.d.ts +2 -1
- package/dist/ui/shells/DocumentShell.d.ts +2 -2
- package/dist/ui/shells/InlineShell.d.ts +2 -1
- package/dist/ui/toolbarStyleState.d.ts +9 -2
- package/dist/vue.d.ts +5 -4
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { OasisEditorAppProps } from './OasisEditorAppProps.js';
|
|
2
|
+
import { JSX } from 'solid-js';
|
|
2
3
|
|
|
3
4
|
export type { OasisEditorLoadingOptions, OasisEditorAppUiProps, OasisEditorAppDocumentProps, OasisEditorAppRuntimeProps, OasisEditorAppProps, ToolbarLayoutMode, ToolbarViewMode, } from './OasisEditorAppProps.js';
|
|
4
|
-
export declare function OasisEditorApp(props?: OasisEditorAppProps):
|
|
5
|
+
export declare function OasisEditorApp(props?: OasisEditorAppProps): JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { OasisEditorAppProps } from './OasisEditorAppProps.js';
|
|
2
|
+
import { JSX } from 'solid-js';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Code-splitting boundary for the editor. Loads `OasisEditorApp` (and the
|
|
@@ -13,4 +14,4 @@ import { OasisEditorAppProps } from './OasisEditorAppProps.js';
|
|
|
13
14
|
*
|
|
14
15
|
* Must not statically import anything that pulls the editor/font graph.
|
|
15
16
|
*/
|
|
16
|
-
export declare function OasisEditorAppLazy(props?: OasisEditorAppProps):
|
|
17
|
+
export declare function OasisEditorAppLazy(props?: OasisEditorAppProps): JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
1
2
|
import { OasisEditorAppProps } from './OasisEditorApp.js';
|
|
2
3
|
|
|
3
4
|
export interface OasisEditorContainerProps extends Omit<OasisEditorAppProps, "ui"> {
|
|
4
5
|
ui?: Omit<NonNullable<OasisEditorAppProps["ui"]>, "showChrome">;
|
|
5
6
|
}
|
|
6
|
-
export declare function OasisEditorContainer(props: OasisEditorContainerProps):
|
|
7
|
+
export declare function OasisEditorContainer(props: OasisEditorContainerProps): JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentProps } from 'solid-js';
|
|
1
|
+
import { ComponentProps, JSX } from 'solid-js';
|
|
2
2
|
import { FontDialog } from '../components/Dialogs/FontDialog.js';
|
|
3
3
|
import { ParagraphDialog } from '../components/Dialogs/ParagraphDialog.js';
|
|
4
4
|
import { TablePropertiesDialog } from '../components/Dialogs/TablePropertiesDialog.js';
|
|
@@ -19,6 +19,7 @@ export interface EditorDialogsLayerProps {
|
|
|
19
19
|
applyImageCaptionCommand: (caption: string) => void;
|
|
20
20
|
applyFontDialogValues: ComponentProps<typeof FontDialog>["onApply"];
|
|
21
21
|
applyParagraphDialogValues: ComponentProps<typeof ParagraphDialog>["onApply"];
|
|
22
|
+
setParagraphDialogDefault: NonNullable<ComponentProps<typeof ParagraphDialog>["onSetDefault"]>;
|
|
22
23
|
applyTablePropertiesDialogValues: ComponentProps<typeof TablePropertiesDialog>["onApply"];
|
|
23
24
|
closeContextMenu: () => void;
|
|
24
25
|
}
|
|
@@ -27,5 +28,5 @@ export interface EditorDialogsLayerProps {
|
|
|
27
28
|
* Holds no editor logic — it only binds dialog signals and command callbacks to
|
|
28
29
|
* their respective UI components.
|
|
29
30
|
*/
|
|
30
|
-
export declare function EditorDialogsLayer(props: EditorDialogsLayerProps):
|
|
31
|
+
export declare function EditorDialogsLayer(props: EditorDialogsLayerProps): JSX.Element;
|
|
31
32
|
export {};
|
|
@@ -4,6 +4,7 @@ import { createEditorImageOperations } from '../../app/controllers/useEditorImag
|
|
|
4
4
|
import { createEditorTableResize } from '../../app/controllers/useEditorTableResize.js';
|
|
5
5
|
import { createEditorTableDrag } from '../../app/controllers/useEditorTableDrag.js';
|
|
6
6
|
import { createEditorTextDrag } from '../../app/controllers/useEditorTextDrag.js';
|
|
7
|
+
import { JSX } from 'solid-js';
|
|
7
8
|
|
|
8
9
|
export interface EditorDragLayersProps {
|
|
9
10
|
state: EditorState;
|
|
@@ -21,4 +22,4 @@ export interface EditorDragLayersProps {
|
|
|
21
22
|
* the table resize guide, image/table drag ghosts and the various drop carets.
|
|
22
23
|
* Holds no editor logic — it only binds gesture controller state to DOM.
|
|
23
24
|
*/
|
|
24
|
-
export declare function EditorDragLayers(props: EditorDragLayersProps):
|
|
25
|
+
export declare function EditorDragLayers(props: EditorDragLayersProps): JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Accessor } from 'solid-js';
|
|
1
|
+
import { Accessor, JSX } from 'solid-js';
|
|
2
2
|
import { OasisEditorEditor, OasisEditorEditorFileHandlers, OasisEditorEditorInputHandlers, OasisEditorEditorLayoutProps, OasisEditorEditorOverlayProps, OasisEditorEditorRefProps, OasisEditorEditorSurfaceHandlers } from '../OasisEditorEditor.js';
|
|
3
3
|
import { ShellProps } from '../shells/DocumentShell.js';
|
|
4
4
|
import { ToolbarHost } from '../components/Toolbar/state/createToolbarApi.js';
|
|
@@ -54,4 +54,4 @@ export interface EditorWorkspaceProps {
|
|
|
54
54
|
* balloon chrome) and the bare canvas editor. Pure binding: it forwards the
|
|
55
55
|
* already-assembled view-prop bundles and runtime facade to the right surface.
|
|
56
56
|
*/
|
|
57
|
-
export declare function EditorWorkspace(props: EditorWorkspaceProps):
|
|
57
|
+
export declare function EditorWorkspace(props: EditorWorkspaceProps): JSX.Element;
|
|
@@ -39,7 +39,8 @@ export interface AppCommandsControllerDeps {
|
|
|
39
39
|
* `OasisEditorApp` so the composition root no longer maps these payload/dialog
|
|
40
40
|
* callbacks by hand (S1).
|
|
41
41
|
*/
|
|
42
|
-
export declare function createAppCommandsController(deps: AppCommandsControllerDeps):
|
|
42
|
+
export declare function createAppCommandsController(deps: AppCommandsControllerDeps): ReturnType<typeof createAppCommandsControllerImpl>;
|
|
43
|
+
declare function createAppCommandsControllerImpl(deps: AppCommandsControllerDeps): {
|
|
43
44
|
commandsController: {
|
|
44
45
|
applyBooleanStyleCommand: (key: BooleanStyleKey) => void;
|
|
45
46
|
applyValueStyleCommand: <K extends "styleId" | "fontFamily" | "fontSize" | "color" | "highlight" | "shading" | "language" | "textEffect" | "link" | "underlineStyle">(key: K, value: import('../../core/model.js').EditorTextStyle[K] | null) => void;
|
|
@@ -45,11 +45,13 @@ export interface EditorChromeDeps {
|
|
|
45
45
|
* `OasisEditorApp` so the composition root only creates and renders contexts
|
|
46
46
|
* instead of mapping every dialog/menu callback by hand (S1).
|
|
47
47
|
*/
|
|
48
|
-
export declare function createEditorChrome(deps: EditorChromeDeps):
|
|
48
|
+
export declare function createEditorChrome(deps: EditorChromeDeps): ReturnType<typeof createEditorChromeImpl>;
|
|
49
|
+
declare function createEditorChromeImpl(deps: EditorChromeDeps): {
|
|
49
50
|
computeFontFamilyOptions: () => string[];
|
|
50
51
|
computeFontSizeOptions: () => number[];
|
|
51
52
|
applyFontDialogValues: (values: import('../components/Dialogs/FontDialog.js').FontDialogApplyValues, original: FontDialogInitialValues) => void;
|
|
52
53
|
applyParagraphDialogValues: (values: import('../components/Dialogs/ParagraphDialog.js').ParagraphDialogApplyValues, original: ParagraphDialogInitialValues) => void;
|
|
54
|
+
setParagraphDialogDefault: (values: import('../components/Dialogs/ParagraphDialog.js').ParagraphDialogApplyValues) => void;
|
|
53
55
|
applyTablePropertiesDialogValues: (values: import('../components/Dialogs/TablePropertiesDialog.js').TablePropertiesDialogApplyValues) => void;
|
|
54
56
|
buildContextMenuItems: () => import('../components/ContextMenu/ContextMenu.jsx').ContextMenuItem[];
|
|
55
57
|
handleEditorContextMenu: (event: MouseEvent) => void;
|
|
@@ -54,7 +54,8 @@ export interface EditorCommandRuntimeDeps {
|
|
|
54
54
|
* earlier phases through their returned bags. Extracted from `OasisEditorApp`
|
|
55
55
|
* (S1).
|
|
56
56
|
*/
|
|
57
|
-
export declare function createEditorCommandRuntime(deps: EditorCommandRuntimeDeps):
|
|
57
|
+
export declare function createEditorCommandRuntime(deps: EditorCommandRuntimeDeps): ReturnType<typeof createEditorCommandRuntimeImpl>;
|
|
58
|
+
declare function createEditorCommandRuntimeImpl(deps: EditorCommandRuntimeDeps): {
|
|
58
59
|
commandsController: {
|
|
59
60
|
applyBooleanStyleCommand: (key: BooleanStyleKey) => void;
|
|
60
61
|
applyValueStyleCommand: <K extends "styleId" | "fontFamily" | "fontSize" | "color" | "highlight" | "shading" | "language" | "textEffect" | "link" | "underlineStyle">(key: K, value: import('../../core/model.js').EditorTextStyle[K] | null) => void;
|
|
@@ -38,7 +38,8 @@ export interface EditorDocumentRuntimeDeps {
|
|
|
38
38
|
* creation order, so every signal/effect stays bound exactly as before.
|
|
39
39
|
* Extracted from `OasisEditorApp` (S1).
|
|
40
40
|
*/
|
|
41
|
-
export declare function createEditorDocumentRuntime(deps: EditorDocumentRuntimeDeps):
|
|
41
|
+
export declare function createEditorDocumentRuntime(deps: EditorDocumentRuntimeDeps): ReturnType<typeof createEditorDocumentRuntimeImpl>;
|
|
42
|
+
declare function createEditorDocumentRuntimeImpl(deps: EditorDocumentRuntimeDeps): {
|
|
42
43
|
docIO: {
|
|
43
44
|
importProgress: import('solid-js').Accessor<import('../../app/controllers/useEditorDocumentIO.js').ImportProgressState | null>;
|
|
44
45
|
handleImportFile: (file: File | null) => Promise<void>;
|
|
@@ -5,6 +5,7 @@ import { createEditorCommandsController } from '../../app/controllers/EditorComm
|
|
|
5
5
|
import { createEditorHistoryActions } from '../../app/controllers/useEditorHistoryActions.js';
|
|
6
6
|
import { createEditorStyleController } from '../../app/controllers/useEditorStyle.js';
|
|
7
7
|
import { createEditorTableOperations } from '../../app/controllers/useEditorTableOperations.js';
|
|
8
|
+
import { OasisPlugin } from '../../core/plugin.js';
|
|
8
9
|
|
|
9
10
|
interface CreateEditorEssentialsPluginOptions {
|
|
10
11
|
state: () => EditorState;
|
|
@@ -39,5 +40,5 @@ interface CreateEditorEssentialsPluginOptions {
|
|
|
39
40
|
setIsOpen: (open: boolean) => void;
|
|
40
41
|
};
|
|
41
42
|
}
|
|
42
|
-
export declare function createEditorEssentialsRuntimePlugin(options: CreateEditorEssentialsPluginOptions):
|
|
43
|
+
export declare function createEditorEssentialsRuntimePlugin(options: CreateEditorEssentialsPluginOptions): OasisPlugin;
|
|
43
44
|
export {};
|
|
@@ -2,6 +2,7 @@ import { EditorPosition, EditorState } from '../../core/model.js';
|
|
|
2
2
|
import { EditorLogger } from '../../utils/logger.js';
|
|
3
3
|
import { createEditorCommandsController } from '../../app/controllers/EditorCommandsController.js';
|
|
4
4
|
import { createEditorDocumentRuntime } from './createEditorDocumentRuntime.js';
|
|
5
|
+
import { SelectedObjectRun } from '../../core/commands/selectedObjectRun.js';
|
|
5
6
|
|
|
6
7
|
type DocRuntime = ReturnType<typeof createEditorDocumentRuntime>;
|
|
7
8
|
type CommandsController = ReturnType<typeof createEditorCommandsController>;
|
|
@@ -41,9 +42,10 @@ export interface EditorInteractionRuntimeDeps {
|
|
|
41
42
|
* order. The only forward cross-phase edge — style controller -> commands — is
|
|
42
43
|
* read lazily via getCommandsController. Extracted from `OasisEditorApp` (S1).
|
|
43
44
|
*/
|
|
44
|
-
export declare function createEditorInteractionRuntime(deps: EditorInteractionRuntimeDeps):
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
export declare function createEditorInteractionRuntime(deps: EditorInteractionRuntimeDeps): ReturnType<typeof createEditorInteractionRuntimeImpl>;
|
|
46
|
+
declare function createEditorInteractionRuntimeImpl(deps: EditorInteractionRuntimeDeps): {
|
|
47
|
+
selectedImageRun: () => SelectedObjectRun | null;
|
|
48
|
+
selectedTextBoxRun: () => SelectedObjectRun | null;
|
|
47
49
|
layoutOptionsOverlay: import('../editorUiTypes.js').LayoutOptionsOverlay;
|
|
48
50
|
fr: import('../../app/controllers/useEditorFindReplace.js').UseEditorFindReplaceResult;
|
|
49
51
|
resolveSurfaceHitAtPoint: (clientX: number, clientY: number, context?: {
|
|
@@ -95,10 +97,7 @@ export declare function createEditorInteractionRuntime(deps: EditorInteractionRu
|
|
|
95
97
|
dropTargetPos: import('solid-js').Accessor<EditorPosition | null>;
|
|
96
98
|
getSelectedImageInfo: (current: EditorState) => {
|
|
97
99
|
paragraph: import('../../core/model.js').EditorParagraphNode;
|
|
98
|
-
run: import('../../core/model.js').
|
|
99
|
-
kind: "image";
|
|
100
|
-
image: import('../../core/model.js').EditorImageRunData;
|
|
101
|
-
};
|
|
100
|
+
run: import('../../core/model.js').RunOfKind<"image">;
|
|
102
101
|
startOffset: number;
|
|
103
102
|
width: number;
|
|
104
103
|
height: number;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Setter } from 'solid-js';
|
|
1
2
|
import { EditorDocument, EditorState } from '../../core/model.js';
|
|
2
3
|
|
|
3
4
|
export declare function createEditorAppState(options: {
|
|
@@ -5,7 +6,7 @@ export declare function createEditorAppState(options: {
|
|
|
5
6
|
initialState?: EditorState;
|
|
6
7
|
}): {
|
|
7
8
|
state: EditorState;
|
|
8
|
-
setStateSignal:
|
|
9
|
+
setStateSignal: Setter<EditorState>;
|
|
9
10
|
commitState: (next: EditorState) => void;
|
|
10
11
|
getStateSnapshot: () => EditorState;
|
|
11
12
|
};
|
|
@@ -49,7 +49,8 @@ export interface EditorTableContextMenuActions {
|
|
|
49
49
|
insertRowAfter: () => void;
|
|
50
50
|
deleteRow: () => void;
|
|
51
51
|
}
|
|
52
|
-
export declare function createEditorContextMenuClipboard(deps: EditorContextMenuClipboardDeps):
|
|
52
|
+
export declare function createEditorContextMenuClipboard(deps: EditorContextMenuClipboardDeps): ReturnType<typeof createEditorContextMenuClipboardImpl>;
|
|
53
|
+
declare function createEditorContextMenuClipboardImpl(deps: EditorContextMenuClipboardDeps): {
|
|
53
54
|
buildContextMenuItems: () => ContextMenuItem[];
|
|
54
55
|
closeContextMenu: () => void;
|
|
55
56
|
handleEditorContextMenu: (event: MouseEvent) => void;
|
|
@@ -1,64 +1,66 @@
|
|
|
1
|
+
import { Accessor, Setter } from 'solid-js';
|
|
1
2
|
import { FontDialogInitialValues } from '../components/Dialogs/FontDialog.js';
|
|
2
3
|
import { ParagraphDialogInitialValues } from '../components/Dialogs/ParagraphDialog.js';
|
|
3
4
|
import { TablePropertiesDialogInitialValues } from '../components/Dialogs/TablePropertiesDialog.js';
|
|
4
5
|
|
|
5
|
-
export
|
|
6
|
-
linkDialog:
|
|
6
|
+
export interface EditorDialogsState {
|
|
7
|
+
linkDialog: Accessor<{
|
|
7
8
|
isOpen: boolean;
|
|
8
9
|
initialHref: string;
|
|
9
10
|
}>;
|
|
10
|
-
setLinkDialog:
|
|
11
|
+
setLinkDialog: Setter<{
|
|
11
12
|
isOpen: boolean;
|
|
12
13
|
initialHref: string;
|
|
13
14
|
}>;
|
|
14
|
-
imageAltDialog:
|
|
15
|
+
imageAltDialog: Accessor<{
|
|
15
16
|
isOpen: boolean;
|
|
16
17
|
initialAlt: string;
|
|
17
18
|
}>;
|
|
18
|
-
setImageAltDialog:
|
|
19
|
+
setImageAltDialog: Setter<{
|
|
19
20
|
isOpen: boolean;
|
|
20
21
|
initialAlt: string;
|
|
21
22
|
}>;
|
|
22
|
-
imageCaptionDialog:
|
|
23
|
+
imageCaptionDialog: Accessor<{
|
|
23
24
|
isOpen: boolean;
|
|
24
25
|
initialCaption: string;
|
|
25
26
|
}>;
|
|
26
|
-
setImageCaptionDialog:
|
|
27
|
+
setImageCaptionDialog: Setter<{
|
|
27
28
|
isOpen: boolean;
|
|
28
29
|
initialCaption: string;
|
|
29
30
|
}>;
|
|
30
|
-
contextMenu:
|
|
31
|
+
contextMenu: Accessor<{
|
|
31
32
|
isOpen: boolean;
|
|
32
33
|
x: number;
|
|
33
34
|
y: number;
|
|
34
35
|
}>;
|
|
35
|
-
setContextMenu:
|
|
36
|
+
setContextMenu: Setter<{
|
|
36
37
|
isOpen: boolean;
|
|
37
38
|
x: number;
|
|
38
39
|
y: number;
|
|
39
40
|
}>;
|
|
40
|
-
fontDialog:
|
|
41
|
+
fontDialog: Accessor<{
|
|
41
42
|
isOpen: boolean;
|
|
42
43
|
initial: FontDialogInitialValues;
|
|
43
44
|
}>;
|
|
44
|
-
setFontDialog:
|
|
45
|
+
setFontDialog: Setter<{
|
|
45
46
|
isOpen: boolean;
|
|
46
47
|
initial: FontDialogInitialValues;
|
|
47
48
|
}>;
|
|
48
|
-
paragraphDialog:
|
|
49
|
+
paragraphDialog: Accessor<{
|
|
49
50
|
isOpen: boolean;
|
|
50
51
|
initial: ParagraphDialogInitialValues;
|
|
51
52
|
}>;
|
|
52
|
-
setParagraphDialog:
|
|
53
|
+
setParagraphDialog: Setter<{
|
|
53
54
|
isOpen: boolean;
|
|
54
55
|
initial: ParagraphDialogInitialValues;
|
|
55
56
|
}>;
|
|
56
|
-
tablePropertiesDialog:
|
|
57
|
+
tablePropertiesDialog: Accessor<{
|
|
57
58
|
isOpen: boolean;
|
|
58
59
|
initial: TablePropertiesDialogInitialValues;
|
|
59
60
|
}>;
|
|
60
|
-
setTablePropertiesDialog:
|
|
61
|
+
setTablePropertiesDialog: Setter<{
|
|
61
62
|
isOpen: boolean;
|
|
62
63
|
initial: TablePropertiesDialogInitialValues;
|
|
63
64
|
}>;
|
|
64
|
-
}
|
|
65
|
+
}
|
|
66
|
+
export declare function createEditorDialogs(): EditorDialogsState;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { Accessor, Setter } from 'solid-js';
|
|
2
|
+
|
|
3
|
+
export interface EditorFocusController {
|
|
4
|
+
focused: Accessor<boolean>;
|
|
5
|
+
setFocused: Setter<boolean>;
|
|
4
6
|
focusInput: () => void;
|
|
5
7
|
focusInputAfterPointerSelection: () => void;
|
|
6
8
|
viewportRef: HTMLDivElement | undefined;
|
|
@@ -8,4 +10,5 @@ export declare function createEditorFocusController(): {
|
|
|
8
10
|
textareaRef: HTMLTextAreaElement | undefined;
|
|
9
11
|
importInputRef: HTMLInputElement | undefined;
|
|
10
12
|
imageInputRef: HTMLInputElement | undefined;
|
|
11
|
-
}
|
|
13
|
+
}
|
|
14
|
+
export declare function createEditorFocusController(): EditorFocusController;
|
|
@@ -10,8 +10,10 @@ export interface EditorFontOptionsContext {
|
|
|
10
10
|
* dialog, including the lazily-loaded local font catalogue. Keeps the local-font
|
|
11
11
|
* permission probe and its cache signal out of the composition root.
|
|
12
12
|
*/
|
|
13
|
-
export declare function createEditorFontOptions(ctx: EditorFontOptionsContext):
|
|
13
|
+
export declare function createEditorFontOptions(ctx: EditorFontOptionsContext): ReturnType<typeof createEditorFontOptionsImpl>;
|
|
14
|
+
declare function createEditorFontOptionsImpl(ctx: EditorFontOptionsContext): {
|
|
14
15
|
computeFontFamilyOptions: () => string[];
|
|
15
16
|
computeFontSizeOptions: () => number[];
|
|
16
17
|
loadLocalFontFamilyOptions: () => Promise<void>;
|
|
17
18
|
};
|
|
19
|
+
export {};
|
|
@@ -8,7 +8,8 @@ export interface EditorTransactionsContext {
|
|
|
8
8
|
cloneState: (state: EditorState) => EditorState;
|
|
9
9
|
applyLayoutInvalidation: (invalidation: LayoutInvalidation) => void;
|
|
10
10
|
}
|
|
11
|
-
export declare function useEditorTransactions(ctx: EditorTransactionsContext):
|
|
11
|
+
export declare function useEditorTransactions(ctx: EditorTransactionsContext): ReturnType<typeof useEditorTransactionsImpl>;
|
|
12
|
+
declare function useEditorTransactionsImpl(ctx: EditorTransactionsContext): {
|
|
12
13
|
undoStack: import('solid-js').Accessor<EditorState[]>;
|
|
13
14
|
redoStack: import('solid-js').Accessor<EditorState[]>;
|
|
14
15
|
applyTransactionalState: (producer: (current: EditorState) => EditorState, options?: EditorTransactionOptions) => void;
|
|
@@ -18,3 +19,4 @@ export declare function useEditorTransactions(ctx: EditorTransactionsContext): {
|
|
|
18
19
|
getHistoryState: () => EditorHistoryState;
|
|
19
20
|
clearHistory: () => void;
|
|
20
21
|
};
|
|
22
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InlineShell } from '../shells/InlineShell.js';
|
|
2
|
-
import { OasisEditorAppDocumentProps, OasisEditorAppUiProps, OasisEditorLoadingOptions } from '../OasisEditorAppProps.js';
|
|
2
|
+
import { OasisEditorAppDocumentProps, OasisEditorAppUiProps, OasisEditorLoadingOptions, ToolbarViewMode, ToolbarLayoutMode } from '../OasisEditorAppProps.js';
|
|
3
3
|
|
|
4
4
|
export interface EditorUiOptionsContext {
|
|
5
5
|
ui: () => OasisEditorAppUiProps;
|
|
@@ -15,8 +15,8 @@ export declare function createEditorUiOptions(ctx: EditorUiOptionsContext): {
|
|
|
15
15
|
showMenubar: () => boolean;
|
|
16
16
|
showToolbar: () => boolean;
|
|
17
17
|
showOutline: () => boolean;
|
|
18
|
-
toolbarView: () =>
|
|
19
|
-
toolbarLayout: () =>
|
|
18
|
+
toolbarView: () => ToolbarViewMode;
|
|
19
|
+
toolbarLayout: () => ToolbarLayoutMode;
|
|
20
20
|
isReadOnly: () => boolean;
|
|
21
21
|
useComposedShell: () => boolean;
|
|
22
22
|
loadingOptions: () => OasisEditorLoadingOptions | undefined;
|
|
@@ -26,5 +26,6 @@ export interface ParagraphDialogBridgeDeps {
|
|
|
26
26
|
export declare function createParagraphDialogBridge(deps: ParagraphDialogBridgeDeps): {
|
|
27
27
|
openParagraphDialog: () => void;
|
|
28
28
|
applyParagraphDialogValues: (values: ParagraphDialogApplyValues, original: ParagraphDialogInitialValues) => void;
|
|
29
|
+
setParagraphDialogDefault: (values: ParagraphDialogApplyValues) => void;
|
|
29
30
|
};
|
|
30
31
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EditorSurfaceProps } from '../editorUiTypes.js';
|
|
2
|
+
import { JSX } from 'solid-js';
|
|
2
3
|
|
|
3
4
|
export { resolveCanvasTextRenderMetrics } from '../canvas/canvasParagraphPainter.js';
|
|
4
5
|
export { resolveCanvasFooterZoneTop } from '../canvas/canvasPageRenderer.js';
|
|
5
|
-
export declare function CanvasEditorSurface(props: EditorSurfaceProps):
|
|
6
|
+
export declare function CanvasEditorSurface(props: EditorSurfaceProps): JSX.Element;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
|
|
1
3
|
interface CaretOverlayProps {
|
|
2
4
|
active: boolean;
|
|
3
5
|
left: number;
|
|
@@ -5,5 +7,5 @@ interface CaretOverlayProps {
|
|
|
5
7
|
height: number;
|
|
6
8
|
fixed?: boolean;
|
|
7
9
|
}
|
|
8
|
-
export declare function CaretOverlay(props: CaretOverlayProps):
|
|
10
|
+
export declare function CaretOverlay(props: CaretOverlayProps): JSX.Element;
|
|
9
11
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Accessor } from 'solid-js';
|
|
1
|
+
import { Accessor, JSX } from 'solid-js';
|
|
2
2
|
import { EditorComment } from '../../core/model.js';
|
|
3
3
|
import { CommentHighlightBox } from '../editorUiTypes.js';
|
|
4
4
|
|
|
@@ -13,4 +13,4 @@ export interface CommentHighlightOverlayProps {
|
|
|
13
13
|
* track-changes `RevisionOverlay`). Hit-testing happens on the overlay divs
|
|
14
14
|
* themselves (`pointer-events: auto`), so no canvas hit-test plumbing is needed.
|
|
15
15
|
*/
|
|
16
|
-
export declare function CommentHighlightOverlay(props: CommentHighlightOverlayProps):
|
|
16
|
+
export declare function CommentHighlightOverlay(props: CommentHighlightOverlayProps): JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
1
2
|
|
|
2
3
|
export interface ContextMenuItem {
|
|
3
4
|
id: string;
|
|
@@ -16,4 +17,4 @@ export interface ContextMenuProps {
|
|
|
16
17
|
items: ContextMenuItem[];
|
|
17
18
|
onClose: () => void;
|
|
18
19
|
}
|
|
19
|
-
export declare function ContextMenu(props: ContextMenuProps):
|
|
20
|
+
export declare function ContextMenu(props: ContextMenuProps): JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
1
2
|
import { FontDialogProps } from './font-dialog/FontDialogTypes.js';
|
|
2
3
|
|
|
3
4
|
export type { FontDialogInitialValues, FontDialogApplyValues, FontDialogProps, } from './font-dialog/FontDialogTypes.js';
|
|
4
|
-
export declare function FontDialog(props: FontDialogProps):
|
|
5
|
+
export declare function FontDialog(props: FontDialogProps): JSX.Element;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
|
|
1
3
|
interface ImageAltDialogProps {
|
|
2
4
|
isOpen: boolean;
|
|
3
5
|
initialAlt: string;
|
|
4
6
|
onClose: () => void;
|
|
5
7
|
onConfirm: (alt: string) => void;
|
|
6
8
|
}
|
|
7
|
-
export declare function ImageAltDialog(props: ImageAltDialogProps):
|
|
9
|
+
export declare function ImageAltDialog(props: ImageAltDialogProps): JSX.Element;
|
|
8
10
|
export {};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
|
|
1
3
|
interface ImageCaptionDialogProps {
|
|
2
4
|
isOpen: boolean;
|
|
3
5
|
initialCaption: string;
|
|
4
6
|
onClose: () => void;
|
|
5
7
|
onConfirm: (caption: string) => void;
|
|
6
8
|
}
|
|
7
|
-
export declare function ImageCaptionDialog(props: ImageCaptionDialogProps):
|
|
9
|
+
export declare function ImageCaptionDialog(props: ImageCaptionDialogProps): JSX.Element;
|
|
8
10
|
export {};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
|
|
1
3
|
export interface LineSpacingDialogInitialValues {
|
|
2
4
|
lineHeight: string;
|
|
3
5
|
spacingBefore: string;
|
|
@@ -14,4 +16,4 @@ export interface LineSpacingDialogProps {
|
|
|
14
16
|
onClose: () => void;
|
|
15
17
|
onApply: (values: LineSpacingDialogApplyValues, original: LineSpacingDialogInitialValues) => void;
|
|
16
18
|
}
|
|
17
|
-
export declare function LineSpacingDialog(props: LineSpacingDialogProps):
|
|
19
|
+
export declare function LineSpacingDialog(props: LineSpacingDialogProps): JSX.Element;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
|
|
1
3
|
interface LinkDialogProps {
|
|
2
4
|
isOpen: boolean;
|
|
3
5
|
initialHref: string;
|
|
4
6
|
onClose: () => void;
|
|
5
7
|
onConfirm: (href: string) => void;
|
|
6
8
|
}
|
|
7
|
-
export declare function LinkDialog(props: LinkDialogProps):
|
|
9
|
+
export declare function LinkDialog(props: LinkDialogProps): JSX.Element;
|
|
8
10
|
export {};
|
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
import { EditorBorderStyle, EditorParagraphStyle, EditorTabStop } from '../../../core/model.js';
|
|
2
3
|
|
|
4
|
+
type LineRuleValue = "auto" | "exact" | "atLeast" | null;
|
|
3
5
|
export interface ParagraphDialogInitialValues {
|
|
4
6
|
align: string;
|
|
5
7
|
indentLeft: string;
|
|
6
8
|
indentRight: string;
|
|
7
9
|
indentFirstLine: string;
|
|
8
10
|
indentHanging: string;
|
|
11
|
+
mirrorIndents: boolean;
|
|
9
12
|
spacingBefore: string;
|
|
10
13
|
spacingAfter: string;
|
|
11
14
|
lineHeight: string;
|
|
15
|
+
lineRule: string;
|
|
16
|
+
contextualSpacing: boolean;
|
|
17
|
+
outlineLevel: string;
|
|
12
18
|
shading: string;
|
|
13
19
|
borderStyle: string;
|
|
14
20
|
borderWidth: string;
|
|
@@ -17,6 +23,11 @@ export interface ParagraphDialogInitialValues {
|
|
|
17
23
|
borderSideRight: boolean;
|
|
18
24
|
borderSideBottom: boolean;
|
|
19
25
|
borderSideLeft: boolean;
|
|
26
|
+
pageBreakBefore: boolean;
|
|
27
|
+
keepWithNext: boolean;
|
|
28
|
+
keepLinesTogether: boolean;
|
|
29
|
+
widowControl: boolean;
|
|
30
|
+
tabs: EditorTabStop[];
|
|
20
31
|
}
|
|
21
32
|
export interface ParagraphDialogBorders {
|
|
22
33
|
top: EditorBorderStyle | null;
|
|
@@ -30,20 +41,32 @@ export interface ParagraphDialogApplyValues {
|
|
|
30
41
|
indentRight: number | null;
|
|
31
42
|
indentFirstLine: number | null;
|
|
32
43
|
indentHanging: number | null;
|
|
44
|
+
mirrorIndents: boolean;
|
|
33
45
|
spacingBefore: number | null;
|
|
34
46
|
spacingAfter: number | null;
|
|
35
47
|
lineHeight: number | null;
|
|
48
|
+
lineRule: LineRuleValue;
|
|
49
|
+
contextualSpacing: boolean;
|
|
50
|
+
outlineLevel: number | null;
|
|
36
51
|
shading: string | null;
|
|
37
52
|
/**
|
|
38
53
|
* Per-edge paragraph borders. The dialog edits one shared style/width/color
|
|
39
54
|
* and toggles which edges carry it; each edge is the shared border or `null`.
|
|
40
55
|
*/
|
|
41
56
|
borders: ParagraphDialogBorders;
|
|
57
|
+
pageBreakBefore: boolean;
|
|
58
|
+
keepWithNext: boolean;
|
|
59
|
+
keepLinesTogether: boolean;
|
|
60
|
+
widowControl: boolean;
|
|
61
|
+
tabs: EditorTabStop[];
|
|
42
62
|
}
|
|
43
63
|
export interface ParagraphDialogProps {
|
|
44
64
|
isOpen: boolean;
|
|
45
65
|
initial: ParagraphDialogInitialValues;
|
|
46
66
|
onClose: () => void;
|
|
47
67
|
onApply: (values: ParagraphDialogApplyValues, original: ParagraphDialogInitialValues) => void;
|
|
68
|
+
/** Persist the current values onto the default paragraph style. */
|
|
69
|
+
onSetDefault?: (values: ParagraphDialogApplyValues) => void;
|
|
48
70
|
}
|
|
49
|
-
export declare function ParagraphDialog(props: ParagraphDialogProps):
|
|
71
|
+
export declare function ParagraphDialog(props: ParagraphDialogProps): JSX.Element;
|
|
72
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
import { EditorTabStop } from '../../../core/model.js';
|
|
3
|
+
|
|
4
|
+
export interface TabStopsDialogProps {
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
initial: EditorTabStop[];
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
onApply: (tabs: EditorTabStop[]) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function TabStopsDialog(props: TabStopsDialogProps): JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
1
2
|
import { TablePropertiesDialogProps } from './table-properties/TablePropertiesTypes.js';
|
|
2
3
|
|
|
3
4
|
export type { TablePropertiesDialogInitialValues, TablePropertiesDialogBorders, TablePropertiesDialogApplyValues, TablePropertiesDialogProps, } from './table-properties/TablePropertiesTypes.js';
|
|
4
|
-
export declare function TablePropertiesDialog(props: TablePropertiesDialogProps):
|
|
5
|
+
export declare function TablePropertiesDialog(props: TablePropertiesDialogProps): JSX.Element;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
|
|
1
3
|
export interface TextInputDialogProps {
|
|
2
4
|
isOpen: boolean;
|
|
3
5
|
title: string;
|
|
@@ -13,4 +15,4 @@ export interface TextInputDialogProps {
|
|
|
13
15
|
confirm?: string;
|
|
14
16
|
};
|
|
15
17
|
}
|
|
16
|
-
export declare function TextInputDialog(props: TextInputDialogProps):
|
|
18
|
+
export declare function TextInputDialog(props: TextInputDialogProps): JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
1
2
|
import { FontDialogController } from './FontDialogController.js';
|
|
2
3
|
|
|
3
4
|
export interface AdvancedFontTabProps {
|
|
4
5
|
ctrl: FontDialogController;
|
|
5
6
|
}
|
|
6
|
-
export declare function AdvancedFontTab(props: AdvancedFontTabProps):
|
|
7
|
+
export declare function AdvancedFontTab(props: AdvancedFontTabProps): JSX.Element;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
|
|
1
3
|
export interface FontPreviewProps {
|
|
2
4
|
class?: string;
|
|
3
5
|
testId: string;
|
|
4
6
|
style: Record<string, string | number | undefined>;
|
|
5
7
|
}
|
|
6
|
-
export declare function FontPreview(props: FontPreviewProps):
|
|
8
|
+
export declare function FontPreview(props: FontPreviewProps): JSX.Element;
|