@web-ppt/edit-core 0.5.0-beta.1 → 0.5.0-beta.7
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 +188 -0
- package/README.md +165 -22
- 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/collaboration-identity.d.ts +3 -0
- package/dist/commands/add-slide-identity.d.ts +4 -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/convert-to-custom-geometry.d.ts +4 -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 +9 -0
- package/dist/commands/element-hierarchy.d.ts +6 -0
- 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-table-style.d.ts +5 -0
- package/dist/commands/element-text.d.ts +1 -1
- package/dist/commands/element-transform.d.ts +2 -2
- package/dist/commands/frame-decomposition.d.ts +10 -0
- package/dist/commands/generated-creation-defaults.d.ts +4 -0
- package/dist/commands/geometry-types.d.ts +44 -0
- package/dist/commands/group-types.d.ts +24 -0
- package/dist/commands/group.d.ts +4 -0
- 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 +16 -0
- package/dist/commands/insertion-rect.d.ts +2 -0
- 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 +4 -0
- package/dist/commands/patch-stage.d.ts +4 -0
- package/dist/commands/patch.d.ts +4 -0
- package/dist/commands/record-clone.d.ts +3 -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-geometry.d.ts +4 -0
- package/dist/commands/set-preset.d.ts +5 -0
- package/dist/commands/set-table-style.d.ts +3 -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 +2 -1
- package/dist/commands/table-grid-patch.d.ts +12 -0
- package/dist/commands/table-style-types.d.ts +28 -0
- package/dist/commands/text-target.d.ts +3 -2
- package/dist/commands/theme-types.d.ts +47 -0
- package/dist/commands/theme.d.ts +9 -0
- package/dist/commands/types.d.ts +219 -17
- package/dist/commands/ungroup-source.d.ts +3 -0
- package/dist/commands/ungroup.d.ts +4 -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/custom-geometry-path.d.ts +3 -0
- package/dist/custom-geometry.d.ts +12 -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 +5680 -3413
- package/dist/editor.d.ts +19 -2
- 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/custom-geometry.d.ts +2 -0
- package/dist/generate/index.d.ts +13 -0
- package/dist/generate/links.d.ts +3 -0
- package/dist/generate/master-defaults.d.ts +4 -0
- package/dist/generate/materialize.d.ts +2 -0
- package/dist/generate/math.d.ts +3 -0
- package/dist/generate/media.d.ts +13 -0
- package/dist/generate/portable-clipboard.d.ts +4 -0
- package/dist/generate/projection-tree.d.ts +8 -0
- package/dist/generate/table.d.ts +4 -0
- package/dist/generate/template.d.ts +70 -0
- 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 +1464 -0
- package/dist/history.d.ts +11 -1
- package/dist/hyperlink.d.ts +2 -0
- package/dist/identities.d.ts +4 -0
- package/dist/identity-allocation.d.ts +12 -0
- package/dist/identity-watermark.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 +43 -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 +19 -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/patch.d.ts +2 -0
- package/dist/opc.js +1 -1
- package/dist/paragraph-level.d.ts +11 -0
- package/dist/paragraph-property-schema.d.ts +5 -2
- package/dist/{patch-DO8497wO.js → patch-BwhfBbYE.js} +112 -95
- package/dist/patch-change.d.ts +4 -0
- package/dist/patch-events.d.ts +16 -0
- 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 +3 -1
- 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/geometry.d.ts +5 -0
- package/dist/save/index.d.ts +6 -1
- package/dist/save/insertion.d.ts +7 -3
- package/dist/save/layout-properties.d.ts +4 -0
- package/dist/save/master-properties.d.ts +5 -0
- package/dist/save/notes.d.ts +2 -0
- package/dist/save/paragraph-overrides.d.ts +3 -0
- package/dist/save/run-overrides.d.ts +10 -0
- package/dist/save/shape-format.d.ts +3 -0
- package/dist/save/slide-parts.d.ts +1 -0
- package/dist/save/table-style-part.d.ts +11 -0
- package/dist/save/table.d.ts +5 -0
- package/dist/save/text-source-less.d.ts +6 -0
- package/dist/save/xfrm.d.ts +8 -2
- package/dist/save.js +502 -1480
- 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-direct-markup.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 +21 -0
- 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 +217 -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 +77 -5
- package/schemas/describe.schema.json +479 -0
- package/schemas/lint.schema.json +145 -0
- package/dist/index-D4ZTaYOa.js +0 -706
- package/dist/insertion-DabLme_U.js +0 -5471
package/dist/types.d.ts
CHANGED
|
@@ -1,23 +1,39 @@
|
|
|
1
|
-
import type { Effects, ElementBase, Fill, GeomSpec, ImageElement, OpcPackage, Paragraph, PlaceholderDirectFlags, Presentation, ShapeCreationDefaults, ShapeElement, Slide, Stroke, Transition, TableCreationDefaults, SlideElement,
|
|
1
|
+
import type { CellBorders, CustomGeometry, Effects, ElementBase, Fill, GeomSpec, ImageElement, OpcPackage, Paragraph, PlaceholderDirectFlags, Presentation, ShapeCreationDefaults, ShapeElement, Slide, Stroke, Transition, TableCreationDefaults, SlideElement, TableStyleDefinition, TableStyleSettings, TextBody, TextRun, TextCapsStyle, TextStrikeStyle, TextUnderlineStyle, ThemeColorScheme, ThemeColorSlot, ThemeFontScheme } from '@web-ppt/core';
|
|
2
2
|
import type { EmphasisAnimationEffect, EntranceExitAnimationEffect } from './animation-catalog';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import type { ElementId, FractionalIndex, SlideId } from './identities';
|
|
4
|
+
import type { ElementAltTextOverrides, SectionState } from './common-object-slide-types';
|
|
5
|
+
import type { LayoutRecord } from './layout-types';
|
|
6
|
+
import type { MasterRecord } from './master-types';
|
|
7
|
+
export type { ElementId, FractionalIndex, SectionId, SlideId } from './identities';
|
|
8
|
+
export type { ElementAltTextOverrides, ElementAltTextState, SectionRecord, SectionState, SlideSizeState, } from './common-object-slide-types';
|
|
9
|
+
export type { DesignTarget, LayoutCatalogItem, LayoutDesignState, LayoutDesignTarget, LayoutOverrides, LayoutPropertyState, LayoutRecord, MasterDesignTarget, } from './layout-types';
|
|
10
|
+
export type { MasterCatalogItem, MasterDesignState, MasterOverrides, MasterParagraphPropertyInput, MasterParagraphPropertyOverrides, MasterParagraphStyle, MasterRecord, MasterRunPropertyOverrides, MasterTextLevelOverrides, MasterTextLevelState, MasterTextStyleOverrides, } from './master-types';
|
|
6
11
|
export type EditableKind = 'full' | 'frame' | 'none';
|
|
7
12
|
export interface TableCellAddress {
|
|
8
13
|
readonly r: number;
|
|
9
14
|
readonly c: number;
|
|
10
15
|
}
|
|
16
|
+
export type TableRowId = string;
|
|
17
|
+
export type TableColumnId = string;
|
|
18
|
+
export interface TableCellRef {
|
|
19
|
+
readonly row: TableRowId;
|
|
20
|
+
readonly column: TableColumnId;
|
|
21
|
+
}
|
|
11
22
|
/** 来源行沿用坐标;新增行把稳定 rowId 编进 key,避免并发追加改变文字归属。 */
|
|
12
|
-
export type TableCellKey = `${number}:${number}` | `@${number}:${string}:${number}`;
|
|
23
|
+
export type TableCellKey = `${number}:${number}` | `@${number}:${string}:${number}` | `!${string}`;
|
|
13
24
|
export type TableCellRowRef = number | TableRowId;
|
|
25
|
+
export type TableCellColumnRef = number | TableColumnId;
|
|
14
26
|
export interface ElementInsertionSource {
|
|
15
27
|
readonly markup: string;
|
|
16
28
|
readonly namespaces: Readonly<Record<string, string>>;
|
|
17
29
|
/** 来源 spid 字符串 → 目标 part 新 spid。 */
|
|
18
30
|
readonly spids: Readonly<Record<string, number>>;
|
|
31
|
+
/** 未进入编辑记录的原始宿主仍需重编号,但不能按“已删除后代”裁掉。 */
|
|
32
|
+
readonly unmodeledSpids?: readonly number[];
|
|
19
33
|
readonly relationships?: readonly ElementInsertionRelationship[];
|
|
20
34
|
readonly resources?: readonly ElementInsertionResource[];
|
|
35
|
+
/** false 表示宿主只是空容器,后代要按当前模型层级分别插入或从来源树移动。 */
|
|
36
|
+
readonly containsDescendants?: false;
|
|
21
37
|
}
|
|
22
38
|
export interface ElementInsertionRelationship {
|
|
23
39
|
readonly sourceId: string;
|
|
@@ -53,6 +69,7 @@ export interface SlideImageBackground extends ElementImageReplacement {
|
|
|
53
69
|
}
|
|
54
70
|
export type SlideSource = Omit<Slide, 'elements' | 'editInfo'>;
|
|
55
71
|
export type SlideOverrides = Omit<Partial<SlideSource>, 'animations'> & {
|
|
72
|
+
extensions?: Record<string, unknown>;
|
|
56
73
|
/** 稳定元素身份只存在编辑模型;投影时才恢复易失的数值 spid。 */
|
|
57
74
|
animations?: readonly EditAnimationStep[];
|
|
58
75
|
};
|
|
@@ -91,6 +108,13 @@ export interface ElementLinkState {
|
|
|
91
108
|
* `id` / `editInfo` 则属于源文件身份,二者都不能进入覆盖层。
|
|
92
109
|
*/
|
|
93
110
|
export type ElementOverrides = Partial<Pick<ElementBase, BaseOverrideKey>> & {
|
|
111
|
+
/** 按需能力的稀疏语义覆盖;命名空间由对应子路径负责校验。 */
|
|
112
|
+
extensions?: Record<string, unknown>;
|
|
113
|
+
altText?: ElementAltTextOverrides;
|
|
114
|
+
/** 预设切换与调节值保持规范语义;path 仍由投影按当前 frame 求值。 */
|
|
115
|
+
presetGeometry?: GeomSpec;
|
|
116
|
+
/** 自定义几何是 path 的语义来源;path 本身仍保持派生字段,不能写入覆盖层。 */
|
|
117
|
+
geometry?: CustomGeometry;
|
|
94
118
|
/** 缺少字段表示来源;none 表示明确移除,不能用 undefined 混淆二者。 */
|
|
95
119
|
link?: LinkOverride;
|
|
96
120
|
/** 显式无填充用 Fill.none;缺少该字段才表示恢复来源/主题。 */
|
|
@@ -108,6 +132,16 @@ export type ElementOverrides = Partial<Pick<ElementBase, BaseOverrideKey>> & {
|
|
|
108
132
|
tableCells?: Record<TableCellKey, TableCellOverrides>;
|
|
109
133
|
/** 表格行使用稳定身份稀疏追加;不复制整张 rows,未来可沿同一身份扩展中间插入。 */
|
|
110
134
|
tableRows?: Record<TableRowId, TableRowInsertion>;
|
|
135
|
+
/** 新增列与来源列分离;来源列身份由 #c{index} 确定性派生。 */
|
|
136
|
+
tableColumns?: Record<TableColumnId, TableColumnInsertion>;
|
|
137
|
+
tableRemovedRows?: Record<TableRowId, true>;
|
|
138
|
+
tableRemovedColumns?: Record<TableColumnId, true>;
|
|
139
|
+
tableRowHeights?: Record<TableRowId, number>;
|
|
140
|
+
tableColumnWidths?: Record<TableColumnId, number>;
|
|
141
|
+
/** 一旦存在便是完整合并真值;空数组明确表示拆掉全部来源合并。 */
|
|
142
|
+
tableMerges?: readonly TableMergeRegion[];
|
|
143
|
+
/** 缺少字段表示来源;SetTableStyle(null) 删除整份覆盖。 */
|
|
144
|
+
tableStyle?: TableStyleSettings;
|
|
111
145
|
};
|
|
112
146
|
export interface ElementFillState {
|
|
113
147
|
readonly value: Fill | null;
|
|
@@ -210,12 +244,33 @@ export interface ElementCropState {
|
|
|
210
244
|
/** 全零裁剪仍是直接格式;只有 SetCrop(null) 才恢复来源。 */
|
|
211
245
|
readonly direct: boolean;
|
|
212
246
|
}
|
|
247
|
+
export interface ElementPresetGeometryState {
|
|
248
|
+
readonly value: GeomSpec | null;
|
|
249
|
+
readonly source: GeomSpec | null;
|
|
250
|
+
readonly mixed: boolean;
|
|
251
|
+
readonly sourceMixed: boolean;
|
|
252
|
+
readonly direct: boolean;
|
|
253
|
+
}
|
|
213
254
|
export interface TableCellOverrides {
|
|
214
255
|
text?: TextOverride;
|
|
256
|
+
fill?: Fill | null;
|
|
257
|
+
borders?: CellBorders;
|
|
258
|
+
margins?: [number, number, number, number];
|
|
259
|
+
vAlign?: 'top' | 'middle' | 'bottom';
|
|
260
|
+
vert?: NonNullable<import('@web-ppt/core').TableCell['vert']>;
|
|
215
261
|
}
|
|
216
|
-
export type TableRowId = string;
|
|
217
262
|
export interface TableRowInsertion {
|
|
218
263
|
readonly order: FractionalIndex;
|
|
264
|
+
/** 来源行只提供空白格的格式模板;身份和文字不会被复制。 */
|
|
265
|
+
readonly template?: number;
|
|
266
|
+
}
|
|
267
|
+
export interface TableColumnInsertion {
|
|
268
|
+
readonly order: FractionalIndex;
|
|
269
|
+
readonly template?: number;
|
|
270
|
+
}
|
|
271
|
+
export interface TableMergeRegion {
|
|
272
|
+
readonly from: TableCellRef;
|
|
273
|
+
readonly to: TableCellRef;
|
|
219
274
|
}
|
|
220
275
|
export interface TextMark {
|
|
221
276
|
readonly from: number;
|
|
@@ -232,28 +287,51 @@ export interface TextMark {
|
|
|
232
287
|
readonly preserveSource?: true;
|
|
233
288
|
/** 用户对来源 rPr 的稀疏覆盖;null 表示删除直接格式、回到继承。 */
|
|
234
289
|
readonly runOverrides?: RunPropertyOverrides;
|
|
290
|
+
/** 先删除来源 rPr 的全部视觉直设,再叠加 runOverrides;链接与字段身份不属于格式。 */
|
|
291
|
+
readonly clearDirectFormatting?: true;
|
|
235
292
|
/** 删除直接格式后用于恢复继承所得的有效值;只含字符格式 P0 字段。 */
|
|
236
293
|
readonly inheritedProps?: RunProperties;
|
|
294
|
+
/** 完整继承字符元数据;改级后不能继续沿用旧层级的非面板字段。 */
|
|
295
|
+
readonly inheritedRunProps?: import('@web-ppt/core').TextRunEditInfo['inheritedRunProps'];
|
|
237
296
|
/** 继承字体可能分别含 latin/ea/cs,不能为面板的单字体值而丢掉回退栈。 */
|
|
238
297
|
readonly inheritedFonts?: readonly string[];
|
|
298
|
+
/** 去重字体栈不足以还原脚本槽;清除 font 直设与换级重基必须保留槽位身份。 */
|
|
299
|
+
readonly inheritedFontSlots?: import('@web-ppt/core').TextFontSlots;
|
|
239
300
|
/** 只说明来源链接不可安全编辑,不携带原始 action 或危险 URL。 */
|
|
240
301
|
readonly sourceLinkReadonly?: true;
|
|
241
302
|
}
|
|
242
303
|
export interface RunProperties {
|
|
243
304
|
readonly font: string | null;
|
|
244
305
|
readonly size: number;
|
|
306
|
+
readonly color: string;
|
|
245
307
|
readonly b: boolean;
|
|
246
308
|
readonly i: boolean;
|
|
247
309
|
readonly u: boolean;
|
|
248
310
|
readonly strike: boolean;
|
|
311
|
+
readonly underline: TextUnderlineStyle;
|
|
312
|
+
readonly strikeType: TextStrikeStyle;
|
|
313
|
+
readonly highlight: string | null;
|
|
314
|
+
/** 编辑 API 沿用统一 Schema 的 CSS px;保存时换算为 `a:rPr@spc` 的 1/100 pt。 */
|
|
315
|
+
readonly spacing: number;
|
|
316
|
+
readonly caps: TextCapsStyle;
|
|
317
|
+
/** 百分比;30 表示上移 30%,-25 表示下移 25%。 */
|
|
318
|
+
readonly baseline: number;
|
|
249
319
|
}
|
|
250
320
|
export interface RunPropertyOverrides {
|
|
251
321
|
readonly font?: string | null;
|
|
252
322
|
readonly size?: number | null;
|
|
323
|
+
readonly color?: string | null;
|
|
253
324
|
readonly b?: boolean | null;
|
|
254
325
|
readonly i?: boolean | null;
|
|
255
326
|
readonly u?: boolean | null;
|
|
256
327
|
readonly strike?: boolean | null;
|
|
328
|
+
/** 精确样式优先;不能与对应的旧布尔字段同时传入。 */
|
|
329
|
+
readonly underline?: TextUnderlineStyle | null;
|
|
330
|
+
readonly strikeType?: TextStrikeStyle | null;
|
|
331
|
+
readonly highlight?: string | null;
|
|
332
|
+
readonly spacing?: number | null;
|
|
333
|
+
readonly caps?: TextCapsStyle | null;
|
|
334
|
+
readonly baseline?: number | null;
|
|
257
335
|
/** null 恢复来源;none 明确去掉选区链接。 */
|
|
258
336
|
readonly link?: LinkOverride | null;
|
|
259
337
|
}
|
|
@@ -266,6 +344,8 @@ export interface TextFragmentMark {
|
|
|
266
344
|
export interface TextFragmentParagraph {
|
|
267
345
|
readonly text: string;
|
|
268
346
|
readonly marks: readonly TextFragmentMark[];
|
|
347
|
+
/** 只有复制了完整段落时存在;局部文字不会意外带走列表语义。 */
|
|
348
|
+
readonly bullet?: ParagraphBullet;
|
|
269
349
|
}
|
|
270
350
|
export interface TextFragment {
|
|
271
351
|
readonly paragraphs: readonly TextFragmentParagraph[];
|
|
@@ -277,21 +357,67 @@ export interface RunPropertyState<T> {
|
|
|
277
357
|
export interface RunPropertiesState {
|
|
278
358
|
readonly font: RunPropertyState<string>;
|
|
279
359
|
readonly size: RunPropertyState<number>;
|
|
360
|
+
readonly color: RunPropertyState<string>;
|
|
280
361
|
readonly b: RunPropertyState<boolean>;
|
|
281
362
|
readonly i: RunPropertyState<boolean>;
|
|
282
363
|
readonly u: RunPropertyState<boolean>;
|
|
283
364
|
readonly strike: RunPropertyState<boolean>;
|
|
365
|
+
readonly underline: RunPropertyState<TextUnderlineStyle>;
|
|
366
|
+
readonly strikeType: RunPropertyState<TextStrikeStyle>;
|
|
367
|
+
readonly highlight: RunPropertyState<string>;
|
|
368
|
+
readonly spacing: RunPropertyState<number>;
|
|
369
|
+
readonly caps: RunPropertyState<TextCapsStyle>;
|
|
370
|
+
readonly baseline: RunPropertyState<number>;
|
|
284
371
|
}
|
|
285
372
|
export type RunLinkState = ElementLinkState;
|
|
373
|
+
export type ParagraphAutoNumberType = 'alphaLcParenBoth' | 'alphaLcParenR' | 'alphaLcPeriod' | 'alphaUcParenBoth' | 'alphaUcParenR' | 'alphaUcPeriod' | 'arabic1Minus' | 'arabic2Minus' | 'arabicDbPeriod' | 'arabicDbPlain' | 'arabicParenBoth' | 'arabicParenR' | 'arabicPeriod' | 'arabicPlain' | 'circleNumDbPlain' | 'circleNumWdBlackPlain' | 'circleNumWdWhitePlain' | 'ea1ChsPeriod' | 'ea1ChsPlain' | 'ea1ChtPeriod' | 'ea1ChtPlain' | 'ea1JpnChsDbPeriod' | 'ea1JpnKorPeriod' | 'ea1JpnKorPlain' | 'hebrew2Minus' | 'hindiAlpha1Period' | 'hindiAlphaPeriod' | 'hindiNumParenR' | 'hindiNumPeriod' | 'romanLcParenBoth' | 'romanLcParenR' | 'romanLcPeriod' | 'romanUcParenBoth' | 'romanUcParenR' | 'romanUcPeriod' | 'thaiAlphaParenBoth' | 'thaiAlphaParenR' | 'thaiAlphaPeriod' | 'thaiNumParenBoth' | 'thaiNumParenR' | 'thaiNumPeriod';
|
|
374
|
+
export type ParagraphBulletSize = {
|
|
375
|
+
readonly kind: 'percent' | 'points';
|
|
376
|
+
readonly value: number;
|
|
377
|
+
};
|
|
378
|
+
export interface ParagraphBulletStyle {
|
|
379
|
+
readonly color?: string | null;
|
|
380
|
+
readonly font?: string | null;
|
|
381
|
+
readonly size?: ParagraphBulletSize | null;
|
|
382
|
+
}
|
|
383
|
+
export type ParagraphBullet = {
|
|
384
|
+
readonly kind: 'none';
|
|
385
|
+
} | ({
|
|
386
|
+
readonly kind: 'char';
|
|
387
|
+
readonly char: string;
|
|
388
|
+
} & ParagraphBulletStyle) | ({
|
|
389
|
+
readonly kind: 'autoNum';
|
|
390
|
+
readonly type: ParagraphAutoNumberType;
|
|
391
|
+
readonly startAt?: number;
|
|
392
|
+
} & ParagraphBulletStyle) | ({
|
|
393
|
+
readonly kind: 'blip';
|
|
394
|
+
readonly image: {
|
|
395
|
+
readonly src: string;
|
|
396
|
+
};
|
|
397
|
+
} & ParagraphBulletStyle);
|
|
398
|
+
export type ParagraphBulletInput = ParagraphBullet | ({
|
|
399
|
+
readonly kind: 'blip';
|
|
400
|
+
readonly image: {
|
|
401
|
+
readonly bytes: Uint8Array;
|
|
402
|
+
readonly mime: 'image/png' | 'image/jpeg' | 'image/gif' | 'image/webp';
|
|
403
|
+
};
|
|
404
|
+
} & ParagraphBulletStyle);
|
|
286
405
|
export interface ParagraphPropertyOverrides {
|
|
406
|
+
readonly level?: number | null;
|
|
287
407
|
readonly align?: Paragraph['align'] | null;
|
|
288
408
|
readonly lineHeight?: number | null;
|
|
289
409
|
readonly spaceBefore?: number | null;
|
|
290
410
|
readonly spaceAfter?: number | null;
|
|
291
411
|
readonly marginLeft?: number | null;
|
|
292
412
|
readonly indent?: number | null;
|
|
413
|
+
/** null 删除本层项目符号直设;显式无项目符号会使用独立的 none 语义。 */
|
|
414
|
+
readonly bullet?: ParagraphBullet | null;
|
|
293
415
|
}
|
|
416
|
+
export type ParagraphPropertyInput = Omit<ParagraphPropertyOverrides, 'bullet'> & {
|
|
417
|
+
readonly bullet?: ParagraphBulletInput | null;
|
|
418
|
+
};
|
|
294
419
|
export interface ParagraphProperties {
|
|
420
|
+
readonly level: number;
|
|
295
421
|
readonly align: Paragraph['align'];
|
|
296
422
|
readonly lineHeight: number | null;
|
|
297
423
|
readonly spaceBefore: number;
|
|
@@ -300,12 +426,14 @@ export interface ParagraphProperties {
|
|
|
300
426
|
readonly indent: number;
|
|
301
427
|
}
|
|
302
428
|
export interface ParagraphPropertiesState {
|
|
429
|
+
readonly level: RunPropertyState<number>;
|
|
303
430
|
readonly align: RunPropertyState<Paragraph['align']>;
|
|
304
431
|
readonly lineHeight: RunPropertyState<number>;
|
|
305
432
|
readonly spaceBefore: RunPropertyState<number>;
|
|
306
433
|
readonly spaceAfter: RunPropertyState<number>;
|
|
307
434
|
readonly marginLeft: RunPropertyState<number>;
|
|
308
435
|
readonly indent: RunPropertyState<number>;
|
|
436
|
+
readonly bullet: RunPropertyState<ParagraphBullet>;
|
|
309
437
|
}
|
|
310
438
|
export type TextBodyAutoFit = 'none' | 'normal' | 'shape';
|
|
311
439
|
export interface TextBodyProperties {
|
|
@@ -339,6 +467,11 @@ export interface FlatTextParagraph {
|
|
|
339
467
|
readonly inheritedParagraphProps?: ParagraphProperties;
|
|
340
468
|
/** 来源 pPr 的直接字段集合,用于区分“删除直设”与严格 no-op。 */
|
|
341
469
|
readonly directParagraphProps?: Readonly<Partial<Record<keyof ParagraphProperties, true>>>;
|
|
470
|
+
/** 来源结构语义不混入 props,避免把自动编号派生字符串当字符项目符号。 */
|
|
471
|
+
readonly sourceBullet?: ParagraphBullet;
|
|
472
|
+
readonly inheritedBullet?: ParagraphBullet;
|
|
473
|
+
/** 上传图片项目符号的 OPC 关系闭包;字节只由 imageResources 按哈希持有。 */
|
|
474
|
+
readonly bulletImageOverride?: ElementImageReplacement;
|
|
342
475
|
}
|
|
343
476
|
export type TextBodyOverride = Omit<TextBody, 'paragraphs' | 'editInfo'>;
|
|
344
477
|
export type TextOverride = {
|
|
@@ -355,6 +488,7 @@ export type TextOverride = {
|
|
|
355
488
|
};
|
|
356
489
|
export interface ElementMeta {
|
|
357
490
|
geom?: GeomSpec;
|
|
491
|
+
customGeometry?: CustomGeometry;
|
|
358
492
|
ph?: {
|
|
359
493
|
type: string;
|
|
360
494
|
idx?: string;
|
|
@@ -387,6 +521,8 @@ export interface ElementMeta {
|
|
|
387
521
|
inherited?: true;
|
|
388
522
|
/** 来源存在无法安全映射的链接;覆盖层缺失时查询为只读来源。 */
|
|
389
523
|
sourceLinkReadonly?: true;
|
|
524
|
+
/** 来源 XML 中的直属父级;结构编辑后保存层据此移动原宿主而不是克隆内容。 */
|
|
525
|
+
sourceParent?: SlideId | ElementId;
|
|
390
526
|
}
|
|
391
527
|
export interface ElementRecord {
|
|
392
528
|
id: ElementId;
|
|
@@ -444,6 +580,43 @@ export interface SlideRecord {
|
|
|
444
580
|
defaultShape?: ShapeCreationDefaults;
|
|
445
581
|
/** 解析期已在当前页主题/默认表样式上求值,新增表格无需理解 OOXML 样式层。 */
|
|
446
582
|
defaultTable?: TableCreationDefaults;
|
|
583
|
+
/** 当前页主题求值后的公开表样式目录。 */
|
|
584
|
+
tableStyles?: TableStyleDefinition[];
|
|
585
|
+
}
|
|
586
|
+
export interface ThemeFontCollectionOverrides {
|
|
587
|
+
latin?: string;
|
|
588
|
+
ea?: string;
|
|
589
|
+
cs?: string;
|
|
590
|
+
scripts?: Record<string, string>;
|
|
591
|
+
}
|
|
592
|
+
export interface ThemeOverrides {
|
|
593
|
+
colors?: Partial<Record<ThemeColorSlot, string>>;
|
|
594
|
+
fonts?: {
|
|
595
|
+
major?: ThemeFontCollectionOverrides;
|
|
596
|
+
minor?: ThemeFontCollectionOverrides;
|
|
597
|
+
};
|
|
598
|
+
}
|
|
599
|
+
/** src 永远是解析来源,用户更改只进入稀疏 ovr。 */
|
|
600
|
+
export interface ThemeRecord {
|
|
601
|
+
id: string;
|
|
602
|
+
name: string;
|
|
603
|
+
src: {
|
|
604
|
+
colors: ThemeColorScheme;
|
|
605
|
+
fonts: ThemeFontScheme;
|
|
606
|
+
};
|
|
607
|
+
ovr: ThemeOverrides;
|
|
608
|
+
}
|
|
609
|
+
export interface ThemeState {
|
|
610
|
+
id: string;
|
|
611
|
+
name: string;
|
|
612
|
+
colors: ThemeColorScheme;
|
|
613
|
+
fonts: ThemeFontScheme;
|
|
614
|
+
source: {
|
|
615
|
+
colors: ThemeColorScheme;
|
|
616
|
+
fonts: ThemeFontScheme;
|
|
617
|
+
};
|
|
618
|
+
mixed: false;
|
|
619
|
+
direct: boolean;
|
|
447
620
|
}
|
|
448
621
|
export interface SlideNotesBinding {
|
|
449
622
|
readonly sourcePart?: string;
|
|
@@ -473,6 +646,29 @@ export interface EditDocMeta {
|
|
|
473
646
|
source: Presentation['source'];
|
|
474
647
|
/** true 表示缺少可靠写回上下文,只能安全查看 */
|
|
475
648
|
readonly: boolean;
|
|
649
|
+
/** 来源演示文稿的表样式 part;省略表示保存时按需创建标准 part。 */
|
|
650
|
+
tableStylesPart?: string;
|
|
651
|
+
sourceWidth: number;
|
|
652
|
+
sourceHeight: number;
|
|
653
|
+
}
|
|
654
|
+
export interface EditIdentityRange {
|
|
655
|
+
/** 划分区间前的全局首值;恢复时据此重算当前 slot 的精确边界。 */
|
|
656
|
+
base: number;
|
|
657
|
+
maximum: number;
|
|
658
|
+
next: number;
|
|
659
|
+
end: number;
|
|
660
|
+
step: number;
|
|
661
|
+
}
|
|
662
|
+
/** 协同分配状态随恢复日志持久化;ranges 是各类 OOXML 数值身份的互斥游标。 */
|
|
663
|
+
export interface EditIdentityAllocation {
|
|
664
|
+
replicaId: string;
|
|
665
|
+
prefix: string;
|
|
666
|
+
slot: number;
|
|
667
|
+
count: number;
|
|
668
|
+
/** 与补丁事务一起进入恢复帧,进程重开后不能复用旧消息序号或 Lamport 时间。 */
|
|
669
|
+
clock: number;
|
|
670
|
+
sequence: number;
|
|
671
|
+
ranges: Record<string, EditIdentityRange>;
|
|
476
672
|
}
|
|
477
673
|
/** 会话内身份分配状态必须随文档持久化,否则恢复后会复用旧 id。 */
|
|
478
674
|
export interface EditIdentity {
|
|
@@ -486,6 +682,7 @@ export interface EditIdentity {
|
|
|
486
682
|
nextNotesPart?: number;
|
|
487
683
|
nextPresentationSlideId?: number;
|
|
488
684
|
nextPresentationRelationship?: number;
|
|
685
|
+
allocation?: EditIdentityAllocation;
|
|
489
686
|
}
|
|
490
687
|
/** 只保存首次触碰的 XML part;必须随文档 structuredClone 才能在 Worker 中正确撤销后保存。 */
|
|
491
688
|
export interface EditSaveState {
|
|
@@ -495,14 +692,27 @@ export interface EditSaveState {
|
|
|
495
692
|
sourceSlideParts: string[];
|
|
496
693
|
}
|
|
497
694
|
export interface EditDoc {
|
|
695
|
+
/** 文档级共享语义的稀疏覆盖;独立于页面和元素的生命周期。 */
|
|
696
|
+
extensions?: Record<string, unknown>;
|
|
498
697
|
meta: EditDocMeta;
|
|
499
698
|
identity: EditIdentity;
|
|
500
699
|
slides: Record<SlideId, SlideRecord>;
|
|
501
700
|
slideOrder: SlideId[];
|
|
502
|
-
|
|
701
|
+
sections: SectionState;
|
|
702
|
+
layouts: Record<string, LayoutRecord>;
|
|
503
703
|
layoutOrder: string[];
|
|
704
|
+
masters: Record<string, MasterRecord>;
|
|
705
|
+
masterOrder: string[];
|
|
706
|
+
themes: Record<string, ThemeRecord>;
|
|
707
|
+
themeOrder: string[];
|
|
504
708
|
elements: Record<ElementId, ElementRecord>;
|
|
505
709
|
removedElements: Record<ElementId, RemovedElementRecord>;
|
|
710
|
+
/** 被移出模型的原生框架身份;副本和延迟扩展仍需定位它,不参与 XML 删除计划。 */
|
|
711
|
+
retainedElementOrigins?: Record<ElementId, {
|
|
712
|
+
readonly part: string;
|
|
713
|
+
readonly spid: number;
|
|
714
|
+
readonly sourcePart?: string;
|
|
715
|
+
}>;
|
|
506
716
|
/** 会话图片按内容寻址;未被当前元素引用的条目仍可供历史逆向 Patch 恢复。 */
|
|
507
717
|
imageResources: Record<string, ElementInsertionResource>;
|
|
508
718
|
readonly package: OpcPackage | null;
|
|
@@ -516,4 +726,3 @@ export interface ProjectionInvalidation {
|
|
|
516
726
|
dirtyElements: Set<ElementId>;
|
|
517
727
|
dirtySlides: Set<SlideId>;
|
|
518
728
|
}
|
|
519
|
-
export {};
|
package/dist/xml/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** 保存期按需加载的无 DOM 保留型 XML 树。 */
|
|
2
2
|
export { parseXmlTree, serializeXmlTree, serializeXmlTreeBytes } from './tree';
|
|
3
3
|
export { removeXmlAttribute, setXmlAttribute } from './mutate';
|
|
4
|
-
export { createXmlElement, createXmlText, removeXmlChild, reorderXmlChildren } from './nodes';
|
|
4
|
+
export { cloneXmlNode, cloneXmlNodeWithNamespaceClosure, createXmlElement, createXmlText, insertXmlChildUnchecked, removeXmlChild, reorderXmlChildren, } from './nodes';
|
|
5
5
|
export { insertXmlChild, insertXmlInOrder, OOXML_CHILD_ORDER } from './order';
|
|
6
6
|
export { findXmlAttribute, findXmlChild, findXmlDescendant, xmlElementChildren } from './query';
|
|
7
7
|
export type { CreateXmlElementOptions } from './nodes';
|
package/dist/xml/nodes.d.ts
CHANGED
|
@@ -8,8 +8,8 @@ export declare function createXmlElement(name: string, options?: CreateXmlElemen
|
|
|
8
8
|
/** 克隆到未挂载树;元素会重建,叶节点保留原始词法,避免丢失注释、CDATA 与处理指令。 */
|
|
9
9
|
export declare function cloneXmlNode(source: XmlElement): XmlElement;
|
|
10
10
|
export declare function cloneXmlNode(source: XmlNode): XmlNode;
|
|
11
|
-
/**
|
|
12
|
-
export declare function cloneXmlNodeWithNamespaceClosure(source: XmlElement): XmlElement;
|
|
11
|
+
/** 子树离开来源祖先时固化有效前缀;立即移入 destination 时,可复用该父级的相同绑定。 */
|
|
12
|
+
export declare function cloneXmlNodeWithNamespaceClosure(source: XmlElement, destination?: XmlElement): XmlElement;
|
|
13
13
|
/** 在指定节点前插入;before 省略时追加。格式化空白由原父节点保持,不凭空重排已有内容。 */
|
|
14
14
|
export declare function insertXmlChildUnchecked(parent: XmlElement, child: XmlNode, before?: XmlNode | null): number;
|
|
15
15
|
/** 从父元素移除节点;节点可随后重新挂载。 */
|
package/dist/xml.js
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
import { w as s,
|
|
1
|
+
import { w as s, j as a, e as r, c as m, k as t, b as i, g as X, f as n, v as d, i as o, d as c, p as h, h as C, r as f, n as b, y as p, a as u, s as x, x as O } from "./index-C2r7c6G6.js";
|
|
2
2
|
export {
|
|
3
3
|
s as OOXML_CHILD_ORDER,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
m as
|
|
7
|
-
t as
|
|
8
|
-
i as
|
|
9
|
-
X as
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
4
|
+
a as cloneXmlNode,
|
|
5
|
+
r as cloneXmlNodeWithNamespaceClosure,
|
|
6
|
+
m as createXmlElement,
|
|
7
|
+
t as createXmlText,
|
|
8
|
+
i as findXmlAttribute,
|
|
9
|
+
X as findXmlChild,
|
|
10
|
+
n as findXmlDescendant,
|
|
11
|
+
d as insertXmlChild,
|
|
12
|
+
o as insertXmlChildUnchecked,
|
|
13
|
+
c as insertXmlInOrder,
|
|
14
|
+
h as parseXmlTree,
|
|
15
|
+
C as removeXmlAttribute,
|
|
16
|
+
f as removeXmlChild,
|
|
17
|
+
b as reorderXmlChildren,
|
|
18
|
+
p as serializeXmlTree,
|
|
19
|
+
u as serializeXmlTreeBytes,
|
|
20
|
+
x as setXmlAttribute,
|
|
21
|
+
O as xmlElementChildren
|
|
19
22
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@web-ppt/edit-core",
|
|
3
|
-
"version": "0.5.0-beta.
|
|
3
|
+
"version": "0.5.0-beta.7",
|
|
4
4
|
"description": "Headless, framework-agnostic editing document model and render projection for Web-PPT.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pptx",
|
|
@@ -42,24 +42,96 @@
|
|
|
42
42
|
"types": "./dist/save/index.d.ts",
|
|
43
43
|
"import": "./dist/save.js"
|
|
44
44
|
},
|
|
45
|
-
"./
|
|
45
|
+
"./generate": {
|
|
46
|
+
"types": "./dist/generate/index.d.ts",
|
|
47
|
+
"import": "./dist/generate.js"
|
|
48
|
+
},
|
|
49
|
+
"./templates": {
|
|
50
|
+
"types": "./dist/templates/index.d.ts",
|
|
51
|
+
"import": "./dist/templates.js"
|
|
52
|
+
},
|
|
53
|
+
"./chart": {
|
|
54
|
+
"types": "./dist/chart/index.d.ts",
|
|
55
|
+
"import": "./dist/chart.js"
|
|
56
|
+
},
|
|
57
|
+
"./chart-shared": {
|
|
58
|
+
"types": "./dist/chart-shared/index.d.ts",
|
|
59
|
+
"import": "./dist/chart-shared.js"
|
|
60
|
+
},
|
|
61
|
+
"./media": {
|
|
62
|
+
"types": "./dist/media/index.d.ts",
|
|
63
|
+
"import": "./dist/media.js"
|
|
64
|
+
},
|
|
65
|
+
"./package.json": "./package.json",
|
|
66
|
+
"./appearance": {
|
|
67
|
+
"types": "./dist/appearance/index.d.ts",
|
|
68
|
+
"import": "./dist/appearance.js"
|
|
69
|
+
},
|
|
70
|
+
"./resize": {
|
|
71
|
+
"types": "./dist/resize/index.d.ts",
|
|
72
|
+
"import": "./dist/resize.js"
|
|
73
|
+
},
|
|
74
|
+
"./comments": {
|
|
75
|
+
"types": "./dist/comments/index.d.ts",
|
|
76
|
+
"import": "./dist/comments.js"
|
|
77
|
+
},
|
|
78
|
+
"./chart-design": {
|
|
79
|
+
"types": "./dist/chart-design/index.d.ts",
|
|
80
|
+
"import": "./dist/chart-design.js"
|
|
81
|
+
},
|
|
82
|
+
"./chart-ex": {
|
|
83
|
+
"types": "./dist/chart-ex/index.d.ts",
|
|
84
|
+
"import": "./dist/chart-ex.js"
|
|
85
|
+
},
|
|
86
|
+
"./smartart": {
|
|
87
|
+
"types": "./dist/smartart/index.d.ts",
|
|
88
|
+
"import": "./dist/smartart.js"
|
|
89
|
+
},
|
|
90
|
+
"./cfb": {
|
|
91
|
+
"types": "./dist/cfb/index.d.ts",
|
|
92
|
+
"import": "./dist/cfb.js"
|
|
93
|
+
},
|
|
94
|
+
"./ole": {
|
|
95
|
+
"types": "./dist/ole/index.d.ts",
|
|
96
|
+
"import": "./dist/ole.js"
|
|
97
|
+
},
|
|
98
|
+
"./ink": {
|
|
99
|
+
"types": "./dist/ink/index.d.ts",
|
|
100
|
+
"import": "./dist/ink.js"
|
|
101
|
+
},
|
|
102
|
+
"./describe": {
|
|
103
|
+
"types": "./dist/describe/index.d.ts",
|
|
104
|
+
"import": "./dist/describe.js"
|
|
105
|
+
},
|
|
106
|
+
"./describe/schema.json": "./schemas/describe.schema.json",
|
|
107
|
+
"./lint": { "types": "./dist/lint/index.d.ts", "import": "./dist/lint.js" },
|
|
108
|
+
"./lint/schema.json": "./schemas/lint.schema.json",
|
|
109
|
+
"./lint/sampler": { "types": "./dist/lint/sampler.d.ts", "import": "./dist/lint-sampler.js" },
|
|
110
|
+
"./ppt": {
|
|
111
|
+
"types": "./dist/ppt/index.d.ts",
|
|
112
|
+
"import": "./dist/ppt.js"
|
|
113
|
+
}
|
|
46
114
|
},
|
|
47
115
|
"files": [
|
|
48
116
|
"dist",
|
|
117
|
+
"schemas",
|
|
49
118
|
"README.md",
|
|
50
119
|
"CHANGELOG.md",
|
|
51
120
|
"LICENSE"
|
|
52
121
|
],
|
|
53
122
|
"scripts": {
|
|
54
|
-
"
|
|
123
|
+
"postbuild": "node ../../tooling/build-agent-describe.mjs && vite build --config vite.lint.config.ts",
|
|
124
|
+
"build": "vite build && vite build --config vite.templates.config.ts && vite build --config vite.chart.config.ts && vite build --config vite.media.config.ts && vite build --config vite.appearance.config.ts && vite build --config vite.resize.config.ts && node ../../tooling/check-preset-handles-boundary.mjs edit-core && tsc -p tsconfig.build.json && vite build --config vite.comments.config.ts && vite build --config vite.chart-design.config.ts && vite build --config vite.chart-ex.config.ts && vite build --config vite.smartart.config.ts && vite build --config vite.cfb.config.ts && vite build --config vite.ole.config.ts && vite build --config vite.ink.config.ts && vite build --config vite.ppt.config.ts",
|
|
55
125
|
"prepublishOnly": "npm run build",
|
|
56
126
|
"prepack": "node ../../tooling/sync-package-docs.mjs"
|
|
57
127
|
},
|
|
58
128
|
"peerDependencies": {
|
|
59
|
-
"@web-ppt/core": "^0.5.0-beta.
|
|
129
|
+
"@web-ppt/core": "^0.5.0-beta.7"
|
|
60
130
|
},
|
|
61
131
|
"dependencies": {
|
|
62
|
-
"
|
|
132
|
+
"culori": "^4.0.2",
|
|
133
|
+
"fflate": "^0.8.2",
|
|
134
|
+
"rbush": "^4.0.1"
|
|
63
135
|
},
|
|
64
136
|
"publishConfig": {
|
|
65
137
|
"access": "public"
|