ooxml-ui 1.6.2 → 1.7.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 +1 -1
- package/custom-elements.json +53 -1
- package/dist/chrome/ruler.d.ts.map +1 -1
- package/dist/chrome/status-bar.d.ts.map +1 -1
- package/dist/chrome/tab-strip.d.ts +3 -1
- package/dist/chrome/tab-strip.d.ts.map +1 -1
- package/dist/chrome/task-pane.d.ts +27 -0
- package/dist/chrome/task-pane.d.ts.map +1 -0
- package/dist/chrome/title-bar.d.ts.map +1 -1
- package/dist/{chunk-QAIVGTQZ.js → chunk-6UPGM3X2.js} +1 -1
- package/dist/{chunk-QHAE6Y5B.js → chunk-SCWCZSTE.js} +71 -32
- package/dist/{chunk-Z7CS3UUK.js → chunk-VAR6O7II.js} +3 -2
- package/dist/controls.d.ts +3 -2
- package/dist/controls.d.ts.map +1 -1
- package/dist/controls.js +1 -1
- package/dist/docx.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/pptx/{chunk-E55NU4BF.mjs → chunk-RCTRRS6E.mjs} +28 -49
- package/dist/pptx/{chunk-BLAJIEXA.cjs → chunk-XGPLA2OY.cjs} +30 -48
- package/dist/pptx/dom/index.cjs +199 -199
- package/dist/pptx/dom/index.mjs +2 -2
- package/dist/pptx/index.cjs +2708 -2708
- package/dist/pptx/index.mjs +1 -1
- package/dist/pptx/render/editor-keymap-arrows.d.ts +0 -7
- package/dist/pptx/render/editor-keymap-arrows.d.ts.map +1 -1
- package/dist/pptx/render/element-interaction.d.ts +2 -6
- package/dist/pptx/render/element-interaction.d.ts.map +1 -1
- package/dist/teams.js +2 -2
- package/dist/visio/ribbon-action.d.ts +3 -1
- package/dist/visio/ribbon-router.d.ts +1 -1
- package/dist/visio/ribbon.d.ts +2 -2
- package/dist/visio/shapes-window.d.ts +2 -2
- package/dist/visio/status-bar.d.ts +7 -4
- package/dist/visio/styles/theme.d.ts +1 -1
- package/dist/visio/styles.d.ts +1 -1
- package/dist/visio/title-bar.d.ts +9 -0
- package/dist/visio/viewer-backstage.d.ts +2 -1
- package/dist/visio/viewer-canvas.d.ts +1 -1
- package/dist/visio/viewer-chrome.d.ts +12 -5
- package/dist/visio/viewer-commands.d.ts +3 -1
- package/dist/visio/viewer-element.d.ts +8 -0
- package/dist/visio/viewer-guides.d.ts +5 -2
- package/dist/visio/viewer-inline-text.d.ts +31 -0
- package/dist/visio/viewer-input.d.ts +5 -1
- package/dist/visio/viewer-layer-properties.d.ts +18 -0
- package/dist/visio/viewer-layout-commands.d.ts +3 -1
- package/dist/visio/viewer-options.d.ts +18 -4
- package/dist/visio.js +974 -708
- package/dist/xlsx.js +4 -4
- package/package.json +2 -2
- package/dist/visio/viewer-edit-controls.d.ts +0 -12
- package/dist/visio/viewer-geometry-controls.d.ts +0 -14
- package/dist/visio/viewer-layer-controls.d.ts +0 -5
|
@@ -3,6 +3,7 @@ import type { VsdxSource, VisioShapeSelection } from 'ooxml-core/visio/ui';
|
|
|
3
3
|
import { ViewerController } from './controller.js';
|
|
4
4
|
import { type BackstagePage } from './backstage.js';
|
|
5
5
|
import type { CreateVsdxOptions } from 'ooxml-core/visio';
|
|
6
|
+
import { type StatusBarTheme } from './viewer-options.js';
|
|
6
7
|
import { type SvgExportOptions, type SvgExportResult } from './export-svg.js';
|
|
7
8
|
import { type CurrentPagePrintSnapshotOptions, type PrintSnapshot } from './print-snapshot.js';
|
|
8
9
|
declare const BaseElement: typeof HTMLElement;
|
|
@@ -16,6 +17,13 @@ export declare class VisioViewerElement extends BaseElement {
|
|
|
16
17
|
set pageIndex(value: number);
|
|
17
18
|
get zoom(): number;
|
|
18
19
|
set zoom(value: number);
|
|
20
|
+
/**
|
|
21
|
+
* The status bar's look: `'neutral'` (the suite's bar, the default) or `'colorful'` (Visio's
|
|
22
|
+
* product colour). Reflects the `status-bar` attribute; `--vv-status-background` and
|
|
23
|
+
* `--vv-status-ink` recolour either.
|
|
24
|
+
*/
|
|
25
|
+
get statusBar(): StatusBarTheme;
|
|
26
|
+
set statusBar(value: StatusBarTheme);
|
|
19
27
|
get showToolbar(): boolean;
|
|
20
28
|
set showToolbar(value: boolean);
|
|
21
29
|
get renderWarnings(): readonly string[];
|
|
@@ -19,8 +19,11 @@ export declare class ViewerGuides {
|
|
|
19
19
|
get shown(): boolean;
|
|
20
20
|
toggleGuides(): void;
|
|
21
21
|
toggleDynamicGrid(): void;
|
|
22
|
-
/**
|
|
23
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Snap a shape drag; draws alignment hints. `grid` is the Snap to Grid step in page inches (0
|
|
24
|
+
* while the grid is hidden). Unchanged when no snapping is active.
|
|
25
|
+
*/
|
|
26
|
+
snap(page: VisioPage, ids: readonly string[], delta: VisioPagePoint, grid?: number): VisioPagePoint;
|
|
24
27
|
clearHints(): void;
|
|
25
28
|
wire(): () => void;
|
|
26
29
|
render(state: ViewerState): void;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ViewerController, ViewerState } from './controller.js';
|
|
2
|
+
/**
|
|
3
|
+
* Visio's in-place text editing: double-click a shape, press F2 or start typing with one shape
|
|
4
|
+
* selected, and its text becomes editable where it is drawn. Esc, clicking elsewhere on the canvas
|
|
5
|
+
* or selecting something else saves the change as one undoable edit (as in Visio, Esc keeps what
|
|
6
|
+
* you typed); Enter starts a new line. Ribbon commands leave the editor open, and the draft
|
|
7
|
+
* survives other edits to the same drawing. The editor is a plain textarea (`#edit-text`), so
|
|
8
|
+
* Insert Symbol, Field and Spelling work on it.
|
|
9
|
+
*/
|
|
10
|
+
export declare class ViewerInlineText {
|
|
11
|
+
#private;
|
|
12
|
+
private readonly viewport;
|
|
13
|
+
private readonly controller;
|
|
14
|
+
private readonly announce;
|
|
15
|
+
readonly input: HTMLTextAreaElement;
|
|
16
|
+
constructor(viewport: HTMLElement, controller: ViewerController, announce: (message: string) => void);
|
|
17
|
+
get editing(): boolean;
|
|
18
|
+
wire(): () => void;
|
|
19
|
+
/**
|
|
20
|
+
* Start editing the one selected shape's text. `typed` replaces the text with a typed character,
|
|
21
|
+
* as typing on a selected shape does in Visio. False when the selection has no editable text.
|
|
22
|
+
*/
|
|
23
|
+
start(typed?: string): boolean;
|
|
24
|
+
/** Save the draft as one edit; `focusCanvas` returns keyboard focus to the drawing. */
|
|
25
|
+
commit(focusCanvas: boolean): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* Selecting something else or changing page saves; another edit to the same drawing (formatting,
|
|
28
|
+
* a move, undo) keeps the draft on the redrawn shape; a different file discards it.
|
|
29
|
+
*/
|
|
30
|
+
render(state: ViewerState): void;
|
|
31
|
+
}
|
|
@@ -5,6 +5,10 @@ interface Controls {
|
|
|
5
5
|
value: number;
|
|
6
6
|
};
|
|
7
7
|
}
|
|
8
|
+
/** Page inches an arrow key nudges the selection: the editor's 1/16-inch drawing snap. */
|
|
9
|
+
export declare const NUDGE_STEP: number;
|
|
8
10
|
/** Own every DOM listener and abort them together when the surface is disposed. */
|
|
9
|
-
export declare function wireViewerInputs(controls: Controls, controller: ViewerController, fit: (mode: 'page' | 'width') => void
|
|
11
|
+
export declare function wireViewerInputs(controls: Controls, controller: ViewerController, fit: (mode: 'page' | 'width') => void, announce?: (message: string) => void,
|
|
12
|
+
/** Typing a character with one shape selected starts editing its text; true when it did. */
|
|
13
|
+
typeText?: (character: string) => boolean): () => void;
|
|
10
14
|
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ViewerController, ViewerState } from './controller.js';
|
|
2
|
+
import { ViewerDialog } from './viewer-dialog.js';
|
|
3
|
+
/**
|
|
4
|
+
* Home > Editing > Layers > Layer Properties, as Visio's dialog: one row per layer of the page
|
|
5
|
+
* (and of its background pages) with its shape count, Visible, Print and Lock boxes and colour.
|
|
6
|
+
* OK saves the changed flags as one `set-layer-properties` edit. A read-only drawing can still
|
|
7
|
+
* show or hide layers here, for this view only.
|
|
8
|
+
*/
|
|
9
|
+
export declare class ViewerLayerProperties {
|
|
10
|
+
#private;
|
|
11
|
+
private readonly root;
|
|
12
|
+
private readonly controller;
|
|
13
|
+
private readonly announce;
|
|
14
|
+
readonly dialog: ViewerDialog;
|
|
15
|
+
constructor(root: ShadowRoot, controller: ViewerController, announce: (message: string) => void);
|
|
16
|
+
open(): void;
|
|
17
|
+
render(state: ViewerState): void;
|
|
18
|
+
}
|
|
@@ -3,6 +3,7 @@ import type { VisioLayoutAction } from './ribbon-action.js';
|
|
|
3
3
|
import { ViewerExplorer } from './viewer-explorer.js';
|
|
4
4
|
import { ViewerGuides } from './viewer-guides.js';
|
|
5
5
|
import { ViewerLayerAssign } from './viewer-layer-assign.js';
|
|
6
|
+
import { ViewerLayerProperties } from './viewer-layer-properties.js';
|
|
6
7
|
import { ViewerLayout } from './viewer-layout.js';
|
|
7
8
|
import { ViewerPasteSpecial } from './viewer-paste-special.js';
|
|
8
9
|
import { ViewerSelectType } from './viewer-select-type.js';
|
|
@@ -22,13 +23,14 @@ export interface LayoutCommandHost {
|
|
|
22
23
|
}
|
|
23
24
|
/**
|
|
24
25
|
* Arrangement, layout, layers, selection, view aids and help commands: Auto Align & Space,
|
|
25
|
-
* Re-Layout Page and its Layout dialog, Assign to Layer, Select by Type, Paste Special, Guides,
|
|
26
|
+
* Re-Layout Page and its Layout dialog, Assign to Layer, Layer Properties, Select by Type, Paste Special, Guides,
|
|
26
27
|
* Dynamic Grid, Drawing Explorer, Help and Show Training.
|
|
27
28
|
*/
|
|
28
29
|
export declare class ViewerLayoutCommands {
|
|
29
30
|
private readonly host;
|
|
30
31
|
readonly layout: ViewerLayout;
|
|
31
32
|
readonly layers: ViewerLayerAssign;
|
|
33
|
+
readonly layerProperties: ViewerLayerProperties;
|
|
32
34
|
readonly select: ViewerSelectType;
|
|
33
35
|
readonly paste: ViewerPasteSpecial;
|
|
34
36
|
readonly guides: ViewerGuides;
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { type OfficeOptionCategory, type OfficeProfile } from '../controls.js';
|
|
2
2
|
/**
|
|
3
|
-
* Visio's File > Options categories, in Visio's order.
|
|
4
|
-
*
|
|
5
|
-
* setting is shown disabled with the capability it is waiting for.
|
|
3
|
+
* Visio's File > Options categories, in Visio's order. User name and Initials (the local profile,
|
|
4
|
+
* also the identity in a shared session) and Office Theme (the status bar's look) are honoured;
|
|
5
|
+
* every other setting is shown disabled with the capability it is waiting for.
|
|
6
6
|
*/
|
|
7
7
|
export declare const VISIO_OPTION_CATEGORIES: readonly OfficeOptionCategory[];
|
|
8
|
+
/** The status bar's look: Visio's product colour ("Colorful") or the neutral suite bar. */
|
|
9
|
+
export type StatusBarTheme = 'colorful' | 'neutral';
|
|
10
|
+
export declare const isStatusBarTheme: (value: unknown) => value is StatusBarTheme;
|
|
11
|
+
/** The Office Theme remembered on this device, if any (storage may be unavailable). */
|
|
12
|
+
export declare function readStatusBarTheme(): StatusBarTheme | undefined;
|
|
13
|
+
/** Office Theme as Options offers it: the two light looks, or the dark theme. */
|
|
14
|
+
export type OfficeThemeChoice = StatusBarTheme | 'dark';
|
|
8
15
|
/** The Options dialog element. Built once and appended to the viewer's shadow root. */
|
|
9
16
|
export declare function createOptionsDialog(doc: Document): HTMLElement;
|
|
10
17
|
/**
|
|
@@ -14,7 +21,14 @@ export declare function createOptionsDialog(doc: Document): HTMLElement;
|
|
|
14
21
|
export declare class ViewerProfile {
|
|
15
22
|
#private;
|
|
16
23
|
private readonly onProfile;
|
|
17
|
-
|
|
24
|
+
/** Reads and applies the Office Theme on the viewer element. */
|
|
25
|
+
private readonly theme;
|
|
26
|
+
constructor(root: ShadowRoot, onProfile?: (profile: OfficeProfile) => void,
|
|
27
|
+
/** Reads and applies the Office Theme on the viewer element. */
|
|
28
|
+
theme?: {
|
|
29
|
+
get(): OfficeThemeChoice;
|
|
30
|
+
set(theme: OfficeThemeChoice): void;
|
|
31
|
+
});
|
|
18
32
|
get profile(): OfficeProfile;
|
|
19
33
|
/** Open Visio Options, on General as Visio does. */
|
|
20
34
|
showOptions(category?: string): void;
|