pptx-svelte-viewer 1.3.0 → 2.0.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 +446 -0
- package/README.md +175 -17
- package/dist/AiChatPanel-CssmoLYL.js +1110 -0
- package/dist/__vite-browser-external-DOmiXdGM.js +7 -0
- package/dist/{dist-JuzVOe21.js → dist-AHWCPEmj.js} +44997 -40276
- package/dist/export-DplwT6FC.js +96087 -0
- package/dist/i18n.d.ts +9 -7
- package/dist/i18n.js +1 -1
- package/dist/index.d.ts +6102 -4099
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -22
- package/dist/pptx-svelte-viewer.css +1 -1
- package/dist/rolldown-runtime--_vEcKDh.js +29 -0
- package/dist/{translator-D4a_pxY4.js → translator-Ddi-liGk.js} +251 -7
- package/dist/viewer/ai/ai-bridge.d.ts +61 -0
- package/dist/viewer/ai/ai-bridge.d.ts.map +1 -0
- package/dist/viewer/ai/ai-history-persist.d.ts +13 -0
- package/dist/viewer/ai/ai-history-persist.d.ts.map +1 -0
- package/dist/viewer/ai/ai-log-export.d.ts +71 -0
- package/dist/viewer/ai/ai-log-export.d.ts.map +1 -0
- package/dist/viewer/ai/ai-panel-controller.svelte.d.ts +77 -0
- package/dist/viewer/ai/ai-panel-controller.svelte.d.ts.map +1 -0
- package/dist/viewer/ai/chat.svelte.d.ts +43 -0
- package/dist/viewer/ai/chat.svelte.d.ts.map +1 -0
- package/dist/viewer/ai/focus-targets.d.ts +36 -0
- package/dist/viewer/ai/focus-targets.d.ts.map +1 -0
- package/dist/viewer/ai/index.d.ts +11 -0
- package/dist/viewer/ai/index.d.ts.map +1 -0
- package/dist/viewer/collab/collaboration-deps.d.ts +23 -0
- package/dist/viewer/collab/collaboration-deps.d.ts.map +1 -0
- package/dist/viewer/collab/collaboration-remote-sync.d.ts +13 -0
- package/dist/viewer/collab/collaboration-remote-sync.d.ts.map +1 -1
- package/dist/viewer/collab/collaboration.svelte.d.ts +9 -21
- package/dist/viewer/collab/collaboration.svelte.d.ts.map +1 -1
- package/dist/viewer/collab/components/props.d.ts +12 -0
- package/dist/viewer/collab/components/props.d.ts.map +1 -1
- package/dist/viewer/collab/components/remote-selection.d.ts +29 -0
- package/dist/viewer/collab/components/remote-selection.d.ts.map +1 -0
- package/dist/viewer/collab/components/share-helpers.d.ts +7 -28
- package/dist/viewer/collab/components/share-helpers.d.ts.map +1 -1
- package/dist/viewer/collab/index.d.ts +1 -1
- package/dist/viewer/collab/index.d.ts.map +1 -1
- package/dist/viewer/components/props.d.ts +72 -2
- package/dist/viewer/components/props.d.ts.map +1 -1
- package/dist/viewer/components/ribbon/anchored-popup.d.ts +21 -0
- package/dist/viewer/components/ribbon/anchored-popup.d.ts.map +1 -0
- package/dist/viewer/components/ribbon/ribbon-types.d.ts +7 -0
- package/dist/viewer/components/ribbon/ribbon-types.d.ts.map +1 -1
- package/dist/viewer/components/typed-exports.d.ts +19 -0
- package/dist/viewer/components/typed-exports.d.ts.map +1 -0
- 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-slides-controller.d.ts +15 -0
- package/dist/viewer/editor/editor-slides-controller.d.ts.map +1 -1
- package/dist/viewer/editor/editor-state.svelte.d.ts +9 -0
- package/dist/viewer/editor/editor-state.svelte.d.ts.map +1 -1
- package/dist/viewer/export/export-ui.svelte.d.ts +5 -0
- package/dist/viewer/export/export-ui.svelte.d.ts.map +1 -1
- package/dist/viewer/index.d.ts +7893 -5277
- package/dist/viewer/index.d.ts.map +1 -1
- package/dist/viewer/index.js +392 -14
- package/dist/viewer/presentation/animation-playback-helpers.d.ts +43 -0
- package/dist/viewer/presentation/animation-playback-helpers.d.ts.map +1 -0
- package/dist/viewer/presentation/animation-playback.svelte.d.ts +50 -40
- package/dist/viewer/presentation/animation-playback.svelte.d.ts.map +1 -1
- package/dist/viewer/presentation/animation-sound.d.ts +20 -0
- package/dist/viewer/presentation/animation-sound.d.ts.map +1 -0
- package/dist/viewer/presentation/apply-animation-styles.d.ts +6 -5
- package/dist/viewer/presentation/apply-animation-styles.d.ts.map +1 -1
- package/dist/viewer/presentation/index.d.ts +2 -1
- package/dist/viewer/presentation/index.d.ts.map +1 -1
- package/dist/viewer/presentation/keyframes.d.ts +9 -0
- package/dist/viewer/presentation/keyframes.d.ts.map +1 -1
- package/dist/viewer/presentation/presentation-controller.svelte.d.ts +32 -10
- package/dist/viewer/presentation/presentation-controller.svelte.d.ts.map +1 -1
- package/dist/viewer/presentation/presentation-effects.svelte.d.ts +6 -2
- package/dist/viewer/presentation/presentation-effects.svelte.d.ts.map +1 -1
- package/dist/viewer/presentation/presentation-triggers.d.ts +18 -0
- package/dist/viewer/presentation/presentation-triggers.d.ts.map +1 -0
- package/dist/viewer/presentation/transition-overlay.d.ts +23 -0
- package/dist/viewer/presentation/transition-overlay.d.ts.map +1 -0
- package/dist/viewer/render/smartart-view.d.ts +7 -2
- package/dist/viewer/render/smartart-view.d.ts.map +1 -1
- package/dist/viewer/state/create-viewer-state-collab.svelte.d.ts +37 -0
- package/dist/viewer/state/create-viewer-state-collab.svelte.d.ts.map +1 -0
- package/dist/viewer/state/create-viewer-state-editor-ui.svelte.d.ts +42 -0
- package/dist/viewer/state/create-viewer-state-editor-ui.svelte.d.ts.map +1 -0
- package/dist/viewer/state/create-viewer-state-export-notes.svelte.d.ts +36 -0
- package/dist/viewer/state/create-viewer-state-export-notes.svelte.d.ts.map +1 -0
- package/dist/viewer/state/create-viewer-state-presentation.svelte.d.ts +30 -0
- package/dist/viewer/state/create-viewer-state-presentation.svelte.d.ts.map +1 -0
- package/dist/viewer/state/create-viewer-state-types.d.ts +134 -0
- package/dist/viewer/state/create-viewer-state-types.d.ts.map +1 -0
- package/dist/viewer/state/create-viewer-state.svelte.d.ts +30 -0
- package/dist/viewer/state/create-viewer-state.svelte.d.ts.map +1 -0
- package/dist/viewer/state/index.d.ts +2 -0
- package/dist/viewer/state/index.d.ts.map +1 -1
- package/dist/viewer/state/presentation-element-states-context.d.ts +37 -0
- package/dist/viewer/state/presentation-element-states-context.d.ts.map +1 -0
- package/dist/viewer/state/render-context.d.ts +3 -1
- package/dist/viewer/state/render-context.d.ts.map +1 -1
- package/dist/viewer/state/viewer-effects.svelte.d.ts +8 -0
- package/dist/viewer/state/viewer-effects.svelte.d.ts.map +1 -1
- package/dist/viewer/state/viewer-options-context.d.ts +10 -0
- package/dist/viewer/state/viewer-options-context.d.ts.map +1 -0
- package/dist/viewer/state/viewer-options-wiring.svelte.d.ts +31 -0
- package/dist/viewer/state/viewer-options-wiring.svelte.d.ts.map +1 -0
- package/dist/viewer/state/viewer-options.svelte.d.ts +55 -0
- package/dist/viewer/state/viewer-options.svelte.d.ts.map +1 -0
- package/dist/viewer/style/element-style.d.ts +3 -3
- package/dist/viewer/style/element-style.d.ts.map +1 -1
- package/dist/viewer/types.d.ts +16 -5
- package/dist/viewer/types.d.ts.map +1 -1
- package/dist/{y-webrtc-BdH40MC6.js → y-webrtc-BiViqyU2.js} +1079 -1101
- package/package.json +18 -5
- package/dist/export-D7pIn3W2.js +0 -38286
|
@@ -1,3 +1,12 @@
|
|
|
1
1
|
/** Ensure the presentation `@keyframes` are present in the document head. */
|
|
2
2
|
export declare function ensurePresentationKeyframes(): void;
|
|
3
|
+
/**
|
|
4
|
+
* Upsert the current slide's native-animation `@keyframes` (`p:animClr` colour
|
|
5
|
+
* ramps, staged builds, etc.) into a dedicated head-level `<style>`. Keyframe
|
|
6
|
+
* rules are global, so a single head-level injection reaches the windowed stage
|
|
7
|
+
* and the fullscreen element alike (mirrors the Vue binding rendering
|
|
8
|
+
* `presentationKeyframesCss` in its presentation template). Passing an empty
|
|
9
|
+
* string clears the rules (e.g. on slide change / leaving presentation).
|
|
10
|
+
*/
|
|
11
|
+
export declare function syncNativeAnimationKeyframes(css: string): void;
|
|
3
12
|
//# sourceMappingURL=keyframes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyframes.d.ts","sourceRoot":"","sources":["../../../src/viewer/presentation/keyframes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"keyframes.d.ts","sourceRoot":"","sources":["../../../src/viewer/presentation/keyframes.ts"],"names":[],"mappings":"AAeA,6EAA6E;AAC7E,wBAAgB,2BAA2B,IAAI,IAAI,CAWlD;AAED;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAiB9D"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PptxSlide, PptxSlideTransition } from 'pptx-viewer-core';
|
|
2
|
-
import {
|
|
2
|
+
import { ElementAnimationState } from 'pptx-viewer-shared';
|
|
3
3
|
import { AnimationPlayback } from './animation-playback.svelte';
|
|
4
4
|
/**
|
|
5
5
|
* `PresentationController`: the runes state machine wiring the Svelte viewer's
|
|
@@ -19,9 +19,11 @@ import { AnimationPlayback } from './animation-playback.svelte';
|
|
|
19
19
|
*
|
|
20
20
|
* Matches the Vue binding's presentation-mode behaviour (its parity bar):
|
|
21
21
|
* click-stepped element animations, CSS-driven slide transitions on every slide
|
|
22
|
-
* change, entrance elements hidden until revealed.
|
|
23
|
-
*
|
|
24
|
-
*
|
|
22
|
+
* change, entrance elements hidden until revealed. Since the native-timing
|
|
23
|
+
* migration it also drives staged chart / SmartArt builds (`p:bldChart` /
|
|
24
|
+
* `p:bldDgm`), `p:animClr` colour animations, withPrevious / afterPrevious
|
|
25
|
+
* auto-advance, and interactive / hover trigger sequences. Still no presenter
|
|
26
|
+
* view (React-only).
|
|
25
27
|
*/
|
|
26
28
|
export interface TransitionState {
|
|
27
29
|
/** The outgoing (previous) slide, rendered in the exit layer. */
|
|
@@ -40,6 +42,10 @@ export interface PresentationControllerDeps {
|
|
|
40
42
|
navigate(index: number): void;
|
|
41
43
|
/** Presentation-level switch parsed from `p:showPr`. */
|
|
42
44
|
getShowWithAnimation?(): boolean | undefined;
|
|
45
|
+
/** Host-provided action-sound player (resolves + plays embedded sounds). */
|
|
46
|
+
onPlayActionSound?: (soundPath: string) => void;
|
|
47
|
+
/** The live presentation stage root, to scope media-command lookups to. */
|
|
48
|
+
getFrameRoot?(): HTMLElement | null;
|
|
43
49
|
}
|
|
44
50
|
export declare class PresentationController {
|
|
45
51
|
#private;
|
|
@@ -47,18 +53,34 @@ export declare class PresentationController {
|
|
|
47
53
|
constructor(deps: PresentationControllerDeps);
|
|
48
54
|
/** The active slide-transition overlay state, or `null` when none is playing. */
|
|
49
55
|
get transition(): TransitionState | null;
|
|
50
|
-
/**
|
|
51
|
-
get
|
|
52
|
-
/**
|
|
53
|
-
get
|
|
56
|
+
/** Reactive per-element native-animation state (visibility, build, colour). */
|
|
57
|
+
get elementStates(): Map<string, ElementAnimationState>;
|
|
58
|
+
/** The per-slide native-animation `@keyframes` CSS to inject. */
|
|
59
|
+
get keyframesCss(): string;
|
|
60
|
+
/** Shape ids that trigger an interactive (`onShapeClick`) sequence. */
|
|
61
|
+
get interactiveTriggerShapeIds(): ReadonlySet<string>;
|
|
62
|
+
/** Shape ids that trigger a hover (`onHover`) sequence. */
|
|
63
|
+
get hoverTriggerShapeIds(): ReadonlySet<string>;
|
|
64
|
+
/** Play an interactive shape's sequence; `true` when it triggered one. */
|
|
65
|
+
handleInteractiveShapeClick(shapeId: string): boolean;
|
|
66
|
+
/** Play a hover shape's sequence; `true` when it triggered one. */
|
|
67
|
+
handleHoverStart(shapeId: string): boolean;
|
|
68
|
+
/** Reset a hover shape's sequence so the next hover replays it. */
|
|
69
|
+
handleHoverEnd(shapeId: string): void;
|
|
54
70
|
/**
|
|
55
71
|
* The on-click advance contract: reveal the next element-animation build if
|
|
56
72
|
* one remains, otherwise advance to the next slide.
|
|
73
|
+
*
|
|
74
|
+
* `fromClick` marks a click/tap/swipe on the slide, which is PowerPoint's
|
|
75
|
+
* "on mouse click" advance: it still steps the remaining animation builds,
|
|
76
|
+
* but once they are exhausted it advances the slide only when the current
|
|
77
|
+
* slide's transition allows it (advanceOnClick !== false). Keyboard and the
|
|
78
|
+
* on-screen next button pass `fromClick = false` and are never gated.
|
|
57
79
|
*/
|
|
58
|
-
advance(): void;
|
|
80
|
+
advance(fromClick?: boolean): void;
|
|
59
81
|
/** Entering presentation: seed builds for the current slide, drop any overlay. */
|
|
60
82
|
start(): void;
|
|
61
|
-
/** Leaving presentation: reset builds
|
|
83
|
+
/** Leaving presentation: clear timers, reset builds, drop any overlay. */
|
|
62
84
|
stop(): void;
|
|
63
85
|
/**
|
|
64
86
|
* The presented slide changed: reset the new slide's builds and, when the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation-controller.svelte.d.ts","sourceRoot":"","sources":["../../../src/viewer/presentation/presentation-controller.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"presentation-controller.svelte.d.ts","sourceRoot":"","sources":["../../../src/viewer/presentation/presentation-controller.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEhE,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAGhE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,WAAW,eAAe;IAC/B,iEAAiE;IACjE,QAAQ,EAAE,SAAS,GAAG,SAAS,CAAC;IAChC,gEAAgE;IAChE,QAAQ,EAAE,SAAS,GAAG,SAAS,CAAC;IAChC,6EAA6E;IAC7E,UAAU,EAAE,mBAAmB,CAAC;CAChC;AAED,MAAM,WAAW,0BAA0B;IAC1C,+DAA+D;IAC/D,SAAS,IAAI,SAAS,EAAE,CAAC;IACzB,wCAAwC;IACxC,eAAe,IAA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12,9 +12,13 @@ import { PresentationController } from './presentation-controller.svelte';
|
|
|
12
12
|
* and current slide: `start()` on enter, `stop()` on exit, `onSlideChange()`
|
|
13
13
|
* on every in-presentation navigation (resets builds + plays the incoming
|
|
14
14
|
* slide's transition).
|
|
15
|
-
* 2. Push
|
|
16
|
-
*
|
|
15
|
+
* 2. Push each element's native-animation state (visibility, CSS animation,
|
|
16
|
+
* trigger-shape cursor) onto the live stage after every DOM update (slide
|
|
17
|
+
* change / build advance / auto-advance) and keep the per-slide native
|
|
18
|
+
* `@keyframes` injected. When not presenting it clears the managed
|
|
17
19
|
* properties so the windowed / editing canvas never carries animation state.
|
|
20
|
+
* Structural reveals (chart / SmartArt build, `p:animClr` fill / stroke) are
|
|
21
|
+
* applied declaratively by the renderers via the element-states context.
|
|
18
22
|
*/
|
|
19
23
|
export interface PresentationEffectsDeps {
|
|
20
24
|
controller: PresentationController;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation-effects.svelte.d.ts","sourceRoot":"","sources":["../../../src/viewer/presentation/presentation-effects.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"presentation-effects.svelte.d.ts","sourceRoot":"","sources":["../../../src/viewer/presentation/presentation-effects.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAMlD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAG/E;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,uBAAuB;IACvC,UAAU,EAAE,sBAAsB,CAAC;IACnC,sEAAsE;IACtE,aAAa,IAAI,OAAO,CAAC;IACzB,wCAAwC;IACxC,eAAe,IAAI,MAAM,CAAC;IAC1B,+EAA+E;IAC/E,cAAc,IAAI,SAAS,GAAG,SAAS,CAAC;IACxC,wEAAwE;IACxE,YAAY,IAAI,WAAW,GAAG,IAAI,CAAC;CACnC;AAID,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,uBAAuB,GAAG,IAAI,CAkE1E"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PresentationController } from './presentation-controller.svelte';
|
|
2
|
+
/** The subset of the controller the trigger listeners drive. */
|
|
3
|
+
export type TriggerController = Pick<PresentationController, 'interactiveTriggerShapeIds' | 'hoverTriggerShapeIds' | 'handleInteractiveShapeClick' | 'handleHoverStart' | 'handleHoverEnd'>;
|
|
4
|
+
/**
|
|
5
|
+
* Route interactive (`onShapeClick`) and hover (`onHover`) trigger events on the
|
|
6
|
+
* live presentation stage to their animation sequences: a click on an
|
|
7
|
+
* interactive trigger shape (or hovering an `onHover` trigger) plays its
|
|
8
|
+
* sequence instead of only advancing the slide. Returns a cleanup function that
|
|
9
|
+
* removes the listeners.
|
|
10
|
+
*
|
|
11
|
+
* The tap-to-advance click lives on an ancestor (`.pptx-svelte-stage-holder`),
|
|
12
|
+
* so a handled interactive click calls `stopPropagation()` to suppress the
|
|
13
|
+
* advance; non-trigger clicks bubble through and advance as before. The
|
|
14
|
+
* controller getters/handlers are read at event time, so the current per-slide
|
|
15
|
+
* trigger sets are always used.
|
|
16
|
+
*/
|
|
17
|
+
export declare function attachPresentationTriggerListeners(root: HTMLElement, controller: TriggerController): () => void;
|
|
18
|
+
//# sourceMappingURL=presentation-triggers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation-triggers.d.ts","sourceRoot":"","sources":["../../../src/viewer/presentation/presentation-triggers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAE/E,gEAAgE;AAChE,MAAM,MAAM,iBAAiB,GAAG,IAAI,CACnC,sBAAsB,EACpB,4BAA4B,GAC5B,sBAAsB,GACtB,6BAA6B,GAC7B,kBAAkB,GAClB,gBAAgB,CAClB,CAAC;AAUF;;;;;;;;;;;;GAYG;AACH,wBAAgB,kCAAkC,CACjD,IAAI,EAAE,WAAW,EACjB,UAAU,EAAE,iBAAiB,GAC3B,MAAM,IAAI,CAkDZ"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { PptxSlide, PptxSlideTransition } from 'pptx-viewer-core';
|
|
2
|
+
import { CanvasSize } from 'pptx-viewer-shared';
|
|
3
|
+
import { Component } from 'svelte';
|
|
4
|
+
/** Props for {@link PresentationTransitionOverlay}. */
|
|
5
|
+
export interface PresentationTransitionOverlayProps {
|
|
6
|
+
outgoingSlide: PptxSlide | undefined;
|
|
7
|
+
incomingSlide: PptxSlide | undefined;
|
|
8
|
+
canvasSize: CanvasSize;
|
|
9
|
+
mediaDataUrls: Map<string, string>;
|
|
10
|
+
scale?: number;
|
|
11
|
+
transition: PptxSlideTransition | undefined;
|
|
12
|
+
ondone: () => void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Explicitly-typed public export of the transition overlay.
|
|
16
|
+
*
|
|
17
|
+
* Same rationale as `viewer/components/typed-exports.ts`: a raw `.svelte`
|
|
18
|
+
* re-export from a barrel leaves an unresolvable `.svelte` specifier in the
|
|
19
|
+
* emitted declarations (no `.svelte.d.ts` is produced), which breaks the
|
|
20
|
+
* post-build Rollup declaration bundling on CI.
|
|
21
|
+
*/
|
|
22
|
+
export declare const PresentationTransitionOverlay: Component<PresentationTransitionOverlayProps>;
|
|
23
|
+
//# sourceMappingURL=transition-overlay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transition-overlay.d.ts","sourceRoot":"","sources":["../../../src/viewer/presentation/transition-overlay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAIxC,uDAAuD;AACvD,MAAM,WAAW,kCAAkC;IAClD,aAAa,EAAE,SAAS,GAAG,SAAS,CAAC;IACrC,aAAa,EAAE,SAAS,GAAG,SAAS,CAAC;IACrC,UAAU,EAAE,UAAU,CAAC;IACvB,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,mBAAmB,GAAG,SAAS,CAAC;IAC5C,MAAM,EAAE,MAAM,IAAI,CAAC;CACnB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,6BAA6B,EAAE,SAAS,CAAC,kCAAkC,CACW,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SmartArtPptxElement } from 'pptx-viewer-core';
|
|
2
|
-
import { RenderedNode, RenderedShape, SmartArtLayoutResult } from 'pptx-viewer-shared';
|
|
2
|
+
import { DiagramBuildState, RenderedNode, RenderedShape, SmartArtLayoutResult } from 'pptx-viewer-shared';
|
|
3
3
|
/**
|
|
4
4
|
* View-model resolution for `smartArt` elements (port of the vanilla
|
|
5
5
|
* binding's `renderSmartArtElement`). Palette / stroke / shadow / layout
|
|
@@ -39,8 +39,13 @@ export declare function smartArtAriaLabel(element: SmartArtPptxElement): string
|
|
|
39
39
|
/**
|
|
40
40
|
* Pick the rendering path: pre-computed drawing shapes (preferred), the
|
|
41
41
|
* shared layout engine over the node tree, or an empty placeholder.
|
|
42
|
+
*
|
|
43
|
+
* `build` is the active staged diagram build (`p:bldDgm`) during a running
|
|
44
|
+
* presentation, if any: only the leading nodes / drawing shapes for the current
|
|
45
|
+
* progress are revealed. The view box is still computed from the FULL shape set
|
|
46
|
+
* so the diagram does not rescale as it builds (mirrors React / Vue).
|
|
42
47
|
*/
|
|
43
|
-
export declare function buildSmartArtView(element: SmartArtPptxElement): SmartArtView;
|
|
48
|
+
export declare function buildSmartArtView(element: SmartArtPptxElement, build?: DiagramBuildState): SmartArtView;
|
|
44
49
|
/** One rendered line of a multi-line SVG label; `y` offsets the node centre. */
|
|
45
50
|
export interface SvgTextLine {
|
|
46
51
|
text: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smartart-view.d.ts","sourceRoot":"","sources":["../../../src/viewer/render/smartart-view.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"smartart-view.d.ts","sourceRoot":"","sources":["../../../src/viewer/render/smartart-view.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAoB,mBAAmB,EAAiB,MAAM,kBAAkB,CAAC;AAC7F,OAAO,KAAK,EACX,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,oBAAoB,EAEpB,MAAM,oBAAoB,CAAC;AAe5B;;;;;GAKG;AAEH,8EAA8E;AAC9E,eAAO,MAAM,kBAAkB,oEAAoE,CAAC;AAEpG,qDAAqD;AACrD,eAAO,MAAM,yBAAyB,YAAY,CAAC;AAEnD,+EAA+E;AAC/E,MAAM,MAAM,YAAY,GACrB;IACA,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,sBAAsB,EAAE,CAAC;IACjC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B,GACD;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,gBAAgB,CAAA;CAAE,GAC5C;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,CAAC;AAE3B,MAAM,MAAM,sBAAsB,GAAG,aAAa,GAAG;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAC7F,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,oBAAoB,EAAE,OAAO,CAAC,GAAG;IACpE,KAAK,EAAE,KAAK,CAAC,YAAY,GAAG;QAAE,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACrE,CAAC;AAMF,0EAA0E;AAC1E,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,mBAAmB,GAAG,MAAM,CAExE;AAED,4EAA4E;AAC5E,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,mBAAmB,GAAG,MAAM,GAAG,SAAS,CAElF;AAWD;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAChC,OAAO,EAAE,mBAAmB,EAC5B,KAAK,CAAC,EAAE,iBAAiB,GACvB,YAAY,CAuEd;AAED,gFAAgF;AAChF,MAAM,WAAW,WAAW;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;CACV;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,WAAW,EAAE,CAW1E"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { CollaborationController, CollaborationDialogsState } from '../collab';
|
|
2
|
+
import { EditorState } from '../editor/editor-state.svelte';
|
|
3
|
+
import { AutosaveController } from './autosave.svelte';
|
|
4
|
+
import { CreateViewerStateOptions } from './create-viewer-state-types';
|
|
5
|
+
import { PresentationLoader } from './presentation-loader.svelte';
|
|
6
|
+
import { ViewerState } from './viewer-state.svelte';
|
|
7
|
+
export interface CollabClusterDeps {
|
|
8
|
+
loader: PresentationLoader;
|
|
9
|
+
viewer: ViewerState;
|
|
10
|
+
editor: EditorState;
|
|
11
|
+
options: CreateViewerStateOptions;
|
|
12
|
+
}
|
|
13
|
+
export interface CollabCluster {
|
|
14
|
+
collab: CollaborationController;
|
|
15
|
+
dialogs: CollaborationDialogsState;
|
|
16
|
+
autosaveCtl: AutosaveController;
|
|
17
|
+
readonly autosaveEnabled: boolean;
|
|
18
|
+
setAutosaveEnabled(enabled: boolean): void;
|
|
19
|
+
readonly autosaveActive: boolean;
|
|
20
|
+
versionHistoryOpen: boolean;
|
|
21
|
+
readonly signatureWarningOpen: boolean;
|
|
22
|
+
closeSignatureWarning(): void;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Collaboration session/dialogs + autosave + the digital-signature warning
|
|
26
|
+
* gate, split out of `createViewerState` purely to keep that file under the
|
|
27
|
+
* repo's file-size budget. None of this cluster depends on the editing
|
|
28
|
+
* chrome (`parityUi` / `controller` / `findReplace`), so it can be built
|
|
29
|
+
* right after `editor` and handed to that cluster afterwards (`controller`
|
|
30
|
+
* needs `collab.setCursor`).
|
|
31
|
+
*
|
|
32
|
+
* Named `use*` (like this file's `useCollaborationPresenceEffects` call)
|
|
33
|
+
* rather than `build*`: it registers `$effect`s of its own, not just
|
|
34
|
+
* constructs objects.
|
|
35
|
+
*/
|
|
36
|
+
export declare function useCollabCluster(deps: CollabClusterDeps): CollabCluster;
|
|
37
|
+
//# sourceMappingURL=create-viewer-state-collab.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-viewer-state-collab.svelte.d.ts","sourceRoot":"","sources":["../../../src/viewer/state/create-viewer-state-collab.svelte.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AAE/E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,MAAM,WAAW,iBAAiB;IACjC,MAAM,EAAE,kBAAkB,CAAC;IAC3B,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,wBAAwB,CAAC;CAClC;AAED,MAAM,WAAW,aAAa;IAC7B,MAAM,EAAE,uBAAuB,CAAC;IAChC,OAAO,EAAE,yBAAyB,CAAC;IACnC,WAAW,EAAE,kBAAkB,CAAC;IAChC,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAC3C,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IACjC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,oBAAoB,EAAE,OAAO,CAAC;IACvC,qBAAqB,IAAI,IAAI,CAAC;CAC9B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,iBAAiB,GAAG,aAAa,CA4FvE"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { CollaborationController } from '../collab';
|
|
2
|
+
import { EditorController } from '../editor/editor-controller.svelte';
|
|
3
|
+
import { FindReplaceState } from '../editor/editor-find-replace.svelte';
|
|
4
|
+
import { EditorState } from '../editor/editor-state.svelte';
|
|
5
|
+
import { ChromeUiState } from './chrome-ui.svelte';
|
|
6
|
+
import { CreateViewerStateOptions } from './create-viewer-state-types';
|
|
7
|
+
import { PresentationLoader } from './presentation-loader.svelte';
|
|
8
|
+
import { ViewerParityUiState } from './viewer-parity-ui.svelte';
|
|
9
|
+
import { ViewerState } from './viewer-state.svelte';
|
|
10
|
+
export interface EditorUiClusterDeps {
|
|
11
|
+
loader: PresentationLoader;
|
|
12
|
+
editor: EditorState;
|
|
13
|
+
viewer: ViewerState;
|
|
14
|
+
collab: CollaborationController;
|
|
15
|
+
options: CreateViewerStateOptions;
|
|
16
|
+
/** Effective canvas scale (main stage), or master-view scale when applicable. */
|
|
17
|
+
getScale(): number;
|
|
18
|
+
}
|
|
19
|
+
export interface EditorUiCluster {
|
|
20
|
+
parityUi: ViewerParityUiState;
|
|
21
|
+
chromeUi: ChromeUiState;
|
|
22
|
+
controller: EditorController;
|
|
23
|
+
findReplace: FindReplaceState;
|
|
24
|
+
stageContextMenu: {
|
|
25
|
+
x: number;
|
|
26
|
+
y: number;
|
|
27
|
+
} | null;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The editing chrome cluster: view/print/annotation preferences
|
|
31
|
+
* (`ViewerParityUiState`), side-panel open state (`ChromeUiState`), the
|
|
32
|
+
* pointer/keyboard/history controller (`EditorController`), the ribbon's
|
|
33
|
+
* Find & Replace panel state, and the load-pipeline wiring
|
|
34
|
+
* (`useViewerEffects`, which needs `controller` to close open selections/
|
|
35
|
+
* inline edits when `editable` flips off). Split out of `createViewerState`
|
|
36
|
+
* to keep that file under the repo's file-size budget; built after the
|
|
37
|
+
* collaboration cluster because `controller` reports cursor moves to
|
|
38
|
+
* `collab.setCursor`. Named `use*`, not `build*`, because of the
|
|
39
|
+
* `useViewerEffects` call.
|
|
40
|
+
*/
|
|
41
|
+
export declare function useEditorUiCluster(deps: EditorUiClusterDeps): EditorUiCluster;
|
|
42
|
+
//# sourceMappingURL=create-viewer-state-editor-ui.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-viewer-state-editor-ui.svelte.d.ts","sourceRoot":"","sources":["../../../src/viewer/state/create-viewer-state-editor-ui.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGzD,MAAM,WAAW,mBAAmB;IACnC,MAAM,EAAE,kBAAkB,CAAC;IAC3B,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,uBAAuB,CAAC;IAChC,OAAO,EAAE,wBAAwB,CAAC;IAClC,iFAAiF;IACjF,QAAQ,IAAI,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,eAAe;IAC/B,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,QAAQ,EAAE,aAAa,CAAC;IACxB,UAAU,EAAE,gBAAgB,CAAC;IAC7B,WAAW,EAAE,gBAAgB,CAAC;IAC9B,gBAAgB,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CAClD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,mBAAmB,GAAG,eAAe,CA8D7E"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { TextSegment } from 'pptx-viewer-core';
|
|
2
|
+
import { MobileSheetKey } from 'pptx-viewer-shared';
|
|
3
|
+
import { Translator } from '../../i18n/translator';
|
|
4
|
+
import { EditorState } from '../editor/editor-state.svelte';
|
|
5
|
+
import { ExportUiState } from '../export/export-ui.svelte';
|
|
6
|
+
import { ExportWiring } from '../export/export-wiring.svelte';
|
|
7
|
+
import { PresentationLoader } from './presentation-loader.svelte';
|
|
8
|
+
import { ViewerState } from './viewer-state.svelte';
|
|
9
|
+
export interface ExportNotesClusterDeps {
|
|
10
|
+
editor: EditorState;
|
|
11
|
+
loader: PresentationLoader;
|
|
12
|
+
viewer: ViewerState;
|
|
13
|
+
t: Translator;
|
|
14
|
+
getSmartArt3D(): boolean;
|
|
15
|
+
getRootEl(): HTMLDivElement | undefined;
|
|
16
|
+
/** Whether in-place editing is on (gates whether notes edits are history-tracked). */
|
|
17
|
+
getEditable(): boolean;
|
|
18
|
+
onnotesupdate?: (notes: string) => void;
|
|
19
|
+
}
|
|
20
|
+
export interface ExportNotesCluster {
|
|
21
|
+
exportWiring: ExportWiring;
|
|
22
|
+
exportUi: ExportUiState;
|
|
23
|
+
readonly notesExpanded: boolean;
|
|
24
|
+
readonly activeMobileSheet: MobileSheetKey;
|
|
25
|
+
onNotesToggle(): void;
|
|
26
|
+
setActiveMobileSheet(next: MobileSheetKey): void;
|
|
27
|
+
onNotesCommit(notes: string, segments?: TextSegment[]): void;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* PNG/PDF/GIF/video/print export wiring + the speaker-notes / mobile
|
|
31
|
+
* action-sheet toggle state. Split out of `createViewerState` to keep that
|
|
32
|
+
* file under the repo's file-size budget; grouped together because both are
|
|
33
|
+
* "output" concerns with no further downstream dependents in this module.
|
|
34
|
+
*/
|
|
35
|
+
export declare function buildExportNotesCluster(deps: ExportNotesClusterDeps): ExportNotesCluster;
|
|
36
|
+
//# sourceMappingURL=create-viewer-state-export-notes.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-viewer-state-export-notes.svelte.d.ts","sourceRoot":"","sources":["../../../src/viewer/state/create-viewer-state-export-notes.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,MAAM,WAAW,sBAAsB;IACtC,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,MAAM,EAAE,WAAW,CAAC;IACpB,CAAC,EAAE,UAAU,CAAC;IACd,aAAa,IAAI,OAAO,CAAC;IACzB,SAAS,IAAI,cAAc,GAAG,SAAS,CAAC;IACxC,sFAAsF;IACtF,WAAW,IAAI,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAED,MAAM,WAAW,kBAAkB;IAClC,YAAY,EAAE,YAAY,CAAC;IAC3B,QAAQ,EAAE,aAAa,CAAC;IACxB,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,iBAAiB,EAAE,cAAc,CAAC;IAC3C,aAAa,IAAI,IAAI,CAAC;IACtB,oBAAoB,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAAC;IACjD,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;CAC7D;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,sBAAsB,GAAG,kBAAkB,CAmDxF"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { EditorController } from '../editor/editor-controller.svelte';
|
|
2
|
+
import { EditorState } from '../editor/editor-state.svelte';
|
|
3
|
+
import { PresentationController } from '../presentation';
|
|
4
|
+
import { PresentationLoader } from './presentation-loader.svelte';
|
|
5
|
+
import { ViewerParityUiState } from './viewer-parity-ui.svelte';
|
|
6
|
+
import { ViewerState } from './viewer-state.svelte';
|
|
7
|
+
import { ViewportHandlers } from './viewport-handlers';
|
|
8
|
+
export interface PresentationClusterDeps {
|
|
9
|
+
editor: EditorState;
|
|
10
|
+
viewer: ViewerState;
|
|
11
|
+
loader: PresentationLoader;
|
|
12
|
+
parityUi: ViewerParityUiState;
|
|
13
|
+
controller: EditorController;
|
|
14
|
+
getEditingActive(): boolean;
|
|
15
|
+
getStageHolderEl(): HTMLDivElement | undefined;
|
|
16
|
+
getRootEl(): HTMLDivElement | undefined;
|
|
17
|
+
}
|
|
18
|
+
export interface PresentationCluster extends ViewportHandlers {
|
|
19
|
+
presentation: PresentationController;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Presentation-mode playback (click-stepped element animations + slide
|
|
23
|
+
* transitions), the rehearse-timer effects, and the fullscreen/keyboard
|
|
24
|
+
* viewport handlers. Split out of `createViewerState` to keep that file
|
|
25
|
+
* under the repo's file-size budget. Named `use*`, not `build*`: it
|
|
26
|
+
* registers several `$effect`s of its own (rehearse timer, annotations),
|
|
27
|
+
* not just constructed objects.
|
|
28
|
+
*/
|
|
29
|
+
export declare function usePresentationCluster(deps: PresentationClusterDeps): PresentationCluster;
|
|
30
|
+
//# sourceMappingURL=create-viewer-state-presentation.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-viewer-state-presentation.svelte.d.ts","sourceRoot":"","sources":["../../../src/viewer/state/create-viewer-state-presentation.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAA0B,MAAM,iBAAiB,CAAC;AACjF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,WAAW,uBAAuB;IACvC,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,UAAU,EAAE,gBAAgB,CAAC;IAC7B,gBAAgB,IAAI,OAAO,CAAC;IAC5B,gBAAgB,IAAI,cAAc,GAAG,SAAS,CAAC;IAC/C,SAAS,IAAI,cAAc,GAAG,SAAS,CAAC;CACxC;AAED,MAAM,WAAW,mBAAoB,SAAQ,gBAAgB;IAC5D,YAAY,EAAE,sBAAsB,CAAC;CACrC;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,uBAAuB,GAAG,mBAAmB,CAiDzF"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { PptxSaveFormat, TextSegment } from 'pptx-viewer-core';
|
|
2
|
+
import { CanvasSize, CollaborationConfig, MobileSheetKey, ViewerMode } from 'pptx-viewer-shared';
|
|
3
|
+
import { Translator } from '../../i18n/translator';
|
|
4
|
+
import { CollaborationController, CollaborationDialogsState } from '../collab';
|
|
5
|
+
import { ShareDefaultsInput } from '../collab/collaboration-dialogs.svelte';
|
|
6
|
+
import { EditingApi } from '../editor/editing-api';
|
|
7
|
+
import { EditorController } from '../editor/editor-controller.svelte';
|
|
8
|
+
import { FindReplaceState } from '../editor/editor-find-replace.svelte';
|
|
9
|
+
import { EditorState } from '../editor/editor-state.svelte';
|
|
10
|
+
import { ExportUiState } from '../export/export-ui.svelte';
|
|
11
|
+
import { ExportWiring } from '../export/export-wiring.svelte';
|
|
12
|
+
import { ExportingApi } from '../export/exporting-api';
|
|
13
|
+
import { PresentationController, PresenterSession } from '../presentation';
|
|
14
|
+
import { ViewerLoadDetail } from '../types';
|
|
15
|
+
import { AutosaveController } from './autosave.svelte';
|
|
16
|
+
import { ChromeUiState } from './chrome-ui.svelte';
|
|
17
|
+
import { PresentationLoader } from './presentation-loader.svelte';
|
|
18
|
+
import { ViewerParityUiState } from './viewer-parity-ui.svelte';
|
|
19
|
+
import { ViewerState } from './viewer-state.svelte';
|
|
20
|
+
export type { CanvasSize };
|
|
21
|
+
/**
|
|
22
|
+
* Options accepted by {@link createViewerState}. Mirrors the subset of
|
|
23
|
+
* `PowerPointViewerProps` the extracted construction block (formerly
|
|
24
|
+
* inlined at the top of `PowerPointViewer.svelte`'s `<script>`) closes
|
|
25
|
+
* over, plus getter callbacks for the handful of DOM-bound values
|
|
26
|
+
* (`bind:this` / `bind:clientWidth` targets) that must stay owned by
|
|
27
|
+
* whichever component renders the actual markup.
|
|
28
|
+
*/
|
|
29
|
+
export interface CreateViewerStateOptions {
|
|
30
|
+
getSource: () => Uint8Array | ArrayBuffer | null | undefined;
|
|
31
|
+
collaboration?: CollaborationConfig;
|
|
32
|
+
shareDefaults?: ShareDefaultsInput;
|
|
33
|
+
/** Host `autosave` prop (post-effect value the caller keeps in sync). */
|
|
34
|
+
getAutosave: () => boolean;
|
|
35
|
+
autosaveIntervalMs?: number;
|
|
36
|
+
getFilePath: () => string | undefined;
|
|
37
|
+
getInitialSlide: () => number;
|
|
38
|
+
/** Already locale-bound translator; propagated to descendants via context. */
|
|
39
|
+
t: Translator;
|
|
40
|
+
getSmartArt3D: () => boolean;
|
|
41
|
+
/** Whether in-place editing is enabled (host `editable` prop, post-effect value). */
|
|
42
|
+
getEditable: () => boolean;
|
|
43
|
+
onload?: (detail: ViewerLoadDetail) => void;
|
|
44
|
+
onerror?: (message: string) => void;
|
|
45
|
+
onslidechange?: (index: number) => void;
|
|
46
|
+
onnotesupdate?: (notes: string) => void;
|
|
47
|
+
onchange?: () => void;
|
|
48
|
+
ondirtychange?: (dirty: boolean) => void;
|
|
49
|
+
oncontentchange?: (content: Uint8Array) => void;
|
|
50
|
+
onmodechange?: (mode: ViewerMode) => void;
|
|
51
|
+
onzoomchange?: (zoom: number) => void;
|
|
52
|
+
onselectionchange?: (elementIds: string[]) => void;
|
|
53
|
+
onslidecountchange?: (count: number) => void;
|
|
54
|
+
onautosave?: (bytes: Uint8Array) => void;
|
|
55
|
+
/** Fired when the host toggles AutoSave (title bar / Settings dialog). */
|
|
56
|
+
onautosavetoggle?: (enabled: boolean) => void;
|
|
57
|
+
onstartcollaboration?: (config: CollaborationConfig) => void;
|
|
58
|
+
onstopcollaboration?: () => void;
|
|
59
|
+
/** DOM-bound getters, supplied by the component that owns the markup. */
|
|
60
|
+
getStageHolderEl: () => HTMLDivElement | undefined;
|
|
61
|
+
getRootEl: () => HTMLDivElement | undefined;
|
|
62
|
+
getViewportWidth: () => number;
|
|
63
|
+
getViewportHeight: () => number;
|
|
64
|
+
/** Master/layout workspace zoom, assigned by `MasterViewBody`. */
|
|
65
|
+
getMasterScale: () => number;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Everything the ribbon, toolbar, and canvas need, returned from
|
|
69
|
+
* {@link createViewerState}. Reactive/derived fields are exposed as
|
|
70
|
+
* getters (some paired with setters for the plain local UI flags) so reads
|
|
71
|
+
* anywhere, not just inside an `$effect`, stay live.
|
|
72
|
+
*/
|
|
73
|
+
export interface ViewerStateBag {
|
|
74
|
+
readonly loader: PresentationLoader;
|
|
75
|
+
readonly viewer: ViewerState;
|
|
76
|
+
readonly editor: EditorState;
|
|
77
|
+
readonly controller: EditorController;
|
|
78
|
+
readonly parityUi: ViewerParityUiState;
|
|
79
|
+
readonly chromeUi: ChromeUiState;
|
|
80
|
+
readonly findReplace: FindReplaceState;
|
|
81
|
+
readonly collab: CollaborationController;
|
|
82
|
+
readonly dialogs: CollaborationDialogsState;
|
|
83
|
+
readonly autosaveCtl: AutosaveController;
|
|
84
|
+
readonly presentation: PresentationController;
|
|
85
|
+
readonly presenterSession: PresenterSession;
|
|
86
|
+
readonly exportWiring: ExportWiring;
|
|
87
|
+
readonly exportUi: ExportUiState;
|
|
88
|
+
readonly t: Translator;
|
|
89
|
+
/** Imperative undo/redo/save/download API, matching `PowerPointViewerApi`'s editing subset. */
|
|
90
|
+
readonly editingApi: EditingApi;
|
|
91
|
+
/** Imperative PNG/PDF/GIF/video/print API, matching `PowerPointViewerApi`'s export subset. */
|
|
92
|
+
readonly exportingApi: ExportingApi;
|
|
93
|
+
/** Effective scale (fit-to-viewport x user zoom), matching the main canvas. */
|
|
94
|
+
readonly scale: number;
|
|
95
|
+
/** User-facing zoom percent (rounded, never below 1). */
|
|
96
|
+
readonly effectivePercent: number;
|
|
97
|
+
readonly displaySlides: EditorState['renderedSlides'];
|
|
98
|
+
readonly activeSlide: EditorState['renderedSlides'][number] | undefined;
|
|
99
|
+
readonly chromeVisible: boolean;
|
|
100
|
+
/** True when in-place editing is actually available (editable, not presenting, not read-only). */
|
|
101
|
+
readonly editingActive: boolean;
|
|
102
|
+
/** True once the ribbon (vs. the compact `ViewerToolbar`) should be shown. */
|
|
103
|
+
readonly showRibbon: boolean;
|
|
104
|
+
readonly viewerMode: ViewerMode;
|
|
105
|
+
/** True while the autosave debounce/write cycle is armed. */
|
|
106
|
+
readonly autosaveActive: boolean;
|
|
107
|
+
/** Read-only: mutate via {@link setAutosaveEnabled}, which also fires `onautosavetoggle`. */
|
|
108
|
+
readonly autosaveEnabled: boolean;
|
|
109
|
+
setAutosaveEnabled(enabled: boolean): void;
|
|
110
|
+
presenterMode: boolean;
|
|
111
|
+
/** `Date.now()` timestamp of the last `enterPresenterView()` call; the presenter view's elapsed-time display. */
|
|
112
|
+
readonly presenterStartedAt: number;
|
|
113
|
+
stageContextMenu: {
|
|
114
|
+
x: number;
|
|
115
|
+
y: number;
|
|
116
|
+
} | null;
|
|
117
|
+
readonly activeMobileSheet: MobileSheetKey;
|
|
118
|
+
setActiveMobileSheet(next: MobileSheetKey): void;
|
|
119
|
+
readonly notesExpanded: boolean;
|
|
120
|
+
versionHistoryOpen: boolean;
|
|
121
|
+
readonly signatureWarningOpen: boolean;
|
|
122
|
+
enterPresenterView(): void;
|
|
123
|
+
closeSignatureWarning(): void;
|
|
124
|
+
onNotesToggle(): void;
|
|
125
|
+
onNotesCommit(notes: string, segments?: TextSegment[]): void;
|
|
126
|
+
onFullscreenToggle(): void;
|
|
127
|
+
onFullscreenChange(): void;
|
|
128
|
+
onKeydown(event: KeyboardEvent): void;
|
|
129
|
+
downloadPptx(fileName?: string): Promise<void>;
|
|
130
|
+
downloadAs(format: PptxSaveFormat, fileName?: string): Promise<void>;
|
|
131
|
+
/** Tear down every constructed controller (call from the host's `onDestroy`). */
|
|
132
|
+
destroy(): void;
|
|
133
|
+
}
|
|
134
|
+
//# sourceMappingURL=create-viewer-state-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-viewer-state-types.d.ts","sourceRoot":"","sources":["../../../src/viewer/state/create-viewer-state-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,KAAK,EACX,UAAU,EACV,mBAAmB,EACnB,cAAc,EACd,UAAU,EACV,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AACpF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5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CAAC;IAC3C,aAAa,EAAE,OAAO,CAAC;IACvB,iHAAiH;IACjH,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,gBAAgB,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAClD,QAAQ,CAAC,iBAAiB,EAAE,cAAc,CAAC;IAC3C,oBAAoB,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAAC;IACjD,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,oBAAoB,EAAE,OAAO,CAAC;IAEvC,kBAAkB,IAAI,IAAI,CAAC;IAC3B,qBAAqB,IAAI,IAAI,CAAC;IAC9B,aAAa,IAAI,IAAI,CAAC;IACtB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;IAC7D,kBAAkB,IAAI,IAAI,CAAC;IAC3B,kBAAkB,IAAI,IAAI,CAAC;IAC3B,SAAS,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,CAAC;IACtC,YAAY,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/C,UAAU,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrE,iFAAiF;IACjF,OAAO,IAAI,IAAI,CAAC;CAChB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { CreateViewerStateOptions, ViewerStateBag } from './create-viewer-state-types';
|
|
2
|
+
/**
|
|
3
|
+
* Builds every reactive controller the ribbon, toolbar, and slide canvas
|
|
4
|
+
* need: the runes port of `PowerPointViewer.svelte`'s own construction block
|
|
5
|
+
* (originally inlined at the top of its `<script>`), extracted so a host can
|
|
6
|
+
* compose its own viewer shell out of `Ribbon` / `ViewerToolbar` / the state
|
|
7
|
+
* classes without pulling in the whole `PowerPointViewer` component.
|
|
8
|
+
*
|
|
9
|
+
* MUST be called synchronously from a `.svelte` component's own script body
|
|
10
|
+
* (top level, not inside a callback or after an `await`): it registers
|
|
11
|
+
* `onMount` / `onDestroy` hooks and Svelte context (`setContext`) via
|
|
12
|
+
* `provideTranslator` / `provideSmartArt3D` / `provideRenderContext` /
|
|
13
|
+
* `provideZoomNavigation` (inside the editor-ui cluster) / `provideInspectorDeck`,
|
|
14
|
+
* all of which require an active component-initialisation context. Svelte's
|
|
15
|
+
* lifecycle context stays active for the whole synchronous execution of a
|
|
16
|
+
* component's script, not just its top-level statements, so calling this
|
|
17
|
+
* from a component's script works exactly like inlining the same code would.
|
|
18
|
+
*
|
|
19
|
+
* Construction is split across a few `create-viewer-state-*.svelte.ts`
|
|
20
|
+
* helpers purely to stay under the repo's file-size budget; the ORDER those
|
|
21
|
+
* helpers are invoked in below mirrors the original inline code (later
|
|
22
|
+
* clusters close over earlier ones), with one deliberate reordering: the
|
|
23
|
+
* collaboration cluster is now built right after `editor` (it doesn't need
|
|
24
|
+
* the editing-chrome cluster), which lets `controller` close over the real
|
|
25
|
+
* `collab.setCursor` instead of a forward reference.
|
|
26
|
+
*
|
|
27
|
+
* Call the returned `destroy()` from the host component's own `onDestroy`.
|
|
28
|
+
*/
|
|
29
|
+
export declare function createViewerState(options: CreateViewerStateOptions): ViewerStateBag;
|
|
30
|
+
//# sourceMappingURL=create-viewer-state.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-viewer-state.svelte.d.ts","sourceRoot":"","sources":["../../../src/viewer/state/create-viewer-state.svelte.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,wBAAwB,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAQ5F;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,cAAc,CA6NnF"}
|
|
@@ -8,4 +8,6 @@ export type { InspectorTabId } from './chrome-ui.svelte';
|
|
|
8
8
|
export { PresentationLoader } from './presentation-loader.svelte';
|
|
9
9
|
export { ViewerState } from './viewer-state.svelte';
|
|
10
10
|
export { provideSmartArt3D, useSmartArt3D } from './smart-art-3d-context';
|
|
11
|
+
export { createViewerState } from './create-viewer-state.svelte';
|
|
12
|
+
export type { CreateViewerStateOptions, ViewerStateBag } from './create-viewer-state-types';
|
|
11
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/viewer/state/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,eAAe,EACf,QAAQ,EACR,oBAAoB,EACpB,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,cAAc,GACd,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EACN,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,GAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvF,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,YAAY,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/viewer/state/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,eAAe,EACf,QAAQ,EACR,oBAAoB,EACpB,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,cAAc,GACd,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EACN,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,GAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvF,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,YAAY,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,YAAY,EAAE,wBAAwB,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ElementAnimationState } from 'pptx-viewer-shared';
|
|
2
|
+
/**
|
|
3
|
+
* Svelte context wiring for the presentation-mode native-animation element
|
|
4
|
+
* state map (mirrors Vue's `presentation-element-states` provide/inject and the
|
|
5
|
+
* Svelte `smart-art-3d-context`).
|
|
6
|
+
*
|
|
7
|
+
* The running presentation (`PresentationController`, via `AnimationPlayback`)
|
|
8
|
+
* owns a runes `Map<elementId, ElementAnimationState>` describing each element's
|
|
9
|
+
* current native-timeline playback state (visibility, CSS animation, staged
|
|
10
|
+
* chart / SmartArt build progress, `p:animClr` fill / stroke targets).
|
|
11
|
+
* `PowerPointViewer` provides a getter over that map here; the element renderers
|
|
12
|
+
* consume it deep in the tree and read their own element's state to reveal
|
|
13
|
+
* staged builds and relinquish animated fill / stroke.
|
|
14
|
+
*
|
|
15
|
+
* The provided value is a getter function, not a raw map, so reading it inside a
|
|
16
|
+
* `$derived` in a descendant keeps the runes read reactive (context is captured
|
|
17
|
+
* once at component initialisation; closing over the live map keeps it live).
|
|
18
|
+
* Outside a running presentation the context is absent, so editor / read-only
|
|
19
|
+
* rendering is unaffected: consumers fall back to an empty map.
|
|
20
|
+
*/
|
|
21
|
+
/** Getter over the reactive per-element native-animation state map. */
|
|
22
|
+
export type PresentationElementStatesGetter = () => Map<string, ElementAnimationState>;
|
|
23
|
+
/**
|
|
24
|
+
* Exported (not just module-private) so tests can seed it directly via
|
|
25
|
+
* `mount(Component, { context: new Map([[PresentationElementStatesKey, () => map]]) })`
|
|
26
|
+
* without needing a full `PowerPointViewer` host tree.
|
|
27
|
+
*/
|
|
28
|
+
export declare const PresentationElementStatesKey: unique symbol;
|
|
29
|
+
/** Provide the element-states getter to the component subtree (root only). */
|
|
30
|
+
export declare function providePresentationElementStates(getStates: PresentationElementStatesGetter): void;
|
|
31
|
+
/**
|
|
32
|
+
* Read the presentation element-state for `elementId`, or `undefined` when no
|
|
33
|
+
* presentation is providing a map (editor / read-only rendering). Call inside a
|
|
34
|
+
* `$derived` so the read stays reactive.
|
|
35
|
+
*/
|
|
36
|
+
export declare function usePresentationElementState(elementId: string): ElementAnimationState | undefined;
|
|
37
|
+
//# sourceMappingURL=presentation-element-states-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation-element-states-context.d.ts","sourceRoot":"","sources":["../../../src/viewer/state/presentation-element-states-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAGhE;;;;;;;;;;;;;;;;;;GAkBG;AAEH,uEAAuE;AACvE,MAAM,MAAM,+BAA+B,GAAG,MAAM,GAAG,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;AAEvF;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,eAAoD,CAAC;AAE9F,8EAA8E;AAC9E,wBAAgB,gCAAgC,CAAC,SAAS,EAAE,+BAA+B,GAAG,IAAI,CAEjG;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,MAAM,GAAG,qBAAqB,GAAG,SAAS,CAKhG"}
|