ooxml-ui 1.35.0 → 1.36.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/custom-elements.json +14 -1
- package/dist/chart/format-pane-analysis.d.ts +0 -1
- package/dist/chart/format-pane-effects.d.ts +0 -1
- package/dist/chart/format-pane-fill-kinds.d.ts +0 -1
- package/dist/chart/format-pane-fill-line.d.ts +0 -1
- package/dist/chart/format-pane-targets.d.ts +0 -1
- package/dist/chart/format-pane-text.d.ts +0 -1
- package/dist/chrome/tab-drag.d.ts +27 -0
- package/dist/chrome/tab-drag.d.ts.map +1 -0
- package/dist/chrome/tab-strip.d.ts +25 -1
- package/dist/chrome/tab-strip.d.ts.map +1 -1
- package/dist/{chunk-CDC5MAZS.js → chunk-6VF4FEMY.js} +1 -1
- package/dist/{chunk-D5IRYZLP.js → chunk-7RRN2GPO.js} +1 -1
- package/dist/{chunk-FFM3WVLU.js → chunk-7ST5QRD5.js} +1 -1
- package/dist/{chunk-KYXSQFDB.js → chunk-QAX4FAB7.js} +139 -4
- package/dist/{chunk-TGG36HHF.js → chunk-Z4DML5NW.js} +2 -2
- package/dist/controls.d.ts +1 -1
- package/dist/controls.d.ts.map +1 -1
- package/dist/controls.js +1 -1
- package/dist/docx/building-blocks-actions.d.ts +2 -2
- package/dist/docx/editable-region-view.d.ts +4 -0
- package/dist/docx/editor-chrome.d.ts +1 -1
- package/dist/docx/editor-core.d.ts +4 -0
- package/dist/docx/editor-plugins.d.ts +3 -0
- package/dist/docx/file-commands.d.ts +5 -0
- package/dist/docx/format-dialogs.d.ts +6 -1
- package/dist/docx/insert-controller.d.ts +5 -0
- package/dist/docx/list-commands.d.ts +3 -1
- package/dist/docx/list-marker-display.d.ts +1 -1
- package/dist/docx/locales/en-app.d.ts +0 -1
- package/dist/docx/locales/en-ribbon.d.ts +51 -0
- package/dist/docx/locales/en.d.ts +51 -1
- package/dist/docx/localization-strings.d.ts +51 -1
- package/dist/docx/paragraph-styles.d.ts +1 -1
- package/dist/docx/protection-controls.d.ts +4 -0
- package/dist/docx/restrict-editing-pane.d.ts +14 -0
- package/dist/docx/ribbon-action.d.ts +4 -0
- package/dist/docx/ribbon-icons.d.ts +1 -0
- package/dist/docx/search-controller.d.ts +12 -5
- package/dist/docx/search-document.d.ts +32 -0
- package/dist/docx.js +1182 -384
- package/dist/export/pdf-embedded-font.d.ts +65 -0
- package/dist/export/pdf-fonts.d.ts +14 -0
- package/dist/export/pdf-vector.d.ts +84 -0
- package/dist/fonts/catalog.d.ts +1 -0
- package/dist/index.js +4 -4
- package/dist/pptx/ai/bridge-factory.d.ts +4 -1
- package/dist/pptx/ai/bridge-factory.d.ts.map +1 -1
- package/dist/pptx/ai/config.d.ts +1 -1
- package/dist/pptx/ai/config.d.ts.map +1 -1
- package/dist/pptx/ai/host.cjs +36 -36
- package/dist/pptx/ai/host.mjs +1 -1
- package/dist/pptx/ai/index.cjs +50 -43
- package/dist/pptx/ai/index.mjs +10 -3
- package/dist/pptx/ai/system-prompt.d.ts +1 -1
- package/dist/pptx/ai/system-prompt.d.ts.map +1 -1
- package/dist/pptx/ai/tool-summary.d.ts.map +1 -1
- package/dist/pptx/ai/tools/mcp-registry.d.ts.map +1 -1
- package/dist/pptx/{chunk-KGDMMWIY.mjs → chunk-2AK5MS6H.mjs} +11 -0
- package/dist/pptx/{chunk-M55PNMFQ.cjs → chunk-4OKSYRYA.cjs} +11 -0
- package/dist/pptx/{chunk-GPQP2R5Y.mjs → chunk-4RSRCNRM.mjs} +177 -13
- package/dist/pptx/{chunk-NPYNJOK2.cjs → chunk-6JJD3LFT.cjs} +182 -17
- package/dist/pptx/{chunk-46HIE4IE.cjs → chunk-CRV7G4GC.cjs} +8 -0
- package/dist/pptx/{chunk-5EERUTDC.mjs → chunk-KNCCSPAV.mjs} +1 -1
- package/dist/pptx/{chunk-GKQULDFF.cjs → chunk-SI7GQYSL.cjs} +42 -42
- package/dist/pptx/{chunk-6MEBLCNK.mjs → chunk-WQI3NLMY.mjs} +8 -0
- package/dist/pptx/dom/index.cjs +384 -384
- package/dist/pptx/dom/index.mjs +6 -6
- package/dist/pptx/i18n/index.cjs +6 -6
- package/dist/pptx/i18n/index.mjs +1 -1
- package/dist/pptx/i18n/translations-en.d.ts.map +1 -1
- package/dist/pptx/index.cjs +3037 -3033
- package/dist/pptx/index.mjs +2 -2
- package/dist/pptx/render/controller/custom-shows-controller.d.ts +93 -0
- package/dist/pptx/render/controller/custom-shows-controller.d.ts.map +1 -0
- package/dist/pptx/render/controller/index.d.ts +2 -0
- package/dist/pptx/render/controller/index.d.ts.map +1 -1
- package/dist/pptx/render/custom-shows.d.ts +10 -2
- package/dist/pptx/render/custom-shows.d.ts.map +1 -1
- package/dist/pptx/{smartart-insert-preview-6BITTUI4.mjs → smartart-insert-preview-JH5TXECK.mjs} +3 -3
- package/dist/pptx/{smartart-insert-preview-BUOS5XQR.cjs → smartart-insert-preview-QWROEVZL.cjs} +4 -4
- package/dist/smartart/smartart-text-pane-tools.d.ts +0 -1
- package/dist/teams.js +2 -2
- package/dist/theme.d.ts +0 -1
- package/dist/touch-targets.d.ts +0 -1
- package/dist/visio/binding.d.ts +2 -1
- package/dist/visio/canvas-editing.d.ts +2 -0
- package/dist/visio/controller.d.ts +3 -0
- package/dist/visio/pdf-path.d.ts +37 -0
- package/dist/visio/pdf-svg-gradient.d.ts +23 -0
- package/dist/visio/pdf-svg-style.d.ts +20 -0
- package/dist/visio/pdf-svg-text.d.ts +8 -0
- package/dist/visio/pdf-svg.d.ts +22 -0
- package/dist/visio/ribbon-action.d.ts +47 -5
- package/dist/visio/ribbon-arrange.d.ts +9 -0
- package/dist/visio/ribbon-contextual-formats.d.ts +18 -0
- package/dist/visio/ribbon-org-chart.d.ts +7 -0
- package/dist/visio/ribbon-router.d.ts +18 -0
- package/dist/visio/ribbon-shape-format.d.ts +7 -0
- package/dist/visio/ribbon-size-fields.d.ts +5 -0
- package/dist/visio/ribbon-swimlane.d.ts +9 -0
- package/dist/visio/ribbon-themes.d.ts +13 -3
- package/dist/visio/ribbon.d.ts +5 -1
- package/dist/visio/shapes-files-ui.d.ts +1 -1
- package/dist/visio/template-thumbnails.d.ts +10 -0
- package/dist/visio/viewer-backstage.d.ts +9 -3
- package/dist/visio/viewer-contextual-tabs.d.ts +21 -0
- package/dist/visio/viewer-diagram-parts.d.ts +9 -1
- package/dist/visio/viewer-element.d.ts +10 -0
- package/dist/visio/viewer-export.d.ts +1 -6
- package/dist/visio/viewer-file-commands.d.ts +6 -1
- package/dist/visio/viewer-guides.d.ts +8 -1
- package/dist/visio/viewer-inline-size.d.ts +15 -0
- package/dist/visio/viewer-insert-dialog.d.ts +1 -0
- package/dist/visio/viewer-new-drawing.d.ts +3 -2
- package/dist/visio/viewer-org-chart.d.ts +19 -0
- package/dist/visio/viewer-pdf-options.d.ts +26 -0
- package/dist/visio/viewer-pdf.d.ts +47 -0
- package/dist/visio/viewer-picture-format.d.ts +20 -0
- package/dist/visio/viewer-resize-handles.d.ts +13 -1
- package/dist/visio/viewer-swimlanes.d.ts +34 -0
- package/dist/visio.js +4038 -733
- package/dist/xlsx/dialogs/audit-dialogs.d.ts +9 -0
- package/dist/xlsx/dialogs/custom-lists.d.ts +6 -0
- package/dist/xlsx/dialogs/help-dialogs.d.ts +2 -2
- package/dist/xlsx/dialogs/sort-dialog.d.ts +3 -3
- package/dist/xlsx/dialogs/watch-window.d.ts +4 -0
- package/dist/xlsx/grid/audit-layer.d.ts +3 -0
- package/dist/xlsx/grid/grid-view.d.ts +23 -1
- package/dist/xlsx/grid/pane-chrome.d.ts +2 -0
- package/dist/xlsx/grid/split-bars.d.ts +2 -0
- package/dist/xlsx/grid/styles.d.ts +1 -1
- package/dist/xlsx/sheet-tabs/drag.d.ts +1 -2
- package/dist/xlsx.js +1074 -239
- package/package.json +2 -2
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { VisioDocument } from 'ooxml-core/visio';
|
|
2
|
+
import type { PdfExportOptions, PdfExportResult } from './viewer-pdf.js';
|
|
3
|
+
/** What the Export page asks of the PDF: Visio's Publish options "Page range". */
|
|
4
|
+
export type PdfRangeChoice = {
|
|
5
|
+
scope: 'all';
|
|
6
|
+
} | {
|
|
7
|
+
scope: 'current';
|
|
8
|
+
} | {
|
|
9
|
+
scope: 'range';
|
|
10
|
+
from: number;
|
|
11
|
+
to: number;
|
|
12
|
+
};
|
|
13
|
+
/** The result summary the Export page shows after a PDF is made. */
|
|
14
|
+
export type PdfReportSummary = Pick<PdfExportResult, 'pages' | 'embeddedFonts' | 'refusedFonts'>;
|
|
15
|
+
/** The "Publish options" panel: a page range, and the report of the last export. */
|
|
16
|
+
export declare function pdfOptionsPanel(doc: Document): HTMLElement;
|
|
17
|
+
/** The choice on the panel, clamped to `pageCount` foreground pages. */
|
|
18
|
+
export declare function readPdfChoice(root: ParentNode, pageCount: number): PdfRangeChoice;
|
|
19
|
+
/** Keep the range inputs inside the drawing's foreground pages. */
|
|
20
|
+
export declare function syncPdfPanel(root: ParentNode, model: VisioDocument | null | undefined): void;
|
|
21
|
+
/** The PDF export options for a choice (the current page is `pageIndex`). */
|
|
22
|
+
export declare function pdfOptionsFor(choice: PdfRangeChoice, pageIndex: number): PdfExportOptions;
|
|
23
|
+
/** Lines of the per-page report: how each page was drawn and what it lost. */
|
|
24
|
+
export declare function pdfReportLines(summary: PdfReportSummary): string[];
|
|
25
|
+
/** Show the report of the last PDF export on the panel (or hide it with `undefined`). */
|
|
26
|
+
export declare function showPdfReport(root: ParentNode, summary: PdfReportSummary | undefined): void;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { VisioDocument } from 'ooxml-core/visio';
|
|
2
|
+
import { type PdfFontFile } from '../export/pdf-embedded-font.js';
|
|
3
|
+
/** Which pages the PDF holds. Background pages are always drawn behind the pages that use them. */
|
|
4
|
+
export interface PdfExportOptions {
|
|
5
|
+
/** `current` exports only `pageIndex` (a foreground page); default `all`. */
|
|
6
|
+
scope?: 'all' | 'current';
|
|
7
|
+
pageIndex?: number;
|
|
8
|
+
/** 1-based inclusive range over the foreground pages. */
|
|
9
|
+
from?: number;
|
|
10
|
+
to?: number;
|
|
11
|
+
/**
|
|
12
|
+
* TrueType fonts to embed (subset) so text outside WinAnsi, or in a typeface the standard
|
|
13
|
+
* fonts do not match, stays real text. The host supplies the bytes; none are bundled.
|
|
14
|
+
*/
|
|
15
|
+
fonts?: readonly PdfFontFile[];
|
|
16
|
+
}
|
|
17
|
+
export interface PdfPageReport {
|
|
18
|
+
/** Index in the document's page list. */
|
|
19
|
+
index: number;
|
|
20
|
+
name: string;
|
|
21
|
+
/** `vector` is real paths and text; `picture` is a raster of the page, with `fallback` saying why. */
|
|
22
|
+
mode: 'vector' | 'picture';
|
|
23
|
+
fallback: string[];
|
|
24
|
+
/** Effects the vector page leaves out or simplifies. */
|
|
25
|
+
degraded: string[];
|
|
26
|
+
}
|
|
27
|
+
export interface PdfExportResult {
|
|
28
|
+
blob: Blob;
|
|
29
|
+
pages: PdfPageReport[];
|
|
30
|
+
/** Families of the supplied fonts that were embedded as subsets. */
|
|
31
|
+
embeddedFonts: string[];
|
|
32
|
+
/** Supplied fonts that were not embedded (not TrueType, or the licence forbids embedding). */
|
|
33
|
+
refusedFonts: string[];
|
|
34
|
+
}
|
|
35
|
+
/** The foreground page indexes a PDF export covers. */
|
|
36
|
+
export declare function pdfPageIndexes(model: VisioDocument, options?: PdfExportOptions): number[];
|
|
37
|
+
/**
|
|
38
|
+
* Pages as a PDF: vector paths, real (selectable) text and embedded pictures. Text uses the
|
|
39
|
+
* 14 standard fonts (not embedded) unless the host passes `fonts`, which are subset and embedded.
|
|
40
|
+
* Gradients are PDF shadings and shadows are offset copies; glow is a hard-edged halo; blur,
|
|
41
|
+
* soft edges and reflections are not drawn. A page the vector path cannot represent (text no
|
|
42
|
+
* supplied font covers, charts, patterns) becomes a picture page. The report says which and why
|
|
43
|
+
* (`PdfPageReport.degraded` and `fallback`).
|
|
44
|
+
*/
|
|
45
|
+
export declare function exportDocumentPdfDetailed(doc: Document, model: VisioDocument, options?: PdfExportOptions): Promise<PdfExportResult>;
|
|
46
|
+
/** The PDF only; see `exportDocumentPdfDetailed` for the per-page report. */
|
|
47
|
+
export declare function exportDocumentPdf(doc: Document, model: VisioDocument, options?: PdfExportOptions): Promise<Blob>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ViewerController, ViewerState } from './controller.js';
|
|
2
|
+
import type { VisioPictureAction } from './ribbon-action.js';
|
|
3
|
+
/** The picture a single selection names, when it is a picture on the current page. */
|
|
4
|
+
export declare function selectedPicture(state: ViewerState): {
|
|
5
|
+
pageId: string;
|
|
6
|
+
shapeId: string;
|
|
7
|
+
} | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Picture Format > Adjust (Brightness, Contrast) and Crop: one core edit per command, on the
|
|
10
|
+
* selected picture. Core admission decides whether the picture can take it.
|
|
11
|
+
*/
|
|
12
|
+
export declare class ViewerPictureFormat {
|
|
13
|
+
private readonly root;
|
|
14
|
+
private readonly controller;
|
|
15
|
+
private readonly edit;
|
|
16
|
+
constructor(root: ShadowRoot, controller: ViewerController, edit: (run: () => Promise<void>, message: string) => void);
|
|
17
|
+
reason(state: ViewerState): string | undefined;
|
|
18
|
+
run(action: VisioPictureAction): void;
|
|
19
|
+
render(state: ViewerState): void;
|
|
20
|
+
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import type { VisioPage } from 'ooxml-core/visio';
|
|
2
|
+
import { type VisioResizeSizeMatch, type VisioResizeSnapOptions, type VisioSnapResult } from 'ooxml-core/visio/ui';
|
|
1
3
|
import type { ViewerController, ViewerState } from './controller.js';
|
|
2
|
-
/** Eight source-backed selection handles; saved content is never speculatively resized.
|
|
4
|
+
/** Eight source-backed selection handles; saved content is never speculatively resized.
|
|
5
|
+
* Like Visio, corners keep the proportions and Shift keeps them on every handle. */
|
|
3
6
|
export declare class ViewerResizeHandles {
|
|
4
7
|
#private;
|
|
5
8
|
private readonly viewport;
|
|
@@ -8,6 +11,15 @@ export declare class ViewerResizeHandles {
|
|
|
8
11
|
constructor(viewport: HTMLElement, controller: ViewerController, options: {
|
|
9
12
|
active(): boolean;
|
|
10
13
|
announce(message: string): void;
|
|
14
|
+
/**
|
|
15
|
+
* Dynamic Grid and Guides for a resize: `settings` is undefined when snapping is off,
|
|
16
|
+
* `hint` draws the alignment lines and size matches, `clear` removes them.
|
|
17
|
+
*/
|
|
18
|
+
snap?: {
|
|
19
|
+
settings(): VisioResizeSnapOptions | undefined;
|
|
20
|
+
hint(page: VisioPage, lines: VisioSnapResult['lines'], matches: VisioResizeSizeMatch[]): void;
|
|
21
|
+
clear(): void;
|
|
22
|
+
};
|
|
11
23
|
});
|
|
12
24
|
render(state: ViewerState): void;
|
|
13
25
|
wire(): () => void;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { VisioEdit } from 'ooxml-core/visio';
|
|
2
|
+
import { type VisioSwimlaneInfo } from 'ooxml-core/visio/ui';
|
|
3
|
+
import type { VisioPage } from 'ooxml-core/visio';
|
|
4
|
+
import { type ViewerController, type ViewerState } from './controller.js';
|
|
5
|
+
import type { VisioSwimlaneAction } from './ribbon-action.js';
|
|
6
|
+
type Command = VisioSwimlaneAction['command'];
|
|
7
|
+
/** The flowchart the first selected shape belongs to, and the lane it is (or sits in). */
|
|
8
|
+
export declare function swimlaneSelection(state: ViewerState): {
|
|
9
|
+
info: VisioSwimlaneInfo;
|
|
10
|
+
pageId: string;
|
|
11
|
+
lane?: string;
|
|
12
|
+
isLane: boolean;
|
|
13
|
+
} | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* A resize drag on a flowchart's lane or frame. null: the selection is not part of a flowchart,
|
|
16
|
+
* so the ordinary resize applies. undefined: refused (the frame follows its lanes). Otherwise
|
|
17
|
+
* the lane edit that stacks the other lanes and carries their shapes.
|
|
18
|
+
*/
|
|
19
|
+
export declare function swimlaneResizeEdits(page: VisioPage, shapeIds: readonly string[], frame: {
|
|
20
|
+
width: number;
|
|
21
|
+
height: number;
|
|
22
|
+
}): VisioEdit[] | null | undefined;
|
|
23
|
+
/** The tab's controllers: one or two core edits per command, so undo steps back one command. */
|
|
24
|
+
export declare class ViewerSwimlanes {
|
|
25
|
+
#private;
|
|
26
|
+
private readonly root;
|
|
27
|
+
private readonly controller;
|
|
28
|
+
private readonly edit;
|
|
29
|
+
constructor(root: ShadowRoot, controller: ViewerController, edit: (run: () => Promise<void>, message: string) => void);
|
|
30
|
+
reason(state: ViewerState, command: Command): string | undefined;
|
|
31
|
+
run(action: VisioSwimlaneAction): void;
|
|
32
|
+
render(state: ViewerState): void;
|
|
33
|
+
}
|
|
34
|
+
export {};
|