oasis-editor 0.0.10 → 0.0.12
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-B31W8Nmj.js → OasisEditorApp-DsSNl4Fj.js} +814 -116
- package/dist/app/controllers/EditorCommandsController.d.ts +4 -0
- package/dist/assets/{importDocxWorker-DbiKelzX.js → importDocxWorker-CtcRQ7NG.js} +1 -1
- package/dist/core/commands/builtinCommands.d.ts +1 -1
- package/dist/core/commands/image.d.ts +2 -0
- package/dist/core/commands/publicCommandTypes.d.ts +1 -0
- package/dist/core/commands/shape.d.ts +9 -0
- package/dist/core/document/imageCaptions.d.ts +13 -0
- package/dist/core/editorCommands.d.ts +1 -0
- package/dist/export/pdf/OasisPdfWriter.d.ts +30 -0
- package/dist/export/pdf/draw/drawBlockList.d.ts +2 -2
- package/dist/export/pdf/draw/drawTextBoxShape.d.ts +34 -0
- package/dist/i18n/locales/en.d.ts +11 -0
- package/dist/i18n/locales/pt-BR.d.ts +11 -0
- package/dist/{index--RsWcVrx.js → index-BUOuw27s.js} +524 -207
- package/dist/layoutProjection/presetGeometry.d.ts +31 -0
- package/dist/oasis-editor.js +54 -54
- package/dist/oasis-editor.umd.cjs +4 -4
- package/dist/plugins/internal/createEssentialsPlugin.d.ts +2 -0
- package/dist/ui/app/EditorDialogsLayer.d.ts +1 -0
- package/dist/ui/app/useEditorDialogs.d.ts +8 -0
- package/dist/ui/canvas/presetGeometry.d.ts +7 -0
- package/dist/ui/components/Dialogs/ImageCaptionDialog.d.ts +8 -0
- package/dist/ui/components/Menubar/builtinMenuIds.d.ts +1 -0
- package/dist/ui/components/Toolbar/presets/builtinToolbarIds.d.ts +1 -0
- package/package.json +1 -1
|
@@ -68,6 +68,7 @@ export interface EssentialsDocumentCapability {
|
|
|
68
68
|
exportPdf: () => void;
|
|
69
69
|
importDocument: () => void;
|
|
70
70
|
insertImage: () => void;
|
|
71
|
+
insertShape: (preset: string) => void;
|
|
71
72
|
}
|
|
72
73
|
export interface EssentialsLinkCapability {
|
|
73
74
|
prompt: () => void;
|
|
@@ -76,6 +77,7 @@ export interface EssentialsLinkCapability {
|
|
|
76
77
|
}
|
|
77
78
|
export interface EssentialsImageCapability {
|
|
78
79
|
promptAlt: () => void;
|
|
80
|
+
promptCaption: () => void;
|
|
79
81
|
isSelected: () => boolean;
|
|
80
82
|
}
|
|
81
83
|
export interface EssentialsBrowserCapability {
|
|
@@ -16,6 +16,7 @@ export interface EditorDialogsLayerProps {
|
|
|
16
16
|
focusInput: () => void;
|
|
17
17
|
applyLinkCommand: (href: string | null) => void;
|
|
18
18
|
applyImageAltCommand: (alt: string) => void;
|
|
19
|
+
applyImageCaptionCommand: (caption: string) => void;
|
|
19
20
|
applyFontDialogValues: ComponentProps<typeof FontDialog>["onApply"];
|
|
20
21
|
applyParagraphDialogValues: ComponentProps<typeof ParagraphDialog>["onApply"];
|
|
21
22
|
applyTablePropertiesDialogValues: ComponentProps<typeof TablePropertiesDialog>["onApply"];
|
|
@@ -19,6 +19,14 @@ export declare function createEditorDialogs(): {
|
|
|
19
19
|
isOpen: boolean;
|
|
20
20
|
initialAlt: string;
|
|
21
21
|
}>;
|
|
22
|
+
imageCaptionDialog: import('../../solid-js').Accessor<{
|
|
23
|
+
isOpen: boolean;
|
|
24
|
+
initialCaption: string;
|
|
25
|
+
}>;
|
|
26
|
+
setImageCaptionDialog: import('../../solid-js').Setter<{
|
|
27
|
+
isOpen: boolean;
|
|
28
|
+
initialCaption: string;
|
|
29
|
+
}>;
|
|
22
30
|
contextMenu: import('../../solid-js').Accessor<{
|
|
23
31
|
isOpen: boolean;
|
|
24
32
|
x: number;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds a canvas {@link Path2D} for a DrawingML preset shape from its
|
|
3
|
+
* backend-agnostic geometry (see
|
|
4
|
+
* {@link getPresetPathSegments}). Used to fill/stroke shapes and
|
|
5
|
+
* non-rectangular text boxes on the canvas.
|
|
6
|
+
*/
|
|
7
|
+
export declare function buildPresetPath(preset: string | undefined, x: number, y: number, width: number, height: number): Path2D;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface ImageCaptionDialogProps {
|
|
2
|
+
isOpen: boolean;
|
|
3
|
+
initialCaption: string;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
onConfirm: (caption: string) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function ImageCaptionDialog(props: ImageCaptionDialogProps): import("solid-js").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -15,6 +15,7 @@ export declare const OASIS_MENU_ITEMS: {
|
|
|
15
15
|
readonly viewParagraphMarks: "view_paragraph_marks";
|
|
16
16
|
readonly viewPreciseFonts: "view_precise_fonts";
|
|
17
17
|
readonly insertImage: "insert_image";
|
|
18
|
+
readonly insertImageCaption: "insert_image_caption";
|
|
18
19
|
readonly insertTable: "insert_table";
|
|
19
20
|
readonly insertLink: "insert_link";
|
|
20
21
|
readonly insertFootnote: "insert_footnote";
|
|
@@ -23,6 +23,7 @@ export declare const OASIS_TOOLBAR_ITEMS: {
|
|
|
23
23
|
readonly unlink: "editor-toolbar-unlink";
|
|
24
24
|
readonly footnote: "editor-toolbar-footnote";
|
|
25
25
|
readonly imageAlt: "editor-toolbar-image-alt";
|
|
26
|
+
readonly imageCaption: "editor-toolbar-image-caption";
|
|
26
27
|
readonly alignLeft: "editor-toolbar-align-left";
|
|
27
28
|
readonly alignCenter: "editor-toolbar-align-center";
|
|
28
29
|
readonly alignRight: "editor-toolbar-align-right";
|