ooxml-ui 1.7.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +89 -36
- package/custom-elements.json +251 -4
- package/dist/chrome/ruler.d.ts +7 -1
- package/dist/chrome/ruler.d.ts.map +1 -1
- package/dist/chrome/task-pane.d.ts +2 -0
- package/dist/chrome/task-pane.d.ts.map +1 -1
- package/dist/chrome/title-bar.d.ts +2 -1
- package/dist/chrome/title-bar.d.ts.map +1 -1
- package/dist/{chunk-6UPGM3X2.js → chunk-7US5GCXF.js} +158 -153
- package/dist/{chunk-VAR6O7II.js → chunk-KF72ZA6V.js} +4 -2
- package/dist/{chunk-SCWCZSTE.js → chunk-O7APCA5N.js} +612 -69
- package/dist/chunk-W6AV3GHC.js +112 -0
- package/dist/controls.d.ts +8 -2
- package/dist/controls.d.ts.map +1 -1
- package/dist/controls.js +1 -1
- package/dist/dialog/dialog-footer.d.ts.map +1 -1
- package/dist/dialog/options-dialog.d.ts.map +1 -1
- package/dist/docx/editor-core.d.ts +3 -0
- package/dist/docx/editor-shell.d.ts +2 -0
- package/dist/docx/element-api.d.ts +7 -0
- package/dist/docx/events.d.ts +4 -1
- package/dist/docx/index.d.ts +1 -0
- package/dist/docx/ribbon-color-grid.d.ts +3 -4
- package/dist/docx.js +46 -78
- package/dist/edit-worker.js +52 -3
- package/dist/form/color-custom.d.ts +79 -0
- package/dist/form/color-custom.d.ts.map +1 -0
- package/dist/form/color-grid.d.ts +125 -0
- package/dist/form/color-grid.d.ts.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +4 -3
- package/dist/menu/context-menu.d.ts.map +1 -1
- package/dist/menu/menu-button.d.ts +2 -1
- package/dist/menu/menu-button.d.ts.map +1 -1
- package/dist/notices/paste-options.d.ts.map +1 -1
- package/dist/notices/toasts.d.ts.map +1 -1
- package/dist/pptx/{chart-3d-view-scene-ERX2GRCD.mjs → chart-3d-view-scene-P6MAFEGL.mjs} +2 -2
- package/dist/pptx/{chart-3d-view-scene-55WDENSO.cjs → chart-3d-view-scene-V74F7ZOC.cjs} +38 -38
- package/dist/pptx/{chunk-G2YUKLRX.cjs → chunk-526IHNIH.cjs} +1 -1
- package/dist/pptx/{chunk-SVN6OBG4.mjs → chunk-DPOES4WM.mjs} +26 -11
- package/dist/pptx/{chunk-XGPLA2OY.cjs → chunk-GCS5KBMR.cjs} +481 -605
- package/dist/pptx/{chunk-RPRC2EG5.cjs → chunk-K3S2A64B.cjs} +13 -13
- package/dist/pptx/{chunk-RCTRRS6E.mjs → chunk-MCHPNO42.mjs} +264 -447
- package/dist/pptx/{chunk-AWQRQUPL.mjs → chunk-NAFUYAQP.mjs} +1 -1
- package/dist/pptx/{chunk-LCIXR7WE.cjs → chunk-VFPVEVF4.cjs} +26 -11
- package/dist/pptx/{chunk-TKATCPOK.mjs → chunk-ZAOYPCAM.mjs} +1 -1
- package/dist/pptx/dom/activex-controls-overlay.d.ts.map +1 -1
- package/dist/pptx/dom/elements/image.d.ts.map +1 -1
- package/dist/pptx/dom/elements/media.d.ts.map +1 -1
- package/dist/pptx/dom/elements/text-block.d.ts.map +1 -1
- package/dist/pptx/dom/elements/zoom.d.ts.map +1 -1
- package/dist/pptx/dom/index.cjs +252 -247
- package/dist/pptx/dom/index.mjs +11 -6
- package/dist/pptx/export/html2canvas-clone.cjs +2 -2
- package/dist/pptx/export/html2canvas-clone.mjs +1 -1
- package/dist/pptx/index.cjs +3059 -3023
- package/dist/pptx/index.mjs +4 -4
- package/dist/pptx/render/chart-combo-series.d.ts.map +1 -1
- package/dist/pptx/render/chart-combo-stock.cjs +3 -3
- package/dist/pptx/render/chart-combo-stock.mjs +1 -1
- package/dist/pptx/render/chart-marker-shape.d.ts.map +1 -1
- package/dist/pptx/render/chart-overlays.cjs +7 -7
- package/dist/pptx/render/chart-overlays.mjs +1 -1
- package/dist/pptx/render/chart-surface-treemap.cjs +4 -4
- package/dist/pptx/render/chart-surface-treemap.mjs +1 -1
- package/dist/pptx/render/chart-view-model.cjs +44 -44
- package/dist/pptx/render/chart-view-model.mjs +1 -1
- package/dist/pptx/render/chart-waterfall-map.cjs +6 -6
- package/dist/pptx/render/chart-waterfall-map.mjs +1 -1
- package/dist/pptx/render/connector-router-types.d.ts +4 -52
- package/dist/pptx/render/connector-router-types.d.ts.map +1 -1
- package/dist/pptx/render/connector-router.d.ts +4 -32
- package/dist/pptx/render/connector-router.d.ts.map +1 -1
- package/dist/pptx/render/index.d.ts +1 -0
- package/dist/pptx/render/index.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-add-ins.d.ts +53 -0
- package/dist/pptx/render/ribbon-add-ins.d.ts.map +1 -0
- package/dist/pptx/web-components/index.d.ts +1 -0
- package/dist/pptx/web-components/index.d.ts.map +1 -1
- package/dist/pptx/web-components/ribbon-add-in.d.ts +20 -0
- package/dist/pptx/web-components/ribbon-add-in.d.ts.map +1 -0
- package/dist/ribbon/add-in-tabs.d.ts +36 -0
- package/dist/ribbon/group-overflow.d.ts +37 -0
- package/dist/ribbon/group-overflow.d.ts.map +1 -0
- package/dist/ribbon/ribbon-tabs.d.ts.map +1 -1
- package/dist/teams/app/index.d.ts +1 -1
- package/dist/teams.js +2 -2
- package/dist/visio/format-pane-fields.d.ts +42 -0
- package/dist/visio/format-pane-view.d.ts +44 -0
- package/dist/visio/index.d.ts +1 -0
- package/dist/visio/page-setup-action.d.ts +4 -0
- package/dist/visio/ribbon-action.d.ts +17 -6
- package/dist/visio/ribbon-change-shape.d.ts +17 -6
- package/dist/visio/ribbon-color-menu.d.ts +29 -0
- package/dist/visio/ribbon-inline-galleries.d.ts +20 -0
- package/dist/visio/ribbon-overflow.d.ts +7 -0
- package/dist/visio/ribbon-review.d.ts +5 -2
- package/dist/visio/ribbon-router.d.ts +3 -3
- package/dist/visio/ribbon-shape-styles.d.ts +4 -1
- package/dist/visio/ribbon-style-options.d.ts +4 -3
- package/dist/visio/shapes-document.d.ts +29 -0
- package/dist/visio/shapes-sections.d.ts +19 -5
- package/dist/visio/shapes-storage.d.ts +15 -0
- package/dist/visio/shapes-window.d.ts +7 -0
- package/dist/visio/stencil-catalog.d.ts +4 -0
- package/dist/visio/text-measurer.d.ts +25 -0
- package/dist/visio/viewer-auto-connect-parts.d.ts +12 -0
- package/dist/visio/viewer-auto-connect.d.ts +33 -0
- package/dist/visio/viewer-change-shape.d.ts +8 -4
- package/dist/visio/viewer-chrome.d.ts +3 -2
- package/dist/visio/viewer-color-menus.d.ts +34 -0
- package/dist/visio/viewer-commands.d.ts +4 -3
- package/dist/visio/viewer-connector-tool.d.ts +5 -3
- package/dist/visio/viewer-data-window.d.ts +5 -1
- package/dist/visio/viewer-draw-tool.d.ts +1 -11
- package/dist/visio/viewer-element.d.ts +8 -0
- package/dist/visio/viewer-format-pane.d.ts +26 -0
- package/dist/visio/viewer-guides.d.ts +3 -3
- package/dist/visio/viewer-layout-commands.d.ts +5 -1
- package/dist/visio/viewer-more-colors.d.ts +16 -0
- package/dist/visio/viewer-page-setup.d.ts +6 -0
- package/dist/visio/viewer-ruler-grid.d.ts +25 -0
- package/dist/visio/viewer-ruler.d.ts +11 -3
- package/dist/visio/viewer-snap-glue.d.ts +23 -0
- package/dist/visio/viewer-stencil.d.ts +4 -1
- package/dist/visio.js +6688 -5303
- package/dist/xlsx/component.d.ts +8 -0
- package/dist/xlsx/dialogs/format-cells/color-swatches.d.ts +4 -2
- package/dist/xlsx/dialogs/styles.d.ts +1 -1
- package/dist/xlsx/events.d.ts +4 -1
- package/dist/xlsx/index.d.ts +1 -0
- package/dist/xlsx/ribbon/color-grid.d.ts +25 -7
- package/dist/xlsx/ribbon/ribbon.d.ts +3 -0
- package/dist/xlsx.js +121 -163
- package/package.json +3 -2
- package/dist/pptx/render/connector-router-astar.d.ts +0 -24
- package/dist/pptx/render/connector-router-astar.d.ts.map +0 -1
- package/dist/pptx/render/connector-router-graph.d.ts +0 -38
- package/dist/pptx/render/connector-router-graph.d.ts.map +0 -1
- package/dist/visio/format-shape-dialog.d.ts +0 -21
- package/dist/visio/viewer-format-shape.d.ts +0 -16
- package/dist/visio/viewer-paint-dialog.d.ts +0 -28
- package/dist/visio/viewer-paint-properties.d.ts +0 -13
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import type { VisioChangeShapeTarget } from 'ooxml-core/visio';
|
|
2
2
|
import type { ViewerController, ViewerState } from './controller.js';
|
|
3
|
+
import { DOCUMENT_MASTER_PREFIX } from './shapes-document.js';
|
|
4
|
+
/** What the gallery asks for: a Basic Shapes outline, or `document:<id>` for a master. */
|
|
5
|
+
export type ChangeShapeChoice = VisioChangeShapeTarget | `${typeof DOCUMENT_MASTER_PREFIX}${string}`;
|
|
3
6
|
/**
|
|
4
|
-
* Home > Change Shape
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
+
* Home > Change Shape through the core's `change-shape` edit, so undo and redo come from the
|
|
8
|
+
* source-backed history. A shape drawn here takes another Basic Shapes outline; a stencil shape
|
|
9
|
+
* becomes an instance of another master of the Document Stencil, as Visio's Change Shape does.
|
|
10
|
+
* The gallery shows the choices for the selection; locks and formulas are proven by the core.
|
|
7
11
|
*/
|
|
8
12
|
export declare class ViewerChangeShape {
|
|
9
13
|
#private;
|
|
@@ -11,6 +15,6 @@ export declare class ViewerChangeShape {
|
|
|
11
15
|
private readonly controller;
|
|
12
16
|
private readonly edit;
|
|
13
17
|
constructor(root: ShadowRoot, controller: ViewerController, edit: (run: () => Promise<void>, message: string) => void);
|
|
14
|
-
run(shape:
|
|
18
|
+
run(shape: ChangeShapeChoice): void;
|
|
15
19
|
render(state: ViewerState): void;
|
|
16
20
|
}
|
|
@@ -3,12 +3,13 @@ import type { ViewerController, ViewerState } from './controller.js';
|
|
|
3
3
|
* Static workspace markup (legacy; migrate to builders when next changed). The ribbon, Shapes
|
|
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. The right task pane shows one
|
|
6
|
-
* view (Shape Data
|
|
6
|
+
* view at a time (Shape Data, or Format Shape, which builds its own view), and starts closed.
|
|
7
7
|
*/
|
|
8
8
|
export declare const viewerChromeTemplate = "<div class=\"workspace\">\n <div class=\"viewport\" tabindex=\"0\" role=\"region\" aria-label=\"Diagram canvas\"></div>\n <office-ui-task-pane id=\"inspector-pane\" class=\"inspector-pane\" label=\"Shape Data\" hidden>\n <section class=\"shape-inspector\" data-pane-view=\"selection\"><p class=\"selection-hint\">No Shape Data</p><div></div></section>\n </office-ui-task-pane>\n</div>";
|
|
9
9
|
/** The titles Visio gives the task pane views. */
|
|
10
10
|
declare const PANE_TITLES: {
|
|
11
11
|
readonly selection: 'Shape Data';
|
|
12
|
+
readonly format: 'Format Shape';
|
|
12
13
|
};
|
|
13
14
|
export type PaneView = keyof typeof PANE_TITLES;
|
|
14
15
|
export type TaskPane = 'shapes' | 'inspector';
|
|
@@ -22,7 +23,7 @@ export declare class ViewerChrome {
|
|
|
22
23
|
closeCompactTools(): void;
|
|
23
24
|
/** Show or hide a task pane; compact layouts close the Tools menu afterwards. */
|
|
24
25
|
togglePane(pane: TaskPane): void;
|
|
25
|
-
/** Show a task pane view (Shape Data) and move focus into it. */
|
|
26
|
+
/** Show a task pane view (Shape Data, Format Shape) and move focus into it. */
|
|
26
27
|
reveal(kind: PaneView): void;
|
|
27
28
|
render(state: ViewerState): void;
|
|
28
29
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { VisioPage, VisioShape } from 'ooxml-core/visio';
|
|
2
|
+
import type { ViewerController, ViewerState } from './controller.js';
|
|
3
|
+
import type { VisioFormattingAction } from './ribbon-action.js';
|
|
4
|
+
import { ViewerMoreColors } from './viewer-more-colors.js';
|
|
5
|
+
/** The colours the selection has now, per target; undefined when mixed or nothing is selected. */
|
|
6
|
+
export interface SelectionColors {
|
|
7
|
+
fill: string | undefined;
|
|
8
|
+
line: string | undefined;
|
|
9
|
+
font: string | undefined;
|
|
10
|
+
}
|
|
11
|
+
/** The selected shapes Fill and Line can format, or none when any of them cannot be. */
|
|
12
|
+
export declare function styleSelection(state: ViewerState): {
|
|
13
|
+
page: VisioPage;
|
|
14
|
+
shapes: VisioShape[];
|
|
15
|
+
} | undefined;
|
|
16
|
+
export declare function selectionColors(state: ViewerState): SelectionColors;
|
|
17
|
+
/**
|
|
18
|
+
* The ribbon's Fill, Line and Font Color pickers: each menu holds the shared colour grid with the
|
|
19
|
+
* page's theme colours. A pick runs the same formatting action the old fixed colours did; More
|
|
20
|
+
* Colors opens the custom colour dialog, and a custom colour joins Recent Colors for every menu.
|
|
21
|
+
*/
|
|
22
|
+
export declare class ViewerColorMenus {
|
|
23
|
+
#private;
|
|
24
|
+
private readonly root;
|
|
25
|
+
private readonly controller;
|
|
26
|
+
private readonly run;
|
|
27
|
+
readonly moreColors: ViewerMoreColors;
|
|
28
|
+
constructor(root: ShadowRoot, controller: ViewerController, run: (action: VisioFormattingAction) => void);
|
|
29
|
+
get recent(): readonly string[];
|
|
30
|
+
/** A custom colour was applied somewhere: show it under Recent Colors everywhere. */
|
|
31
|
+
remember(color: string): void;
|
|
32
|
+
wire(): () => void;
|
|
33
|
+
render(state: ViewerState): void;
|
|
34
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { VisioGridSteps } from 'ooxml-core/visio/ui';
|
|
1
2
|
import type { ViewerController, ViewerState } from './controller.js';
|
|
2
3
|
import { type VisioRibbonAction, type CanvasTool } from './ribbon-action.js';
|
|
3
4
|
import type { Rulers } from './viewer-ruler.js';
|
|
@@ -11,7 +12,7 @@ interface CommandHost {
|
|
|
11
12
|
controller: ViewerController;
|
|
12
13
|
fit(mode: 'page' | 'width'): void;
|
|
13
14
|
togglePane(pane: 'shapes' | 'inspector'): void;
|
|
14
|
-
reveal(panel: 'edit' | 'notes' | 'selection', focusText: boolean): void;
|
|
15
|
+
reveal(panel: 'edit' | 'notes' | 'selection' | 'format', focusText: boolean): void;
|
|
15
16
|
focusSearch(): void;
|
|
16
17
|
focusReplace?(): void;
|
|
17
18
|
togglePanZoom(): void;
|
|
@@ -34,8 +35,8 @@ export declare class ViewerCommands {
|
|
|
34
35
|
private readonly host;
|
|
35
36
|
readonly layoutCommands: ViewerLayoutCommands;
|
|
36
37
|
constructor(host: CommandHost);
|
|
37
|
-
/**
|
|
38
|
-
get gridStep():
|
|
38
|
+
/** The page's grid lines while View > Grid is on (Snap to Grid), else 0. */
|
|
39
|
+
get gridStep(): VisioGridSteps | 0;
|
|
39
40
|
get tool(): CanvasTool;
|
|
40
41
|
/** Browser clipboard transport used by the element's public clipboard methods. */
|
|
41
42
|
clipboard(operation: ClipboardOperation): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type VisioConnectorRoute, type VisioPage } from 'ooxml-core/visio';
|
|
2
2
|
import type { ViewerController, ViewerState } from './controller.js';
|
|
3
3
|
/** What an end released at the pointer would glue to. */
|
|
4
4
|
export interface ConnectorGlueHit {
|
|
@@ -8,13 +8,15 @@ export interface ConnectorGlueHit {
|
|
|
8
8
|
x?: number;
|
|
9
9
|
y?: number;
|
|
10
10
|
}
|
|
11
|
-
/** A page shape the core can glue to: a visible
|
|
11
|
+
/** A page shape the core can glue to: a visible top-level 2D shape, drawn or from a stencil. */
|
|
12
12
|
export declare function connectorGlueTarget(page: VisioPage, element: Element | null): string | undefined;
|
|
13
13
|
/**
|
|
14
14
|
* The glue target under a client point: the nearest connection point within a few pixels of it,
|
|
15
15
|
* else the shape under it. Pointer capture retargets events, so the point itself is hit-tested.
|
|
16
16
|
*/
|
|
17
|
-
export declare function connectorGlueAt(viewport: HTMLElement, page: VisioPage, event: Pick<PointerEvent, 'clientX' | 'clientY' | 'target'>, zoom: number
|
|
17
|
+
export declare function connectorGlueAt(viewport: HTMLElement, page: VisioPage, event: Pick<PointerEvent, 'clientX' | 'clientY' | 'target'>, zoom: number,
|
|
18
|
+
/** The drawing's GlueSettings (Snap & Glue): Glue off glues nothing, and connection points can be left out. */
|
|
19
|
+
glue?: number): ConnectorGlueHit | undefined;
|
|
18
20
|
/**
|
|
19
21
|
* Home > Tools > Connector (Ctrl+3). A drag draws a dynamic connector in the current route
|
|
20
22
|
* (right-angle by default); ends released on shapes glue to them, ends released on a connection
|
|
@@ -2,7 +2,11 @@ import type { VisioDataRecordset } from 'ooxml-core/visio';
|
|
|
2
2
|
/** Drag payload of External Data rows: `{ recordsetId, rowIds }` as JSON. */
|
|
3
3
|
export declare const DATA_ROW_MIME = "application/x-visio-viewer-data-row";
|
|
4
4
|
export type DataWindowAction = 'link' | 'auto-link' | 'unlink' | 'refresh' | 'remove' | 'close';
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Visio's External Data window: a grid of the drawing's saved recordsets, docked under the
|
|
7
|
+
* drawing in the shared `office-ui-task-pane` (title and close button), with the recordset
|
|
8
|
+
* picker and the link commands in a bar above the grid.
|
|
9
|
+
*/
|
|
6
10
|
export declare function createExternalDataWindow(doc: Document): HTMLElement;
|
|
7
11
|
export interface DataWindowView {
|
|
8
12
|
recordsets: readonly VisioDataRecordset[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { VisioPage
|
|
1
|
+
import type { VisioPage } from 'ooxml-core/visio';
|
|
2
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';
|
|
@@ -7,16 +7,6 @@ export declare function insertRectangle(controller: ViewerController, page: Visi
|
|
|
7
7
|
width: number;
|
|
8
8
|
height: number;
|
|
9
9
|
}): Promise<string>;
|
|
10
|
-
/** Add a Basic Shapes master: Ellipse and Circle are native ellipses, the rest core outlines. */
|
|
11
|
-
export declare function insertMaster(controller: ViewerController, page: VisioPage, master: {
|
|
12
|
-
kind: 'ellipse';
|
|
13
|
-
} | {
|
|
14
|
-
kind: 'rectangle';
|
|
15
|
-
shape: VisioOutlineShape;
|
|
16
|
-
}, centre: VisioDrawingPoint, size: {
|
|
17
|
-
width: number;
|
|
18
|
-
height: number;
|
|
19
|
-
}): Promise<string>;
|
|
20
10
|
/**
|
|
21
11
|
* Quick Style a dropped master gets: variant colour 1 (Accent 1 in every built-in theme's first
|
|
22
12
|
* variant, and in the theme-less Office colours), theme style 4, so drops follow Design > Variants.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { VisioDocument, VisioEdit } from 'ooxml-core/visio';
|
|
2
2
|
import type { VsdxSource, VisioShapeSelection } from 'ooxml-core/visio/ui';
|
|
3
3
|
import { ViewerController } from './controller.js';
|
|
4
|
+
import { type RibbonAddInTab } from '../ribbon/add-in-tabs.js';
|
|
4
5
|
import { type BackstagePage } from './backstage.js';
|
|
5
6
|
import type { CreateVsdxOptions } from 'ooxml-core/visio';
|
|
6
7
|
import { type StatusBarTheme } from './viewer-options.js';
|
|
@@ -24,6 +25,13 @@ export declare class VisioViewerElement extends BaseElement {
|
|
|
24
25
|
*/
|
|
25
26
|
get statusBar(): StatusBarTheme;
|
|
26
27
|
set statusBar(value: StatusBarTheme);
|
|
28
|
+
/**
|
|
29
|
+
* Tabs a host adds after Help, as an Office add-in does (Visio's ACROBAT tab). Each command
|
|
30
|
+
* runs its `run` callback and dispatches `office-ribbon-add-in` (`{ tab, command }`) from the
|
|
31
|
+
* viewer. Assign a new array to change them; a tab cannot take a built-in tab's id.
|
|
32
|
+
*/
|
|
33
|
+
get ribbonAddIns(): readonly RibbonAddInTab[];
|
|
34
|
+
set ribbonAddIns(value: readonly RibbonAddInTab[]);
|
|
27
35
|
get showToolbar(): boolean;
|
|
28
36
|
set showToolbar(value: boolean);
|
|
29
37
|
get renderWarnings(): readonly string[];
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ViewerController, ViewerState } from './controller.js';
|
|
2
|
+
import { type PaneSection } from './format-pane-view.js';
|
|
3
|
+
import type { VisioFormattingAction } from './ribbon-action.js';
|
|
4
|
+
import { type ViewerColorMenus } from './viewer-color-menus.js';
|
|
5
|
+
/**
|
|
6
|
+
* Visio's Format Shape task pane (the Shape Styles launcher, the Fill, Line and Effects menus'
|
|
7
|
+
* options commands and the shape menu's Format Shape): Fill (none or solid, colour, transparency,
|
|
8
|
+
* pattern and its background), Line (colour, transparency, width, dash, cap, rounding and line
|
|
9
|
+
* ends) and Effects (shadow, glow, soft edges, reflection). It follows the selection, and every
|
|
10
|
+
* change is applied at once as one undoable `format-shape` edit per shape, through the same
|
|
11
|
+
* action the ribbon uses.
|
|
12
|
+
*/
|
|
13
|
+
export declare class ViewerFormatPane {
|
|
14
|
+
#private;
|
|
15
|
+
private readonly root;
|
|
16
|
+
private readonly controller;
|
|
17
|
+
private readonly colors;
|
|
18
|
+
private readonly run;
|
|
19
|
+
private readonly reveal;
|
|
20
|
+
private readonly announce;
|
|
21
|
+
constructor(root: ShadowRoot, controller: ViewerController, colors: ViewerColorMenus, run: (action: VisioFormattingAction) => void, reveal: () => void, announce: (message: string) => void);
|
|
22
|
+
/** Show the pane, at `section` when given; it explains itself when nothing can be formatted. */
|
|
23
|
+
show(section?: PaneSection): void;
|
|
24
|
+
wire(): () => void;
|
|
25
|
+
render(state: ViewerState): void;
|
|
26
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { type VisioPagePoint } from 'ooxml-core/visio/ui';
|
|
1
|
+
import { type VisioPage } from 'ooxml-core/visio';
|
|
2
|
+
import { type VisioSnapGrid, type VisioPagePoint } from 'ooxml-core/visio/ui';
|
|
3
3
|
import type { ViewerController, ViewerState } from './controller.js';
|
|
4
4
|
/**
|
|
5
5
|
* View > Guides and View > Dynamic Grid. Guides are the page's `Type="Guide"` shapes, drawn as
|
|
@@ -23,7 +23,7 @@ export declare class ViewerGuides {
|
|
|
23
23
|
* Snap a shape drag; draws alignment hints. `grid` is the Snap to Grid step in page inches (0
|
|
24
24
|
* while the grid is hidden). Unchanged when no snapping is active.
|
|
25
25
|
*/
|
|
26
|
-
snap(page: VisioPage, ids: readonly string[], delta: VisioPagePoint, grid?: number): VisioPagePoint;
|
|
26
|
+
snap(page: VisioPage, ids: readonly string[], delta: VisioPagePoint, grid?: number | VisioSnapGrid): VisioPagePoint;
|
|
27
27
|
clearHints(): void;
|
|
28
28
|
wire(): () => void;
|
|
29
29
|
render(state: ViewerState): void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ViewerController, ViewerState } from './controller.js';
|
|
2
2
|
import type { VisioLayoutAction } from './ribbon-action.js';
|
|
3
|
+
import { ViewerAutoConnect } from './viewer-auto-connect.js';
|
|
3
4
|
import { ViewerExplorer } from './viewer-explorer.js';
|
|
4
5
|
import { ViewerGuides } from './viewer-guides.js';
|
|
5
6
|
import { ViewerLayerAssign } from './viewer-layer-assign.js';
|
|
@@ -20,11 +21,13 @@ export interface LayoutCommandHost {
|
|
|
20
21
|
edit(run: () => Promise<void>, message: string): void;
|
|
21
22
|
/** Paste the viewer's own shape clipboard, as Ctrl+V does. */
|
|
22
23
|
pasteShapes(): Promise<void>;
|
|
24
|
+
/** Whether the Pointer tool is the current tool (AutoConnect arrows belong to it). */
|
|
25
|
+
pointerTool(): boolean;
|
|
23
26
|
}
|
|
24
27
|
/**
|
|
25
28
|
* Arrangement, layout, layers, selection, view aids and help commands: Auto Align & Space,
|
|
26
29
|
* Re-Layout Page and its Layout dialog, Assign to Layer, Layer Properties, Select by Type, Paste Special, Guides,
|
|
27
|
-
* Dynamic Grid, Drawing Explorer, Help and Show Training.
|
|
30
|
+
* Dynamic Grid, AutoConnect, Drawing Explorer, Help and Show Training.
|
|
28
31
|
*/
|
|
29
32
|
export declare class ViewerLayoutCommands {
|
|
30
33
|
private readonly host;
|
|
@@ -35,6 +38,7 @@ export declare class ViewerLayoutCommands {
|
|
|
35
38
|
readonly paste: ViewerPasteSpecial;
|
|
36
39
|
readonly guides: ViewerGuides;
|
|
37
40
|
readonly explorer: ViewerExplorer;
|
|
41
|
+
readonly autoConnect: ViewerAutoConnect;
|
|
38
42
|
constructor(host: LayoutCommandHost);
|
|
39
43
|
run(action: VisioLayoutAction): void;
|
|
40
44
|
wire(): () => void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { OfficeUiColorCustom } from '../controls.js';
|
|
2
|
+
import { ViewerDialog } from './viewer-dialog.js';
|
|
3
|
+
/**
|
|
4
|
+
* Office's More Colors dialog, Custom tab, on the shared `office-ui-color-custom`: the hue and
|
|
5
|
+
* saturation square, the luminance slider, Hex, RGB and HSL fields and the New and Current
|
|
6
|
+
* swatches. OK hands the colour (`#rrggbb`) to the caller.
|
|
7
|
+
*/
|
|
8
|
+
export declare class ViewerMoreColors {
|
|
9
|
+
#private;
|
|
10
|
+
readonly dialog: ViewerDialog;
|
|
11
|
+
readonly picker: OfficeUiColorCustom;
|
|
12
|
+
constructor(root: ShadowRoot);
|
|
13
|
+
/** Opens on `current` (`#rrggbb`; black when it is not a colour) and reports the choice. */
|
|
14
|
+
open(current: string | undefined, pick: (color: string) => void): void;
|
|
15
|
+
close(): void;
|
|
16
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { ViewerController, ViewerState } from './controller.js';
|
|
2
2
|
import type { VisioPageSetupCommand } from './page-setup-action.js';
|
|
3
3
|
import { ViewerPageSetupDialog } from './viewer-page-setup-dialog.js';
|
|
4
|
+
import { ViewerRulerGrid } from './viewer-ruler-grid.js';
|
|
5
|
+
import { ViewerSnapGlue } from './viewer-snap-glue.js';
|
|
4
6
|
type Edit = (run: () => Promise<void>, message: string) => void;
|
|
5
7
|
/**
|
|
6
8
|
* Design > Page Setup and Backgrounds, File > Page Setup and View > Page Breaks. Every change is
|
|
@@ -14,6 +16,10 @@ export declare class ViewerPageSetup {
|
|
|
14
16
|
private readonly edit;
|
|
15
17
|
private readonly announce;
|
|
16
18
|
readonly dialog: ViewerPageSetupDialog;
|
|
19
|
+
/** View > Show > Ruler & Grid, and the page's grid and ruler values. */
|
|
20
|
+
readonly rulerGrid: ViewerRulerGrid;
|
|
21
|
+
/** View > Visual Aids > Snap & Glue. */
|
|
22
|
+
readonly snapGlue: ViewerSnapGlue;
|
|
17
23
|
constructor(root: ShadowRoot, controller: ViewerController, edit: Edit, announce: (message: string) => void);
|
|
18
24
|
get pageBreaks(): boolean;
|
|
19
25
|
run(command: VisioPageSetupCommand): void;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type VisioGridSteps } from 'ooxml-core/visio/ui';
|
|
2
|
+
import type { ViewerController, ViewerState } from './controller.js';
|
|
3
|
+
import { ViewerDialog } from './viewer-dialog.js';
|
|
4
|
+
import type { RulerLook } from './viewer-ruler.js';
|
|
5
|
+
/**
|
|
6
|
+
* View > Show > Ruler & Grid, as Visio's dialog: ruler subdivisions and zero point, and the grid's
|
|
7
|
+
* spacing, minimum spacing and origin, each for the horizontal and the vertical axis. OK saves
|
|
8
|
+
* the changed cells of the page as one `set-page-layout` edit. The canvas grid, Snap to Grid and
|
|
9
|
+
* the rulers follow the page's values (`steps`, `look`).
|
|
10
|
+
*/
|
|
11
|
+
export declare class ViewerRulerGrid {
|
|
12
|
+
#private;
|
|
13
|
+
private readonly root;
|
|
14
|
+
private readonly controller;
|
|
15
|
+
private readonly announce;
|
|
16
|
+
readonly dialog: ViewerDialog;
|
|
17
|
+
constructor(root: ShadowRoot, controller: ViewerController, announce: (message: string) => void);
|
|
18
|
+
/** Grid lines of the shown page at the current zoom, for the canvas and Snap to Grid. */
|
|
19
|
+
steps(state?: ViewerState): VisioGridSteps;
|
|
20
|
+
/** Where the rulers' zero is and how many subdivisions they show. */
|
|
21
|
+
look(state?: ViewerState): RulerLook;
|
|
22
|
+
show(): void;
|
|
23
|
+
wire(): () => void;
|
|
24
|
+
render(state: ViewerState): void;
|
|
25
|
+
}
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Visio's rulers: inch scales along the top and left of the drawing window with 0 at the page's
|
|
3
3
|
* left and bottom edges (vertical values grow upward, as in Visio). Drawn by the shared
|
|
4
|
-
* `office-ui-ruler`; this module only lays them out and says where zero is.
|
|
5
|
-
*
|
|
4
|
+
* `office-ui-ruler`; this module only lays them out and says where zero is. The page's Ruler &
|
|
5
|
+
* Grid settings move zero (`RulerLook.originX`/`originY`, page inches from the lower-left corner)
|
|
6
|
+
* and thin the subdivisions.
|
|
6
7
|
*/
|
|
8
|
+
export interface RulerLook {
|
|
9
|
+
originX: number;
|
|
10
|
+
originY: number;
|
|
11
|
+
/** Share of the subdivisions shown, 1 for Fine. */
|
|
12
|
+
densityX: number;
|
|
13
|
+
densityY: number;
|
|
14
|
+
}
|
|
7
15
|
export interface Rulers {
|
|
8
16
|
element: HTMLElement;
|
|
9
|
-
render(visible: boolean, zoom: number): void;
|
|
17
|
+
render(visible: boolean, zoom: number, look?: RulerLook): void;
|
|
10
18
|
wire(): () => void;
|
|
11
19
|
}
|
|
12
20
|
/** Wraps the viewport in a grid with a corner, a top ruler and a left ruler. */
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type VisioSnapGlue } from 'ooxml-core/visio';
|
|
2
|
+
import type { ViewerController, ViewerState } from './controller.js';
|
|
3
|
+
import { ViewerDialog } from './viewer-dialog.js';
|
|
4
|
+
/**
|
|
5
|
+
* View > Visual Aids > Snap & Glue, as Visio's dialog: whether snapping and gluing are active and
|
|
6
|
+
* what they snap and glue to. OK saves the drawing's DocumentSettings as one `set-snap-glue`
|
|
7
|
+
* edit. This editor acts on Snap (grid and guides), Glue and Glue to connection points; the
|
|
8
|
+
* other choices are saved for Visio and say so in the dialog. View > Dynamic Grid stays a
|
|
9
|
+
* per-viewer toggle and is not in this dialog.
|
|
10
|
+
*/
|
|
11
|
+
export declare class ViewerSnapGlue {
|
|
12
|
+
#private;
|
|
13
|
+
private readonly root;
|
|
14
|
+
private readonly controller;
|
|
15
|
+
private readonly announce;
|
|
16
|
+
readonly dialog: ViewerDialog;
|
|
17
|
+
constructor(root: ShadowRoot, controller: ViewerController, announce: (message: string) => void);
|
|
18
|
+
/** The drawing's settings, or Visio's defaults without a drawing. */
|
|
19
|
+
settings(state?: ViewerState): VisioSnapGlue;
|
|
20
|
+
show(): void;
|
|
21
|
+
wire(): () => void;
|
|
22
|
+
render(state: ViewerState): void;
|
|
23
|
+
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { ViewerController } from './controller.js';
|
|
2
2
|
/**
|
|
3
3
|
* Shapes window interaction: drag a master onto the page to drop it there, or activate it to add
|
|
4
|
-
* it at the page centre.
|
|
4
|
+
* it at the page centre. Either way the page gets an instance of a master, as in Visio: a master
|
|
5
|
+
* of a built-in stencil is first copied into the drawing's own Document Stencil, and a master
|
|
6
|
+
* that is already there is instanced directly. The window follows the open drawing: its Document
|
|
7
|
+
* Stencil and the stencils it docks.
|
|
5
8
|
*/
|
|
6
9
|
export declare function wireStencil(pane: HTMLElement, viewport: HTMLElement, controller: ViewerController, announce: (message: string) => void): () => void;
|