@web-ppt/edit-core 0.5.0-beta.1
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/CHANGELOG.md +274 -0
- package/LICENSE +21 -0
- package/README.md +474 -0
- package/dist/animation-catalog.d.ts +21 -0
- package/dist/body-properties.d.ts +8 -0
- package/dist/body-property-schema.d.ts +3 -0
- package/dist/change-classification.d.ts +10 -0
- package/dist/clipboard-binary.d.ts +4 -0
- package/dist/clipboard-links.d.ts +11 -0
- package/dist/clipboard-source.d.ts +23 -0
- package/dist/clipboard.d.ts +4 -0
- package/dist/commands/add-image.d.ts +4 -0
- package/dist/commands/add-shape.d.ts +4 -0
- package/dist/commands/add-slide-identity.d.ts +8 -0
- package/dist/commands/add-slide-template.d.ts +9 -0
- package/dist/commands/add-slide.d.ts +3 -0
- package/dist/commands/add-table.d.ts +4 -0
- package/dist/commands/align-elements.d.ts +4 -0
- package/dist/commands/apply-format.d.ts +4 -0
- package/dist/commands/clipboard-types.d.ts +91 -0
- package/dist/commands/direct-format-patches.d.ts +8 -0
- package/dist/commands/dispatch.d.ts +7 -0
- package/dist/commands/duplicate-slide.d.ts +3 -0
- package/dist/commands/edit-text.d.ts +3 -0
- package/dist/commands/element-effects.d.ts +5 -0
- package/dist/commands/element-fill.d.ts +5 -0
- package/dist/commands/element-image-content.d.ts +17 -0
- package/dist/commands/element-interaction.d.ts +11 -0
- package/dist/commands/element-link.d.ts +5 -0
- package/dist/commands/element-name.d.ts +8 -0
- package/dist/commands/element-order.d.ts +7 -0
- package/dist/commands/element-stroke.d.ts +5 -0
- package/dist/commands/element-text.d.ts +6 -0
- package/dist/commands/element-transform.d.ts +5 -0
- package/dist/commands/element-tree.d.ts +8 -0
- package/dist/commands/fit-text-shape.d.ts +3 -0
- package/dist/commands/format-painter-types.d.ts +17 -0
- package/dist/commands/image-format.d.ts +7 -0
- package/dist/commands/image-resource.d.ts +4 -0
- package/dist/commands/insert-row.d.ts +3 -0
- package/dist/commands/insertion-rect.d.ts +9 -0
- package/dist/commands/paste-elements.d.ts +4 -0
- package/dist/commands/paste-resources.d.ts +18 -0
- package/dist/commands/patch.d.ts +6 -0
- package/dist/commands/remove-slide.d.ts +3 -0
- package/dist/commands/replace-image.d.ts +3 -0
- package/dist/commands/replace-text.d.ts +5 -0
- package/dist/commands/set-animations.d.ts +3 -0
- package/dist/commands/set-body-props.d.ts +3 -0
- package/dist/commands/set-crop.d.ts +3 -0
- package/dist/commands/set-effects.d.ts +3 -0
- package/dist/commands/set-fill.d.ts +3 -0
- package/dist/commands/set-flip.d.ts +4 -0
- package/dist/commands/set-link.d.ts +3 -0
- package/dist/commands/set-para-props.d.ts +3 -0
- package/dist/commands/set-run-props.d.ts +3 -0
- package/dist/commands/set-slide-properties.d.ts +7 -0
- package/dist/commands/set-stroke.d.ts +3 -0
- package/dist/commands/set-xfrm.d.ts +3 -0
- package/dist/commands/set-z.d.ts +5 -0
- package/dist/commands/slide-image.d.ts +4 -0
- package/dist/commands/slide-layout.d.ts +8 -0
- package/dist/commands/slide-notes.d.ts +8 -0
- package/dist/commands/slide-order.d.ts +7 -0
- package/dist/commands/slide-property-types.d.ts +135 -0
- package/dist/commands/slide-property.d.ts +20 -0
- package/dist/commands/slide-tree.d.ts +6 -0
- package/dist/commands/spid.d.ts +4 -0
- package/dist/commands/table-row.d.ts +5 -0
- package/dist/commands/text-target.d.ts +25 -0
- package/dist/commands/types.d.ts +509 -0
- package/dist/commands/xfrm.d.ts +8 -0
- package/dist/data-validation.d.ts +7 -0
- package/dist/document.d.ts +17 -0
- package/dist/dynamic-slide-fields.d.ts +6 -0
- package/dist/edit-core.js +5321 -0
- package/dist/editor.d.ts +38 -0
- package/dist/element-ancestry.d.ts +3 -0
- package/dist/element-name.d.ts +4 -0
- package/dist/element-order.d.ts +7 -0
- package/dist/field-text.d.ts +3 -0
- package/dist/fractional-index.d.ts +10 -0
- package/dist/history.d.ts +50 -0
- package/dist/hyperlink.d.ts +10 -0
- package/dist/image-content.d.ts +7 -0
- package/dist/image-resource-history.d.ts +6 -0
- package/dist/index-D4ZTaYOa.js +706 -0
- package/dist/index.d.ts +46 -0
- package/dist/insertion-DabLme_U.js +5471 -0
- package/dist/insertion-invariants.d.ts +5 -0
- package/dist/layout-assets.d.ts +10 -0
- package/dist/layout-projection.d.ts +24 -0
- package/dist/layout-text-rebase.d.ts +3 -0
- package/dist/model-invariants.d.ts +5 -0
- package/dist/notes-part.d.ts +2 -0
- package/dist/opc/bytes.d.ts +1 -0
- package/dist/opc/crc32.d.ts +1 -0
- package/dist/opc/index.d.ts +3 -0
- package/dist/opc/package-owner.d.ts +4 -0
- package/dist/opc/patch.d.ts +6 -0
- package/dist/opc/types.d.ts +12 -0
- package/dist/opc/zip.d.ts +28 -0
- package/dist/opc-owner-protocol.d.ts +5 -0
- package/dist/opc.js +5 -0
- package/dist/paragraph-properties.d.ts +4 -0
- package/dist/paragraph-property-schema.d.ts +4 -0
- package/dist/patch-DO8497wO.js +322 -0
- package/dist/projection.d.ts +19 -0
- package/dist/recovery-identity.d.ts +35 -0
- package/dist/recovery-types.d.ts +30 -0
- package/dist/recovery.d.ts +28 -0
- package/dist/run-links.d.ts +3 -0
- package/dist/run-properties.d.ts +4 -0
- package/dist/run-property-schema.d.ts +3 -0
- package/dist/save/animation.d.ts +6 -0
- package/dist/save/background-image.d.ts +8 -0
- package/dist/save/clipboard-parts.d.ts +11 -0
- package/dist/save/drawing-color.d.ts +2 -0
- package/dist/save/duplicate-slide-parts.d.ts +15 -0
- package/dist/save/effects.d.ts +6 -0
- package/dist/save/hyperlink.d.ts +18 -0
- package/dist/save/image-content.d.ts +4 -0
- package/dist/save/index.d.ts +5 -0
- package/dist/save/insertion.d.ts +14 -0
- package/dist/save/layout-fallback-source.d.ts +4 -0
- package/dist/save/layout-fallback.d.ts +7 -0
- package/dist/save/materialize.d.ts +5 -0
- package/dist/save/name.d.ts +5 -0
- package/dist/save/notes.d.ts +12 -0
- package/dist/save/order.d.ts +5 -0
- package/dist/save/remove-element.d.ts +4 -0
- package/dist/save/remove-slide-parts.d.ts +11 -0
- package/dist/save/shape-format.d.ts +14 -0
- package/dist/save/slide-parts.d.ts +11 -0
- package/dist/save/slide-properties.d.ts +4 -0
- package/dist/save/table.d.ts +7 -0
- package/dist/save/text-body.d.ts +4 -0
- package/dist/save/text.d.ts +6 -0
- package/dist/save/transition.d.ts +4 -0
- package/dist/save/xfrm.d.ts +22 -0
- package/dist/save/xml-element.d.ts +3 -0
- package/dist/save.js +1559 -0
- package/dist/selection-pane.d.ts +18 -0
- package/dist/selection.d.ts +11 -0
- package/dist/session-assets.d.ts +20 -0
- package/dist/shape-effects.d.ts +6 -0
- package/dist/shape-fill.d.ts +12 -0
- package/dist/shape-stroke.d.ts +9 -0
- package/dist/slide-animation.d.ts +15 -0
- package/dist/slide-background-source.d.ts +13 -0
- package/dist/slide-notes.d.ts +2 -0
- package/dist/slide-properties.d.ts +4 -0
- package/dist/slide-transition.d.ts +19 -0
- package/dist/space.d.ts +47 -0
- package/dist/table-cell.d.ts +10 -0
- package/dist/table-direct-markup.d.ts +3 -0
- package/dist/table-insertion-policy.d.ts +5 -0
- package/dist/table-row-append-validation.d.ts +3 -0
- package/dist/table-rows.d.ts +12 -0
- package/dist/text-model.d.ts +28 -0
- package/dist/text-override-projection.d.ts +8 -0
- package/dist/text-override-validation.d.ts +7 -0
- package/dist/text-position.d.ts +8 -0
- package/dist/text-search-types.d.ts +46 -0
- package/dist/text-search.d.ts +5 -0
- package/dist/transaction-validation.d.ts +5 -0
- package/dist/types.d.ts +519 -0
- package/dist/xml/index.d.ts +9 -0
- package/dist/xml/mutate.d.ts +7 -0
- package/dist/xml/namespace.d.ts +5 -0
- package/dist/xml/nodes.d.ts +22 -0
- package/dist/xml/order.d.ts +15 -0
- package/dist/xml/qname.d.ts +15 -0
- package/dist/xml/query.d.ts +10 -0
- package/dist/xml/state.d.ts +30 -0
- package/dist/xml/tree.d.ts +8 -0
- package/dist/xml/types.d.ts +46 -0
- package/dist/xml.js +19 -0
- package/package.json +67 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import type { GeomSpec, SlideElement } from '@web-ppt/core';
|
|
2
|
+
import type { AffineMatrix } from '../space';
|
|
3
|
+
import type { EditableKind, SlideId, TableCellAddress } from '../types';
|
|
4
|
+
export interface ElementClipboardRecordMeta {
|
|
5
|
+
/** 同一次复制操作的来源证明;粘贴时用来拒绝拼接多个来源的伪造树。 */
|
|
6
|
+
readonly copyBatchId: string;
|
|
7
|
+
readonly editable: EditableKind;
|
|
8
|
+
readonly anchored: boolean;
|
|
9
|
+
readonly sourceSpid?: number;
|
|
10
|
+
readonly geom?: GeomSpec;
|
|
11
|
+
/** 复制时根元素的 frame → slide 视觉矩阵;后代不需要重复携带。 */
|
|
12
|
+
readonly frameToSlide?: AffineMatrix;
|
|
13
|
+
readonly link?: ClipboardPortableLink;
|
|
14
|
+
readonly textLinks?: readonly ClipboardTextLink[];
|
|
15
|
+
}
|
|
16
|
+
export type ClipboardPortableLink = {
|
|
17
|
+
readonly kind: 'external';
|
|
18
|
+
readonly href: string;
|
|
19
|
+
} | {
|
|
20
|
+
readonly kind: 'slide';
|
|
21
|
+
readonly sourceSlideId: SlideId;
|
|
22
|
+
readonly packageTarget?: {
|
|
23
|
+
readonly rootHash: string;
|
|
24
|
+
readonly closureHash: string;
|
|
25
|
+
};
|
|
26
|
+
} | {
|
|
27
|
+
readonly kind: 'none';
|
|
28
|
+
} | {
|
|
29
|
+
readonly kind: 'unsupported';
|
|
30
|
+
} | {
|
|
31
|
+
readonly kind: 'relative';
|
|
32
|
+
readonly action: 'next' | 'previous' | 'first' | 'last';
|
|
33
|
+
};
|
|
34
|
+
export interface ClipboardTextLink {
|
|
35
|
+
readonly paragraph: number;
|
|
36
|
+
readonly run: number;
|
|
37
|
+
readonly cell?: TableCellAddress;
|
|
38
|
+
readonly value: ClipboardPortableLink;
|
|
39
|
+
}
|
|
40
|
+
export interface ClipboardXmlRoot {
|
|
41
|
+
readonly markup: string;
|
|
42
|
+
readonly namespaces: Readonly<Record<string, string>>;
|
|
43
|
+
readonly hostSpids: readonly string[];
|
|
44
|
+
readonly relationships?: readonly ClipboardRelationship[];
|
|
45
|
+
}
|
|
46
|
+
export interface ClipboardRelationship {
|
|
47
|
+
/** 宿主片段中原始的 r:id / r:embed / r:link 值。 */
|
|
48
|
+
readonly sourceId: string;
|
|
49
|
+
readonly type: string;
|
|
50
|
+
readonly target?: string;
|
|
51
|
+
readonly targetMode?: 'External';
|
|
52
|
+
readonly resourceHash?: string;
|
|
53
|
+
/** 复杂 OOXML 对象只在目标包拥有同一闭包时复用,不把未知格式静默扁平化。 */
|
|
54
|
+
readonly packageTarget?: {
|
|
55
|
+
/** 根内容与关系图都不包含 part 路径,目标包据此重新定位等价闭包。 */
|
|
56
|
+
readonly rootHash: string;
|
|
57
|
+
readonly closureHash: string;
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
export interface ClipboardElementRecord {
|
|
61
|
+
readonly id: string;
|
|
62
|
+
readonly parent: string | null;
|
|
63
|
+
readonly src: SlideElement;
|
|
64
|
+
readonly meta: ElementClipboardRecordMeta;
|
|
65
|
+
readonly children: readonly string[];
|
|
66
|
+
}
|
|
67
|
+
export interface ClipboardResource {
|
|
68
|
+
readonly hash: string;
|
|
69
|
+
readonly mime: string;
|
|
70
|
+
readonly extension: string;
|
|
71
|
+
readonly bytes: string;
|
|
72
|
+
}
|
|
73
|
+
export interface ElementClipboardPayload {
|
|
74
|
+
readonly format: 'web-ppt-elements';
|
|
75
|
+
readonly version: 1;
|
|
76
|
+
readonly source: {
|
|
77
|
+
readonly width: number;
|
|
78
|
+
readonly height: number;
|
|
79
|
+
readonly copyBatchId: string;
|
|
80
|
+
};
|
|
81
|
+
readonly bounds: {
|
|
82
|
+
readonly left: number;
|
|
83
|
+
readonly top: number;
|
|
84
|
+
};
|
|
85
|
+
readonly roots: readonly string[];
|
|
86
|
+
readonly records: Readonly<Record<string, ClipboardElementRecord>>;
|
|
87
|
+
readonly ooxml: {
|
|
88
|
+
readonly roots: Readonly<Record<string, ClipboardXmlRoot>>;
|
|
89
|
+
};
|
|
90
|
+
readonly resources: readonly ClipboardResource[];
|
|
91
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Effects, Fill, Stroke } from '@web-ppt/core';
|
|
2
|
+
import type { EditDoc } from '../types';
|
|
3
|
+
import type { CommandPatches } from './types';
|
|
4
|
+
export declare function directFillPatches(doc: EditDoc, id: string, value: Exclude<Fill, {
|
|
5
|
+
type: 'image';
|
|
6
|
+
}>, origin: string): CommandPatches;
|
|
7
|
+
export declare function directStrokePatches(doc: EditDoc, id: string, value: Stroke | null, origin: string): CommandPatches;
|
|
8
|
+
export declare function directEffectsPatches(doc: EditDoc, id: string, value: Effects, origin: string): CommandPatches;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { EditDoc, ElementId } from '../types';
|
|
2
|
+
import type { Command, CommandPatches } from './types';
|
|
3
|
+
export declare function assertPureCommand(input: Command): void;
|
|
4
|
+
/** 批处理冲突检测与命令注册共享目标语义;非法动态输入留给纯数据校验给出具体错误。 */
|
|
5
|
+
export declare function commandTargetIds(command: Command): readonly ElementId[];
|
|
6
|
+
export declare function commandSelectsInsertedElement(command: Command): boolean;
|
|
7
|
+
export declare function commandPatches(doc: EditDoc, command: Command, origin: string): CommandPatches;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { EditDoc } from '../types';
|
|
2
|
+
import type { ElementEffectsPatch, Patch } from './types';
|
|
3
|
+
export declare function isElementEffectsPatch(patch: Patch): patch is ElementEffectsPatch;
|
|
4
|
+
export declare function validateElementEffectsPatch(doc: EditDoc, patch: ElementEffectsPatch, index: number): void;
|
|
5
|
+
export declare function applyElementEffectsPatch(doc: EditDoc, patch: ElementEffectsPatch): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { EditDoc } from '../types';
|
|
2
|
+
import type { ElementFillPatch, Patch } from './types';
|
|
3
|
+
export declare function isElementFillPatch(patch: Patch): patch is ElementFillPatch;
|
|
4
|
+
export declare function validateElementFillPatch(doc: EditDoc, patch: ElementFillPatch, index: number): void;
|
|
5
|
+
export declare function applyElementFillPatch(doc: EditDoc, patch: ElementFillPatch): void;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { EditDoc, ElementImageReplacement, ElementInsertionResource } from '../types';
|
|
2
|
+
import type { ElementCropPatch, ElementImageReplacementPatch, ImageResourcePatch, Patch } from './types';
|
|
3
|
+
export declare function assertImageReplacement(value: unknown, sourcePart: string, resources: Readonly<Record<string, ElementInsertionResource>>, label: string): asserts value is ElementImageReplacement;
|
|
4
|
+
export declare function assertImageResource(value: unknown, label: string, doc?: EditDoc): asserts value is ElementInsertionResource;
|
|
5
|
+
/** 无来源溯源的背景只能是公开上传白名单,不能把包内扩展格式伪装成上传。 */
|
|
6
|
+
export declare function assertUploadImageResource(resource: ElementInsertionResource, label: string): void;
|
|
7
|
+
/** 一批远端资源不能把不同字节分配给同一目标;相同内容复用同一 part 是合法去重。 */
|
|
8
|
+
export declare function assertImageResourceTargets(doc: EditDoc, resources: Readonly<Record<string, ElementInsertionResource>>): void;
|
|
9
|
+
export declare function isElementCropPatch(patch: Patch): patch is ElementCropPatch;
|
|
10
|
+
export declare function isElementImageReplacementPatch(patch: Patch): patch is ElementImageReplacementPatch;
|
|
11
|
+
export declare function isImageResourcePatch(patch: Patch): patch is ImageResourcePatch;
|
|
12
|
+
export declare function validateElementCropPatch(doc: EditDoc, patch: ElementCropPatch, index: number): void;
|
|
13
|
+
export declare function validateElementImageReplacementPatch(doc: EditDoc, patch: ElementImageReplacementPatch, index: number, resources?: Readonly<Record<string, ElementInsertionResource>>): void;
|
|
14
|
+
export declare function validateImageResourcePatch(doc: EditDoc, patch: ImageResourcePatch, index: number): void;
|
|
15
|
+
export declare function applyElementCropPatch(doc: EditDoc, patch: ElementCropPatch): void;
|
|
16
|
+
export declare function applyElementImageReplacementPatch(doc: EditDoc, patch: ElementImageReplacementPatch): void;
|
|
17
|
+
export declare function applyImageResourcePatch(doc: EditDoc, patch: ImageResourcePatch): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { EditDoc, ElementId } from '../types';
|
|
2
|
+
import type { CommandPatches, ElementInteractionPatch, SetElementHiddenCommand, SetLockedCommand } from './types';
|
|
3
|
+
export declare function isElementInteractionPatch(patch: {
|
|
4
|
+
readonly path: readonly unknown[];
|
|
5
|
+
}): patch is ElementInteractionPatch;
|
|
6
|
+
export declare function validateElementInteractionPatch(doc: EditDoc, patch: ElementInteractionPatch, index: number): void;
|
|
7
|
+
export declare function applyElementInteractionPatch(doc: EditDoc, patch: ElementInteractionPatch): void;
|
|
8
|
+
export declare function setLockedPatches(doc: EditDoc, command: SetLockedCommand, origin: string): CommandPatches;
|
|
9
|
+
export declare function setElementHiddenPatches(doc: EditDoc, command: SetElementHiddenCommand, origin: string): CommandPatches;
|
|
10
|
+
export declare function elementHasLockedAncestor(doc: EditDoc, id: ElementId): boolean;
|
|
11
|
+
export declare function assertElementUnlocked(doc: EditDoc, id: ElementId): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { EditDoc } from '../types';
|
|
2
|
+
import type { ElementLinkPatch, Patch } from './types';
|
|
3
|
+
export declare function isElementLinkPatch(patch: Patch): patch is ElementLinkPatch;
|
|
4
|
+
export declare function validateElementLinkPatch(doc: EditDoc, patch: ElementLinkPatch, index: number): void;
|
|
5
|
+
export declare function applyElementLinkPatch(doc: EditDoc, patch: ElementLinkPatch): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { EditDoc } from '../types';
|
|
2
|
+
import type { CommandPatches, ElementNamePatch, SetNameCommand } from './types';
|
|
3
|
+
export declare function isElementNamePatch(patch: {
|
|
4
|
+
readonly path: readonly unknown[];
|
|
5
|
+
}): patch is ElementNamePatch;
|
|
6
|
+
export declare function validateElementNamePatch(doc: EditDoc, patch: ElementNamePatch, index: number): void;
|
|
7
|
+
export declare function applyElementNamePatch(doc: EditDoc, patch: ElementNamePatch): void;
|
|
8
|
+
export declare function setNamePatches(doc: EditDoc, command: SetNameCommand, origin: string): CommandPatches;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { EditDoc } from '../types';
|
|
2
|
+
import type { ElementOrderPatch, Patch } from './types';
|
|
3
|
+
export declare function isElementOrderPatch(patch: Patch): patch is ElementOrderPatch;
|
|
4
|
+
export declare function validateElementOrderPatch(doc: EditDoc, patch: ElementOrderPatch, index: number): void;
|
|
5
|
+
export declare function validateElementOrderPatchSet(doc: EditDoc, patches: readonly Patch[]): void;
|
|
6
|
+
export declare function applyElementOrderValue(doc: EditDoc, patch: ElementOrderPatch): string;
|
|
7
|
+
export declare function applyElementOrderPatch(doc: EditDoc, patch: ElementOrderPatch): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { EditDoc } from '../types';
|
|
2
|
+
import type { ElementStrokePatch, Patch } from './types';
|
|
3
|
+
export declare function isElementStrokePatch(patch: Patch): patch is ElementStrokePatch;
|
|
4
|
+
export declare function validateElementStrokePatch(doc: EditDoc, patch: ElementStrokePatch, index: number): void;
|
|
5
|
+
export declare function applyElementStrokePatch(doc: EditDoc, patch: ElementStrokePatch): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { EditDoc, TableRowInsertion } from '../types';
|
|
2
|
+
import type { CommandPatches, ElementTextPatch, Patch } from './types';
|
|
3
|
+
export declare function isElementTextPatch(patch: Patch): patch is ElementTextPatch;
|
|
4
|
+
export declare function clearElementTextPatches(doc: EditDoc, id: string, origin: string): CommandPatches;
|
|
5
|
+
export declare function validateElementTextPatch(doc: EditDoc, patch: ElementTextPatch, index: number, stagedTableRows?: Record<string, TableRowInsertion>): void;
|
|
6
|
+
export declare function applyElementTextPatch(doc: EditDoc, patch: ElementTextPatch): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { EditDoc } from '../types';
|
|
2
|
+
import type { CommandPatches, ElementTransformPatch, XfrmField } from './types';
|
|
3
|
+
/** 变换命令共用权限与 patch 语义,避免位置和翻转两条路径逐渐分叉。 */
|
|
4
|
+
export declare function elementTransformPatches(doc: EditDoc, id: string, values: Partial<Record<XfrmField, unknown>>, fields: readonly XfrmField[], origin: string, label: string): CommandPatches;
|
|
5
|
+
export declare function applyElementTransformPatch(doc: EditDoc, patch: ElementTransformPatch): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { EditDoc, ElementRecord } from '../types';
|
|
2
|
+
import type { CommandPatches, ElementTreePatch, ElementTreeSnapshot, Patch, RemoveElementCommand } from './types';
|
|
3
|
+
export declare function willRemoveElementStructure(record: ElementRecord | undefined): boolean;
|
|
4
|
+
export declare function isElementTreePatch(patch: Patch): patch is ElementTreePatch;
|
|
5
|
+
export declare function removeElementPatches(doc: EditDoc, command: RemoveElementCommand, origin: string): CommandPatches;
|
|
6
|
+
export declare function validateElementTreePatch(doc: EditDoc, patch: ElementTreePatch, index: number): void;
|
|
7
|
+
export declare function applyElementTreePatch(doc: EditDoc, patch: ElementTreePatch): void;
|
|
8
|
+
export declare function elementTreeSlide(doc: EditDoc, snapshot: ElementTreeSnapshot): string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ElementId, TableCellAddress } from '../types';
|
|
2
|
+
import type { TextRange } from './types';
|
|
3
|
+
export declare const FORMAT_MASK_FIELDS: readonly ["fill", "stroke", "effects", "run", "paragraph", "body"];
|
|
4
|
+
export type FormatMaskField = typeof FORMAT_MASK_FIELDS[number];
|
|
5
|
+
export declare function assertFormatMask(value: unknown, label?: string): asserts value is readonly FormatMaskField[];
|
|
6
|
+
export interface ApplyFormatCommand {
|
|
7
|
+
readonly type: 'ApplyFormat';
|
|
8
|
+
readonly from: ElementId;
|
|
9
|
+
readonly to: ElementId;
|
|
10
|
+
readonly mask: readonly FormatMaskField[];
|
|
11
|
+
readonly fromCell?: TableCellAddress;
|
|
12
|
+
readonly toCell?: TableCellAddress;
|
|
13
|
+
/** 省略表示整个来源文本体;只对 run/paragraph 生效。 */
|
|
14
|
+
readonly fromRange?: TextRange;
|
|
15
|
+
/** 省略表示整个目标文本体;只对 run/paragraph 生效。 */
|
|
16
|
+
readonly toRange?: TextRange;
|
|
17
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type SupportedImageMime = 'image/png' | 'image/jpeg' | 'image/gif' | 'image/webp';
|
|
2
|
+
export declare function detectImageMime(bytes: Uint8Array): SupportedImageMime | null;
|
|
3
|
+
export declare function validateImageFormat(bytes: Uint8Array, mime: unknown, command?: string): {
|
|
4
|
+
extension: string;
|
|
5
|
+
};
|
|
6
|
+
/** 模型资源还会复用 OPC 已有图片;它比上传白名单宽,但仍按字节验证真实容器。 */
|
|
7
|
+
export declare function validateStoredImageFormat(bytes: Uint8Array, mime: unknown, extension: unknown, label: string, allowPackageSource?: boolean): boolean;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ClipboardResource } from './types';
|
|
2
|
+
export declare const MAX_REPLACE_IMAGE_BYTES: number;
|
|
3
|
+
export declare function copyImageBytes(value: unknown, label: string, maxBytes?: number): Uint8Array;
|
|
4
|
+
export declare function createImageResource(bytesInput: unknown, mime: unknown, label: string, maxBytes?: number): ClipboardResource;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface InsertionRect {
|
|
2
|
+
readonly x: number;
|
|
3
|
+
readonly y: number;
|
|
4
|
+
readonly w: number;
|
|
5
|
+
readonly h: number;
|
|
6
|
+
}
|
|
7
|
+
export declare const EMU_PER_PX = 9525;
|
|
8
|
+
export declare const pxToEmu: (value: number) => number;
|
|
9
|
+
export declare function assertInsertionRect(value: unknown, label: string): asserts value is InsertionRect;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { EditDoc } from '../types';
|
|
2
|
+
import type { CommandPatches, PasteElementsCommand } from './types';
|
|
3
|
+
/** 所有身份、树记录与位置先在内存中构造完毕,再作为一组结构 patch 原子落模。 */
|
|
4
|
+
export declare function pasteElementsPatches(doc: EditDoc, command: PasteElementsCommand, origin: string): CommandPatches;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { EditDoc, ElementInsertionRelationship, ElementInsertionResource } from '../types';
|
|
2
|
+
import type { ElementClipboardPayload } from './types';
|
|
3
|
+
import type { ClipboardClosure } from '../clipboard-source';
|
|
4
|
+
import type { OpcPackage } from '@web-ppt/core';
|
|
5
|
+
export interface PreparedInsertionClosure {
|
|
6
|
+
relationships: ElementInsertionRelationship[];
|
|
7
|
+
resources: ElementInsertionResource[];
|
|
8
|
+
}
|
|
9
|
+
/** 图片替换与剪贴板共用目标 part/关系分配,避免命令伪造一棵空剪贴板树。 */
|
|
10
|
+
export declare function prepareMediaResourceClosure(doc: EditDoc, destinationPart: string, sourceId: string, type: string, source: Omit<ElementInsertionResource, 'targetPart' | 'created'>): PreparedInsertionClosure;
|
|
11
|
+
/** 继承背景来自当前包的已知宿主;按关系闭包逐项改写,不能为一次裁剪扫描整包媒体。 */
|
|
12
|
+
export declare function prepareTrustedSourceClosure(doc: EditDoc, pkg: OpcPackage, source: ClipboardClosure, sourcePart: string, destinationPart: string): PreparedInsertionClosure;
|
|
13
|
+
/** 来源与目标是同一 slide 时复用现有关系,裁剪不应制造未引用的新 rId。 */
|
|
14
|
+
export declare function prepareExistingSourceClosure(pkg: OpcPackage, source: ClipboardClosure, sourcePart: string): PreparedInsertionClosure;
|
|
15
|
+
/** 先验证完整闭包并分配所有目标名;调用返回前不得触碰 EditDoc。 */
|
|
16
|
+
export declare function prepareInsertionClosures(doc: EditDoc, payload: ElementClipboardPayload, roots: readonly string[], destinationPart: string, options?: {
|
|
17
|
+
readonly preverifiedResourceHashes?: ReadonlySet<string>;
|
|
18
|
+
}): Map<string, PreparedInsertionClosure>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { EditDoc, ProjectionInvalidation } from '../types';
|
|
2
|
+
import type { Patch } from './types';
|
|
3
|
+
/** JSON/协同 seam:结构快照必须先在写时复制的完整模型上验真。 */
|
|
4
|
+
export declare function applyPatches(doc: EditDoc, patches: readonly Patch[]): ProjectionInvalidation;
|
|
5
|
+
/** 仅供同一事务内刚生成的命令 Patch;事务末尾由 Editor 统一校验完整模型。 */
|
|
6
|
+
export declare function applyLocalPatches(doc: EditDoc, patches: readonly Patch[]): ProjectionInvalidation;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ReplaceTextCommand } from '../text-search-types';
|
|
2
|
+
import type { EditDoc } from '../types';
|
|
3
|
+
import type { CommandPatches } from './types';
|
|
4
|
+
export declare function replaceTextTargetIds(doc: EditDoc, command: ReplaceTextCommand): readonly string[];
|
|
5
|
+
export declare function replaceTextPatches(doc: EditDoc, command: ReplaceTextCommand, origin: string): CommandPatches;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { EditDoc } from '../types';
|
|
2
|
+
import type { CommandPatches, SetFlipCommand } from './types';
|
|
3
|
+
export declare const SET_FLIP_COMMAND_FIELDS: readonly ["h", "v"];
|
|
4
|
+
export declare function setFlipPatches(doc: EditDoc, command: SetFlipCommand, origin: string): CommandPatches;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { EditDoc } from '../types';
|
|
2
|
+
import type { CommandPatches, SetBackgroundCommand, SetBackgroundCropCommand, SetBackgroundImageCommand, SetHiddenCommand, SetTransitionCommand } from './types';
|
|
3
|
+
export declare function setBackgroundPatches(doc: EditDoc, command: SetBackgroundCommand, origin: string): CommandPatches;
|
|
4
|
+
export declare function setBackgroundImagePatches(doc: EditDoc, command: SetBackgroundImageCommand, origin: string): CommandPatches;
|
|
5
|
+
export declare function setBackgroundCropPatches(doc: EditDoc, command: SetBackgroundCropCommand, origin: string): CommandPatches;
|
|
6
|
+
export declare function setHiddenPatches(doc: EditDoc, command: SetHiddenCommand, origin: string): CommandPatches;
|
|
7
|
+
export declare function setTransitionPatches(doc: EditDoc, command: SetTransitionCommand, origin: string): CommandPatches;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { EditDoc } from '../types';
|
|
2
|
+
import type { CommandPatches, SetZCommand } from './types';
|
|
3
|
+
export declare function assertSetZCommand(doc: EditDoc, command: SetZCommand): import("..").ElementRecord;
|
|
4
|
+
export declare function setZBatchPatches(doc: EditDoc, commands: readonly SetZCommand[], origin: string): CommandPatches;
|
|
5
|
+
export declare function setZPatches(doc: EditDoc, command: SetZCommand, origin: string): CommandPatches;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ImageTile } from '@web-ppt/core';
|
|
2
|
+
/** 命令入口与远端 patch 共用同一平铺边界,避免协同载荷绕过本地校验。 */
|
|
3
|
+
export declare function normalizeSlideImageTile(value: unknown, label: string): ImageTile | undefined;
|
|
4
|
+
export declare function normalizeSlideImageTilePlacement(value: unknown, label: string): ImageTile | undefined;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { EditDoc } from '../types';
|
|
2
|
+
import type { CommandPatches, SetLayoutCommand, SlideLayoutPatch } from './types';
|
|
3
|
+
export declare function isSlideLayoutPatch(patch: {
|
|
4
|
+
readonly path: readonly unknown[];
|
|
5
|
+
}): patch is SlideLayoutPatch;
|
|
6
|
+
export declare function validateSlideLayoutPatch(doc: EditDoc, patch: SlideLayoutPatch, index: number): void;
|
|
7
|
+
export declare function applySlideLayoutPatch(doc: EditDoc, patch: SlideLayoutPatch): void;
|
|
8
|
+
export declare function setLayoutPatches(doc: EditDoc, command: SetLayoutCommand, origin: string): CommandPatches;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { EditDoc } from '../types';
|
|
2
|
+
import type { CommandPatches, SetNotesCommand, SlideNotesPatch } from './types';
|
|
3
|
+
export declare function isSlideNotesPatch(patch: {
|
|
4
|
+
readonly path: readonly unknown[];
|
|
5
|
+
}): patch is SlideNotesPatch;
|
|
6
|
+
export declare function validateSlideNotesPatch(doc: EditDoc, patch: SlideNotesPatch, index: number): void;
|
|
7
|
+
export declare function applySlideNotesPatch(doc: EditDoc, patch: SlideNotesPatch): void;
|
|
8
|
+
export declare function setNotesPatches(doc: EditDoc, command: SetNotesCommand, origin: string): CommandPatches;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { EditDoc } from '../types';
|
|
2
|
+
import type { CommandPatches, MoveSlideCommand, Patch, SlideOrderPatch } from './types';
|
|
3
|
+
export declare function isSlideOrderPatch(patch: Patch): patch is SlideOrderPatch;
|
|
4
|
+
export declare function validateSlideOrderPatch(doc: EditDoc, patch: SlideOrderPatch, index: number): void;
|
|
5
|
+
export declare function slideOrderPatchStart(doc: EditDoc, patch: SlideOrderPatch): number;
|
|
6
|
+
export declare function applySlideOrderPatch(doc: EditDoc, patch: SlideOrderPatch): void;
|
|
7
|
+
export declare function moveSlidePatches(doc: EditDoc, command: MoveSlideCommand, origin: string): CommandPatches;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import type { Fill, ImageTilePlacement, Transition } from '@web-ppt/core';
|
|
2
|
+
import type { SlideTransitionInput } from '../slide-transition';
|
|
3
|
+
import type { EditAnimationStep, ImageCrop, SlideId, SlideImageBackground, SlideNotesBinding } from '../types';
|
|
4
|
+
export interface SetBackgroundCommand {
|
|
5
|
+
readonly type: 'SetBackground';
|
|
6
|
+
readonly id: SlideId;
|
|
7
|
+
/** null 恢复来源;显式无背景使用 { type: 'none' }。 */
|
|
8
|
+
readonly fill: Exclude<Fill, {
|
|
9
|
+
type: 'image';
|
|
10
|
+
}> | null;
|
|
11
|
+
}
|
|
12
|
+
export interface SetBackgroundImageCommand {
|
|
13
|
+
readonly type: 'SetBackgroundImage';
|
|
14
|
+
readonly id: SlideId;
|
|
15
|
+
readonly bytes: Uint8Array;
|
|
16
|
+
readonly mime: string;
|
|
17
|
+
readonly crop?: ImageCrop;
|
|
18
|
+
readonly alpha?: number;
|
|
19
|
+
/** 缺少 tile 表示拉伸铺满页面。 */
|
|
20
|
+
readonly tile?: ImageTilePlacement;
|
|
21
|
+
}
|
|
22
|
+
export interface SetBackgroundCropCommand {
|
|
23
|
+
readonly type: 'SetBackgroundCrop';
|
|
24
|
+
readonly id: SlideId;
|
|
25
|
+
/** null 只清除裁剪,仍保留当前图片背景。 */
|
|
26
|
+
readonly crop: ImageCrop | null;
|
|
27
|
+
}
|
|
28
|
+
export interface SetHiddenCommand {
|
|
29
|
+
readonly type: 'SetHidden';
|
|
30
|
+
readonly id: SlideId;
|
|
31
|
+
/** null 恢复来源;false 可覆盖来源隐藏页。 */
|
|
32
|
+
readonly v: boolean | null;
|
|
33
|
+
}
|
|
34
|
+
export interface SetTransitionCommand {
|
|
35
|
+
readonly type: 'SetTransition';
|
|
36
|
+
readonly id: SlideId;
|
|
37
|
+
/** null 恢复来源;type=none 明确关闭切换。 */
|
|
38
|
+
readonly t: SlideTransitionInput | null;
|
|
39
|
+
}
|
|
40
|
+
export interface SetAnimationsCommand {
|
|
41
|
+
readonly type: 'SetAnimations';
|
|
42
|
+
readonly slideId: SlideId;
|
|
43
|
+
/** null 恢复来源;空列表明确移除页面动画。 */
|
|
44
|
+
readonly steps: readonly EditAnimationStep[] | null;
|
|
45
|
+
}
|
|
46
|
+
export interface SetLayoutCommand {
|
|
47
|
+
readonly type: 'SetLayout';
|
|
48
|
+
readonly id: SlideId;
|
|
49
|
+
readonly layoutId: string;
|
|
50
|
+
}
|
|
51
|
+
export interface SetNotesCommand {
|
|
52
|
+
readonly type: 'SetNotes';
|
|
53
|
+
readonly id: SlideId;
|
|
54
|
+
readonly text: string;
|
|
55
|
+
}
|
|
56
|
+
export type SlideNotesPatch = {
|
|
57
|
+
readonly op: 'set';
|
|
58
|
+
readonly path: readonly ['slides', SlideId, 'ovr', 'notes'];
|
|
59
|
+
readonly value: string;
|
|
60
|
+
readonly origin: string;
|
|
61
|
+
} | {
|
|
62
|
+
readonly op: 'del';
|
|
63
|
+
readonly path: readonly ['slides', SlideId, 'ovr', 'notes'];
|
|
64
|
+
readonly origin: string;
|
|
65
|
+
} | {
|
|
66
|
+
readonly op: 'set';
|
|
67
|
+
readonly path: readonly ['slides', SlideId, 'notes'];
|
|
68
|
+
readonly value: SlideNotesBinding;
|
|
69
|
+
readonly origin: string;
|
|
70
|
+
} | {
|
|
71
|
+
readonly op: 'del';
|
|
72
|
+
readonly path: readonly ['slides', SlideId, 'notes'];
|
|
73
|
+
readonly origin: string;
|
|
74
|
+
};
|
|
75
|
+
export type SlideLayoutPatch = {
|
|
76
|
+
readonly op: 'set';
|
|
77
|
+
readonly path: readonly ['slides', SlideId, 'layoutId'];
|
|
78
|
+
readonly value: string;
|
|
79
|
+
readonly origin: string;
|
|
80
|
+
} | {
|
|
81
|
+
readonly op: 'del';
|
|
82
|
+
readonly path: readonly ['slides', SlideId, 'layoutId'];
|
|
83
|
+
readonly origin: string;
|
|
84
|
+
};
|
|
85
|
+
export type SlideBackgroundPatch = {
|
|
86
|
+
readonly op: 'set';
|
|
87
|
+
readonly path: readonly ['slides', SlideId, 'ovr', 'background'];
|
|
88
|
+
readonly value: Fill;
|
|
89
|
+
readonly origin: string;
|
|
90
|
+
} | {
|
|
91
|
+
readonly op: 'del';
|
|
92
|
+
readonly path: readonly ['slides', SlideId, 'ovr', 'background'];
|
|
93
|
+
readonly origin: string;
|
|
94
|
+
};
|
|
95
|
+
export type SlideBackgroundImagePatch = {
|
|
96
|
+
readonly op: 'set';
|
|
97
|
+
readonly path: readonly ['slides', SlideId, 'backgroundImage'];
|
|
98
|
+
readonly value: SlideImageBackground;
|
|
99
|
+
readonly origin: string;
|
|
100
|
+
} | {
|
|
101
|
+
readonly op: 'del';
|
|
102
|
+
readonly path: readonly ['slides', SlideId, 'backgroundImage'];
|
|
103
|
+
readonly origin: string;
|
|
104
|
+
};
|
|
105
|
+
export type SlideHiddenPatch = {
|
|
106
|
+
readonly op: 'set';
|
|
107
|
+
readonly path: readonly ['slides', SlideId, 'ovr', 'hidden'];
|
|
108
|
+
readonly value: boolean;
|
|
109
|
+
readonly origin: string;
|
|
110
|
+
} | {
|
|
111
|
+
readonly op: 'del';
|
|
112
|
+
readonly path: readonly ['slides', SlideId, 'ovr', 'hidden'];
|
|
113
|
+
readonly origin: string;
|
|
114
|
+
};
|
|
115
|
+
export type SlideTransitionPatch = {
|
|
116
|
+
readonly op: 'set';
|
|
117
|
+
readonly path: readonly ['slides', SlideId, 'ovr', 'transition'];
|
|
118
|
+
readonly value: Transition;
|
|
119
|
+
readonly origin: string;
|
|
120
|
+
} | {
|
|
121
|
+
readonly op: 'del';
|
|
122
|
+
readonly path: readonly ['slides', SlideId, 'ovr', 'transition'];
|
|
123
|
+
readonly origin: string;
|
|
124
|
+
};
|
|
125
|
+
export type SlideAnimationsPatch = {
|
|
126
|
+
readonly op: 'set';
|
|
127
|
+
readonly path: readonly ['slides', SlideId, 'ovr', 'animations'];
|
|
128
|
+
readonly value: readonly EditAnimationStep[];
|
|
129
|
+
readonly origin: string;
|
|
130
|
+
} | {
|
|
131
|
+
readonly op: 'del';
|
|
132
|
+
readonly path: readonly ['slides', SlideId, 'ovr', 'animations'];
|
|
133
|
+
readonly origin: string;
|
|
134
|
+
};
|
|
135
|
+
export type SlidePropertyPatch = SlideBackgroundPatch | SlideBackgroundImagePatch | SlideHiddenPatch | SlideTransitionPatch | SlideAnimationsPatch;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type Fill } from '@web-ppt/core';
|
|
2
|
+
import type { EditDoc, ElementInsertionResource, SlideImageBackground, SlideRecord } from '../types';
|
|
3
|
+
import type { Patch, SlideAnimationsPatch, SlideBackgroundImagePatch, SlideBackgroundPatch, SlideHiddenPatch, SlidePropertyPatch, SlideTransitionPatch } from './types';
|
|
4
|
+
export declare const UPLOAD_BACKGROUND_SOURCE_ID = "rIdSlideBackground";
|
|
5
|
+
export declare function assertSlideImageFill(value: unknown, label: string): asserts value is Extract<Fill, {
|
|
6
|
+
type: 'image';
|
|
7
|
+
}>;
|
|
8
|
+
export declare function assertSlideImageBackground(value: unknown, record: SlideRecord, resources: Readonly<Record<string, ElementInsertionResource>>, label: string, doc: EditDoc): asserts value is SlideImageBackground;
|
|
9
|
+
/** sourceWidth/sourceHeight 不写入 OOXML;必须由同一图片与 DPI 重算,否则保存重开会跳变。 */
|
|
10
|
+
export declare function assertSlideImageBackgroundDimensions(doc: EditDoc, record: SlideRecord, fill: Extract<Fill, {
|
|
11
|
+
type: 'image';
|
|
12
|
+
}>, background: SlideImageBackground, resources: Readonly<Record<string, ElementInsertionResource>>, label: string): void;
|
|
13
|
+
export declare function isSlideBackgroundPatch(patch: Patch): patch is SlideBackgroundPatch;
|
|
14
|
+
export declare function isSlideHiddenPatch(patch: Patch): patch is SlideHiddenPatch;
|
|
15
|
+
export declare function isSlideBackgroundImagePatch(patch: Patch): patch is SlideBackgroundImagePatch;
|
|
16
|
+
export declare function isSlideTransitionPatch(patch: Patch): patch is SlideTransitionPatch;
|
|
17
|
+
export declare function isSlideAnimationsPatch(patch: Patch): patch is SlideAnimationsPatch;
|
|
18
|
+
export declare function isSlidePropertyPatch(patch: Patch): patch is SlidePropertyPatch;
|
|
19
|
+
export declare function validateSlidePropertyPatch(doc: EditDoc, patch: SlidePropertyPatch, index: number, resources?: Readonly<Record<string, ElementInsertionResource>>): void;
|
|
20
|
+
export declare function applySlidePropertyPatch(doc: EditDoc, patch: SlidePropertyPatch): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { EditDoc } from '../types';
|
|
2
|
+
import type { Patch, SlideChangeSets, SlideTreePatch } from './types';
|
|
3
|
+
export declare function isSlideTreePatch(patch: Patch): patch is SlideTreePatch;
|
|
4
|
+
export declare function validateSlideTreePatch(doc: EditDoc, patch: SlideTreePatch, index: number): void;
|
|
5
|
+
export declare function applySlideTreePatch(doc: EditDoc, patch: SlideTreePatch): void;
|
|
6
|
+
export declare function slidePatchSets(doc: EditDoc, patches: readonly Patch[]): SlideChangeSets;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { EditDoc } from '../types';
|
|
2
|
+
import type { Patch, TableRowPatch } from './types';
|
|
3
|
+
export declare function isTableRowPatch(patch: Patch): patch is TableRowPatch;
|
|
4
|
+
export declare function validateTableRowPatch(doc: EditDoc, patch: TableRowPatch, index: number): void;
|
|
5
|
+
export declare function applyTableRowPatch(doc: EditDoc, patch: TableRowPatch): void;
|