superdoc 2.29.0-next.9 → 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-aOWhUVI7.es.js → PdfViewer-CW09MNrB.es.js} +4 -10
- package/dist/chunks/{PdfViewer-DmSkZehl.cjs → PdfViewer-CkrAHpC-.cjs} +4 -10
- 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/{create-super-doc-ui-Bm5kmx0W.es.js → create-super-doc-ui-Dc8dQAMc.es.js} +83 -114
- package/dist/chunks/{create-super-doc-ui-DN70aatf.cjs → create-super-doc-ui-L60GhVAX.cjs} +199 -236
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/document-api/src/contract/command-catalog.d.ts +1 -1
- 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/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/helpers.d.ts +1 -4
- package/dist/superdoc/src/components/CommentsLayer/tracked-change-threading.d.ts +16 -1
- package/dist/superdoc/src/components/Whiteboard/WhiteboardLayer.vue.d.ts +4 -5
- package/dist/superdoc/src/components/Whiteboard/WhiteboardPage.vue.d.ts +3 -4
- package/dist/superdoc/src/components/Whiteboard/whiteboard-types.d.ts +2 -0
- package/dist/superdoc/src/components/surfaces/watermark-surface-runtime.d.ts +7 -7
- 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-find-replace.d.ts +13 -3
- package/dist/superdoc/src/composables/use-password-prompt.d.ts +1 -1
- package/dist/superdoc/src/composables/use-viewport-fit.d.ts +62 -26
- package/dist/superdoc/src/core/SuperDoc.d.ts +3 -3
- package/dist/superdoc/src/core/pdf/pdf-adapter.d.ts +6 -2
- package/dist/superdoc/src/core/types/index.d.ts +37 -4
- 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/helpers/object-guards.d.ts +1 -0
- 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/translate-diagnostic.d.ts +6 -4
- package/dist/superdoc/src/internal/toolbar/built-in/PageNumberMenu.vue.d.ts +25 -15
- package/dist/superdoc/src/internal/toolbar/built-in/constants.d.ts +3 -1
- 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/toolbarIcons.d.ts +78 -145
- package/dist/superdoc/src/internal/toolbar/built-in/url-safety.d.ts +11 -3
- package/dist/superdoc/src/internal/toolbar/built-in-toolbar.d.ts +4 -3
- package/dist/superdoc/src/internal/toolbar/image-upload.d.ts +29 -39
- package/dist/superdoc/src/public/ui/format-painter-helpers.d.ts +2 -8
- package/dist/superdoc/src/stores/comments-store.d.ts +7 -7
- package/dist/superdoc/src/stores/helpers/comment-document-scope.d.ts +22 -0
- 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/superdoc-store.d.ts +21 -21
- package/dist/superdoc.cjs +423 -464
- package/dist/superdoc.es.js +335 -376
- package/dist-cdn/style.layered.css +1 -1
- package/dist-cdn/superdoc.min.css +1 -1
- package/dist-cdn/superdoc.min.js +41 -41
- package/package.json +3 -2
- package/dist/superdoc/src/main.d.ts +0 -1
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { SuperDocTrackedChangesBulkDecisionPayload } from '../core/types/index.js';
|
|
2
|
+
export type V2TrackedChangeBulkDecisionFact = {
|
|
3
|
+
schemaVersion: number;
|
|
4
|
+
decision: string;
|
|
5
|
+
requestedCount: number;
|
|
6
|
+
appliedCount: number;
|
|
7
|
+
deniedCount: number;
|
|
8
|
+
};
|
|
9
|
+
export declare function toV2BulkDecisionEvent(documentId: string | null | undefined, fact: V2TrackedChangeBulkDecisionFact | null | undefined): SuperDocTrackedChangesBulkDecisionPayload | null;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
import { V2MutationRejectedEvent } from './v2-mutation-exception.js';
|
|
2
|
+
export declare const V2_EDIT_REJECTED_CODE = "edit-rejected";
|
|
3
|
+
export declare const V2_EDIT_REJECTED_MESSAGE = "This edit couldn\u2019t be completed. Adjust the selection and try again.";
|
|
4
|
+
export declare function isV2KeyboardEditRejection(event: unknown): event is V2MutationRejectedEvent;
|
|
5
|
+
export declare function createV2KeyboardEditRejectionException(documentId: string | null | undefined, event?: unknown): {
|
|
3
6
|
documentId?: string | undefined;
|
|
4
7
|
error: Error;
|
|
5
8
|
code: string;
|
|
6
9
|
editor: null;
|
|
7
10
|
};
|
|
8
|
-
export function createV2KeyboardEditRejectionNotificationGate(): {
|
|
9
|
-
shouldNotify(scope:
|
|
10
|
-
clear(scope:
|
|
11
|
+
export declare function createV2KeyboardEditRejectionNotificationGate(): {
|
|
12
|
+
shouldNotify(scope: string | null | undefined, event: unknown): boolean;
|
|
13
|
+
clear(scope: string | null | undefined): void;
|
|
11
14
|
};
|
|
12
|
-
export const V2_EDIT_REJECTED_CODE: "edit-rejected";
|
|
13
|
-
export const V2_EDIT_REJECTED_MESSAGE: "This edit couldn\u2019t be completed. Adjust the selection and try again.";
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
inputKind?: any;
|
|
4
|
-
reason?: string | undefined;
|
|
5
|
-
failureSource?: any;
|
|
1
|
+
export type V2MutationRejectedEvent = Record<string, unknown> & {
|
|
2
|
+
type: 'mutation:rejected';
|
|
6
3
|
};
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
export type V2MutationRejectionCause = {
|
|
5
|
+
failureSource?: string;
|
|
6
|
+
reason?: string;
|
|
7
|
+
inputKind?: string;
|
|
8
|
+
editableCommandKind?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare function createV2MutationRejectionCause(event: unknown): V2MutationRejectionCause;
|
|
11
|
+
export declare function createV2MutationRejectionNotificationGate(matches: (event: unknown) => event is V2MutationRejectedEvent): {
|
|
12
|
+
shouldNotify(scope: string | null | undefined, event: unknown): boolean;
|
|
13
|
+
clear(scope: string | null | undefined): void;
|
|
10
14
|
};
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
+
type V2ReviewTargetInput = {
|
|
2
|
+
entityId?: unknown;
|
|
3
|
+
entityType?: unknown;
|
|
4
|
+
};
|
|
5
|
+
type V2ReviewTargetComment = {
|
|
6
|
+
trackedChange?: unknown;
|
|
7
|
+
commentId?: unknown;
|
|
8
|
+
importedId?: unknown;
|
|
9
|
+
};
|
|
1
10
|
/**
|
|
2
11
|
* Resolve the comments-store identity for a document-origin v2 review target.
|
|
3
12
|
* Painted review carriers can become interactive before the asynchronous row
|
|
4
13
|
* hydration finishes. In that window the host's canonical entity id remains
|
|
5
14
|
* the correct pending active identity; once hydrated, the row aliases win.
|
|
6
15
|
*/
|
|
7
|
-
export function resolveV2ReviewTargetCommentId(target:
|
|
16
|
+
export declare function resolveV2ReviewTargetCommentId(target: V2ReviewTargetInput | null | undefined, getComment: ((id: string) => V2ReviewTargetComment | null | undefined) | null | undefined): string | null;
|
|
17
|
+
export {};
|
|
@@ -1,15 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
type V2SelectionPoint = {
|
|
2
|
+
blockId?: unknown;
|
|
3
|
+
blockOffset?: unknown;
|
|
4
|
+
};
|
|
5
|
+
type V2RangeSnapshotInput = {
|
|
6
|
+
anchor?: V2SelectionPoint | null;
|
|
7
|
+
focus?: V2SelectionPoint | null;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* A logical v2 selection snapshot represents a non-empty range when its anchor
|
|
11
|
+
* and focus point at different block positions. Mirrors the range check the v2
|
|
12
|
+
* shell uses when it emits `v2-selection-changed`.
|
|
13
|
+
*/
|
|
14
|
+
export declare const isV2RangeSnapshot: (snapshot: V2RangeSnapshotInput | null | undefined) => boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Detect a real browser text selection whose endpoints are outside the active
|
|
17
|
+
* v2 mount. Editable host selections can have no native DOM range, so an
|
|
18
|
+
* absent range must not count as an outside selection.
|
|
19
|
+
*/
|
|
20
|
+
export declare const hasOutsideV2DomRangeSelection: (selection: Selection | null | undefined, root: Node | null | undefined) => boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Decide whether the DOM-selection sync pass should keep the affordance driven
|
|
23
|
+
* by the v2 host's logical selection instead of clearing it.
|
|
24
|
+
*
|
|
25
|
+
* In editable modes the host owns pointer text selection, so native DOM ranges
|
|
26
|
+
* may be absent or stale. In that case the pointerup sync must defer to the
|
|
27
|
+
* host snapshot rather than clobber the selection the host just published.
|
|
28
|
+
* Only editable modes use the host snapshot. Viewing mode keeps native DOM
|
|
29
|
+
* selection, and unknown modes should not preserve stale host state.
|
|
30
|
+
*/
|
|
31
|
+
export declare const shouldPreserveHostV2Selection: (documentMode: string | null | undefined, hostSnapshot: V2RangeSnapshotInput | null | undefined) => boolean;
|
|
32
|
+
/**
|
|
33
|
+
* A V2 paint can briefly have no DOM anchor while a selected control is being
|
|
34
|
+
* rebuilt. Keep an already-positioned comment affordance during that gap when
|
|
35
|
+
* the host still owns a range; otherwise the button unmounts and remounts on
|
|
36
|
+
* consecutive paint frames, making it blink and intercepting its own click.
|
|
37
|
+
*/
|
|
38
|
+
export declare const shouldRetainV2FloatingSelection: (hasHostRange: boolean, selectionPosition: {
|
|
14
39
|
source?: unknown;
|
|
15
|
-
} | null | undefined)
|
|
40
|
+
} | null | undefined) => boolean;
|
|
41
|
+
export {};
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/**
|
|
2
|
+
* True when a forwarded v2 host event is a committed editable-input mutation
|
|
3
|
+
* of the sustained-typing class, i.e. review-row hydration for it should be
|
|
4
|
+
* debounced rather than fired immediately.
|
|
5
|
+
*
|
|
6
|
+
* Events without a forwarded `editableCommandKind` (programmatic Document API
|
|
7
|
+
* mutations, history commits, unclassified structural commands) return false
|
|
8
|
+
* so they keep hydrating immediately.
|
|
9
|
+
*/
|
|
10
|
+
export declare const isV2EditableTextMutationEvent: (event: {
|
|
11
|
+
type?: unknown;
|
|
12
|
+
origin?: unknown;
|
|
13
|
+
editableCommandKind?: unknown;
|
|
14
|
+
} | null | undefined) => boolean;
|
|
@@ -1,19 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export { userCheckIconSvg as internal };
|
|
13
|
-
export { usersIconSvg as external };
|
|
14
|
-
export { checkIconSvg as markDone };
|
|
15
|
-
export { checkIconSvg as acceptChange };
|
|
16
|
-
export { xmarkIconSvg as rejectChange };
|
|
17
|
-
export { ellipsisVerticalSvg as overflow };
|
|
18
|
-
export { rotateLeftSvg as reopen };
|
|
19
|
-
}
|
|
1
|
+
export declare const superdocIcons: {
|
|
2
|
+
comment: string;
|
|
3
|
+
caretDown: string;
|
|
4
|
+
internal: string;
|
|
5
|
+
external: string;
|
|
6
|
+
markDone: string;
|
|
7
|
+
acceptChange: string;
|
|
8
|
+
rejectChange: string;
|
|
9
|
+
overflow: string;
|
|
10
|
+
reopen: string;
|
|
11
|
+
};
|
|
@@ -13,9 +13,9 @@ type RenderReadinessDiagnostic = {
|
|
|
13
13
|
reason?: string;
|
|
14
14
|
severity?: string;
|
|
15
15
|
error?: {
|
|
16
|
-
name?:
|
|
17
|
-
message?:
|
|
18
|
-
stack?:
|
|
16
|
+
name?: unknown;
|
|
17
|
+
message?: unknown;
|
|
18
|
+
stack?: unknown;
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
21
|
/**
|
|
@@ -27,7 +27,9 @@ export declare function translateUnzipDiagnostic(record: DiagnosticRecord | null
|
|
|
27
27
|
* Translates a `V2RenderReadinessDiagnostic`-shaped object (render stage)
|
|
28
28
|
* into a public diagnostic payload, or `null` if out of scope.
|
|
29
29
|
*/
|
|
30
|
-
export declare function translateRenderReadinessDiagnostic(diag: RenderReadinessDiagnostic | null | undefined, ctx?: DiagnosticTranslationContext): SuperDocExceptionDiagnosticPayload
|
|
30
|
+
export declare function translateRenderReadinessDiagnostic(diag: RenderReadinessDiagnostic | null | undefined, ctx?: DiagnosticTranslationContext): (SuperDocExceptionDiagnosticPayload & {
|
|
31
|
+
error: Error;
|
|
32
|
+
}) | null;
|
|
31
33
|
/**
|
|
32
34
|
* Translates a boot/open failure into a public diagnostic payload, or
|
|
33
35
|
* `null` if out of scope.
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
import { HeaderFooterKind, HeaderFooterPageNumberAlignment, HeaderFooterPageNumbersInfo, SectionPageNumberingFormat } from '../../../../../document-api/src/index.js';
|
|
3
3
|
import { CommandExecutionResult, CommandState } from '../../../public/ui/types.js';
|
|
4
|
+
type CommandReceipt = Exclude<CommandExecutionResult, boolean>;
|
|
5
|
+
type FailedCommandReceipt = Extract<CommandReceipt, {
|
|
6
|
+
success: false;
|
|
7
|
+
}>;
|
|
8
|
+
type PageNumberCommandResult = boolean | Pick<Extract<CommandReceipt, {
|
|
9
|
+
success: true;
|
|
10
|
+
}>, 'success'> | (Pick<FailedCommandReceipt, 'success'> & {
|
|
11
|
+
failure: Pick<FailedCommandReceipt['failure'], 'code' | 'details'>;
|
|
12
|
+
});
|
|
13
|
+
type PageNumberCommandState = Pick<CommandState, 'enabled'> & Partial<CommandState>;
|
|
4
14
|
type PagePosition = 'top' | 'bottom';
|
|
5
15
|
interface PageNumberChoice {
|
|
6
16
|
position: PagePosition;
|
|
@@ -26,12 +36,12 @@ type PageNumberMenuOutcome = {
|
|
|
26
36
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
27
37
|
/** Command state of `page-numbers-apply`, read when the popover opens. */
|
|
28
38
|
pageNumbersState: {
|
|
29
|
-
type: PropType<
|
|
39
|
+
type: PropType<PageNumberCommandState | null>;
|
|
30
40
|
default: null;
|
|
31
41
|
};
|
|
32
42
|
/** Command state of `page-number-insert` (insert at the header/footer cursor). */
|
|
33
43
|
atCursorState: {
|
|
34
|
-
type: PropType<
|
|
44
|
+
type: PropType<PageNumberCommandState | null>;
|
|
35
45
|
default: null;
|
|
36
46
|
};
|
|
37
47
|
/** Header/footer structure cannot be suggested, so numbering needs Editing. */
|
|
@@ -51,17 +61,17 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
51
61
|
};
|
|
52
62
|
/** Runs `page-numbers-apply` with `{ position, alignment?, showOnFirstPage?, format?, start? }`. */
|
|
53
63
|
applyPageNumbers: {
|
|
54
|
-
type: PropType<(choice: PageNumberChoice) => Promise<
|
|
64
|
+
type: PropType<(choice: PageNumberChoice) => Promise<PageNumberCommandResult>>;
|
|
55
65
|
required: true;
|
|
56
66
|
};
|
|
57
67
|
/** Runs `page-numbers-remove`. */
|
|
58
68
|
removePageNumbers: {
|
|
59
|
-
type: PropType<() => Promise<
|
|
69
|
+
type: PropType<() => Promise<PageNumberCommandResult>>;
|
|
60
70
|
required: true;
|
|
61
71
|
};
|
|
62
72
|
/** Runs `page-number-insert` at the header/footer cursor. */
|
|
63
73
|
insertAtCursor: {
|
|
64
|
-
type: PropType<() => Promise<
|
|
74
|
+
type: PropType<() => Promise<PageNumberCommandResult>>;
|
|
65
75
|
required: true;
|
|
66
76
|
};
|
|
67
77
|
/** Closes the popover after a successful action. */
|
|
@@ -71,18 +81,18 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
71
81
|
};
|
|
72
82
|
/** Last choice made in this session, used when the section has no numbers yet. */
|
|
73
83
|
initialChoice: {
|
|
74
|
-
type: PropType<RememberedChoice | null>;
|
|
84
|
+
type: PropType<Partial<RememberedChoice> | null>;
|
|
75
85
|
default: null;
|
|
76
86
|
};
|
|
77
87
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
78
88
|
/** Command state of `page-numbers-apply`, read when the popover opens. */
|
|
79
89
|
pageNumbersState: {
|
|
80
|
-
type: PropType<
|
|
90
|
+
type: PropType<PageNumberCommandState | null>;
|
|
81
91
|
default: null;
|
|
82
92
|
};
|
|
83
93
|
/** Command state of `page-number-insert` (insert at the header/footer cursor). */
|
|
84
94
|
atCursorState: {
|
|
85
|
-
type: PropType<
|
|
95
|
+
type: PropType<PageNumberCommandState | null>;
|
|
86
96
|
default: null;
|
|
87
97
|
};
|
|
88
98
|
/** Header/footer structure cannot be suggested, so numbering needs Editing. */
|
|
@@ -102,17 +112,17 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
102
112
|
};
|
|
103
113
|
/** Runs `page-numbers-apply` with `{ position, alignment?, showOnFirstPage?, format?, start? }`. */
|
|
104
114
|
applyPageNumbers: {
|
|
105
|
-
type: PropType<(choice: PageNumberChoice) => Promise<
|
|
115
|
+
type: PropType<(choice: PageNumberChoice) => Promise<PageNumberCommandResult>>;
|
|
106
116
|
required: true;
|
|
107
117
|
};
|
|
108
118
|
/** Runs `page-numbers-remove`. */
|
|
109
119
|
removePageNumbers: {
|
|
110
|
-
type: PropType<() => Promise<
|
|
120
|
+
type: PropType<() => Promise<PageNumberCommandResult>>;
|
|
111
121
|
required: true;
|
|
112
122
|
};
|
|
113
123
|
/** Runs `page-number-insert` at the header/footer cursor. */
|
|
114
124
|
insertAtCursor: {
|
|
115
|
-
type: PropType<() => Promise<
|
|
125
|
+
type: PropType<() => Promise<PageNumberCommandResult>>;
|
|
116
126
|
required: true;
|
|
117
127
|
};
|
|
118
128
|
/** Closes the popover after a successful action. */
|
|
@@ -122,15 +132,15 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
122
132
|
};
|
|
123
133
|
/** Last choice made in this session, used when the section has no numbers yet. */
|
|
124
134
|
initialChoice: {
|
|
125
|
-
type: PropType<RememberedChoice | null>;
|
|
135
|
+
type: PropType<Partial<RememberedChoice> | null>;
|
|
126
136
|
default: null;
|
|
127
137
|
};
|
|
128
138
|
}>> & Readonly<{}>, {
|
|
129
139
|
suggesting: boolean;
|
|
130
|
-
pageNumbersState:
|
|
131
|
-
atCursorState:
|
|
140
|
+
pageNumbersState: PageNumberCommandState | null;
|
|
141
|
+
atCursorState: PageNumberCommandState | null;
|
|
132
142
|
inHeaderFooter: boolean;
|
|
133
143
|
loadCurrent: () => Promise<HeaderFooterPageNumbersInfo | null>;
|
|
134
|
-
initialChoice: RememberedChoice | null;
|
|
144
|
+
initialChoice: Partial<RememberedChoice> | null;
|
|
135
145
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
136
146
|
export default _default;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { DocumentFontOption, FontFamilyOption } from '../../../../../shared/font-system/src/index.js';
|
|
2
2
|
import { ToolbarFontOption } from '../../../core/types/index.js';
|
|
3
3
|
export declare const TOOLBAR_FONTS: ToolbarFontOption[];
|
|
4
|
-
|
|
4
|
+
type ToolbarDocumentFontOption = Pick<DocumentFontOption, 'logicalFamily' | 'previewFamily'>;
|
|
5
|
+
export declare function composeToolbarFontOptions(documentOptions: readonly ToolbarDocumentFontOption[] | null | undefined, configFonts?: readonly ToolbarFontOption[]): readonly ToolbarFontOption[] | undefined;
|
|
5
6
|
export declare function mapFontFamilyOptionsToToolbar(options: readonly FontFamilyOption[] | null | undefined): ToolbarFontOption[] | undefined;
|
|
6
7
|
export declare const TOOLBAR_FONT_SIZES: {
|
|
7
8
|
label: string;
|
|
@@ -16,3 +17,4 @@ export declare const RESPONSIVE_BREAKPOINTS: {
|
|
|
16
17
|
lg: number;
|
|
17
18
|
xl: number;
|
|
18
19
|
};
|
|
20
|
+
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 {};
|