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,29 @@
1
+ import type { VisioBackgroundStyle, VisioBorderStyle } from 'ooxml-core/visio';
2
+ /** The Page Setup dialog's tabs, as Visio orders them. */
3
+ export type VisioPageSetupTab = 'print' | 'size' | 'scale' | 'properties';
4
+ /** Design > Page Setup, Backgrounds and Borders & Titles, and View > Page Breaks. */
5
+ export type VisioPageSetupCommand = {
6
+ op: 'orientation';
7
+ value: 'portrait' | 'landscape';
8
+ } | {
9
+ op: 'size';
10
+ id: string;
11
+ } | {
12
+ op: 'fit';
13
+ } | {
14
+ op: 'auto-size';
15
+ } | {
16
+ op: 'dialog';
17
+ tab?: VisioPageSetupTab;
18
+ } | {
19
+ op: 'background';
20
+ style: VisioBackgroundStyle | null;
21
+ } | {
22
+ op: 'background-color';
23
+ color: string;
24
+ } | {
25
+ op: 'border';
26
+ style: VisioBorderStyle | null;
27
+ } | {
28
+ op: 'page-breaks';
29
+ };
@@ -0,0 +1,32 @@
1
+ import type { VisioPageSetupTab } from './page-setup-action.js';
2
+ export type SetupSelect = HTMLElement & {
3
+ value: string;
4
+ disabled: boolean;
5
+ options: {
6
+ value: string;
7
+ label: string;
8
+ disabled?: boolean;
9
+ }[];
10
+ };
11
+ export type SetupDialog = HTMLElement & {
12
+ open: boolean;
13
+ show(): void;
14
+ close(): void;
15
+ };
16
+ export type SetupButton = HTMLElement & {
17
+ disabled: boolean;
18
+ };
19
+ export type SetupField = 'paper' | 'print-orientation' | 'size-mode' | 'width' | 'height' | 'scale-mode' | 'scale-page' | 'scale-drawing' | 'scale-unit' | 'type' | 'name' | 'back-page';
20
+ export type SetupControl = HTMLInputElement | SetupSelect;
21
+ export declare const SETUP_TABS: readonly [VisioPageSetupTab, string][];
22
+ export declare const UNIT_INCHES: Record<string, number>;
23
+ /** Static structure of Visio's Page Setup dialog; values are filled in as text and properties. */
24
+ export declare function createPageSetupDialog(doc: Document): {
25
+ dialog: SetupDialog;
26
+ fields: Map<SetupField, SetupControl>;
27
+ error: HTMLParagraphElement;
28
+ tabs: Map<VisioPageSetupTab, HTMLButtonElement>;
29
+ panels: Map<VisioPageSetupTab, HTMLElement>;
30
+ ok: SetupButton;
31
+ cancel: SetupButton;
32
+ };
@@ -0,0 +1,41 @@
1
+ /** A Presentation Mode command produced by one key press. */
2
+ export type PresentationKeyAction = {
3
+ type: 'next';
4
+ } | {
5
+ type: 'previous';
6
+ } | {
7
+ type: 'first';
8
+ } | {
9
+ type: 'last';
10
+ }
11
+ /** Jump to a 1-based foreground page number typed before Enter. */
12
+ | {
13
+ type: 'goto';
14
+ page: number;
15
+ } | {
16
+ type: 'exit';
17
+ }
18
+ /** A digit was added to the pending page number. */
19
+ | {
20
+ type: 'buffering';
21
+ digits: string;
22
+ } | {
23
+ type: 'none';
24
+ };
25
+ /** Digits typed so far for "type a page number, then Enter". One per running presentation. */
26
+ export interface PresentationKeyBuffer {
27
+ digits: string;
28
+ }
29
+ /**
30
+ * Visio's Presentation Mode keys: Right, Down, Page Down, Space and Enter advance; Left, Up,
31
+ * Page Up and Backspace go back; Home and End jump to the first and last page; Escape exits;
32
+ * digits then Enter jump to that page. Chords are left alone. The PowerPoint slide-show map
33
+ * (`pptx/render/presentation-keymap`) adds pens, screens and menus Visio does not have, and
34
+ * lives in the separately compiled pptx project, so Visio keeps this small map.
35
+ */
36
+ export declare function mapPresentationKey(event: {
37
+ key: string;
38
+ ctrlKey?: boolean;
39
+ metaKey?: boolean;
40
+ altKey?: boolean;
41
+ }, buffer: PresentationKeyBuffer): PresentationKeyAction;
@@ -0,0 +1,10 @@
1
+ import type { VisioMatrix, VisioShape } from 'ooxml-core/visio';
2
+ /**
3
+ * Glow: the shape's outline in the glow colour, dilated by the glow size and blurred, drawn
4
+ * beneath the shape. Soft edges: the shape's geometry masked by its own eroded, blurred alpha.
5
+ * Reflection: a copy mirrored about the shape's bottom edge, faded by a gradient mask.
6
+ */
7
+ export declare function renderShapeEffects(shape: VisioShape, paths: readonly SVGPathElement[], defs: SVGDefsElement, world: VisioMatrix): {
8
+ below: SVGGElement[];
9
+ geometryFilter?: string;
10
+ };
@@ -0,0 +1,7 @@
1
+ import type { VisioMatrix, VisioShape } from 'ooxml-core/visio';
2
+ /**
3
+ * A shape's outer shadow: its geometry painted in the shadow colour, offset in page space and
4
+ * blurred, drawn beneath the shape. Offsets are page inches (Y up); the shape group may be
5
+ * rotated or flipped, so the offset is mapped back through the inverse of its world transform.
6
+ */
7
+ export declare function renderShadow(shape: VisioShape, paths: readonly SVGPathElement[], defs: SVGDefsElement, world: VisioMatrix): SVGGElement | undefined;
@@ -1,6 +1,7 @@
1
- import type { VisioShapeFormatEdit } from 'ooxml-core/visio';
2
- import type { VisioArrangement } from 'ooxml-core/visio/ui';
3
- export type CanvasTool = 'pointer' | 'rectangle' | 'ellipse' | 'line' | 'text';
1
+ import type { VisioBuiltInThemeId, VisioCalloutStyle, VisioChangeShapeTarget, VisioContainerStyle, VisioConnectorRoute, VisioShapeFormatEdit } from 'ooxml-core/visio';
2
+ import type { TextCaseMode, VisioArrangement, VisioRuleSetId, VisioLayoutStyle } from 'ooxml-core/visio/ui';
3
+ import type { VisioPageSetupCommand } from './page-setup-action.js';
4
+ export type CanvasTool = 'pointer' | 'connector' | 'connection-point' | 'rectangle' | 'ellipse' | 'line' | 'text' | 'freeform' | 'arc' | 'pencil';
4
5
  export type VisioFormattingAction = {
5
6
  type: 'text-toggle';
6
7
  property: 'bold' | 'italic' | 'underline' | 'strikethrough';
@@ -32,12 +33,63 @@ export type VisioFormattingAction = {
32
33
  } | {
33
34
  type: 'shape-format';
34
35
  patch: Omit<VisioShapeFormatEdit, 'type' | 'pageId' | 'shapeId'>;
36
+ }
37
+ /** A Glow Variations preset: its colour is the page theme's accent (1-6) when it is applied. */
38
+ | {
39
+ type: 'glow-preset';
40
+ size: number;
41
+ accent: number;
35
42
  } | {
36
43
  type: 'shape-order';
37
44
  order: 'front' | 'back' | 'forward' | 'backward';
45
+ } | {
46
+ type: 'change-case';
47
+ mode: TextCaseMode;
48
+ };
49
+ /** Text dialogs and tools: Home launchers and Text Block, Insert Symbol/Field, Review proofing. */
50
+ export type VisioTextFeature = 'text-dialog' | 'paragraph-dialog' | 'text-block' | 'symbol' | 'field' | 'spelling' | 'language';
51
+ /** Insert-tab items that act on the page or the selected shape. */
52
+ export type VisioInsertItem = 'picture' | 'link' | 'screen-tip';
53
+ /** Review and Process tab commands: comments, shape reports, diagram checks and subprocesses. */
54
+ export type VisioReviewCommand = 'new-comment' | 'page-comment' | 'comments-pane' | 'shape-reports' | 'check-diagram' | 'issues-window' | 'ignore-issue' | 'rule-set' | 'subprocess-new' | 'subprocess-existing' | 'subprocess-selection';
55
+ /** Insert > Diagram Parts: a container or callout in one of its styles. */
56
+ export type VisioDiagramPartAction = {
57
+ type: 'diagram-part';
58
+ part: 'container';
59
+ style: VisioContainerStyle;
60
+ } | {
61
+ type: 'diagram-part';
62
+ part: 'callout';
63
+ style: VisioCalloutStyle;
64
+ };
65
+ /** Data-tab commands: import, refresh, data graphics, legend, windows and Shape Data. */
66
+ export type VisioDataCommand = 'quick-import' | 'custom-import' | 'refresh' | 'graphic-text' | 'graphic-bar' | 'graphic-icon' | 'graphic-color' | 'graphic-remove' | 'legend' | 'external-data-window' | 'define-shape-data';
67
+ /** Arrangement, layout, layer, selection, view and output commands (viewer-layout and friends). */
68
+ export type VisioLayoutAction = {
69
+ type: 'auto-align';
70
+ } | {
71
+ type: 're-layout';
72
+ style: VisioLayoutStyle;
73
+ } | {
74
+ type: 'layout-options';
75
+ } | {
76
+ type: 'assign-layers';
77
+ } | {
78
+ type: 'select-by-type';
79
+ } | {
80
+ type: 'paste-special';
81
+ } | {
82
+ type: 'guides';
83
+ } | {
84
+ type: 'dynamic-grid';
85
+ } | {
86
+ type: 'drawing-explorer';
87
+ } | {
88
+ type: 'help';
89
+ topic: 'help' | 'training';
38
90
  };
39
91
  /** Every command the Visio ribbon, status bar or a shortcut can raise, as a `ribbon-action` event. */
40
- export type VisioRibbonAction = VisioFormattingAction | {
92
+ export type VisioRibbonAction = VisioFormattingAction | VisioLayoutAction | {
41
93
  type: 'arrange';
42
94
  operation: VisioArrangement;
43
95
  } | {
@@ -53,12 +105,33 @@ export type VisioRibbonAction = VisioFormattingAction | {
53
105
  type: 'cancel-drawing';
54
106
  } | {
55
107
  type: 'page-insert';
108
+ } | {
109
+ type: 'insert';
110
+ item: VisioInsertItem;
111
+ } | {
112
+ type: 'data';
113
+ command: VisioDataCommand;
114
+ } | {
115
+ type: 'text-feature';
116
+ feature: VisioTextFeature;
56
117
  } | {
57
118
  type: 'paint-properties';
119
+ } | {
120
+ type: 'format-shape-pane';
121
+ } | {
122
+ type: 'page-theme';
123
+ theme?: VisioBuiltInThemeId | 'none';
124
+ variant?: number;
58
125
  } | {
59
126
  type: 'delete';
60
127
  } | {
61
128
  type: 'duplicate';
129
+ } | {
130
+ type: 'format-painter';
131
+ mode: 'once' | 'sticky' | 'cancel';
132
+ } | {
133
+ type: 'grouping';
134
+ operation: 'group' | 'ungroup';
62
135
  } | {
63
136
  type: 'clipboard';
64
137
  operation: 'copy' | 'cut' | 'paste';
@@ -70,6 +143,9 @@ export type VisioRibbonAction = VisioFormattingAction | {
70
143
  type: 'flip';
71
144
  axis: 'horizontal' | 'vertical';
72
145
  } | {
146
+ type: 'change-shape';
147
+ shape: VisioChangeShapeTarget;
148
+ } | VisioDiagramPartAction | {
73
149
  type: 'pane';
74
150
  pane: 'shapes' | 'inspector';
75
151
  } | {
@@ -78,6 +154,14 @@ export type VisioRibbonAction = VisioFormattingAction | {
78
154
  focusText?: boolean;
79
155
  } | {
80
156
  type: 'grid';
157
+ } | {
158
+ type: 'connection-points';
159
+ }
160
+ /** Design > Connectors restyles the selection; Insert > Connector arms the tool. */
161
+ | {
162
+ type: 'connector-route';
163
+ route: VisioConnectorRoute;
164
+ scope: 'selection' | 'tool';
81
165
  } | {
82
166
  type: 'panZoom';
83
167
  } | {
@@ -86,6 +170,8 @@ export type VisioRibbonAction = VisioFormattingAction | {
86
170
  type: 'ruler';
87
171
  } | {
88
172
  type: 'fullscreen';
173
+ } | {
174
+ type: 'presentation';
89
175
  } | {
90
176
  type: 'zoom';
91
177
  mode: 'fit' | 'width' | 'actual';
@@ -99,6 +185,13 @@ export type VisioRibbonAction = VisioFormattingAction | {
99
185
  } | {
100
186
  type: 'page';
101
187
  step: 1 | -1;
188
+ } | {
189
+ type: 'page-setup';
190
+ command: VisioPageSetupCommand;
191
+ } | {
192
+ type: 'review';
193
+ command: VisioReviewCommand;
194
+ ruleSet?: VisioRuleSetId;
102
195
  };
103
196
  /** Event name shared by every ribbon control; detail is the typed action. */
104
197
  export declare const RIBBON_ACTION_EVENT = "ribbon-action";
@@ -0,0 +1,11 @@
1
+ import type { OfficeGalleryState, OfficeUiGallery } from '../ribbon/gallery.js';
2
+ /** Gallery state for the Basic Shapes; `reason` disables every tile and names why. */
3
+ export declare function changeShapeState(reason: string | undefined): OfficeGalleryState;
4
+ /**
5
+ * Home > Editing > Change Shape: the shared `office-ui-gallery` of the Basic Shapes masters. A
6
+ * pick raises `{ type: 'change-shape', shape }`; the viewer keeps `disabled` and the trigger's
7
+ * tooltip in step with the selection (`syncChangeShape`).
8
+ */
9
+ export declare function changeShapeGallery(doc: Document): OfficeUiGallery;
10
+ /** Enable the gallery, or disable it with the reason as its tooltip (as unsupported commands do). */
11
+ export declare function syncChangeShape(gallery: OfficeUiGallery, reason: string | undefined): void;
@@ -0,0 +1,14 @@
1
+ import { type VisioCalloutStyle, type VisioContainerStyle } from 'ooxml-core/visio';
2
+ import type { OfficeGalleryState, OfficeUiGallery } from '../ribbon/gallery.js';
3
+ export type DiagramPart = 'container' | 'callout';
4
+ export declare const CONTAINER_STYLE_NAMES: Record<VisioContainerStyle, string>;
5
+ export declare const CALLOUT_STYLE_NAMES: Record<VisioCalloutStyle, string>;
6
+ /** Gallery state for a diagram part; `reason` disables every tile and names why. */
7
+ export declare function diagramPartState(part: DiagramPart, reason: string | undefined): OfficeGalleryState;
8
+ /**
9
+ * Insert > Diagram Parts > Container or Callout: the shared `office-ui-gallery` of styles. A pick
10
+ * raises `{ type: 'diagram-part', ... }`; the viewer keeps it enabled per selection.
11
+ */
12
+ export declare function diagramPartGallery(doc: Document, part: DiagramPart): OfficeUiGallery;
13
+ /** Enable the gallery, or disable it with the reason as its tooltip. */
14
+ export declare function syncDiagramPart(gallery: OfficeUiGallery, part: DiagramPart, reason: string | undefined): void;
@@ -0,0 +1,11 @@
1
+ import type { OfficeGalleryState, OfficeUiGallery } from '../ribbon/gallery.js';
2
+ export declare function reLayoutState(reason: string | undefined): OfficeGalleryState;
3
+ /**
4
+ * Design > Layout > Re-Layout Page: a shared `office-ui-gallery` of the automatic layouts. A pick
5
+ * raises `{ type: 're-layout', style }`; the viewer keeps availability in step with the drawing.
6
+ */
7
+ export declare function reLayoutGallery(doc: Document): OfficeUiGallery;
8
+ /** Design > Layout with Visio's dialog launcher (the Layout dialog; synced by ViewerLayout). */
9
+ export declare function layoutGroup(doc: Document, children: readonly HTMLElement[]): HTMLElement;
10
+ /** Enable the gallery, or disable it with the reason as its tooltip. */
11
+ export declare function syncReLayout(gallery: OfficeUiGallery, reason: string | undefined): void;
@@ -1,12 +1,9 @@
1
+ export { buildProcessPanel, buildReviewPanel } from './ribbon-review.js';
1
2
  /** Visio's Insert tab: Pages, Illustrations, Diagram Parts, Links and Text. */
2
3
  export declare function buildInsertPanel(doc: Document, panel: HTMLElement): void;
3
4
  /** Visio's Design tab: Page Setup, Themes, Variants, Backgrounds and Layout. */
4
5
  export declare function buildDesignPanel(doc: Document, panel: HTMLElement): void;
5
6
  /** Visio's Data tab. Shape Data Window maps to the viewer's shape inspector. */
6
7
  export declare function buildDataPanel(doc: Document, panel: HTMLElement): void;
7
- /** Visio's Process tab. */
8
- export declare function buildProcessPanel(doc: Document, panel: HTMLElement): void;
9
- /** Visio's Review tab: Proofing, Language, Comments and Reports. */
10
- export declare function buildReviewPanel(doc: Document, panel: HTMLElement): void;
11
- /** Visio's Help tab. Help content, support and training are not bundled in this viewer. */
8
+ /** Visio's Help tab. Help and Show Training open the viewer guide; support is not connected. */
12
9
  export declare function buildHelpPanel(doc: Document, panel: HTMLElement): void;
@@ -0,0 +1,12 @@
1
+ import { type VisioBackgroundStyle, type VisioBorderStyle } from 'ooxml-core/visio';
2
+ import type { OfficeGalleryState, OfficeUiGallery } from '../ribbon/gallery.js';
3
+ /** Background colours offered by Design > Background Color. */
4
+ export declare const BACKGROUND_COLORS: readonly [readonly ["#FFFFFF", "White"], readonly ["#DEEBF7", "Light Blue"], readonly ["#E2F0D9", "Light Green"], readonly ["#FBE5D6", "Light Orange"], readonly ["#FFF2CC", "Light Gold"], readonly ["#EDEDED", "Light Gray"], readonly ["#44546A", "Dark Blue-Gray"]];
5
+ /** Design > Page Setup: Orientation, Size and Auto Size, with the Page Setup dialog launcher. */
6
+ export declare function pageSetupGroup(doc: Document): HTMLElement;
7
+ export declare function backgroundsState(reason: string | undefined, applied?: VisioBackgroundStyle | null): OfficeGalleryState;
8
+ export declare function bordersState(reason: string | undefined, applied?: VisioBorderStyle | null): OfficeGalleryState;
9
+ /** Enable a decoration gallery, or disable it with the reason as its tooltip. */
10
+ export declare function syncDecorationGallery(el: OfficeUiGallery, state: OfficeGalleryState, reason: string | undefined): void;
11
+ /** Design > Backgrounds: the Backgrounds and Borders & Titles galleries and Background Color. */
12
+ export declare function backgroundsGroup(doc: Document): HTMLElement;
@@ -37,6 +37,7 @@ export declare function stack(doc: Document, children: readonly HTMLElement[], h
37
37
  export declare function group(doc: Document, label: string, children: readonly HTMLElement[], options?: {
38
38
  className?: string;
39
39
  launcher?: string;
40
+ dialog?: string;
40
41
  }): HTMLElement;
41
42
  /** A labelled shared checkbox (Visio's View > Show options). */
42
43
  export declare function check(doc: Document, spec: CommandSpec): HTMLElement;
@@ -0,0 +1,4 @@
1
+ /** Visio's Process tab: Subprocess and Diagram Validation (this viewer's generic rules). */
2
+ export declare function buildProcessPanel(doc: Document, panel: HTMLElement): void;
3
+ /** Visio's Review tab: Proofing, Language, Comments and Reports. */
4
+ export declare function buildReviewPanel(doc: Document, panel: HTMLElement): void;
@@ -1,34 +1,62 @@
1
1
  import type { ViewerController } from './controller.js';
2
- import type { VisioRibbonAction, CanvasTool, VisioFormattingAction } from './ribbon-action.js';
2
+ import type { VisioRibbonAction, CanvasTool, VisioFormattingAction, VisioInsertItem, VisioDataCommand, VisioLayoutAction, VisioTextFeature } from './ribbon-action.js';
3
3
  /** The controllers a ribbon action can reach. The element supplies each one. */
4
4
  export interface RibbonTargets {
5
5
  controller: ViewerController;
6
6
  history(key: 'undo' | 'redo'): void;
7
7
  deleteSelection(): void;
8
8
  duplicateSelection(): void;
9
+ groupSelection(operation: 'group' | 'ungroup'): void;
9
10
  clipboard(action: Extract<VisioRibbonAction, {
10
11
  type: 'clipboard';
11
12
  }>): void;
12
13
  rotateSelection(direction: 'left' | 'right'): void;
13
14
  flipSelection(axis: 'horizontal' | 'vertical'): void;
15
+ changeShape(shape: Extract<VisioRibbonAction, {
16
+ type: 'change-shape';
17
+ }>['shape']): void;
18
+ insertDiagramPart(action: Extract<VisioRibbonAction, {
19
+ type: 'diagram-part';
20
+ }>): void;
14
21
  formatSelection(action: VisioFormattingAction): void;
22
+ formatPainter(mode: 'once' | 'sticky' | 'cancel'): void;
15
23
  arrangeSelection(action: Extract<VisioRibbonAction, {
16
24
  type: 'arrange';
17
25
  }>): void;
18
26
  setTool(tool: CanvasTool): void;
19
27
  cancelDrawing(): void;
20
28
  insertPage(): void;
29
+ insert(item: VisioInsertItem): void;
30
+ data(command: VisioDataCommand): void;
31
+ textFeature(feature: VisioTextFeature): void;
21
32
  showPaintProperties(): void;
33
+ showFormatShape(): void;
34
+ pageTheme(action: Extract<VisioRibbonAction, {
35
+ type: 'page-theme';
36
+ }>): void;
22
37
  toggleGrid(): void;
38
+ toggleConnectionPoints?(): void;
39
+ connectorRoute?(action: Extract<VisioRibbonAction, {
40
+ type: 'connector-route';
41
+ }>): void;
23
42
  toggleRuler(): void;
24
43
  togglePanZoom(): void;
25
44
  toggleSizePosition(): void;
26
45
  toggleFullscreen(): void;
46
+ present(): void;
27
47
  togglePane(pane: 'shapes' | 'inspector'): void;
28
48
  reveal(panel: 'edit' | 'notes' | 'selection' | 'layers', focusText: boolean): void;
29
49
  fit(mode: 'page' | 'width'): void;
30
50
  focusSearch(): void;
31
51
  focusReplace(): void;
52
+ pageSetup(command: Extract<VisioRibbonAction, {
53
+ type: 'page-setup';
54
+ }>['command']): void;
55
+ review(action: Extract<VisioRibbonAction, {
56
+ type: 'review';
57
+ }>): void;
58
+ /** Layout, layers, selection, guides, explorer, export and help (ViewerLayoutCommands). */
59
+ layout(action: VisioLayoutAction): void;
32
60
  }
33
61
  /** Routes a ribbon, status-bar or shortcut action to the controller that owns it. */
34
62
  export declare function routeRibbonAction(targets: RibbonTargets, action: VisioRibbonAction): void;
@@ -0,0 +1,17 @@
1
+ import { type VisioQuickStyleColor } from 'ooxml-core/visio';
2
+ import type { OfficeGalleryItem, OfficeGalleryState } from '../ribbon/gallery.js';
3
+ import type { CommandSpec } from './ribbon-parts.js';
4
+ export declare const QUICK_STYLES_HINT = "Theme styles from the drawing's theme. A drawing without a theme gets the fixed Office colours shown here.";
5
+ /** Stable gallery item id for a colour slot and style matrix. */
6
+ export declare const quickStyleItemId: (color: VisioQuickStyleColor, matrix: number) => string;
7
+ /** The gallery's items: one row per style matrix, one column per theme colour, as in Visio. */
8
+ export declare function quickStyleItems(): OfficeGalleryItem[];
9
+ export declare function quickStyleGalleryState(disabled: boolean): OfficeGalleryState;
10
+ /** Home > Shape Styles > Quick Styles: the shared Office gallery raising typed format actions. */
11
+ export declare function quickStyleGallery(doc: Document): HTMLElement;
12
+ /** Stable menu ids of the effect presets, shared with the selection state sync. */
13
+ export declare const glowItemId: (size: number, accent: number) => string;
14
+ export declare const softEdgesItemId: (size: number) => string;
15
+ export declare const reflectionItemId: (id: string) => string;
16
+ /** Home > Shape Styles > Effects: shadow, reflection, glow and soft edge presets. */
17
+ export declare function effectsOptions(): CommandSpec[];
@@ -0,0 +1,17 @@
1
+ import { type VisioPageTheme } from 'ooxml-core/visio';
2
+ import type { OfficeGalleryState, OfficeUiGallery } from '../ribbon/gallery.js';
3
+ export declare const THEMES_HINT = "Apply a theme to the current page. Quick-styled shapes take its colours; text keeps its own font.";
4
+ export declare const VARIANTS_HINT = "Pick one of the current theme's four colour variants.";
5
+ export declare const NO_THEME_VARIANTS = "Apply a theme to the page first.";
6
+ /** Design > Variants > More: which theme parts can be changed separately. */
7
+ export declare const VARIANT_OPTION_REASONS: readonly [id: string, label: string, reason: string][];
8
+ export declare const themeItemId: (id: string) => string;
9
+ export declare const variantItemId: (index: number) => string;
10
+ /** Themes gallery: No Theme, then the built-in themes; the page's theme is marked applied. */
11
+ export declare function themesGalleryState(disabled: boolean, current: VisioPageTheme | undefined): OfficeGalleryState;
12
+ /** Variants gallery: the page theme's four variants, previewed by their first variant colours. */
13
+ export declare function variantsGalleryState(disabled: boolean, current: VisioPageTheme | undefined): OfficeGalleryState;
14
+ export declare const themesGallery: (doc: Document) => OfficeUiGallery;
15
+ export declare const variantsGallery: (doc: Document) => OfficeUiGallery;
16
+ /** Variants > More: Colors, Fonts, Effects, Connectors and Embellishment, disabled with reasons. */
17
+ export declare function variantOptions(doc: Document): import("./ribbon-parts.js").RibbonCommand;
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * Microsoft Visio's View tab: Views, Show, Zoom, Visual Aids, Window and Macros. Ruler, Grid,
3
- * Task Panes, Full Screen and every Zoom command work; the rest is shown disabled with a reason.
3
+ * Task Panes, Presentation Mode, Full Screen and every Zoom command work; the rest is shown disabled with a reason.
4
4
  */
5
5
  export declare function buildViewPanel(doc: Document, panel: HTMLElement): void;
@@ -0,0 +1,12 @@
1
+ import { type Master } from './stencil-catalog.js';
2
+ /** Per-viewer Shapes window preferences: opened stencils and each stencil's Quick Shapes. */
3
+ export declare const SHAPES_STORAGE_KEY = "ooxml-ui.visio.shapes";
4
+ /** One master button: drag it onto the page, or activate it to add it at the page centre. */
5
+ export declare function masterButton(doc: Document, master: Master): HTMLLIElement;
6
+ export declare function masterList(doc: Document, masters: readonly Master[]): HTMLUListElement;
7
+ /**
8
+ * The Stencils view below the view tabs: More Shapes (a menu of the built-in stencils), Quick
9
+ * Shapes (favourites across the open stencils) and one collapsible section per open stencil,
10
+ * Basic Shapes first. Opened stencils and Quick Shapes persist per viewer in localStorage.
11
+ */
12
+ export declare function buildStencilsView(doc: Document, panel: HTMLElement, pane: HTMLElement): HTMLElement[];
@@ -1,39 +1,11 @@
1
- import type { VisioBasicShape } from 'ooxml-core/visio';
1
+ export { BASIC_SHAPES, findMaster, masterCreation, type Master, type MasterCreation, } from './stencil-catalog.js';
2
2
  /** Drag payload type for a stencil master; the value is the master id. */
3
3
  export declare const MASTER_MIME = "application/x-visio-viewer-master";
4
- interface Master {
5
- id: string;
6
- name: string;
7
- /** Preview outline in a 24x24 box (static application geometry). */
8
- path: string;
9
- /** Default size in inches when dropped. */
10
- size: {
11
- width: number;
12
- height: number;
13
- };
14
- }
15
- /** How the core creates a master: a native ellipse, or a Basic Shapes outline. */
16
- export type MasterCreation = {
17
- kind: 'ellipse';
18
- } | {
19
- kind: 'rectangle';
20
- shape: VisioBasicShape;
21
- };
22
- /** Visio's Basic Shapes stencil, in Visio's order. */
23
- export declare const BASIC_SHAPES: readonly Master[];
24
4
  /**
25
5
  * Visio's Shapes window: Stencils and Search views, More Shapes and Quick Shapes rows and the
26
- * Basic Shapes stencil. Masters are dragged onto the page; Enter adds one at the page centre.
6
+ * open stencils (`shapes-sections.ts`). Masters are dragged onto the page; Enter adds one at the
7
+ * page centre.
27
8
  */
28
9
  export declare function createShapesWindow(doc: Document): HTMLElement;
29
- /** Default size and creation of a stencil master, or nothing for an unknown id. */
30
- export declare function masterCreation(id: string): {
31
- size: {
32
- width: number;
33
- height: number;
34
- };
35
- create: MasterCreation;
36
- } | undefined;
37
10
  /** Visio's minimised Shapes window: a narrow strip that reopens the window. */
38
11
  export declare function createShapesStrip(doc: Document): HTMLButtonElement;
39
- export {};
@@ -0,0 +1,47 @@
1
+ import { type VisioBasicOutline, type VisioOutlineShape } from 'ooxml-core/visio';
2
+ export interface Master {
3
+ id: string;
4
+ name: string;
5
+ /** Preview outline in a 24x24 box (static application geometry). */
6
+ path: string;
7
+ /** Default size in inches when dropped. */
8
+ size: {
9
+ width: number;
10
+ height: number;
11
+ };
12
+ }
13
+ export interface Stencil {
14
+ id: string;
15
+ name: string;
16
+ masters: readonly Master[];
17
+ }
18
+ /** How the core creates a master: a native ellipse, or a core outline. */
19
+ export type MasterCreation = {
20
+ kind: 'ellipse';
21
+ } | {
22
+ kind: 'rectangle';
23
+ shape: VisioOutlineShape;
24
+ };
25
+ /** Visio's Basic Shapes stencil, in Visio's order. */
26
+ export declare const BASIC_SHAPES: readonly Master[];
27
+ export declare const BASIC_STENCIL_ID = "basic";
28
+ /** A preview path for a core outline (or a native ellipse) drawn at its drop proportions. */
29
+ export declare function outlinePreviewPath(outline: VisioBasicOutline | 'ellipse', size: {
30
+ width: number;
31
+ height: number;
32
+ }): string;
33
+ /** Basic Shapes, then the built-in stencils More Shapes can open, with generated previews. */
34
+ export declare const STENCILS: readonly Stencil[];
35
+ /** The master and its stencil for a master id, or nothing for an unknown id. */
36
+ export declare function findMaster(id: string): {
37
+ stencil: Stencil;
38
+ master: Master;
39
+ } | undefined;
40
+ /** Default size and creation of a stencil master, or nothing for an unknown id. */
41
+ export declare function masterCreation(id: string): {
42
+ size: {
43
+ width: number;
44
+ height: number;
45
+ };
46
+ create: MasterCreation;
47
+ } | undefined;
@@ -1,2 +1,2 @@
1
1
  /** Colours come from the alias block in `styles/theme.ts`, which follows the shared theme. */
2
- export declare const viewerStyles = "\n:host {\n display:flex; flex-direction:column; min-width:0; min-height:320px; height:100%; overflow:hidden;\n color:var(--_vv-ink); background:var(--_vv-bg); font:12px/1.5 \"Segoe UI\",Arial,sans-serif; contain:layout;\n}\n* { box-sizing:border-box; }\n[hidden] { display:none !important; }\nbutton,select,input,textarea { font:inherit; color:inherit; border:1px solid var(--_vv-border); background:var(--_vv-surface); border-radius:4px; min-height:28px; padding:3px 8px; }\nbutton { cursor:pointer; }\nbutton:hover:enabled { background:var(--_vv-accent-soft); border-color:var(--_vv-accent); }\nbutton:disabled { opacity:.4; cursor:default; }\nbutton:focus-visible,select:focus-visible,input:focus-visible,textarea:focus-visible,summary:focus-visible,[tabindex]:focus-visible { outline:2px solid var(--_vv-focus); outline-offset:2px; }\nbutton[aria-pressed=\"true\"] { color:var(--_vv-accent); background:var(--_vv-accent-soft); }\n.toolbar { flex:none; min-width:0; border-bottom:1px solid var(--_vv-border); background:var(--_vv-surface); }\n.spacer { flex:1; }\n.ribbon-content { min-height:82px; display:flex; align-items:stretch; gap:0; padding:2px 4px; overflow-x:auto; }\n.ribbon-group { display:flex; flex-direction:column; justify-content:space-between; flex:none; gap:2px; padding:3px 10px 4px; border-right:1px solid var(--_vv-border); }\n.group-label { font-size:10px; line-height:12px; color:var(--_vv-muted); text-align:center; }\n.ribbon-actions { display:flex; align-items:stretch; gap:2px; flex:1; }\n.ribbon-command { display:flex; flex-direction:column; justify-content:center; align-items:center; gap:2px; min-width:70px; padding:2px 6px; border-color:transparent; background:transparent; font-size:11px; white-space:nowrap; }\n.ribbon-hint { align-self:center; flex:none; margin:0; padding:0 16px; font-size:11px; line-height:18px; color:var(--_vv-muted); }\n.workspace { position:relative; display:flex; flex:1; min-width:0; min-height:0; overflow:hidden; }\n.pane-heading { height:37px; display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 10px; border-bottom:1px solid var(--_vv-border); font-size:11px; font-weight:600; }\n.inspector-kind { color:var(--_vv-muted); font-size:10px; font-weight:400; }\n.viewport { position:relative; display:flex; flex-direction:column; flex:1; overflow:auto; min-width:0; min-height:0; padding:16px 4px; background:var(--_vv-bg); }\n.paper { display:block; flex:none; background:white; box-shadow:var(--_vv-shadow); margin:auto; }\n.paper [data-shape-id] { cursor:pointer; }\n.paper [data-selected=\"true\"] > [data-geometry] { stroke:var(--_vv-accent) !important; stroke-width:.025 !important; }\n.inspector-pane { flex:0 0 288px; width:288px; min-width:0; overflow:auto; border-left:1px solid var(--_vv-border); background:var(--_vv-secondary); }\n.inspector-body { display:flex; flex-direction:column; gap:12px; padding:12px 10px; }\n.inspector-card,.edit-controls,.layer-controls { min-width:0; padding:8px; margin:0; border:1px solid var(--_vv-border); border-radius:4px; background:var(--_vv-surface); font-size:11px; line-height:17px; }\n.document-card h2 { margin:0 0 8px; font-size:10px; font-weight:500; letter-spacing:.5px; text-transform:uppercase; color:var(--_vv-muted); }\n.current-page-name { margin:0 0 8px; font-size:12px; font-weight:500; overflow-wrap:anywhere; }\n.document-card dl { display:grid; grid-template-columns:1fr auto; gap:4px 10px; margin:0; font-size:11px; }\n.document-card dt { color:var(--_vv-muted); }\n.document-card dd { margin:0; text-align:right; overflow-wrap:anywhere; }\n.selection-hint { margin:0; padding:0 2px; color:var(--_vv-muted); font-size:11px; }\nsummary { cursor:pointer; min-height:22px; line-height:22px; font-weight:500; }\nsummary::marker { color:var(--_vv-muted); font-size:10px; }\n.shape-inspector div { max-height:260px; overflow:auto; }\n.shape-inspector p { margin:6px 0; overflow-wrap:anywhere; }\n.shape-inspector dl { display:grid; grid-template-columns:minmax(60px,1fr) 1.5fr; gap:6px 10px; }\n.shape-inspector dt { font-weight:500; }\n.shape-inspector dd { margin:0; overflow-wrap:anywhere; white-space:pre-wrap; }\n.shape-inspector h3 { margin:12px 0 5px; font-size:11px; }\n.shape-inspector a { color:var(--_vv-accent); overflow-wrap:anywhere; }\n.edit-controls p,.layer-controls p { margin:6px 0; color:var(--_vv-muted); overflow-wrap:anywhere; }\n.edit-controls textarea { display:block; width:100%; resize:vertical; max-height:180px; margin-top:4px; background:var(--_vv-secondary); }\n.edit-controls label { display:block; margin-top:8px; }\n.edit-actions { display:flex; flex-wrap:wrap; gap:4px; margin-top:8px; }\n.edit-actions button { font-size:11px; padding:3px 7px; }\n.edit-actions [data-edit=\"apply\"]:enabled { background:var(--_vv-accent); border-color:var(--_vv-accent); color:var(--_vv-accent-ink); }\n.edit-controls [data-geometry] { min-width:0; margin:8px 0 0; padding:6px; border:1px solid var(--_vv-border); }\n.edit-controls [data-geometry-field] { display:block; width:100%; min-width:0; margin-top:4px; }\n.edit-controls [data-geometry-error] { color:var(--_vv-danger); }\n.edit-controls [data-edit-error] { color:var(--_vv-danger); }\n.edit-controls [data-edit-diagnostics] { max-height:100px; overflow:auto; padding-left:16px; }\n.layer-controls [data-layer-list] { max-height:240px; overflow:auto; }\n.layer-controls fieldset { border:1px solid var(--_vv-border); margin:6px 0; padding:6px; min-width:0; }\n.layer-controls legend { max-width:100%; overflow-wrap:anywhere; }\n.layer-controls fieldset div { display:flex; align-items:center; gap:6px; margin:3px 0; }\n.layer-controls label { display:flex; align-items:center; gap:6px; overflow-wrap:anywhere; }\n.layer-controls input { flex-shrink:0; width:16px; height:16px; min-height:16px; padding:0; accent-color:var(--_vv-accent); }\n.notes ul { max-height:220px; overflow:auto; padding-left:17px; margin:6px 0 0; color:var(--_vv-muted); }\n.notes li { margin:5px 0; overflow-wrap:anywhere; }\n.notes-strip { flex:none; display:flex; align-items:center; justify-content:space-between; min-height:25.5px; padding:0 12px; border-top:1px solid var(--_vv-border); background:var(--_vv-bg); color:var(--_vv-muted); font-size:10px; }\n.notes-strip button { min-height:24.5px; padding:2px 0; border:0; background:transparent; color:var(--_vv-muted); font-size:11px; }\n.notes-strip button::before { content:\"\u25B8\"; margin-right:6px; }\n.notes-strip button[aria-expanded=\"true\"]::before { content:\"\u25BE\"; }\n.status { flex:none; display:flex; align-items:center; justify-content:space-between; gap:12px; min-width:0; min-height:29px; padding:0 8px 0 12px; border-top:1px solid var(--_vv-border); color:var(--_vv-muted); background:var(--_vv-surface); font-size:10px; }\n.status-message { display:flex; gap:16px; min-width:0; }\n.status-message span { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }\n.empty { max-width:360px; margin:60px auto; padding:16px; text-align:center; color:var(--_vv-muted); font-size:12px; }\n.empty strong { display:block; color:var(--_vv-ink); font-size:18px; font-weight:500; margin-bottom:8px; }\n@media(max-width:1100px) { .ribbon-hint { display:none; } [data-diagnostics] { display:none; } }\n@media(max-width:760px) {\n button,select,input,textarea { min-height:44px; }\n button { min-width:44px; }\n summary { min-height:44px; line-height:44px; }\n .ribbon-content { min-height:86px; }\n .ribbon-group { padding:4px 8px; }\n #home-panel>.ribbon-group:not(.search-group):not(.undo-group) { display:none; }\n .ribbon-command { min-width:90px; }\n .workspace { display:block; overflow:auto; }\n .viewport { height:340px; min-height:260px; padding:16px 4px; }\n .inspector-pane { width:100%; overflow:visible; border-left:0; border-top:1px solid var(--_vv-border); }\n .inspector-body { gap:8px; padding:10px; }\n .inspector-card,.edit-controls,.layer-controls { font-size:12px; }\n .layer-controls label { min-height:44px; }\n .layer-controls input { min-width:20px; width:20px; height:20px; min-height:20px; }\n .notes-strip { min-height:44px; padding:0 10px; }\n .notes-strip button { min-height:44px; }\n .status { flex-wrap:wrap; gap:0; padding:4px 8px; }\n .status-message { width:100%; min-height:18px; }\n}\n@media(pointer:coarse) {\n button,select,input,textarea { min-height:44px; }\n button { min-width:44px; }\n summary,.layer-controls label { min-height:44px; line-height:44px; }\n .ribbon-content { min-height:96px; }\n .notes-strip button { min-height:44px; height:44px; }\n .layer-controls input { min-height:20px; }\n}\n/* Suite ribbon: tabs lead directly into Visio command groups. */\n.ribbon-content { min-height:104px; padding:4px 4px; }\n.ribbon-hint { order:3; padding:10px 18px; }\n.ribbon-command { min-width:82px; }\n.pane-close { display:none; }\n@media(max-width:760px) {\n .ribbon-content { min-height:54px; padding:4px 0; }\n .search-feedback,.group-label { display:none; }\n .ribbon-content { overflow-x:auto; scroll-snap-type:x mandatory; }\n .workspace { display:flex; position:relative; overflow:hidden; }\n .viewport { flex:1; width:100%; height:100%; min-height:0; padding:16px 4px; }\n .inspector-pane { position:absolute; inset:0 0 0 auto; width:min(320px,100%); z-index:4; overflow:auto; border-left:1px solid var(--_vv-border); box-shadow:-8px 0 24px #0002; }\n .pane-close { display:block; width:44px; height:44px; padding:0; font-size:22px; background:transparent; border:0; }\n .inspector-kind { margin-left:auto; }\n .notes-strip { display:none; }\n .status { min-height:48px; padding:2px 8px; }\n .status-message { display:none; }\n}\n.toolbar { position:relative; }\n.ribbon-tools { display:flex; flex:none; order:0; }\n.tools-content { display:flex; align-items:stretch; }\n.ribbon-tools>summary { display:none; }\n.ribbon-command { font-size:12px; min-width:88px; }\n.ribbon-hint { font-size:12px; line-height:20px; flex:1; }\n.group-label { font-size:11px; line-height:14px; }\n.inspector-card,.edit-controls,.layer-controls { font-size:12px; line-height:18px; }\n.selection-hint,.document-card dl { font-size:12px; }\n.pane-heading { font-size:12px; }\n.inspector-pane .pane-heading { position:sticky; top:0; z-index:1; background:var(--_vv-secondary); flex:none; }\n.status .notes-strip { border:0; padding:0 8px; background:transparent; min-height:28px; }\n.status .notes-strip>span { display:none; }\n.status-message { flex:1; }\n@media(max-width:760px) {\n #home-panel { overflow:visible; min-height:54px; padding:4px; }\n .ribbon-tools { display:block; flex:0 0 84px; width:84px; order:1; }\n .ribbon-tools>summary { display:flex; min-height:44px; align-items:center; justify-content:center; gap:6px; padding:0 10px; border:1px solid var(--_vv-border); background:var(--_vv-surface); border-radius:4px; font-size:12px; cursor:pointer; list-style:none; }\n .ribbon-tools>summary::-webkit-details-marker { display:none; }\n .ribbon-tools .tools-content { display:flex; position:absolute; top:100%; left:4px; right:4px; z-index:6; flex-direction:column; padding:12px; gap:12px; border:1px solid var(--_vv-border); border-radius:4px; background:var(--_vv-surface); box-shadow:0 12px 28px #0003; max-height:60vh; overflow:auto; }\n .ribbon-tools:not([open])>.tools-content { display:none; }\n .ribbon-tools .ribbon-group { display:flex; width:100%; min-height:64px; border:0; padding:0; }\n .ribbon-tools .ribbon-actions { justify-content:space-between; }\n .ribbon-tools .ribbon-command { min-width:88px; font-size:12px; }\n .ribbon-tools .search-feedback { display:block; }\n .status { flex-wrap:nowrap; gap:4px; min-height:48px; }\n .status .notes-strip { display:none; }\n}\n@media(prefers-reduced-motion:reduce) { * { scroll-behavior:auto !important; } }\n";
2
+ export declare const viewerStyles = "\n:host {\n display:flex; flex-direction:column; min-width:0; min-height:320px; height:100%; overflow:hidden;\n color:var(--_vv-ink); background:var(--_vv-bg); font:12px/1.5 \"Segoe UI\",Arial,sans-serif; contain:layout;\n}\n* { box-sizing:border-box; }\n[hidden] { display:none !important; }\nbutton,select,input,textarea { font:inherit; color:inherit; border:1px solid var(--_vv-border); background:var(--_vv-surface); border-radius:4px; min-height:28px; padding:3px 8px; }\nbutton { cursor:pointer; }\nbutton:hover:enabled { background:var(--_vv-accent-soft); border-color:var(--_vv-accent); }\nbutton:disabled { opacity:.4; cursor:default; }\nbutton:focus-visible,select:focus-visible,input:focus-visible,textarea:focus-visible,summary:focus-visible,[tabindex]:focus-visible { outline:2px solid var(--_vv-focus); outline-offset:2px; }\nbutton[aria-pressed=\"true\"] { color:var(--_vv-accent); background:var(--_vv-accent-soft); }\n.toolbar { flex:none; min-width:0; border-bottom:1px solid var(--_vv-border); background:var(--_vv-surface); }\n.spacer { flex:1; }\n.ribbon-content { min-height:82px; display:flex; align-items:stretch; gap:0; padding:2px 4px; overflow-x:auto; }\n.ribbon-group { display:flex; flex-direction:column; justify-content:space-between; flex:none; gap:2px; padding:3px 10px 4px; border-right:1px solid var(--_vv-border); }\n.group-label { font-size:10px; line-height:12px; color:var(--_vv-muted); text-align:center; }\n.ribbon-actions { display:flex; align-items:stretch; gap:2px; flex:1; }\n.ribbon-command { display:flex; flex-direction:column; justify-content:center; align-items:center; gap:2px; min-width:70px; padding:2px 6px; border-color:transparent; background:transparent; font-size:11px; white-space:nowrap; }\n.ribbon-hint { align-self:center; flex:none; margin:0; padding:0 16px; font-size:11px; line-height:18px; color:var(--_vv-muted); }\n.workspace { position:relative; display:flex; flex:1; min-width:0; min-height:0; overflow:hidden; }\n.pane-heading { height:37px; display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 10px; border-bottom:1px solid var(--_vv-border); font-size:11px; font-weight:600; }\n.inspector-kind { color:var(--_vv-muted); font-size:10px; font-weight:400; }\n.viewport { position:relative; display:flex; flex-direction:column; flex:1; overflow:auto; min-width:0; min-height:0; padding:16px 4px; background:var(--_vv-bg); }\n.paper { display:block; flex:none; background:white; box-shadow:var(--_vv-shadow); margin:auto; }\n.paper [data-shape-id] { cursor:pointer; }\n.paper [data-selected=\"true\"] > [data-geometry] { stroke:var(--_vv-accent) !important; stroke-width:.025 !important; }\n.paper [role=\"group\"][data-selected=\"true\"] [data-geometry] { stroke:var(--_vv-accent) !important; stroke-dasharray:.06 .04; }\n.inspector-pane { flex:0 0 288px; width:288px; min-width:0; overflow:auto; border-left:1px solid var(--_vv-border); background:var(--_vv-secondary); }\n.inspector-body { display:flex; flex-direction:column; gap:12px; padding:12px 10px; }\n.inspector-card,.edit-controls,.layer-controls { min-width:0; padding:8px; margin:0; border:1px solid var(--_vv-border); border-radius:4px; background:var(--_vv-surface); font-size:11px; line-height:17px; }\n.document-card h2 { margin:0 0 8px; font-size:10px; font-weight:500; letter-spacing:.5px; text-transform:uppercase; color:var(--_vv-muted); }\n.current-page-name { margin:0 0 8px; font-size:12px; font-weight:500; overflow-wrap:anywhere; }\n.document-card dl { display:grid; grid-template-columns:1fr auto; gap:4px 10px; margin:0; font-size:11px; }\n.document-card dt { color:var(--_vv-muted); }\n.document-card dd { margin:0; text-align:right; overflow-wrap:anywhere; }\n.selection-hint { margin:0; padding:0 2px; color:var(--_vv-muted); font-size:11px; }\nsummary { cursor:pointer; min-height:22px; line-height:22px; font-weight:500; }\nsummary::marker { color:var(--_vv-muted); font-size:10px; }\n.shape-inspector div { max-height:260px; overflow:auto; }\n.shape-inspector p { margin:6px 0; overflow-wrap:anywhere; }\n.shape-inspector dl { display:grid; grid-template-columns:minmax(60px,1fr) 1.5fr; gap:6px 10px; }\n.shape-inspector dt { font-weight:500; }\n.shape-inspector dd { margin:0; overflow-wrap:anywhere; white-space:pre-wrap; }\n.shape-inspector h3 { margin:12px 0 5px; font-size:11px; }\n.shape-inspector a { color:var(--_vv-accent); overflow-wrap:anywhere; }\n.edit-controls p,.layer-controls p { margin:6px 0; color:var(--_vv-muted); overflow-wrap:anywhere; }\n.edit-controls textarea { display:block; width:100%; resize:vertical; max-height:180px; margin-top:4px; background:var(--_vv-secondary); }\n.edit-controls label { display:block; margin-top:8px; }\n.edit-actions { display:flex; flex-wrap:wrap; gap:4px; margin-top:8px; }\n.edit-actions button { font-size:11px; padding:3px 7px; }\n.edit-actions [data-edit=\"apply\"]:enabled { background:var(--_vv-accent); border-color:var(--_vv-accent); color:var(--_vv-accent-ink); }\n.edit-controls [data-geometry] { min-width:0; margin:8px 0 0; padding:6px; border:1px solid var(--_vv-border); }\n.edit-controls [data-geometry-field] { display:block; width:100%; min-width:0; margin-top:4px; }\n.edit-controls [data-geometry-error] { color:var(--_vv-danger); }\n.edit-controls [data-edit-error] { color:var(--_vv-danger); }\n.edit-controls [data-edit-diagnostics] { max-height:100px; overflow:auto; padding-left:16px; }\n.layer-controls [data-layer-list] { max-height:240px; overflow:auto; }\n.layer-controls fieldset { border:1px solid var(--_vv-border); margin:6px 0; padding:6px; min-width:0; }\n.layer-controls legend { max-width:100%; overflow-wrap:anywhere; }\n.layer-controls fieldset div { display:flex; align-items:center; gap:6px; margin:3px 0; }\n.layer-controls label { display:flex; align-items:center; gap:6px; overflow-wrap:anywhere; }\n.layer-controls input { flex-shrink:0; width:16px; height:16px; min-height:16px; padding:0; accent-color:var(--_vv-accent); }\n.notes ul { max-height:220px; overflow:auto; padding-left:17px; margin:6px 0 0; color:var(--_vv-muted); }\n.notes li { margin:5px 0; overflow-wrap:anywhere; }\n.notes-strip { flex:none; display:flex; align-items:center; justify-content:space-between; min-height:25.5px; padding:0 12px; border-top:1px solid var(--_vv-border); background:var(--_vv-bg); color:var(--_vv-muted); font-size:10px; }\n.notes-strip button { min-height:24.5px; padding:2px 0; border:0; background:transparent; color:var(--_vv-muted); font-size:11px; }\n.notes-strip button::before { content:\"\u25B8\"; margin-right:6px; }\n.notes-strip button[aria-expanded=\"true\"]::before { content:\"\u25BE\"; }\n.status { flex:none; display:flex; align-items:center; justify-content:space-between; gap:12px; min-width:0; min-height:29px; padding:0 8px 0 12px; border-top:1px solid var(--_vv-border); color:var(--_vv-muted); background:var(--_vv-surface); font-size:10px; }\n.status-message { display:flex; gap:16px; min-width:0; }\n.status-message span { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }\n.empty { max-width:360px; margin:60px auto; padding:16px; text-align:center; color:var(--_vv-muted); font-size:12px; }\n.empty strong { display:block; color:var(--_vv-ink); font-size:18px; font-weight:500; margin-bottom:8px; }\n@media(max-width:1100px) { .ribbon-hint { display:none; } [data-diagnostics] { display:none; } }\n@media(max-width:760px) {\n button,select,input,textarea { min-height:44px; }\n button { min-width:44px; }\n summary { min-height:44px; line-height:44px; }\n .ribbon-content { min-height:86px; }\n .ribbon-group { padding:4px 8px; }\n #home-panel>.ribbon-group:not(.search-group):not(.undo-group) { display:none; }\n .ribbon-command { min-width:90px; }\n .workspace { display:block; overflow:auto; }\n .viewport { height:340px; min-height:260px; padding:16px 4px; }\n .inspector-pane { width:100%; overflow:visible; border-left:0; border-top:1px solid var(--_vv-border); }\n .inspector-body { gap:8px; padding:10px; }\n .inspector-card,.edit-controls,.layer-controls { font-size:12px; }\n .layer-controls label { min-height:44px; }\n .layer-controls input { min-width:20px; width:20px; height:20px; min-height:20px; }\n .notes-strip { min-height:44px; padding:0 10px; }\n .notes-strip button { min-height:44px; }\n .status { flex-wrap:wrap; gap:0; padding:4px 8px; }\n .status-message { width:100%; min-height:18px; }\n}\n@media(pointer:coarse) {\n button,select,input,textarea { min-height:44px; }\n button { min-width:44px; }\n summary,.layer-controls label { min-height:44px; line-height:44px; }\n .ribbon-content { min-height:96px; }\n .notes-strip button { min-height:44px; height:44px; }\n .layer-controls input { min-height:20px; }\n}\n/* Suite ribbon: tabs lead directly into Visio command groups. */\n.ribbon-content { min-height:104px; padding:4px 4px; }\n.ribbon-hint { order:3; padding:10px 18px; }\n.ribbon-command { min-width:82px; }\n.pane-close { display:none; }\n@media(max-width:760px) {\n .ribbon-content { min-height:54px; padding:4px 0; }\n .search-feedback,.group-label { display:none; }\n .ribbon-content { overflow-x:auto; scroll-snap-type:x mandatory; }\n .workspace { display:flex; position:relative; overflow:hidden; }\n .viewport { flex:1; width:100%; height:100%; min-height:0; padding:16px 4px; }\n .inspector-pane { position:absolute; inset:0 0 0 auto; width:min(320px,100%); z-index:4; overflow:auto; border-left:1px solid var(--_vv-border); box-shadow:-8px 0 24px #0002; }\n .pane-close { display:block; width:44px; height:44px; padding:0; font-size:22px; background:transparent; border:0; }\n .inspector-kind { margin-left:auto; }\n .notes-strip { display:none; }\n .status { min-height:48px; padding:2px 8px; }\n .status-message { display:none; }\n}\n.toolbar { position:relative; }\n.ribbon-tools { display:flex; flex:none; order:0; }\n.tools-content { display:flex; align-items:stretch; }\n.ribbon-tools>summary { display:none; }\n.ribbon-command { font-size:12px; min-width:88px; }\n.ribbon-hint { font-size:12px; line-height:20px; flex:1; }\n.group-label { font-size:11px; line-height:14px; }\n.inspector-card,.edit-controls,.layer-controls { font-size:12px; line-height:18px; }\n.selection-hint,.document-card dl { font-size:12px; }\n.pane-heading { font-size:12px; }\n.inspector-pane .pane-heading { position:sticky; top:0; z-index:1; background:var(--_vv-secondary); flex:none; }\n.status .notes-strip { border:0; padding:0 8px; background:transparent; min-height:28px; }\n.status .notes-strip>span { display:none; }\n.status-message { flex:1; }\n@media(max-width:760px) {\n #home-panel { overflow:visible; min-height:54px; padding:4px; }\n .ribbon-tools { display:block; flex:0 0 84px; width:84px; order:1; }\n .ribbon-tools>summary { display:flex; min-height:44px; align-items:center; justify-content:center; gap:6px; padding:0 10px; border:1px solid var(--_vv-border); background:var(--_vv-surface); border-radius:4px; font-size:12px; cursor:pointer; list-style:none; }\n .ribbon-tools>summary::-webkit-details-marker { display:none; }\n .ribbon-tools .tools-content { display:flex; position:absolute; top:100%; left:4px; right:4px; z-index:6; flex-direction:column; padding:12px; gap:12px; border:1px solid var(--_vv-border); border-radius:4px; background:var(--_vv-surface); box-shadow:0 12px 28px #0003; max-height:60vh; overflow:auto; }\n .ribbon-tools:not([open])>.tools-content { display:none; }\n .ribbon-tools .ribbon-group { display:flex; width:100%; min-height:64px; border:0; padding:0; }\n .ribbon-tools .ribbon-actions { justify-content:space-between; }\n .ribbon-tools .ribbon-command { min-width:88px; font-size:12px; }\n .ribbon-tools .search-feedback { display:block; }\n .status { flex-wrap:nowrap; gap:4px; min-height:48px; }\n .status .notes-strip { display:none; }\n}\n@media(prefers-reduced-motion:reduce) { * { scroll-behavior:auto !important; } }\n";