ooxml-ui 1.20.0 → 1.22.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.
Files changed (69) hide show
  1. package/README.md +18 -9
  2. package/dist/{chunk-4XPAPETH.js → chunk-DRBAJ5UO.js} +2 -1
  3. package/dist/{chunk-UB36NYDT.js → chunk-REJECZGV.js} +1 -1
  4. package/dist/docx/building-blocks-actions.d.ts +54 -0
  5. package/dist/docx/building-blocks-status.d.ts +34 -0
  6. package/dist/docx/building-blocks.d.ts +20 -4
  7. package/dist/docx/editor-core.d.ts +5 -0
  8. package/dist/docx/element-api.d.ts +12 -0
  9. package/dist/docx/index.d.ts +3 -1
  10. package/dist/docx/insert-controller.d.ts +2 -0
  11. package/dist/docx/locales/en-app.d.ts +1 -0
  12. package/dist/docx/locales/en.d.ts +1 -0
  13. package/dist/docx/localization-strings.d.ts +1 -0
  14. package/dist/docx/surface-navigation.d.ts +8 -0
  15. package/dist/docx.js +337 -11
  16. package/dist/index.js +2 -2
  17. package/dist/parse-worker.js +5 -1
  18. package/dist/pptx/{chunk-ABDWUQRQ.cjs → chunk-72NIN6QF.cjs} +275 -60
  19. package/dist/pptx/{chunk-F6P7VS5I.mjs → chunk-VGOIAVPA.mjs} +266 -61
  20. package/dist/pptx/dom/index.cjs +209 -209
  21. package/dist/pptx/dom/index.mjs +2 -2
  22. package/dist/pptx/index.cjs +2926 -2886
  23. package/dist/pptx/index.mjs +1 -1
  24. package/dist/pptx/render/collaboration-options.d.ts +11 -9
  25. package/dist/pptx/render/collaboration-options.d.ts.map +1 -1
  26. package/dist/pptx/render/collaboration-owned-session.d.ts +34 -0
  27. package/dist/pptx/render/collaboration-owned-session.d.ts.map +1 -0
  28. package/dist/pptx/render/collaboration-state.d.ts +47 -0
  29. package/dist/pptx/render/collaboration-state.d.ts.map +1 -0
  30. package/dist/pptx/render/collaboration-writeback.d.ts +28 -1
  31. package/dist/pptx/render/collaboration-writeback.d.ts.map +1 -1
  32. package/dist/pptx/render/index.d.ts +2 -0
  33. package/dist/pptx/render/index.d.ts.map +1 -1
  34. package/dist/pptx/render/morph-predicates.d.ts +7 -0
  35. package/dist/pptx/render/morph-predicates.d.ts.map +1 -1
  36. package/dist/pptx/render/viewer-props-manifest.d.ts.map +1 -1
  37. package/dist/pptx/types.d.ts +25 -2
  38. package/dist/pptx/types.d.ts.map +1 -1
  39. package/dist/pptx/web-components/office-aliases.d.ts +1 -1
  40. package/dist/teams.js +1 -1
  41. package/dist/visio/building-blocks-shapes.d.ts +9 -0
  42. package/dist/visio/building-blocks-toolbar.d.ts +87 -0
  43. package/dist/visio/building-blocks.d.ts +9 -32
  44. package/dist/visio/canvas-editing.d.ts +45 -0
  45. package/dist/visio/canvas-keys.d.ts +9 -0
  46. package/dist/visio/canvas-services.d.ts +18 -0
  47. package/dist/visio/collaboration-types.d.ts +2 -2
  48. package/dist/visio/controller.d.ts +31 -1
  49. package/dist/visio/diagram-tool.d.ts +11 -0
  50. package/dist/visio/index.d.ts +1 -1
  51. package/dist/visio/viewer-clipboard.d.ts +7 -1
  52. package/dist/visio/viewer-delete.d.ts +10 -0
  53. package/dist/visio/viewer-presence-overlay.d.ts +12 -0
  54. package/dist/visio/viewer-presence.d.ts +19 -0
  55. package/dist/visio/viewer-share-sync.d.ts +15 -10
  56. package/dist/visio/viewer-share.d.ts +9 -7
  57. package/dist/visio/viewer-stencil.d.ts +8 -0
  58. package/dist/visio/viewer-write-back.d.ts +32 -0
  59. package/dist/visio/worker-parser.d.ts +11 -1
  60. package/dist/visio.js +19930 -19210
  61. package/dist/xlsx/building-blocks.d.ts +34 -0
  62. package/dist/xlsx/editor-core.d.ts +8 -0
  63. package/dist/xlsx/element-api.d.ts +12 -1
  64. package/dist/xlsx/events.d.ts +12 -1
  65. package/dist/xlsx/grid/alert-route.d.ts +21 -0
  66. package/dist/xlsx/index.d.ts +2 -1
  67. package/dist/xlsx/surface-actions.d.ts +73 -0
  68. package/dist/xlsx.js +190 -23
  69. package/package.json +2 -2
package/README.md CHANGED
@@ -10,13 +10,15 @@
10
10
 
11
11
  Part of [ooxml](https://github.com/ChristopherVR/ooxml#readme): **[Office](https://github.com/ChristopherVR/ooxml#ooxml-office-the-whole-suite-in-one-app)** · [Word](https://github.com/ChristopherVR/ooxml/tree/main/viewers/docx#readme) · [Excel](https://github.com/ChristopherVR/ooxml/tree/main/viewers/xlsx#readme) · [PowerPoint](https://github.com/ChristopherVR/ooxml/tree/main/viewers/pptx#readme) · [Visio](https://github.com/ChristopherVR/ooxml/tree/main/viewers/visio#readme) · [OpenTeams](https://github.com/ChristopherVR/ooxml/tree/main/viewers/teams#readme) · [Core](https://github.com/ChristopherVR/ooxml/tree/main/src/core#readme)
12
12
 
13
- Shared, format-neutral web components and styles for the Office viewers (Word, PowerPoint and
14
- Excel). Custom elements with shadow-root controls and typed events, no framework. The runtime
13
+ Shared, format-neutral web components and styles for the Office products (Word, Excel, PowerPoint,
14
+ Visio and Teams), and the product editors themselves as `ooxml-ui/<product>` subpaths. Custom
15
+ elements with shadow-root controls and typed events, no framework. The runtime
15
16
  dependencies are `ooxml-core` (types and a few pure helpers) and `lit`, which every element is built on
16
17
  (see "How the elements are built").
17
18
 
18
19
  > **You do not install this package.** It is a regular `dependency` of every published editor
19
- > package (`docx-*-viewer`, `pptx-*-viewer` and `xlsx-*-viewer`), so installing the editor of your framework pulls it
20
+ > package (`docx-*-viewer`, `xlsx-*-viewer`, `pptx-*-viewer`, `visio-*-viewer` and
21
+ > `openteams-*-viewer`), so installing the editor of your framework pulls it
20
22
  > in. It is published separately only so that the editors share one copy of the controls. Do not
21
23
  > add it to your own install instructions or `package.json`; import controls through the editor
22
24
  > package, which registers them for you. Importing `ooxml-ui` directly is for
@@ -45,7 +47,7 @@ strip, task pane, backstage, account, find bar, print preview, ruler), `comments
45
47
  - **Updates are synchronous.** Setting a property or attribute redraws the shadow DOM before the call
46
48
  returns (the contract the earlier hand-built elements had and every test relies on). The team
47
49
  elements keep Lit's batched updates (`static syncUpdates = false`).
48
- - **Products subclass these elements** (pptx-viewer registers `pptx-ui-*` aliases that keep their own
50
+ - **Products subclass these elements** (`ooxml-ui/pptx` registers `pptx-ui-*` aliases that keep their own
49
51
  event names and ids), so the base class keeps what those subclasses lean on: the shadow root exists
50
52
  when the constructor returns, a connected element renders on first `shadowRoot` read or in a
51
53
  microtask even if a subclass skips `super.connectedCallback()`, and a property that a product hook
@@ -64,7 +66,7 @@ strip, task pane, backstage, account, find bar, print preview, ruler), `comments
64
66
  ## Team workspace elements (`ooxml-ui/teams`)
65
67
 
66
68
  The chat and meeting pieces of the open-source Teams-style workspace (logic in `ooxml-core/teams`,
67
- app in the `teams-viewer` repository): `office-ui-avatar`, `-app-rail`, `-channel-list`, `-chat-list`,
69
+ app in `viewers/teams`, the editor element in `ooxml-ui/teams`): `office-ui-avatar`, `-app-rail`, `-channel-list`, `-chat-list`,
68
70
  `-chat-composer`, `-prejoin`, `-call-grid` and `-call-controls`. Properties in, bubbling `office-*`
69
71
  events out, no data fetching; message text is always rendered as text.
70
72
 
@@ -122,6 +124,12 @@ applies at once.
122
124
  | `ooxml-ui/controls` | button, checkbox, switch, select, ribbon group, toolbar, dialog, status bar and item, zoom slider, tab strip |
123
125
  | `ooxml-ui/presence` | `<office-ui-presence>` avatar stack for collaboration awareness |
124
126
  | `ooxml-ui/smartart` | `<office-ui-smartart>`: draws a core `DiagramDrawing` as SVG |
127
+ | `ooxml-ui/teams` | the Teams elements and `<teams-app>` |
128
+ | `ooxml-ui/suite` | browser document persistence the Office suite uses |
129
+ | `ooxml-ui/docx` | the Word editor and viewer elements (`<docx-editor>`) |
130
+ | `ooxml-ui/xlsx` | the Excel editor and viewer elements (`<xlsx-editor>`) |
131
+ | `ooxml-ui/visio` | the Visio editor and viewer elements (`<visio-viewer>`) |
132
+ | `ooxml-ui/pptx` | the PowerPoint renderer, editor and web components; also `/pptx/theme`, `/loader`, `/i18n`, `/ai`, `/dom` |
125
133
 
126
134
  Every entry declares an `import` and a `default` export condition, so CommonJS consumers on Node 20.19+ or 22.12+ load it through `require(esm)`.
127
135
 
@@ -344,9 +352,10 @@ event detail (`approximatedGeometries`, `approximatedFills`, `flattened3d`); not
344
352
  ## Scope
345
353
 
346
354
  Only what every Office product needs lives here. Product-specific ribbon content (PowerPoint
347
- slides, transitions, animations; Word styles and review) stays in the viewers. See
348
- `docs/ooxml-ui-plan.md` in the repository for what moves when, and how the `pptx-ui-*` tags
349
- become aliases of `office-ui-*`.
355
+ slides, transitions, animations; Word styles and review) lives in the product's own subpath (`src/ui/src/<product>/`), not in the shared entries. The
356
+ `pptx-ui-*` tags are thin subclasses of the `office-ui-*` elements; `docs/ooxml-ui-plan.md` in the
357
+ repository keeps the decisions that still apply (layout, style rules, the tag aliases and the
358
+ token map).
350
359
 
351
360
  ## Development
352
361
 
@@ -387,7 +396,7 @@ expansion budget. Set `reading: true` on a slide stage for accessible reading
387
396
  content and native media controls without editing overlays.
388
397
 
389
398
  [Core and UI source](https://github.com/ChristopherVR/ooxml) |
390
- [Shared UI plan](https://github.com/ChristopherVR/ooxml/blob/main/docs/ooxml-ui-plan.md)
399
+ [Shared UI decisions](https://github.com/ChristopherVR/ooxml/blob/main/docs/ooxml-ui-plan.md)
391
400
 
392
401
  ## License
393
402
 
@@ -1993,7 +1993,8 @@ var XLSX_EDITOR_EVENTS = [
1993
1993
  "sheet-change",
1994
1994
  "dirty-change",
1995
1995
  "collaboration-change",
1996
- "office-ribbon-add-in"
1996
+ "office-ribbon-add-in",
1997
+ "validation-error"
1997
1998
  ];
1998
1999
  var CANCELABLE = /* @__PURE__ */ new Set(["file-command"]);
1999
2000
  function emitEvent(target, type, detail) {
@@ -1,5 +1,5 @@
1
1
  import { defineSmartArt } from './chunk-QBXYGKPB.js';
2
- import { TEAMS_TAGS, registerTeams } from './chunk-4XPAPETH.js';
2
+ import { TEAMS_TAGS, registerTeams } from './chunk-DRBAJ5UO.js';
3
3
  import { installOfficeUiTheme } from './chunk-T5ARELU2.js';
4
4
  import { registerControls } from './chunk-TJ245GDD.js';
5
5
  import { definePresence } from './chunk-YZH2QS7J.js';
@@ -0,0 +1,54 @@
1
+ import type { EditorCore } from './editor-core.js';
2
+ import { type SearchStatus } from './search-controller.js';
3
+ /** What a host dialog gets to edit the link at the selection. The host draws the dialog. */
4
+ export interface HyperlinkRequest {
5
+ /** The link target at the selection, or null when the selection is not a link. */
6
+ readonly href: string | null;
7
+ /** The selected text, which becomes the link text. */
8
+ readonly text: string;
9
+ /** Applies `href`; `text` replaces the selection (or inserts at the caret) when given. */
10
+ apply(href: string, text?: string): boolean;
11
+ remove(): boolean;
12
+ }
13
+ /** Find and replace over the document. Find works while read-only; replace needs edit permission. */
14
+ export interface FindReplaceRequest {
15
+ readonly status: SearchStatus;
16
+ readonly canReplace: boolean;
17
+ search(query: string, caseSensitive?: boolean): SearchStatus;
18
+ findNext(): boolean;
19
+ findPrevious(): boolean;
20
+ replaceOne(replacement: string): boolean;
21
+ replaceAll(replacement: string): number;
22
+ }
23
+ /** A host picture picker hands the chosen file back through `insert`. */
24
+ export interface ImagePickerRequest {
25
+ insert(file: File): Promise<boolean>;
26
+ }
27
+ /**
28
+ * Host-owned workflows for the surface. Each is named like the PowerPoint building blocks'
29
+ * `onOpen...` callbacks. A workflow without its callback reports as not enabled; the library never
30
+ * mounts a dialog of its own in surface mode.
31
+ */
32
+ export interface SurfaceHostActions {
33
+ onOpenHyperlinkDialog?: ((request: HyperlinkRequest) => void) | undefined;
34
+ onOpenFindReplace?: ((request: FindReplaceRequest) => void) | undefined;
35
+ onOpenImagePicker?: ((request: ImagePickerRequest) => void) | undefined;
36
+ }
37
+ /** Enabled flags and openers for the host's link, find/replace and picture workflows. */
38
+ export declare function wordHostActionProps(core: EditorCore): {
39
+ /** Which workflows the host supplied a callback for, whether or not they are usable now. */
40
+ hostWorkflows: {
41
+ hyperlink: boolean;
42
+ findReplace: boolean;
43
+ picture: boolean;
44
+ };
45
+ canInsertLink: boolean;
46
+ canFindReplace: boolean;
47
+ canInsertPicture: boolean;
48
+ /** Opens the host's link dialog for the selection. Returns false when not enabled. */
49
+ openHyperlinkDialog: () => boolean;
50
+ /** Opens the host's find and replace workflow. Returns false when not enabled. */
51
+ openFindReplace: () => boolean;
52
+ /** Opens the host's picture picker. Returns false when not enabled. */
53
+ openImagePicker: () => boolean;
54
+ };
@@ -0,0 +1,34 @@
1
+ import type { EditorCore } from './editor-core.js';
2
+ /**
3
+ * Page navigation state for custom controls. Pages exist only in Print Layout; in Draft the
4
+ * document is one continuous page and `pagesAvailable` is false.
5
+ */
6
+ export declare function wordNavigationProps(core: EditorCore): {
7
+ labels: Record<string, string>;
8
+ viewMode: "draft" | "print";
9
+ /** False in Draft, where there are no pages to move between. */
10
+ pagesAvailable: boolean;
11
+ page: number;
12
+ pageCount: number;
13
+ pageText: string;
14
+ canGoPrevious: boolean;
15
+ canGoNext: boolean;
16
+ onGoToPage: (target: number) => boolean;
17
+ onPreviousPage: () => boolean;
18
+ onNextPage: () => boolean;
19
+ onViewModeChange: (mode: 'draft' | 'print') => boolean;
20
+ };
21
+ export type WordNavigationProps = ReturnType<typeof wordNavigationProps>;
22
+ /** Word count and zoom state for custom status controls. */
23
+ export declare function wordStatusProps(core: EditorCore): {
24
+ labels: Record<string, string>;
25
+ words: number;
26
+ wordText: string;
27
+ zoom: number;
28
+ minZoom: number;
29
+ maxZoom: number;
30
+ onZoomChange: (percent: number) => boolean;
31
+ onZoomIn: () => boolean;
32
+ onZoomOut: () => boolean;
33
+ };
34
+ export type WordStatusProps = ReturnType<typeof wordStatusProps>;
@@ -1,11 +1,27 @@
1
1
  import type { EditorCore } from './editor-core.js';
2
+ export type WordAlignment = 'left' | 'center' | 'right' | 'justify';
3
+ /** The list kinds a control can apply; `remove` takes a paragraph out of its list. */
4
+ export type WordListChoice = 'bullet' | 'number';
5
+ /** The list the selection is in: a kind a control can apply, `other` for custom lists, or none. */
6
+ export type WordListState = WordListChoice | 'other' | null;
2
7
  /** A snapshot of the current editor selection, with commands bound to the same editor. */
3
8
  export declare function wordToolbarProps(core: EditorCore): {
9
+ hostWorkflows: {
10
+ hyperlink: boolean;
11
+ findReplace: boolean;
12
+ picture: boolean;
13
+ };
14
+ canInsertLink: boolean;
15
+ canFindReplace: boolean;
16
+ canInsertPicture: boolean;
17
+ openHyperlinkDialog: () => boolean;
18
+ openFindReplace: () => boolean;
19
+ openImagePicker: () => boolean;
4
20
  labels: {
5
21
  [k: string]: string;
6
22
  };
7
23
  canEdit: boolean;
8
- list: 'bullet' | 'decimal' | 'other' | null;
24
+ list: WordListState;
9
25
  selection: {
10
26
  from: number;
11
27
  to: number;
@@ -15,7 +31,7 @@ export declare function wordToolbarProps(core: EditorCore): {
15
31
  underline: boolean | null;
16
32
  fontFamily: string | null;
17
33
  fontSize: number | null;
18
- alignment: string | null;
34
+ alignment: WordAlignment | null;
19
35
  canUndo: boolean;
20
36
  canRedo: boolean;
21
37
  onBold: () => boolean;
@@ -23,8 +39,8 @@ export declare function wordToolbarProps(core: EditorCore): {
23
39
  onUnderline: () => boolean;
24
40
  onFontFamilyChange: (family: string) => boolean;
25
41
  onFontSizeChange: (size: number) => boolean;
26
- onAlignmentChange: (alignment: 'left' | 'center' | 'right' | 'justify') => boolean;
27
- onListChange: (kind: 'bullet' | 'number' | 'remove') => boolean;
42
+ onAlignmentChange: (alignment: WordAlignment) => boolean;
43
+ onListChange: (kind: WordListChoice | 'remove') => boolean;
28
44
  onUndo: () => boolean;
29
45
  onRedo: () => boolean;
30
46
  };
@@ -1,3 +1,4 @@
1
+ import type { SurfaceHostActions } from './building-blocks-actions.js';
1
2
  import type { RibbonAddInTab } from '../ribbon/add-in-tabs.js';
2
3
  import { FormatDialogs } from './format-dialogs.js';
3
4
  import type { EditorState, Transaction } from 'prosemirror-state';
@@ -42,6 +43,8 @@ export interface ShellParts {
42
43
  printNoteEditing?: () => void;
43
44
  /** Selection frame and gestures for floating pictures on the pages. */
44
45
  printFloats?: PrintFloats;
46
+ /** Detaches read-only selection and keyboard navigation of the surface. */
47
+ surfaceNavigation?: () => void;
45
48
  navigator?: PageNavigator;
46
49
  headings?: HeadingNavigator;
47
50
  }
@@ -62,6 +65,8 @@ export declare class EditorCore {
62
65
  readOnly: boolean;
63
66
  /** Set before mounting to render only the document surface. */
64
67
  surfaceOnly: boolean;
68
+ /** Host-owned workflows for surface mode (link, find and replace, picture picker). */
69
+ surfaceActions: SurfaceHostActions;
65
70
  locale: EditorLocale;
66
71
  reviewAuthor: string;
67
72
  theme: EditorThemeMode;
@@ -5,6 +5,8 @@ import type { DocxCollaborationState } from './collaboration-types.js';
5
5
  import type { EditorCore } from './editor-core.js';
6
6
  import { type RibbonActionId, type RibbonActionInput } from 'ooxml-core/docx/ui';
7
7
  import { type WordToolbarProps } from './building-blocks.js';
8
+ import { type WordNavigationProps, type WordStatusProps } from './building-blocks-status.js';
9
+ import type { SurfaceHostActions } from './building-blocks-actions.js';
8
10
  declare const HTMLElementBase: typeof HTMLElement;
9
11
  /**
10
12
  * Save, collaboration, dirty-tracking and UI-customisation surface of `<docx-editor>`.
@@ -15,6 +17,16 @@ export declare abstract class DocxEditorApi extends HTMLElementBase {
15
17
  get surfaceOnly(): boolean;
16
18
  set surfaceOnly(value: boolean);
17
19
  getToolbarProps(): WordToolbarProps;
20
+ /** Page, view mode and navigation callbacks for custom page controls. */
21
+ getNavigationProps(): WordNavigationProps;
22
+ /** Word count and zoom for custom status controls. */
23
+ getStatusProps(): WordStatusProps;
24
+ /**
25
+ * Host-owned dialogs for surface mode: `onOpenHyperlinkDialog`, `onOpenFindReplace` and
26
+ * `onOpenImagePicker`. A workflow without its callback is reported as not enabled.
27
+ */
28
+ get surfaceActions(): SurfaceHostActions;
29
+ set surfaceActions(value: SurfaceHostActions);
18
30
  get loading(): boolean;
19
31
  /** Selection and formatting updates, including changes which do not dirty the document. */
20
32
  subscribeEditorState(listener: () => void): () => void;
@@ -1,5 +1,7 @@
1
1
  export { DocxEditorElement, registerDocxEditor } from './component.js';
2
- export type { WordToolbarProps } from './building-blocks.js';
2
+ export type { WordAlignment, WordListChoice, WordListState, WordToolbarProps, } from './building-blocks.js';
3
+ export type { WordNavigationProps, WordStatusProps } from './building-blocks-status.js';
4
+ export type { FindReplaceRequest, HyperlinkRequest, ImagePickerRequest, SurfaceHostActions, } from './building-blocks-actions.js';
3
5
  export { DOCX_EDITOR_EVENTS } from './events.js';
4
6
  export type { RibbonAction } from './ribbon.js';
5
7
  export { RIBBON_ACTION_IDS, RIBBON_ACTION_LABELS, normalizeRibbonActions, isRibbonActionId, } from 'ooxml-core/docx/ui';
@@ -50,4 +50,6 @@ export declare class InsertController {
50
50
  private applyRulerChange;
51
51
  private setShowHidden;
52
52
  private insertSelectedPicture;
53
+ /** Stages `file` and inserts it at the selection; false when it could not be inserted. */
54
+ insertPictureFile(file: File): Promise<boolean>;
53
55
  }
@@ -124,6 +124,7 @@ export declare const enApp: {
124
124
  readonly 'Next page section break': 'Next page section break';
125
125
  readonly 'Continuous section break': 'Continuous section break';
126
126
  readonly 'Next page': 'Next page';
127
+ readonly 'Previous page': 'Previous page';
127
128
  readonly Continuous: 'Continuous';
128
129
  readonly 'Page numbers': 'Page numbers';
129
130
  readonly 'Page number format': 'Page number format';
@@ -287,6 +287,7 @@ export declare const en: {
287
287
  readonly 'Next page section break': 'Next page section break';
288
288
  readonly 'Continuous section break': 'Continuous section break';
289
289
  readonly 'Next page': 'Next page';
290
+ readonly 'Previous page': 'Previous page';
290
291
  readonly Continuous: 'Continuous';
291
292
  readonly 'Page numbers': 'Page numbers';
292
293
  readonly 'Page number format': 'Page number format';
@@ -284,6 +284,7 @@ export declare const strings: {
284
284
  readonly 'Next page section break': 'Next page section break';
285
285
  readonly 'Continuous section break': 'Continuous section break';
286
286
  readonly 'Next page': 'Next page';
287
+ readonly 'Previous page': 'Previous page';
287
288
  readonly Continuous: 'Continuous';
288
289
  readonly 'Page numbers': 'Page numbers';
289
290
  readonly 'Page number format': 'Page number format';
@@ -0,0 +1,8 @@
1
+ import type { EditorCore } from './editor-core.js';
2
+ /**
3
+ * A read-only surface still lets the reader focus the document, select text, move a caret with the
4
+ * keyboard and copy. ProseMirror renders a non-editable document without a caret, so the browser's
5
+ * own selection is followed and mirrored into the editor state: custom controls then see it through
6
+ * `selection` and the formatting snapshot. Nothing here writes to the document. Returns a disposer.
7
+ */
8
+ export declare function attachSurfaceNavigation(core: EditorCore): () => void;