ooxml-ui 1.36.0 → 1.38.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/dist/chart/format-pane-analysis.d.ts +1 -0
- package/dist/chart/format-pane-effects.d.ts +1 -0
- package/dist/chart/format-pane-fill-kinds.d.ts +1 -0
- package/dist/chart/format-pane-fill-line.d.ts +1 -0
- package/dist/chart/format-pane-locales/zh-CN.d.ts +0 -1
- package/dist/chart/format-pane-targets.d.ts +1 -0
- package/dist/chart/format-pane-text.d.ts +1 -0
- package/dist/{chunk-Z4DML5NW.js → chunk-PMXLEYK6.js} +1 -1
- package/dist/index.js +2 -2
- package/dist/smartart/smartart-text-pane-tools.d.ts +1 -0
- package/dist/teams.js +1 -1
- package/dist/theme.d.ts +1 -0
- package/dist/touch-targets.d.ts +1 -0
- package/dist/visio/canvas-editing.d.ts +2 -0
- package/dist/visio/locales/de-backstage.d.ts +2 -0
- package/dist/visio/locales/en-backstage.d.ts +2 -0
- package/dist/visio/locales/es-backstage.d.ts +2 -0
- package/dist/visio/locales/fr-backstage.d.ts +2 -0
- package/dist/visio/locales/zh-CN-backstage.d.ts +2 -0
- package/dist/visio/paragraph-layout.d.ts +6 -1
- package/dist/visio/pdf-path.d.ts +2 -24
- package/dist/visio/render-bevel.d.ts +26 -0
- package/dist/visio/render-solid.d.ts +28 -0
- package/dist/visio/ribbon-action.d.ts +2 -2
- package/dist/visio/ribbon-localize.d.ts +6 -0
- package/dist/visio/ribbon-org-chart.d.ts +3 -2
- package/dist/visio/ribbon-shape-styles.d.ts +2 -0
- package/dist/visio/tab-layout.d.ts +15 -0
- package/dist/visio/viewer-backstage.d.ts +4 -0
- package/dist/visio/viewer-control-handles.d.ts +19 -0
- package/dist/visio/viewer-data-advanced.d.ts +25 -0
- package/dist/visio/viewer-data-fields.d.ts +16 -0
- package/dist/visio/viewer-data-labels.d.ts +8 -0
- package/dist/visio/viewer-data-visualizer.d.ts +25 -0
- package/dist/visio/viewer-data.d.ts +6 -0
- package/dist/visio/viewer-org-chart.d.ts +11 -0
- package/dist/visio/viewer-shape-actions.d.ts +12 -0
- package/dist/visio/viewer-shape-styles.d.ts +1 -1
- package/dist/visio.js +2370 -762
- package/dist/xlsx.js +3 -3
- package/package.json +2 -2
- /package/dist/{chunk-7ST5QRD5.js → chunk-FKLH7ZVV.js} +0 -0
|
@@ -4,3 +4,4 @@ import type { ChartFormatSeriesOptionsView } from './format-pane-view.js';
|
|
|
4
4
|
export declare function chartAnalysisSections(series: ChartFormatSeriesOptionsView): ChartFormatSection[];
|
|
5
5
|
/** Converts only the selected analysis property, retaining other trendlines, bars and styles. */
|
|
6
6
|
export declare function chartAnalysisFieldIntent(series: ChartFormatSeriesOptionsView | undefined, target: ChartFormatTarget, field: string, value: ChartFormatFieldValue): ChartEditIntent | null | undefined;
|
|
7
|
+
//# sourceMappingURL=format-pane-analysis.d.ts.map
|
|
@@ -22,3 +22,4 @@ export declare function glowSection(prefix: string, glow: Effects['glow']): Char
|
|
|
22
22
|
/** The Effects tab's sections. */
|
|
23
23
|
export declare function effectsSections(view: ChartFormatElementView): ChartFormatSection[];
|
|
24
24
|
export {};
|
|
25
|
+
//# sourceMappingURL=format-pane-effects.d.ts.map
|
|
@@ -13,3 +13,4 @@ export declare function gradientFields(prefix: string, gradient: ChartGradientFi
|
|
|
13
13
|
export declare function patternFields(pattern: NonNullable<ChartFormatFillView['pattern']>, presets: readonly ChartFormatChoice[]): ChartFormatField[];
|
|
14
14
|
/** Picture source, transparency and tiling of a picture fill. */
|
|
15
15
|
export declare function pictureFields(picture: ChartFormatFillView['picture']): ChartFormatField[];
|
|
16
|
+
//# sourceMappingURL=format-pane-fill-kinds.d.ts.map
|
|
@@ -10,3 +10,4 @@ import type { ChartFormatElementView, ChartFormatSource } from './format-pane-vi
|
|
|
10
10
|
export declare const ARROWS: Array<[string, string]>;
|
|
11
11
|
/** The Fill & Line tab's sections. */
|
|
12
12
|
export declare function fillLineSections(view: ChartFormatElementView, target: ChartFormatTarget, source?: Pick<ChartFormatSource, 'patternPresets' | 'slots'>): ChartFormatSection[];
|
|
13
|
+
//# sourceMappingURL=format-pane-fill-line.d.ts.map
|
|
@@ -22,3 +22,4 @@ export declare function chartFormatPaneTitle(target: ChartFormatTarget): ChartFo
|
|
|
22
22
|
export declare function chartFormatTargetOptions(targets: readonly ChartFormatTarget[], describe: ChartFormatDescribe): ChartFormatTargetOption[];
|
|
23
23
|
/** The chart area entry, what a stale or missing key falls back to. */
|
|
24
24
|
export declare const CHART_AREA_TARGET: ChartFormatTargetOption;
|
|
25
|
+
//# sourceMappingURL=format-pane-targets.d.ts.map
|
|
@@ -4,3 +4,4 @@ import type { ChartFormatTextView } from './format-pane-view.js';
|
|
|
4
4
|
export declare function chartTextTabs(): ChartFormatTab[];
|
|
5
5
|
/** The sections of Text Options tab `tab`. */
|
|
6
6
|
export declare function textOptionsSections(text: ChartFormatTextView, tab: 'textFill' | 'textEffects' | 'textBox'): ChartFormatSection[];
|
|
7
|
+
//# sourceMappingURL=format-pane-text.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineSmartArt, defineSmartArtPicker, defineSmartArtTextPane } from './chunk-GZNBWWJ5.js';
|
|
2
|
-
import { TEAMS_TAGS, registerTeams } from './chunk-
|
|
2
|
+
import { TEAMS_TAGS, registerTeams } from './chunk-FKLH7ZVV.js';
|
|
3
3
|
import { installOfficeUiTheme } from './chunk-T5ARELU2.js';
|
|
4
4
|
import { registerControls } from './chunk-QAX4FAB7.js';
|
|
5
5
|
import { definePresence } from './chunk-YZH2QS7J.js';
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { OFFICE_UI_TAGS, registerOfficeUi } from './chunk-
|
|
1
|
+
export { OFFICE_UI_TAGS, registerOfficeUi } from './chunk-PMXLEYK6.js';
|
|
2
2
|
export { createRecoveryScheduler } from './chunk-DA57FPSN.js';
|
|
3
3
|
export { HOST_REGION_ATTRIBUTE, HostRegionHost, RIBBON_ADD_IN_EVENT, createHostBackstagePages, defineRibbonAddInElements, syncHostMenuChildren, syncRibbonAddIns, tidyMenuSeparators, withHostMenuItems } from './chunk-6VF4FEMY.js';
|
|
4
4
|
export { OfficeUiSmartArt, OfficeUiSmartArtPicker, OfficeUiSmartArtTextPane, SmartArtTextPaneController, cachedPicturePixels, defineSmartArt, defineSmartArtPicker, defineSmartArtTextPane, needsPicturePixels, picturePaint, pictureSvg, probePicturePixels, renderDiagramDrawing, smartArtColorsGalleryState, smartArtLayoutTileSvg, smartArtStylesGalleryState, smartArtTileSvg } from './chunk-GZNBWWJ5.js';
|
|
5
|
-
export { EMOJI, OfficeUiActivityFeed, OfficeUiAppRail, OfficeUiAvatar, OfficeUiCalendarAgenda, OfficeUiCalendarView, OfficeUiCallControls, OfficeUiCallGrid, OfficeUiChannelList, OfficeUiChatComposer, OfficeUiChatList, OfficeUiChatSidebar, OfficeUiPeoplePicker, OfficeUiPrejoin, QUICK_REACTIONS, TEAMS_CONTRACT, TEAMS_TAGS, TeamsApp, TeamsChannelTab, TeamsContentPreview, TeamsController, TeamsElement, TeamsFilesPanel, TeamsSettings, activityTime, applyTeamsProps, bindTeams, colorFor, createTeams, dayKind, dayLabel, defineActivityFeed, defineAppRail, defineAvatar, defineCalendarAgenda, defineCalendarView, defineCallControls, defineCallGrid, defineChannelList, defineChatComposer, defineChatList, defineChatSidebar, definePeoplePicker, definePrejoin, defineTeamsApp, defineTeamsChannelTab, defineTeamsContentPreview, defineTeamsFilesPanel, defineTeamsSettings, formatElapsed, formatSize, formatTime, formatWhen, icon, listenTeamsEvents, loadConfig, loadIdentity, parseIceLines, pickTeamsProps, registerTeams, safeStorage, saveConfig, saveIdentity, withStyles } from './chunk-
|
|
5
|
+
export { EMOJI, OfficeUiActivityFeed, OfficeUiAppRail, OfficeUiAvatar, OfficeUiCalendarAgenda, OfficeUiCalendarView, OfficeUiCallControls, OfficeUiCallGrid, OfficeUiChannelList, OfficeUiChatComposer, OfficeUiChatList, OfficeUiChatSidebar, OfficeUiPeoplePicker, OfficeUiPrejoin, QUICK_REACTIONS, TEAMS_CONTRACT, TEAMS_TAGS, TeamsApp, TeamsChannelTab, TeamsContentPreview, TeamsController, TeamsElement, TeamsFilesPanel, TeamsSettings, activityTime, applyTeamsProps, bindTeams, colorFor, createTeams, dayKind, dayLabel, defineActivityFeed, defineAppRail, defineAvatar, defineCalendarAgenda, defineCalendarView, defineCallControls, defineCallGrid, defineChannelList, defineChatComposer, defineChatList, defineChatSidebar, definePeoplePicker, definePrejoin, defineTeamsApp, defineTeamsChannelTab, defineTeamsContentPreview, defineTeamsFilesPanel, defineTeamsSettings, formatElapsed, formatSize, formatTime, formatWhen, icon, listenTeamsEvents, loadConfig, loadIdentity, parseIceLines, pickTeamsProps, registerTeams, safeStorage, saveConfig, saveIdentity, withStyles } from './chunk-FKLH7ZVV.js';
|
|
6
6
|
export { TeamsPresentationPreview, defineTeamsPresentationPreview } from './chunk-BOTLS2PR.js';
|
|
7
7
|
import './chunk-CDAXY5KC.js';
|
|
8
8
|
import './chunk-NDUD5JJB.js';
|
|
@@ -48,3 +48,4 @@ export declare function renderLineActions(node: OfficeSmartArtToolNode, name: st
|
|
|
48
48
|
/** The style row under a line: fill and text colour swatches, bold and italic toggles. */
|
|
49
49
|
export declare function renderLineStyle(node: OfficeSmartArtToolNode, name: string, text: OfficeSmartArtTextPaneToolLabels, disabled: boolean, fire: Fire): TemplateResult;
|
|
50
50
|
export {};
|
|
51
|
+
//# sourceMappingURL=smartart-text-pane-tools.d.ts.map
|
package/dist/teams.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { EMOJI, OfficeUiActivityFeed, OfficeUiAppRail, OfficeUiAvatar, OfficeUiCalendarAgenda, OfficeUiCalendarView, OfficeUiCallControls, OfficeUiCallGrid, OfficeUiChannelList, OfficeUiChatComposer, OfficeUiChatList, OfficeUiChatSidebar, OfficeUiPeoplePicker, OfficeUiPrejoin, QUICK_REACTIONS, TEAMS_CONTRACT, TEAMS_TAGS, TeamsApp, TeamsChannelTab, TeamsContentPreview, TeamsController, TeamsElement, TeamsFilesPanel, TeamsSettings, activityTime, applyTeamsProps, bindTeams, colorFor, createTeams, dayKind, dayLabel, defineActivityFeed, defineAppRail, defineAvatar, defineCalendarAgenda, defineCalendarView, defineCallControls, defineCallGrid, defineChannelList, defineChatComposer, defineChatList, defineChatSidebar, definePeoplePicker, definePrejoin, defineTeamsApp, defineTeamsChannelTab, defineTeamsContentPreview, defineTeamsFilesPanel, defineTeamsSettings, formatElapsed, formatSize, formatTime, formatWhen, icon, listenTeamsEvents, loadConfig, loadIdentity, parseIceLines, pickTeamsProps, registerTeams, safeStorage, saveConfig, saveIdentity, withStyles } from './chunk-
|
|
1
|
+
export { EMOJI, OfficeUiActivityFeed, OfficeUiAppRail, OfficeUiAvatar, OfficeUiCalendarAgenda, OfficeUiCalendarView, OfficeUiCallControls, OfficeUiCallGrid, OfficeUiChannelList, OfficeUiChatComposer, OfficeUiChatList, OfficeUiChatSidebar, OfficeUiPeoplePicker, OfficeUiPrejoin, QUICK_REACTIONS, TEAMS_CONTRACT, TEAMS_TAGS, TeamsApp, TeamsChannelTab, TeamsContentPreview, TeamsController, TeamsElement, TeamsFilesPanel, TeamsSettings, activityTime, applyTeamsProps, bindTeams, colorFor, createTeams, dayKind, dayLabel, defineActivityFeed, defineAppRail, defineAvatar, defineCalendarAgenda, defineCalendarView, defineCallControls, defineCallGrid, defineChannelList, defineChatComposer, defineChatList, defineChatSidebar, definePeoplePicker, definePrejoin, defineTeamsApp, defineTeamsChannelTab, defineTeamsContentPreview, defineTeamsFilesPanel, defineTeamsSettings, formatElapsed, formatSize, formatTime, formatWhen, icon, listenTeamsEvents, loadConfig, loadIdentity, parseIceLines, pickTeamsProps, registerTeams, safeStorage, saveConfig, saveIdentity, withStyles } from './chunk-FKLH7ZVV.js';
|
|
2
2
|
export { TeamsPresentationPreview, defineTeamsPresentationPreview } from './chunk-BOTLS2PR.js';
|
|
3
3
|
import './chunk-CDAXY5KC.js';
|
|
4
4
|
import './chunk-NDUD5JJB.js';
|
package/dist/theme.d.ts
CHANGED
|
@@ -15,3 +15,4 @@ export declare function installOfficeUiTheme(root?: Document | ShadowRoot | unde
|
|
|
15
15
|
export declare function installOfficeUiThemeFor(host: HTMLElement): boolean;
|
|
16
16
|
/** Marks only the library control's own root. Theme state and custom tokens stay on host scopes. */
|
|
17
17
|
export declare function prepareOfficeUiBlock(host: HTMLElement, kind: OfficeUiBlockKind, product?: OfficeUiProduct): void;
|
|
18
|
+
//# sourceMappingURL=theme.d.ts.map
|
package/dist/touch-targets.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ViewerController, ViewerState } from './controller.js';
|
|
2
2
|
import { ViewerInlineText } from './viewer-inline-text.js';
|
|
3
|
+
import { ViewerControlHandles } from './viewer-control-handles.js';
|
|
3
4
|
import { ViewerLineEndpoints } from './viewer-line-endpoints.js';
|
|
4
5
|
import { ViewerPointerGestures } from './viewer-pointer-gestures.js';
|
|
5
6
|
import { ViewerResizeHandles } from './viewer-resize-handles.js';
|
|
@@ -31,6 +32,7 @@ export interface CanvasEditingOptions {
|
|
|
31
32
|
export declare function createCanvasEditing(viewport: HTMLElement, controller: ViewerController, options: CanvasEditingOptions): {
|
|
32
33
|
pointer: ViewerPointerGestures;
|
|
33
34
|
lineEndpoints: ViewerLineEndpoints;
|
|
35
|
+
controls: ViewerControlHandles;
|
|
34
36
|
rotation: ViewerRotationHandle;
|
|
35
37
|
resize: ViewerResizeHandles;
|
|
36
38
|
edit: ViewerInlineText;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { VisioParagraph, VisioText } from 'ooxml-core/visio';
|
|
1
|
+
import type { VisioParagraph, VisioTabStop, VisioText } from 'ooxml-core/visio';
|
|
2
2
|
import { type TextLayoutBudget, type MeasureText, type TextLine } from './text-layout.js';
|
|
3
3
|
export interface PositionedLine extends TextLine {
|
|
4
4
|
x: number;
|
|
@@ -10,6 +10,11 @@ export interface PositionedLine extends TextLine {
|
|
|
10
10
|
bullet?: NonNullable<VisioParagraph['bullet']> & {
|
|
11
11
|
x: number;
|
|
12
12
|
};
|
|
13
|
+
/** The paragraph's tab stops and the edge their positions are measured from. */
|
|
14
|
+
tabs?: {
|
|
15
|
+
stops: VisioTabStop[];
|
|
16
|
+
origin: number;
|
|
17
|
+
};
|
|
13
18
|
}
|
|
14
19
|
export interface ParagraphLayout {
|
|
15
20
|
lines: PositionedLine[];
|
package/dist/visio/pdf-path.d.ts
CHANGED
|
@@ -1,27 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export type PathSegment
|
|
3
|
-
t: 'M';
|
|
4
|
-
x: number;
|
|
5
|
-
y: number;
|
|
6
|
-
} | {
|
|
7
|
-
t: 'L';
|
|
8
|
-
x: number;
|
|
9
|
-
y: number;
|
|
10
|
-
} | {
|
|
11
|
-
t: 'C';
|
|
12
|
-
x1: number;
|
|
13
|
-
y1: number;
|
|
14
|
-
x2: number;
|
|
15
|
-
y2: number;
|
|
16
|
-
x: number;
|
|
17
|
-
y: number;
|
|
18
|
-
} | {
|
|
19
|
-
t: 'Z';
|
|
20
|
-
};
|
|
21
|
-
export declare const MAX_PATH_CHARS = 2000000;
|
|
22
|
-
export declare const MAX_PATH_SEGMENTS = 200000;
|
|
23
|
-
/** Parse path data. Returns `undefined` if it is malformed or exceeds the bounds. */
|
|
24
|
-
export declare function parsePath(d: string): PathSegment[] | undefined;
|
|
1
|
+
import type { PathSegment } from 'ooxml-core/visio';
|
|
2
|
+
export { MAX_PATH_CHARS, MAX_PATH_SEGMENTS, parsePath, type PathSegment } from 'ooxml-core/visio';
|
|
25
3
|
/** PDF path-construction operators for the segments. */
|
|
26
4
|
export declare function pathOperators(segments: readonly PathSegment[]): string[];
|
|
27
5
|
export interface PathEnd {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type VisioMatrix, type VisioShape } from 'ooxml-core/visio';
|
|
2
|
+
/**
|
|
3
|
+
* Bevel: an approximation. The shape's filled geometry is blurred by the bevel width, lit from the
|
|
4
|
+
* top left with a diffuse light, and only the departure from a flat surface is kept: white where
|
|
5
|
+
* the surface faces the light, black where it faces away. Inset bevels invert the light and hard
|
|
6
|
+
* profiles narrow the blur. Visio's own bevel profiles, materials and lighting are not reproduced,
|
|
7
|
+
* and the result changes slightly with the zoom because SVG lighting works on device pixels.
|
|
8
|
+
*/
|
|
9
|
+
export declare function renderBevel(shape: VisioShape, paths: readonly SVGPathElement[], defs: SVGDefsElement, world: VisioMatrix,
|
|
10
|
+
/** The filter region when the paths were projected beyond the flat shape's box. */
|
|
11
|
+
box?: {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
}): SVGGElement | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* 3-D rotation: a parallel projection of the flat shape about its centre, as a matrix on a wrapper
|
|
19
|
+
* group. A shape with perspective or an extrusion is drawn through `solidRender` instead: its
|
|
20
|
+
* outline is projected point by point, and this wrapper (`projected`) then carries only what stays
|
|
21
|
+
* flat in that mode (text, pictures), parallel-projected. Visio's own SVG export ignores the
|
|
22
|
+
* rotation, its raster export draws it.
|
|
23
|
+
*/
|
|
24
|
+
export declare function rotation3dWrapper(shape: VisioShape, projected?: boolean): SVGGElement | undefined;
|
|
25
|
+
/** The parallel-projected container for text and pictures of a shape drawn from projected paths. */
|
|
26
|
+
export declare function flatContent(shape: VisioShape): SVGGElement;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type Projection, type VisioMatrix, type VisioShape } from 'ooxml-core/visio';
|
|
2
|
+
/** A shape drawn through the point-by-point projection (perspective and/or extrusion). */
|
|
3
|
+
export interface SolidRender {
|
|
4
|
+
projection: Projection;
|
|
5
|
+
/** Inches per local unit, so a depth in inches becomes local units. */
|
|
6
|
+
unit: number;
|
|
7
|
+
/** Where the projected shape, its extrusion and its contour can reach, in local units. */
|
|
8
|
+
bounds: {
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Perspective cannot be expressed as an SVG matrix, and an extrusion needs the projected outline,
|
|
17
|
+
* so a shape with either is drawn from projected polylines (curves flattened). Without them the
|
|
18
|
+
* 3-D rotation stays a matrix on a wrapper group (`rotation3dWrapper`).
|
|
19
|
+
*/
|
|
20
|
+
export declare function solidRender(shape: VisioShape, world: VisioMatrix): SolidRender | undefined;
|
|
21
|
+
/** Scale a #rrggbb colour: below 1 darkens, above 1 lightens towards white. */
|
|
22
|
+
export declare function shadeColor(hex: string, factor: number): string;
|
|
23
|
+
/**
|
|
24
|
+
* The extrusion (back outline, then side faces far to near) and the contour (the extruded outline
|
|
25
|
+
* widened by the contour size, drawn first so only its outer part shows), as one group to put
|
|
26
|
+
* under the shape's own paths. Side shading is fitted to a few of Visio's renders, not its lighting.
|
|
27
|
+
*/
|
|
28
|
+
export declare function renderSolid(shape: VisioShape, solid: SolidRender, projectedPaths: readonly string[]): SVGGElement | undefined;
|
|
@@ -106,10 +106,10 @@ export type VisioSwimlaneAction = {
|
|
|
106
106
|
/** The Org Chart tab: add a position under, beside or for the selected one, delete it, lay out. */
|
|
107
107
|
export type VisioOrgChartAction = {
|
|
108
108
|
type: 'org-chart';
|
|
109
|
-
command: 'subordinate' | 'coworker' | 'assistant' | 'delete' | 'layout';
|
|
109
|
+
command: 'subordinate' | 'coworker' | 'assistant' | 'delete' | 'layout' | 'import';
|
|
110
110
|
};
|
|
111
111
|
/** Data-tab commands: import, refresh, data graphics, legend, windows and Shape Data. */
|
|
112
|
-
export type VisioDataCommand = 'quick-import' | 'custom-import' | 'refresh' | 'graphic-text' | 'graphic-bar' | 'graphic-icon' | 'graphic-color' | 'graphic-remove' | 'legend' | 'legend-horizontal' | 'external-data-window' | 'link-data' | 'graphic-configure' | 'graphic-auto-space' | `graphic-position-${VisioDataGraphicPosition}` | 'define-shape-data';
|
|
112
|
+
export type VisioDataCommand = 'quick-import' | 'custom-import' | 'refresh' | 'graphic-text' | 'graphic-bar' | 'graphic-icon' | 'graphic-color' | 'graphic-remove' | 'legend' | 'legend-horizontal' | 'external-data-window' | 'link-data' | 'graphic-configure' | 'graphic-auto-space' | `graphic-position-${VisioDataGraphicPosition}` | 'graphic-fields' | 'graphic-advanced' | 'visualizer-basic' | 'visualizer-cross-functional' | 'visualizer-refresh' | 'visualizer-template' | 'define-shape-data';
|
|
113
113
|
/** Arrangement, layout, layer, selection, view and output commands (viewer-layout and friends). */
|
|
114
114
|
export type VisioLayoutAction = {
|
|
115
115
|
type: 'auto-align';
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { type VisioLocale } from './ribbon-locale.js';
|
|
2
2
|
/** The locale of a ribbon last localized with `localizeRibbon`. */
|
|
3
3
|
export declare function ribbonLocale(ribbon: Element): VisioLocale;
|
|
4
|
+
/**
|
|
5
|
+
* Translates the wording of `elements` in place: their attributes in `ATTRIBUTES` and the text of
|
|
6
|
+
* their leaf elements. Add-in content and `data-user-text` (a document's own names) are kept.
|
|
7
|
+
* Calling it again with another locale translates from the English originals.
|
|
8
|
+
*/
|
|
9
|
+
export declare function localizeWording(elements: Iterable<Element>, locale: VisioLocale): void;
|
|
4
10
|
/**
|
|
5
11
|
* Translates the ribbon in place: tab names, group and command labels, tooltips, accessible names
|
|
6
12
|
* and the shared ribbon's own File and collapse labels. Add-in tabs keep the host's wording.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Visio's contextual Org Chart tab, as far as positions go: Insert (Subordinate, Coworker,
|
|
3
|
-
* Assistant), Position (Delete Position) and Arrange (Layout). It shows while an org chart
|
|
3
|
+
* Assistant), Position (Delete Position), Import and Arrange (Layout). It shows while an org chart
|
|
4
4
|
* position is selected (`viewer-contextual-tabs.ts`); `viewer-org-chart.ts` keeps its state.
|
|
5
|
-
*
|
|
5
|
+
* Import builds a chart from a CSV or Excel sheet (Name, Title and Reports To columns); a
|
|
6
|
+
* directory is not read. The Data tab offers the same command, because it needs no selection.
|
|
6
7
|
*/
|
|
7
8
|
export declare function buildOrgChartPanel(doc: Document, panel: HTMLElement): void;
|
|
@@ -12,6 +12,8 @@ export declare function quickStyleGalleryState(disabled: boolean): OfficeGallery
|
|
|
12
12
|
* a More button, raising typed format actions.
|
|
13
13
|
*/
|
|
14
14
|
export declare function quickStyleGallery(doc: Document): HTMLElement;
|
|
15
|
+
export declare const bevelItemId: (id: string) => string;
|
|
16
|
+
export declare const rotationItemId: (id: string) => string;
|
|
15
17
|
/** Stable menu ids of the effect presets, shared with the selection state sync. */
|
|
16
18
|
export declare const glowItemId: (size: number, accent: number) => string;
|
|
17
19
|
export declare const softEdgesItemId: (size: number) => string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type VisioTextRun } from 'ooxml-core/visio';
|
|
2
|
+
import type { PositionedLine } from './paragraph-layout.js';
|
|
3
|
+
import { type MeasureText } from './text-layout.js';
|
|
4
|
+
export interface TabbedSegment {
|
|
5
|
+
runs: VisioTextRun[];
|
|
6
|
+
x: number;
|
|
7
|
+
}
|
|
8
|
+
/** Whether a line has a tab character to lay out. */
|
|
9
|
+
export declare const lineHasTab: (line: PositionedLine) => boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Splits a left-aligned line at its tab characters and places each part at the tab stop it
|
|
12
|
+
* reaches (see `visioTabStarts`). The tab characters themselves are not drawn. Lines of other
|
|
13
|
+
* alignments keep their single run of text, as before.
|
|
14
|
+
*/
|
|
15
|
+
export declare function layoutTabbedLine(line: PositionedLine, measure?: MeasureText): TabbedSegment[] | undefined;
|
|
@@ -10,6 +10,8 @@ export interface BackstageHost {
|
|
|
10
10
|
root: ShadowRoot;
|
|
11
11
|
viewport: HTMLElement;
|
|
12
12
|
fileName(): string;
|
|
13
|
+
/** The display language (`locale`, else the Options language, else the page's): see the translator. */
|
|
14
|
+
locale(): string;
|
|
13
15
|
load(source: VsdxSource): Promise<void>;
|
|
14
16
|
createBlankDrawing(): Promise<void>;
|
|
15
17
|
createFromTemplate(template: VisioTemplateId): Promise<void>;
|
|
@@ -58,6 +60,8 @@ export declare class ViewerBackstage {
|
|
|
58
60
|
private readonly host;
|
|
59
61
|
constructor(host: BackstageHost);
|
|
60
62
|
get open(): boolean;
|
|
63
|
+
/** Shows the pages in the current display language again (after the locale changes). */
|
|
64
|
+
localize(): void;
|
|
61
65
|
/** Re-applies the host customisation: hidden pages, host pages and their contexts. */
|
|
62
66
|
refreshCustomization(): void;
|
|
63
67
|
show(page?: BackstagePage): void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ViewerController, ViewerState } from './controller.js';
|
|
2
|
+
/**
|
|
3
|
+
* Visio's yellow control handles of the selected shape (its Controls rows). Dragging one along
|
|
4
|
+
* its free axis shows the handle at the pointer; release commits one `set-control` source edit,
|
|
5
|
+
* which rewrites the row's X or Y and recomputes the geometry that follows it. A handle the core
|
|
6
|
+
* cannot move (fixed on both axes, or driven by a formula) is drawn grey and says why.
|
|
7
|
+
*/
|
|
8
|
+
export declare class ViewerControlHandles {
|
|
9
|
+
#private;
|
|
10
|
+
private readonly viewport;
|
|
11
|
+
private readonly controller;
|
|
12
|
+
private readonly options;
|
|
13
|
+
constructor(viewport: HTMLElement, controller: ViewerController, options: {
|
|
14
|
+
active(): boolean;
|
|
15
|
+
announce(message: string): void;
|
|
16
|
+
});
|
|
17
|
+
render(state: ViewerState): void;
|
|
18
|
+
wire(): () => void;
|
|
19
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { VisioPage } from 'ooxml-core/visio';
|
|
2
|
+
import { type VisioDataGraphicItem } from 'ooxml-core/visio/ui';
|
|
3
|
+
import { type ViewerController } from './controller.js';
|
|
4
|
+
import { InsertDialog } from './viewer-insert-dialog.js';
|
|
5
|
+
type Run = (action: () => Promise<void>, success: string) => void;
|
|
6
|
+
/**
|
|
7
|
+
* Advanced Data Graphics: the Edit Data Graphic dialog. It lists the items of the first selected
|
|
8
|
+
* shape (a display type, a Shape Data field and a place each); New and Edit open the item form,
|
|
9
|
+
* Delete removes the item from every selected shape that has it.
|
|
10
|
+
*/
|
|
11
|
+
export declare class ViewerAdvancedGraphics {
|
|
12
|
+
#private;
|
|
13
|
+
private readonly controller;
|
|
14
|
+
private readonly announce;
|
|
15
|
+
private readonly run;
|
|
16
|
+
private readonly targets;
|
|
17
|
+
readonly dialog: InsertDialog;
|
|
18
|
+
/** Opens the item form, empty for a new item. */
|
|
19
|
+
onEdit: (item: VisioDataGraphicItem | undefined) => void;
|
|
20
|
+
constructor(root: ShadowRoot, controller: ViewerController, announce: (message: string) => void, run: Run, targets: (page: VisioPage) => string[]);
|
|
21
|
+
open(): void;
|
|
22
|
+
/** Rebuild the list from the drawing, keeping the selected item when it is still there. */
|
|
23
|
+
refresh(): void;
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ViewerController, type ViewerState } from './controller.js';
|
|
2
|
+
type Run = (action: () => Promise<void>, success: string) => void;
|
|
3
|
+
/**
|
|
4
|
+
* Visio's Data Graphic Fields pane: the Shape Data fields of the selected shape, each with a
|
|
5
|
+
* check box that shows the value on the shape as a text callout and hides it again.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ViewerGraphicFields {
|
|
8
|
+
#private;
|
|
9
|
+
private readonly controller;
|
|
10
|
+
private readonly run;
|
|
11
|
+
readonly pane: HTMLElement;
|
|
12
|
+
constructor(root: ShadowRoot, controller: ViewerController, run: Run);
|
|
13
|
+
toggle(open?: "until-found" | boolean): void;
|
|
14
|
+
render(state: ViewerState): void;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { VisioDataGraphicItem, VisioDataGraphicKind } from 'ooxml-core/visio/ui';
|
|
2
|
+
/** Display type of a data graphic by the command (or dialog value) that makes it. */
|
|
3
|
+
export declare const GRAPHIC_KINDS: Record<string, VisioDataGraphicKind>;
|
|
4
|
+
export declare const KIND_LABELS: string[];
|
|
5
|
+
export declare const POSITION_LABELS: string[];
|
|
6
|
+
export declare const kindLabel: (kind: VisioDataGraphicKind) => string;
|
|
7
|
+
/** One line of the Edit Data Graphic list: the display type, the field and where it sits. */
|
|
8
|
+
export declare const itemLabel: (item: VisioDataGraphicItem, fieldLabel: string) => string;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { VisioPage } from 'ooxml-core/visio';
|
|
2
|
+
import { type VisioVisualizerVariant } from 'ooxml-core/visio/ui';
|
|
3
|
+
import { type ViewerController } from './controller.js';
|
|
4
|
+
import { type DataFilePicker } from './viewer-data-import.js';
|
|
5
|
+
type Run = (action: () => Promise<void>, success: string) => void;
|
|
6
|
+
/**
|
|
7
|
+
* Data Visualizer: draws a flowchart from a table of process steps (Process Step ID,
|
|
8
|
+
* Description, Next Step ID, Connector Label, Shape Type, Function) read from a local CSV or
|
|
9
|
+
* workbook, and redraws it from the edited table. Nothing leaves the device.
|
|
10
|
+
*/
|
|
11
|
+
export declare class ViewerDataVisualizer {
|
|
12
|
+
#private;
|
|
13
|
+
private readonly controller;
|
|
14
|
+
private readonly announce;
|
|
15
|
+
private readonly run;
|
|
16
|
+
private readonly picker;
|
|
17
|
+
constructor(controller: ViewerController, announce: (message: string) => void, run: Run, picker: DataFilePicker);
|
|
18
|
+
/** Whether this page already holds a flowchart this command drew. */
|
|
19
|
+
drawn(page: VisioPage | undefined): boolean;
|
|
20
|
+
create(variant: VisioVisualizerVariant): Promise<void>;
|
|
21
|
+
refresh(): Promise<void>;
|
|
22
|
+
/** A CSV with the expected columns and a small example, for the person to edit. */
|
|
23
|
+
downloadTemplate(): void;
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
@@ -4,6 +4,9 @@ import { InsertDialog } from './viewer-insert-dialog.js';
|
|
|
4
4
|
import { ViewerDataSources } from './viewer-data-sources.js';
|
|
5
5
|
import { ViewerDataLinks } from './viewer-data-links.js';
|
|
6
6
|
import { ViewerShapeData } from './viewer-shape-data.js';
|
|
7
|
+
import { ViewerGraphicFields } from './viewer-data-fields.js';
|
|
8
|
+
import { ViewerAdvancedGraphics } from './viewer-data-advanced.js';
|
|
9
|
+
import { ViewerDataVisualizer } from './viewer-data-visualizer.js';
|
|
7
10
|
type Run = (action: () => Promise<void>, success: string) => void;
|
|
8
11
|
/**
|
|
9
12
|
* Visio's Data tab: Quick and Custom Import of a local workbook or CSV into a saved recordset,
|
|
@@ -20,6 +23,9 @@ export declare class ViewerData {
|
|
|
20
23
|
readonly graphics: InsertDialog;
|
|
21
24
|
readonly links: ViewerDataLinks;
|
|
22
25
|
readonly shapeData: ViewerShapeData;
|
|
26
|
+
readonly fields: ViewerGraphicFields;
|
|
27
|
+
readonly advanced: ViewerAdvancedGraphics;
|
|
28
|
+
readonly visualizer: ViewerDataVisualizer;
|
|
23
29
|
constructor(root: ShadowRoot, controller: ViewerController, announce: (message: string) => void, run: Run);
|
|
24
30
|
handle(command: VisioDataCommand): void;
|
|
25
31
|
wire(viewport: HTMLElement): () => void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { visioOrgDeletePosition } from 'ooxml-core/visio/ui';
|
|
1
2
|
import { type ViewerController, type ViewerState } from './controller.js';
|
|
2
3
|
import type { VisioOrgChartAction } from './ribbon-action.js';
|
|
3
4
|
type Command = VisioOrgChartAction['command'];
|
|
@@ -6,8 +7,18 @@ export declare function orgChartSelection(state: ViewerState): {
|
|
|
6
7
|
pageId: string;
|
|
7
8
|
id: string;
|
|
8
9
|
} | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* The edits that delete the selected shape when it is an org chart position: Delete Position,
|
|
12
|
+
* which removes its connectors and joins its subordinates to its manager. The Delete key uses
|
|
13
|
+
* it for a lone selected position, as Visio's org chart does.
|
|
14
|
+
*/
|
|
15
|
+
export declare function orgChartDeleteSelection(state: ViewerState): {
|
|
16
|
+
edits: ReturnType<typeof visioOrgDeletePosition>;
|
|
17
|
+
message: string;
|
|
18
|
+
} | undefined;
|
|
9
19
|
/** The Org Chart tab's controller: one edit batch per command, so undo steps back one command. */
|
|
10
20
|
export declare class ViewerOrgChart {
|
|
21
|
+
#private;
|
|
11
22
|
private readonly root;
|
|
12
23
|
private readonly controller;
|
|
13
24
|
private readonly edit;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { VisioAction } from 'ooxml-core/visio';
|
|
2
|
+
import { type ViewerController } from './controller.js';
|
|
3
|
+
/** Visio orders a shape's actions by SortKey when any row has one, otherwise by row. */
|
|
4
|
+
export declare function orderedActions(actions: readonly VisioAction[]): VisioAction[];
|
|
5
|
+
/** Why an action cannot run now, or undefined when it can. */
|
|
6
|
+
export declare function actionBlock(action: VisioAction, editable: boolean): string | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Adds the selected shape's Actions rows to its context menu, as Visio lists them below the
|
|
9
|
+
* built-in commands: checked and disabled states are kept, and an action this editor cannot run
|
|
10
|
+
* is shown disabled with the reason as its tip. Called each time the shape menu opens.
|
|
11
|
+
*/
|
|
12
|
+
export declare function syncShapeActions(menu: HTMLElement, target: 'shape' | 'page', controller: Pick<ViewerController, 'state' | 'applyEdits'>, announce: (message: string) => void): void;
|
|
@@ -4,6 +4,6 @@ import type { RibbonCommand } from './ribbon-parts.js';
|
|
|
4
4
|
export declare function pageAccentColor(page: VisioPage | undefined, accent: number): string;
|
|
5
5
|
/**
|
|
6
6
|
* Selection state for Home > Shape Styles: the Quick Styles gallery and the Effects presets follow
|
|
7
|
-
* the same admission as Fill and Line
|
|
7
|
+
* the same admission as Fill and Line, as do Bevel and 3-D Rotation.
|
|
8
8
|
*/
|
|
9
9
|
export declare function renderShapeStyleControls(root: ShadowRoot, shapes: readonly VisioShape[], reason: string, set: (element: RibbonCommand | null, reason: string) => void, page?: VisioPage): void;
|