superdoc 2.28.0 → 2.29.0-next.1

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.
Files changed (56) hide show
  1. package/dist/chunks/{PdfViewer-JHXZQZ9x.es.js → PdfViewer-D4lVeOJu.es.js} +3 -2
  2. package/dist/chunks/{PdfViewer-Cg072l5d.cjs → PdfViewer-boENOZdF.cjs} +3 -2
  3. package/dist/chunks/{create-super-doc-ui-BfgYblyI.cjs → create-super-doc-ui-0OA8hCNb.cjs} +201 -23
  4. package/dist/chunks/{create-super-doc-ui-BbjHD1ul.es.js → create-super-doc-ui-Duf65d0b.es.js} +180 -20
  5. package/dist/chunks/is-finite-number-BEXgTRgc.cjs +11 -0
  6. package/dist/chunks/is-finite-number-BpL4F38c.es.js +6 -0
  7. package/dist/collaboration-upgrade-engine.cjs +1 -1
  8. package/dist/collaboration-upgrade-engine.es.js +1 -1
  9. package/dist/document-api/src/capabilities/html-markdown-support.d.ts +3 -3
  10. package/dist/document-api/src/index.d.ts +1 -1
  11. package/dist/document-api/src/lists/lists.d.ts +79 -79
  12. package/dist/document-api/src/write/write.d.ts +10 -9
  13. package/dist/layout-engine/painters/dom/src/page-content.d.ts +1 -1
  14. package/dist/layout-engine/painters/dom/src/persistent-page-surface.d.ts +2 -0
  15. package/dist/public/ui-react.cjs +1 -1
  16. package/dist/public/ui-react.es.js +1 -1
  17. package/dist/public/ui-vue.cjs +1 -1
  18. package/dist/public/ui-vue.es.js +1 -1
  19. package/dist/public/ui.cjs +1 -1
  20. package/dist/public/ui.es.js +1 -1
  21. package/dist/style.css +1 -1
  22. package/dist/style.layered.css +1 -1
  23. package/dist/superdoc/src/SuperDoc.vue.d.ts +5 -3
  24. package/dist/superdoc/src/components/CommentsLayer/CommentDialog.vue.d.ts +1670 -24
  25. package/dist/superdoc/src/components/CommentsLayer/CommentHeader.vue.d.ts +2 -2
  26. package/dist/superdoc/src/components/CommentsLayer/CommentInput.vue.d.ts +2 -2
  27. package/dist/superdoc/src/components/CommentsLayer/FloatingComments.vue.d.ts +21 -8
  28. package/dist/superdoc/src/components/general/Avatar.vue.d.ts +7 -0
  29. package/dist/superdoc/src/components/surfaces/SurfaceDialog.vue.d.ts +27 -9
  30. package/dist/superdoc/src/components/surfaces/SurfaceExternalMount.vue.d.ts +53 -16
  31. package/dist/superdoc/src/composables/use-link-popover.d.ts +3 -3
  32. package/dist/superdoc/src/composables/use-superdoc-instance.d.ts +4 -1
  33. package/dist/superdoc/src/core/SuperDoc.d.ts +1 -1
  34. package/dist/superdoc/src/core/collaboration/permissions.d.ts +1 -0
  35. package/dist/superdoc/src/core/types/index.d.ts +9 -4
  36. package/dist/superdoc/src/helpers/is-finite-number.d.ts +1 -0
  37. package/dist/superdoc/src/internal/diagnostics/diagnostic-dedupe.d.ts +2 -2
  38. package/dist/superdoc/src/internal/toolbar/built-in/AIWriter.vue.d.ts +2 -2
  39. package/dist/superdoc/src/internal/toolbar/built-in/LinkInput.vue.d.ts +181 -36
  40. package/dist/superdoc/src/internal/toolbar/built-in/LinkedStyle.vue.d.ts +39 -10
  41. package/dist/superdoc/src/internal/toolbar/built-in/PageNumberMenu.vue.d.ts +133 -22
  42. package/dist/superdoc/src/internal/toolbar/built-in/SdTooltip.vue.d.ts +62 -23
  43. package/dist/superdoc/src/internal/toolbar/built-in/ToolbarButton.vue.d.ts +101 -16
  44. package/dist/superdoc/src/internal/toolbar/built-in/ToolbarButtonIcon.vue.d.ts +31 -10
  45. package/dist/superdoc/src/internal/toolbar/built-in/ToolbarComboBox.vue.d.ts +82 -11
  46. package/dist/superdoc/src/internal/toolbar/built-in/ToolbarDropdown.vue.d.ts +122 -33
  47. package/dist/superdoc/src/internal/toolbar/built-in/use-toolbar-item.d.ts +0 -1
  48. package/dist/superdoc/src/stores/comments-store.d.ts +151 -28
  49. package/dist/superdoc/src/stores/superdoc-store.d.ts +454 -85
  50. package/dist/superdoc.cjs +319 -401
  51. package/dist/superdoc.es.js +247 -330
  52. package/dist-cdn/style.layered.css +1 -1
  53. package/dist-cdn/superdoc.min.css +1 -1
  54. package/dist-cdn/superdoc.min.js +42 -42
  55. package/package.json +2 -2
  56. package/dist/superdoc/src/internal/toolbar/built-in/OverflowMenu.vue.d.ts +0 -104
@@ -1,8 +1,8 @@
1
1
  declare const _default: import('vue').DefineComponent<{}, {
2
2
  $emit: (event: "reject" | "resolve" | "reopen" | "overflow-select", ...args: any[]) => void;
3
3
  config: Record<string, any>;
4
- isPendingInput: boolean;
5
4
  isActive: boolean;
5
+ isPendingInput: boolean;
6
6
  resolveDisabledReason: string;
7
7
  rejectDisabledReason: string;
8
8
  reopenDisabledReason: string;
@@ -12,8 +12,8 @@ declare const _default: import('vue').DefineComponent<{}, {
12
12
  timestamp?: number | undefined;
13
13
  $props: {
14
14
  readonly config?: Record<string, any> | undefined;
15
- readonly isPendingInput?: boolean | undefined;
16
15
  readonly isActive?: boolean | undefined;
16
+ readonly isPendingInput?: boolean | undefined;
17
17
  readonly resolveDisabledReason?: string | undefined;
18
18
  readonly rejectDisabledReason?: string | undefined;
19
19
  readonly reopenDisabledReason?: string | undefined;
@@ -2,14 +2,14 @@ declare const _default: import('vue').DefineComponent<{}, {
2
2
  focus: (options: any) => void;
3
3
  $emit: (event: "focus", ...args: any[]) => void;
4
4
  config: Record<string, any>;
5
- users: unknown[];
6
5
  isFocused: boolean;
6
+ users: unknown[];
7
7
  includeHeader: boolean;
8
8
  comment?: Record<string, any> | undefined;
9
9
  $props: {
10
10
  readonly config?: Record<string, any> | undefined;
11
- readonly users?: unknown[] | undefined;
12
11
  readonly isFocused?: boolean | undefined;
12
+ readonly users?: unknown[] | undefined;
13
13
  readonly includeHeader?: boolean | undefined;
14
14
  readonly comment?: Record<string, any> | undefined;
15
15
  };
@@ -1,11 +1,24 @@
1
- declare const _default: import('vue').DefineComponent<{}, {
2
- parent: Record<string, any>;
3
- currentDocument: Record<string, any>;
4
- $props: {
5
- readonly parent?: Record<string, any> | undefined;
6
- readonly currentDocument?: Record<string, any> | undefined;
7
- };
8
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
1
+ import { PropType } from 'vue';
2
+ import { Document as SuperDocDocument } from '../../core/types/index.js';
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
4
+ currentDocument: {
5
+ type: PropType<SuperDocDocument>;
6
+ required: true;
7
+ };
8
+ parent: {
9
+ type: PropType<HTMLElement>;
10
+ required: true;
11
+ };
12
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
13
+ currentDocument: {
14
+ type: PropType<SuperDocDocument>;
15
+ required: true;
16
+ };
17
+ parent: {
18
+ type: PropType<HTMLElement>;
19
+ required: true;
20
+ };
21
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
9
22
  floatingCommentsContainer: HTMLDivElement;
10
23
  }, HTMLDivElement>;
11
24
  export default _default;
@@ -0,0 +1,7 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {
2
+ user: Record<string, any>;
3
+ $props: {
4
+ readonly user?: Record<string, any> | undefined;
5
+ };
6
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
7
+ export default _default;
@@ -1,12 +1,30 @@
1
- declare const _default: import('vue').DefineComponent<{}, {
2
- $emit: (event: "close", ...args: any[]) => void;
3
- surface: Record<string, any>;
4
- scrollLockTarget: Record<string, any>;
5
- $props: {
6
- readonly surface?: Record<string, any> | undefined;
7
- readonly scrollLockTarget?: Record<string, any> | undefined;
8
- };
9
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
1
+ import { PropType } from 'vue';
2
+ import { ActiveSurface } from '../../core/surface-manager.js';
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
4
+ surface: {
5
+ type: PropType<ActiveSurface>;
6
+ required: true;
7
+ };
8
+ scrollLockTarget: {
9
+ type: PropType<HTMLElement | null>;
10
+ default: null;
11
+ };
12
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
13
+ close: (...args: any[]) => void;
14
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
15
+ surface: {
16
+ type: PropType<ActiveSurface>;
17
+ required: true;
18
+ };
19
+ scrollLockTarget: {
20
+ type: PropType<HTMLElement | null>;
21
+ default: null;
22
+ };
23
+ }>> & Readonly<{
24
+ onClose?: ((...args: any[]) => any) | undefined;
25
+ }>, {
26
+ scrollLockTarget: HTMLElement | null;
27
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
10
28
  dialogRef: HTMLDivElement;
11
29
  }, HTMLDivElement>;
12
30
  export default _default;
@@ -1,19 +1,56 @@
1
- declare const _default: import('vue').DefineComponent<{}, {
2
- close: Function;
3
- mode: string;
4
- resolve: Function;
5
- request: Record<string, any>;
6
- render: Function;
7
- surfaceId: string;
8
- $props: {
9
- readonly close?: Function | undefined;
10
- readonly mode?: string | undefined;
11
- readonly resolve?: Function | undefined;
12
- readonly request?: Record<string, any> | undefined;
13
- readonly render?: Function | undefined;
14
- readonly surfaceId?: string | undefined;
15
- };
16
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
1
+ import { PropType } from 'vue';
2
+ import { DirectSurfaceRequest, ExternalSurfaceRenderContext, SurfaceMode, SurfaceRequest } from '../../core/types/index.js';
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
4
+ surfaceId: {
5
+ type: StringConstructor;
6
+ required: true;
7
+ };
8
+ mode: {
9
+ type: PropType<SurfaceMode>;
10
+ required: true;
11
+ };
12
+ request: {
13
+ type: PropType<SurfaceRequest>;
14
+ required: true;
15
+ };
16
+ render: {
17
+ type: PropType<NonNullable<DirectSurfaceRequest["render"]>>;
18
+ required: true;
19
+ };
20
+ resolve: {
21
+ type: PropType<ExternalSurfaceRenderContext["resolve"]>;
22
+ required: true;
23
+ };
24
+ close: {
25
+ type: PropType<ExternalSurfaceRenderContext["close"]>;
26
+ required: true;
27
+ };
28
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
29
+ surfaceId: {
30
+ type: StringConstructor;
31
+ required: true;
32
+ };
33
+ mode: {
34
+ type: PropType<SurfaceMode>;
35
+ required: true;
36
+ };
37
+ request: {
38
+ type: PropType<SurfaceRequest>;
39
+ required: true;
40
+ };
41
+ render: {
42
+ type: PropType<NonNullable<DirectSurfaceRequest["render"]>>;
43
+ required: true;
44
+ };
45
+ resolve: {
46
+ type: PropType<ExternalSurfaceRenderContext["resolve"]>;
47
+ required: true;
48
+ };
49
+ close: {
50
+ type: PropType<ExternalSurfaceRenderContext["close"]>;
51
+ required: true;
52
+ };
53
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
17
54
  container: HTMLDivElement;
18
55
  }, HTMLDivElement>;
19
56
  export default _default;
@@ -1,6 +1,6 @@
1
1
  import { SurfaceManager } from '../core/surface-manager.js';
2
2
  import { DocumentMode, Editor, HyperlinkActivationHandler, LinkPopoverResolver } from '../core/types/index.js';
3
- import { SuperDocUI } from '../public/ui/types.js';
3
+ import { BorrowedSuperDocUI } from '../public/ui/types.js';
4
4
  /**
5
5
  * The `v2-link-click` payload the shell relays from the v2 host's
6
6
  * `onLinkClick` callback.
@@ -17,9 +17,9 @@ interface LinkClickPayload {
17
17
  editableText?: boolean;
18
18
  }
19
19
  interface UseLinkPopoverOptions {
20
- getSurfaceManager: () => SurfaceManager | null | undefined;
20
+ getSurfaceManager: () => Pick<SurfaceManager, 'open'> | null | undefined;
21
21
  getActiveEditor: () => Editor | null | undefined;
22
- getUi: () => SuperDocUI | null | undefined;
22
+ getUi: () => BorrowedSuperDocUI | null | undefined;
23
23
  getActivationHandler: () => HyperlinkActivationHandler | LinkPopoverResolver | null | undefined;
24
24
  getActivationHandlerSource?: () => 'hyperlinks.onActivate' | 'compatibility' | null | undefined;
25
25
  getBuiltInEditorDisabled?: () => boolean;
@@ -1,7 +1,10 @@
1
1
  import { ComponentPublicInstance } from 'vue';
2
2
  import { SuperDoc } from '../core/SuperDoc.js';
3
+ export type SuperDocComponentProxy = ComponentPublicInstance & {
4
+ $superdoc: SuperDoc;
5
+ };
3
6
  export interface SuperDocInstanceAccess {
4
- proxy: ComponentPublicInstance;
7
+ proxy: SuperDocComponentProxy;
5
8
  superdoc: SuperDoc;
6
9
  }
7
10
  export declare function useSuperDocInstance(): SuperDocInstanceAccess;
@@ -692,7 +692,7 @@ export declare class SuperDoc extends EventEmitter<SuperDocEventMap> {
692
692
  * @deprecated replaceWith=`await superdoc.activeEditor.doc.getHtml({})` removeIn=v3.0
693
693
  * @param _options Ignored.
694
694
  */
695
- getHTML(_options?: Parameters<Editor['getHTML']>[0]): unknown[];
695
+ getHTML(_options?: Parameters<NonNullable<Editor['getHTML']>>[0]): unknown[];
696
696
  /**
697
697
  * Lock the current superdoc and emit the `locked` event.
698
698
  *
@@ -11,6 +11,7 @@ export const PERMISSIONS: Readonly<{
11
11
  VERSION_HISTORY: "VERSION_HISTORY";
12
12
  }>;
13
13
  export function createTrackedChangePermissionResolver(superdoc: any): (payload?: {}) => any;
14
+ export function readBuiltInTrackedChangePermissionDecision(superdoc: any, canPerform: any, permission: any, trackedChange: any): any;
14
15
  export function isAllowed(permission: string, role: string, isInternal: boolean, context?: {
15
16
  comment?: object | null | undefined;
16
17
  superdoc?: object | null | undefined;
@@ -500,7 +500,12 @@ export interface Editor {
500
500
  setHighContrastMode?: (isHighContrast: boolean) => unknown;
501
501
  on?: (...args: unknown[]) => unknown;
502
502
  off?: (...args: unknown[]) => unknown;
503
- getHTML: (options?: Record<string, unknown>) => unknown;
503
+ /**
504
+ * Not implemented by the superdoc@2 active editor; guard before calling.
505
+ *
506
+ * @deprecated replaceWith=`await editor.doc.getHtml({})` removeIn=v3.0
507
+ */
508
+ getHTML?: (options?: Record<string, unknown>) => unknown;
504
509
  getDocumentId?: () => string | null | undefined;
505
510
  /**
506
511
  * Narrow v2 extension facet for command execution and diagnostics, backed by
@@ -2997,9 +3002,9 @@ export interface SuperDocTrackedChangesBulkDecisionPayload {
2997
3002
  * the editor it is bound to and ignore anything else.
2998
3003
  *
2999
3004
  * Typed `unknown` rather than `Editor`: the active editor can be a v2 facade
3000
- * that does not satisfy `Editor` (`getHTML` is required there and absent on the
3001
- * facade), so annotating it as `Editor` would promise methods that are not
3002
- * present. It is an identity token to compare, not an object to call.
3005
+ * whose runtime shape does not match `Editor`, so annotating it as `Editor`
3006
+ * would promise members it does not have. It is an identity token to compare,
3007
+ * not an object to call.
3003
3008
  */
3004
3009
  export interface SuperDocDocumentReplacedPayload {
3005
3010
  editor: unknown;
@@ -0,0 +1 @@
1
+ export declare function isFiniteNumber(value: unknown): value is number;
@@ -12,12 +12,12 @@
12
12
  * event only fires on success, fires AFTER the diagnostics events on the
13
13
  * success path, and never fires at all for a failed attempt.
14
14
  *
15
- * @param {{generation?: unknown}} [payload]
15
+ * @param {{generation?: unknown} | null} [payload]
16
16
  * @returns {number}
17
17
  */
18
18
  export function getV2DiagnosticGeneration(payload?: {
19
19
  generation?: unknown;
20
- }): number;
20
+ } | null): number;
21
21
  /**
22
22
  * Creates a dedupe tracker for diagnostic emissions, scoped by documentId
23
23
  * and generation. The key is `internalCode` only (per active generation) --
@@ -1,16 +1,16 @@
1
1
  declare const _default: import('vue').DefineComponent<{}, {
2
2
  target: Record<string, any>;
3
3
  doc: Record<string, any>;
4
- selectedText: string;
5
4
  restoreSelection: Function;
5
+ selectedText: string;
6
6
  endpoint: string;
7
7
  apiKey: string;
8
8
  handleClose: Function;
9
9
  $props: {
10
10
  readonly target?: Record<string, any> | undefined;
11
11
  readonly doc?: Record<string, any> | undefined;
12
- readonly selectedText?: string | undefined;
13
12
  readonly restoreSelection?: Function | undefined;
13
+ readonly selectedText?: string | undefined;
14
14
  readonly endpoint?: string | undefined;
15
15
  readonly apiKey?: string | undefined;
16
16
  readonly handleClose?: Function | undefined;
@@ -1,39 +1,184 @@
1
- declare const _default: import('vue').DefineComponent<{}, {
2
- target: string;
3
- href: string;
4
- tooltip: string;
5
- rel: string;
6
- documentMode: string;
7
- ui: Record<string, any>;
8
- textTarget: Record<string, any>;
9
- hyperlinkTarget: Record<string, any>;
1
+ import { PropType, Ref } from 'vue';
2
+ import { SuperDocUI } from '../../../public/ui/types.js';
3
+ type LinkInputUI = Partial<Pick<SuperDocUI, 'selection' | 'toolbar' | 'document'>> & Pick<SuperDocUI, 'commands'>;
4
+ interface LinkItem {
5
+ attributes?: Ref<{
6
+ href?: unknown;
7
+ } | undefined>;
8
+ }
9
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
10
+ showInput: {
11
+ type: BooleanConstructor;
12
+ default: boolean;
13
+ };
14
+ showLink: {
15
+ type: BooleanConstructor;
16
+ default: boolean;
17
+ };
18
+ goToAnchor: {
19
+ type: PropType<(anchorUrl: string) => unknown>;
20
+ default: () => void;
21
+ };
22
+ /** The shared UI controller (single command-state truth). */
23
+ ui: {
24
+ type: PropType<LinkInputUI | null>;
25
+ default: null;
26
+ };
27
+ /** The built-in `link` toolbar item, for current-href fallback. */
28
+ linkItem: {
29
+ type: PropType<LinkItem | null>;
30
+ default: null;
31
+ };
32
+ closePopover: {
33
+ type: PropType<() => void>;
34
+ default: () => void;
35
+ };
36
+ href: {
37
+ type: PropType<string | null>;
38
+ default: null;
39
+ };
40
+ target: {
41
+ type: PropType<string | null>;
42
+ default: null;
43
+ };
44
+ rel: {
45
+ type: PropType<string | null>;
46
+ default: null;
47
+ };
48
+ tooltip: {
49
+ type: PropType<string | null>;
50
+ default: null;
51
+ };
52
+ clickedElement: {
53
+ type: PropType<HTMLElement | null>;
54
+ default: null;
55
+ };
56
+ hyperlinkTarget: {
57
+ type: PropType<object | null>;
58
+ default: null;
59
+ };
60
+ hyperlinkText: {
61
+ type: PropType<string | null>;
62
+ default: null;
63
+ };
64
+ textTarget: {
65
+ type: PropType<object | null>;
66
+ default: null;
67
+ };
68
+ selectedText: {
69
+ type: PropType<string | null>;
70
+ default: null;
71
+ };
72
+ /**
73
+ * Re-applies the toolbar's pre-interaction selection capture before the link
74
+ * command runs. LinkInput executes the command directly (bypassing Toolbar.vue's
75
+ * handleCommand → restoreSelection), so without this the command would wrap
76
+ * whatever selection remains after the dropdown interaction instead of the text
77
+ * the user highlighted. Supplied by renderLinkDropdown.
78
+ */
79
+ restoreSelection: {
80
+ type: PropType<() => void>;
81
+ default: () => void;
82
+ };
83
+ documentMode: {
84
+ type: PropType<string | null>;
85
+ default: null;
86
+ };
87
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
88
+ showInput: {
89
+ type: BooleanConstructor;
90
+ default: boolean;
91
+ };
92
+ showLink: {
93
+ type: BooleanConstructor;
94
+ default: boolean;
95
+ };
96
+ goToAnchor: {
97
+ type: PropType<(anchorUrl: string) => unknown>;
98
+ default: () => void;
99
+ };
100
+ /** The shared UI controller (single command-state truth). */
101
+ ui: {
102
+ type: PropType<LinkInputUI | null>;
103
+ default: null;
104
+ };
105
+ /** The built-in `link` toolbar item, for current-href fallback. */
106
+ linkItem: {
107
+ type: PropType<LinkItem | null>;
108
+ default: null;
109
+ };
110
+ closePopover: {
111
+ type: PropType<() => void>;
112
+ default: () => void;
113
+ };
114
+ href: {
115
+ type: PropType<string | null>;
116
+ default: null;
117
+ };
118
+ target: {
119
+ type: PropType<string | null>;
120
+ default: null;
121
+ };
122
+ rel: {
123
+ type: PropType<string | null>;
124
+ default: null;
125
+ };
126
+ tooltip: {
127
+ type: PropType<string | null>;
128
+ default: null;
129
+ };
130
+ clickedElement: {
131
+ type: PropType<HTMLElement | null>;
132
+ default: null;
133
+ };
134
+ hyperlinkTarget: {
135
+ type: PropType<object | null>;
136
+ default: null;
137
+ };
138
+ hyperlinkText: {
139
+ type: PropType<string | null>;
140
+ default: null;
141
+ };
142
+ textTarget: {
143
+ type: PropType<object | null>;
144
+ default: null;
145
+ };
146
+ selectedText: {
147
+ type: PropType<string | null>;
148
+ default: null;
149
+ };
150
+ /**
151
+ * Re-applies the toolbar's pre-interaction selection capture before the link
152
+ * command runs. LinkInput executes the command directly (bypassing Toolbar.vue's
153
+ * handleCommand → restoreSelection), so without this the command would wrap
154
+ * whatever selection remains after the dropdown interaction instead of the text
155
+ * the user highlighted. Supplied by renderLinkDropdown.
156
+ */
157
+ restoreSelection: {
158
+ type: PropType<() => void>;
159
+ default: () => void;
160
+ };
161
+ documentMode: {
162
+ type: PropType<string | null>;
163
+ default: null;
164
+ };
165
+ }>> & Readonly<{}>, {
166
+ target: string | null;
167
+ href: string | null;
168
+ tooltip: string | null;
169
+ rel: string | null;
170
+ documentMode: string | null;
171
+ ui: LinkInputUI | null;
172
+ textTarget: object | null;
173
+ hyperlinkTarget: object | null;
174
+ restoreSelection: () => void;
10
175
  showInput: boolean;
11
176
  showLink: boolean;
12
- goToAnchor: Function;
13
- linkItem: Record<string, any>;
14
- closePopover: Function;
15
- clickedElement: Record<string, any>;
16
- hyperlinkText: string;
17
- selectedText: string;
18
- restoreSelection: Function;
19
- $props: {
20
- readonly target?: string | undefined;
21
- readonly href?: string | undefined;
22
- readonly tooltip?: string | undefined;
23
- readonly rel?: string | undefined;
24
- readonly documentMode?: string | undefined;
25
- readonly ui?: Record<string, any> | undefined;
26
- readonly textTarget?: Record<string, any> | undefined;
27
- readonly hyperlinkTarget?: Record<string, any> | undefined;
28
- readonly showInput?: boolean | undefined;
29
- readonly showLink?: boolean | undefined;
30
- readonly goToAnchor?: Function | undefined;
31
- readonly linkItem?: Record<string, any> | undefined;
32
- readonly closePopover?: Function | undefined;
33
- readonly clickedElement?: Record<string, any> | undefined;
34
- readonly hyperlinkText?: string | undefined;
35
- readonly selectedText?: string | undefined;
36
- readonly restoreSelection?: Function | undefined;
37
- };
38
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
177
+ goToAnchor: (anchorUrl: string) => unknown;
178
+ linkItem: LinkItem | null;
179
+ closePopover: () => void;
180
+ clickedElement: HTMLElement | null;
181
+ hyperlinkText: string | null;
182
+ selectedText: string | null;
183
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
39
184
  export default _default;
@@ -1,14 +1,43 @@
1
- declare const _default: import('vue').DefineComponent<{}, {
2
- $emit: (event: "update" | "select", ...args: any[]) => void;
3
- styles: unknown[];
4
- selectedOption: string;
5
- updateLabel: string;
6
- $props: {
7
- readonly styles?: unknown[] | undefined;
8
- readonly selectedOption?: string | undefined;
9
- readonly updateLabel?: string | undefined;
1
+ import { PropType } from 'vue';
2
+ import { StyleCatalogItem } from '../../../public/ui/types.js';
3
+ type LinkedStyleOption = Partial<Pick<StyleCatalogItem, 'id' | 'name' | 'preview'>>;
4
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
5
+ styles: {
6
+ type: PropType<LinkedStyleOption[]>;
7
+ default: () => never[];
8
+ };
9
+ selectedOption: {
10
+ type: PropType<string | null>;
11
+ default: null;
12
+ };
13
+ updateLabel: {
14
+ type: StringConstructor;
15
+ default: string;
16
+ };
17
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
18
+ update: (style: Partial<Pick<StyleCatalogItem, "id" | "name" | "preview">>) => any;
19
+ select: (style: Partial<Pick<StyleCatalogItem, "id" | "name" | "preview">>) => any;
20
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
21
+ styles: {
22
+ type: PropType<LinkedStyleOption[]>;
23
+ default: () => never[];
10
24
  };
11
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
25
+ selectedOption: {
26
+ type: PropType<string | null>;
27
+ default: null;
28
+ };
29
+ updateLabel: {
30
+ type: StringConstructor;
31
+ default: string;
32
+ };
33
+ }>> & Readonly<{
34
+ onUpdate?: ((style: Partial<Pick<StyleCatalogItem, "id" | "name" | "preview">>) => any) | undefined;
35
+ onSelect?: ((style: Partial<Pick<StyleCatalogItem, "id" | "name" | "preview">>) => any) | undefined;
36
+ }>, {
37
+ styles: Partial<Pick<StyleCatalogItem, "id" | "name" | "preview">>[];
38
+ selectedOption: string | null;
39
+ updateLabel: string;
40
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
12
41
  styleRefs: HTMLDivElement[];
13
42
  }, HTMLDivElement>;
14
43
  export default _default;