superdoc 2.29.0-next.3 → 2.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{FindReplaceSurface-BKVHzhQ4.es.js → FindReplaceSurface-B_5ggdWg.es.js} +1 -1
- package/dist/chunks/{FindReplaceSurface-BNDrJ6VS.cjs → FindReplaceSurface-fVHxPXtn.cjs} +1 -1
- package/dist/chunks/{PasswordPromptSurface-6mF6Azda.es.js → PasswordPromptSurface-CZqhDQQ1.es.js} +1 -1
- package/dist/chunks/{PasswordPromptSurface-BNkaztaP.cjs → PasswordPromptSurface-x8GNmMJT.cjs} +1 -1
- package/dist/chunks/{PdfViewer-D4lVeOJu.es.js → PdfViewer-CW09MNrB.es.js} +70 -105
- package/dist/chunks/{PdfViewer-boENOZdF.cjs → PdfViewer-CkrAHpC-.cjs} +74 -109
- package/dist/chunks/{_plugin-vue_export-helper-6MBoygIY.cjs → _plugin-vue_export-helper-BkbCxNeT.cjs} +31 -7
- package/dist/chunks/{_plugin-vue_export-helper-CsJQtMvr.es.js → _plugin-vue_export-helper-DRPRMkeA.es.js} +20 -8
- 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-BFt8agAI.es.js → create-super-doc-ui-Dc8dQAMc.es.js} +89 -137
- package/dist/chunks/{create-super-doc-ui-BAGOnYGM.cjs → create-super-doc-ui-L60GhVAX.cjs} +211 -259
- 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/command-catalog.d.ts +1 -1
- package/dist/document-api/src/contract/operation-definitions.d.ts +2 -2
- 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/replace/replace.d.ts +3 -2
- package/dist/document-api/src/types/address.d.ts +3 -0
- package/dist/document-api/src/types/temporary-mutation.d.ts +5 -1
- package/dist/document-api/src/write/write.d.ts +12 -6
- 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 +132 -58
- package/dist/superdoc/src/components/CommentsLayer/CommentDialog.vue.d.ts +28 -13
- package/dist/superdoc/src/components/CommentsLayer/collect-removed-comment-ids.d.ts +11 -1
- package/dist/superdoc/src/components/CommentsLayer/collect-tracked-change-thread.d.ts +19 -2
- package/dist/superdoc/src/components/CommentsLayer/comment-urls.d.ts +1 -1
- package/dist/superdoc/src/components/CommentsLayer/commentsList/super-comments-list.d.ts +23 -20
- package/dist/superdoc/src/components/CommentsLayer/floating-comment-positioning.d.ts +24 -23
- package/dist/superdoc/src/components/CommentsLayer/helpers.d.ts +1 -4
- package/dist/superdoc/src/components/CommentsLayer/tracked-change-threading.d.ts +16 -2
- package/dist/superdoc/src/components/CommentsLayer/use-comment.d.ts +28 -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 +80 -16
- package/dist/superdoc/src/components/Whiteboard/WhiteboardPage.vue.d.ts +48 -13
- package/dist/superdoc/src/components/Whiteboard/use-whiteboard.d.ts +30 -15
- package/dist/superdoc/src/components/Whiteboard/whiteboard-types.d.ts +13 -0
- 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-find-replace.d.ts +13 -3
- package/dist/superdoc/src/composables/use-password-prompt.d.ts +23 -24
- package/dist/superdoc/src/composables/use-viewport-fit.d.ts +62 -26
- package/dist/superdoc/src/composables/useUiFontFamily.d.ts +3 -11
- package/dist/superdoc/src/core/SuperDoc.d.ts +4 -4
- 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 -10
- 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 +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 +28 -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 +41 -23
- package/dist/superdoc/src/core/v2-integration/browser-peer-runtime.d.ts +5 -3
- package/dist/superdoc/src/core/v2-integration/cdn-engine-loader.d.ts +3 -13
- package/dist/superdoc/src/core/v2-integration/internal-vue-runtime.d.ts +64 -59
- 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/mark-raw-component.d.ts +1 -0
- package/dist/superdoc/src/helpers/object-guards.d.ts +2 -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 -19
- package/dist/superdoc/src/internal/diagnostics/diagnostic-dedupe.d.ts +6 -15
- package/dist/superdoc/src/internal/diagnostics/translate-diagnostic.d.ts +6 -4
- package/dist/superdoc/src/internal/toolbar/built-in/AIWriter.vue.d.ts +2 -2
- package/dist/superdoc/src/internal/toolbar/built-in/ButtonGroup.vue.d.ts +4 -24
- package/dist/superdoc/src/internal/toolbar/built-in/FontFamilyCombobox.vue.d.ts +34 -0
- package/dist/superdoc/src/internal/toolbar/built-in/FontSizeCombobox.vue.d.ts +34 -0
- package/dist/superdoc/src/internal/toolbar/built-in/LinkInput.vue.d.ts +1 -1
- package/dist/superdoc/src/internal/toolbar/built-in/PageNumberMenu.vue.d.ts +25 -15
- package/dist/superdoc/src/internal/toolbar/built-in/Toolbar.vue.d.ts +9 -3
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarComboBox.vue.d.ts +12 -14
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarDropdown.vue.d.ts +1 -11
- package/dist/superdoc/src/internal/toolbar/built-in/color-dropdown-helpers.d.ts +9 -19
- package/dist/superdoc/src/internal/toolbar/built-in/constants.d.ts +14 -45
- package/dist/superdoc/src/internal/toolbar/built-in/default-items.d.ts +34 -17
- package/dist/superdoc/src/internal/toolbar/built-in/font-options.d.ts +15 -1
- package/dist/superdoc/src/internal/toolbar/built-in/font-typeahead.d.ts +37 -7
- package/dist/superdoc/src/internal/toolbar/built-in/format-negation.d.ts +10 -4
- package/dist/superdoc/src/internal/toolbar/built-in/general.d.ts +12 -1
- package/dist/superdoc/src/internal/toolbar/built-in/helpers.d.ts +9 -4
- package/dist/superdoc/src/internal/toolbar/built-in/list-style-buttons.d.ts +2 -2
- package/dist/superdoc/src/internal/toolbar/built-in/page-number-feedback.d.ts +4 -5
- package/dist/superdoc/src/internal/toolbar/built-in/scroll-helpers.d.ts +3 -4
- 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 +78 -145
- package/dist/superdoc/src/internal/toolbar/built-in/toolbarTexts.d.ts +61 -61
- package/dist/superdoc/src/internal/toolbar/built-in/url-safety.d.ts +11 -3
- package/dist/superdoc/src/internal/toolbar/built-in/use-toolbar-item.d.ts +110 -48
- package/dist/superdoc/src/internal/toolbar/built-in-toolbar.d.ts +11 -30
- package/dist/superdoc/src/internal/toolbar/compatibility-catalog.d.ts +4 -3
- package/dist/superdoc/src/internal/toolbar/image-upload.d.ts +29 -39
- 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 +231 -105
- package/dist/superdoc/src/stores/helpers/comment-document-scope.d.ts +22 -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/pending-selection-snapshot.d.ts +17 -0
- package/dist/superdoc/src/stores/helpers/tracked-change-compaction.d.ts +16 -0
- package/dist/superdoc/src/stores/helpers/tracked-change-decision.d.ts +45 -0
- 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 +0 -4
- package/dist/superdoc/src/stores/helpers/tracked-change-thread-index.d.ts +21 -24
- package/dist/superdoc/src/stores/superdoc-store.d.ts +694 -316
- package/dist/superdoc.cjs +1804 -2782
- package/dist/superdoc.es.js +1720 -2699
- 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 +3 -2
- package/dist/superdoc/src/internal/toolbar/index.d.ts +0 -10
- package/dist/superdoc/src/main.d.ts +0 -1
|
@@ -1,51 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
+
type ToolbarDocumentFontOption = Pick<DocumentFontOption, 'logicalFamily' | 'previewFamily'>;
|
|
5
|
+
export declare function composeToolbarFontOptions(documentOptions: readonly ToolbarDocumentFontOption[] | null | undefined, configFonts?: readonly ToolbarFontOption[]): readonly ToolbarFontOption[] | undefined;
|
|
6
|
+
export declare function mapFontFamilyOptionsToToolbar(options: readonly FontFamilyOption[] | null | undefined): ToolbarFontOption[] | undefined;
|
|
7
|
+
export declare const TOOLBAR_FONT_SIZES: {
|
|
30
8
|
label: string;
|
|
31
9
|
key: string;
|
|
32
10
|
props: {
|
|
33
|
-
style: {
|
|
34
|
-
fontFamily: string;
|
|
35
|
-
};
|
|
36
11
|
'data-item': string;
|
|
37
12
|
};
|
|
38
13
|
}[];
|
|
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
|
-
}
|
|
14
|
+
export declare const RESPONSIVE_BREAKPOINTS: {
|
|
15
|
+
sm: number;
|
|
16
|
+
md: number;
|
|
17
|
+
lg: number;
|
|
18
|
+
xl: number;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
@@ -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 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import { ToolbarFontOption } from '../../../core/types/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Normalize a font dropdown option so each row renders in its own typeface.
|
|
4
|
+
*
|
|
5
|
+
* Consumers can pass a minimal `{ label, key }` shape. The toolbar dropdown
|
|
6
|
+
* spreads `option.props` onto each rendered `<li>`, so without an inline
|
|
7
|
+
* `style.fontFamily` every row inherits the toolbar's UI font and the
|
|
8
|
+
* dropdown loses its visual font preview. This fills that in from
|
|
9
|
+
* `props.style.fontFamily` → `label` → `key` and keeps the existing
|
|
10
|
+
* `data-item` hook that e2e selectors rely on.
|
|
11
|
+
*
|
|
12
|
+
* Idempotent: if `props.style.fontFamily` and `data-item` are already set,
|
|
13
|
+
* the option is returned with those values preserved.
|
|
14
|
+
*/
|
|
15
|
+
export declare const normalizeFontOption: <T extends ToolbarFontOption>(option: T) => T;
|
|
@@ -1,11 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Pure typeahead/autocomplete helpers for the font comboboxes (family + size).
|
|
3
|
+
*
|
|
4
|
+
* Matching is case-insensitive prefix matching on the logical font labels.
|
|
5
|
+
* Space is a normal query character, so the query is never split on spaces;
|
|
6
|
+
* only the outer whitespace is ignored when comparing.
|
|
7
|
+
*
|
|
8
|
+
* These functions hold no Vue or DOM state so CI can unit-test them in isolation.
|
|
9
|
+
*/
|
|
10
|
+
interface TypeaheadResult {
|
|
5
11
|
matchIndex: number;
|
|
6
12
|
display: string;
|
|
7
13
|
selectionStart: number;
|
|
8
14
|
selectionEnd: number;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Index of the first label that starts with `query` (case-insensitive).
|
|
18
|
+
* An empty/whitespace query never matches. Returns the matching index or -1.
|
|
19
|
+
*/
|
|
20
|
+
export declare const findPrefixMatchIndex: (query: string, labels: ReadonlyArray<string>) => number;
|
|
21
|
+
/**
|
|
22
|
+
* Resolve what the input should display after a keystroke.
|
|
23
|
+
*
|
|
24
|
+
* When `autocomplete` is true and a prefix match exists that is longer than the
|
|
25
|
+
* typed query, the completion is shown with the suffix selected so the next
|
|
26
|
+
* keystroke replaces it. When false (deletion) or no match exists, the raw
|
|
27
|
+
* query is shown with the caret at its end. `query` is the user-typed portion.
|
|
28
|
+
*/
|
|
29
|
+
export declare const computeTypeahead: (query: string, labels: ReadonlyArray<string>, { autocomplete }?: {
|
|
30
|
+
autocomplete?: boolean;
|
|
31
|
+
}) => TypeaheadResult;
|
|
32
|
+
export declare const normalizeCustomFontFamily: (value: unknown) => string;
|
|
33
|
+
/**
|
|
34
|
+
* Normalize a typed font size to a supported point-size string.
|
|
35
|
+
* Parses the numeric value (ignoring any unit suffix) keeping its sign, rounds to
|
|
36
|
+
* the nearest half point (DOCX/Word support half points such as 10.5), and clamps
|
|
37
|
+
* to the supported range. Returns '' when nothing usable was typed, including
|
|
38
|
+
* negative or sub-minimum values.
|
|
39
|
+
*/
|
|
40
|
+
export declare const normalizeCustomFontSize: (value: unknown) => string;
|
|
41
|
+
export {};
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
type MarkAttrs = Record<string, unknown>;
|
|
2
|
+
/**
|
|
3
|
+
* Normalize "off" values used by cascade-aware formatting marks.
|
|
4
|
+
*/
|
|
5
|
+
export declare const isOffValue: (value: unknown) => boolean;
|
|
6
|
+
export declare const negationChecks: Record<string, (attrs?: MarkAttrs) => boolean>;
|
|
7
|
+
/**
|
|
8
|
+
* Determine whether a mark is currently negated (explicitly turning formatting off).
|
|
9
|
+
*/
|
|
10
|
+
export declare const isNegatedMark: (name: string, attrs?: MarkAttrs) => boolean;
|
|
5
11
|
export default isNegatedMark;
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Minimal DOM helpers for the built-in toolbar shell.
|
|
3
|
+
*
|
|
4
|
+
* The v1 toolbar's `helpers/general.js` also exported a converter-backed
|
|
5
|
+
* paragraph-font-family fallback; that path depended on private v1 editor
|
|
6
|
+
* internals (`@core/super-converter`) and is intentionally dropped on V2, where
|
|
7
|
+
* font-family active state comes from the shared command controller snapshot.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Resolve a toolbar mount target from a selector string or element id.
|
|
11
|
+
*/
|
|
12
|
+
export declare const findElementBySelector: (selector: string | HTMLElement | null | undefined) => HTMLElement | null;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
interface ThrottleOptions {
|
|
2
|
+
leading?: boolean;
|
|
3
|
+
trailing?: boolean;
|
|
4
|
+
}
|
|
5
|
+
type Throttled<Args extends unknown[], Result> = ((...args: Args) => Result | undefined) & {
|
|
6
|
+
cancel: () => void;
|
|
5
7
|
};
|
|
8
|
+
declare const sanitizeNumber: (value: unknown, defaultNumber: number) => number;
|
|
9
|
+
declare const throttle: <Args extends unknown[], Result>(func: (...args: Args) => Result, wait: number, options?: ThrottleOptions) => Throttled<Args, Result>;
|
|
10
|
+
export { sanitizeNumber, throttle };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export const bulletStyleButtons: {
|
|
1
|
+
export declare const bulletStyleButtons: {
|
|
2
2
|
key: string;
|
|
3
3
|
icon: string;
|
|
4
4
|
ariaLabel: string;
|
|
5
5
|
}[];
|
|
6
|
-
export const numberedStyleButtons: {
|
|
6
|
+
export declare const numberedStyleButtons: {
|
|
7
7
|
key: string;
|
|
8
8
|
icon: string;
|
|
9
9
|
ariaLabel: string;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
+
import { HeaderFooterKind } from '../../../../../document-api/src/index.js';
|
|
1
2
|
/**
|
|
2
3
|
* Briefly highlight the painted header or footer regions that are on screen,
|
|
3
4
|
* so the user sees where page numbers landed without the caret leaving the
|
|
4
5
|
* body. Regions are read after the repaint that follows the mutation; nothing
|
|
5
|
-
* happens when none is visible or the host is unavailable.
|
|
6
|
-
*
|
|
7
|
-
* @param {HTMLElement | null | undefined} host Document viewport host element.
|
|
8
|
-
* @param {'header' | 'footer'} kind
|
|
6
|
+
* happens when none is visible or the host is unavailable. `host` is the
|
|
7
|
+
* document viewport host element.
|
|
9
8
|
*/
|
|
10
|
-
export function flashPageNumberRegions(host: HTMLElement | null | undefined, kind:
|
|
9
|
+
export declare function flashPageNumberRegions(host: HTMLElement | null | undefined, kind: HeaderFooterKind): Promise<void>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}): void;
|
|
1
|
+
type ScrollOptions = Pick<ScrollIntoViewOptions, 'behavior' | 'block'>;
|
|
2
|
+
export declare function scrollToElement(targetElement: HTMLElement | null | undefined, options?: ScrollOptions): void;
|
|
3
|
+
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,145 +1,78 @@
|
|
|
1
|
-
|
|
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
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
export { pageNumberIconSvg as pageNumber };
|
|
80
|
-
export { alignLeftIconSvg as alignLeft };
|
|
81
|
-
export { alignRightIconSvg as alignRight };
|
|
82
|
-
export { alignCenterIconSvg as alignCenter };
|
|
83
|
-
export { alignJustifyIconSvg as alignJustify };
|
|
84
|
-
export { listIconSvg as bulletList };
|
|
85
|
-
export { listIconSvg as bulletListDisc };
|
|
86
|
-
export { listCircleIconSvg as bulletListCircle };
|
|
87
|
-
export { listSquareIconSvg as bulletListSquare };
|
|
88
|
-
export { listOlIconSvg as numberedList };
|
|
89
|
-
export { listDecimalIconSvg as numberedListDecimal };
|
|
90
|
-
export { listDecimalParenIconSvg as numberedListDecimalParen };
|
|
91
|
-
export { listUpperRomanIconSvg as numberedListUpperRoman };
|
|
92
|
-
export { listLowerRomanIconSvg as numberedListLowerRoman };
|
|
93
|
-
export { listUpperAlphaIconSvg as numberedListUpperAlpha };
|
|
94
|
-
export { listUpperAlphaParenIconSvg as numberedListUpperAlphaParen };
|
|
95
|
-
export { listLowerAlphaIconSvg as numberedListLowerAlpha };
|
|
96
|
-
export { listLowerAlphaParenIconSvg as numberedListLowerAlphaParen };
|
|
97
|
-
export { outdentIconSvg as indentLeft };
|
|
98
|
-
export { indentIconSvg as indentRight };
|
|
99
|
-
export { paragraphLtrIconSvg as directionLtr };
|
|
100
|
-
export { paragraphRtlIconSvg as directionRtl };
|
|
101
|
-
export { fileHalfDashedIconSvg as pageBreak };
|
|
102
|
-
export { paintRollerIconSvg as copyFormat };
|
|
103
|
-
export { textSlashIconSvg as clearFormatting };
|
|
104
|
-
export { listCheckIconSvg as trackChanges };
|
|
105
|
-
export { fileIconSvg as trackChangesFinal };
|
|
106
|
-
export { eyeIconSvg as trackChangesOriginal };
|
|
107
|
-
export { calendarCheckIconSvg as trackChangesAccept };
|
|
108
|
-
export { calendarXmarkIconSvg as trackChangesReject };
|
|
109
|
-
export { userEditIconSvg as documentMode };
|
|
110
|
-
export { userEditIconSvg as documentEditingMode };
|
|
111
|
-
export { commentIconSvg as documentSuggestingMode };
|
|
112
|
-
export { eyeIconSvg as documentViewingMode };
|
|
113
|
-
export { circleIconSvg as colorOption };
|
|
114
|
-
export { checkIconSvg as colorOptionCheck };
|
|
115
|
-
export { linkIconSvg as linkInput };
|
|
116
|
-
export { xmarkIconSvg as removeLink };
|
|
117
|
-
export { upRightFromSquareIconSvg as openLink };
|
|
118
|
-
export { ellipsisVerticalIconSvg as overflow };
|
|
119
|
-
export { caretUpIconSvg as dropdownCaretUp };
|
|
120
|
-
export { caretDownIconSvg as dropdownCaretDown };
|
|
121
|
-
export { rulerSvg as ruler };
|
|
122
|
-
export { paintbrushSvg as paintbrush };
|
|
123
|
-
export { highlighterIcon as highlight };
|
|
124
|
-
export { magicWandIcon as ai };
|
|
125
|
-
export { tableIconSvg as table };
|
|
126
|
-
export { tableColumnsIconSvg as tableActions };
|
|
127
|
-
export { arrowsLeftRightIconSvg as splitCell };
|
|
128
|
-
export { arrowsToDotIconSvg as mergeCells };
|
|
129
|
-
export { plusIconSvg as addRowBefore };
|
|
130
|
-
export { plusIconSvg as addRowAfter };
|
|
131
|
-
export { plusIconSvg as addColumnBefore };
|
|
132
|
-
export { plusIconSvg as addColumnAfter };
|
|
133
|
-
export { trashIconSvg as deleteRow };
|
|
134
|
-
export { trashIconSvg as deleteColumn };
|
|
135
|
-
export { trashIconSvg as deleteTable };
|
|
136
|
-
export { borderNoneIconSvg as deleteBorders };
|
|
137
|
-
export { wrenchIconSvg as fixTables };
|
|
138
|
-
export { upDownIconSvg as lineHeight };
|
|
139
|
-
export { magnifyingGlassSvg as search };
|
|
140
|
-
export { scissorsIconSvg as cut };
|
|
141
|
-
export { copyIconSvg as copy };
|
|
142
|
-
export { pasteIconSvg as paste };
|
|
143
|
-
export { strikethroughSvg as strikethrough };
|
|
144
|
-
export { paragraphIconSvg as formattingMarks };
|
|
145
|
-
}
|
|
1
|
+
export declare const toolbarIcons: {
|
|
2
|
+
undo: string;
|
|
3
|
+
redo: string;
|
|
4
|
+
bold: string;
|
|
5
|
+
italic: string;
|
|
6
|
+
underline: string;
|
|
7
|
+
color: string;
|
|
8
|
+
link: string;
|
|
9
|
+
image: string;
|
|
10
|
+
tableOfContents: string;
|
|
11
|
+
watermark: string;
|
|
12
|
+
pageNumber: string;
|
|
13
|
+
alignLeft: string;
|
|
14
|
+
alignRight: string;
|
|
15
|
+
alignCenter: string;
|
|
16
|
+
alignJustify: string;
|
|
17
|
+
bulletList: string;
|
|
18
|
+
bulletListDisc: string;
|
|
19
|
+
bulletListCircle: string;
|
|
20
|
+
bulletListSquare: string;
|
|
21
|
+
numberedList: string;
|
|
22
|
+
numberedListDecimal: string;
|
|
23
|
+
numberedListDecimalParen: string;
|
|
24
|
+
numberedListUpperRoman: string;
|
|
25
|
+
numberedListLowerRoman: string;
|
|
26
|
+
numberedListUpperAlpha: string;
|
|
27
|
+
numberedListUpperAlphaParen: string;
|
|
28
|
+
numberedListLowerAlpha: string;
|
|
29
|
+
numberedListLowerAlphaParen: string;
|
|
30
|
+
indentLeft: string;
|
|
31
|
+
indentRight: string;
|
|
32
|
+
directionLtr: string;
|
|
33
|
+
directionRtl: string;
|
|
34
|
+
pageBreak: string;
|
|
35
|
+
copyFormat: string;
|
|
36
|
+
clearFormatting: string;
|
|
37
|
+
trackChanges: string;
|
|
38
|
+
trackChangesFinal: string;
|
|
39
|
+
trackChangesOriginal: string;
|
|
40
|
+
trackChangesAccept: string;
|
|
41
|
+
trackChangesReject: string;
|
|
42
|
+
documentMode: string;
|
|
43
|
+
documentEditingMode: string;
|
|
44
|
+
documentSuggestingMode: string;
|
|
45
|
+
documentViewingMode: string;
|
|
46
|
+
colorOption: string;
|
|
47
|
+
colorOptionCheck: string;
|
|
48
|
+
linkInput: string;
|
|
49
|
+
removeLink: string;
|
|
50
|
+
openLink: string;
|
|
51
|
+
overflow: string;
|
|
52
|
+
dropdownCaretUp: string;
|
|
53
|
+
dropdownCaretDown: string;
|
|
54
|
+
ruler: string;
|
|
55
|
+
paintbrush: string;
|
|
56
|
+
highlight: string;
|
|
57
|
+
ai: string;
|
|
58
|
+
table: string;
|
|
59
|
+
tableActions: string;
|
|
60
|
+
splitCell: string;
|
|
61
|
+
mergeCells: string;
|
|
62
|
+
addRowBefore: string;
|
|
63
|
+
addRowAfter: string;
|
|
64
|
+
addColumnBefore: string;
|
|
65
|
+
addColumnAfter: string;
|
|
66
|
+
deleteRow: string;
|
|
67
|
+
deleteColumn: string;
|
|
68
|
+
deleteTable: string;
|
|
69
|
+
deleteBorders: string;
|
|
70
|
+
fixTables: string;
|
|
71
|
+
lineHeight: string;
|
|
72
|
+
search: string;
|
|
73
|
+
cut: string;
|
|
74
|
+
copy: string;
|
|
75
|
+
paste: string;
|
|
76
|
+
strikethrough: string;
|
|
77
|
+
formattingMarks: string;
|
|
78
|
+
};
|