@web-ppt/edit-core 0.5.0-beta.2 → 0.5.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/CHANGELOG.md +183 -0
- package/README.md +164 -21
- package/dist/alt-text.d.ts +5 -0
- package/dist/appearance/index.d.ts +12 -0
- package/dist/appearance/materialize.d.ts +4 -0
- package/dist/appearance/types.d.ts +26 -0
- package/dist/appearance/values.d.ts +9 -0
- package/dist/appearance.js +301 -0
- package/dist/cfb/index.d.ts +5 -0
- package/dist/cfb/read.d.ts +16 -0
- package/dist/cfb/write.d.ts +3 -0
- package/dist/cfb.js +208 -0
- package/dist/change-classification.d.ts +3 -3
- package/dist/chart/category-binding.d.ts +4 -0
- package/dist/chart/category-commands.d.ts +23 -0
- package/dist/chart/category-levels.d.ts +14 -0
- package/dist/chart/category-matrix.d.ts +2 -0
- package/dist/chart/category-value.d.ts +2 -0
- package/dist/chart/category-workbook.d.ts +13 -0
- package/dist/chart/commands.d.ts +28 -0
- package/dist/chart/context.d.ts +12 -0
- package/dist/chart/dataset-merge.d.ts +5 -0
- package/dist/chart/formula.d.ts +13 -0
- package/dist/chart/identity-frames.d.ts +4 -0
- package/dist/chart/identity-scopes.d.ts +6 -0
- package/dist/chart/identity.d.ts +24 -0
- package/dist/chart/index.d.ts +8 -0
- package/dist/chart/limits.d.ts +6 -0
- package/dist/chart/locator.d.ts +4 -0
- package/dist/chart/materialize.d.ts +7 -0
- package/dist/chart/ordering.d.ts +9 -0
- package/dist/chart/part-graph.d.ts +5 -0
- package/dist/chart/patch-validation.d.ts +3 -0
- package/dist/chart/plot-kinds.d.ts +2 -0
- package/dist/chart/projection.d.ts +8 -0
- package/dist/chart/save.d.ts +4 -0
- package/dist/chart/shared-added-plan.d.ts +19 -0
- package/dist/chart/shared-added-records.d.ts +8 -0
- package/dist/chart/shared-address.d.ts +5 -0
- package/dist/chart/shared-allocate.d.ts +7 -0
- package/dist/chart/shared-cache-codec.d.ts +5 -0
- package/dist/chart/shared-cache-identities.d.ts +3 -0
- package/dist/chart/shared-cache-migration.d.ts +7 -0
- package/dist/chart/shared-cache-save.d.ts +3 -0
- package/dist/chart/shared-cache-scopes.d.ts +13 -0
- package/dist/chart/shared-cache.d.ts +11 -0
- package/dist/chart/shared-category.d.ts +4 -0
- package/dist/chart/shared-cell.d.ts +9 -0
- package/dist/chart/shared-family.d.ts +26 -0
- package/dist/chart/shared-fields.d.ts +18 -0
- package/dist/chart/shared-graph.d.ts +19 -0
- package/dist/chart/shared-growth-space.d.ts +5 -0
- package/dist/chart/shared-inserted-cells.d.ts +14 -0
- package/dist/chart/shared-inserted-command.d.ts +7 -0
- package/dist/chart/shared-inserted-layout.d.ts +16 -0
- package/dist/chart/shared-inserted-project.d.ts +14 -0
- package/dist/chart/shared-inserted-records.d.ts +16 -0
- package/dist/chart/shared-inserted-save.d.ts +6 -0
- package/dist/chart/shared-joint-command.d.ts +9 -0
- package/dist/chart/shared-joint-records.d.ts +9 -0
- package/dist/chart/shared-record-axis.d.ts +25 -0
- package/dist/chart/shared-record-remove.d.ts +13 -0
- package/dist/chart/shared-record-stage.d.ts +2 -0
- package/dist/chart/shared-records.d.ts +2 -0
- package/dist/chart/shared-rows.d.ts +17 -0
- package/dist/chart/shared-runtime.d.ts +19 -0
- package/dist/chart/shared-save-plan.d.ts +4 -0
- package/dist/chart/shared-save.d.ts +3 -0
- package/dist/chart/shared-series.d.ts +6 -0
- package/dist/chart/shared-source-cache.d.ts +4 -0
- package/dist/chart/shared-topology.d.ts +9 -0
- package/dist/chart/shared-unresolved.d.ts +3 -0
- package/dist/chart/shared-validation.d.ts +6 -0
- package/dist/chart/shared-workbook-source.d.ts +6 -0
- package/dist/chart/shared-xy-command.d.ts +7 -0
- package/dist/chart/shared-xy-family.d.ts +16 -0
- package/dist/chart/shared-xy-project.d.ts +6 -0
- package/dist/chart/shared-xy-records.d.ts +23 -0
- package/dist/chart/shared-xy-save.d.ts +5 -0
- package/dist/chart/shared-xy-source.d.ts +39 -0
- package/dist/chart/shared.d.ts +13 -0
- package/dist/chart/source.d.ts +11 -0
- package/dist/chart/types.d.ts +86 -0
- package/dist/chart/validation.d.ts +24 -0
- package/dist/chart/workbook-range.d.ts +16 -0
- package/dist/chart/workbook-read.d.ts +7 -0
- package/dist/chart/workbook-write.d.ts +9 -0
- package/dist/chart/workbook.d.ts +25 -0
- package/dist/chart/xml-data.d.ts +14 -0
- package/dist/chart/xml-namespaces.d.ts +16 -0
- package/dist/chart-design/index.d.ts +10 -0
- package/dist/chart-design/types.d.ts +11 -0
- package/dist/chart-design/xml.d.ts +2 -0
- package/dist/chart-design.js +361 -0
- package/dist/chart-ex/index.d.ts +15 -0
- package/dist/chart-ex/workbook.d.ts +6 -0
- package/dist/chart-ex/xml.d.ts +14 -0
- package/dist/chart-ex.js +457 -0
- package/dist/chart-shared/index.d.ts +12 -0
- package/dist/chart-shared.js +1 -0
- package/dist/chart.js +1 -0
- package/dist/clipboard-links-GuPtqr1z.js +778 -0
- package/dist/clipboard-package.d.ts +4 -0
- package/dist/clipboard-source.d.ts +6 -2
- package/dist/clipboard-trees.d.ts +9 -0
- package/dist/commands/add-slide-identity.d.ts +2 -0
- package/dist/commands/bullet-image-resource.d.ts +11 -0
- package/dist/commands/clear-format.d.ts +4 -0
- package/dist/commands/common-object-slide-patch.d.ts +4 -0
- package/dist/commands/common-object-slide-types.d.ts +68 -0
- package/dist/commands/direct-format-patches.d.ts +11 -5
- package/dist/commands/distribute-elements.d.ts +4 -0
- package/dist/commands/edit-table-grid.d.ts +10 -0
- package/dist/commands/element-alt-text.d.ts +8 -0
- package/dist/commands/element-arrangement.d.ts +17 -0
- package/dist/commands/element-effects.d.ts +1 -1
- package/dist/commands/element-fill.d.ts +1 -1
- package/dist/commands/element-geometry.d.ts +5 -2
- package/dist/commands/element-image-content.d.ts +2 -2
- package/dist/commands/element-link.d.ts +1 -1
- package/dist/commands/element-name.d.ts +1 -1
- package/dist/commands/element-stroke.d.ts +1 -1
- package/dist/commands/element-text.d.ts +1 -1
- package/dist/commands/element-transform.d.ts +2 -2
- package/dist/commands/geometry-types.d.ts +23 -1
- package/dist/commands/hierarchy-record.d.ts +5 -0
- package/dist/commands/image-resource.d.ts +8 -1
- package/dist/commands/insertion-host.d.ts +14 -1
- package/dist/commands/layout-property.d.ts +7 -0
- package/dist/commands/master-property.d.ts +5 -0
- package/dist/commands/master-text-style-types.d.ts +27 -0
- package/dist/commands/master-text-style.d.ts +7 -0
- package/dist/commands/paste-resources.d.ts +9 -5
- package/dist/commands/patch-apply.d.ts +3 -0
- package/dist/commands/patch-count.d.ts +1 -0
- package/dist/commands/patch-invalidation.d.ts +1 -1
- package/dist/commands/patch-stage.d.ts +4 -0
- package/dist/commands/record-override.d.ts +5 -0
- package/dist/commands/replace-image.d.ts +6 -1
- package/dist/commands/sections.d.ts +10 -0
- package/dist/commands/set-preset.d.ts +5 -0
- package/dist/commands/slide-property-types.d.ts +55 -5
- package/dist/commands/slide-size.d.ts +7 -0
- package/dist/commands/spid.d.ts +1 -1
- package/dist/commands/table-grid-patch.d.ts +12 -0
- package/dist/commands/text-target.d.ts +2 -2
- package/dist/commands/theme-types.d.ts +47 -0
- package/dist/commands/theme.d.ts +9 -0
- package/dist/commands/types.d.ts +194 -17
- package/dist/commands/ungroup-source.d.ts +3 -0
- package/dist/comments/index.d.ts +35 -0
- package/dist/comments/save.d.ts +3 -0
- package/dist/comments/state.d.ts +10 -0
- package/dist/comments/xml.d.ts +12 -0
- package/dist/comments.js +782 -0
- package/dist/common-object-slide-types.d.ts +34 -0
- package/dist/data-validation.d.ts +1 -1
- package/dist/describe/budget.d.ts +3 -0
- package/dist/describe/index.d.ts +5 -0
- package/dist/describe/read.d.ts +4 -0
- package/dist/describe/types.d.ts +103 -0
- package/dist/describe.js +192 -0
- package/dist/design-dependencies.d.ts +8 -0
- package/dist/design-projection-package.d.ts +10 -0
- package/dist/design-target.d.ts +10 -0
- package/dist/design.d.ts +3 -0
- package/dist/document-extensions.d.ts +9 -0
- package/dist/document.d.ts +1 -1
- package/dist/dynamic-projection.d.ts +6 -0
- package/dist/edit-core.js +5420 -4111
- package/dist/editor.d.ts +15 -3
- package/dist/element-source.d.ts +11 -0
- package/dist/element-spids.d.ts +4 -0
- package/dist/extension-address-journal.d.ts +9 -0
- package/dist/extension-address-remap.d.ts +14 -0
- package/dist/extension-addresses.d.ts +20 -0
- package/dist/extension-copy-history.d.ts +7 -0
- package/dist/extension-copy.d.ts +16 -0
- package/dist/extension-migration-receipt.d.ts +34 -0
- package/dist/extension-recovery-context.d.ts +5 -0
- package/dist/extension-runtime.d.ts +64 -0
- package/dist/generate/comments.d.ts +3 -0
- package/dist/generate/compatibility-parts.d.ts +14 -0
- package/dist/generate/compatibility-references.d.ts +3 -0
- package/dist/generate/compatibility.d.ts +4 -0
- package/dist/generate/index.d.ts +1 -0
- package/dist/generate/master-defaults.d.ts +4 -0
- package/dist/generate/materialize.d.ts +2 -2
- package/dist/generate/math.d.ts +3 -0
- package/dist/generate/portable-clipboard.d.ts +4 -0
- package/dist/generate/projection-tree.d.ts +8 -0
- package/dist/generate/template.d.ts +68 -1
- package/dist/generate/text-body.d.ts +2 -0
- package/dist/generate/text-effects.d.ts +5 -0
- package/dist/generate/text-override.d.ts +8 -0
- package/dist/generate/validation.d.ts +3 -0
- package/dist/generate/warp.d.ts +2 -0
- package/dist/generate.js +1232 -512
- package/dist/history.d.ts +11 -1
- package/dist/identities.d.ts +4 -0
- package/dist/image-content.d.ts +5 -2
- package/dist/image-resource-history.d.ts +2 -0
- package/dist/index-C2r7c6G6.js +714 -0
- package/dist/index-CYDvbiwF.js +1 -0
- package/dist/index.d.ts +35 -7
- package/dist/ink/index.d.ts +27 -0
- package/dist/ink/model.d.ts +4 -0
- package/dist/ink/save.d.ts +3 -0
- package/dist/ink/source.d.ts +7 -0
- package/dist/ink.js +324 -0
- package/dist/layout-assets.d.ts +3 -1
- package/dist/layout-projection.d.ts +17 -5
- package/dist/layout-state.d.ts +2 -0
- package/dist/layout-types.d.ts +42 -0
- package/dist/layout.d.ts +5 -0
- package/dist/lint/color.d.ts +5 -0
- package/dist/lint/index.d.ts +7 -0
- package/dist/lint/prompts.d.ts +3 -0
- package/dist/lint/report.d.ts +21 -0
- package/dist/lint/sampler-batch.d.ts +4 -0
- package/dist/lint/sampler-images.d.ts +2 -0
- package/dist/lint/sampler.d.ts +9 -0
- package/dist/lint/snapshot.d.ts +34 -0
- package/dist/lint/types.d.ts +67 -0
- package/dist/lint-sampler.js +187 -0
- package/dist/lint.js +659 -0
- package/dist/master-state.d.ts +3 -0
- package/dist/master-text-style-state.d.ts +3 -0
- package/dist/master-types.d.ts +55 -0
- package/dist/master.d.ts +5 -0
- package/dist/media/audio-icon.d.ts +2 -0
- package/dist/media/commands.d.ts +3 -0
- package/dist/media/index.d.ts +10 -0
- package/dist/media/markup.d.ts +10 -0
- package/dist/media/mp4-boxes.d.ts +12 -0
- package/dist/media/mp4-fragments.d.ts +8 -0
- package/dist/media/mp4-samples.d.ts +4 -0
- package/dist/media/mp4.d.ts +2 -0
- package/dist/media/poster.d.ts +2 -0
- package/dist/media/replace-poster.d.ts +3 -0
- package/dist/media/resource.d.ts +4 -0
- package/dist/media/source.d.ts +14 -0
- package/dist/media/types.d.ts +33 -0
- package/dist/media-properties.d.ts +4 -0
- package/dist/media.js +1630 -0
- package/dist/model-invariants-BM19JVxy.js +8980 -0
- package/dist/object-source.d.ts +11 -0
- package/dist/ole/container.d.ts +14 -0
- package/dist/ole/content.d.ts +94 -0
- package/dist/ole/index.d.ts +20 -0
- package/dist/ole/preview.d.ts +3 -0
- package/dist/ole/save.d.ts +2 -0
- package/dist/ole/state.d.ts +16 -0
- package/dist/ole.js +870 -0
- package/dist/opc.js +1 -1
- package/dist/paragraph-level.d.ts +2 -2
- package/dist/paragraph-property-schema.d.ts +4 -1
- package/dist/{patch-D7lZelRa.js → patch-BwhfBbYE.js} +10 -10
- package/dist/patch-events.d.ts +5 -1
- package/dist/ppt/appearance.d.ts +11 -0
- package/dist/ppt/binary.d.ts +20 -0
- package/dist/ppt/drawing.d.ts +18 -0
- package/dist/ppt/geometry.d.ts +4 -0
- package/dist/ppt/index.d.ts +12 -0
- package/dist/ppt/pictures.d.ts +11 -0
- package/dist/ppt/text.d.ts +9 -0
- package/dist/ppt.js +774 -0
- package/dist/preset-geometry.d.ts +6 -0
- package/dist/projection.d.ts +2 -0
- package/dist/query-BHLjWjnu.js +903 -0
- package/dist/recovery-identity.d.ts +1 -0
- package/dist/recovery-migrations.d.ts +3 -0
- package/dist/recovery.d.ts +3 -0
- package/dist/resize/index.d.ts +6 -0
- package/dist/resize/text.d.ts +4 -0
- package/dist/resize.js +5090 -0
- package/dist/retained-element-origins.d.ts +6 -0
- package/dist/run-property-fields.d.ts +12 -0
- package/dist/run-property-schema.d.ts +3 -1
- package/dist/run-style.d.ts +15 -0
- package/dist/save/alt-text.d.ts +4 -0
- package/dist/save/comments.d.ts +3 -0
- package/dist/save/effects.d.ts +2 -1
- package/dist/save/extension-availability.d.ts +3 -0
- package/dist/save/extension-elements.d.ts +26 -0
- package/dist/save/index.d.ts +6 -1
- package/dist/save/insertion.d.ts +6 -5
- package/dist/save/layout-properties.d.ts +4 -0
- package/dist/save/master-properties.d.ts +5 -0
- package/dist/save/paragraph-overrides.d.ts +3 -0
- package/dist/save/slide-parts.d.ts +1 -0
- package/dist/save/table.d.ts +2 -0
- package/dist/save/xfrm.d.ts +8 -2
- package/dist/save.js +493 -498
- package/dist/sections.d.ts +8 -0
- package/dist/session-assets.d.ts +4 -0
- package/dist/slide-parts-D0o_DDhi.js +1331 -0
- package/dist/slide-size.d.ts +6 -0
- package/dist/smartart/drawing.d.ts +3 -0
- package/dist/smartart/index.d.ts +16 -0
- package/dist/smartart/model.d.ts +18 -0
- package/dist/smartart/save.d.ts +3 -0
- package/dist/smartart.js +604 -0
- package/dist/source-retention.d.ts +7 -0
- package/dist/space.d.ts +37 -0
- package/dist/table-cell.d.ts +7 -1
- package/dist/table-grid-projection.d.ts +6 -0
- package/dist/table-grid.d.ts +45 -0
- package/dist/table-invariants.d.ts +4 -0
- package/dist/table-rows.d.ts +2 -1
- package/dist/table-scale.d.ts +4 -0
- package/dist/table-style.d.ts +5 -4
- package/dist/templates/index.d.ts +4 -0
- package/dist/templates/recipes.d.ts +5 -0
- package/dist/templates/types.d.ts +17 -0
- package/dist/templates.js +543 -0
- package/dist/text-flatten.d.ts +6 -0
- package/dist/text-fragment.d.ts +5 -0
- package/dist/text-model.d.ts +8 -8
- package/dist/text-override-validation.d.ts +6 -2
- package/dist/text-selection.d.ts +4 -0
- package/dist/theme-projection.d.ts +8 -0
- package/dist/theme-xml.d.ts +3 -0
- package/dist/theme.d.ts +14 -0
- package/dist/types.d.ts +174 -8
- package/dist/xml/index.d.ts +1 -1
- package/dist/xml/nodes.d.ts +2 -2
- package/dist/xml/shape-ids.d.ts +3 -0
- package/dist/xml.js +19 -16
- package/package.json +79 -5
- package/schemas/describe.schema.json +479 -0
- package/schemas/lint.schema.json +145 -0
- package/dist/document-B1jjN-QB.js +0 -274
- package/dist/image-resource-DbgJS9n-.js +0 -24
- package/dist/index-D2JizcOQ.js +0 -706
- package/dist/insertion-CGpb504L.js +0 -6152
- package/dist/table-style-part-DBtpxmuo.js +0 -1042
package/dist/editor.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Command, EditorChange, EditorOptions, EditorPatchSubscriber, EditorPatchSubscribeOptions, EditorSubscriber, ExternalPatchOptions, History, Patch, Selection, Transaction, TransactionOptions, TransactionResult } from './commands/types';
|
|
1
|
+
import type { Command, DesignCommand, EditorChange, EditorOptions, EditorPatchSubscriber, EditorPatchSubscribeOptions, EditorSubscriber, ExternalPatchOptions, History, Patch, Selection, Transaction, TransactionOptions, TransactionResult } from './commands/types';
|
|
2
2
|
import type { OpcPatchResult } from './opc/types';
|
|
3
3
|
import type { RecoverySubscriber } from './recovery-types';
|
|
4
|
-
import type { EditDoc, ElementId, SlideId } from './types';
|
|
4
|
+
import type { DesignTarget, EditDoc, ElementId, SlideId } from './types';
|
|
5
5
|
export declare class Editor {
|
|
6
6
|
readonly doc: EditDoc;
|
|
7
7
|
readonly history: History;
|
|
@@ -15,27 +15,39 @@ export declare class Editor {
|
|
|
15
15
|
private savedState;
|
|
16
16
|
private nextState;
|
|
17
17
|
private activeImageResources;
|
|
18
|
+
private readonly unsubscribeExtensions;
|
|
18
19
|
constructor(doc: EditDoc, options?: EditorOptions);
|
|
19
20
|
get selection(): Selection;
|
|
20
21
|
isDirty(): boolean;
|
|
21
22
|
save(): Promise<Uint8Array>;
|
|
22
23
|
saveDetailed(): Promise<OpcPatchResult>;
|
|
23
24
|
markSaved(): void;
|
|
25
|
+
captureSavepoint(): () => void;
|
|
24
26
|
select(selection: Selection): void;
|
|
25
27
|
subscribe(subscriber: EditorSubscriber): () => void;
|
|
26
28
|
subscribeRecovery(subscriber: RecoverySubscriber): () => void;
|
|
27
29
|
subscribePatches(subscriber: EditorPatchSubscriber, options?: EditorPatchSubscribeOptions): () => void;
|
|
28
30
|
exec(...commands: Command[]): TransactionResult;
|
|
31
|
+
execDesign(target: DesignTarget, ...commands: DesignCommand[]): TransactionResult;
|
|
29
32
|
transaction(callback: (transaction: Transaction) => void, label: string, options?: TransactionOptions): TransactionResult;
|
|
30
33
|
undo(): EditorChange | null;
|
|
31
34
|
redo(): EditorChange | null;
|
|
35
|
+
private replayHistory;
|
|
32
36
|
applyExternalPatches(patches: readonly Patch[], options?: ExternalPatchOptions): EditorChange | null;
|
|
33
37
|
toSlide(id: SlideId): import("@web-ppt/core").Slide;
|
|
38
|
+
toDesignCanvas(target: DesignTarget): import("@web-ppt/core").Slide;
|
|
34
39
|
effectiveElement(id: ElementId): import("@web-ppt/core").SlideElement;
|
|
40
|
+
/** 组变换折算后的外框,与画面同源;覆盖层经实例调用,避免独立打包的入口读到另一份投影缓存。 */
|
|
41
|
+
renderedElement(id: ElementId): import("@web-ppt/core").SlideElement;
|
|
42
|
+
renderedFrameToSlideMatrix(id: ElementId): import("./space").AffineMatrix;
|
|
43
|
+
renderedContentToSlideMatrix(id: ElementId): import("./space").AffineMatrix;
|
|
44
|
+
dispose(): void;
|
|
35
45
|
private commit;
|
|
36
46
|
private emitRecovery;
|
|
47
|
+
private transportPatches;
|
|
48
|
+
private assertReplayableHistory;
|
|
37
49
|
private queuePatches;
|
|
38
|
-
private
|
|
50
|
+
private emitPatchChange;
|
|
39
51
|
private emit;
|
|
40
52
|
private refreshActiveImageResources;
|
|
41
53
|
private historyImageResourceBytes;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { EditDoc, ElementId } from './types';
|
|
2
|
+
/** 按需读取原生宿主;插入片段的身份与关系已映射到当前文稿,无需先保存重开。 */
|
|
3
|
+
export declare function sourceElementXml(doc: EditDoc, id: ElementId): {
|
|
4
|
+
part: string;
|
|
5
|
+
bytes: Uint8Array<ArrayBufferLike>;
|
|
6
|
+
relationships: Record<string, {
|
|
7
|
+
type: string;
|
|
8
|
+
target: string;
|
|
9
|
+
external?: true;
|
|
10
|
+
}>;
|
|
11
|
+
} | undefined;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { EditDoc } from './types';
|
|
2
|
+
import type { Patch } from './commands/types';
|
|
3
|
+
/** 每个日志独立声明地址;预检只读,失败事务不能消耗下次声明的机会。 */
|
|
4
|
+
export declare class ExtensionAddressJournal {
|
|
5
|
+
private readonly declared;
|
|
6
|
+
reset(): void;
|
|
7
|
+
prepare(doc: EditDoc, patches: readonly Patch[], origin: string): readonly Patch[];
|
|
8
|
+
record(patches: readonly Patch[]): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface ExtensionIdentityRemap {
|
|
2
|
+
readonly ids: Readonly<Record<string, string>>;
|
|
3
|
+
readonly paths: readonly (readonly string[])[];
|
|
4
|
+
readonly values: readonly (readonly string[])[];
|
|
5
|
+
readonly prefix: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function assertIdentityRemap(value: unknown): asserts value is ExtensionIdentityRemap | undefined;
|
|
8
|
+
/** 只改声明为身份的路径位置与标量引用,标签即使恰好等于 ID 也必须原样保存。 */
|
|
9
|
+
export declare function remapExtensionField(remap: ExtensionIdentityRemap | undefined, path: readonly string[], value?: unknown): {
|
|
10
|
+
path: readonly string[];
|
|
11
|
+
value: unknown;
|
|
12
|
+
};
|
|
13
|
+
/** 合并只接受相等或互不相交的叶;缺少原时钟的矛盾值不能凭所有者顺序裁决。 */
|
|
14
|
+
export declare function mergeExtensionValue(target: unknown, source: unknown, remap?: ExtensionIdentityRemap): unknown;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { EditDoc } from './types';
|
|
2
|
+
import type { DocumentExtensionPatch, Patch } from './commands/types';
|
|
3
|
+
import type { ExtensionIdentityRemap } from './extension-address-remap';
|
|
4
|
+
export declare const EXTENSION_ADDRESSES = "edit-addresses";
|
|
5
|
+
export interface ExtensionAddress {
|
|
6
|
+
readonly target: readonly ['document', 'extensions', string, ...string[]];
|
|
7
|
+
readonly identities: Readonly<Record<string, string>>;
|
|
8
|
+
readonly remap?: ExtensionIdentityRemap;
|
|
9
|
+
readonly merge?: 'equal';
|
|
10
|
+
}
|
|
11
|
+
export declare const isExtensionAddressPatch: (patch: Patch) => patch is DocumentExtensionPatch;
|
|
12
|
+
export declare function readExtensionAddress(value: unknown): ExtensionAddress;
|
|
13
|
+
export declare function extensionAddressPatches(doc: EditDoc, origin: string): DocumentExtensionPatch[];
|
|
14
|
+
export declare function canonicalExtensionPath(doc: EditDoc, path: Patch['path']): Patch['path'];
|
|
15
|
+
export declare function canonicalExtensionPatch(doc: EditDoc, patch: Patch): Patch;
|
|
16
|
+
export declare function validateExtensionAddress(doc: EditDoc, patch: DocumentExtensionPatch): void;
|
|
17
|
+
export declare function validateExtensionAddresses(doc: EditDoc): void;
|
|
18
|
+
export declare function moveExtensionAddress(doc: EditDoc, patch: DocumentExtensionPatch): void;
|
|
19
|
+
/** 旧结构快照可复活框架,但不能用其中的旧覆盖重置已经独立存在的数据。 */
|
|
20
|
+
export declare function clearRelocatedExtensions(doc: EditDoc): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { EditDoc } from './types';
|
|
2
|
+
import type { HistoryEntry, Patch, SlideTreeSnapshot } from './commands/types';
|
|
3
|
+
import { type ExtensionCopyResolver } from './extension-copy';
|
|
4
|
+
/** 只派生结构快照;完整领域/结构校验仍在实际插入批次执行。 */
|
|
5
|
+
export declare function rebaseExtensionCopySnapshot(doc: EditDoc, before: SlideTreeSnapshot, updates: readonly Patch[], resolve?: ExtensionCopyResolver | undefined): SlideTreeSnapshot;
|
|
6
|
+
/** 非记录写入仍属于被复制的对象;撤销复制可以移除它,重做必须恢复已经获胜的字段。 */
|
|
7
|
+
export declare function rebaseExtensionCopyHistory(doc: EditDoc, entry: HistoryEntry, updates: readonly Patch[]): HistoryEntry;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { EditDoc } from './types';
|
|
2
|
+
import type { CommandPatches, Patch, SlideTreeSnapshot } from './commands/types';
|
|
3
|
+
import type { ExtensionMigrationInput } from './extension-migration-receipt';
|
|
4
|
+
export interface ExtensionCopyInput extends ExtensionMigrationInput {
|
|
5
|
+
readonly source: string;
|
|
6
|
+
readonly stamp: {
|
|
7
|
+
readonly clock: number;
|
|
8
|
+
readonly replicaId: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export type ExtensionCopyResolver = (doc: EditDoc, snapshot: SlideTreeSnapshot, previous: readonly Patch[]) => readonly ExtensionCopyInput[];
|
|
12
|
+
export declare function extensionCopyMatches(snapshot: SlideTreeSnapshot, input: ExtensionCopyInput): boolean;
|
|
13
|
+
/** 只检查复制快照与原操作的一致性;原版本的产生和比较仍由可选协同适配器负责。 */
|
|
14
|
+
export declare function readExtensionCopies(snapshot: SlideTreeSnapshot): readonly ExtensionCopyInput[];
|
|
15
|
+
/** 在命令落模前冻结证据;逆补丁和重做共用它,不能在重放时重新读取来源的新版本。 */
|
|
16
|
+
export declare function prepareExtensionCopies(doc: EditDoc, commands: CommandPatches, previous: readonly Patch[]): void;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { EditDoc } from './types';
|
|
2
|
+
import type { DocumentExtensionPatch } from './commands/types';
|
|
3
|
+
export declare const EXTENSION_MIGRATIONS = "edit-migrations";
|
|
4
|
+
export interface ExtensionMigrationInput {
|
|
5
|
+
readonly path: readonly string[];
|
|
6
|
+
readonly op: 'set' | 'del';
|
|
7
|
+
readonly value?: string | number | boolean | null;
|
|
8
|
+
readonly stamp?: {
|
|
9
|
+
readonly clock: number;
|
|
10
|
+
readonly replicaId: string;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export interface ExtensionMigrationReceipt {
|
|
14
|
+
readonly version: 1;
|
|
15
|
+
readonly routes: readonly {
|
|
16
|
+
readonly source: readonly [string, string];
|
|
17
|
+
readonly address: string;
|
|
18
|
+
}[];
|
|
19
|
+
readonly inputs: readonly ExtensionMigrationInput[];
|
|
20
|
+
readonly winners: readonly number[];
|
|
21
|
+
}
|
|
22
|
+
type ApplyField = (doc: EditDoc, patch: DocumentExtensionPatch) => void;
|
|
23
|
+
type ValidateField = (doc: EditDoc, patch: DocumentExtensionPatch, index: number) => void;
|
|
24
|
+
export declare const isExtensionMigrationPatch: (patch: {
|
|
25
|
+
path: readonly unknown[];
|
|
26
|
+
}) => patch is DocumentExtensionPatch;
|
|
27
|
+
/** stamp 只是一次裁决的原始证据;编辑核心不据此创建或推进协同寄存器。 */
|
|
28
|
+
export declare function readExtensionMigration(value: unknown): ExtensionMigrationReceipt;
|
|
29
|
+
export declare function canonicalExtensionMigrationInputs(doc: EditDoc, receipt: Pick<ExtensionMigrationReceipt, 'routes' | 'inputs'>): ExtensionMigrationInput[];
|
|
30
|
+
export declare function validateExtensionMigration(doc: EditDoc, patch: DocumentExtensionPatch, validate: ValidateField, apply: ApplyField): void;
|
|
31
|
+
export declare function applyExtensionMigration(doc: EditDoc, patch: DocumentExtensionPatch, apply: ApplyField): void;
|
|
32
|
+
export declare function extensionMigrationReceipts(doc: EditDoc, origin: string): DocumentExtensionPatch[];
|
|
33
|
+
export declare function validateExtensionMigrationReceipts(doc: EditDoc): void;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { EditDoc } from './types';
|
|
2
|
+
/** 只授予隔离恢复模型旧协议校验能力;未来路由不得提前改变历史字段的写入地址。 */
|
|
3
|
+
export declare function setLegacyExtensionReplay(doc: EditDoc, pending: ReadonlySet<string>): void;
|
|
4
|
+
export declare function inheritLegacyExtensionReplay(doc: EditDoc, stage: EditDoc): void;
|
|
5
|
+
export declare function isLegacyExtensionReplay(doc: EditDoc, id: string, namespace: string): boolean;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { Slide, SlideElement } from '@web-ppt/core';
|
|
2
|
+
import type { CommandPatches, DocumentExtensionPatch, ExtensionCommand, ExtensionPatch, Patch } from './commands/types';
|
|
3
|
+
import type { EditDoc, ElementId, ElementInsertionResource, SlideId } from './types';
|
|
4
|
+
import type { OpcPartChanges } from './opc/types';
|
|
5
|
+
import type { ExtensionCopyResolver } from './extension-copy';
|
|
6
|
+
export interface EditExtensionSavePlan {
|
|
7
|
+
readonly changes: OpcPartChanges;
|
|
8
|
+
readonly baselines: Readonly<Record<string, Uint8Array>>;
|
|
9
|
+
}
|
|
10
|
+
/** undefined 允许无版本的等值回退;空数组明确否决整组迁移。 */
|
|
11
|
+
export type ExtensionMigrationResolver = (doc: EditDoc, routes: readonly DocumentExtensionPatch[]) => readonly DocumentExtensionPatch[] | undefined;
|
|
12
|
+
export interface EditExtensionRuntime {
|
|
13
|
+
readonly migrate?: (doc: EditDoc, pending?: readonly Patch[], resolve?: ExtensionMigrationResolver) => readonly Patch[];
|
|
14
|
+
readonly validateDocumentPatch?: (doc: EditDoc, patch: DocumentExtensionPatch, index: number) => void;
|
|
15
|
+
readonly documentElements?: (doc: EditDoc, patch?: DocumentExtensionPatch) => readonly ElementId[];
|
|
16
|
+
readonly projectDocument?: (doc: EditDoc, id: ElementId, element: SlideElement) => SlideElement;
|
|
17
|
+
/** 来源状态可能由别处的覆盖决定;此投影在局部覆盖前执行,不要求本元素已有扩展字段。 */
|
|
18
|
+
readonly projectSource?: (doc: EditDoc, id: ElementId, element: SlideElement) => SlideElement;
|
|
19
|
+
readonly generateParts?: (doc: EditDoc, parts: Record<string, Uint8Array>) => void;
|
|
20
|
+
readonly copyParts?: (doc: EditDoc, parts: Record<string, Uint8Array>) => void;
|
|
21
|
+
readonly scope?: 'element' | 'slide';
|
|
22
|
+
readonly materializePackage?: (doc: EditDoc, baselines: Record<string, Uint8Array>, created: Set<string>, changes: Record<string, Uint8Array | null>) => void;
|
|
23
|
+
readonly projectSlide?: (doc: EditDoc, id: SlideId, slide: Slide) => Slide;
|
|
24
|
+
readonly materialize?: (document: import('./xml/types').XmlDocument, record: import('./types').ElementRecord, generated: boolean, xml: import('./save/extension-elements').EditElementXml) => void;
|
|
25
|
+
readonly supportsGenerated?: (element: SlideElement) => boolean;
|
|
26
|
+
readonly validateResource?: (resource: ElementInsertionResource, bytes: Uint8Array) => boolean;
|
|
27
|
+
readonly command: (doc: EditDoc, command: ExtensionCommand, origin: string) => CommandPatches;
|
|
28
|
+
readonly validatePatch?: (doc: EditDoc, patch: ExtensionPatch, index: number) => void;
|
|
29
|
+
readonly validatePatches?: (doc: EditDoc, patches: readonly {
|
|
30
|
+
readonly patch: ExtensionPatch;
|
|
31
|
+
readonly index: number;
|
|
32
|
+
}[]) => void;
|
|
33
|
+
readonly prune?: (doc: EditDoc, id: ElementId, state: unknown) => boolean;
|
|
34
|
+
readonly project?: (doc: EditDoc, id: ElementId, element: SlideElement) => SlideElement;
|
|
35
|
+
readonly beforeSave?: (doc: EditDoc) => EditExtensionSavePlan | void | Promise<EditExtensionSavePlan | void>;
|
|
36
|
+
}
|
|
37
|
+
/** 版本策略属于可选会话;模型和恢复日志中只保留其产生的纯数据结果。 */
|
|
38
|
+
export declare function setExtensionMigrationResolver(doc: EditDoc, resolver: ExtensionMigrationResolver, copy?: ExtensionCopyResolver): () => void;
|
|
39
|
+
export declare function extensionCopyResolver(doc: EditDoc): ExtensionCopyResolver | undefined;
|
|
40
|
+
export declare function refreshExtensionMigrations(doc: EditDoc): void;
|
|
41
|
+
export declare function assertNamespace(namespace: string): void;
|
|
42
|
+
/** 扩展补丁只能持久化标量叶;对象和数组无须遍历,本身就是无效输入。 */
|
|
43
|
+
export declare function assertExtensionLeaf(value: unknown): void;
|
|
44
|
+
export declare function registerEditExtension(namespace: string, runtime: EditExtensionRuntime): void;
|
|
45
|
+
export declare function editExtensionGeneration(): number;
|
|
46
|
+
/** 迟到的旧地址可能在扩展加载之后首次出现;只为这类字段请求迁移计划。 */
|
|
47
|
+
export declare function extensionMigrationPatches(doc: EditDoc, patches: readonly Patch[], resolve?: ExtensionMigrationResolver | undefined): readonly Patch[];
|
|
48
|
+
export declare function observeEditExtensionRegistration(doc: EditDoc, refresh: (elements: Set<ElementId>, slides: Set<SlideId>) => void, migrate?: (patches: readonly Patch[]) => void): () => void;
|
|
49
|
+
export declare function extensionCommandPatches(doc: EditDoc, command: ExtensionCommand, origin: string): CommandPatches;
|
|
50
|
+
export declare function isExtensionPatch(patch: {
|
|
51
|
+
path: readonly unknown[];
|
|
52
|
+
}): patch is ExtensionPatch;
|
|
53
|
+
export declare function validateExtensionPatch(doc: EditDoc, patch: ExtensionPatch, index: number, runtimeAlreadyValidated?: boolean): void;
|
|
54
|
+
export declare function validateExtensionPatchBatches(doc: EditDoc, patches: readonly {
|
|
55
|
+
readonly patch: ExtensionPatch;
|
|
56
|
+
readonly index: number;
|
|
57
|
+
}[]): ReadonlySet<number>;
|
|
58
|
+
export declare function applyExtensionPatch(doc: EditDoc, patch: ExtensionPatch): void;
|
|
59
|
+
export declare function finalizeExtensionPatch(doc: EditDoc, id: ElementId, namespace: string, scope: 'elements' | 'slides'): void;
|
|
60
|
+
export declare function projectEditExtensions(doc: EditDoc, id: ElementId, element: SlideElement): SlideElement;
|
|
61
|
+
export declare function observeDocumentExtension(doc: EditDoc, namespace: string): void;
|
|
62
|
+
/** 保存实现位于动态入口;这里只暴露同一全局注册表的只读视图。 */
|
|
63
|
+
export declare function registeredEditExtensions(): ReadonlyMap<string, EditExtensionRuntime>;
|
|
64
|
+
export declare function projectSlideExtensions(doc: EditDoc, id: SlideId, slide: Slide): Slide;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { EditDoc, ElementInsertionRelationship, ElementInsertionResource } from '../types';
|
|
2
|
+
/** 不透明对象的依赖保持原字节,只有页面到对象的关系需要换成生成页的新 rId。 */
|
|
3
|
+
export declare class CompatibilityParts {
|
|
4
|
+
private readonly doc;
|
|
5
|
+
private readonly parts;
|
|
6
|
+
private readonly media;
|
|
7
|
+
constructor(doc: EditDoc);
|
|
8
|
+
source(part: string): Uint8Array | undefined;
|
|
9
|
+
registerMedia(resources: readonly ElementInsertionResource[]): void;
|
|
10
|
+
relationships(part: string): ElementInsertionRelationship[];
|
|
11
|
+
private retain;
|
|
12
|
+
relocate(relation: ElementInsertionRelationship, from: string, to: string, id: string): ElementInsertionRelationship;
|
|
13
|
+
mergeInto(parts: Record<string, Uint8Array>): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { EditDoc, ElementInsertionSource, ElementRecord } from '../types';
|
|
2
|
+
import type { CompatibilityParts } from './compatibility-parts';
|
|
3
|
+
/** 整个 MC 外壳是一个框架对象;隐藏表示和只读组后代不能按普通图形重新生成。 */
|
|
4
|
+
export declare function compatibilityInsertion(doc: EditDoc, record: ElementRecord, targetPart: string, targetSpid: number, usedSpids: Set<number>, parts: CompatibilityParts): ElementInsertionSource;
|
package/dist/generate/index.d.ts
CHANGED
|
@@ -10,3 +10,4 @@ export declare function createBlankPptx(options?: CreateBlankPptxOptions): Uint8
|
|
|
10
10
|
/** 没有可补丁原包时从统一编辑模型构造新 PPTX;本函数不改变 EditDoc。 */
|
|
11
11
|
export declare function generateEditDoc(doc: EditDoc): OpcPatchResult;
|
|
12
12
|
export type { OpcPatchResult } from '../opc/types';
|
|
13
|
+
export { copyPortableElements } from './portable-clipboard';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Slide } from '@web-ppt/core';
|
|
2
|
+
import type { EditDoc } from '../types';
|
|
3
|
+
/** 生成包仍用固定单母版,但必须把当前有效设计默认值写入该母版,而不是输出空壳。 */
|
|
4
|
+
export declare function materializeGeneratedMasterDefaults(doc: EditDoc, slides: readonly Slide[], parts: Record<string, Uint8Array>): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { EditDoc } from '../types';
|
|
2
|
-
export declare function materializeGeneratedParts(doc: EditDoc): Record<string, Uint8Array>;
|
|
1
|
+
import type { EditDoc, SlideId } from '../types';
|
|
2
|
+
export declare function materializeGeneratedParts(doc: EditDoc, observe?: (slideId: SlideId, work: EditDoc) => void, resourceSource?: EditDoc): Record<string, Uint8Array>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { EditDoc, ElementId } from '../types';
|
|
2
|
+
import type { ElementClipboardPayload } from '../commands/types';
|
|
3
|
+
/** 直接从选中模型生成宿主片段;不生成 ZIP,不重新解析,也不修改源文档。 */
|
|
4
|
+
export declare function copyPortableElements(doc: EditDoc, ids: readonly ElementId[]): ElementClipboardPayload;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { EditDoc, ElementRecord, SlideId } from '../types';
|
|
2
|
+
export interface GeneratedProjectionTree {
|
|
3
|
+
readonly roots: string[];
|
|
4
|
+
readonly sourceRecords: Record<string, ElementRecord>;
|
|
5
|
+
}
|
|
6
|
+
export declare function allocatedProjectionSpids(records: Readonly<Record<string, ElementRecord>>, roots: readonly string[]): Map<string, number>;
|
|
7
|
+
/** 生成包没有版式关系,先把有效版式视觉变成页面自有的稳定记录树。 */
|
|
8
|
+
export declare function generatedProjectionTree(doc: EditDoc, slideId: SlideId): GeneratedProjectionTree;
|
|
@@ -1,3 +1,70 @@
|
|
|
1
|
+
import type { PresentationTheme, ThemeColorSlot } from '@web-ppt/core';
|
|
1
2
|
/** 生成保存的固定骨架只承载包级默认值;页面内容始终从 EditDoc 物化。 */
|
|
2
|
-
export declare function generatedTemplateParts(width: number, height: number, slideCount?: number, notesSlides?: readonly boolean[]): Record<string, Uint8Array>;
|
|
3
|
+
export declare function generatedTemplateParts(width: number, height: number, slideCount?: number, notesSlides?: readonly boolean[], theme?: PresentationTheme): Record<string, Uint8Array>;
|
|
3
4
|
export declare function generatedEmptySlideXml(): string;
|
|
5
|
+
export type GeneratedTemplateColor = ({
|
|
6
|
+
readonly slot: ThemeColorSlot;
|
|
7
|
+
readonly rgb?: never;
|
|
8
|
+
} | {
|
|
9
|
+
readonly slot?: never;
|
|
10
|
+
readonly rgb: string;
|
|
11
|
+
}) & {
|
|
12
|
+
readonly alpha?: number;
|
|
13
|
+
};
|
|
14
|
+
export interface GeneratedTemplateDecoration {
|
|
15
|
+
readonly name: string;
|
|
16
|
+
readonly preset: 'rect' | 'ellipse' | 'line';
|
|
17
|
+
readonly rect: {
|
|
18
|
+
readonly x: number;
|
|
19
|
+
readonly y: number;
|
|
20
|
+
readonly w: number;
|
|
21
|
+
readonly h: number;
|
|
22
|
+
};
|
|
23
|
+
readonly fill?: GeneratedTemplateColor;
|
|
24
|
+
readonly stroke?: GeneratedTemplateColor & {
|
|
25
|
+
readonly width?: number;
|
|
26
|
+
};
|
|
27
|
+
readonly rotation?: number;
|
|
28
|
+
}
|
|
29
|
+
export interface GeneratedTemplatePlaceholder {
|
|
30
|
+
readonly name: string;
|
|
31
|
+
readonly type: 'ctrTitle' | 'title' | 'subTitle' | 'body' | 'sldNum';
|
|
32
|
+
readonly rect: {
|
|
33
|
+
readonly x: number;
|
|
34
|
+
readonly y: number;
|
|
35
|
+
readonly w: number;
|
|
36
|
+
readonly h: number;
|
|
37
|
+
};
|
|
38
|
+
readonly index?: number;
|
|
39
|
+
}
|
|
40
|
+
export interface GeneratedTemplateLayout {
|
|
41
|
+
readonly part: number;
|
|
42
|
+
readonly type: 'title' | 'obj' | 'twoObj' | 'secHead' | 'blank';
|
|
43
|
+
readonly name: string;
|
|
44
|
+
readonly placeholders: readonly GeneratedTemplatePlaceholder[];
|
|
45
|
+
readonly decorations?: readonly GeneratedTemplateDecoration[];
|
|
46
|
+
readonly background?: GeneratedTemplateColor;
|
|
47
|
+
}
|
|
48
|
+
export interface GeneratedTemplateTextStyle {
|
|
49
|
+
readonly font: 'major' | 'minor';
|
|
50
|
+
readonly color: GeneratedTemplateColor;
|
|
51
|
+
readonly size: number;
|
|
52
|
+
readonly step?: number;
|
|
53
|
+
readonly align?: 'l' | 'ctr' | 'r';
|
|
54
|
+
readonly bold?: boolean;
|
|
55
|
+
readonly bullet?: boolean;
|
|
56
|
+
}
|
|
57
|
+
export interface GeneratedTemplateDesign {
|
|
58
|
+
readonly theme: PresentationTheme;
|
|
59
|
+
readonly masterBackground: GeneratedTemplateColor;
|
|
60
|
+
readonly masterDecorations: readonly GeneratedTemplateDecoration[];
|
|
61
|
+
readonly textStyles: {
|
|
62
|
+
readonly title: GeneratedTemplateTextStyle;
|
|
63
|
+
readonly body: GeneratedTemplateTextStyle;
|
|
64
|
+
readonly other: GeneratedTemplateTextStyle;
|
|
65
|
+
};
|
|
66
|
+
readonly layouts: readonly GeneratedTemplateLayout[];
|
|
67
|
+
readonly initialLayoutPart: number;
|
|
68
|
+
}
|
|
69
|
+
/** 内置设计配方复用生成保存骨架;默认空白入口不经过本函数,因而保持原字节。 */
|
|
70
|
+
export declare function generatedDesignedTemplateParts(width: number, height: number, design: GeneratedTemplateDesign): Record<string, Uint8Array>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { TextRun } from '@web-ppt/core';
|
|
2
|
+
import type { XmlElement } from '../xml/types';
|
|
3
|
+
export declare const hasNativeText: (run: TextRun) => boolean;
|
|
4
|
+
export declare function validateNativeText(run: TextRun): void;
|
|
5
|
+
export declare function materializeNativeText(properties: XmlElement, run: TextRun): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TextBody } from '@web-ppt/core';
|
|
2
|
+
import type { EditDoc, ElementInsertionResource, SlideId, TextOverride } from '../types';
|
|
3
|
+
export interface GeneratedTextContext {
|
|
4
|
+
readonly part: string;
|
|
5
|
+
readonly relationshipPrefix: string;
|
|
6
|
+
readonly resources: Map<string, ElementInsertionResource>;
|
|
7
|
+
}
|
|
8
|
+
export declare function textOverride(doc: EditDoc, slideId: SlideId, body: TextBody | null | undefined, context: GeneratedTextContext, tableStyleAware?: boolean): TextOverride | undefined;
|