superdoc 2.28.0 → 2.29.0-next.13
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/chunks/{FindReplaceSurface-Dm043CZP.es.js → FindReplaceSurface-BKVHzhQ4.es.js} +34 -26
- package/dist/chunks/{FindReplaceSurface-BRs3JrCq.cjs → FindReplaceSurface-BNDrJ6VS.cjs} +34 -26
- package/dist/chunks/{PasswordPromptSurface-DGjmN7A-.es.js → PasswordPromptSurface-6mF6Azda.es.js} +6 -4
- package/dist/chunks/{PasswordPromptSurface-BpqP4pUa.cjs → PasswordPromptSurface-BNkaztaP.cjs} +6 -4
- package/dist/chunks/{PdfViewer-Cg072l5d.cjs → PdfViewer-DmSkZehl.cjs} +72 -100
- package/dist/chunks/{PdfViewer-JHXZQZ9x.es.js → PdfViewer-aOWhUVI7.es.js} +69 -97
- package/dist/chunks/{constants-DpXuDx_g.cjs → constants-BeeNZoQp.cjs} +1 -1
- package/dist/chunks/{constants-B6VBlmKp.es.js → constants-BvNs_ybI.es.js} +1 -1
- package/dist/chunks/{create-super-doc-ui-BbjHD1ul.es.js → create-super-doc-ui-DdT4b29f.es.js} +200 -65
- package/dist/chunks/{create-super-doc-ui-BfgYblyI.cjs → create-super-doc-ui-_SbygYQ4.cjs} +227 -68
- package/dist/chunks/is-finite-number-BEXgTRgc.cjs +11 -0
- package/dist/chunks/is-finite-number-BpL4F38c.es.js +6 -0
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/document-api/src/capabilities/html-markdown-support.d.ts +4 -6
- package/dist/document-api/src/comments/comments.d.ts +2 -0
- package/dist/document-api/src/contract/metadata-types.d.ts +1 -1
- package/dist/document-api/src/contract/operation-definitions.d.ts +3 -3
- package/dist/document-api/src/contract/operation-registry.d.ts +10 -9
- package/dist/document-api/src/index.d.ts +8 -7
- package/dist/document-api/src/insert/insert.d.ts +2 -2
- package/dist/document-api/src/lists/lists.d.ts +79 -79
- package/dist/document-api/src/replace/replace.d.ts +3 -2
- package/dist/document-api/src/tables/tables.d.ts +2 -1
- package/dist/document-api/src/types/address.d.ts +3 -0
- package/dist/document-api/src/types/table-operations.types.d.ts +1 -0
- package/dist/document-api/src/types/temporary-mutation.d.ts +5 -1
- package/dist/document-api/src/write/write.d.ts +18 -11
- package/dist/layout-engine/contracts/src/index.d.ts +1 -1
- package/dist/layout-engine/contracts/src/paragraph-visible-text.d.ts +3 -1
- package/dist/layout-engine/painters/dom/src/page-content.d.ts +1 -1
- package/dist/layout-engine/painters/dom/src/persistent-page-surface.d.ts +2 -0
- package/dist/public/ui-react.cjs +1 -1
- package/dist/public/ui-react.es.js +1 -1
- package/dist/public/ui-vue.cjs +1 -1
- package/dist/public/ui-vue.es.js +1 -1
- package/dist/public/ui.cjs +1 -1
- package/dist/public/ui.es.js +1 -1
- package/dist/style.css +1 -1
- package/dist/style.layered.css +1 -1
- package/dist/superdoc/src/SuperDoc.vue.d.ts +137 -61
- package/dist/superdoc/src/components/CommentsLayer/CommentDialog.vue.d.ts +533 -48
- package/dist/superdoc/src/components/CommentsLayer/CommentHeader.vue.d.ts +107 -23
- package/dist/superdoc/src/components/CommentsLayer/CommentInput.vue.d.ts +74 -14
- package/dist/superdoc/src/components/CommentsLayer/CommentsDropdown.vue.d.ts +55 -20
- package/dist/superdoc/src/components/CommentsLayer/FloatingComments.vue.d.ts +21 -8
- package/dist/superdoc/src/components/CommentsLayer/InternalDropdown.vue.d.ts +24 -8
- package/dist/superdoc/src/components/CommentsLayer/PdfCommentsLayer.vue.d.ts +5 -3
- package/dist/superdoc/src/components/CommentsLayer/commentsList/ReviewDirectoryListItem.vue.d.ts +60 -12
- package/dist/superdoc/src/components/CommentsLayer/commentsList/commentsList.vue.d.ts +20 -6
- package/dist/superdoc/src/components/CommentsLayer/floating-comment-positioning.d.ts +24 -23
- package/dist/superdoc/src/components/CommentsLayer/tracked-change-threading.d.ts +0 -1
- package/dist/superdoc/src/components/CommentsLayer/use-comment.d.ts +29 -13
- package/dist/superdoc/src/components/PdfViewer/PdfViewer.vue.d.ts +132 -45
- package/dist/superdoc/src/components/PdfViewer/PdfViewerDocument.vue.d.ts +62 -16
- package/dist/superdoc/src/components/PdfViewer/PdfViewerPage.vue.d.ts +77 -17
- package/dist/superdoc/src/components/PdfViewer/pdf-viewer-types.d.ts +45 -0
- package/dist/superdoc/src/components/Whiteboard/WhiteboardLayer.vue.d.ts +81 -16
- package/dist/superdoc/src/components/Whiteboard/WhiteboardPage.vue.d.ts +49 -13
- package/dist/superdoc/src/components/Whiteboard/use-whiteboard.d.ts +30 -15
- package/dist/superdoc/src/components/Whiteboard/whiteboard-types.d.ts +11 -0
- package/dist/superdoc/src/components/general/Avatar.vue.d.ts +14 -0
- package/dist/superdoc/src/components/surfaces/FindReplaceSurface.vue.d.ts +58 -15
- package/dist/superdoc/src/components/surfaces/PasswordPromptSurface.vue.d.ts +58 -15
- package/dist/superdoc/src/components/surfaces/SurfaceDialog.vue.d.ts +27 -9
- package/dist/superdoc/src/components/surfaces/SurfaceExternalMount.vue.d.ts +53 -16
- package/dist/superdoc/src/components/surfaces/SurfaceFloating.vue.d.ts +14 -6
- package/dist/superdoc/src/components/surfaces/SurfaceHost.vue.d.ts +25 -15
- package/dist/superdoc/src/components/surfaces/focusable-selector.d.ts +1 -5
- package/dist/superdoc/src/components/surfaces/watermark-surface-runtime.d.ts +7 -7
- package/dist/superdoc/src/composables/find-shortcut-owner.d.ts +16 -9
- package/dist/superdoc/src/composables/replace-continuation.d.ts +11 -15
- package/dist/superdoc/src/composables/use-comment-small-screen.d.ts +11 -7
- package/dist/superdoc/src/composables/use-compact-comment-popover.d.ts +44 -18
- package/dist/superdoc/src/composables/use-document.d.ts +1210 -30
- package/dist/superdoc/src/composables/use-field.d.ts +88 -25
- package/dist/superdoc/src/composables/use-link-popover.d.ts +3 -3
- package/dist/superdoc/src/composables/use-password-prompt.d.ts +23 -24
- package/dist/superdoc/src/composables/use-superdoc-instance.d.ts +4 -1
- package/dist/superdoc/src/composables/use-viewport-fit.d.ts +40 -26
- package/dist/superdoc/src/composables/useUiFontFamily.d.ts +3 -11
- package/dist/superdoc/src/core/SuperDoc.d.ts +3 -8
- package/dist/superdoc/src/core/collaboration/collaboration-comments.d.ts +9 -4
- package/dist/superdoc/src/core/collaboration/helpers.d.ts +20 -3
- package/dist/superdoc/src/core/collaboration/permissions.d.ts +15 -9
- package/dist/superdoc/src/core/collaboration/resolve-v2-collaboration-target.d.ts +4 -3
- package/dist/superdoc/src/core/collaboration/v2-awareness-bridge.d.ts +2 -1
- package/dist/superdoc/src/core/config/merge-comments-config.d.ts +1 -5
- package/dist/superdoc/src/core/config/merge-defined.d.ts +3 -8
- package/dist/superdoc/src/core/config/normalize-hyperlinks-config.d.ts +7 -12
- package/dist/superdoc/src/core/config/normalize-surfaces-config.d.ts +9 -12
- package/dist/superdoc/src/core/config/normalize-ui-config.d.ts +1 -12
- package/dist/superdoc/src/core/create-app.d.ts +13 -24
- package/dist/superdoc/src/core/editor-runtime/conformance/fake-v2-runtime.d.ts +2 -1
- package/dist/superdoc/src/core/editor-runtime/editor-runtime-registry.d.ts +2 -1
- package/dist/superdoc/src/core/editor-runtime/index.d.ts +1 -1
- package/dist/superdoc/src/core/editor-runtime/types.d.ts +9 -1
- package/dist/superdoc/src/core/editor-runtime/v2/v2-editor-runtime-adapter.d.ts +2 -1
- package/dist/superdoc/src/core/editor-runtime/v2/v2-session-shortcut-routes.d.ts +1 -1
- package/dist/superdoc/src/core/helpers/export.d.ts +3 -2
- package/dist/superdoc/src/core/helpers/file.d.ts +8 -45
- package/dist/superdoc/src/core/helpers/normalize-track-changes-config.d.ts +6 -60
- package/dist/superdoc/src/core/pdf/helpers/constants.d.ts +2 -2
- package/dist/superdoc/src/core/pdf/helpers/floor.d.ts +1 -1
- package/dist/superdoc/src/core/pdf/helpers/range.d.ts +1 -1
- package/dist/superdoc/src/core/pdf/helpers/read-file.d.ts +1 -1
- package/dist/superdoc/src/core/pdf/pdf-adapter.d.ts +24 -61
- package/dist/superdoc/src/core/superdoc-ui-owner.d.ts +1 -1
- package/dist/superdoc/src/core/surface-manager.d.ts +21 -83
- package/dist/superdoc/src/core/types/index.d.ts +14 -23
- package/dist/superdoc/src/core/v2-integration/v2-integration.d.ts +10 -10
- package/dist/superdoc/src/core/whiteboard/Whiteboard.d.ts +22 -208
- package/dist/superdoc/src/core/whiteboard/WhiteboardPage.d.ts +163 -189
- package/dist/superdoc/src/core/whiteboard/helpers/createTextarea.d.ts +14 -1
- package/dist/superdoc/src/core/whiteboard/helpers/flattenPoints.d.ts +1 -1
- package/dist/superdoc/src/core/whiteboard/helpers/getRandomId.d.ts +1 -1
- package/dist/superdoc/src/helpers/comment-focus.d.ts +21 -4
- package/dist/superdoc/src/helpers/deprecation.d.ts +5 -11
- package/dist/superdoc/src/helpers/interaction-trace.d.ts +7 -24
- package/dist/superdoc/src/helpers/is-finite-number.d.ts +1 -0
- package/dist/superdoc/src/helpers/mark-raw-component.d.ts +1 -0
- package/dist/superdoc/src/helpers/object-guards.d.ts +1 -5
- package/dist/superdoc/src/helpers/selection-source.d.ts +1 -1
- package/dist/superdoc/src/helpers/use-selection.d.ts +35 -15
- package/dist/superdoc/src/helpers/v2-author-required-rejection.d.ts +8 -11
- package/dist/superdoc/src/helpers/v2-bulk-decision-event.d.ts +9 -7
- package/dist/superdoc/src/helpers/v2-keyboard-edit-rejection.d.ts +8 -7
- package/dist/superdoc/src/helpers/v2-mutation-exception.d.ts +12 -8
- package/dist/superdoc/src/helpers/v2-review-target.d.ts +11 -1
- package/dist/superdoc/src/helpers/v2-selection-sync.d.ts +40 -14
- package/dist/superdoc/src/helpers/v2-typing-mutation-event.d.ts +14 -5
- package/dist/superdoc/src/icons.d.ts +11 -11
- package/dist/superdoc/src/internal/diagnostics/diagnostic-dedupe.d.ts +7 -16
- package/dist/superdoc/src/internal/toolbar/built-in/AIWriter.vue.d.ts +77 -16
- package/dist/superdoc/src/internal/toolbar/built-in/AlignmentButtons.vue.d.ts +5 -3
- package/dist/superdoc/src/internal/toolbar/built-in/ButtonGroup.vue.d.ts +85 -5
- package/dist/superdoc/src/internal/toolbar/built-in/DocumentMode.vue.d.ts +20 -6
- package/dist/superdoc/src/internal/toolbar/built-in/FontFamilyCombobox.vue.d.ts +32 -8
- package/dist/superdoc/src/internal/toolbar/built-in/FontSizeCombobox.vue.d.ts +32 -8
- package/dist/superdoc/src/internal/toolbar/built-in/IconGrid.vue.d.ts +44 -12
- package/dist/superdoc/src/internal/toolbar/built-in/IconGridRow.vue.d.ts +32 -9
- package/dist/superdoc/src/internal/toolbar/built-in/LinkInput.vue.d.ts +181 -36
- package/dist/superdoc/src/internal/toolbar/built-in/LinkedStyle.vue.d.ts +39 -10
- package/dist/superdoc/src/internal/toolbar/built-in/PageNumberMenu.vue.d.ts +133 -22
- package/dist/superdoc/src/internal/toolbar/built-in/SdTooltip.vue.d.ts +62 -23
- package/dist/superdoc/src/internal/toolbar/built-in/StyleButtonsList.vue.d.ts +39 -10
- package/dist/superdoc/src/internal/toolbar/built-in/TableActions.vue.d.ts +24 -6
- package/dist/superdoc/src/internal/toolbar/built-in/TableGrid.vue.d.ts +7 -3
- package/dist/superdoc/src/internal/toolbar/built-in/Toolbar.vue.d.ts +9 -3
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarButton.vue.d.ts +101 -16
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarButtonIcon.vue.d.ts +31 -10
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarComboBox.vue.d.ts +80 -11
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarDropdown.vue.d.ts +113 -33
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarSeparator.vue.d.ts +16 -6
- package/dist/superdoc/src/internal/toolbar/built-in/color-dropdown-helpers.d.ts +10 -20
- package/dist/superdoc/src/internal/toolbar/built-in/constants.d.ts +12 -45
- package/dist/superdoc/src/internal/toolbar/built-in/default-items.d.ts +34 -17
- package/dist/superdoc/src/internal/toolbar/built-in/list-style-buttons.d.ts +2 -2
- package/dist/superdoc/src/internal/toolbar/built-in/toolbar-focus-helpers.d.ts +10 -2
- package/dist/superdoc/src/internal/toolbar/built-in/toolbarIcons.d.ts +67 -0
- package/dist/superdoc/src/internal/toolbar/built-in/toolbarTexts.d.ts +61 -61
- package/dist/superdoc/src/internal/toolbar/built-in/use-toolbar-item.d.ts +110 -49
- package/dist/superdoc/src/internal/toolbar/built-in-toolbar.d.ts +7 -27
- package/dist/superdoc/src/internal/toolbar/compatibility-catalog.d.ts +4 -3
- package/dist/superdoc/src/internal/toolbar/toolbar-item-aliases.d.ts +1 -1
- package/dist/superdoc/src/public/browser-document-api.d.ts +5 -4
- package/dist/superdoc/src/public/index.d.cts +26 -0
- package/dist/superdoc/src/public/index.d.ts +13 -0
- package/dist/superdoc/src/public/ui/commands.d.ts +14 -13
- package/dist/superdoc/src/public/ui/create-super-doc-ui.d.ts +1 -1
- package/dist/superdoc/src/public/ui/entity-at.d.ts +2 -1
- package/dist/superdoc/src/public/ui/format-painter-helpers.d.ts +2 -8
- package/dist/superdoc/src/public/ui/style-match-patch.d.ts +2 -2
- package/dist/superdoc/src/public/ui/types.d.ts +1 -1
- package/dist/superdoc/src/stores/comments-store.d.ts +372 -123
- package/dist/superdoc/src/stores/helpers/comment-draft-text.d.ts +1 -0
- package/dist/superdoc/src/stores/helpers/comment-grouping.d.ts +30 -0
- package/dist/superdoc/src/stores/helpers/comment-identity.d.ts +40 -0
- package/dist/superdoc/src/stores/helpers/floating-comment-instances.d.ts +48 -13
- package/dist/superdoc/src/stores/helpers/tracked-change-identity.d.ts +19 -0
- package/dist/superdoc/src/stores/helpers/tracked-change-row-values.d.ts +21 -0
- package/dist/superdoc/src/stores/helpers/tracked-change-thread-index.d.ts +21 -24
- package/dist/superdoc/src/stores/superdoc-store.d.ts +1117 -370
- package/dist/superdoc.cjs +1923 -2838
- package/dist/superdoc.es.js +1863 -2783
- package/dist-cdn/style.layered.css +1 -1
- package/dist-cdn/superdoc.min.css +1 -1
- package/dist-cdn/superdoc.min.js +42 -42
- package/package.json +2 -2
- package/dist/superdoc/src/internal/toolbar/built-in/OverflowMenu.vue.d.ts +0 -104
- package/dist/superdoc/src/internal/toolbar/index.d.ts +0 -10
- package/dist/superdoc/src/main.d.ts +0 -1
|
@@ -1,23 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
boxShadow: string;
|
|
8
|
-
borderRadius: string;
|
|
9
|
-
};
|
|
1
|
+
import { BuiltInToolbar, ToolbarItem } from '../built-in-toolbar.js';
|
|
2
|
+
type ColorOption = {
|
|
3
|
+
label: string;
|
|
4
|
+
icon: string;
|
|
5
|
+
value: string;
|
|
6
|
+
style: Record<string, string>;
|
|
10
7
|
};
|
|
11
|
-
|
|
8
|
+
type ColorDropdownToolbar = Pick<BuiltInToolbar, 'emitCommand' | 'superdoc' | 'activeEditor'>;
|
|
9
|
+
type ColorDropdownButton = Pick<ToolbarItem, 'name' | 'type' | 'command' | 'isCustomToolbarItem' | 'iconColor' | 'expand'>;
|
|
10
|
+
export declare const renderColorOptions: (superToolbar: ColorDropdownToolbar, button: ColorDropdownButton, customIcons?: ColorOption[][], hasNoneIcon?: boolean) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
12
11
|
[key: string]: any;
|
|
13
12
|
}>;
|
|
14
|
-
export
|
|
15
|
-
label: null;
|
|
16
|
-
icon: any;
|
|
17
|
-
value: any;
|
|
18
|
-
style: {
|
|
19
|
-
color: any;
|
|
20
|
-
boxShadow: string;
|
|
21
|
-
borderRadius: string;
|
|
22
|
-
};
|
|
23
|
-
}[][];
|
|
13
|
+
export {};
|
|
@@ -1,51 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
* - With no document options, returns `undefined` so the caller keeps its fallback to {@link TOOLBAR_FONTS}.
|
|
8
|
-
* - Otherwise: bundled defaults and document fonts are deduped by normalized logical family, then sorted
|
|
9
|
-
* alphabetically by the visible font name. `label`/`key` stay the pure logical family (active-state
|
|
10
|
-
* matching + the stored value), and the preview renders in `previewFamily`.
|
|
11
|
-
*
|
|
12
|
-
* @param {ReadonlyArray<import('../../../../../shared/font-system/src/index.js').DocumentFontOption>} documentOptions
|
|
13
|
-
* @param {Array} [configFonts] - the consumer's `fonts` config, if any
|
|
14
|
-
* @returns {Array|undefined}
|
|
15
|
-
*/
|
|
16
|
-
export function composeToolbarFontOptions(documentOptions: ReadonlyArray<import('../../../../../shared/font-system/src/index.js').DocumentFontOption>, configFonts?: any[]): any[] | undefined;
|
|
17
|
-
/**
|
|
18
|
-
* Map the host-computed, activation-aware font-family options onto the toolbar option shape. PURE: it
|
|
19
|
-
* receives the already-resolved list from `superdoc.fonts.getFontFamilyOptions()` (the host owns the
|
|
20
|
-
* `@superdoc/font-system` computation this module must not import). Returns `undefined` for an empty
|
|
21
|
-
* list so the caller keeps its {@link TOOLBAR_FONTS} fallback. `label` is the Word-facing logical
|
|
22
|
-
* family (stored on the selection + used for active-state matching), `key` is a stable option key, and
|
|
23
|
-
* the row preview renders in `previewFamily` (falling back to the label).
|
|
24
|
-
*
|
|
25
|
-
* @param {ReadonlyArray<import('../../../../../shared/font-system/src/index.js').FontFamilyOption>} options
|
|
26
|
-
* @returns {Array|undefined}
|
|
27
|
-
*/
|
|
28
|
-
export function mapFontFamilyOptionsToToolbar(options: ReadonlyArray<import('../../../../../shared/font-system/src/index.js').FontFamilyOption>): any[] | undefined;
|
|
29
|
-
export const TOOLBAR_FONTS: {
|
|
1
|
+
import { DocumentFontOption, FontFamilyOption } from '../../../../../shared/font-system/src/index.js';
|
|
2
|
+
import { ToolbarFontOption } from '../../../core/types/index.js';
|
|
3
|
+
export declare const TOOLBAR_FONTS: ToolbarFontOption[];
|
|
4
|
+
export declare function composeToolbarFontOptions(documentOptions: readonly DocumentFontOption[] | null | undefined, configFonts?: readonly ToolbarFontOption[]): readonly ToolbarFontOption[] | undefined;
|
|
5
|
+
export declare function mapFontFamilyOptionsToToolbar(options: readonly FontFamilyOption[] | null | undefined): ToolbarFontOption[] | undefined;
|
|
6
|
+
export declare const TOOLBAR_FONT_SIZES: {
|
|
30
7
|
label: string;
|
|
31
8
|
key: string;
|
|
32
9
|
props: {
|
|
33
|
-
style: {
|
|
34
|
-
fontFamily: string;
|
|
35
|
-
};
|
|
36
10
|
'data-item': string;
|
|
37
11
|
};
|
|
38
12
|
}[];
|
|
39
|
-
export const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}[];
|
|
46
|
-
export namespace RESPONSIVE_BREAKPOINTS {
|
|
47
|
-
let sm: number;
|
|
48
|
-
let md: number;
|
|
49
|
-
let lg: number;
|
|
50
|
-
let xl: number;
|
|
51
|
-
}
|
|
13
|
+
export declare const RESPONSIVE_BREAKPOINTS: {
|
|
14
|
+
sm: number;
|
|
15
|
+
md: number;
|
|
16
|
+
lg: number;
|
|
17
|
+
xl: number;
|
|
18
|
+
};
|
|
@@ -1,18 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { ToolbarItemAttributes } from './use-toolbar-item.js';
|
|
2
|
+
import { BuiltInToolbar, ToolbarItem } from '../built-in-toolbar.js';
|
|
3
|
+
type DefaultItemsToolbar = Pick<BuiltInToolbar, 'config' | 'ui' | 'superdoc' | 'activeEditor' | 'pendingSelectionCapture' | 'emitCommand' | 'isCommandEnabled' | 'getLinkedStyleOptions' | 'getActiveLinkedStyleId' | 'updateLinkedStyleToMatchSelection'>;
|
|
4
|
+
interface DefaultItemsInput {
|
|
5
|
+
superToolbar: DefaultItemsToolbar;
|
|
6
|
+
toolbarIcons: Readonly<Record<string, unknown>>;
|
|
7
|
+
toolbarTexts: Readonly<Record<string, unknown>>;
|
|
8
|
+
toolbarFonts?: readonly FontOption[] | null;
|
|
9
|
+
hideButtons: boolean;
|
|
10
|
+
availableWidth: number;
|
|
11
|
+
role: string;
|
|
12
|
+
isDev?: boolean;
|
|
13
|
+
configuredItemNames?: ReadonlySet<string> | null;
|
|
14
|
+
configuredItemOrder?: readonly string[] | null;
|
|
15
|
+
excludedItemNames?: ReadonlySet<string> | null;
|
|
16
|
+
additionalItems?: readonly ToolbarItem[];
|
|
17
|
+
}
|
|
18
|
+
type FontOption = {
|
|
19
|
+
label: string;
|
|
20
|
+
key: string;
|
|
21
|
+
value?: string;
|
|
22
|
+
props?: {
|
|
23
|
+
style?: {
|
|
24
|
+
fontFamily?: string;
|
|
25
|
+
[key: string]: unknown;
|
|
26
|
+
};
|
|
27
|
+
[key: string]: unknown;
|
|
28
|
+
};
|
|
18
29
|
};
|
|
30
|
+
export declare function withLinkHref(attributes: ToolbarItemAttributes, href: unknown): ToolbarItemAttributes;
|
|
31
|
+
export declare const makeDefaultItems: ({ superToolbar, toolbarIcons: configuredIcons, toolbarTexts: configuredTexts, toolbarFonts, hideButtons, availableWidth, role, isDev, configuredItemNames, configuredItemOrder, excludedItemNames, additionalItems, }: DefaultItemsInput) => {
|
|
32
|
+
defaultItems: ToolbarItem[];
|
|
33
|
+
overflowItems: ToolbarItem[];
|
|
34
|
+
};
|
|
35
|
+
export {};
|
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
type FocusTarget = {
|
|
2
|
+
focus?: unknown;
|
|
3
|
+
};
|
|
4
|
+
type RefocusToolbar = {
|
|
5
|
+
superdoc?: FocusTarget | null;
|
|
6
|
+
activeEditor?: FocusTarget | null;
|
|
7
|
+
};
|
|
8
|
+
export declare const preventEditorFocusTransfer: (event: Pick<Event, "target" | "preventDefault">) => void;
|
|
9
|
+
export declare const refocusEditorSurface: (superToolbar: RefocusToolbar | null | undefined, preferredEditor?: FocusTarget | null) => void;
|
|
10
|
+
export {};
|
|
@@ -1,3 +1,70 @@
|
|
|
1
|
+
import { default as rotateLeftIconSvg } from '../../../../../../shared/common/icons/rotate-left-solid.svg?raw';
|
|
2
|
+
import { default as rotateRightIconSvg } from '../../../../../../shared/common/icons/rotate-right-solid.svg?raw';
|
|
3
|
+
import { default as boldIconSvg } from '../../../../../../shared/common/icons/bold-solid.svg?raw';
|
|
4
|
+
import { default as italicIconSvg } from '../../../../../../shared/common/icons/italic-solid.svg?raw';
|
|
5
|
+
import { default as underlineIconSvg } from '../../../../../../shared/common/icons/underline-solid.svg?raw';
|
|
6
|
+
import { default as fontIconSvg } from '../../../../../../shared/common/icons/font-solid.svg?raw';
|
|
7
|
+
import { default as linkIconSvg } from '../../../../../../shared/common/icons/link-solid.svg?raw';
|
|
8
|
+
import { default as imageIconSvg } from '../../../../../../shared/common/icons/image-solid.svg?raw';
|
|
9
|
+
import { default as tocIconSvg } from '../../../../../../shared/common/icons/toc-solid.svg?raw';
|
|
10
|
+
import { default as watermarkIconSvg } from '../../../../../../shared/common/icons/watermark.svg?raw';
|
|
11
|
+
import { default as pageNumberIconSvg } from '../../../../../../shared/common/icons/page-number.svg?raw';
|
|
12
|
+
import { default as alignLeftIconSvg } from '../../../../../../shared/common/icons/align-left-solid.svg?raw';
|
|
13
|
+
import { default as alignRightIconSvg } from '../../../../../../shared/common/icons/align-right-solid.svg?raw';
|
|
14
|
+
import { default as alignCenterIconSvg } from '../../../../../../shared/common/icons/align-center-solid.svg?raw';
|
|
15
|
+
import { default as alignJustifyIconSvg } from '../../../../../../shared/common/icons/align-justify-solid.svg?raw';
|
|
16
|
+
import { default as listIconSvg } from '../../../../../../shared/common/icons/list-solid.svg?raw';
|
|
17
|
+
import { default as listCircleIconSvg } from '../../../../../../shared/common/icons/list-circle-solid.svg?raw';
|
|
18
|
+
import { default as listSquareIconSvg } from '../../../../../../shared/common/icons/list-square-solid.svg?raw';
|
|
19
|
+
import { default as listOlIconSvg } from '../../../../../../shared/common/icons/list-ol-solid.svg?raw';
|
|
20
|
+
import { default as listDecimalIconSvg } from '../../../../../../shared/common/icons/list-decimal-solid.svg?raw';
|
|
21
|
+
import { default as listDecimalParenIconSvg } from '../../../../../../shared/common/icons/list-decimal-paren-solid.svg?raw';
|
|
22
|
+
import { default as listUpperRomanIconSvg } from '../../../../../../shared/common/icons/list-upper-roman-solid.svg?raw';
|
|
23
|
+
import { default as listLowerRomanIconSvg } from '../../../../../../shared/common/icons/list-lower-roman-solid.svg?raw';
|
|
24
|
+
import { default as listUpperAlphaIconSvg } from '../../../../../../shared/common/icons/list-upper-alpha-solid.svg?raw';
|
|
25
|
+
import { default as listUpperAlphaParenIconSvg } from '../../../../../../shared/common/icons/list-upper-alpha-paren-solid.svg?raw';
|
|
26
|
+
import { default as listLowerAlphaIconSvg } from '../../../../../../shared/common/icons/list-lower-alpha-solid.svg?raw';
|
|
27
|
+
import { default as listLowerAlphaParenIconSvg } from '../../../../../../shared/common/icons/list-lower-alpha-paren-solid.svg?raw';
|
|
28
|
+
import { default as outdentIconSvg } from '../../../../../../shared/common/icons/outdent-solid.svg?raw';
|
|
29
|
+
import { default as indentIconSvg } from '../../../../../../shared/common/icons/indent-solid.svg?raw';
|
|
30
|
+
import { default as paragraphLtrIconSvg } from '../../../../../../shared/common/icons/paragraph-ltr-solid.svg?raw';
|
|
31
|
+
import { default as paragraphRtlIconSvg } from '../../../../../../shared/common/icons/paragraph-rtl-solid.svg?raw';
|
|
32
|
+
import { default as fileHalfDashedIconSvg } from '../../../../../../shared/common/icons/file-half-dashed-solid.svg?raw';
|
|
33
|
+
import { default as paintRollerIconSvg } from '../../../../../../shared/common/icons/paint-roller-solid.svg?raw';
|
|
34
|
+
import { default as textSlashIconSvg } from '../../../../../../shared/common/icons/text-slash-solid.svg?raw';
|
|
35
|
+
import { default as listCheckIconSvg } from '../../../../../../shared/common/icons/list-check-solid.svg?raw';
|
|
36
|
+
import { default as fileIconSvg } from '../../../../../../shared/common/icons/file-solid.svg?raw';
|
|
37
|
+
import { default as eyeIconSvg } from '../../../../../../shared/common/icons/eye-solid.svg?raw';
|
|
38
|
+
import { default as calendarCheckIconSvg } from '../../../../../../shared/common/icons/calendar-check-solid.svg?raw';
|
|
39
|
+
import { default as calendarXmarkIconSvg } from '../../../../../../shared/common/icons/calendar-xmark-solid.svg?raw';
|
|
40
|
+
import { default as userEditIconSvg } from '../../../../../../shared/common/icons/user-edit-solid.svg?raw';
|
|
41
|
+
import { default as commentIconSvg } from '../../../../../../shared/common/icons/comment-solid.svg?raw';
|
|
42
|
+
import { default as circleIconSvg } from '../../../../../../shared/common/icons/circle-solid.svg?raw';
|
|
43
|
+
import { default as checkIconSvg } from '../../../../../../shared/common/icons/check-solid.svg?raw';
|
|
44
|
+
import { default as xmarkIconSvg } from '../../../../../../shared/common/icons/xmark-solid.svg?raw';
|
|
45
|
+
import { default as upRightFromSquareIconSvg } from '../../../../../../shared/common/icons/up-right-from-square-solid.svg?raw';
|
|
46
|
+
import { default as ellipsisVerticalIconSvg } from '../../../../../../shared/common/icons/ellipsis-vertical-solid.svg?raw';
|
|
47
|
+
import { default as caretUpIconSvg } from '../../../../../../shared/common/icons/caret-up-solid.svg?raw';
|
|
48
|
+
import { default as caretDownIconSvg } from '../../../../../../shared/common/icons/caret-down-solid.svg?raw';
|
|
49
|
+
import { default as rulerSvg } from '../../../../../../shared/common/icons/ruler-solid.svg?raw';
|
|
50
|
+
import { default as paintbrushSvg } from '../../../../../../shared/common/icons/paintbrush-solid.svg?raw';
|
|
51
|
+
import { default as highlighterIcon } from '../../../../../../shared/common/icons/highlighter-icon.svg?raw';
|
|
52
|
+
import { default as magicWandIcon } from '../../../../../../shared/common/icons/magic-wand-solid.svg?raw';
|
|
53
|
+
import { default as tableIconSvg } from '../../../../../../shared/common/icons/table-solid.svg?raw';
|
|
54
|
+
import { default as tableColumnsIconSvg } from '../../../../../../shared/common/icons/table-columns-solid.svg?raw';
|
|
55
|
+
import { default as arrowsLeftRightIconSvg } from '../../../../../../shared/common/icons/arrows-left-right-solid.svg?raw';
|
|
56
|
+
import { default as arrowsToDotIconSvg } from '../../../../../../shared/common/icons/arrows-to-dot-solid.svg?raw';
|
|
57
|
+
import { default as plusIconSvg } from '../../../../../../shared/common/icons/plus-solid.svg?raw';
|
|
58
|
+
import { default as trashIconSvg } from '../../../../../../shared/common/icons/trash-can-solid.svg?raw';
|
|
59
|
+
import { default as borderNoneIconSvg } from '../../../../../../shared/common/icons/border-none-solid.svg?raw';
|
|
60
|
+
import { default as wrenchIconSvg } from '../../../../../../shared/common/icons/wrench-solid.svg?raw';
|
|
61
|
+
import { default as upDownIconSvg } from '../../../../../../shared/common/icons/up-down.svg?raw';
|
|
62
|
+
import { default as magnifyingGlassSvg } from '../../../../../../shared/common/icons/magnifying-glass.svg?raw';
|
|
63
|
+
import { default as scissorsIconSvg } from '../../../../../../shared/common/icons/scissors-solid.svg?raw';
|
|
64
|
+
import { default as copyIconSvg } from '../../../../../../shared/common/icons/copy-solid.svg?raw';
|
|
65
|
+
import { default as pasteIconSvg } from '../../../../../../shared/common/icons/paste-solid.svg?raw';
|
|
66
|
+
import { default as strikethroughSvg } from '../../../../../../shared/common/icons/strikethrough.svg?raw';
|
|
67
|
+
import { default as paragraphIconSvg } from '../../../../../../shared/common/icons/paragraph-solid.svg?raw';
|
|
1
68
|
export namespace toolbarIcons {
|
|
2
69
|
export { rotateLeftIconSvg as undo };
|
|
3
70
|
export { rotateRightIconSvg as redo };
|
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
1
|
+
export declare const toolbarTexts: {
|
|
2
|
+
bold: string;
|
|
3
|
+
fontFamily: string;
|
|
4
|
+
ai: string;
|
|
5
|
+
fontSize: string;
|
|
6
|
+
italic: string;
|
|
7
|
+
underline: string;
|
|
8
|
+
highlight: string;
|
|
9
|
+
strikethrough: string;
|
|
10
|
+
color: string;
|
|
11
|
+
search: string;
|
|
12
|
+
link: string;
|
|
13
|
+
image: string;
|
|
14
|
+
tableOfContents: string;
|
|
15
|
+
watermark: string;
|
|
16
|
+
pageNumber: string;
|
|
17
|
+
table: string;
|
|
18
|
+
tableActions: string;
|
|
19
|
+
addRowBefore: string;
|
|
20
|
+
addRowAfter: string;
|
|
21
|
+
addColumnBefore: string;
|
|
22
|
+
addColumnAfter: string;
|
|
23
|
+
deleteRow: string;
|
|
24
|
+
deleteColumn: string;
|
|
25
|
+
deleteTable: string;
|
|
26
|
+
removeBorders: string;
|
|
27
|
+
mergeCells: string;
|
|
28
|
+
splitCell: string;
|
|
29
|
+
fixTables: string;
|
|
30
|
+
textAlign: string;
|
|
31
|
+
bulletList: string;
|
|
32
|
+
numberedList: string;
|
|
33
|
+
indentLeft: string;
|
|
34
|
+
indentRight: string;
|
|
35
|
+
directionLtr: string;
|
|
36
|
+
directionRtl: string;
|
|
37
|
+
zoom: string;
|
|
38
|
+
measurementUnit: string;
|
|
39
|
+
undo: string;
|
|
40
|
+
redo: string;
|
|
41
|
+
trackChanges: string;
|
|
42
|
+
trackChangesAccept: string;
|
|
43
|
+
trackChangesReject: string;
|
|
44
|
+
trackChangesOriginal: string;
|
|
45
|
+
trackChangesFinal: string;
|
|
46
|
+
clearFormatting: string;
|
|
47
|
+
copyFormat: string;
|
|
48
|
+
lineHeight: string;
|
|
49
|
+
formatText: string;
|
|
50
|
+
ruler: string;
|
|
51
|
+
formattingMarks: string;
|
|
52
|
+
pageBreak: string;
|
|
53
|
+
documentEditingMode: string;
|
|
54
|
+
documentSuggestingMode: string;
|
|
55
|
+
documentViewingMode: string;
|
|
56
|
+
documentEditingModeDescription: string;
|
|
57
|
+
documentSuggestingModeDescription: string;
|
|
58
|
+
documentViewingModeDescription: string;
|
|
59
|
+
linkedStyles: string;
|
|
60
|
+
updateLinkedStyle: string;
|
|
61
|
+
};
|
|
@@ -1,50 +1,111 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
disabled: import('vue').Ref<any, any>;
|
|
20
|
-
active: import('vue').Ref<boolean, boolean>;
|
|
21
|
-
expand: import('vue').Ref<boolean, boolean>;
|
|
22
|
-
nestedOptions: import('vue').Ref<never[], never[]>;
|
|
23
|
-
style: import('vue').Ref<any, any>;
|
|
24
|
-
isNarrow: import('vue').Ref<any, any>;
|
|
25
|
-
isWide: import('vue').Ref<any, any>;
|
|
26
|
-
minWidth: import('vue').Ref<any, any>;
|
|
27
|
-
layoutWidth: import('vue').Ref<any, any>;
|
|
28
|
-
argument: import('vue').Ref<any, any>;
|
|
29
|
-
parentItem: import('vue').Ref<null, null>;
|
|
30
|
-
iconColor: import('vue').Ref<any, any>;
|
|
31
|
-
hasCaret: import('vue').Ref<any, any>;
|
|
32
|
-
splitButton: import('vue').Ref<boolean, boolean>;
|
|
33
|
-
splitButtonCommand: any;
|
|
34
|
-
dropdownStyles: import('vue').Ref<any, any>;
|
|
35
|
-
tooltipVisible: import('vue').Ref<any, any>;
|
|
36
|
-
tooltipTimeout: import('vue').Ref<any, any>;
|
|
37
|
-
defaultLabel: import('vue').Ref<any, any>;
|
|
38
|
-
label: import('vue').Ref<any, any>;
|
|
39
|
-
hideLabel: import('vue').Ref<any, any>;
|
|
40
|
-
inlineTextInputVisible: import('vue').Ref<any, any>;
|
|
41
|
-
hasInlineTextInput: import('vue').Ref<any, any>;
|
|
42
|
-
restoreEditorFocus: boolean;
|
|
43
|
-
markName: import('vue').Ref<any, any>;
|
|
44
|
-
labelAttr: import('vue').Ref<any, any>;
|
|
45
|
-
childItem: import('vue').Ref<null, null>;
|
|
46
|
-
allowWithoutEditor: import('vue').Ref<any, any>;
|
|
47
|
-
dropdownValueKey: import('vue').Ref<any, any>;
|
|
48
|
-
selectedValue: import('vue').Ref<any, any>;
|
|
49
|
-
inputRef: import('vue').Ref<any, any>;
|
|
1
|
+
import { CSSProperties, Ref } from 'vue';
|
|
2
|
+
declare const TOOLBAR_ITEM_TYPES: readonly ["button", "options", "separator", "dropdown", "overflow"];
|
|
3
|
+
export type ToolbarItemType = (typeof TOOLBAR_ITEM_TYPES)[number];
|
|
4
|
+
export interface ToolbarItemOption {
|
|
5
|
+
key?: string | number;
|
|
6
|
+
label?: string;
|
|
7
|
+
type?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
class?: unknown;
|
|
10
|
+
props?: Record<string, unknown>;
|
|
11
|
+
icon?: string | object | ((option: ToolbarItemOption) => unknown);
|
|
12
|
+
render?: () => unknown;
|
|
13
|
+
[member: string]: unknown;
|
|
14
|
+
}
|
|
15
|
+
export type ToolbarItemAttributes = {
|
|
16
|
+
ariaLabel?: string;
|
|
17
|
+
className?: unknown;
|
|
18
|
+
[attribute: string]: unknown;
|
|
50
19
|
};
|
|
20
|
+
export type ToolbarItemStyle = string | CSSProperties;
|
|
21
|
+
export type ToolbarActivationAttributes = Record<string, unknown>;
|
|
22
|
+
export interface UseToolbarItemOptions {
|
|
23
|
+
type: ToolbarItemType;
|
|
24
|
+
name: string;
|
|
25
|
+
command?: unknown;
|
|
26
|
+
noArgumentCommand?: string;
|
|
27
|
+
icon?: string;
|
|
28
|
+
group?: string;
|
|
29
|
+
allowWithoutEditor?: boolean;
|
|
30
|
+
attributes?: ToolbarItemAttributes;
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
style?: ToolbarItemStyle;
|
|
33
|
+
isNarrow?: boolean;
|
|
34
|
+
isWide?: boolean;
|
|
35
|
+
layoutWidth?: number;
|
|
36
|
+
suppressActiveHighlight?: boolean;
|
|
37
|
+
argument?: unknown;
|
|
38
|
+
iconColor?: string;
|
|
39
|
+
hasCaret?: boolean;
|
|
40
|
+
splitButton?: boolean;
|
|
41
|
+
splitButtonCommand?: unknown;
|
|
42
|
+
restoreEditorFocus?: boolean;
|
|
43
|
+
dropdownStyles?: unknown;
|
|
44
|
+
tooltip?: string;
|
|
45
|
+
tooltipVisible?: boolean;
|
|
46
|
+
tooltipTimeout?: number;
|
|
47
|
+
defaultLabel?: string;
|
|
48
|
+
label?: string;
|
|
49
|
+
hideLabel?: boolean;
|
|
50
|
+
inlineTextInputVisible?: boolean;
|
|
51
|
+
hasInlineTextInput?: boolean;
|
|
52
|
+
markName?: string;
|
|
53
|
+
labelAttr?: string;
|
|
54
|
+
selectedValue?: string | number | null;
|
|
55
|
+
dropdownValueKey?: string;
|
|
56
|
+
inputRef?: unknown;
|
|
57
|
+
options?: readonly ToolbarItemOption[];
|
|
58
|
+
onActivate?: (attributes: ToolbarActivationAttributes, isMultiple?: boolean) => unknown;
|
|
59
|
+
onDeactivate?: () => unknown;
|
|
60
|
+
}
|
|
61
|
+
export interface ToolbarItem {
|
|
62
|
+
type: ToolbarItemType;
|
|
63
|
+
id: Ref<string>;
|
|
64
|
+
name: Ref<string>;
|
|
65
|
+
command?: unknown;
|
|
66
|
+
noArgumentCommand?: string;
|
|
67
|
+
splitButtonCommand?: unknown;
|
|
68
|
+
group: Ref<string>;
|
|
69
|
+
attributes: Ref<ToolbarItemAttributes>;
|
|
70
|
+
disabled: Ref<boolean | undefined>;
|
|
71
|
+
active: Ref<boolean>;
|
|
72
|
+
expand: Ref<boolean>;
|
|
73
|
+
nestedOptions: Ref<ToolbarItemOption[]>;
|
|
74
|
+
label: Ref<string | undefined>;
|
|
75
|
+
defaultLabel: Ref<string | undefined>;
|
|
76
|
+
icon: Ref<string | undefined>;
|
|
77
|
+
selectedValue: Ref<string | number | null | undefined>;
|
|
78
|
+
hideLabel: Ref<boolean | undefined>;
|
|
79
|
+
iconColor: Ref<string | undefined>;
|
|
80
|
+
hasCaret: Ref<boolean | undefined>;
|
|
81
|
+
splitButton: Ref<boolean>;
|
|
82
|
+
inlineTextInputVisible: Ref<boolean | undefined>;
|
|
83
|
+
hasInlineTextInput: Ref<boolean | undefined>;
|
|
84
|
+
style: Ref<ToolbarItemStyle | undefined>;
|
|
85
|
+
isNarrow: Ref<boolean | undefined>;
|
|
86
|
+
isWide: Ref<boolean | undefined>;
|
|
87
|
+
layoutWidth: Ref<number | undefined>;
|
|
88
|
+
tooltip: Ref<string | undefined>;
|
|
89
|
+
tooltipVisible: Ref<boolean | undefined>;
|
|
90
|
+
tooltipTimeout: Ref<number | undefined>;
|
|
91
|
+
argument: Ref<unknown>;
|
|
92
|
+
restoreEditorFocus: boolean;
|
|
93
|
+
dropdownStyles: Ref<unknown>;
|
|
94
|
+
dropdownValueKey: Ref<string | undefined>;
|
|
95
|
+
allowWithoutEditor: Ref<boolean | undefined>;
|
|
96
|
+
markName: Ref<string | undefined>;
|
|
97
|
+
labelAttr: Ref<string | undefined>;
|
|
98
|
+
inputRef: Ref<unknown>;
|
|
99
|
+
childItem: unknown;
|
|
100
|
+
parentItem: unknown;
|
|
101
|
+
initiallyDisabled: boolean;
|
|
102
|
+
isCustomToolbarItem?: boolean;
|
|
103
|
+
activate(attributes?: ToolbarActivationAttributes, isMultiple?: boolean): void;
|
|
104
|
+
deactivate(): void;
|
|
105
|
+
setDisabled(state: boolean): void;
|
|
106
|
+
resetDisabled(): void;
|
|
107
|
+
onActivate(attributes: ToolbarActivationAttributes, isMultiple?: boolean): unknown;
|
|
108
|
+
onDeactivate(): unknown;
|
|
109
|
+
}
|
|
110
|
+
export declare const useToolbarItem: (options: UseToolbarItemOptions) => ToolbarItem;
|
|
111
|
+
export {};
|
|
@@ -1,31 +1,11 @@
|
|
|
1
1
|
import { EventEmitter } from 'eventemitter3';
|
|
2
|
-
import { App, ComponentPublicInstance
|
|
2
|
+
import { App, ComponentPublicInstance } from 'vue';
|
|
3
3
|
import { Editor, SuperDoc, ToolbarCustomButton, ToolbarFontOption } from '../../core/types/index.js';
|
|
4
|
-
import { BorrowedSuperDocUI, CustomCommandRegistrationResult, StyleCatalogItem, ToolbarSnapshotSlice } from '../../public/ui/types.js';
|
|
4
|
+
import { BorrowedSuperDocUI, CustomCommandRegistrationResult, SelectionCapture, StyleCatalogItem, ToolbarSnapshotSlice } from '../../public/ui/types.js';
|
|
5
|
+
import { ToolbarItem, ToolbarItemOption } from './built-in/use-toolbar-item.js';
|
|
5
6
|
import { HighContrastMode } from '../../composables/use-high-contrast-mode.js';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
name: Ref<string>;
|
|
9
|
-
command?: unknown;
|
|
10
|
-
group: Ref<string>;
|
|
11
|
-
attributes: Ref<Record<string, unknown>>;
|
|
12
|
-
disabled: Ref<boolean>;
|
|
13
|
-
active: Ref<boolean>;
|
|
14
|
-
expand: Ref<boolean>;
|
|
15
|
-
nestedOptions: Ref<unknown[]>;
|
|
16
|
-
label: Ref<unknown>;
|
|
17
|
-
defaultLabel: Ref<unknown>;
|
|
18
|
-
icon: Ref<unknown>;
|
|
19
|
-
selectedValue: Ref<unknown>;
|
|
20
|
-
allowWithoutEditor: Ref<boolean | undefined>;
|
|
21
|
-
initiallyDisabled: boolean;
|
|
22
|
-
isCustomToolbarItem?: boolean;
|
|
23
|
-
activate(attributes?: Record<string, unknown>, ...args: unknown[]): void;
|
|
24
|
-
deactivate(): void;
|
|
25
|
-
setDisabled(state: boolean): void;
|
|
26
|
-
resetDisabled(): void;
|
|
27
|
-
onActivate(attributes?: Record<string, unknown>, ...args: unknown[]): unknown;
|
|
28
|
-
}
|
|
7
|
+
export type { ToolbarItem, ToolbarItemOption };
|
|
8
|
+
export type ToolbarCommandItem = Pick<ToolbarItem, 'name'> & Partial<Pick<ToolbarItem, 'type' | 'command' | 'isCustomToolbarItem'>>;
|
|
29
9
|
type CustomButtonPayload = {
|
|
30
10
|
argument?: unknown;
|
|
31
11
|
option?: unknown;
|
|
@@ -75,6 +55,7 @@ export declare class BuiltInToolbar extends EventEmitter {
|
|
|
75
55
|
config: BuiltInToolbarConfig;
|
|
76
56
|
toolbarItems: ToolbarItem[];
|
|
77
57
|
overflowItems: ToolbarItem[];
|
|
58
|
+
pendingSelectionCapture: SelectionCapture | null | undefined;
|
|
78
59
|
isDev: boolean;
|
|
79
60
|
role: string;
|
|
80
61
|
superdoc: SuperDoc | null | undefined;
|
|
@@ -128,7 +109,7 @@ export declare class BuiltInToolbar extends EventEmitter {
|
|
|
128
109
|
* Main toolbar command entry point used by the rendered components.
|
|
129
110
|
*/
|
|
130
111
|
emitCommand({ item, argument, option }: {
|
|
131
|
-
item:
|
|
112
|
+
item: ToolbarCommandItem;
|
|
132
113
|
argument?: unknown;
|
|
133
114
|
option?: unknown;
|
|
134
115
|
}): void;
|
|
@@ -138,4 +119,3 @@ export declare class BuiltInToolbar extends EventEmitter {
|
|
|
138
119
|
* Create the rendered built-in toolbar for a `SuperDoc` instance.
|
|
139
120
|
*/
|
|
140
121
|
export declare function createBuiltInToolbar(config: BuiltInToolbarOptions): BuiltInToolbar;
|
|
141
|
-
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/** Layout regions a built-in toolbar item can be placed in. */
|
|
2
|
-
|
|
2
|
+
type ToolbarGroup = 'left' | 'center' | 'right';
|
|
3
3
|
/** How a documented built-in toolbar item is (or is not) backed on V2. */
|
|
4
|
-
|
|
4
|
+
type ToolbarItemDisposition = 'controller-routed' | 'host-routed' | 'shell-owned' | 'unsupported' | 'unresolved';
|
|
5
5
|
/** One documented built-in toolbar item and how it maps onto V2. */
|
|
6
|
-
|
|
6
|
+
interface BuiltInToolbarItemEntry {
|
|
7
7
|
/** Legacy built-in item name (the id v1 toolbars and the docs use). */
|
|
8
8
|
readonly name: string;
|
|
9
9
|
/**
|
|
@@ -73,3 +73,4 @@ export declare function resolveBuiltInItemCommandId(name: string): string | null
|
|
|
73
73
|
* kept exported so a future renderer/build guard can reuse it.
|
|
74
74
|
*/
|
|
75
75
|
export declare function assertCatalogAlignedWithController(): void;
|
|
76
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Canonical toolbar item ids mapped to the names retained by the built-in runtime. */
|
|
2
|
-
export const TOOLBAR_ITEM_ALIASES: Readonly<{
|
|
2
|
+
export declare const TOOLBAR_ITEM_ALIASES: Readonly<{
|
|
3
3
|
'font-family': "fontFamily";
|
|
4
4
|
'font-size': "fontSize";
|
|
5
5
|
strikethrough: "strike";
|