pptx-svelte-viewer 2.17.9 → 2.19.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 +4 -0
- package/dist/{AiChatPanel-L5y0kiDu.js → AiChatPanel-DKeBilcx.js} +40 -40
- package/dist/{export-57mdVQIa.js → export-CZzvhGTm.js} +67407 -60108
- package/dist/i18n.js +1 -1
- package/dist/index.d.ts +599 -30
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +34 -27
- package/dist/pptx-svelte-viewer.css +1 -1
- package/dist/{translator-CZy5sxU0.js → translator-EP8BTIz6.js} +44 -4
- package/dist/viewer/components/chart-drag.svelte.d.ts +39 -0
- package/dist/viewer/components/chart-drag.svelte.d.ts.map +1 -0
- package/dist/viewer/components/props-editing.d.ts +15 -1
- package/dist/viewer/components/props-editing.d.ts.map +1 -1
- package/dist/viewer/components/props-elements.d.ts +8 -1
- package/dist/viewer/components/props-elements.d.ts.map +1 -1
- package/dist/viewer/components/props-stage.d.ts +5 -1
- package/dist/viewer/components/props-stage.d.ts.map +1 -1
- package/dist/viewer/components/ribbon/transitions/transition-presets.d.ts +13 -6
- package/dist/viewer/components/ribbon/transitions/transition-presets.d.ts.map +1 -1
- package/dist/viewer/components/viewer-body-commits.d.ts +12 -0
- package/dist/viewer/components/viewer-body-commits.d.ts.map +1 -1
- package/dist/viewer/editor/context-menu-dispatch.d.ts.map +1 -1
- package/dist/viewer/editor/editing-api.d.ts.map +1 -1
- package/dist/viewer/editor/editor-adjust-gesture.d.ts +21 -0
- package/dist/viewer/editor/editor-adjust-gesture.d.ts.map +1 -0
- package/dist/viewer/editor/editor-arrange-ops.d.ts.map +1 -1
- package/dist/viewer/editor/editor-controller-deps.d.ts +5 -0
- package/dist/viewer/editor/editor-controller-deps.d.ts.map +1 -1
- package/dist/viewer/editor/editor-controller-wiring.d.ts +21 -0
- package/dist/viewer/editor/editor-controller-wiring.d.ts.map +1 -1
- package/dist/viewer/editor/editor-controller.svelte.d.ts +20 -1
- package/dist/viewer/editor/editor-controller.svelte.d.ts.map +1 -1
- package/dist/viewer/editor/editor-document-lifecycle.d.ts.map +1 -1
- package/dist/viewer/editor/editor-document-state.d.ts +21 -3
- package/dist/viewer/editor/editor-document-state.d.ts.map +1 -1
- package/dist/viewer/editor/editor-handle-handlers.d.ts +42 -0
- package/dist/viewer/editor/editor-handle-handlers.d.ts.map +1 -0
- package/dist/viewer/editor/editor-keyboard.d.ts +7 -0
- package/dist/viewer/editor/editor-keyboard.d.ts.map +1 -1
- package/dist/viewer/editor/editor-master-controller.d.ts +2 -0
- package/dist/viewer/editor/editor-master-controller.d.ts.map +1 -1
- package/dist/viewer/editor/editor-presentation-metadata.svelte.d.ts +11 -0
- package/dist/viewer/editor/editor-presentation-metadata.svelte.d.ts.map +1 -1
- package/dist/viewer/editor/editor-selection-gestures.d.ts +8 -1
- package/dist/viewer/editor/editor-selection-gestures.d.ts.map +1 -1
- package/dist/viewer/editor/editor-selection-interactivity.d.ts +48 -0
- package/dist/viewer/editor/editor-selection-interactivity.d.ts.map +1 -0
- package/dist/viewer/editor/editor-slides-controller.d.ts +8 -1
- package/dist/viewer/editor/editor-slides-controller.d.ts.map +1 -1
- package/dist/viewer/editor/editor-state.svelte.d.ts +80 -2
- package/dist/viewer/editor/editor-state.svelte.d.ts.map +1 -1
- package/dist/viewer/editor/editor-transition-controller.d.ts +12 -0
- package/dist/viewer/editor/editor-transition-controller.d.ts.map +1 -1
- package/dist/viewer/editor/index.d.ts +9 -0
- package/dist/viewer/editor/index.d.ts.map +1 -1
- package/dist/viewer/editor/inline-text.d.ts.map +1 -1
- package/dist/viewer/editor/table-cell-pointer.d.ts +29 -0
- package/dist/viewer/editor/table-cell-pointer.d.ts.map +1 -0
- package/dist/viewer/editor/table-cell-selection.svelte.d.ts +51 -0
- package/dist/viewer/editor/table-cell-selection.svelte.d.ts.map +1 -0
- package/dist/viewer/index.d.ts +939 -30
- package/dist/viewer/index.js +16 -16
- package/dist/viewer/master/master-view.d.ts +8 -1
- package/dist/viewer/master/master-view.d.ts.map +1 -1
- package/dist/viewer/render/contentpart-view.d.ts +8 -21
- package/dist/viewer/render/contentpart-view.d.ts.map +1 -1
- package/dist/viewer/render/index.d.ts +2 -2
- package/dist/viewer/render/index.d.ts.map +1 -1
- package/dist/viewer/render/smartart-view.d.ts +6 -5
- package/dist/viewer/render/smartart-view.d.ts.map +1 -1
- package/dist/viewer/render/table-view.d.ts +6 -0
- package/dist/viewer/render/table-view.d.ts.map +1 -1
- package/dist/viewer/state/autosave.svelte.d.ts +9 -0
- package/dist/viewer/state/autosave.svelte.d.ts.map +1 -1
- package/dist/viewer/state/create-viewer-state-collab.svelte.d.ts.map +1 -1
- package/dist/viewer/state/create-viewer-state-editor-ui.svelte.d.ts.map +1 -1
- package/dist/viewer/state/create-viewer-state-presentation.svelte.d.ts.map +1 -1
- package/dist/viewer/state/create-viewer-state.svelte.d.ts.map +1 -1
- package/dist/viewer/state/index.d.ts +2 -0
- package/dist/viewer/state/index.d.ts.map +1 -1
- package/dist/viewer/state/inspector-deck.d.ts +10 -2
- package/dist/viewer/state/inspector-deck.d.ts.map +1 -1
- package/dist/viewer/state/presentation-loader.svelte.d.ts +12 -1
- package/dist/viewer/state/presentation-loader.svelte.d.ts.map +1 -1
- package/dist/viewer/state/table-cell-selection-context.d.ts +20 -0
- package/dist/viewer/state/table-cell-selection-context.d.ts.map +1 -0
- package/dist/viewer/state/viewer-effects.svelte.d.ts +2 -1
- package/dist/viewer/state/viewer-effects.svelte.d.ts.map +1 -1
- package/dist/viewer/state/viewport-handlers.d.ts +2 -0
- package/dist/viewer/state/viewport-handlers.d.ts.map +1 -1
- package/dist/viewer/style/element-style.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -33,6 +33,13 @@ export interface EditorKeyboardDeps {
|
|
|
33
33
|
toggleShortcuts?(): void;
|
|
34
34
|
/** Close the cheat sheet on Escape; true when it was open (Escape consumed). */
|
|
35
35
|
closeShortcuts?(): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Open or close the find bar (Ctrl/Cmd+F). Optional so a host driving this
|
|
38
|
+
* handler without find chrome still compiles; when it is missing the chord
|
|
39
|
+
* falls through to the browser, which is what this binding did before the
|
|
40
|
+
* shortcut reached the shared keymap.
|
|
41
|
+
*/
|
|
42
|
+
toggleFind?(): void;
|
|
36
43
|
}
|
|
37
44
|
export declare function createEditorKeydownHandler(deps: EditorKeyboardDeps): (event: KeyboardEvent) => void;
|
|
38
45
|
//# sourceMappingURL=editor-keyboard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-keyboard.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-keyboard.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,MAAM,WAAW,kBAAkB;IAClC,4EAA4E;IAC5E,QAAQ,IAAI,OAAO,CAAC;IACpB,aAAa,IAAI,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,IAAI,IAAI,CAAC;IACjB,cAAc,IAAI,IAAI,CAAC;IACvB,iBAAiB,IAAI,IAAI,CAAC;IAC1B,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5C,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,IAAI,CAAC;IACb,YAAY,IAAI,IAAI,CAAC;IACrB,WAAW,IAAI,IAAI,CAAC;IACpB,KAAK,IAAI,IAAI,CAAC;IACd,qEAAqE;IACrE,SAAS,IAAI,IAAI,CAAC;IAClB,iEAAiE;IACjE,aAAa,IAAI,IAAI,CAAC;IACtB,iDAAiD;IACjD,eAAe,IAAI,IAAI,CAAC;IACxB,mBAAmB,CAAC,IAAI,OAAO,CAAC;IAChC,4DAA4D;IAC5D,eAAe,CAAC,IAAI,IAAI,CAAC;IACzB,gFAAgF;IAChF,cAAc,CAAC,IAAI,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"editor-keyboard.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-keyboard.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,MAAM,WAAW,kBAAkB;IAClC,4EAA4E;IAC5E,QAAQ,IAAI,OAAO,CAAC;IACpB,aAAa,IAAI,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,IAAI,IAAI,CAAC;IACjB,cAAc,IAAI,IAAI,CAAC;IACvB,iBAAiB,IAAI,IAAI,CAAC;IAC1B,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5C,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,IAAI,CAAC;IACb,YAAY,IAAI,IAAI,CAAC;IACrB,WAAW,IAAI,IAAI,CAAC;IACpB,KAAK,IAAI,IAAI,CAAC;IACd,qEAAqE;IACrE,SAAS,IAAI,IAAI,CAAC;IAClB,iEAAiE;IACjE,aAAa,IAAI,IAAI,CAAC;IACtB,iDAAiD;IACjD,eAAe,IAAI,IAAI,CAAC;IACxB,mBAAmB,CAAC,IAAI,OAAO,CAAC;IAChC,4DAA4D;IAC5D,eAAe,CAAC,IAAI,IAAI,CAAC;IACzB,gFAAgF;IAChF,cAAc,CAAC,IAAI,OAAO,CAAC;IAC3B;;;;;OAKG;IACH,UAAU,CAAC,IAAI,IAAI,CAAC;CACpB;AAED,wBAAgB,0BAA0B,CACzC,IAAI,EAAE,kBAAkB,GACtB,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAmEhC"}
|
|
@@ -12,6 +12,8 @@ export declare class EditorMasterController {
|
|
|
12
12
|
enter(masterIndex?: number, layoutIndex?: number | null): void;
|
|
13
13
|
enterTab(tab: MasterViewTab): void;
|
|
14
14
|
exit(): void;
|
|
15
|
+
/** The document shape the shared master-view rules operate on. */
|
|
16
|
+
private document;
|
|
15
17
|
activeElements(): PptxElement[] | null;
|
|
16
18
|
replace(elements: PptxElement[]): boolean;
|
|
17
19
|
cloneMasters(): PptxSlideMaster[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-master-controller.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-master-controller.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"editor-master-controller.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-master-controller.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,MAAM,kBAAkB,CAAC;AAI1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,MAAM,WAAW,gBAAgB;IAChC,GAAG,EAAE,aAAa,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,4EAA4E;AAC5E,qBAAa,sBAAsB;IACtB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,WAAW;IAEhD,KAAK,CAAC,WAAW,SAAI,EAAE,WAAW,GAAE,MAAM,GAAG,IAAW,GAAG,IAAI;IAM/D,QAAQ,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI;IAWlC,IAAI,IAAI,IAAI;IAMZ,kEAAkE;IAClE,OAAO,CAAC,QAAQ;IAQhB,cAAc,IAAI,WAAW,EAAE,GAAG,IAAI;IAKtC,OAAO,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,OAAO;IAwBzC,YAAY,IAAI,eAAe,EAAE;IAIjC,gBAAgB,IAAI,eAAe,GAAG,SAAS;IAI/C,kBAAkB,IAAI,iBAAiB,GAAG,SAAS;IAInD,uBAAuB,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI;IASpD,kBAAkB,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI;CA4BjD"}
|
|
@@ -11,6 +11,17 @@ export declare class EditorPresentationMetadata {
|
|
|
11
11
|
presentationProperties: PptxPresentationProperties;
|
|
12
12
|
customShows: PptxCustomShow[];
|
|
13
13
|
constructor(host: PresentationMetadataHost);
|
|
14
|
+
/**
|
|
15
|
+
* Deep-copy a value that may be a rune PROXY.
|
|
16
|
+
*
|
|
17
|
+
* The dialogs build their edits in `$state`, so what reaches these setters is
|
|
18
|
+
* a reactive proxy, and `structuredClone` throws `DataCloneError` on one. The
|
|
19
|
+
* Header & Footer panel hit exactly that: "Apply to All" threw before it ever
|
|
20
|
+
* assigned, so setting a footer silently did nothing and the canvas kept the
|
|
21
|
+
* string the deck was loaded with. `$state.snapshot` is a pass-through for a
|
|
22
|
+
* plain object, so this is safe for every caller.
|
|
23
|
+
*/
|
|
24
|
+
private static clone;
|
|
14
25
|
set(headerFooter?: PptxHeaderFooter, presentationProperties?: PptxPresentationProperties, customShows?: PptxCustomShow[]): void;
|
|
15
26
|
updatePresentationProperties(next: PptxPresentationProperties): void;
|
|
16
27
|
updateHeaderFooter(next: PptxHeaderFooter): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-presentation-metadata.svelte.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-presentation-metadata.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,cAAc,EACd,gBAAgB,EAChB,0BAA0B,EAC1B,MAAM,kBAAkB,CAAC;AAE1B,MAAM,WAAW,wBAAwB;IACxC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,WAAW,IAAI,IAAI,CAAC;IACpB,YAAY,IAAI,IAAI,CAAC;CACrB;AAED,0EAA0E;AAC1E,qBAAa,0BAA0B;IAK1B,OAAO,CAAC,QAAQ,CAAC,IAAI;IAJjC,YAAY,mBAAoC;IAChD,sBAAsB,6BAA8C;IACpE,WAAW,mBAAoC;gBAElB,IAAI,EAAE,wBAAwB;IAE3D,GAAG,CACF,YAAY,GAAE,gBAAqB,EACnC,sBAAsB,GAAE,0BAA+B,EACvD,WAAW,GAAE,cAAc,EAAO,GAChC,IAAI;IAMP,4BAA4B,CAAC,IAAI,EAAE,0BAA0B,GAAG,IAAI;IAIpE,kBAAkB,CAAC,IAAI,EAAE,gBAAgB,GAAG,IAAI;IAIhD,iBAAiB,CAAC,IAAI,EAAE,cAAc,EAAE,GAAG,IAAI;IAI/C,OAAO,CAAC,MAAM;CAQd"}
|
|
1
|
+
{"version":3,"file":"editor-presentation-metadata.svelte.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-presentation-metadata.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,cAAc,EACd,gBAAgB,EAChB,0BAA0B,EAC1B,MAAM,kBAAkB,CAAC;AAE1B,MAAM,WAAW,wBAAwB;IACxC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,WAAW,IAAI,IAAI,CAAC;IACpB,YAAY,IAAI,IAAI,CAAC;CACrB;AAED,0EAA0E;AAC1E,qBAAa,0BAA0B;IAK1B,OAAO,CAAC,QAAQ,CAAC,IAAI;IAJjC,YAAY,mBAAoC;IAChD,sBAAsB,6BAA8C;IACpE,WAAW,mBAAoC;gBAElB,IAAI,EAAE,wBAAwB;IAE3D;;;;;;;;;OASG;IACH,OAAO,CAAC,MAAM,CAAC,KAAK;IAIpB,GAAG,CACF,YAAY,GAAE,gBAAqB,EACnC,sBAAsB,GAAE,0BAA+B,EACvD,WAAW,GAAE,cAAc,EAAO,GAChC,IAAI;IAMP,4BAA4B,CAAC,IAAI,EAAE,0BAA0B,GAAG,IAAI;IAIpE,kBAAkB,CAAC,IAAI,EAAE,gBAAgB,GAAG,IAAI;IAIhD,iBAAiB,CAAC,IAAI,EAAE,cAAc,EAAE,GAAG,IAAI;IAI/C,OAAO,CAAC,MAAM;CAQd"}
|
|
@@ -9,9 +9,16 @@ export interface SelectionGestureDeps {
|
|
|
9
9
|
getStageRect(): DOMRect | undefined;
|
|
10
10
|
getElements(): readonly PptxElement[];
|
|
11
11
|
getSelectedIds(): readonly string[];
|
|
12
|
+
/**
|
|
13
|
+
* The selected ids a collective `interaction` may actually act on, with the
|
|
14
|
+
* locked members already dropped. Optional: without it the whole selection
|
|
15
|
+
* transforms, which is the pre-lock behaviour.
|
|
16
|
+
*/
|
|
17
|
+
getTransformIds?(interaction: 'move' | 'resize'): readonly string[];
|
|
12
18
|
onStart(): void;
|
|
13
19
|
onPatch(id: string, patch: ElementBoxPatch): void;
|
|
14
|
-
|
|
20
|
+
/** `movedIds` are the elements this gesture actually patched. */
|
|
21
|
+
onCommit(movedIds: readonly string[]): void;
|
|
15
22
|
onSelect(ids: readonly string[]): void;
|
|
16
23
|
onMarquee(rect: EditorMarqueeRect | null): void;
|
|
17
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-selection-gestures.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-selection-gestures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AASpD,OAAO,KAAK,EAAkB,WAAW,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEtF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IACrD,QAAQ,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,oBAAoB;IACpC,QAAQ,IAAI,MAAM,CAAC;IACnB,YAAY,IAAI,OAAO,GAAG,SAAS,CAAC;IACpC,WAAW,IAAI,SAAS,WAAW,EAAE,CAAC;IACtC,cAAc,IAAI,SAAS,MAAM,EAAE,CAAC;IACpC,OAAO,IAAI,IAAI,CAAC;IAChB,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,GAAG,IAAI,CAAC;IAClD,QAAQ,
|
|
1
|
+
{"version":3,"file":"editor-selection-gestures.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-selection-gestures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AASpD,OAAO,KAAK,EAAkB,WAAW,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEtF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IACrD,QAAQ,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,oBAAoB;IACpC,QAAQ,IAAI,MAAM,CAAC;IACnB,YAAY,IAAI,OAAO,GAAG,SAAS,CAAC;IACpC,WAAW,IAAI,SAAS,WAAW,EAAE,CAAC;IACtC,cAAc,IAAI,SAAS,MAAM,EAAE,CAAC;IACpC;;;;OAIG;IACH,eAAe,CAAC,CAAC,WAAW,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,MAAM,EAAE,CAAC;IACpE,OAAO,IAAI,IAAI,CAAC;IAChB,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,GAAG,IAAI,CAAC;IAClD,iEAAiE;IACjE,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAAC;IAC5C,QAAQ,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAAC;IACvC,SAAS,CAAC,IAAI,EAAE,iBAAiB,GAAG,IAAI,GAAG,IAAI,CAAC;CAChD;AAiBD,iFAAiF;AACjF,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,oBAAoB;wBA2FrD,YAAY,GAAG,IAAI;yBAalB,MAAM,GAAG,QAAQ,SAAS,YAAY,WAAW,cAAc,GAAG,OAAO;eAyBnF,IAAI;EAKhB"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { PptxElement } from 'pptx-viewer-core';
|
|
2
|
+
import { ShapeAdjustmentHandleDescriptor } from 'pptx-viewer-shared';
|
|
3
|
+
/**
|
|
4
|
+
* What the selection overlay is allowed to offer, given the authored
|
|
5
|
+
* `a:spLocks` on the selected element(s).
|
|
6
|
+
*
|
|
7
|
+
* The lock composition itself is NOT decided here: `canInteractWithElement` in
|
|
8
|
+
* `pptx-viewer-shared` is the one decision function all five bindings consult,
|
|
9
|
+
* and this module only folds its per-element verdict into the collective one an
|
|
10
|
+
* overlay drawn around N elements needs. Keeping it in a plain `.ts` module
|
|
11
|
+
* (rather than inside `EditorController` or the overlay SFC) keeps both of
|
|
12
|
+
* those within the repo's file-size budget and makes the rule unit-testable
|
|
13
|
+
* without a component mount.
|
|
14
|
+
*
|
|
15
|
+
* @module editor/editor-selection-interactivity
|
|
16
|
+
*/
|
|
17
|
+
/** The chrome the overlay may draw for the current selection. */
|
|
18
|
+
export interface SelectionInteractivity {
|
|
19
|
+
/** Draw (and honour) the eight resize handles. */
|
|
20
|
+
resizable: boolean;
|
|
21
|
+
/** Draw (and honour) the rotate stem + knob. */
|
|
22
|
+
rotatable: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* The amber adjustment diamonds, one per `a:avLst` guide. Empty when there
|
|
25
|
+
* is none to draw; PowerPoint shows several on most presets (`quadArrow`
|
|
26
|
+
* three, `callout3` four), and offering only the first left the rest
|
|
27
|
+
* unreachable.
|
|
28
|
+
*/
|
|
29
|
+
adjust: ShapeAdjustmentHandleDescriptor[];
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* What an unlocked, non-adjustable selection resolves to. The overlay's prop
|
|
33
|
+
* default, so a caller that does not pass a verdict gets the pre-lock chrome.
|
|
34
|
+
*/
|
|
35
|
+
export declare const DEFAULT_SELECTION_INTERACTIVITY: SelectionInteractivity;
|
|
36
|
+
/**
|
|
37
|
+
* The collective verdict for `elements`.
|
|
38
|
+
*
|
|
39
|
+
* A collective box takes the STRICTEST member: one pinned shape in a
|
|
40
|
+
* rubber-banded pair is enough to withdraw the resize handles, because a
|
|
41
|
+
* collective resize would otherwise silently skip it and distort the group.
|
|
42
|
+
* The adjustment diamond belongs to a single shape's own `a:avLst`, so it is
|
|
43
|
+
* only ever offered for a selection of one.
|
|
44
|
+
*/
|
|
45
|
+
export declare function selectionInteractivity(elements: readonly PptxElement[]): SelectionInteractivity;
|
|
46
|
+
/** May a pointer-down on `element` arm a move gesture? */
|
|
47
|
+
export declare function canMoveElement(element: PptxElement | undefined): boolean;
|
|
48
|
+
//# sourceMappingURL=editor-selection-interactivity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-selection-interactivity.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-selection-interactivity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAC;AAG1E;;;;;;;;;;;;;GAaG;AAEH,iEAAiE;AACjE,MAAM,WAAW,sBAAsB;IACtC,kDAAkD;IAClD,SAAS,EAAE,OAAO,CAAC;IACnB,gDAAgD;IAChD,SAAS,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,MAAM,EAAE,+BAA+B,EAAE,CAAC;CAC1C;AAKD;;;GAGG;AACH,eAAO,MAAM,+BAA+B,EAAE,sBAI7C,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,SAAS,WAAW,EAAE,GAAG,sBAAsB,CAS/F;AAED,0DAA0D;AAC1D,wBAAgB,cAAc,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS,GAAG,OAAO,CAExE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PptxLayoutOption } from 'pptx-viewer-core';
|
|
1
|
+
import { PptxLayoutOption, PptxLayoutPreview } from 'pptx-viewer-core';
|
|
2
2
|
import { SlideTemplateBuildOptions, SlideTemplateId } from 'pptx-viewer-shared';
|
|
3
3
|
import { EditorState } from './editor-state.svelte';
|
|
4
4
|
/**
|
|
@@ -33,6 +33,13 @@ export declare class EditorSlidesController {
|
|
|
33
33
|
* deck is loaded. Backs the Home tab's Layout dropdown (React parity).
|
|
34
34
|
*/
|
|
35
35
|
availableLayouts(): Promise<PptxLayoutOption[]>;
|
|
36
|
+
/**
|
|
37
|
+
* Artwork thumbnails for the New Slide / Layout galleries, keyed by path.
|
|
38
|
+
*
|
|
39
|
+
* A method rather than state: parsing every layout part is only worth doing
|
|
40
|
+
* once a gallery is opened, and core memoises the result.
|
|
41
|
+
*/
|
|
42
|
+
layoutPreviews(): Promise<ReadonlyMap<string, PptxLayoutPreview>>;
|
|
36
43
|
/** Re-map the current slide onto `layoutPath`. Returns its index, or null when not editable. */
|
|
37
44
|
applyLayout(layoutPath: string): Promise<number | null>;
|
|
38
45
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-slides-controller.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-slides-controller.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"editor-slides-controller.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-slides-controller.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE5E,OAAO,KAAK,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AASrF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;;;;;;GAOG;AACH,qBAAa,sBAAsB;;gBAGtB,MAAM,EAAE,WAAW;IAI/B,oGAAoG;IACpG,uBAAuB,IAAI,MAAM,GAAG,IAAI;IAYxC;;;;;;;OAOG;IACH,uBAAuB,CACtB,UAAU,EAAE,eAAe,EAC3B,OAAO,GAAE,yBAA8B,GACrC,MAAM,GAAG,IAAI;IAchB,qFAAqF;IACrF,qBAAqB,IAAI,MAAM,GAAG,IAAI;IAkBtC,mGAAmG;IACnG,kBAAkB,IAAI,MAAM,GAAG,IAAI;IAiBnC;;;;OAIG;IACG,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAQrD;;;;;OAKG;IACG,cAAc,IAAI,OAAO,CAAC,WAAW,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IASvE,gGAAgG;IAC1F,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAyB7D;;;;OAIG;IACG,UAAU,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAQ1C,uFAAuF;IACvF,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;CAY5D"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PptxAppProperties, PptxCoreProperties, PptxCustomProperty, PptxElement, PptxHandoutMaster, PptxHeaderFooter, PptxHandler, PptxNotesMaster, PptxSaveFormat, PptxSection, PptxSlide, PptxSlideMaster, PptxPresentationProperties, PptxCustomShow, PptxTagCollection, TextSegment } from 'pptx-viewer-core';
|
|
2
|
-
import { ElementClipboardPayload, TemplateElementMap } from 'pptx-viewer-shared';
|
|
1
|
+
import { PptxAppProperties, PptxCoreProperties, PptxCustomProperty, PptxElement, PptxHandoutMaster, PptxHeaderFooter, PptxHandler, PptxNotesMaster, PptxSaveFormat, PptxSection, PptxSlide, PptxSlideMaster, PptxSlideSize, PptxTheme, PptxPresentationProperties, PptxCustomShow, PptxTagCollection, TextSegment } from 'pptx-viewer-core';
|
|
2
|
+
import { DeckSaveIntent, ElementClipboardPayload, FontEmbeddingDescriptor, TemplateElementMap } from 'pptx-viewer-shared';
|
|
3
3
|
import { EditorAnimationController } from './editor-animation-controller';
|
|
4
4
|
import { EditorArrangeController } from './editor-arrange-controller';
|
|
5
5
|
import { EditorBackgroundController } from './editor-background-controller';
|
|
@@ -20,9 +20,17 @@ import { EditorSlidesController } from './editor-slides-controller';
|
|
|
20
20
|
import { EditorTemplateController } from './editor-template-controller';
|
|
21
21
|
import { EditorTransitionController } from './editor-transition-controller';
|
|
22
22
|
import { ZOrderDirection } from './editor-zorder';
|
|
23
|
+
import { TableCellSelection } from './table-cell-selection.svelte';
|
|
23
24
|
export interface EditorStateDeps {
|
|
24
25
|
getCurrent(): number;
|
|
25
26
|
getHandler(): PptxHandler | null;
|
|
27
|
+
/**
|
|
28
|
+
* The `p:sldSz` a save should write, resolved from the viewer's EMU slide
|
|
29
|
+
* size and its pixel canvas by the shared `resolveSlideSizeSelection`.
|
|
30
|
+
* Optional so out-of-tree mounts (and the unit tests) can omit it, in which
|
|
31
|
+
* case core re-emits the load-time dimensions verbatim.
|
|
32
|
+
*/
|
|
33
|
+
getSlideSize?: () => PptxSlideSize | undefined;
|
|
26
34
|
onChange?: () => void;
|
|
27
35
|
}
|
|
28
36
|
export declare class EditorState {
|
|
@@ -43,13 +51,52 @@ export declare class EditorState {
|
|
|
43
51
|
* carried through the undo snapshot and re-emitted on save.
|
|
44
52
|
*/
|
|
45
53
|
tagCollections: PptxTagCollection[];
|
|
54
|
+
/**
|
|
55
|
+
* The deck's active theme, kept here so the Home tab's font dropdown can
|
|
56
|
+
* lead with the theme fonts. Set by the viewer once a deck is loaded;
|
|
57
|
+
* deliberately outside {@link EditorSnapshot} because it is not content the
|
|
58
|
+
* undo stack owns.
|
|
59
|
+
*/
|
|
60
|
+
theme: PptxTheme | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Families the deck embeds, offered as their own font-dropdown group. Write
|
|
63
|
+
* through {@link adoptEmbeddedFontFamilies} so {@link embedFonts} is reseeded
|
|
64
|
+
* with them.
|
|
65
|
+
*/
|
|
66
|
+
embeddedFontFamilies: readonly string[];
|
|
67
|
+
/**
|
|
68
|
+
* File > Fonts > "Embed fonts in the file". Session state like
|
|
69
|
+
* {@link savePassword}, not document content, so undo never restores it.
|
|
70
|
+
* Seeded from the loaded deck (see {@link adoptEmbeddedFontFamilies}): a deck
|
|
71
|
+
* that arrived with embedded fonts keeps them on save, so the switch has to
|
|
72
|
+
* start "on" or turning it off would be the only way to describe what save
|
|
73
|
+
* already does. Read by `saveEditorDocument`.
|
|
74
|
+
*/
|
|
75
|
+
embedFonts: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Families the user registered from a local font file this session
|
|
78
|
+
* (File > Options > Fonts, off by default). Session state, never persisted:
|
|
79
|
+
* the font binary is the user's, not ours to store.
|
|
80
|
+
*/
|
|
81
|
+
customFontFamilies: readonly string[];
|
|
46
82
|
masterViewTarget: MasterViewTarget | null;
|
|
47
83
|
readonly selection: EditorSelection;
|
|
84
|
+
/** The block of table cells marquee'd inside the selected table, if any. */
|
|
85
|
+
readonly tableCells: TableCellSelection;
|
|
48
86
|
editable: boolean;
|
|
49
87
|
dirty: boolean;
|
|
50
88
|
editTemplateMode: boolean;
|
|
51
89
|
interactionActive: boolean;
|
|
52
90
|
clipboard: ElementClipboardPayload | null;
|
|
91
|
+
/**
|
|
92
|
+
* File ▸ Info ▸ Protect Presentation state. Deliberately NOT part of
|
|
93
|
+
* {@link EditorSnapshot}: the secret is session state, not document content,
|
|
94
|
+
* so undo must never restore or clear it. {@link saveIntent} feeds it to the
|
|
95
|
+
* shared `planDeckSave`, which routes a protected save through
|
|
96
|
+
* `saveEncrypted` (an OLE2 container) instead of `save` (a plain ZIP).
|
|
97
|
+
*/
|
|
98
|
+
passwordProtected: boolean;
|
|
99
|
+
savePassword: string | null;
|
|
53
100
|
/** Undo/redo stack; the `canUndo` / `canRedo` getters below mirror it. */
|
|
54
101
|
readonly history: EditorHistoryState;
|
|
55
102
|
readonly clipboardOps: EditorClipboardController;
|
|
@@ -81,12 +128,28 @@ export declare class EditorState {
|
|
|
81
128
|
/** The loaded core handler, or null before a deck is open. Used by the
|
|
82
129
|
* Slides group for layout switching (`applyLayoutToSlide`). */
|
|
83
130
|
getHandler(): PptxHandler | null;
|
|
131
|
+
/**
|
|
132
|
+
* The `p:sldSz` the next save should write, or undefined to leave the
|
|
133
|
+
* load-time dimensions alone. Slide size lives on the loader (it is not
|
|
134
|
+
* content the undo stack owns), so it reaches the save through this dep the
|
|
135
|
+
* same way the handler does.
|
|
136
|
+
*/
|
|
137
|
+
getSlideSize(): PptxSlideSize | undefined;
|
|
84
138
|
/** Adopt a freshly loaded deck as the working document (see `loadEditorDocument`). */
|
|
85
139
|
setSlides(...args: LoadDocumentArgs): void;
|
|
86
140
|
/** Adopt a remote (collaboration) snapshot; see `applyRemoteEditorSlides`. */
|
|
87
141
|
applyRemoteSlides(slides: PptxSlide[]): void;
|
|
88
142
|
reset(): void;
|
|
89
143
|
select(id: string | null): void;
|
|
144
|
+
/** The element with `id` on the surface the pointer acts on, or undefined. */
|
|
145
|
+
elementById(id: string): PptxElement | undefined;
|
|
146
|
+
/**
|
|
147
|
+
* May the pointer act on `id` at all? Two gates, both of which must pass:
|
|
148
|
+
* the template rule (an inherited master/layout node is inert unless
|
|
149
|
+
* edit-template mode is on) and the element's own authored `a:spLocks`. The
|
|
150
|
+
* lock half was missing entirely, which is why a `noSelect` shape from a
|
|
151
|
+
* real deck was as selectable and draggable as any other.
|
|
152
|
+
*/
|
|
90
153
|
isElementInteractive(id: string): boolean;
|
|
91
154
|
setTemplateEditing(enabled: boolean): void;
|
|
92
155
|
/** Apply the File > Options "maximum number of undos" value. */
|
|
@@ -107,6 +170,21 @@ export declare class EditorState {
|
|
|
107
170
|
commitSlides(next: PptxSlide[]): void;
|
|
108
171
|
/** A deep clone of the whole editable document (one undo entry, or save input). */
|
|
109
172
|
snapshot(): EditorSnapshot;
|
|
173
|
+
/**
|
|
174
|
+
* Adopt the families a freshly loaded deck embeds, and reseed
|
|
175
|
+
* {@link embedFonts} to the position that describes the file save would write
|
|
176
|
+
* right now. Deliberately not an undo step: the parsed font list is not a
|
|
177
|
+
* user edit.
|
|
178
|
+
*/
|
|
179
|
+
adoptEmbeddedFontFamilies(families: readonly string[]): void;
|
|
180
|
+
/** How File > Fonts should render its toggle for the loaded deck. */
|
|
181
|
+
get fontEmbedding(): FontEmbeddingDescriptor;
|
|
182
|
+
/** The Protect-Presentation state every save path hands to `planDeckSave`. */
|
|
183
|
+
saveIntent(): DeckSaveIntent;
|
|
184
|
+
/** File ▸ Info ▸ Protect Presentation: arm password encryption for saves. */
|
|
185
|
+
setSavePassword(password: string): void;
|
|
186
|
+
/** File ▸ Info ▸ Protect Presentation: back to saving in the clear. */
|
|
187
|
+
clearSavePassword(): void;
|
|
110
188
|
deleteSelected: () => void;
|
|
111
189
|
duplicateSelected: () => string | null;
|
|
112
190
|
applyElementPatch: (id: string, patch: Partial<PptxElement>) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-state.svelte.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-state.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,eAAe,EACf,cAAc,EACd,WAAW,EACX,SAAS,EACT,eAAe,EACf,0BAA0B,EAC1B,cAAc,EACd,iBAAiB,EACjB,WAAW,EACX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"editor-state.svelte.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-state.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,eAAe,EACf,cAAc,EACd,WAAW,EACX,SAAS,EACT,eAAe,EACf,aAAa,EACb,SAAS,EACT,0BAA0B,EAC1B,cAAc,EACd,iBAAiB,EACjB,WAAW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gBAAgB,GAAI,IAAI,MAAM,EAAE,MAAM,MAAM,KAAG,IAAI,CAA+C;IAClG,WAAW,GAAI,OAAO,MAAM,EAAE,gBAAgB,WAAW,EAAE,KAAG,IAAI,CACf;IAEnD,wBAAwB,CACvB,IAAI,EAAE,kBAAkB,EACxB,GAAG,EAAE,iBAAiB,EACtB,MAAM,EAAE,kBAAkB,EAAE,GAC1B,IAAI;IAIP;;;;OAIG;IACH,mBAAmB,CAAC,IAAI,EAAE,SAAS,iBAAiB,EAAE,GAAG,IAAI;IAI7D,iFAAiF;IACjF,oBAAoB,CAAC,IAAI,EAAE,SAAS,iBAAiB,EAAE,GAAG,IAAI;IAI9D,IAAI,IAAI,IAAI;IAIZ,IAAI,IAAI,IAAI;IAIZ,IAAI,CAAC,MAAM,GAAE,cAAuB,GAAG,OAAO,CAAC,UAAU,CAAC;CAG1D"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PptxTransitionType } from 'pptx-viewer-core';
|
|
2
|
+
import { RibbonTransitionDraft } from 'pptx-viewer-shared';
|
|
2
3
|
import { EditorState } from './editor-state.svelte';
|
|
3
4
|
/**
|
|
4
5
|
* Slide-transition actions for the ribbon's Transitions tab, split out of
|
|
@@ -18,5 +19,16 @@ export declare class EditorTransitionController {
|
|
|
18
19
|
#private;
|
|
19
20
|
constructor(editor: EditorState);
|
|
20
21
|
applyTransition(type: PptxTransitionType, durationMs: number, applyToAll: boolean): void;
|
|
22
|
+
/**
|
|
23
|
+
* Commit the Transitions tab's whole draft (preset + duration + the Advance
|
|
24
|
+
* Slide modifiers) in one undoable step.
|
|
25
|
+
*
|
|
26
|
+
* The draft, and what it means for a slide's `p:transition`, is decided in
|
|
27
|
+
* `pptx-viewer-shared` (`ribbon-transitions`) so every binding writes the
|
|
28
|
+
* same fields; this only routes the result through `commitSlides`. Unlike
|
|
29
|
+
* `applyTransition`'s apply-to-all, the draft is MERGED onto each target so a
|
|
30
|
+
* slide keeps its authored direction / spokes / sound.
|
|
31
|
+
*/
|
|
32
|
+
applyRibbonDraft(draft: RibbonTransitionDraft, applyToAll: boolean): void;
|
|
21
33
|
}
|
|
22
34
|
//# sourceMappingURL=editor-transition-controller.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-transition-controller.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-transition-controller.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAuB,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"editor-transition-controller.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-transition-controller.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAuB,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAIhE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;;;;;;;;;;;;GAaG;AACH,qBAAa,0BAA0B;;gBAG1B,MAAM,EAAE,WAAW;IAI/B,eAAe,CAAC,IAAI,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,GAAG,IAAI;IAqBxF;;;;;;;;;OASG;IACH,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,EAAE,UAAU,EAAE,OAAO,GAAG,IAAI;CAqBzE"}
|
|
@@ -41,6 +41,15 @@ export { cloneSlides, duplicateElementOnSlide, findSlideElement, mapSlideElement
|
|
|
41
41
|
export type { ZOrderDirection } from './editor-zorder';
|
|
42
42
|
export { reorderElement } from './editor-zorder';
|
|
43
43
|
export { resolveEditTargetElementId, resolveTopLevelElementId } from './element-hit';
|
|
44
|
+
export type { AdjustGestureController, AdjustGestureDeps } from './editor-adjust-gesture';
|
|
45
|
+
export { createAdjustGestureController, withShapeAdjustments } from './editor-adjust-gesture';
|
|
46
|
+
export type { HandleGestureHost, HandleHandlers } from './editor-handle-handlers';
|
|
47
|
+
export { createHandleHandlers } from './editor-handle-handlers';
|
|
48
|
+
export type { SelectionInteractivity } from './editor-selection-interactivity';
|
|
49
|
+
export { canMoveElement, DEFAULT_SELECTION_INTERACTIVITY, selectionInteractivity, } from './editor-selection-interactivity';
|
|
50
|
+
export type { TableCellPoint } from './table-cell-selection.svelte';
|
|
51
|
+
export { TableCellSelection } from './table-cell-selection.svelte';
|
|
52
|
+
export { applyTableCellPointer } from './table-cell-pointer';
|
|
44
53
|
export type { InlineTextSurface } from './inline-text';
|
|
45
54
|
export { canInlineEditElement, readEditableText, remapInlineText, resolveInlineSurface, } from './inline-text';
|
|
46
55
|
export type { OverlayBox } from './types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,YAAY,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EACN,oBAAoB,EACpB,yBAAyB,EACzB,mBAAmB,EACnB,oBAAoB,EACpB,cAAc,GACd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AACnF,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,YAAY,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE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AY,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EACN,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,oBAAoB,GACpB,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inline-text.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/inline-text.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAa,MAAM,kBAAkB,CAAC;AAI5E;;;;;;;GAOG;AAEH;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"inline-text.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/inline-text.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAa,MAAM,kBAAkB,CAAC;AAI5E;;;;;;;GAOG;AAEH;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS,GAAG,OAAO,CAS9E;AAED,yEAAyE;AACzE,wBAAgB,eAAe,CAC9B,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,MAAM,GACV;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,WAAW,EAAE,CAAA;CAAE,CAK/C;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,CAwB1D;AAED,uEAAuE;AACvE,MAAM,WAAW,iBAAiB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B;AAED,2EAA2E;AAC3E,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,WAAW,GAAG,iBAAiB,CAO5E"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { EditorState } from './editor-state.svelte';
|
|
2
|
+
/**
|
|
3
|
+
* What a stage pointer-down means for the table cell range.
|
|
4
|
+
*
|
|
5
|
+
* Lives beside the selection model rather than inside `TableView.svelte` so the
|
|
6
|
+
* SFC stays presentation-only (it renders the highlight, it does not decide it)
|
|
7
|
+
* and so the rule is unit-testable without mounting a component. The cell
|
|
8
|
+
* coordinates are read back off the `data-cell-row` / `data-cell-col`
|
|
9
|
+
* attributes `TableView` already stamps, which is also how the context menu
|
|
10
|
+
* finds its target: merge-absorbed cells are not rendered, so a cell's DOM
|
|
11
|
+
* position is not its model position and the attributes are the only truth.
|
|
12
|
+
*
|
|
13
|
+
* The RULE itself (extend / anchor / clear) is `tableCellPointerIntent` in
|
|
14
|
+
* `pptx-viewer-shared`; this module only supplies the facts and applies the
|
|
15
|
+
* verdict to the Svelte editor state. Vue was missing the same rule entirely,
|
|
16
|
+
* which is why block merge was unreachable there.
|
|
17
|
+
*
|
|
18
|
+
* @module editor/table-cell-pointer
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* Fold a pointer-down over `elementId` into the cell range.
|
|
22
|
+
*
|
|
23
|
+
* Returns true when the event was CONSUMED, i.e. a Shift-click that stretched
|
|
24
|
+
* an existing range. The caller must then stop: letting it fall through would
|
|
25
|
+
* hit the stage's Shift branch and toggle the table out of the element
|
|
26
|
+
* selection, which is the opposite of extending a range inside it.
|
|
27
|
+
*/
|
|
28
|
+
export declare function applyTableCellPointer(editor: EditorState, elementId: string, target: EventTarget | null, shiftKey: boolean): boolean;
|
|
29
|
+
//# sourceMappingURL=table-cell-pointer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-cell-pointer.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/table-cell-pointer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACpC,MAAM,EAAE,WAAW,EACnB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,WAAW,GAAG,IAAI,EAC1B,QAAQ,EAAE,OAAO,GACf,OAAO,CAsBT"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { PptxTableData } from 'pptx-viewer-core';
|
|
2
|
+
import { CellCoord, CellRect } from 'pptx-viewer-shared';
|
|
3
|
+
/**
|
|
4
|
+
* The block of table cells the user has marquee'd on the canvas.
|
|
5
|
+
*
|
|
6
|
+
* Svelte shipped without this model at all: `context-menu-dispatch` hard-coded
|
|
7
|
+
* `hasMultiCellSelection: false`, so PowerPoint's "Merge Cells" could never be
|
|
8
|
+
* offered and a user could only ever merge one cell rightwards or downwards.
|
|
9
|
+
*
|
|
10
|
+
* None of the rectangle math lives here. `computeSelectionRect` in
|
|
11
|
+
* `pptx-viewer-shared` owns it, and it is merge-AWARE: dragging across a cell
|
|
12
|
+
* that already spans expands the rectangle to cover the whole span, so the
|
|
13
|
+
* highlighted block is always a real rectangle in model coordinates. (The
|
|
14
|
+
* vanilla binding carries a private `rectangle()` helper that ignores spans;
|
|
15
|
+
* that is a bug, not a second model, and is deliberately not copied.)
|
|
16
|
+
*
|
|
17
|
+
* @module editor/table-cell-selection
|
|
18
|
+
*/
|
|
19
|
+
/** A click on a `<td>`, in model (unmerged) coordinates. */
|
|
20
|
+
export interface TableCellPoint {
|
|
21
|
+
rowIndex: number;
|
|
22
|
+
columnIndex: number;
|
|
23
|
+
}
|
|
24
|
+
export declare class TableCellSelection {
|
|
25
|
+
/** The table element the range belongs to, or null when there is none. */
|
|
26
|
+
elementId: string | null;
|
|
27
|
+
/** Where the range started (the un-shifted click). */
|
|
28
|
+
anchor: CellCoord | null;
|
|
29
|
+
/** The current rectangle, already expanded over any merged cells it meets. */
|
|
30
|
+
rect: CellRect | null;
|
|
31
|
+
/** Every cell in the current range, row-major. Empty when there is none. */
|
|
32
|
+
get cells(): CellCoord[];
|
|
33
|
+
/** True once the range covers a block, i.e. once merging becomes possible. */
|
|
34
|
+
get hasBlock(): boolean;
|
|
35
|
+
/** The range on `elementId`, or an empty array when it belongs elsewhere. */
|
|
36
|
+
cellsFor(elementId: string | null | undefined): CellCoord[];
|
|
37
|
+
/** Is this cell of this element inside the highlighted block? */
|
|
38
|
+
contains(elementId: string, row: number, col: number): boolean;
|
|
39
|
+
/** A plain click: the range collapses to the clicked cell, which anchors it. */
|
|
40
|
+
begin(elementId: string, cell: TableCellPoint, tableData: PptxTableData): void;
|
|
41
|
+
/**
|
|
42
|
+
* A Shift-click: stretch anchor -> cell into a rectangle. Falls back to
|
|
43
|
+
* anchoring when there is no anchor yet (or it belongs to another table), so
|
|
44
|
+
* a Shift-click is never a no-op.
|
|
45
|
+
*/
|
|
46
|
+
extend(elementId: string, cell: TableCellPoint, tableData: PptxTableData): void;
|
|
47
|
+
clear(): void;
|
|
48
|
+
/** Drop the range when the element selection has moved off its table. */
|
|
49
|
+
syncElement(selectedElementId: string | null): void;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=table-cell-selection.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-cell-selection.svelte.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/table-cell-selection.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAG9D;;;;;;;;;;;;;;;GAeG;AAEH,4DAA4D;AAC5D,MAAM,WAAW,cAAc;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,kBAAkB;IAC9B,0EAA0E;IAC1E,SAAS,gBAA+B;IACxC,sDAAsD;IACtD,MAAM,mBAAsC;IAC5C,8EAA8E;IAC9E,IAAI,kBAAqC;IAEzC,4EAA4E;IAC5E,IAAI,KAAK,IAAI,SAAS,EAAE,CAEvB;IAED,8EAA8E;IAC9E,IAAI,QAAQ,IAAI,OAAO,CAGtB;IAED,6EAA6E;IAC7E,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,SAAS,EAAE;IAI3D,iEAAiE;IACjE,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO;IAI9D,gFAAgF;IAChF,KAAK,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,SAAS,EAAE,aAAa,GAAG,IAAI;IAY9E;;;;OAIG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,SAAS,EAAE,aAAa,GAAG,IAAI;IAgB/E,KAAK,IAAI,IAAI;IAMb,yEAAyE;IACzE,WAAW,CAAC,iBAAiB,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;CAKnD"}
|