ooxml-ui 1.31.0 → 1.33.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 +10 -0
- package/dist/{chunk-32P252JS.js → chunk-QK5DQR6L.js} +1 -1
- package/dist/{chunk-WYKMVMX4.js → chunk-VSHQNHDG.js} +40 -0
- package/dist/{chunk-OKEFAQJT.js → chunk-XPUXFZNB.js} +71 -18
- package/dist/docx/editor-attributes.d.ts +7 -0
- package/dist/docx/format-dialogs.d.ts +1 -1
- package/dist/docx/locales/en.d.ts +4 -0
- package/dist/docx/locales/split-cells.d.ts +10 -0
- package/dist/docx/localization-strings.d.ts +4 -0
- package/dist/docx/ribbon-icons.d.ts +2 -0
- package/dist/docx/split-cells-dialog.d.ts +4 -0
- package/dist/docx/table-commands.d.ts +9 -3
- package/dist/docx/table-model-adapter.d.ts +5 -0
- package/dist/docx/table-restructure-commands.d.ts +36 -0
- package/dist/docx/table-restructure-convert.d.ts +10 -0
- package/dist/docx/table-restructure.d.ts +22 -0
- package/dist/docx.js +652 -46
- package/dist/index.js +3 -3
- package/dist/pptx/{chunk-KCZWGNWT.mjs → chunk-7DT3UJQB.mjs} +1 -1
- package/dist/pptx/{chunk-52Z74ESQ.mjs → chunk-CH4Z6H6C.mjs} +274 -76
- package/dist/pptx/{chunk-W4GPWC2Z.cjs → chunk-TDIJHLS5.cjs} +277 -74
- package/dist/pptx/{chunk-UG72HBSV.cjs → chunk-ZS5EVODY.cjs} +41 -41
- package/dist/pptx/dom/index.cjs +384 -383
- package/dist/pptx/dom/index.mjs +7 -6
- package/dist/pptx/index.cjs +3046 -3026
- package/dist/pptx/index.mjs +1 -1
- package/dist/pptx/render/bullet-toggle-selection.d.ts +8 -4
- package/dist/pptx/render/bullet-toggle-selection.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/inline-list-style.d.ts +2 -1
- package/dist/pptx/render/inline-list-style.d.ts.map +1 -1
- package/dist/pptx/render/text-list-style-update.d.ts +23 -2
- package/dist/pptx/render/text-list-style-update.d.ts.map +1 -1
- package/dist/pptx/render/text-warp-envelope-block.d.ts +10 -1
- package/dist/pptx/render/text-warp-envelope-block.d.ts.map +1 -1
- package/dist/pptx/render/text-warp-envelope-curves.d.ts +8 -0
- package/dist/pptx/render/text-warp-envelope-curves.d.ts.map +1 -1
- package/dist/pptx/render/text-warp-envelope-layout.d.ts +9 -3
- package/dist/pptx/render/text-warp-envelope-layout.d.ts.map +1 -1
- package/dist/pptx/render/text-warp-envelope-map.d.ts.map +1 -1
- package/dist/pptx/render/text-warp-envelope-wrap.d.ts +29 -0
- package/dist/pptx/render/text-warp-envelope-wrap.d.ts.map +1 -0
- package/dist/pptx/render/text-warp-preset-definitions.d.ts +13 -0
- package/dist/pptx/render/text-warp-preset-definitions.d.ts.map +1 -1
- package/dist/pptx/render/text-warp-preset-sampler.d.ts +12 -0
- package/dist/pptx/render/text-warp-preset-sampler.d.ts.map +1 -1
- package/dist/pptx/render/text-warp.d.ts +3 -2
- package/dist/pptx/render/text-warp.d.ts.map +1 -1
- package/dist/pptx/render/viewer-props-manifest.d.ts.map +1 -1
- package/dist/pptx/{smartart-insert-preview-GDFFXVAO.mjs → smartart-insert-preview-RQUFRLSV.mjs} +2 -2
- package/dist/pptx/{smartart-insert-preview-FA4WM2N4.cjs → smartart-insert-preview-YKNB37GE.cjs} +3 -3
- package/dist/{presentation-preview-XGJMARKI.js → presentation-preview-DKJC6TUJ.js} +1 -1
- package/dist/teams/app/chat-people-dialog.d.ts +5 -0
- package/dist/teams/app/teams-app.d.ts +3 -0
- package/dist/teams/chat-list.d.ts +5 -0
- package/dist/teams/i18n/locales/de.d.ts +8 -0
- package/dist/teams/i18n/locales/en/chat.d.ts +2 -0
- package/dist/teams/i18n/locales/en/shell.d.ts +6 -0
- package/dist/teams/i18n/locales/en.d.ts +8 -0
- package/dist/teams/i18n/locales/es.d.ts +8 -0
- package/dist/teams/i18n/locales/fr.d.ts +8 -0
- package/dist/teams/i18n/locales/zh-CN.d.ts +8 -0
- package/dist/teams.js +2 -2
- package/dist/xlsx/dialogs/custom-views.d.ts +2 -0
- package/dist/xlsx/dialogs/forecast-sheet.d.ts +2 -0
- package/dist/xlsx/dialogs/scenario-extras.d.ts +8 -0
- package/dist/xlsx/grid/shapes.d.ts +21 -0
- package/dist/xlsx/grid/styles.d.ts +1 -1
- package/dist/xlsx/header-image.d.ts +8 -0
- package/dist/xlsx.js +656 -126
- package/package.json +2 -2
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type GridRect, type IdFactory } from 'ooxml-core/docx/ui';
|
|
2
|
+
import type { Table } from 'ooxml-core/docx';
|
|
3
|
+
import type { Node as ProseMirrorNode } from 'prosemirror-model';
|
|
4
|
+
import type { EditorView } from 'prosemirror-view';
|
|
5
|
+
import { type Slot } from './table-restructure.js';
|
|
6
|
+
export type RestructureCommand = 'rowBefore' | 'rowAfter' | 'deleteRow' | 'columnBefore' | 'columnAfter' | 'deleteColumn' | 'mergeCells' | 'splitCell';
|
|
7
|
+
interface Context {
|
|
8
|
+
table: ProseMirrorNode;
|
|
9
|
+
tablePos: number;
|
|
10
|
+
nested: boolean;
|
|
11
|
+
skeleton: Table;
|
|
12
|
+
/** The cells the selection touches, with their row and position in the row. */
|
|
13
|
+
selected: {
|
|
14
|
+
slot: Slot;
|
|
15
|
+
index: number;
|
|
16
|
+
}[];
|
|
17
|
+
rect: GridRect;
|
|
18
|
+
}
|
|
19
|
+
/** The innermost table around the selection, when the structure commands can edit it. */
|
|
20
|
+
export declare function restructureContext(view: EditorView): Context | undefined;
|
|
21
|
+
/** Whether the merged-table commands (not the rectangular-table ones) own this table. */
|
|
22
|
+
export declare function usesRestructure(ctx: Context | undefined, action: string): boolean;
|
|
23
|
+
export interface Split {
|
|
24
|
+
rows: number;
|
|
25
|
+
columns: number;
|
|
26
|
+
}
|
|
27
|
+
/** Whether `action` applies to the table around the selection (a dry run of the edit). */
|
|
28
|
+
export declare function canRestructure(ctx: Context, action: RestructureCommand): boolean;
|
|
29
|
+
/** The size of the cell the Split Cells dialog starts from, or undefined when none can be split. */
|
|
30
|
+
export declare function splitTarget(view: EditorView): {
|
|
31
|
+
rows: number;
|
|
32
|
+
span: number;
|
|
33
|
+
} | undefined;
|
|
34
|
+
/** Applies `action` to the table around the selection; false when it cannot be applied. */
|
|
35
|
+
export declare function executeRestructure(view: EditorView, action: RestructureCommand, newId: IdFactory, split?: Split): boolean;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ContentControl, Paragraph, Table, TableCell } from 'ooxml-core/docx';
|
|
2
|
+
import type { Node as ProseMirrorNode } from 'prosemirror-model';
|
|
3
|
+
/** Whether the node's cells, spans, merges, widths or grid differ from the model's. */
|
|
4
|
+
export declare function structureChanged(node: ProseMirrorNode, prior: Table): boolean;
|
|
5
|
+
export type NestedConverter = (node: ProseMirrorNode, prior: Table) => Table;
|
|
6
|
+
/**
|
|
7
|
+
* Rebuilds `prior` from the edited `node`: rows, cells and merges as the node holds them, each
|
|
8
|
+
* surviving cell cloned from its source cell by first-paragraph id.
|
|
9
|
+
*/
|
|
10
|
+
export declare function convertRestructuredTable(node: ProseMirrorNode, prior: Table, convertParagraph: (paragraph: ProseMirrorNode) => Paragraph, convertNested: NestedConverter, heldControl: (cell: ProseMirrorNode, prior: ContentControl | undefined) => Partial<TableCell>): Table;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Table } from 'ooxml-core/docx';
|
|
2
|
+
import type { Node as ProseMirrorNode } from 'prosemirror-model';
|
|
3
|
+
/** One position of a row: a cell node, or a cell the vertical merge above it continues through. */
|
|
4
|
+
export interface Slot {
|
|
5
|
+
row: number;
|
|
6
|
+
col: number;
|
|
7
|
+
span: number;
|
|
8
|
+
/** The cell node (the merge start, for a continuation). */
|
|
9
|
+
cell: ProseMirrorNode;
|
|
10
|
+
/** 0 for the cell itself, k for its k-th continuation row. */
|
|
11
|
+
offset: number;
|
|
12
|
+
/** First paragraph id of the source cell this slot stands for. */
|
|
13
|
+
key: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const keysOf: (cell: ProseMirrorNode) => string[];
|
|
16
|
+
export declare const gridOf: (table: ProseMirrorNode) => number[] | undefined;
|
|
17
|
+
/** The slots of each row of a table node, left to right. */
|
|
18
|
+
export declare function slotsOf(table: ProseMirrorNode): Slot[][];
|
|
19
|
+
/** The core model of a table node: cell ids, spans, merges, widths and the formatting new cells copy. */
|
|
20
|
+
export declare function skeletonOf(table: ProseMirrorNode): Table;
|
|
21
|
+
/** A table node for `result`, a structure edit of `old`'s skeleton; surviving cells keep their content. */
|
|
22
|
+
export declare function nodeFromResult(old: ProseMirrorNode, result: Table): ProseMirrorNode | undefined;
|