@web-ppt/editor 0.5.0-beta.2 → 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 +171 -0
- package/README.md +96 -5
- package/dist/accessibility.js +60 -0
- package/dist/adjustments/index.d.ts +2 -0
- package/dist/adjustments/preset-adjustment-editor.d.ts +4 -0
- package/dist/adjustments/types.d.ts +22 -0
- package/dist/adjustments.js +300 -0
- package/dist/canvas-accessibility.d.ts +6 -0
- package/dist/chart/index.d.ts +2 -0
- package/dist/chart-shared/index.d.ts +2 -0
- package/dist/chart-shared.js +7 -0
- package/dist/chart.js +6 -0
- package/dist/common-object-slide-commands.d.ts +20 -0
- package/dist/design/index.d.ts +3 -0
- package/dist/design-editor-types.d.ts +15 -0
- package/dist/design-editor.d.ts +3 -0
- package/dist/design.js +108 -0
- package/dist/dom-identity.d.ts +2 -1
- package/dist/edit-context/geometry.d.ts +8 -0
- package/dist/edit-context/index.d.ts +8 -0
- package/dist/edit-context/native.d.ts +33 -0
- package/dist/edit-context.js +333 -0
- package/dist/editor.js +1 -6706
- package/dist/element-clipboard.d.ts +4 -2
- package/dist/framework-adapter-types.d.ts +14 -2
- package/dist/image-insertion.d.ts +4 -2
- package/dist/index.d.ts +5 -4
- package/dist/media/index.d.ts +1 -0
- package/dist/media.js +1 -0
- package/dist/rotation-geometry.d.ts +4 -1
- package/dist/selection-hit.d.ts +6 -0
- package/dist/selection-pane-types.d.ts +1 -0
- package/dist/session-state.d.ts +5 -1
- package/dist/session.d.ts +17 -1
- package/dist/slide-dom-renderer.d.ts +1 -0
- package/dist/slide-editor-commands.d.ts +14 -2
- package/dist/slide-editor-events.d.ts +1 -0
- package/dist/slide-editor-types.d.ts +35 -2
- package/dist/slide-pointer-controller.d.ts +3 -0
- package/dist/templates/index.d.ts +2 -0
- package/dist/templates.js +5 -0
- package/dist/text-edit-commit.d.ts +8 -0
- package/dist/text-editor.d.ts +7 -3
- package/dist/text-keyboard.d.ts +2 -2
- package/dist/touch-gesture.d.ts +42 -0
- package/dist/transform-frame.d.ts +11 -6
- package/package.json +38 -6
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import type { Editor, ElementId, SlideId } from '@web-ppt/edit-core';
|
|
1
|
+
import type { Editor, ElementClipboardPayload, ElementId, SlideId } from '@web-ppt/edit-core';
|
|
2
2
|
export declare const ELEMENT_CLIPBOARD_MIME = "application/x-web-ppt-elements+json";
|
|
3
3
|
interface ElementClipboardOptions {
|
|
4
4
|
editor: Editor;
|
|
5
|
+
copyElements(ids: readonly ElementId[]): ElementClipboardPayload;
|
|
5
6
|
slideId(): SlideId;
|
|
6
7
|
editable(): boolean;
|
|
7
8
|
gestureActive(): boolean;
|
|
8
9
|
insertImage(file: File): Promise<ElementId>;
|
|
10
|
+
onError?: (error: unknown) => void;
|
|
9
11
|
}
|
|
10
12
|
export declare class ElementClipboardController {
|
|
11
13
|
private readonly options;
|
|
12
14
|
constructor(options: ElementClipboardOptions);
|
|
15
|
+
private report;
|
|
13
16
|
copy(event: ClipboardEvent): void;
|
|
14
17
|
cut(event: ClipboardEvent): void;
|
|
15
18
|
paste(event: ClipboardEvent): void;
|
|
16
19
|
duplicate(event: KeyboardEvent): boolean;
|
|
17
|
-
private shouldYield;
|
|
18
20
|
private shouldYieldBase;
|
|
19
21
|
private selectedRoots;
|
|
20
22
|
private write;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { EditAnimationStep, EditorChange, SlideAnimationState, SlideId, SlideTransitionInput, SlideTransitionState, TextSearchMatch } from '@web-ppt/edit-core';
|
|
1
|
+
import type { AddSectionCommand, DistributeElementsCommand, EditAnimationStep, EditorChange, ElementAltTextState, ElementId, SectionId, SectionRecord, SetAltTextCommand, SetSlideSizeCommand, SlideAnimationState, SlideId, SlideSizeState, SlideTransitionInput, SlideTransitionState, TextSearchMatch } from '@web-ppt/edit-core';
|
|
2
2
|
import type { RecoveryCandidate, RecoveryDecision } from './recovery-store';
|
|
3
3
|
import type { EditorSession, OpenEditorOptions } from './session';
|
|
4
4
|
import type { SelectionPane } from './selection-pane-types';
|
|
5
|
-
import type { EditorMode, LinkFollowHandler, SlideEditor, SlideEditorOptions } from './slide-editor-types';
|
|
5
|
+
import type { EditorContextRequest, EditorMode, LinkFollowHandler, SlideEditor, SlideEditorOptions, TouchNavigationChange } from './slide-editor-types';
|
|
6
6
|
import type { WebPptSource } from './source-fingerprint';
|
|
7
7
|
import type { FormatPainterSnapshot, FormatPainterStartOptions } from './format-painter-types';
|
|
8
8
|
import type { TextSearchOpenOptions, TextSearchOptions, TextSearchSnapshot } from './text-search-types';
|
|
@@ -52,6 +52,8 @@ export interface WebPptAdapterCallbacks {
|
|
|
52
52
|
readonly onProgress?: (progress: WebPptAdapterProgress) => void;
|
|
53
53
|
readonly onChange?: (change: EditorChange) => void;
|
|
54
54
|
readonly onViewChange?: (state: WebPptViewState) => void;
|
|
55
|
+
readonly onTouchNavigate?: (change: TouchNavigationChange) => void;
|
|
56
|
+
readonly onContextRequest?: (request: EditorContextRequest) => void;
|
|
55
57
|
readonly onRecovery?: (candidate: RecoveryCandidate) => RecoveryDecision | Promise<RecoveryDecision>;
|
|
56
58
|
}
|
|
57
59
|
export type WebPptAdapterBinding = WebPptViewOptions & WebPptAdapterCallbacks & ({
|
|
@@ -107,6 +109,16 @@ export interface WebPptAdapter {
|
|
|
107
109
|
previousTextSearch(): TextSearchMatch | null;
|
|
108
110
|
replaceCurrentText(): boolean;
|
|
109
111
|
replaceAllText(): number;
|
|
112
|
+
distributeElements(axis: DistributeElementsCommand['axis'], ids?: readonly ElementId[]): boolean;
|
|
113
|
+
queryAltText(id?: ElementId): ElementAltTextState | null;
|
|
114
|
+
setAltText(value: Pick<SetAltTextCommand, 'title' | 'descr'>, id?: ElementId): boolean;
|
|
115
|
+
listSections(): SectionRecord[];
|
|
116
|
+
addSection(value: Omit<AddSectionCommand, 'type'>): SectionRecord | null;
|
|
117
|
+
renameSection(id: SectionId, name: string): boolean;
|
|
118
|
+
moveSection(id: SectionId, after: SectionId | null): boolean;
|
|
119
|
+
removeSection(id: SectionId): boolean;
|
|
120
|
+
querySlideSize(): SlideSizeState;
|
|
121
|
+
setSlideSize(value: Pick<SetSlideSizeCommand, 'w' | 'h' | 'fit'>): boolean;
|
|
110
122
|
queryTransition(): SlideTransitionState | null;
|
|
111
123
|
setTransition(value: SlideTransitionInput | null): boolean;
|
|
112
124
|
previewTransition(value?: SlideTransitionInput): Promise<boolean>;
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import type { AddImageCommand, Editor, ElementId, SetBackgroundImageCommand, SlideId } from '@web-ppt/edit-core';
|
|
2
2
|
export interface ImageInsertOptions {
|
|
3
|
+
readonly signal?: AbortSignal;
|
|
3
4
|
readonly rect?: AddImageCommand['rect'];
|
|
4
5
|
/** 默认 5MB:留足默认 8MB 历史预算所需的 Base64 开销,保证插入后仍可撤销。 */
|
|
5
6
|
readonly maxBytes?: number;
|
|
6
7
|
}
|
|
7
8
|
export interface ImageReplaceOptions {
|
|
9
|
+
readonly signal?: AbortSignal;
|
|
8
10
|
/** 默认使用当前单选图片。 */
|
|
9
11
|
readonly id?: ElementId;
|
|
10
12
|
readonly maxBytes?: number;
|
|
11
13
|
}
|
|
12
14
|
export interface ImageBackgroundOptions {
|
|
15
|
+
readonly signal?: AbortSignal;
|
|
13
16
|
readonly crop?: SetBackgroundImageCommand['crop'];
|
|
14
17
|
readonly alpha?: SetBackgroundImageCommand['alpha'];
|
|
15
18
|
readonly tile?: SetBackgroundImageCommand['tile'];
|
|
@@ -30,7 +33,7 @@ export declare class ImageInsertionController {
|
|
|
30
33
|
private activeReads;
|
|
31
34
|
private destroyed;
|
|
32
35
|
constructor(options: ImageInsertionControllerOptions);
|
|
33
|
-
private
|
|
36
|
+
private applyImage;
|
|
34
37
|
insert(blob: Blob, options?: InternalImageInsertOptions): Promise<ElementId>;
|
|
35
38
|
replace(id: ElementId, blob: Blob, options?: ImageReplaceOptions): Promise<ElementId>;
|
|
36
39
|
choose(options?: InternalImageInsertOptions): Promise<ElementId | null>;
|
|
@@ -40,7 +43,6 @@ export declare class ImageInsertionController {
|
|
|
40
43
|
private chooseFile;
|
|
41
44
|
destroy(): void;
|
|
42
45
|
private setReading;
|
|
43
|
-
private report;
|
|
44
46
|
private assertContext;
|
|
45
47
|
}
|
|
46
48
|
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -7,8 +7,9 @@ export { createWebPptAdapter, } from './framework-adapter';
|
|
|
7
7
|
export { applyWebPptAdapterBinding } from './framework-adapter-binding';
|
|
8
8
|
export { WEB_PPT_IDLE_SNAPSHOT } from './framework-adapter-state';
|
|
9
9
|
export { ELEMENT_CLIPBOARD_MIME } from './element-clipboard';
|
|
10
|
-
export { elementFrameToSlideMatrix, elementFrameToSlidePoint, elementParentToSlideMatrix, elementParentToSlidePoint, invertSpaceMatrix, screenToSlidePoint, slideToElementFramePoint, slideToElementParentPoint, slideToScreenPoint, transformSpacePoint, queryElementCrop, queryElementEffects, queryElementFill, queryElementLink, queryElementStroke, queryRunLink, querySlideBackground, querySlideHidden, querySlideLayout, querySlideNotes, querySlideAnimations, querySlideTransition, ANIMATION_EFFECTS, MAX_ANIMATION_STEPS, animationDirections, animationEffectsForKind, SHAPE_PATTERN_PRESETS, SLIDE_TRANSITION_TYPES, transitionDirections, } from '@web-ppt/edit-core';
|
|
10
|
+
export { editFrameToModelFrame, elementEditFrame, elementEditParentToSlideMatrix, elementFrameToSlideMatrix, elementFrameToSlidePoint, elementParentToRenderedParentMatrix, elementParentToSlideMatrix, elementParentToSlidePoint, invertSpaceMatrix, renderedContentToSlideMatrix, renderedElement, renderedFrameToSlideMatrix, screenToSlidePoint, slideToElementEditParentPoint, slideToElementFramePoint, slideToElementParentPoint, slideToScreenPoint, transformSpacePoint, queryElementCrop, queryElementEffects, queryElementFill, queryElementLink, queryElementStroke, queryElementPresetGeometry, queryParaProps, queryRunLink, queryRunProps, queryTableGrid, querySlideBackground, querySlideHidden, querySlideLayout, querySlideNotes, listSections, queryElementAltText, querySlideAnimations, querySlideSize, querySlideTransition, sectionOfSlide, ANIMATION_EFFECTS, MAX_ANIMATION_STEPS, animationDirections, animationEffectsForKind, SHAPE_PATTERN_PRESETS, SLIDE_TRANSITION_TYPES, transitionDirections, listThemes, queryTheme, } from '@web-ppt/edit-core';
|
|
11
11
|
export type { EditorSession, OpenEditorOptions } from './session';
|
|
12
|
+
export type { DesignEditor, DesignEditorOptions } from './design-editor-types';
|
|
12
13
|
export type { FormatPainter, FormatPainterSnapshot, FormatPainterSource, FormatPainterStartOptions, FormatPainterSubscriber, FormatPainterTarget, } from './format-painter-types';
|
|
13
14
|
export type { TextSearch, TextSearchMode, TextSearchOpenOptions, TextSearchOptions, TextSearchSnapshot, TextSearchSubscriber, } from './text-search-types';
|
|
14
15
|
export type { SelectionPane, SelectionPaneOptions } from './selection-pane-types';
|
|
@@ -17,12 +18,12 @@ export type { EditorRecovery, RecoveryCandidate, RecoveryDecision, RecoveryDecis
|
|
|
17
18
|
export type { IndexedDbRecoveryStore, IndexedDbRecoveryStoreOptions, RecoveryCleanupResult, RecoveryStoreStats, } from './indexeddb-recovery-store';
|
|
18
19
|
export type { WebPptAdapter, WebPptAdapterBinding, WebPptAdapterCallbacks, WebPptAdapterProgress, WebPptAdapterSnapshot, WebPptAdapterSubscriber, WebPptDocument, WebPptDocumentKind, WebPptFormatPainterState, WebPptTextSearchState, WebPptViewOptions, WebPptViewState, } from './framework-adapter-types';
|
|
19
20
|
export type { WebPptSource } from './source-fingerprint';
|
|
20
|
-
export type { EditorMode, LinkFollowContext, LinkFollowHandler, LinkFollowSource, SlideEditor, SlideEditorOptions, } from './slide-editor-types';
|
|
21
|
+
export type { EditorContextRequest, EditorContextRequestHandler, EditorMode, LinkFollowContext, LinkFollowHandler, LinkFollowSource, SlideEditor, SlideEditorOptions, TouchNavigationChange, TouchNavigationHandler, } from './slide-editor-types';
|
|
21
22
|
export type { ImageInsertOptions } from './image-insertion';
|
|
22
23
|
export type { ImageBackgroundOptions, ImageReplaceOptions } from './image-insertion';
|
|
23
24
|
export type { TableInsertOptions } from './table-insertion';
|
|
24
|
-
export type { AddImageCommand, AddShapeCommand, AddTableCommand, EditAnimationStep, ElementClipboardPayload, ElementCropState, ElementEffectsState, ElementFillState, ElementLinkState, ElementStrokeState, ImageCrop, LinkOverride, LinkSourceValue, LinkTarget, ParagraphProperties, ParagraphPropertiesState, ParagraphPropertyOverrides, SlideAnimationState, SlideBackgroundState, SlideHiddenState, SlideLayoutState, RunLinkState, RunPropertiesState, RunPropertyOverrides, SlideNotesState, SlideTransitionInput, SlideTransitionState, TextBodyAutoFit, TextBodyProperties, TextBodyPropertyOverrides, ReplaceImageCommand, SetAnimationsCommand, SetBackgroundCommand, SetBackgroundCropCommand, SetBackgroundImageCommand, SetCropCommand, SetEffectsCommand, SetFillCommand, SetHiddenCommand, SetTransitionCommand, SetLayoutCommand, SetLinkCommand, SetStrokeCommand, StrokeCommandValue, VectorFill, FormatMaskField, } from '@web-ppt/edit-core';
|
|
25
|
+
export type { AddImageCommand, AddSectionCommand, AddShapeCommand, AddTableCommand, DistributeElementsCommand, EditAnimationStep, ElementAltTextState, ElementClipboardPayload, ElementCropState, ElementEffectsState, ElementFillState, ElementLinkState, ElementStrokeState, ImageCrop, LinkOverride, LinkSourceValue, LinkTarget, ParagraphAutoNumberType, ParagraphBullet, ParagraphBulletInput, ParagraphBulletSize, ParagraphBulletStyle, ParagraphProperties, ParagraphPropertiesState, ParagraphPropertyInput, ParagraphPropertyOverrides, SectionId, SectionRecord, SetAltTextCommand, SetSlideSizeCommand, SlideAnimationState, SlideBackgroundState, SlideHiddenState, SlideLayoutState, SlideSizeState, RunLinkState, RunPropertiesState, RunPropertyOverrides, SlideNotesState, SlideTransitionInput, SlideTransitionState, TextBodyAutoFit, TextBodyProperties, TextBodyPropertyOverrides, MoveSectionCommand, RemoveSectionCommand, RenameSectionCommand, ReplaceImageCommand, SetAnimationsCommand, SetBackgroundCommand, SetBackgroundCropCommand, SetBackgroundImageCommand, SetCropCommand, SetEffectsCommand, SetFillCommand, SetHiddenCommand, SetTransitionCommand, SetLayoutCommand, SetLinkCommand, SetStrokeCommand, StrokeCommandValue, VectorFill, FormatMaskField, SetThemeCommand, ThemeColorPatch, ThemeFontPatch, ThemePatch, ThemeState, DesignCommand, DesignTarget, LayoutCatalogItem, LayoutDesignState, LayoutPropertyPatch, MasterCatalogItem, MasterDesignState, MasterDesignTarget, MasterTextLevelState, SetMasterTextStyleCommand, } from '@web-ppt/edit-core';
|
|
25
26
|
export type { EditorChange, FindTextRequest, ReplaceTextCommand, ReplaceTextScope, SlideId, TextSearchMatch, TextSearchScope, TextSearchTarget, } from '@web-ppt/edit-core';
|
|
26
27
|
export type { SelectionPaneItem } from '@web-ppt/edit-core';
|
|
27
28
|
export type { SnapMargins } from './snap';
|
|
28
|
-
export type { AffineMatrix, SlideViewport, SpacePoint } from '@web-ppt/edit-core';
|
|
29
|
+
export type { AffineMatrix, ElementEditFrame, SlideViewport, SpacePoint } from '@web-ppt/edit-core';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@web-ppt/edit-core/media';
|
package/dist/media.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@web-ppt/edit-core/media";
|
|
@@ -5,5 +5,8 @@ export declare function pointerAngle(center: SpacePoint, pointer: SpacePoint): n
|
|
|
5
5
|
export declare function shortestRotationDelta(degrees: number): number;
|
|
6
6
|
export declare function constrainedRotation(degrees: number, shiftKey: boolean): number;
|
|
7
7
|
export declare function rotatePointAround(point: SpacePoint, center: SpacePoint, degrees: number): SpacePoint;
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* 多选中心在幻灯片空间刚性旋转;source 是编辑外框,父空间只含平移、旋转与翻转,
|
|
10
|
+
* 方向轴反解回父空间时只需处理翻转带来的手性。
|
|
11
|
+
*/
|
|
9
12
|
export declare function rotateElementAroundSlideCenter(doc: EditDoc, id: ElementId, source: TransformFrame, selectionCenter: SpacePoint, degrees: number): TransformFrame;
|
package/dist/selection-hit.d.ts
CHANGED
|
@@ -2,6 +2,12 @@ import type { EditDoc, ElementId, Selection, SlideId, TableCellAddress } from '@
|
|
|
2
2
|
export declare function tableCellAddressFromPath(path: EventTarget[], root: Element): TableCellAddress | null;
|
|
3
3
|
export declare function isSelectable(doc: EditDoc, id: ElementId): boolean;
|
|
4
4
|
export declare function selectableElementIdsFromPath(doc: EditDoc, path: EventTarget[], root: Element): ElementId[];
|
|
5
|
+
/** 触摸才按离落点由近到远采样;鼠标/笔仍完全服从浏览器的原生 SVG 命中。 */
|
|
6
|
+
export declare function touchHitCandidate(doc: EditDoc, document: Document, screen: {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
}, root: Element, enteredGroup: ElementId | null): ElementId | undefined;
|
|
10
|
+
export declare function pathWithinRoot(element: Element | null | undefined, root: Element): EventTarget[];
|
|
5
11
|
export declare function alternateSelectableElementId(doc: EditDoc, elements: readonly Element[], root: Element, enteredGroup: ElementId | null, selection: Selection, preferUnselected: boolean): ElementId | undefined;
|
|
6
12
|
export declare function directSelectableChildIds(doc: EditDoc, slideId: SlideId, enteredGroup: ElementId | null): ElementId[];
|
|
7
13
|
export declare function enteredGroupOnSlide(doc: EditDoc, enteredGroup: ElementId | null, slideId: SlideId): ElementId | null;
|
package/dist/session-state.d.ts
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
|
+
import { copyElements } from '@web-ppt/edit-core';
|
|
1
2
|
import type { Presentation } from '@web-ppt/core';
|
|
2
3
|
import type { EditorSession } from './session';
|
|
3
4
|
import type { SlideEditor } from './slide-editor-types';
|
|
4
5
|
import type { SelectionPane } from './selection-pane-types';
|
|
5
6
|
interface SessionState {
|
|
6
7
|
presentation: Presentation;
|
|
8
|
+
copy: typeof copyElements;
|
|
7
9
|
views: Set<SlideEditor>;
|
|
8
10
|
panes: Set<SelectionPane>;
|
|
9
11
|
textOwner: TextEditingOwner | null;
|
|
12
|
+
fontRefresh: Set<() => void>;
|
|
13
|
+
browserFontsReady?: boolean;
|
|
10
14
|
}
|
|
11
15
|
interface TextEditingOwner {
|
|
12
16
|
releaseTextEditing(): void;
|
|
13
17
|
}
|
|
14
|
-
export declare function registerSession(session: EditorSession, presentation: Presentation): void;
|
|
18
|
+
export declare function registerSession(session: EditorSession, presentation: Presentation, copy?: typeof copyElements): void;
|
|
15
19
|
export declare function sessionState(session: EditorSession): SessionState;
|
|
16
20
|
export declare function releaseSession(session: EditorSession): void;
|
|
17
21
|
/** contenteditable 是视图本地资源;同一会话只能有一个 DOM 所有者。 */
|
package/dist/session.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ParseOptions } from '@web-ppt/core';
|
|
1
|
+
import type { EmbeddedFont, ParseOptions, Presentation } from '@web-ppt/core';
|
|
2
2
|
import { Editor } from '@web-ppt/edit-core';
|
|
3
3
|
import type { CreateDocOptions, EditorOptions } from '@web-ppt/edit-core';
|
|
4
4
|
import type { SlideEditor, SlideEditorOptions } from './slide-editor-types';
|
|
@@ -7,6 +7,8 @@ import type { SelectionPane, SelectionPaneOptions } from './selection-pane-types
|
|
|
7
7
|
import type { FormatPainter } from './format-painter-types';
|
|
8
8
|
import type { TextSearch } from './text-search-types';
|
|
9
9
|
export interface OpenEditorOptions extends CreateDocOptions, EditorOptions {
|
|
10
|
+
/** 由宿主字体服务解码和安装时选 source;默认沿用 SDK 的直接预览行为。 */
|
|
11
|
+
embeddedFonts?: ParseOptions['embeddedFonts'];
|
|
10
12
|
password?: ParseOptions['password'];
|
|
11
13
|
recovery?: RecoveryOptions;
|
|
12
14
|
}
|
|
@@ -17,6 +19,20 @@ export interface EditorSession {
|
|
|
17
19
|
readonly formatPainter: FormatPainter;
|
|
18
20
|
readonly textSearch: TextSearch;
|
|
19
21
|
readonly disposed: boolean;
|
|
22
|
+
/** 原始字体容器由会话持有;使用前须检查许可与容器,关闭后 URL 失效。 */
|
|
23
|
+
readonly embeddedFontSources?: readonly Readonly<EmbeddedFont>[];
|
|
24
|
+
/**
|
|
25
|
+
* 取得当前编辑投影,供图片导出等只读能力直接消费。
|
|
26
|
+
* 资源 URL 仍由会话拥有,因此返回值只在会话释放前有效。
|
|
27
|
+
*/
|
|
28
|
+
toPresentation(): Presentation;
|
|
29
|
+
/**
|
|
30
|
+
* 仅更新预览/图片及 SVG 导出的字体资源,不写入 PPTX 或历史;URL 仍由调用者拥有。
|
|
31
|
+
* 宿主已安装并加载 FontFace 时设置 browserFontsReady,DOM 预览可复用它们。
|
|
32
|
+
*/
|
|
33
|
+
setFontResources(fonts: readonly EmbeddedFont[], options?: {
|
|
34
|
+
browserFontsReady?: boolean;
|
|
35
|
+
}): void;
|
|
20
36
|
mount(container: HTMLElement, options?: SlideEditorOptions): SlideEditor;
|
|
21
37
|
mountSelectionPane(container: HTMLElement, options?: SelectionPaneOptions): SelectionPane;
|
|
22
38
|
dispose(): void;
|
|
@@ -2,6 +2,7 @@ import type { Presentation } from '@web-ppt/core';
|
|
|
2
2
|
import type { Editor, EditorChange, ElementId, Selection, SlideId } from '@web-ppt/edit-core';
|
|
3
3
|
interface SlideDomRendererOptions {
|
|
4
4
|
presentation: Presentation;
|
|
5
|
+
browserFontsReady: () => boolean;
|
|
5
6
|
editor: Editor;
|
|
6
7
|
staticLayer: HTMLElement;
|
|
7
8
|
interactionLayer: SVGSVGElement;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EditAnimationStep, ElementId, ImageCrop, LinkTarget, ParagraphPropertiesState,
|
|
1
|
+
import type { AddSectionCommand, DistributeElementsCommand, EditAnimationStep, ElementAltTextState, ElementId, ImageCrop, LinkTarget, ParagraphPropertiesState, ParagraphPropertyInput, RunLinkState, RunPropertiesState, RunPropertyOverrides, SlideId, SlideLayoutState, SectionId, SectionRecord, SetAltTextCommand, SetSlideSizeCommand, SlideNotesState, SlideSizeState, TextBodyProperties, TextBodyPropertyOverrides, SlideAnimationState, SlideTransitionInput, SlideTransitionState } from '@web-ppt/edit-core';
|
|
2
2
|
import type { EditorSession } from './session';
|
|
3
3
|
import type { TextEditorController } from './text-editor';
|
|
4
4
|
import type { ImageInsertionController } from './image-insertion';
|
|
@@ -32,6 +32,7 @@ interface SlideEditorCommandsOptions {
|
|
|
32
32
|
/** 把公开工具栏动作收敛为薄能力层,视图本体只负责 DOM 与生命周期装配。 */
|
|
33
33
|
export declare class SlideEditorCommands {
|
|
34
34
|
private readonly options;
|
|
35
|
+
private readonly common;
|
|
35
36
|
constructor(options: SlideEditorCommandsOptions);
|
|
36
37
|
startFormatPainter(options: FormatPainterStartOptions): boolean;
|
|
37
38
|
cancelFormatPainter(): void;
|
|
@@ -47,10 +48,21 @@ export declare class SlideEditorCommands {
|
|
|
47
48
|
queryRunProps(): RunPropertiesState | null;
|
|
48
49
|
queryRunLink(): RunLinkState | null;
|
|
49
50
|
setRunProps(props: RunPropertyOverrides): boolean;
|
|
51
|
+
clearFormat(): boolean;
|
|
50
52
|
queryParaProps(): ParagraphPropertiesState | null;
|
|
51
|
-
setParaProps(props:
|
|
53
|
+
setParaProps(props: ParagraphPropertyInput): boolean;
|
|
52
54
|
queryBodyProps(): TextBodyProperties | null;
|
|
53
55
|
setBodyProps(props: TextBodyPropertyOverrides): boolean;
|
|
56
|
+
distributeElements(axis: DistributeElementsCommand['axis'], ids?: readonly ElementId[]): boolean;
|
|
57
|
+
queryAltText(id?: ElementId): ElementAltTextState | null;
|
|
58
|
+
setAltText(value: Pick<SetAltTextCommand, 'title' | 'descr'>, id?: ElementId): boolean;
|
|
59
|
+
listSections(): SectionRecord[];
|
|
60
|
+
addSection(value: Omit<AddSectionCommand, 'type'>): SectionRecord | null;
|
|
61
|
+
renameSection(id: SectionId, name: string): boolean;
|
|
62
|
+
moveSection(id: SectionId, after: SectionId | null): boolean;
|
|
63
|
+
removeSection(id: SectionId): boolean;
|
|
64
|
+
querySlideSize(): SlideSizeState;
|
|
65
|
+
setSlideSize(value: Pick<SetSlideSizeCommand, 'w' | 'h' | 'fit'>): boolean;
|
|
54
66
|
insertImage(file: Blob, options: ImageInsertOptions): Promise<ElementId>;
|
|
55
67
|
chooseImage(options: ImageInsertOptions): Promise<ElementId | null>;
|
|
56
68
|
replaceImage(file: Blob, options: ImageReplaceOptions): Promise<ElementId>;
|
|
@@ -3,6 +3,7 @@ interface SlideEditorEventHandlers {
|
|
|
3
3
|
pointermove: (event: PointerEvent) => void;
|
|
4
4
|
pointerup: (event: PointerEvent) => void;
|
|
5
5
|
pointercancel: (event: PointerEvent) => void;
|
|
6
|
+
click: (event: MouseEvent) => void;
|
|
6
7
|
dblclick: (event: MouseEvent) => void;
|
|
7
8
|
keydown: (event: KeyboardEvent) => void;
|
|
8
9
|
keyup: (event: KeyboardEvent) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EditAnimationStep, ElementId, ImageCrop, LinkTarget, ParagraphPropertiesState,
|
|
1
|
+
import type { AddSectionCommand, DistributeElementsCommand, EditAnimationStep, ElementAltTextState, ElementId, ImageCrop, LinkTarget, ParagraphPropertiesState, ParagraphPropertyInput, RunLinkState, RunPropertiesState, RunPropertyOverrides, SlideId, SlideLayoutState, TextBodyProperties, TextBodyPropertyOverrides, SectionId, SectionRecord, SetAltTextCommand, SetSlideSizeCommand, SlideNotesState, SlideSizeState, SlideAnimationState, SlideTransitionInput, SlideTransitionState, SlideViewport } from '@web-ppt/edit-core';
|
|
2
2
|
import type { ImageBackgroundOptions, ImageInsertOptions, ImageReplaceOptions } from './image-insertion';
|
|
3
3
|
import type { SnapMargins } from './snap';
|
|
4
4
|
import type { TableInsertOptions } from './table-insertion';
|
|
@@ -12,6 +12,20 @@ export interface LinkFollowContext {
|
|
|
12
12
|
}
|
|
13
13
|
/** 返回 true 表示宿主已经完成路由,编辑器不再执行默认跳转。 */
|
|
14
14
|
export type LinkFollowHandler = (target: LinkTarget, context: LinkFollowContext) => boolean | void;
|
|
15
|
+
export interface TouchNavigationChange {
|
|
16
|
+
readonly phase: 'start' | 'update' | 'end' | 'cancel';
|
|
17
|
+
/** 手势希望宿主呈现的舞台屏幕位置;left/top 可用于驱动外层滚动视口。 */
|
|
18
|
+
readonly viewport: SlideViewport;
|
|
19
|
+
readonly pointerCount: number;
|
|
20
|
+
}
|
|
21
|
+
export type TouchNavigationHandler = (change: TouchNavigationChange) => void;
|
|
22
|
+
export interface EditorContextRequest {
|
|
23
|
+
readonly source: 'touch';
|
|
24
|
+
readonly screen: import('@web-ppt/edit-core').SpacePoint;
|
|
25
|
+
readonly slide: import('@web-ppt/edit-core').SpacePoint;
|
|
26
|
+
readonly targetId: ElementId | null;
|
|
27
|
+
}
|
|
28
|
+
export type EditorContextRequestHandler = (request: EditorContextRequest) => void;
|
|
15
29
|
export interface SlideEditorOptions {
|
|
16
30
|
slideId?: SlideId;
|
|
17
31
|
mode?: EditorMode;
|
|
@@ -26,6 +40,10 @@ export interface SlideEditorOptions {
|
|
|
26
40
|
onLinkFollow?: LinkFollowHandler;
|
|
27
41
|
/** 页面级快捷键或内部链接切页后通知宿主同步侧栏、分页器和受控状态。 */
|
|
28
42
|
onSlideChange?: (slideId: SlideId) => void;
|
|
43
|
+
/** 双指缩放/平移结果;缩放已同步到本视图,left/top 交由宿主管理外层滚动。 */
|
|
44
|
+
onTouchNavigate?: TouchNavigationHandler;
|
|
45
|
+
/** 长按只提出上下文请求;菜单内容与呈现仍由宿主决定。 */
|
|
46
|
+
onContextRequest?: EditorContextRequestHandler;
|
|
29
47
|
/** 与自定义事件 webpptformaterror 同源,adapter 用它接入全局 onError。 */
|
|
30
48
|
onError?: (error: unknown) => void;
|
|
31
49
|
}
|
|
@@ -56,10 +74,25 @@ export interface SlideEditor {
|
|
|
56
74
|
queryRunProps(): RunPropertiesState | null;
|
|
57
75
|
queryRunLink(): RunLinkState | null;
|
|
58
76
|
setRunProps(props: RunPropertyOverrides): boolean;
|
|
77
|
+
/** 清除选区直设字符格式;折叠光标时作用于后续输入。 */
|
|
78
|
+
clearFormat(): boolean;
|
|
59
79
|
queryParaProps(): ParagraphPropertiesState | null;
|
|
60
|
-
setParaProps(props:
|
|
80
|
+
setParaProps(props: ParagraphPropertyInput): boolean;
|
|
61
81
|
queryBodyProps(): TextBodyProperties | null;
|
|
62
82
|
setBodyProps(props: TextBodyPropertyOverrides): boolean;
|
|
83
|
+
/** 省略 ids 时使用当前多元素选区;查看模式不改模型。 */
|
|
84
|
+
distributeElements(axis: DistributeElementsCommand['axis'], ids?: readonly ElementId[]): boolean;
|
|
85
|
+
/** 省略 id 时使用当前单元素选区。 */
|
|
86
|
+
queryAltText(id?: ElementId): ElementAltTextState | null;
|
|
87
|
+
setAltText(value: Pick<SetAltTextCommand, 'title' | 'descr'>, id?: ElementId): boolean;
|
|
88
|
+
listSections(): SectionRecord[];
|
|
89
|
+
addSection(value: Omit<AddSectionCommand, 'type'>): SectionRecord | null;
|
|
90
|
+
renameSection(id: SectionId, name: string): boolean;
|
|
91
|
+
moveSection(id: SectionId, after: SectionId | null): boolean;
|
|
92
|
+
removeSection(id: SectionId): boolean;
|
|
93
|
+
querySlideSize(): SlideSizeState;
|
|
94
|
+
/** v1 仅改变画布,即 PowerPoint“最大化”语义。 */
|
|
95
|
+
setSlideSize(value: Pick<SetSlideSizeCommand, 'w' | 'h' | 'fit'>): boolean;
|
|
63
96
|
insertImage(file: Blob, options?: ImageInsertOptions): Promise<ElementId>;
|
|
64
97
|
chooseImage(options?: ImageInsertOptions): Promise<ElementId | null>;
|
|
65
98
|
replaceImage(file: Blob, options?: ImageReplaceOptions): Promise<ElementId>;
|
|
@@ -7,6 +7,7 @@ import type { RotationGestureController } from './rotation-gesture';
|
|
|
7
7
|
import type { TextEditorController } from './text-editor';
|
|
8
8
|
import type { ImageCropGestureController } from './image-crop-gesture';
|
|
9
9
|
import type { FormatPainterTarget } from './format-painter-types';
|
|
10
|
+
import type { TouchGestureController } from './touch-gesture';
|
|
10
11
|
interface SlidePointerControllerOptions {
|
|
11
12
|
readonly editor: Editor;
|
|
12
13
|
readonly root: HTMLElement;
|
|
@@ -19,6 +20,7 @@ interface SlidePointerControllerOptions {
|
|
|
19
20
|
readonly resize: ResizeGestureController;
|
|
20
21
|
readonly rotation: RotationGestureController;
|
|
21
22
|
readonly crop: ImageCropGestureController;
|
|
23
|
+
readonly touch: TouchGestureController;
|
|
22
24
|
editable(): boolean;
|
|
23
25
|
slideId(): SlideId;
|
|
24
26
|
hitCandidates(path: EventTarget[]): ElementId[];
|
|
@@ -38,6 +40,7 @@ export declare class SlidePointerController {
|
|
|
38
40
|
readonly move: (event: PointerEvent) => void;
|
|
39
41
|
readonly up: (event: PointerEvent) => void;
|
|
40
42
|
readonly cancel: (event: PointerEvent) => void;
|
|
43
|
+
readonly click: (event: MouseEvent) => void;
|
|
41
44
|
readonly doubleClick: (event: MouseEvent) => void;
|
|
42
45
|
}
|
|
43
46
|
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Editor, RunPropertyOverrides, TextEditOp, TextPosition } from '@web-ppt/edit-core';
|
|
2
|
+
import type { ActiveText } from './text-editor-types';
|
|
3
|
+
export interface PendingTextFormat {
|
|
4
|
+
readonly props: RunPropertyOverrides;
|
|
5
|
+
readonly clearSource: boolean;
|
|
6
|
+
}
|
|
7
|
+
/** 先按 flat mark 身份预测插入范围,再把输入、清除与待输入格式合成一个历史事务。 */
|
|
8
|
+
export declare function commitTextInput(editor: Editor, active: ActiveText, ops: readonly TextEditOp[], nextIndex: number, label: string, insertedFrom: number | null, pending: PendingTextFormat): TextPosition | null;
|
package/dist/text-editor.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EditorChange, ElementId, ParagraphPropertiesState,
|
|
1
|
+
import type { EditorChange, ElementId, ParagraphPropertiesState, ParagraphPropertyInput, RunLinkState, RunPropertiesState, RunPropertyOverrides, TableCellAddress } from '@web-ppt/edit-core';
|
|
2
2
|
import type { TextEditorControllerOptions } from './text-editor-types';
|
|
3
3
|
export declare class TextEditorController {
|
|
4
4
|
private readonly options;
|
|
@@ -9,8 +9,9 @@ export declare class TextEditorController {
|
|
|
9
9
|
private activeCell;
|
|
10
10
|
private root;
|
|
11
11
|
private composing;
|
|
12
|
+
private fontsPending;
|
|
12
13
|
private composition;
|
|
13
|
-
private
|
|
14
|
+
private pendingFormat;
|
|
14
15
|
private staticStale;
|
|
15
16
|
private readonly hidden;
|
|
16
17
|
private readonly externalUi;
|
|
@@ -23,8 +24,9 @@ export declare class TextEditorController {
|
|
|
23
24
|
queryRunProps(): RunPropertiesState | null;
|
|
24
25
|
queryRunLink(): RunLinkState | null;
|
|
25
26
|
queryParaProps(): ParagraphPropertiesState | null;
|
|
26
|
-
setParaProps(props:
|
|
27
|
+
setParaProps(props: ParagraphPropertyInput): boolean;
|
|
27
28
|
setRunProps(props: RunPropertyOverrides): boolean;
|
|
29
|
+
clearFormat(): boolean;
|
|
28
30
|
owns(target: EventTarget | null): boolean;
|
|
29
31
|
enter(id: ElementId): boolean;
|
|
30
32
|
enterCell(id: ElementId, cell: TableCellAddress): boolean;
|
|
@@ -33,6 +35,7 @@ export declare class TextEditorController {
|
|
|
33
35
|
close(selectElement?: boolean): void;
|
|
34
36
|
update(change: EditorChange): void;
|
|
35
37
|
refreshStatic(): void;
|
|
38
|
+
refreshFonts(): void;
|
|
36
39
|
destroy(): void;
|
|
37
40
|
private textContext;
|
|
38
41
|
private activeText;
|
|
@@ -47,6 +50,7 @@ export declare class TextEditorController {
|
|
|
47
50
|
private formatSelection;
|
|
48
51
|
private setSelection;
|
|
49
52
|
private setCaret;
|
|
53
|
+
private resetPendingFormat;
|
|
50
54
|
private hideStaticText;
|
|
51
55
|
private restoreStaticText;
|
|
52
56
|
}
|
package/dist/text-keyboard.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Editor,
|
|
1
|
+
import type { Editor, ParagraphPropertyInput, TableCellAddress, TextPosition } from '@web-ppt/edit-core';
|
|
2
2
|
import type { TextEditorContext } from './text-editor-context';
|
|
3
3
|
interface TextKeyboardOptions {
|
|
4
4
|
editor: Editor;
|
|
@@ -10,7 +10,7 @@ interface TextKeyboardOptions {
|
|
|
10
10
|
changeListLevel(delta: -1 | 1): void;
|
|
11
11
|
formatSelection(field: 'b' | 'i' | 'u'): boolean;
|
|
12
12
|
stepFontSize(direction: -1 | 1): boolean;
|
|
13
|
-
setParaProps(props:
|
|
13
|
+
setParaProps(props: ParagraphPropertyInput): boolean;
|
|
14
14
|
restoreSelection(from: TextPosition, to: TextPosition): void;
|
|
15
15
|
selectAllElements(): void;
|
|
16
16
|
documentKeyDown(event: KeyboardEvent): boolean;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { ElementId } from '@web-ppt/edit-core';
|
|
2
|
+
import type { EditorContextRequest, TouchNavigationChange } from './slide-editor-types';
|
|
3
|
+
interface TouchGestureOptions {
|
|
4
|
+
readonly root: HTMLElement;
|
|
5
|
+
readonly stage: HTMLElement;
|
|
6
|
+
zoom(): number;
|
|
7
|
+
cancelObjectGestures(): void;
|
|
8
|
+
applyZoom(zoom: number): void;
|
|
9
|
+
navigate(change: TouchNavigationChange): void;
|
|
10
|
+
context(request: EditorContextRequest): void;
|
|
11
|
+
}
|
|
12
|
+
/** 只管理视图局部触屏导航;模型、历史与宿主滚动位置都不进入这里。 */
|
|
13
|
+
export declare class TouchGestureController {
|
|
14
|
+
private readonly options;
|
|
15
|
+
private readonly pointers;
|
|
16
|
+
private navigation;
|
|
17
|
+
private longPress;
|
|
18
|
+
private suppressedClick;
|
|
19
|
+
constructor(options: TouchGestureOptions);
|
|
20
|
+
get isActive(): boolean;
|
|
21
|
+
down(event: PointerEvent): boolean;
|
|
22
|
+
move(event: PointerEvent): boolean;
|
|
23
|
+
up(event: PointerEvent): boolean;
|
|
24
|
+
cancelPointer(event: PointerEvent): boolean;
|
|
25
|
+
cancel(): void;
|
|
26
|
+
armLongPress(event: PointerEvent, targetId: ElementId | null): void;
|
|
27
|
+
readonly click: (event: MouseEvent) => void;
|
|
28
|
+
private currentViewport;
|
|
29
|
+
private points;
|
|
30
|
+
private base;
|
|
31
|
+
private rebase;
|
|
32
|
+
private nextViewport;
|
|
33
|
+
private scheduleFrame;
|
|
34
|
+
private flushFrame;
|
|
35
|
+
private updateFrame;
|
|
36
|
+
private emit;
|
|
37
|
+
private capture;
|
|
38
|
+
private fireLongPress;
|
|
39
|
+
private clearLongPress;
|
|
40
|
+
private clearNavigation;
|
|
41
|
+
}
|
|
42
|
+
export {};
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
import type { AffineMatrix, EditDoc,
|
|
1
|
+
import type { AffineMatrix, EditDoc, Editor, ElementEditFrame, ElementId, SpacePoint } from '@web-ppt/edit-core';
|
|
2
2
|
export declare const MIN_FRAME_SIZE: number;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
/** 预览 wrapper 位于元素父空间;矩阵把旧渲染框直接映射到新框,不触碰静态 markup。 */
|
|
3
|
+
/** 手势中的外框一律是编辑外框:父组渲染坐标里的刚体外框(见 edit-core elementEditFrame)。 */
|
|
4
|
+
export type TransformFrame = ElementEditFrame;
|
|
5
|
+
/** 预览 wrapper 位于父组渲染坐标;矩阵把旧编辑外框直接映射到新外框,不触碰静态 markup。 */
|
|
8
6
|
export declare function transformPreviewMatrix(source: TransformFrame, next: TransformFrame): AffineMatrix;
|
|
7
|
+
type XfrmField = 'x' | 'y' | 'w' | 'h' | 'rot';
|
|
8
|
+
/**
|
|
9
|
+
* 编辑外框换算回模型后要写入的 SetXfrm 字段:always 里的字段照写,其余字段只在与模型原值
|
|
10
|
+
* 相差至少 1e-9 时写入。渲染外框往返模型会带入舍入误差,不能因此产生无意义的补丁。
|
|
11
|
+
*/
|
|
12
|
+
export declare function modelXfrmFields(editor: Pick<Editor, 'doc' | 'effectiveElement'>, id: ElementId, frame: TransformFrame, always: readonly XfrmField[]): Partial<Record<XfrmField, number>>;
|
|
9
13
|
export declare function transformFrameCorners(doc: EditDoc, id: ElementId, frame: TransformFrame): [
|
|
10
14
|
SpacePoint,
|
|
11
15
|
SpacePoint,
|
|
12
16
|
SpacePoint,
|
|
13
17
|
SpacePoint
|
|
14
18
|
];
|
|
19
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@web-ppt/editor",
|
|
3
|
-
"version": "0.5.0-beta.
|
|
3
|
+
"version": "0.5.0-beta.7",
|
|
4
4
|
"description": "Framework-agnostic browser editing session and DOM view for Web-PPT.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pptx",
|
|
@@ -34,7 +34,39 @@
|
|
|
34
34
|
"types": "./dist/vertex/index.d.ts",
|
|
35
35
|
"import": "./dist/vertex.js"
|
|
36
36
|
},
|
|
37
|
-
"./
|
|
37
|
+
"./adjustments": {
|
|
38
|
+
"types": "./dist/adjustments/index.d.ts",
|
|
39
|
+
"import": "./dist/adjustments.js"
|
|
40
|
+
},
|
|
41
|
+
"./design": {
|
|
42
|
+
"types": "./dist/design/index.d.ts",
|
|
43
|
+
"import": "./dist/design.js"
|
|
44
|
+
},
|
|
45
|
+
"./templates": {
|
|
46
|
+
"types": "./dist/templates/index.d.ts",
|
|
47
|
+
"import": "./dist/templates.js"
|
|
48
|
+
},
|
|
49
|
+
"./chart": {
|
|
50
|
+
"types": "./dist/chart/index.d.ts",
|
|
51
|
+
"import": "./dist/chart.js"
|
|
52
|
+
},
|
|
53
|
+
"./chart-shared": {
|
|
54
|
+
"types": "./dist/chart-shared/index.d.ts",
|
|
55
|
+
"import": "./dist/chart-shared.js"
|
|
56
|
+
},
|
|
57
|
+
"./media": {
|
|
58
|
+
"types": "./dist/media/index.d.ts",
|
|
59
|
+
"import": "./dist/media.js"
|
|
60
|
+
},
|
|
61
|
+
"./package.json": "./package.json",
|
|
62
|
+
"./accessibility": {
|
|
63
|
+
"types": "./dist/canvas-accessibility.d.ts",
|
|
64
|
+
"import": "./dist/accessibility.js"
|
|
65
|
+
},
|
|
66
|
+
"./edit-context": {
|
|
67
|
+
"types": "./dist/edit-context/index.d.ts",
|
|
68
|
+
"import": "./dist/edit-context.js"
|
|
69
|
+
}
|
|
38
70
|
},
|
|
39
71
|
"files": [
|
|
40
72
|
"dist",
|
|
@@ -43,14 +75,14 @@
|
|
|
43
75
|
"LICENSE"
|
|
44
76
|
],
|
|
45
77
|
"scripts": {
|
|
46
|
-
"build": "vite build && node ../../tooling/check-editor-main-size.mjs && vite build --config vite.vertex.config.ts && tsc -p tsconfig.build.json",
|
|
78
|
+
"build": "vite build && node ../../tooling/check-editor-main-size.mjs && vite build --config vite.vertex.config.ts && vite build --config vite.adjustments.config.ts && vite build --config vite.design.config.ts && 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.browser-features.config.ts && tsc -p tsconfig.build.json",
|
|
47
79
|
"prepublishOnly": "npm run build",
|
|
48
80
|
"prepack": "node ../../tooling/sync-package-docs.mjs"
|
|
49
81
|
},
|
|
50
82
|
"peerDependencies": {
|
|
51
|
-
"@web-ppt/core": "^0.5.0-beta.
|
|
52
|
-
"@web-ppt/edit-core": "^0.5.0-beta.
|
|
53
|
-
"@web-ppt/viewer-core": "^0.5.0-beta.
|
|
83
|
+
"@web-ppt/core": "^0.5.0-beta.7",
|
|
84
|
+
"@web-ppt/edit-core": "^0.5.0-beta.7",
|
|
85
|
+
"@web-ppt/viewer-core": "^0.5.0-beta.7"
|
|
54
86
|
},
|
|
55
87
|
"publishConfig": {
|
|
56
88
|
"access": "public"
|