fika-editor 3.0.2 → 3.0.4
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/README.md +8 -0
- package/dist/embed/{947.js → 183.js} +25 -31
- package/dist/embed/_e2e-statika.json +10909 -0
- package/dist/embed/agentic-manifest.json +4 -4
- package/dist/embed/chunks/{9121.js → 1091.js} +1 -1
- package/dist/embed/chunks/112.js +64 -0
- package/dist/embed/chunks/1131.css +1 -1
- package/dist/embed/chunks/1131.js +1 -1
- package/dist/embed/chunks/{7854.js → 1483.js} +1 -1
- package/dist/embed/chunks/1488.js +93 -0
- package/dist/embed/chunks/1668.js +1 -1
- package/dist/embed/chunks/1742.js +90 -0
- package/dist/embed/chunks/190.js +1 -0
- package/dist/embed/chunks/2062.js +94 -0
- package/dist/embed/chunks/{1904.js → 2214.js} +1 -1
- package/dist/embed/chunks/2395.js +1 -0
- package/dist/embed/chunks/2595.js +1 -0
- package/dist/embed/chunks/{7594.js → 2619.js} +1 -1
- package/dist/embed/chunks/2638.js +1 -0
- package/dist/embed/chunks/2807.js +1 -1
- package/dist/embed/chunks/2853.js +1 -0
- package/dist/embed/chunks/2982.js +24 -0
- package/dist/embed/chunks/3009.js +1 -0
- package/dist/embed/chunks/3017.js +1 -0
- package/dist/embed/chunks/3084.js +27 -0
- package/dist/embed/chunks/3270.js +62 -0
- package/dist/embed/chunks/3275.js +226 -0
- package/dist/embed/chunks/3312.js +1 -0
- package/dist/embed/chunks/3671.js +1 -0
- package/dist/embed/chunks/4000.js +23 -0
- package/dist/embed/chunks/4392.js +41 -0
- package/dist/embed/chunks/4467.js +1 -1
- package/dist/embed/chunks/451.js +32 -0
- package/dist/embed/chunks/4630.js +148 -0
- package/dist/embed/chunks/4764.js +1 -0
- package/dist/embed/chunks/{4552.js → 4779.js} +1 -1
- package/dist/embed/chunks/4929.js +215 -0
- package/dist/embed/chunks/4936.js +12 -12
- package/dist/embed/chunks/4975.js +98 -97
- package/dist/embed/chunks/5216.js +1 -1
- package/dist/embed/chunks/5250.js +153 -1
- package/dist/embed/chunks/529.js +36 -0
- package/dist/embed/chunks/5428.js +1 -0
- package/dist/embed/chunks/{4619.js → 549.js} +2 -2
- package/dist/embed/chunks/5493.js +1 -0
- package/dist/embed/chunks/5681.js +1 -0
- package/dist/embed/chunks/5863.js +1 -0
- package/dist/embed/chunks/612.js +1 -0
- package/dist/embed/chunks/6520.js +1 -0
- package/dist/embed/chunks/6762.js +1 -0
- package/dist/embed/chunks/6771.js +1 -0
- package/dist/embed/chunks/7029.js +1 -0
- package/dist/embed/chunks/7057.js +1 -0
- package/dist/embed/chunks/7091.js +1 -0
- package/dist/embed/chunks/718.js +1 -0
- package/dist/embed/chunks/7276.js +79 -0
- package/dist/embed/chunks/7305.js +115 -0
- package/dist/embed/chunks/7463.js +1 -1
- package/dist/embed/chunks/7471.js +1 -0
- package/dist/embed/chunks/7798.js +1 -0
- package/dist/embed/chunks/788.js +29 -19
- package/dist/embed/chunks/7946.js +1 -0
- package/dist/embed/chunks/{3729.js → 8407.js} +16 -4
- package/dist/embed/chunks/8628.js +1 -0
- package/dist/embed/chunks/8665.js +1 -0
- package/dist/embed/chunks/9009.js +1 -0
- package/dist/embed/chunks/9010.js +1 -0
- package/dist/embed/chunks/9256.js +8 -0
- package/dist/embed/chunks/9464.js +77 -0
- package/dist/embed/chunks/9678.js +1 -0
- package/dist/embed/chunks/{273.js → 9686.js} +1 -1
- package/dist/embed/chunks/9918.js +138 -0
- package/dist/embed/fika-embed.css +1 -1
- package/dist/embed/fika-embed.js +9 -3
- package/dist/types/components/Draggable.d.ts +1 -1
- package/dist/types/components/Slider.d.ts +1 -0
- package/dist/types/configs/animation.d.ts +1 -1
- package/dist/types/configs/transitions.d.ts +28 -0
- package/dist/types/embed/agentic/types.d.ts +7 -0
- package/dist/types/embed/types.d.ts +8 -0
- package/dist/types/i18n/i18n-types.d.ts +202 -34
- package/dist/types/paint/rasterResources.d.ts +7 -0
- package/dist/types/paint/scheduler.d.ts +17 -0
- package/dist/types/paint/slidePainter.d.ts +17 -0
- package/dist/types/paint/textPainter.d.ts +31 -0
- package/dist/types/store/importConfirm.d.ts +6 -1
- package/dist/types/store/index.d.ts +2 -2
- package/dist/types/store/slides.d.ts +14 -5
- package/dist/types/types/slides.d.ts +3 -2
- package/dist/types/utils/elementOutline.d.ts +33 -3
- package/dist/types/utils/exportFonts.d.ts +7 -3
- package/dist/types/utils/importApply.d.ts +10 -0
- package/dist/types/utils/importTransition.d.ts +19 -0
- package/dist/types/utils/layerStack.d.ts +24 -0
- package/dist/types/utils/liveElementOffset.d.ts +6 -5
- package/dist/types/utils/mediaIntern.d.ts +9 -0
- package/dist/types/utils/textFit.d.ts +14 -6
- package/dist/types/views/Editor/Canvas/LayerStackPanel.d.ts +14 -0
- package/dist/types/views/Editor/Toolbar/common/ElementOutline.d.ts +2 -0
- package/dist/types/views/components/ThumbnailSlide/CanvasSlideThumb.d.ts +11 -0
- package/dist/types/views/components/ThumbnailSlide/index.d.ts +2 -7
- package/package.json +21 -17
- package/dist/embed/chunks/1169.js +0 -1
- package/dist/embed/chunks/1505.js +0 -8
- package/dist/embed/chunks/1605.js +0 -1
- package/dist/embed/chunks/1804.js +0 -8
- package/dist/embed/chunks/1916.js +0 -1
- package/dist/embed/chunks/1932.js +0 -1
- package/dist/embed/chunks/2143.js +0 -62
- package/dist/embed/chunks/2246.js +0 -1
- package/dist/embed/chunks/2289.js +0 -80
- package/dist/embed/chunks/2632.js +0 -1
- package/dist/embed/chunks/2796.js +0 -34
- package/dist/embed/chunks/3088.js +0 -1
- package/dist/embed/chunks/3443.js +0 -1
- package/dist/embed/chunks/3581.js +0 -77
- package/dist/embed/chunks/397.js +0 -1
- package/dist/embed/chunks/4335.js +0 -1
- package/dist/embed/chunks/435.js +0 -1
- package/dist/embed/chunks/4354.js +0 -27
- package/dist/embed/chunks/4359.js +0 -1
- package/dist/embed/chunks/4515.js +0 -1
- package/dist/embed/chunks/4607.js +0 -1
- package/dist/embed/chunks/4625.js +0 -153
- package/dist/embed/chunks/4794.js +0 -1
- package/dist/embed/chunks/4891.js +0 -226
- package/dist/embed/chunks/5026.js +0 -1
- package/dist/embed/chunks/5480.js +0 -1
- package/dist/embed/chunks/5659.js +0 -64
- package/dist/embed/chunks/5792.js +0 -141
- package/dist/embed/chunks/5889.js +0 -1
- package/dist/embed/chunks/5901.js +0 -1
- package/dist/embed/chunks/6014.js +0 -1
- package/dist/embed/chunks/627.js +0 -115
- package/dist/embed/chunks/6522.js +0 -1
- package/dist/embed/chunks/6567.js +0 -1
- package/dist/embed/chunks/6778.js +0 -1
- package/dist/embed/chunks/6999.js +0 -93
- package/dist/embed/chunks/7048.js +0 -1
- package/dist/embed/chunks/7101.js +0 -1
- package/dist/embed/chunks/717.js +0 -148
- package/dist/embed/chunks/7175.js +0 -90
- package/dist/embed/chunks/7311.js +0 -23
- package/dist/embed/chunks/7376.js +0 -1
- package/dist/embed/chunks/7588.js +0 -41
- package/dist/embed/chunks/7916.js +0 -79
- package/dist/embed/chunks/809.js +0 -1
- package/dist/embed/chunks/810.js +0 -1
- package/dist/embed/chunks/8212.js +0 -36
- package/dist/embed/chunks/8239.js +0 -1
- package/dist/embed/chunks/8620.js +0 -1
- package/dist/embed/chunks/8716.js +0 -215
- package/dist/embed/chunks/8941.js +0 -1
- package/dist/embed/chunks/9465.js +0 -5
- package/dist/embed/chunks/9761.js +0 -1
- package/dist/embed/chunks/9976.js +0 -1
- package/dist/types/views/components/ThumbnailSlide/LiveSlideThumb.d.ts +0 -21
- package/dist/types/views/components/ThumbnailSlide/thumbSnapshot.d.ts +0 -54
- /package/dist/embed/{947.css → 183.css} +0 -0
|
@@ -7,7 +7,7 @@ type ItemRender = (args: {
|
|
|
7
7
|
}) => ReactNode;
|
|
8
8
|
type OverlayRender = (paint: OverlayPaint) => ReactNode;
|
|
9
9
|
type VirtualizerApi = ThumbnailVirtualizerApi;
|
|
10
|
-
/** Drag ghost for slide rails: the
|
|
10
|
+
/** Drag ghost for slide rails: the same direct-canvas thumbnail path. */
|
|
11
11
|
export declare const slideDragOverlay: OverlayRender;
|
|
12
12
|
export default function Draggable({ modelValue, list, itemKey, item, children, className, onEnd, onUpdateModelValue, onContextMenu, disabled, handle, scrollRef, virtualItems, virtualizer, totalSize, overlayRender, }: {
|
|
13
13
|
modelValue?: any[];
|
|
@@ -259,7 +259,7 @@ interface SlideAnimation {
|
|
|
259
259
|
label: string;
|
|
260
260
|
value: TurningMode;
|
|
261
261
|
}
|
|
262
|
-
/** Default slide-to-slide transition when a slide has no turningMode (
|
|
262
|
+
/** Default slide-to-slide transition when a slide has no turningMode (Rise). */
|
|
263
263
|
export declare const DEFAULT_TURNING_MODE: TurningMode;
|
|
264
264
|
/** Locale-free slide transition values. Resolve labels via getSlideAnimations(). */
|
|
265
265
|
export declare const SLIDE_ANIMATIONS: {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { TurningGroup, TurningMode } from '../types/slides';
|
|
2
|
+
export type SlideTransitionExport = {
|
|
3
|
+
type: string;
|
|
4
|
+
direction?: string;
|
|
5
|
+
duration?: number;
|
|
6
|
+
thruBlk?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type SlideTransitionDef = {
|
|
9
|
+
value: TurningMode;
|
|
10
|
+
group: TurningGroup;
|
|
11
|
+
/** Shown in the Transition panel. Legacy modes stay playable/exportable. */
|
|
12
|
+
picker: boolean;
|
|
13
|
+
/** Included when turningMode is `random`. */
|
|
14
|
+
randomPool: boolean;
|
|
15
|
+
duration: number;
|
|
16
|
+
export?: SlideTransitionExport;
|
|
17
|
+
};
|
|
18
|
+
/** Curated ink-style transitions first; legacy keys remain for existing decks. */
|
|
19
|
+
export declare const SLIDE_TRANSITION_DEFS: SlideTransitionDef[];
|
|
20
|
+
export declare const TURNING_MODES: TurningMode[];
|
|
21
|
+
export declare const SLIDE_ANIMATION_PICKER: TurningMode[];
|
|
22
|
+
export declare const SLIDE_ANIMATION_GROUPS: TurningGroup[];
|
|
23
|
+
export declare const RANDOM_TURNING_MODES: Exclude<TurningMode, 'random' | 'no'>[];
|
|
24
|
+
export declare const getTransitionDef: (mode?: TurningMode) => SlideTransitionDef;
|
|
25
|
+
export declare const getTurningDurationMs: (mode?: TurningMode) => number;
|
|
26
|
+
export declare const turningDurationVars: (mode?: TurningMode) => Record<string, string>;
|
|
27
|
+
export declare const transitionExportForMode: (mode?: TurningMode) => SlideTransitionExport | undefined;
|
|
28
|
+
export declare const pickerModesForGroup: (group: TurningGroup) => TurningMode[];
|
|
@@ -49,6 +49,13 @@ export interface FikaImportDocumentOptions {
|
|
|
49
49
|
* Ignored on the agentic JSON path (never shows a dialog).
|
|
50
50
|
*/
|
|
51
51
|
confirm?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Override imported transitions. A single mode applies to every slide;
|
|
54
|
+
* an array or 0-/1-based index map sets individual slides.
|
|
55
|
+
*/
|
|
56
|
+
turningMode?: TurningMode | Array<TurningMode | null | undefined> | Record<number, TurningMode>;
|
|
57
|
+
/** Fallback when a slide has no transition and no per-slide override. Defaults to Rise. */
|
|
58
|
+
defaultTurningMode?: TurningMode;
|
|
52
59
|
}
|
|
53
60
|
export type FikaDocumentImportPayload = FikaDeckInput | ({
|
|
54
61
|
document: FikaDeckInput;
|
|
@@ -152,6 +152,14 @@ export interface FikaImportPptxOptions {
|
|
|
152
152
|
* leave off for genuine user files.
|
|
153
153
|
*/
|
|
154
154
|
fixContrast?: boolean;
|
|
155
|
+
/**
|
|
156
|
+
* Override imported transitions. A single mode applies to every slide;
|
|
157
|
+
* an array or 0-/1-based index map sets individual slides. Missing entries
|
|
158
|
+
* keep the file transition, or Rise when the file has none.
|
|
159
|
+
*/
|
|
160
|
+
turningMode?: import('../types/slides').TurningMode | Array<import('../types/slides').TurningMode | null | undefined> | Record<number, import('../types/slides').TurningMode>;
|
|
161
|
+
/** Fallback when a slide has no file transition and no per-slide override. */
|
|
162
|
+
defaultTurningMode?: import('../types/slides').TurningMode;
|
|
155
163
|
}
|
|
156
164
|
/** Public embed controller: legacy host methods plus the generic command and domain APIs. */
|
|
157
165
|
export interface FikaController extends FikaAgentApi {
|
|
@@ -722,6 +722,16 @@ export type NamespaceCanvasTranslation = {
|
|
|
722
722
|
* Style panel stays closed when selecting text
|
|
723
723
|
*/
|
|
724
724
|
openPanelOnTextSelectionDisabled: string;
|
|
725
|
+
layerStack: {
|
|
726
|
+
/**
|
|
727
|
+
* Layers
|
|
728
|
+
*/
|
|
729
|
+
title: string;
|
|
730
|
+
/**
|
|
731
|
+
* Alt + Click · next layer
|
|
732
|
+
*/
|
|
733
|
+
hint: string;
|
|
734
|
+
};
|
|
725
735
|
shapeCreate: {
|
|
726
736
|
/**
|
|
727
737
|
* Draw freely · Enter to apply · Esc to discard
|
|
@@ -1449,49 +1459,99 @@ export type NamespaceConfigsTranslation = {
|
|
|
1449
1459
|
*/
|
|
1450
1460
|
no: string;
|
|
1451
1461
|
/**
|
|
1452
|
-
*
|
|
1462
|
+
* Fade
|
|
1453
1463
|
*/
|
|
1454
|
-
|
|
1464
|
+
fade: string;
|
|
1465
|
+
/**
|
|
1466
|
+
* Through ink
|
|
1467
|
+
*/
|
|
1468
|
+
throughInk: string;
|
|
1469
|
+
/**
|
|
1470
|
+
* Dissolve
|
|
1471
|
+
*/
|
|
1472
|
+
dissolve: string;
|
|
1455
1473
|
/**
|
|
1456
|
-
*
|
|
1474
|
+
* Push
|
|
1457
1475
|
*/
|
|
1458
1476
|
slideX: string;
|
|
1459
1477
|
/**
|
|
1460
|
-
*
|
|
1478
|
+
* Rise
|
|
1461
1479
|
*/
|
|
1462
1480
|
slideY: string;
|
|
1463
1481
|
/**
|
|
1464
|
-
*
|
|
1482
|
+
* Wipe
|
|
1465
1483
|
*/
|
|
1466
|
-
|
|
1484
|
+
wipe: string;
|
|
1467
1485
|
/**
|
|
1468
|
-
*
|
|
1486
|
+
* Reveal
|
|
1469
1487
|
*/
|
|
1470
|
-
|
|
1488
|
+
reveal: string;
|
|
1471
1489
|
/**
|
|
1472
|
-
*
|
|
1490
|
+
* Zoom
|
|
1473
1491
|
*/
|
|
1474
|
-
|
|
1492
|
+
scale: string;
|
|
1493
|
+
/**
|
|
1494
|
+
* Zoom out
|
|
1495
|
+
*/
|
|
1496
|
+
scaleReverse: string;
|
|
1497
|
+
/**
|
|
1498
|
+
* Morph
|
|
1499
|
+
*/
|
|
1500
|
+
morph: string;
|
|
1501
|
+
/**
|
|
1502
|
+
* Ripple
|
|
1503
|
+
*/
|
|
1504
|
+
ripple: string;
|
|
1505
|
+
/**
|
|
1506
|
+
* Doors
|
|
1507
|
+
*/
|
|
1508
|
+
doors: string;
|
|
1509
|
+
/**
|
|
1510
|
+
* Dive
|
|
1511
|
+
*/
|
|
1512
|
+
flythrough: string;
|
|
1475
1513
|
/**
|
|
1476
|
-
*
|
|
1514
|
+
* Flip
|
|
1515
|
+
*/
|
|
1516
|
+
slideX3D: string;
|
|
1517
|
+
/**
|
|
1518
|
+
* Flip vertical
|
|
1519
|
+
*/
|
|
1520
|
+
slideY3D: string;
|
|
1521
|
+
/**
|
|
1522
|
+
* Pivot
|
|
1477
1523
|
*/
|
|
1478
1524
|
rotate: string;
|
|
1479
1525
|
/**
|
|
1480
|
-
*
|
|
1526
|
+
* Stretch vertical
|
|
1481
1527
|
*/
|
|
1482
1528
|
scaleY: string;
|
|
1483
1529
|
/**
|
|
1484
|
-
*
|
|
1530
|
+
* Stretch
|
|
1485
1531
|
*/
|
|
1486
1532
|
scaleX: string;
|
|
1487
1533
|
/**
|
|
1488
|
-
*
|
|
1534
|
+
* Random
|
|
1489
1535
|
*/
|
|
1490
|
-
|
|
1536
|
+
random: string;
|
|
1537
|
+
};
|
|
1538
|
+
slideGroups: {
|
|
1491
1539
|
/**
|
|
1492
|
-
*
|
|
1540
|
+
* Atmosphere
|
|
1493
1541
|
*/
|
|
1494
|
-
|
|
1542
|
+
atmosphere: string;
|
|
1543
|
+
/**
|
|
1544
|
+
* Motion
|
|
1545
|
+
*/
|
|
1546
|
+
motion: string;
|
|
1547
|
+
/**
|
|
1548
|
+
* Depth
|
|
1549
|
+
*/
|
|
1550
|
+
depth: string;
|
|
1551
|
+
/**
|
|
1552
|
+
* Classic
|
|
1553
|
+
*/
|
|
1554
|
+
classic: string;
|
|
1495
1555
|
};
|
|
1496
1556
|
};
|
|
1497
1557
|
chart: {
|
|
@@ -1844,6 +1904,10 @@ export type NamespaceConfigsTranslation = {
|
|
|
1844
1904
|
* Cycle focus between elements
|
|
1845
1905
|
*/
|
|
1846
1906
|
cycleFocusElement: string;
|
|
1907
|
+
/**
|
|
1908
|
+
* Cycle layers under the cursor
|
|
1909
|
+
*/
|
|
1910
|
+
cycleLayersAtPoint: string;
|
|
1847
1911
|
/**
|
|
1848
1912
|
* Confirm image crop
|
|
1849
1913
|
*/
|
|
@@ -1970,6 +2034,10 @@ export type NamespaceConfigsTranslation = {
|
|
|
1970
2034
|
* Right-click
|
|
1971
2035
|
*/
|
|
1972
2036
|
rightClick: string;
|
|
2037
|
+
/**
|
|
2038
|
+
* Alt + click
|
|
2039
|
+
*/
|
|
2040
|
+
altClick: string;
|
|
1973
2041
|
/**
|
|
1974
2042
|
* L / right-click drag
|
|
1975
2043
|
*/
|
|
@@ -3471,6 +3539,22 @@ export type NamespaceEditorTranslation = {
|
|
|
3471
3539
|
* Keep current slides and append the imported ones.
|
|
3472
3540
|
*/
|
|
3473
3541
|
appendHint: string;
|
|
3542
|
+
/**
|
|
3543
|
+
* Transitions
|
|
3544
|
+
*/
|
|
3545
|
+
transitionLabel: string;
|
|
3546
|
+
/**
|
|
3547
|
+
* From file
|
|
3548
|
+
*/
|
|
3549
|
+
transitionKeep: string;
|
|
3550
|
+
/**
|
|
3551
|
+
* Keep each slide’s transition. Slides without one get Rise.
|
|
3552
|
+
*/
|
|
3553
|
+
transitionKeepHint: string;
|
|
3554
|
+
/**
|
|
3555
|
+
* Same on every slide
|
|
3556
|
+
*/
|
|
3557
|
+
transitionAll: string;
|
|
3474
3558
|
};
|
|
3475
3559
|
/**
|
|
3476
3560
|
* Language
|
|
@@ -5858,6 +5942,16 @@ export type TranslationFunctions = {
|
|
|
5858
5942
|
* Style panel stays closed when selecting text
|
|
5859
5943
|
*/
|
|
5860
5944
|
openPanelOnTextSelectionDisabled: () => LocalizedString;
|
|
5945
|
+
layerStack: {
|
|
5946
|
+
/**
|
|
5947
|
+
* Layers
|
|
5948
|
+
*/
|
|
5949
|
+
title: () => LocalizedString;
|
|
5950
|
+
/**
|
|
5951
|
+
* Alt + Click · next layer
|
|
5952
|
+
*/
|
|
5953
|
+
hint: () => LocalizedString;
|
|
5954
|
+
};
|
|
5861
5955
|
shapeCreate: {
|
|
5862
5956
|
/**
|
|
5863
5957
|
* Draw freely · Enter to apply · Esc to discard
|
|
@@ -6588,49 +6682,99 @@ export type TranslationFunctions = {
|
|
|
6588
6682
|
*/
|
|
6589
6683
|
no: () => LocalizedString;
|
|
6590
6684
|
/**
|
|
6591
|
-
*
|
|
6685
|
+
* Fade
|
|
6592
6686
|
*/
|
|
6593
|
-
|
|
6687
|
+
fade: () => LocalizedString;
|
|
6688
|
+
/**
|
|
6689
|
+
* Through ink
|
|
6690
|
+
*/
|
|
6691
|
+
throughInk: () => LocalizedString;
|
|
6692
|
+
/**
|
|
6693
|
+
* Dissolve
|
|
6694
|
+
*/
|
|
6695
|
+
dissolve: () => LocalizedString;
|
|
6594
6696
|
/**
|
|
6595
|
-
*
|
|
6697
|
+
* Push
|
|
6596
6698
|
*/
|
|
6597
6699
|
slideX: () => LocalizedString;
|
|
6598
6700
|
/**
|
|
6599
|
-
*
|
|
6701
|
+
* Rise
|
|
6600
6702
|
*/
|
|
6601
6703
|
slideY: () => LocalizedString;
|
|
6602
6704
|
/**
|
|
6603
|
-
*
|
|
6705
|
+
* Wipe
|
|
6604
6706
|
*/
|
|
6605
|
-
|
|
6707
|
+
wipe: () => LocalizedString;
|
|
6606
6708
|
/**
|
|
6607
|
-
*
|
|
6709
|
+
* Reveal
|
|
6608
6710
|
*/
|
|
6609
|
-
|
|
6711
|
+
reveal: () => LocalizedString;
|
|
6610
6712
|
/**
|
|
6611
|
-
*
|
|
6713
|
+
* Zoom
|
|
6612
6714
|
*/
|
|
6613
|
-
|
|
6715
|
+
scale: () => LocalizedString;
|
|
6716
|
+
/**
|
|
6717
|
+
* Zoom out
|
|
6718
|
+
*/
|
|
6719
|
+
scaleReverse: () => LocalizedString;
|
|
6720
|
+
/**
|
|
6721
|
+
* Morph
|
|
6722
|
+
*/
|
|
6723
|
+
morph: () => LocalizedString;
|
|
6724
|
+
/**
|
|
6725
|
+
* Ripple
|
|
6726
|
+
*/
|
|
6727
|
+
ripple: () => LocalizedString;
|
|
6728
|
+
/**
|
|
6729
|
+
* Doors
|
|
6730
|
+
*/
|
|
6731
|
+
doors: () => LocalizedString;
|
|
6732
|
+
/**
|
|
6733
|
+
* Dive
|
|
6734
|
+
*/
|
|
6735
|
+
flythrough: () => LocalizedString;
|
|
6614
6736
|
/**
|
|
6615
|
-
*
|
|
6737
|
+
* Flip
|
|
6738
|
+
*/
|
|
6739
|
+
slideX3D: () => LocalizedString;
|
|
6740
|
+
/**
|
|
6741
|
+
* Flip vertical
|
|
6742
|
+
*/
|
|
6743
|
+
slideY3D: () => LocalizedString;
|
|
6744
|
+
/**
|
|
6745
|
+
* Pivot
|
|
6616
6746
|
*/
|
|
6617
6747
|
rotate: () => LocalizedString;
|
|
6618
6748
|
/**
|
|
6619
|
-
*
|
|
6749
|
+
* Stretch vertical
|
|
6620
6750
|
*/
|
|
6621
6751
|
scaleY: () => LocalizedString;
|
|
6622
6752
|
/**
|
|
6623
|
-
*
|
|
6753
|
+
* Stretch
|
|
6624
6754
|
*/
|
|
6625
6755
|
scaleX: () => LocalizedString;
|
|
6626
6756
|
/**
|
|
6627
|
-
*
|
|
6757
|
+
* Random
|
|
6628
6758
|
*/
|
|
6629
|
-
|
|
6759
|
+
random: () => LocalizedString;
|
|
6760
|
+
};
|
|
6761
|
+
slideGroups: {
|
|
6630
6762
|
/**
|
|
6631
|
-
*
|
|
6763
|
+
* Atmosphere
|
|
6632
6764
|
*/
|
|
6633
|
-
|
|
6765
|
+
atmosphere: () => LocalizedString;
|
|
6766
|
+
/**
|
|
6767
|
+
* Motion
|
|
6768
|
+
*/
|
|
6769
|
+
motion: () => LocalizedString;
|
|
6770
|
+
/**
|
|
6771
|
+
* Depth
|
|
6772
|
+
*/
|
|
6773
|
+
depth: () => LocalizedString;
|
|
6774
|
+
/**
|
|
6775
|
+
* Classic
|
|
6776
|
+
*/
|
|
6777
|
+
classic: () => LocalizedString;
|
|
6634
6778
|
};
|
|
6635
6779
|
};
|
|
6636
6780
|
chart: {
|
|
@@ -6983,6 +7127,10 @@ export type TranslationFunctions = {
|
|
|
6983
7127
|
* Cycle focus between elements
|
|
6984
7128
|
*/
|
|
6985
7129
|
cycleFocusElement: () => LocalizedString;
|
|
7130
|
+
/**
|
|
7131
|
+
* Cycle layers under the cursor
|
|
7132
|
+
*/
|
|
7133
|
+
cycleLayersAtPoint: () => LocalizedString;
|
|
6986
7134
|
/**
|
|
6987
7135
|
* Confirm image crop
|
|
6988
7136
|
*/
|
|
@@ -7109,6 +7257,10 @@ export type TranslationFunctions = {
|
|
|
7109
7257
|
* Right-click
|
|
7110
7258
|
*/
|
|
7111
7259
|
rightClick: () => LocalizedString;
|
|
7260
|
+
/**
|
|
7261
|
+
* Alt + click
|
|
7262
|
+
*/
|
|
7263
|
+
altClick: () => LocalizedString;
|
|
7112
7264
|
/**
|
|
7113
7265
|
* L / right-click drag
|
|
7114
7266
|
*/
|
|
@@ -8626,6 +8778,22 @@ export type TranslationFunctions = {
|
|
|
8626
8778
|
* Keep current slides and append the imported ones.
|
|
8627
8779
|
*/
|
|
8628
8780
|
appendHint: () => LocalizedString;
|
|
8781
|
+
/**
|
|
8782
|
+
* Transitions
|
|
8783
|
+
*/
|
|
8784
|
+
transitionLabel: () => LocalizedString;
|
|
8785
|
+
/**
|
|
8786
|
+
* From file
|
|
8787
|
+
*/
|
|
8788
|
+
transitionKeep: () => LocalizedString;
|
|
8789
|
+
/**
|
|
8790
|
+
* Keep each slide’s transition. Slides without one get Rise.
|
|
8791
|
+
*/
|
|
8792
|
+
transitionKeepHint: () => LocalizedString;
|
|
8793
|
+
/**
|
|
8794
|
+
* Same on every slide
|
|
8795
|
+
*/
|
|
8796
|
+
transitionAll: () => LocalizedString;
|
|
8629
8797
|
};
|
|
8630
8798
|
/**
|
|
8631
8799
|
* Language
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PPTChartElement, PPTCodeElement, PPTMermaidElement } from '../types/slides';
|
|
2
|
+
type Raster = ImageBitmap | HTMLCanvasElement;
|
|
3
|
+
export declare const getChartRaster: (element: PPTChartElement, colors: string[], textColor: string, lineColor: string, invalidate: () => void) => Raster | undefined;
|
|
4
|
+
export declare const getMermaidRaster: (element: PPTMermaidElement, invalidate: () => void) => Raster | undefined;
|
|
5
|
+
export declare const getCodeRaster: (element: PPTCodeElement, invalidate: () => void) => Raster | undefined;
|
|
6
|
+
export declare const clearSlideRasterResources: () => void;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type PaintPriority = 'visible' | 'nearby' | 'background';
|
|
2
|
+
export declare const canvasPaintStats: {
|
|
3
|
+
paints: number;
|
|
4
|
+
cancelled: number;
|
|
5
|
+
maxQueue: number;
|
|
6
|
+
paintMs: number[];
|
|
7
|
+
};
|
|
8
|
+
export declare const scheduleSlidePaint: (key: string, paint: () => void, priority?: PaintPriority) => () => void;
|
|
9
|
+
export declare const readCanvasPaintReport: () => {
|
|
10
|
+
paints: number;
|
|
11
|
+
cancelled: number;
|
|
12
|
+
maxQueue: number;
|
|
13
|
+
paintMs: number[];
|
|
14
|
+
paintMsAvg: number;
|
|
15
|
+
paintMsMax: number;
|
|
16
|
+
queued: number;
|
|
17
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Slide, SlideTheme } from '../types/slides';
|
|
2
|
+
export type PaintSlideOptions = {
|
|
3
|
+
slide: Slide;
|
|
4
|
+
theme: SlideTheme;
|
|
5
|
+
viewportSize: number;
|
|
6
|
+
viewportRatio: number;
|
|
7
|
+
cssWidth: number;
|
|
8
|
+
cssHeight?: number;
|
|
9
|
+
dpr?: number;
|
|
10
|
+
invalidate: () => void;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Direct Slide JSON -> final-DPR canvas paint. No DOM tree, foreignObject
|
|
14
|
+
* capture, intermediate PNG, or CSS-scale resampling is involved.
|
|
15
|
+
*/
|
|
16
|
+
export declare const paintSlideToCanvas: (canvas: HTMLCanvasElement, options: PaintSlideOptions) => void;
|
|
17
|
+
export declare const clearSlidePathCache: () => void;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { TextAlign, TextAlignVertical } from '../types/slides';
|
|
2
|
+
export type CanvasTextPaintOptions = {
|
|
3
|
+
html: string;
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
defaultFontFamily: string;
|
|
9
|
+
defaultColor: string;
|
|
10
|
+
defaultSize?: number;
|
|
11
|
+
lineHeight?: number;
|
|
12
|
+
letterSpacing?: number;
|
|
13
|
+
paragraphSpace?: number;
|
|
14
|
+
inset?: [number, number, number, number];
|
|
15
|
+
vAlign?: TextAlignVertical;
|
|
16
|
+
align?: TextAlign;
|
|
17
|
+
fit?: boolean;
|
|
18
|
+
opacity?: number;
|
|
19
|
+
vertical?: boolean;
|
|
20
|
+
shadow?: {
|
|
21
|
+
h: number;
|
|
22
|
+
v: number;
|
|
23
|
+
blur: number;
|
|
24
|
+
color: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Paint ProseMirror HTML without mounting DOM. Pretext owns Unicode-aware
|
|
29
|
+
* wrapping; Canvas owns glyph shaping and rasterization at the final DPR.
|
|
30
|
+
*/
|
|
31
|
+
export declare const paintRichText: (ctx: CanvasRenderingContext2D, options: CanvasTextPaintOptions) => number;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import type { ImportApplyMode } from '../utils/importApply';
|
|
2
|
-
|
|
2
|
+
import type { TurningMode } from '../types/slides';
|
|
3
|
+
export type ImportTransitionChoice = 'keep' | TurningMode;
|
|
4
|
+
export type ImportConfirmChoice = {
|
|
5
|
+
apply: ImportApplyMode;
|
|
6
|
+
turningMode: ImportTransitionChoice;
|
|
7
|
+
} | null;
|
|
3
8
|
export interface ImportConfirmState {
|
|
4
9
|
visible: boolean;
|
|
5
10
|
slideCount: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useMainStore, selectHandleElement, selectActiveElementList } from './main';
|
|
2
|
-
import { useSlidesStore, selectCurrentSlide, selectSlideById, selectCurrentSlideAnimations, selectFormatedAnimations, selectSlideId, selectElementById, selectIsEmptySlide } from './slides';
|
|
2
|
+
import { useSlidesStore, selectCurrentSlide, selectSlideById, selectCurrentSlideAnimations, selectFormatedAnimations, selectElementWaitsForInAnimation, selectSlideId, selectElementById, selectIsEmptySlide } from './slides';
|
|
3
3
|
import { useSnapshotStore, selectCanUndo, selectCanRedo } from './snapshot';
|
|
4
4
|
import { useKeyboardStore, selectCtrlOrShiftKeyActive, syncPointerModifiers } from './keyboard';
|
|
5
5
|
import { useScreenStore } from './screen';
|
|
@@ -7,4 +7,4 @@ import { useImportConfirmStore } from './importConfirm';
|
|
|
7
7
|
export declare const useActiveElementList: () => import("../embed").PPTElement[];
|
|
8
8
|
export declare const useCurrentSlideAnimations: () => import("../embed").PPTAnimation[];
|
|
9
9
|
export declare const useFormatedAnimations: () => import("./slides").FormatedAnimation[];
|
|
10
|
-
export { useMainStore, selectHandleElement, selectActiveElementList, useSlidesStore, selectCurrentSlide, selectSlideById, selectIsEmptySlide, selectCurrentSlideAnimations, selectFormatedAnimations, selectSlideId, selectElementById, useSnapshotStore, selectCanUndo, selectCanRedo, useKeyboardStore, selectCtrlOrShiftKeyActive, syncPointerModifiers, useScreenStore, useImportConfirmStore, };
|
|
10
|
+
export { useMainStore, selectHandleElement, selectActiveElementList, useSlidesStore, selectCurrentSlide, selectSlideById, selectIsEmptySlide, selectCurrentSlideAnimations, selectFormatedAnimations, selectElementWaitsForInAnimation, selectSlideId, selectElementById, useSnapshotStore, selectCanUndo, selectCanRedo, useKeyboardStore, selectCtrlOrShiftKeyActive, syncPointerModifiers, useScreenStore, useImportConfirmStore, };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Slide, SlideTheme, PPTElement, PPTAnimation, SlideTemplate, ImportedSlideTemplate } from '../types/slides';
|
|
1
|
+
import type { Slide, SlideTheme, PPTElement, PPTAnimation, SlideTemplate, ImportedSlideTemplate, TurningMode } from '../types/slides';
|
|
2
2
|
export type AddSlideOptions = {
|
|
3
3
|
index?: number;
|
|
4
4
|
select?: boolean;
|
|
@@ -27,6 +27,8 @@ export interface SlidesState {
|
|
|
27
27
|
viewportRatio: number;
|
|
28
28
|
templates: SlideTemplate[];
|
|
29
29
|
importedTemplates: ImportedSlideTemplate[];
|
|
30
|
+
/** Used for newly added slides after "Use on every slide". Defaults to Rise. */
|
|
31
|
+
defaultTurningMode: TurningMode;
|
|
30
32
|
}
|
|
31
33
|
export interface SlidesActions {
|
|
32
34
|
setTitle: (title: string) => void;
|
|
@@ -46,6 +48,7 @@ export interface SlidesActions {
|
|
|
46
48
|
moveSlide: (fromIndex: number, toIndex: number) => void;
|
|
47
49
|
reorderSlides: (oldIndex: number, newIndex: number) => void;
|
|
48
50
|
updateSlideIndex: (index: number) => void;
|
|
51
|
+
setDefaultTurningMode: (mode: TurningMode) => void;
|
|
49
52
|
addElement: (element: PPTElement | PPTElement[]) => void;
|
|
50
53
|
deleteElement: (elementId: string | string[]) => void;
|
|
51
54
|
updateElement: (data: UpdateElementData) => void;
|
|
@@ -65,6 +68,8 @@ export declare const selectSlideId: (state: SlidesState) => string;
|
|
|
65
68
|
export declare const selectElementById: (id: string) => (state: SlidesState) => PPTElement | undefined;
|
|
66
69
|
export declare const selectCurrentSlideAnimations: (state: SlidesState) => PPTAnimation[];
|
|
67
70
|
export declare const selectFormatedAnimations: (state: SlidesState) => FormatedAnimation[];
|
|
71
|
+
/** Whether this element is still waiting for an unplayed enter animation. */
|
|
72
|
+
export declare const selectElementWaitsForInAnimation: (state: SlidesState, elementId: string, animationIndex: number) => boolean;
|
|
68
73
|
export declare const useSlidesStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<SlidesStore>, "setState"> & {
|
|
69
74
|
setState(nextStateOrUpdater: Partial<SlidesStore> | ((state: {
|
|
70
75
|
title: string;
|
|
@@ -849,7 +854,7 @@ export declare const useSlidesStore: import("zustand").UseBoundStore<Omit<import
|
|
|
849
854
|
duration: number;
|
|
850
855
|
trigger: import("../types/slides").AnimationTrigger;
|
|
851
856
|
}[];
|
|
852
|
-
turningMode?:
|
|
857
|
+
turningMode?: TurningMode;
|
|
853
858
|
sectionTag?: {
|
|
854
859
|
id: string;
|
|
855
860
|
title?: string;
|
|
@@ -1631,7 +1636,7 @@ export declare const useSlidesStore: import("zustand").UseBoundStore<Omit<import
|
|
|
1631
1636
|
duration: number;
|
|
1632
1637
|
trigger: import("../types/slides").AnimationTrigger;
|
|
1633
1638
|
}[];
|
|
1634
|
-
turningMode?:
|
|
1639
|
+
turningMode?: TurningMode;
|
|
1635
1640
|
sectionTag?: {
|
|
1636
1641
|
id: string;
|
|
1637
1642
|
title?: string;
|
|
@@ -1661,6 +1666,7 @@ export declare const useSlidesStore: import("zustand").UseBoundStore<Omit<import
|
|
|
1661
1666
|
width: number;
|
|
1662
1667
|
height: number;
|
|
1663
1668
|
}[];
|
|
1669
|
+
defaultTurningMode: TurningMode;
|
|
1664
1670
|
setTitle: (title: string) => void;
|
|
1665
1671
|
setTheme: (themeProps: Partial<SlideTheme>) => void;
|
|
1666
1672
|
setViewportSize: (size: number) => void;
|
|
@@ -1678,6 +1684,7 @@ export declare const useSlidesStore: import("zustand").UseBoundStore<Omit<import
|
|
|
1678
1684
|
moveSlide: (fromIndex: number, toIndex: number) => void;
|
|
1679
1685
|
reorderSlides: (oldIndex: number, newIndex: number) => void;
|
|
1680
1686
|
updateSlideIndex: (index: number) => void;
|
|
1687
|
+
setDefaultTurningMode: (mode: TurningMode) => void;
|
|
1681
1688
|
addElement: (element: PPTElement | PPTElement[]) => void;
|
|
1682
1689
|
deleteElement: (elementId: string | string[]) => void;
|
|
1683
1690
|
updateElement: (data: UpdateElementData) => void;
|
|
@@ -2466,7 +2473,7 @@ export declare const useSlidesStore: import("zustand").UseBoundStore<Omit<import
|
|
|
2466
2473
|
duration: number;
|
|
2467
2474
|
trigger: import("../types/slides").AnimationTrigger;
|
|
2468
2475
|
}[];
|
|
2469
|
-
turningMode?:
|
|
2476
|
+
turningMode?: TurningMode;
|
|
2470
2477
|
sectionTag?: {
|
|
2471
2478
|
id: string;
|
|
2472
2479
|
title?: string;
|
|
@@ -3248,7 +3255,7 @@ export declare const useSlidesStore: import("zustand").UseBoundStore<Omit<import
|
|
|
3248
3255
|
duration: number;
|
|
3249
3256
|
trigger: import("../types/slides").AnimationTrigger;
|
|
3250
3257
|
}[];
|
|
3251
|
-
turningMode?:
|
|
3258
|
+
turningMode?: TurningMode;
|
|
3252
3259
|
sectionTag?: {
|
|
3253
3260
|
id: string;
|
|
3254
3261
|
title?: string;
|
|
@@ -3278,6 +3285,7 @@ export declare const useSlidesStore: import("zustand").UseBoundStore<Omit<import
|
|
|
3278
3285
|
width: number;
|
|
3279
3286
|
height: number;
|
|
3280
3287
|
}[];
|
|
3288
|
+
defaultTurningMode: TurningMode;
|
|
3281
3289
|
setTitle: (title: string) => void;
|
|
3282
3290
|
setTheme: (themeProps: Partial<SlideTheme>) => void;
|
|
3283
3291
|
setViewportSize: (size: number) => void;
|
|
@@ -3295,6 +3303,7 @@ export declare const useSlidesStore: import("zustand").UseBoundStore<Omit<import
|
|
|
3295
3303
|
moveSlide: (fromIndex: number, toIndex: number) => void;
|
|
3296
3304
|
reorderSlides: (oldIndex: number, newIndex: number) => void;
|
|
3297
3305
|
updateSlideIndex: (index: number) => void;
|
|
3306
|
+
setDefaultTurningMode: (mode: TurningMode) => void;
|
|
3298
3307
|
addElement: (element: PPTElement | PPTElement[]) => void;
|
|
3299
3308
|
deleteElement: (elementId: string | string[]) => void;
|
|
3300
3309
|
updateElement: (data: UpdateElementData) => void;
|
|
@@ -113,7 +113,7 @@ export interface StructuredTextBody {
|
|
|
113
113
|
* style?: solid or dashed
|
|
114
114
|
* width?: stroke width
|
|
115
115
|
* color?: stroke color
|
|
116
|
-
* radius?:
|
|
116
|
+
* radius?: 0–1 of max rounding (ECMA-376 / pptxgenjs `rectRadius`). Values > 1 are legacy px.
|
|
117
117
|
*/
|
|
118
118
|
export interface PPTElementOutline {
|
|
119
119
|
style?: LineStyleType;
|
|
@@ -515,7 +515,8 @@ export interface SlideBackground {
|
|
|
515
515
|
image?: SlideBackgroundImage;
|
|
516
516
|
gradient?: Gradient;
|
|
517
517
|
}
|
|
518
|
-
export type TurningMode = 'no' | 'fade' | 'slideX' | 'slideY' | '
|
|
518
|
+
export type TurningMode = 'no' | 'fade' | 'throughInk' | 'dissolve' | 'slideX' | 'slideY' | 'wipe' | 'reveal' | 'scale' | 'scaleReverse' | 'morph' | 'ripple' | 'doors' | 'flythrough' | 'slideX3D' | 'slideY3D' | 'rotate' | 'scaleY' | 'scaleX' | 'random';
|
|
519
|
+
export type TurningGroup = 'atmosphere' | 'motion' | 'depth' | 'classic';
|
|
519
520
|
export interface NoteReply {
|
|
520
521
|
id: string;
|
|
521
522
|
content: string;
|