ooxml-ui 1.5.0 → 1.6.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 (114) hide show
  1. package/custom-elements.json +59 -0
  2. package/dist/{chunk-FN3MBKHE.js → chunk-L7JV5FVE.js} +1 -1
  3. package/dist/{chunk-CXOK5QWQ.js → chunk-OGNNNTKI.js} +1 -1
  4. package/dist/{chunk-6YEWVS7I.js → chunk-PXIYHFZ5.js} +1 -1
  5. package/dist/{chunk-YNGNCKBE.js → chunk-QAIVGTQZ.js} +3 -3
  6. package/dist/{chunk-J2WUY2Q4.js → chunk-QHAE6Y5B.js} +156 -8
  7. package/dist/{chunk-V5P7RPMN.js → chunk-Z7CS3UUK.js} +5 -4
  8. package/dist/controls.d.ts +4 -2
  9. package/dist/controls.d.ts.map +1 -1
  10. package/dist/controls.js +3 -3
  11. package/dist/docx.js +4 -4
  12. package/dist/export/pdf-pages.d.ts +29 -0
  13. package/dist/form/symbol-picker.d.ts +45 -0
  14. package/dist/form/symbol-picker.d.ts.map +1 -0
  15. package/dist/index.d.ts +1 -1
  16. package/dist/index.js +6 -6
  17. package/dist/pptx/{chunk-LQLOD3HL.mjs → chunk-C5MXTIGE.mjs} +118 -5
  18. package/dist/pptx/{chunk-O2TZQM65.cjs → chunk-QLGH3VCC.cjs} +119 -3
  19. package/dist/pptx/dom/elements/text-block.d.ts.map +1 -1
  20. package/dist/pptx/dom/index.cjs +204 -200
  21. package/dist/pptx/dom/index.mjs +8 -4
  22. package/dist/pptx/index.cjs +2717 -2705
  23. package/dist/pptx/index.mjs +1 -1
  24. package/dist/pptx/render/element-action-affordance.d.ts +1 -1
  25. package/dist/pptx/render/element-action-affordance.d.ts.map +1 -1
  26. package/dist/pptx/render/index.d.ts +1 -0
  27. package/dist/pptx/render/index.d.ts.map +1 -1
  28. package/dist/pptx/render/presentation-action.d.ts.map +1 -1
  29. package/dist/pptx/render/text-run-meta.d.ts +2 -0
  30. package/dist/pptx/render/text-run-meta.d.ts.map +1 -1
  31. package/dist/pptx/render/viewer-hyperlinks.d.ts +34 -0
  32. package/dist/pptx/render/viewer-hyperlinks.d.ts.map +1 -0
  33. package/dist/presence.js +2 -2
  34. package/dist/ribbon/gallery.d.ts.map +1 -1
  35. package/dist/smartart.js +2 -2
  36. package/dist/teams.js +4 -4
  37. package/dist/visio/controller.d.ts +11 -0
  38. package/dist/visio/format-shape-dialog.d.ts +21 -0
  39. package/dist/visio/page-setup-action.d.ts +29 -0
  40. package/dist/visio/page-setup-dialog-form.d.ts +32 -0
  41. package/dist/visio/presentation-keys.d.ts +41 -0
  42. package/dist/visio/render-effects.d.ts +10 -0
  43. package/dist/visio/render-shadow.d.ts +7 -0
  44. package/dist/visio/ribbon-action.d.ts +97 -4
  45. package/dist/visio/ribbon-change-shape.d.ts +11 -0
  46. package/dist/visio/ribbon-diagram-parts.d.ts +14 -0
  47. package/dist/visio/ribbon-layout.d.ts +11 -0
  48. package/dist/visio/ribbon-other-tabs.d.ts +2 -5
  49. package/dist/visio/ribbon-page-setup.d.ts +12 -0
  50. package/dist/visio/ribbon-parts.d.ts +1 -0
  51. package/dist/visio/ribbon-review.d.ts +4 -0
  52. package/dist/visio/ribbon-router.d.ts +29 -1
  53. package/dist/visio/ribbon-shape-styles.d.ts +17 -0
  54. package/dist/visio/ribbon-themes.d.ts +17 -0
  55. package/dist/visio/ribbon-view.d.ts +1 -1
  56. package/dist/visio/shapes-sections.d.ts +12 -0
  57. package/dist/visio/shapes-window.d.ts +3 -31
  58. package/dist/visio/stencil-catalog.d.ts +47 -0
  59. package/dist/visio/styles.d.ts +1 -1
  60. package/dist/visio/text-run-style.d.ts +9 -0
  61. package/dist/visio/viewer-backstage.d.ts +7 -0
  62. package/dist/visio/viewer-change-shape.d.ts +16 -0
  63. package/dist/visio/viewer-chrome.d.ts +1 -1
  64. package/dist/visio/viewer-commands.d.ts +6 -0
  65. package/dist/visio/viewer-comment-threads.d.ts +17 -0
  66. package/dist/visio/viewer-comments.d.ts +25 -0
  67. package/dist/visio/viewer-connection-points.d.ts +31 -0
  68. package/dist/visio/viewer-connector-routes.d.ts +24 -0
  69. package/dist/visio/viewer-connector-tool.d.ts +42 -0
  70. package/dist/visio/viewer-data-import.d.ts +31 -0
  71. package/dist/visio/viewer-data-links.d.ts +25 -0
  72. package/dist/visio/viewer-data-sources.d.ts +23 -0
  73. package/dist/visio/viewer-data-window.d.ts +17 -0
  74. package/dist/visio/viewer-data.d.ts +28 -0
  75. package/dist/visio/viewer-diagram-parts.d.ts +17 -0
  76. package/dist/visio/viewer-dialog.d.ts +31 -0
  77. package/dist/visio/viewer-draw-tool.d.ts +12 -4
  78. package/dist/visio/viewer-drawing-gesture.d.ts +6 -4
  79. package/dist/visio/viewer-edit-controls.d.ts +1 -1
  80. package/dist/visio/viewer-element.d.ts +5 -0
  81. package/dist/visio/viewer-explorer.d.ts +17 -0
  82. package/dist/visio/viewer-export.d.ts +17 -0
  83. package/dist/visio/viewer-format-painter.d.ts +20 -0
  84. package/dist/visio/viewer-format-shape.d.ts +16 -0
  85. package/dist/visio/viewer-grouping.d.ts +13 -0
  86. package/dist/visio/viewer-guides.d.ts +27 -0
  87. package/dist/visio/viewer-insert-dialog.d.ts +41 -0
  88. package/dist/visio/viewer-insert.d.ts +25 -0
  89. package/dist/visio/viewer-issues.d.ts +29 -0
  90. package/dist/visio/viewer-layer-assign.d.ts +17 -0
  91. package/dist/visio/viewer-layout-commands.d.ts +41 -0
  92. package/dist/visio/viewer-layout.d.ts +24 -0
  93. package/dist/visio/viewer-page-breaks.d.ts +6 -0
  94. package/dist/visio/viewer-page-setup-dialog.d.ts +20 -0
  95. package/dist/visio/viewer-page-setup.d.ts +23 -0
  96. package/dist/visio/viewer-paste-special.d.ts +18 -0
  97. package/dist/visio/viewer-pointer-gestures.d.ts +5 -0
  98. package/dist/visio/viewer-presentation.d.ts +29 -0
  99. package/dist/visio/viewer-review.d.ts +23 -0
  100. package/dist/visio/viewer-select-type.d.ts +16 -0
  101. package/dist/visio/viewer-shape-data.d.ts +16 -0
  102. package/dist/visio/viewer-shape-report.d.ts +26 -0
  103. package/dist/visio/viewer-shape-styles.d.ts +9 -0
  104. package/dist/visio/viewer-shape-target.d.ts +7 -0
  105. package/dist/visio/viewer-stencil.d.ts +1 -1
  106. package/dist/visio/viewer-subprocess.d.ts +22 -0
  107. package/dist/visio/viewer-text-block.d.ts +23 -0
  108. package/dist/visio/viewer-text-dialog.d.ts +24 -0
  109. package/dist/visio/viewer-text-features.d.ts +24 -0
  110. package/dist/visio/viewer-text-insert.d.ts +28 -0
  111. package/dist/visio/viewer-themes.d.ts +16 -0
  112. package/dist/visio.js +14634 -6446
  113. package/dist/xlsx.js +7 -7
  114. package/package.json +2 -2
@@ -0,0 +1,9 @@
1
+ import type { VisioTextRun } from 'ooxml-core/visio';
2
+ /** Displayed font size: super- and subscript runs shrink like Visio's defaults. */
3
+ export declare const runDisplaySize: (run: VisioTextRun) => number;
4
+ /** Baseline shift in text units, down-positive (the text group is y-down). */
5
+ export declare const runBaselineShift: (run: VisioTextRun) => number;
6
+ /** Displayed characters for Char.Case; the stored text keeps its own case. */
7
+ export declare function runDisplayText(text: string, run: Pick<VisioTextRun, 'textCase'>): string;
8
+ /** Whether two runs draw identically, so wrapping may merge them. */
9
+ export declare const sameRunExtras: (a: VisioTextRun, b: VisioTextRun) => boolean;
@@ -16,11 +16,18 @@ export interface BackstageHost {
16
16
  svg: string;
17
17
  pageIndex: number;
18
18
  };
19
+ /** Raster PDF of the foreground pages, or a PNG of the current page (viewer-export). */
20
+ exportPicture(format: 'pdf' | 'png'): Promise<{
21
+ blob: Blob;
22
+ pageIndex: number;
23
+ }>;
19
24
  closeDocument(): void;
20
25
  revealNotes(): void;
21
26
  showOptions(): void;
22
27
  announce(message: string): void;
23
28
  noteCount(): number;
29
+ /** File > Print > Page Setup. */
30
+ pageSetup?(): void;
24
31
  }
25
32
  export declare class ViewerBackstage {
26
33
  #private;
@@ -0,0 +1,16 @@
1
+ import type { VisioChangeShapeTarget } from 'ooxml-core/visio';
2
+ import type { ViewerController, ViewerState } from './controller.js';
3
+ /**
4
+ * Home > Change Shape: replaces the outline of the one selected local shape through the core's
5
+ * `change-shape` edit, so undo and redo come from the source-backed history. The gallery is
6
+ * enabled only for a selection the scene admits; locks and formulas are proven by the core.
7
+ */
8
+ export declare class ViewerChangeShape {
9
+ #private;
10
+ private readonly root;
11
+ private readonly controller;
12
+ private readonly edit;
13
+ constructor(root: ShadowRoot, controller: ViewerController, edit: (run: () => Promise<void>, message: string) => void);
14
+ run(shape: VisioChangeShapeTarget): void;
15
+ render(state: ViewerState): void;
16
+ }
@@ -4,7 +4,7 @@ import type { ViewerController, ViewerState } from './controller.js';
4
4
  * window, page tabs and status bar are built by their own modules. Visio keeps pages in the
5
5
  * bottom tabs and the All pages list, so there is no page pane. Labels are inserted as text.
6
6
  */
7
- export declare const viewerChromeTemplate = "<div class=\"workspace\">\n <div class=\"viewport\" tabindex=\"0\" role=\"region\" aria-label=\"Diagram canvas\"></div>\n <aside id=\"inspector-pane\" class=\"inspector-pane\" aria-label=\"Drawing inspector\">\n <div class=\"pane-heading\"><span>Inspector</span><span class=\"inspector-kind\">Drawing</span><button class=\"pane-close\" type=\"button\" data-chrome=\"inspector\" aria-label=\"Close inspector\">\u00D7</button></div>\n <div class=\"inspector-body\">\n <section class=\"inspector-card document-card\" aria-label=\"Current page\"><h2>Current page</h2><p class=\"current-page-name\" data-page-name>No diagram open</p><dl><dt>Size</dt><dd data-page-size>No page</dd><dt>Shapes</dt><dd data-page-shapes>No shapes</dd></dl></section>\n <p class=\"selection-hint\">Select a shape on the canvas to see its data and links.</p>\n <details class=\"shape-inspector inspector-card\" hidden><summary>Selected shape</summary><div></div></details>\n <details class=\"edit-controls\"><summary>Edit diagram (experimental)</summary><p id=\"edit-warning\">Experimental source-backed editing. Unsupported targets are rejected. Native Visio compatibility is not verified. Keep your original file.</p><p data-edit-target></p><label for=\"edit-text\">Selected shape text</label><textarea id=\"edit-text\" rows=\"3\" aria-describedby=\"edit-warning edit-target edit-status\"></textarea><div class=\"edit-actions\"><button type=\"button\" data-edit=\"apply\">Apply text</button><button type=\"button\" data-edit=\"cancel\">Cancel</button><button type=\"button\" data-edit=\"undo\">Undo</button><button type=\"button\" data-edit=\"redo\">Redo</button></div><p id=\"edit-status\" role=\"status\" aria-live=\"polite\"></p><p data-edit-error role=\"alert\" hidden></p><ul data-edit-diagnostics></ul><fieldset data-geometry><legend>Geometry (experimental)</legend><p>Pin X/Y use drawing inches, bottom-left origin, Y up. Resize holds the rotation pin fixed. Core rejects unsupported formulas, protected cells, unsafe group/master dependencies and referenced deletion. Native Visio reopen fidelity is unverified.</p><label>New rectangle ID <input data-geometry-field=\"id\" type=\"text\" maxlength=\"256\"></label><label>Rectangle text (optional) <input data-geometry-field=\"text\" type=\"text\" maxlength=\"1000000\"></label><label>Pin X (inches) <input data-geometry-field=\"x\" type=\"number\" step=\"any\"></label><label>Pin Y (inches) <input data-geometry-field=\"y\" type=\"number\" step=\"any\"></label><label>Width (inches) <input data-geometry-field=\"width\" type=\"number\" min=\"0\" step=\"any\"></label><label>Height (inches) <input data-geometry-field=\"height\" type=\"number\" min=\"0\" step=\"any\"></label><div class=\"edit-actions\"><button type=\"button\" data-geometry-action=\"create-rectangle\">Create rectangle</button><button type=\"button\" data-geometry-action=\"move-shape\">Move selected</button><button type=\"button\" data-geometry-action=\"resize-shape\">Resize selected</button><button type=\"button\" data-geometry-action=\"delete-shape\">Delete selected</button></div><p data-geometry-error role=\"alert\" hidden></p></fieldset></details><details class=\"layer-controls\" hidden><summary>Layers</summary><p>Display changes only. SVG and print snapshots use saved visibility. Guides, NoShow and unknown hidden reasons remain hidden.</p><div data-layer-list></div><p data-layer-status role=\"status\"></p><button type=\"button\" data-layer-reset=\"all\">Reset all layers</button></details>\n <details class=\"notes inspector-card\"><summary>Compatibility notes</summary><ul></ul></details>\n </div>\n </aside>\n</div>";
7
+ export declare const viewerChromeTemplate = "<div class=\"workspace\">\n <div class=\"viewport\" tabindex=\"0\" role=\"region\" aria-label=\"Diagram canvas\"></div>\n <aside id=\"inspector-pane\" class=\"inspector-pane\" aria-label=\"Drawing inspector\">\n <div class=\"pane-heading\"><span>Inspector</span><span class=\"inspector-kind\">Drawing</span><button class=\"pane-close\" type=\"button\" data-chrome=\"inspector\" aria-label=\"Close inspector\">\u00D7</button></div>\n <div class=\"inspector-body\">\n <section class=\"inspector-card document-card\" aria-label=\"Current page\"><h2>Current page</h2><p class=\"current-page-name\" data-page-name>No diagram open</p><dl><dt>Size</dt><dd data-page-size>No page</dd><dt>Shapes</dt><dd data-page-shapes>No shapes</dd></dl></section>\n <p class=\"selection-hint\">Select a shape on the canvas to see its data and links.</p>\n <details class=\"shape-inspector inspector-card\" hidden><summary>Selected shape</summary><div></div></details>\n <details class=\"edit-controls\"><summary>Edit diagram (experimental)</summary><p id=\"edit-warning\">Experimental source-backed editing. Unsupported targets are rejected. Native Visio compatibility is not verified. Keep your original file.</p><p data-edit-target></p><label for=\"edit-text\">Selected shape text</label><textarea id=\"edit-text\" rows=\"3\" spellcheck=\"true\" aria-describedby=\"edit-warning edit-target edit-status\"></textarea><div class=\"edit-actions\"><button type=\"button\" data-edit=\"apply\">Apply text</button><button type=\"button\" data-edit=\"cancel\">Cancel</button><button type=\"button\" data-edit=\"undo\">Undo</button><button type=\"button\" data-edit=\"redo\">Redo</button></div><p id=\"edit-status\" role=\"status\" aria-live=\"polite\"></p><p data-edit-error role=\"alert\" hidden></p><ul data-edit-diagnostics></ul><fieldset data-geometry><legend>Geometry (experimental)</legend><p>Pin X/Y use drawing inches, bottom-left origin, Y up. Resize holds the rotation pin fixed. Core rejects unsupported formulas, protected cells, unsafe group/master dependencies and referenced deletion. Native Visio reopen fidelity is unverified.</p><label>New rectangle ID <input data-geometry-field=\"id\" type=\"text\" maxlength=\"256\"></label><label>Rectangle text (optional) <input data-geometry-field=\"text\" type=\"text\" maxlength=\"1000000\"></label><label>Pin X (inches) <input data-geometry-field=\"x\" type=\"number\" step=\"any\"></label><label>Pin Y (inches) <input data-geometry-field=\"y\" type=\"number\" step=\"any\"></label><label>Width (inches) <input data-geometry-field=\"width\" type=\"number\" min=\"0\" step=\"any\"></label><label>Height (inches) <input data-geometry-field=\"height\" type=\"number\" min=\"0\" step=\"any\"></label><div class=\"edit-actions\"><button type=\"button\" data-geometry-action=\"create-rectangle\">Create rectangle</button><button type=\"button\" data-geometry-action=\"move-shape\">Move selected</button><button type=\"button\" data-geometry-action=\"resize-shape\">Resize selected</button><button type=\"button\" data-geometry-action=\"delete-shape\">Delete selected</button></div><p data-geometry-error role=\"alert\" hidden></p></fieldset></details><details class=\"layer-controls\" hidden><summary>Layers</summary><p>Display changes only. SVG and print snapshots use saved visibility. Guides, NoShow and unknown hidden reasons remain hidden.</p><div data-layer-list></div><p data-layer-status role=\"status\"></p><button type=\"button\" data-layer-reset=\"all\">Reset all layers</button></details>\n <details class=\"notes inspector-card\"><summary>Compatibility notes</summary><ul></ul></details>\n </div>\n </aside>\n</div>";
8
8
  export type TaskPane = 'shapes' | 'inspector';
9
9
  /** Presentation state stays local; page navigation uses the same controller as every binding. */
10
10
  export declare class ViewerChrome {
@@ -2,6 +2,7 @@ import type { ViewerController, ViewerState } from './controller.js';
2
2
  import { type VisioRibbonAction, type CanvasTool } from './ribbon-action.js';
3
3
  import type { Rulers } from './viewer-ruler.js';
4
4
  import { type ClipboardOperation } from './viewer-clipboard.js';
5
+ import { ViewerLayoutCommands } from './viewer-layout-commands.js';
5
6
  export type { CanvasTool } from './ribbon-action.js';
6
7
  interface CommandHost {
7
8
  root: ShadowRoot;
@@ -14,6 +15,10 @@ interface CommandHost {
14
15
  focusSearch(): void;
15
16
  focusReplace?(): void;
16
17
  togglePanZoom(): void;
18
+ /** Visio's Presentation Mode (F5). */
19
+ present?(): void;
20
+ /** True while Presentation Mode owns the screen. */
21
+ presenting?(): boolean;
17
22
  toggleSizePosition(): void;
18
23
  /** Transient command feedback for the status bar; document text is never interpreted as markup. */
19
24
  announce(message: string): void;
@@ -27,6 +32,7 @@ interface CommandHost {
27
32
  export declare class ViewerCommands {
28
33
  #private;
29
34
  private readonly host;
35
+ readonly layoutCommands: ViewerLayoutCommands;
30
36
  constructor(host: CommandHost);
31
37
  get tool(): CanvasTool;
32
38
  /** Browser clipboard transport used by the element's public clipboard methods. */
@@ -0,0 +1,17 @@
1
+ import type { VisioComment, VisioDocument, VisioPage, VisioShape } from 'ooxml-core/visio';
2
+ import type { OfficeCommentThread } from '../controls.js';
3
+ /** The conversation of the comments on the page itself; shape conversations are `shape:<id>`. */
4
+ export declare const PAGE_THREAD = "page";
5
+ export declare const commentThreadId: (comment: Pick<VisioComment, 'shapeId'>) => string;
6
+ export declare const threadShapeId: (thread: string) => string | undefined;
7
+ export declare function findCommentShape(shapes: readonly VisioShape[], id: string): VisioShape | undefined;
8
+ /**
9
+ * The page's comments as shared-pane threads: Visio's comments are flat, so the comments on one
10
+ * shape (or on the page itself) read as one conversation, oldest first in saved order.
11
+ */
12
+ export declare function visioCommentThreads(document: VisioDocument, page: VisioPage): OfficeCommentThread[];
13
+ /**
14
+ * Speech-bubble count markers at the top right of commented shapes (a nested shape uses its
15
+ * top-level shape) and at the page's top left corner, drawn in screen pixels on the paper SVG.
16
+ */
17
+ export declare function drawCommentMarkers(svg: SVGSVGElement, document: VisioDocument, page: VisioPage, zoom: number): void;
@@ -0,0 +1,25 @@
1
+ import type { OfficeUiCommentsPane } from '../comments/comments-pane.js';
2
+ import type { ViewerController, ViewerState } from './controller.js';
3
+ export { visioCommentThreads } from './viewer-comment-threads.js';
4
+ type Run = (action: () => Promise<void>, success: string) => void;
5
+ /**
6
+ * Review comments: the shared comments pane in a side pane, comment markers on the canvas, and
7
+ * the add, reply, edit, delete and resolve edits. The author is the shared Office profile name.
8
+ */
9
+ export declare class ViewerComments {
10
+ #private;
11
+ private readonly root;
12
+ private readonly viewport;
13
+ private readonly controller;
14
+ private readonly announce;
15
+ private readonly run;
16
+ readonly host: HTMLElement;
17
+ readonly pane: OfficeUiCommentsPane;
18
+ constructor(root: ShadowRoot, viewport: HTMLElement, controller: ViewerController, announce: (message: string) => void, run: Run);
19
+ get open(): boolean;
20
+ show(open?: boolean): void;
21
+ /** Review > New Comment (or the page menu's Add Comment): open the pane at its new-comment box. */
22
+ newComment(onPage: boolean): void;
23
+ wire(): () => void;
24
+ render(state: ViewerState): void;
25
+ }
@@ -0,0 +1,31 @@
1
+ import type { ViewerController, ViewerState } from './controller.js';
2
+ export interface SelectedConnectionPoint {
3
+ pageId: string;
4
+ shapeId: string;
5
+ index: number;
6
+ }
7
+ /**
8
+ * View > Visual Aids > Connection Points (Visio's blue x markers) and Home > Tools > Connection
9
+ * Point (Ctrl+Shift+1): a click on a local 2D shape adds a point there, a click on a point selects
10
+ * it, and Delete removes the selected point. Edits go through the core and undo like any other.
11
+ */
12
+ export declare class ViewerConnectionPoints {
13
+ #private;
14
+ private readonly viewport;
15
+ private readonly controller;
16
+ private readonly options;
17
+ constructor(viewport: HTMLElement, controller: ViewerController, options: {
18
+ active(): boolean;
19
+ /** Other tools that show points while they run (the Connector tool). */
20
+ showing(): boolean;
21
+ announce(message: string): void;
22
+ });
23
+ get visible(): boolean;
24
+ get selected(): SelectedConnectionPoint | undefined;
25
+ toggle(): void;
26
+ /** Draw the markers in the page's SVG; markers are presentation only and never exported. */
27
+ render(state: ViewerState): void;
28
+ wire(): () => void;
29
+ /** Remove the selected point; returns false when no point is selected. */
30
+ deleteSelected(): boolean;
31
+ }
@@ -0,0 +1,24 @@
1
+ import { type VisioConnectorRoute } from 'ooxml-core/visio';
2
+ import type { ViewerController, ViewerState } from './controller.js';
3
+ import type { VisioRibbonAction } from './ribbon-action.js';
4
+ /**
5
+ * The connector style: Design > Connectors restyles the selected connectors and sets the style
6
+ * of new ones; Insert > Connector sets the style and arms the Connector tool. New connectors are
7
+ * right-angle, as Visio's default dynamic connector.
8
+ */
9
+ export declare class ViewerConnectorRoutes {
10
+ #private;
11
+ private readonly root;
12
+ private readonly controller;
13
+ private readonly host;
14
+ constructor(root: ShadowRoot, controller: ViewerController, host: {
15
+ setTool(tool: 'connector'): void;
16
+ edit(run: () => Promise<void>, message: string): void;
17
+ announce(message: string): void;
18
+ });
19
+ get route(): VisioConnectorRoute;
20
+ run(action: Extract<VisioRibbonAction, {
21
+ type: 'connector-route';
22
+ }>): void;
23
+ render(state: ViewerState): void;
24
+ }
@@ -0,0 +1,42 @@
1
+ import type { VisioConnectorRoute, VisioPage } from 'ooxml-core/visio';
2
+ import type { ViewerController, ViewerState } from './controller.js';
3
+ /** What an end released at the pointer would glue to. */
4
+ export interface ConnectorGlueHit {
5
+ shapeId: string;
6
+ /** A connection point of the shape (point-to-point glue); otherwise the shape itself. */
7
+ point?: number;
8
+ x?: number;
9
+ y?: number;
10
+ }
11
+ /** A page shape the core can glue to: a visible, local, top-level 2D shape. */
12
+ export declare function connectorGlueTarget(page: VisioPage, element: Element | null): string | undefined;
13
+ /**
14
+ * The glue target under a client point: the nearest connection point within a few pixels of it,
15
+ * else the shape under it. Pointer capture retargets events, so the point itself is hit-tested.
16
+ */
17
+ export declare function connectorGlueAt(viewport: HTMLElement, page: VisioPage, event: Pick<PointerEvent, 'clientX' | 'clientY' | 'target'>, zoom: number): ConnectorGlueHit | undefined;
18
+ /**
19
+ * Home > Tools > Connector (Ctrl+3). A drag draws a dynamic connector in the current route
20
+ * (right-angle by default); ends released on shapes glue to them, ends released on a connection
21
+ * point glue to that point. The shape (and point) under the pointer is highlighted.
22
+ */
23
+ export declare class ViewerConnectorTool {
24
+ #private;
25
+ private readonly viewport;
26
+ private readonly controller;
27
+ private readonly options;
28
+ constructor(viewport: HTMLElement, controller: ViewerController, options: {
29
+ active(): boolean;
30
+ announce(message: string): void;
31
+ /** Route for new connectors (Design > Connectors, Insert > Connector). */
32
+ route?(): VisioConnectorRoute;
33
+ });
34
+ get drawing(): boolean;
35
+ /** The shape currently highlighted as a glue target, for tests and status text. */
36
+ get target(): string | undefined;
37
+ /** The connection point currently targeted, if any. */
38
+ get targetPoint(): number | undefined;
39
+ cancel(): void;
40
+ render(state: ViewerState): void;
41
+ wire(): () => void;
42
+ }
@@ -0,0 +1,31 @@
1
+ import type { Workbook } from 'ooxml-core/xlsx';
2
+ import { type VisioDataTable } from 'ooxml-core/visio/ui';
3
+ import { InsertDialog } from './viewer-insert-dialog.js';
4
+ /** Largest workbook or CSV read for import (the drawing package limit is 32 MiB too). */
5
+ export declare const DATA_IMPORT_MAX_BYTES: number;
6
+ /** A local File System Access handle, when the browser offers one. */
7
+ export interface DataFileHandle {
8
+ getFile(): Promise<File>;
9
+ }
10
+ export interface PickedFile {
11
+ file: File;
12
+ handle?: DataFileHandle;
13
+ }
14
+ /** How a recordset was read, so Refresh All can read it the same way. */
15
+ export interface DataSourceOptions {
16
+ sheet: number;
17
+ range: string;
18
+ header: boolean;
19
+ }
20
+ /** Read a workbook or CSV through the shared xlsx loader (loaded on first use). */
21
+ export declare function readWorkbook(file: File): Promise<Workbook>;
22
+ export declare function readTable(workbook: Workbook, options: DataSourceOptions): VisioDataTable;
23
+ /** Local file choice: the File System Access picker when present (Refresh can reuse it), else an input. */
24
+ export declare class DataFilePicker {
25
+ #private;
26
+ readonly input: HTMLInputElement;
27
+ constructor(root: ShadowRoot);
28
+ pick(): Promise<PickedFile | undefined>;
29
+ }
30
+ /** Custom Import: name, sheet, optional range and whether the first row holds headers. */
31
+ export declare function createImportDialog(root: ShadowRoot, press: (button: string) => void): InsertDialog;
@@ -0,0 +1,25 @@
1
+ import type { ViewerController, ViewerState } from './controller.js';
2
+ import { InsertDialog } from './viewer-insert-dialog.js';
3
+ type Run = (action: () => Promise<void>, success: string) => void;
4
+ /**
5
+ * The External Data window and its links: drag rows onto shapes, link selected rows to selected
6
+ * shapes, link automatically by a key column, unlink and remove recordsets.
7
+ */
8
+ export declare class ViewerDataLinks {
9
+ #private;
10
+ private readonly root;
11
+ private readonly controller;
12
+ private readonly announce;
13
+ private readonly run;
14
+ readonly pane: HTMLElement;
15
+ readonly autoLink: InsertDialog;
16
+ /** Refresh All, supplied by the Data tab. */
17
+ onRefresh: () => void;
18
+ constructor(root: ShadowRoot, controller: ViewerController, announce: (message: string) => void, run: Run);
19
+ get activeId(): string | undefined;
20
+ toggle(): void;
21
+ show(id?: string): void;
22
+ wire(viewport: HTMLElement): () => void;
23
+ render(state: ViewerState): void;
24
+ }
25
+ export {};
@@ -0,0 +1,23 @@
1
+ import type { ViewerController } from './controller.js';
2
+ import type { InsertDialog } from './viewer-insert-dialog.js';
3
+ import { DataFilePicker } from './viewer-data-import.js';
4
+ import type { ViewerDataLinks } from './viewer-data-links.js';
5
+ type Run = (action: () => Promise<void>, success: string) => void;
6
+ /**
7
+ * Quick Import, Custom Import and Refresh All. A recordset remembers how it was read and, when
8
+ * the browser offers one, its File System Access handle; without a handle Refresh asks for the
9
+ * file again, because a page cannot re-read a local path by itself.
10
+ */
11
+ export declare class ViewerDataSources {
12
+ #private;
13
+ private readonly controller;
14
+ private readonly announce;
15
+ private readonly run;
16
+ private readonly links;
17
+ readonly picker: DataFilePicker;
18
+ readonly importer: InsertDialog;
19
+ constructor(root: ShadowRoot, controller: ViewerController, announce: (message: string) => void, run: Run, links: ViewerDataLinks);
20
+ import(custom: boolean): Promise<void>;
21
+ refresh(): Promise<void>;
22
+ }
23
+ export {};
@@ -0,0 +1,17 @@
1
+ import type { VisioDataRecordset } from 'ooxml-core/visio';
2
+ /** Drag payload of External Data rows: `{ recordsetId, rowIds }` as JSON. */
3
+ export declare const DATA_ROW_MIME = "application/x-visio-viewer-data-row";
4
+ export type DataWindowAction = 'link' | 'auto-link' | 'unlink' | 'refresh' | 'remove' | 'close';
5
+ /** Visio's External Data window: a docked grid of the drawing's saved recordsets. */
6
+ export declare function createExternalDataWindow(doc: Document): HTMLElement;
7
+ export interface DataWindowView {
8
+ recordsets: readonly VisioDataRecordset[];
9
+ active: VisioDataRecordset | undefined;
10
+ selectedRows: ReadonlySet<string>;
11
+ /** Rows linked to the selected shapes, highlighted like Visio's linked-row marker. */
12
+ currentRows: ReadonlySet<string>;
13
+ editable: boolean;
14
+ shapesSelected: boolean;
15
+ }
16
+ /** Sync the pane with the drawing; the grid is rebuilt only when the recordset changes. */
17
+ export declare function renderExternalDataWindow(pane: HTMLElement, view: DataWindowView): void;
@@ -0,0 +1,28 @@
1
+ import type { ViewerController, ViewerState } from './controller.js';
2
+ import type { VisioDataCommand } from './ribbon-action.js';
3
+ import { InsertDialog } from './viewer-insert-dialog.js';
4
+ import { ViewerDataSources } from './viewer-data-sources.js';
5
+ import { ViewerDataLinks } from './viewer-data-links.js';
6
+ import { ViewerShapeData } from './viewer-shape-data.js';
7
+ type Run = (action: () => Promise<void>, success: string) => void;
8
+ /**
9
+ * Visio's Data tab: Quick and Custom Import of a local workbook or CSV into a saved recordset,
10
+ * Refresh All, the External Data window with row linking, data graphics, a legend and the
11
+ * Define Shape Data dialog. Documents stay local; nothing is fetched.
12
+ */
13
+ export declare class ViewerData {
14
+ #private;
15
+ private readonly root;
16
+ private readonly controller;
17
+ private readonly announce;
18
+ private readonly run;
19
+ readonly sources: ViewerDataSources;
20
+ readonly graphics: InsertDialog;
21
+ readonly links: ViewerDataLinks;
22
+ readonly shapeData: ViewerShapeData;
23
+ constructor(root: ShadowRoot, controller: ViewerController, announce: (message: string) => void, run: Run);
24
+ handle(command: VisioDataCommand): void;
25
+ wire(viewport: HTMLElement): () => void;
26
+ render(state: ViewerState): void;
27
+ }
28
+ export {};
@@ -0,0 +1,17 @@
1
+ import type { ViewerController, ViewerState } from './controller.js';
2
+ import type { VisioDiagramPartAction } from './ribbon-action.js';
3
+ import { type DiagramPart } from './ribbon-diagram-parts.js';
4
+ /**
5
+ * Insert > Container and Callout (and the shape menu's Container): one core edit each, so undo
6
+ * restores the page in one step. Availability follows the selection; core admission decides.
7
+ */
8
+ export declare class ViewerDiagramParts {
9
+ private readonly root;
10
+ private readonly controller;
11
+ private readonly edit;
12
+ private readonly revealText;
13
+ constructor(root: ShadowRoot, controller: ViewerController, edit: (run: () => Promise<void>, message: string) => void, revealText: () => void);
14
+ reason(state: ViewerState, part: DiagramPart): string | undefined;
15
+ run(action: VisioDiagramPartAction): void;
16
+ render(state: ViewerState): void;
17
+ }
@@ -0,0 +1,31 @@
1
+ export type ViewerDialogElement = HTMLElement & {
2
+ open: boolean;
3
+ show(): void;
4
+ close(): void;
5
+ };
6
+ type Button = HTMLElement & {
7
+ disabled: boolean;
8
+ };
9
+ /**
10
+ * A Visio command dialog on the shared `office-ui-dialog` shell: a body for the caller's
11
+ * controls, an alert line and footer buttons. Document text is only ever set as text.
12
+ */
13
+ export declare class ViewerDialog {
14
+ readonly dialog: ViewerDialogElement;
15
+ readonly body: HTMLElement;
16
+ readonly error: HTMLElement;
17
+ readonly buttons: Map<string, Button>;
18
+ constructor(root: ShadowRoot, className: string, heading: string, buttons: readonly string[], press: (button: string) => void);
19
+ get open(): boolean;
20
+ show(): void;
21
+ close(): void;
22
+ busy(value: boolean): void;
23
+ }
24
+ /** A labelled native checkbox or radio; `label` is plain text. */
25
+ export declare function choice(doc: Document, type: 'checkbox' | 'radio', name: string, value: string, label: string): {
26
+ row: HTMLLabelElement;
27
+ input: HTMLInputElement;
28
+ };
29
+ /** A fieldset with a plain-text legend. */
30
+ export declare function fieldset(doc: Document, legend: string, ...children: Node[]): HTMLFieldSetElement;
31
+ export {};
@@ -1,5 +1,5 @@
1
- import type { VisioPage, VisioBasicShape } from 'ooxml-core/visio';
2
- import { type VisioDrawingPoint } from 'ooxml-core/visio/ui';
1
+ import type { VisioPage, VisioOutlineShape } from 'ooxml-core/visio';
2
+ import { type VisioPathTool, type VisioDrawingPoint } from 'ooxml-core/visio/ui';
3
3
  import type { ViewerController, ViewerState } from './controller.js';
4
4
  export { pagePoint } from './viewer-page-point.js';
5
5
  export { visioNextShapeId as nextShapeId } from 'ooxml-core/visio/ui';
@@ -12,18 +12,26 @@ export declare function insertMaster(controller: ViewerController, page: VisioPa
12
12
  kind: 'ellipse';
13
13
  } | {
14
14
  kind: 'rectangle';
15
- shape: VisioBasicShape;
15
+ shape: VisioOutlineShape;
16
16
  }, centre: VisioDrawingPoint, size: {
17
17
  width: number;
18
18
  height: number;
19
19
  }): Promise<string>;
20
+ /**
21
+ * Quick Style a dropped master gets: variant colour 1 (Accent 1 in every built-in theme's first
22
+ * variant, and in the theme-less Office colours), theme style 4, so drops follow Design > Variants.
23
+ */
24
+ export declare const MASTER_QUICK_STYLE: {
25
+ readonly color: 100;
26
+ readonly matrix: 4;
27
+ };
20
28
  export declare function insertLine(controller: ViewerController, page: VisioPage, begin: VisioDrawingPoint, end: VisioDrawingPoint): Promise<string>;
21
29
  /** Core-backed ordinary shape drawing with one captured creation transaction. */
22
30
  export declare class ShapeDrawTool {
23
31
  #private;
24
32
  private readonly controller;
25
33
  constructor(viewport: HTMLElement, controller: ViewerController, options: {
26
- tool(): 'rectangle' | 'ellipse' | 'line' | undefined;
34
+ tool(): 'rectangle' | 'ellipse' | 'line' | VisioPathTool | undefined;
27
35
  announce(message: string): void;
28
36
  });
29
37
  get drawing(): boolean;
@@ -1,5 +1,5 @@
1
1
  import type { VisioPage, VisioDocument } from 'ooxml-core/visio';
2
- import { type VisioDrawingPoint, type VisioDrawingTool } from 'ooxml-core/visio/ui';
2
+ import { type VisioDrawingPoint, type VisioDrawingTool, type VisioPathTool } from 'ooxml-core/visio/ui';
3
3
  import type { ViewerController, ViewerState } from './controller.js';
4
4
  import type { ViewerCreationToken } from './creation-token.js';
5
5
  export interface DrawingGesture {
@@ -8,9 +8,11 @@ export interface DrawingGesture {
8
8
  page: VisioPage;
9
9
  document: VisioDocument;
10
10
  start: VisioDrawingPoint;
11
- kind: VisioDrawingTool;
11
+ kind: VisioDrawingTool | VisioPathTool;
12
+ /** Pointer samples of a Freeform, Pencil or Arc stroke, start first. */
13
+ points: VisioDrawingPoint[];
12
14
  token: ViewerCreationToken;
13
- preview: SVGRectElement | SVGEllipseElement | SVGLineElement;
15
+ preview: SVGRectElement | SVGEllipseElement | SVGLineElement | SVGPathElement;
14
16
  sourceGeneration: number;
15
17
  selection: ViewerState['selectedShapes'];
16
18
  zoom: number;
@@ -23,7 +25,7 @@ export declare class ViewerDrawingGesture {
23
25
  private readonly controller;
24
26
  private readonly options;
25
27
  constructor(viewport: HTMLElement, controller: ViewerController, options: {
26
- tool(): VisioDrawingTool | undefined;
28
+ tool(): VisioDrawingTool | VisioPathTool | undefined;
27
29
  finish(drag: DrawingGesture, end: VisioDrawingPoint): Promise<void>;
28
30
  existingShape?(event: PointerEvent): boolean;
29
31
  announce(message: string): void;
@@ -1,6 +1,6 @@
1
1
  import type { ViewerController, ViewerState } from './controller.js';
2
2
  /** Static markup only. Document text is assigned exclusively through value/textContent. */
3
- export declare const editControlsTemplate = "<details class=\"edit-controls\"><summary>Edit diagram (experimental)</summary><p id=\"edit-warning\">Experimental source-backed editing. Unsupported targets are rejected. Native Visio compatibility is not verified. Keep your original file.</p><p data-edit-target></p><label for=\"edit-text\">Selected shape text</label><textarea id=\"edit-text\" rows=\"3\" aria-describedby=\"edit-warning edit-target edit-status\"></textarea><div class=\"edit-actions\"><button type=\"button\" data-edit=\"apply\">Apply text</button><button type=\"button\" data-edit=\"cancel\">Cancel</button><button type=\"button\" data-edit=\"undo\">Undo</button><button type=\"button\" data-edit=\"redo\">Redo</button></div><p id=\"edit-status\" role=\"status\" aria-live=\"polite\"></p><p data-edit-error role=\"alert\" hidden></p><ul data-edit-diagnostics></ul><fieldset data-geometry><legend>Geometry (experimental)</legend><p>Pin X/Y use drawing inches, bottom-left origin, Y up. Resize holds the rotation pin fixed. Core rejects unsupported formulas, protected cells, unsafe group/master dependencies and referenced deletion. Native Visio reopen fidelity is unverified.</p><label>New rectangle ID <input data-geometry-field=\"id\" type=\"text\" maxlength=\"256\"></label><label>Rectangle text (optional) <input data-geometry-field=\"text\" type=\"text\" maxlength=\"1000000\"></label><label>Pin X (inches) <input data-geometry-field=\"x\" type=\"number\" step=\"any\"></label><label>Pin Y (inches) <input data-geometry-field=\"y\" type=\"number\" step=\"any\"></label><label>Width (inches) <input data-geometry-field=\"width\" type=\"number\" min=\"0\" step=\"any\"></label><label>Height (inches) <input data-geometry-field=\"height\" type=\"number\" min=\"0\" step=\"any\"></label><div class=\"edit-actions\"><button type=\"button\" data-geometry-action=\"create-rectangle\">Create rectangle</button><button type=\"button\" data-geometry-action=\"move-shape\">Move selected</button><button type=\"button\" data-geometry-action=\"resize-shape\">Resize selected</button><button type=\"button\" data-geometry-action=\"delete-shape\">Delete selected</button></div><p data-geometry-error role=\"alert\" hidden></p></fieldset></details>";
3
+ export declare const editControlsTemplate = "<details class=\"edit-controls\"><summary>Edit diagram (experimental)</summary><p id=\"edit-warning\">Experimental source-backed editing. Unsupported targets are rejected. Native Visio compatibility is not verified. Keep your original file.</p><p data-edit-target></p><label for=\"edit-text\">Selected shape text</label><textarea id=\"edit-text\" rows=\"3\" spellcheck=\"true\" aria-describedby=\"edit-warning edit-target edit-status\"></textarea><div class=\"edit-actions\"><button type=\"button\" data-edit=\"apply\">Apply text</button><button type=\"button\" data-edit=\"cancel\">Cancel</button><button type=\"button\" data-edit=\"undo\">Undo</button><button type=\"button\" data-edit=\"redo\">Redo</button></div><p id=\"edit-status\" role=\"status\" aria-live=\"polite\"></p><p data-edit-error role=\"alert\" hidden></p><ul data-edit-diagnostics></ul><fieldset data-geometry><legend>Geometry (experimental)</legend><p>Pin X/Y use drawing inches, bottom-left origin, Y up. Resize holds the rotation pin fixed. Core rejects unsupported formulas, protected cells, unsafe group/master dependencies and referenced deletion. Native Visio reopen fidelity is unverified.</p><label>New rectangle ID <input data-geometry-field=\"id\" type=\"text\" maxlength=\"256\"></label><label>Rectangle text (optional) <input data-geometry-field=\"text\" type=\"text\" maxlength=\"1000000\"></label><label>Pin X (inches) <input data-geometry-field=\"x\" type=\"number\" step=\"any\"></label><label>Pin Y (inches) <input data-geometry-field=\"y\" type=\"number\" step=\"any\"></label><label>Width (inches) <input data-geometry-field=\"width\" type=\"number\" min=\"0\" step=\"any\"></label><label>Height (inches) <input data-geometry-field=\"height\" type=\"number\" min=\"0\" step=\"any\"></label><div class=\"edit-actions\"><button type=\"button\" data-geometry-action=\"create-rectangle\">Create rectangle</button><button type=\"button\" data-geometry-action=\"move-shape\">Move selected</button><button type=\"button\" data-geometry-action=\"resize-shape\">Resize selected</button><button type=\"button\" data-geometry-action=\"delete-shape\">Delete selected</button></div><p data-geometry-error role=\"alert\" hidden></p></fieldset></details>";
4
4
  export declare class ViewerEditControls {
5
5
  #private;
6
6
  readonly panel: HTMLDetailsElement;
@@ -41,6 +41,11 @@ export declare class VisioViewerElement extends BaseElement {
41
41
  redo(): Promise<void>;
42
42
  cancelEdit(): void;
43
43
  exportVsdx(): ReturnType<ViewerController['exportVsdx']>;
44
+ /** Start Visio's Presentation Mode on the current foreground page (F5). */
45
+ startPresentation(): void;
46
+ /** Leave Presentation Mode; the drawing window's page, zoom and selection are unchanged. */
47
+ exitPresentation(): void;
48
+ get presenting(): boolean;
44
49
  fit(): void;
45
50
  setLayerVisibility(pageId: string, layerId: string, visible: boolean | null): void;
46
51
  resetLayerVisibility(pageId?: string): void;
@@ -0,0 +1,17 @@
1
+ import type { ViewerController, ViewerState } from './controller.js';
2
+ import { ViewerDialog } from './viewer-dialog.js';
3
+ /**
4
+ * View > Task Panes > Drawing Explorer: a tree of the drawing's pages and, for the current page,
5
+ * its layers, shapes (with group members) and masters. Activating a page shows it; a shape,
6
+ * layer or master selects the matching top-level shapes. Names are plain text.
7
+ */
8
+ export declare class ViewerExplorer {
9
+ #private;
10
+ private readonly root;
11
+ private readonly controller;
12
+ private readonly announce;
13
+ readonly dialog: ViewerDialog;
14
+ constructor(root: ShadowRoot, controller: ViewerController, announce: (message: string) => void);
15
+ open(): void;
16
+ render(state: ViewerState): void;
17
+ }
@@ -0,0 +1,17 @@
1
+ import type { VisioDocument } from 'ooxml-core/visio';
2
+ /** Raster resolution of PDF and PNG output; large pages are scaled down to the canvas cap. */
3
+ export declare const EXPORT_DPI = 150;
4
+ /** Pixel size of a page at `dpi`, scaled down so neither side exceeds the canvas cap. */
5
+ export declare function rasterSize(widthIn: number, heightIn: number, dpi?: number): {
6
+ width: number;
7
+ height: number;
8
+ };
9
+ /** Draw one exported page SVG on a white canvas. Resolves once the image has loaded. */
10
+ export declare function rasterizePage(doc: Document, model: VisioDocument, pageIndex: number, dpi?: number): Promise<HTMLCanvasElement>;
11
+ /** The current page as a PNG picture. */
12
+ export declare function exportPagePng(doc: Document, model: VisioDocument, pageIndex: number): Promise<Blob>;
13
+ /**
14
+ * Every foreground page (with its background pages) as one raster PDF page of the drawing's
15
+ * page size. Text is not selectable: the pages are pictures, not vector PDF.
16
+ */
17
+ export declare function exportDocumentPdf(doc: Document, model: VisioDocument): Promise<Blob>;
@@ -0,0 +1,20 @@
1
+ import type { ViewerController, ViewerState } from './controller.js';
2
+ export type FormatPainterMode = 'once' | 'sticky' | 'cancel';
3
+ /**
4
+ * Visio's Format Painter: a click copies the selected shape's formatting and applies it once to
5
+ * the next selection; a double click keeps it on until Escape or another click on the button.
6
+ * Each application is one atomic, undoable edit of existing core format commands.
7
+ */
8
+ export declare class ViewerFormatPainter {
9
+ #private;
10
+ private readonly root;
11
+ private readonly controller;
12
+ private readonly announce;
13
+ private readonly edit;
14
+ constructor(root: ShadowRoot, controller: ViewerController, announce: (message: string) => void, edit: (run: () => Promise<void>, success: string) => void);
15
+ get armed(): boolean;
16
+ /** Double clicking the button keeps the painter on (the second click arrives first). */
17
+ wire(): () => void;
18
+ run(mode: FormatPainterMode): void;
19
+ render(state: ViewerState): void;
20
+ }
@@ -0,0 +1,16 @@
1
+ import type { ViewerController, ViewerState } from './controller.js';
2
+ /**
3
+ * Home > Shape Styles dialog launcher: Visio's Format Shape with Fill, Line and Effects sections.
4
+ * Every change becomes one undoable format-shape edit per selected shape.
5
+ */
6
+ export declare class ViewerFormatShape {
7
+ #private;
8
+ private readonly root;
9
+ private readonly controller;
10
+ private readonly announce;
11
+ constructor(root: ShadowRoot, controller: ViewerController, announce: (message: string) => void);
12
+ wire(): () => void;
13
+ show(): void;
14
+ close(): void;
15
+ render(state: ViewerState): void;
16
+ }
@@ -0,0 +1,13 @@
1
+ import type { ViewerController, ViewerState } from './controller.js';
2
+ type Operation = 'group' | 'ungroup';
3
+ /** Group and Ungroup availability; the controller owns the transaction and new selection. */
4
+ export declare class ViewerGrouping {
5
+ private readonly root;
6
+ private readonly controller;
7
+ private readonly edit;
8
+ constructor(root: ShadowRoot, controller: ViewerController, edit: (run: () => Promise<void>, message: string) => void);
9
+ private reason;
10
+ run(operation: Operation): void;
11
+ render(state: ViewerState): void;
12
+ }
13
+ export {};