fika-editor 3.0.2 → 3.0.3

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.
Files changed (46) hide show
  1. package/README.md +8 -0
  2. package/dist/embed/{947.js → 183.js} +15 -15
  3. package/dist/embed/_e2e-statika.json +10909 -0
  4. package/dist/embed/agentic-manifest.json +4 -4
  5. package/dist/embed/chunks/1131.css +1 -1
  6. package/dist/embed/chunks/1131.js +1 -1
  7. package/dist/embed/chunks/1668.js +1 -1
  8. package/dist/embed/chunks/2595.js +1 -0
  9. package/dist/embed/chunks/2807.js +1 -1
  10. package/dist/embed/chunks/4467.js +1 -1
  11. package/dist/embed/chunks/5216.js +1 -1
  12. package/dist/embed/fika-embed.css +1 -1
  13. package/dist/embed/fika-embed.js +9 -3
  14. package/dist/types/components/Draggable.d.ts +1 -1
  15. package/dist/types/components/Slider.d.ts +1 -0
  16. package/dist/types/configs/animation.d.ts +1 -1
  17. package/dist/types/configs/transitions.d.ts +28 -0
  18. package/dist/types/embed/agentic/types.d.ts +7 -0
  19. package/dist/types/embed/types.d.ts +8 -0
  20. package/dist/types/i18n/i18n-types.d.ts +202 -34
  21. package/dist/types/paint/rasterResources.d.ts +7 -0
  22. package/dist/types/paint/scheduler.d.ts +17 -0
  23. package/dist/types/paint/slidePainter.d.ts +17 -0
  24. package/dist/types/paint/textPainter.d.ts +31 -0
  25. package/dist/types/store/importConfirm.d.ts +6 -1
  26. package/dist/types/store/slides.d.ts +12 -5
  27. package/dist/types/types/slides.d.ts +3 -2
  28. package/dist/types/utils/elementOutline.d.ts +33 -3
  29. package/dist/types/utils/exportFonts.d.ts +7 -3
  30. package/dist/types/utils/importApply.d.ts +10 -0
  31. package/dist/types/utils/importTransition.d.ts +19 -0
  32. package/dist/types/utils/layerStack.d.ts +24 -0
  33. package/dist/types/utils/liveElementOffset.d.ts +6 -5
  34. package/dist/types/utils/mediaIntern.d.ts +9 -0
  35. package/dist/types/utils/textFit.d.ts +14 -6
  36. package/dist/types/views/Editor/Canvas/LayerStackPanel.d.ts +14 -0
  37. package/dist/types/views/Editor/Toolbar/common/ElementOutline.d.ts +2 -0
  38. package/dist/types/views/components/ThumbnailSlide/CanvasSlideThumb.d.ts +11 -0
  39. package/dist/types/views/components/ThumbnailSlide/index.d.ts +2 -7
  40. package/package.json +15 -11
  41. package/dist/embed/chunks/1505.js +0 -8
  42. package/dist/embed/chunks/1932.js +0 -1
  43. package/dist/embed/chunks/5901.js +0 -1
  44. package/dist/types/views/components/ThumbnailSlide/LiveSlideThumb.d.ts +0 -21
  45. package/dist/types/views/components/ThumbnailSlide/thumbSnapshot.d.ts +0 -54
  46. /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 live slide DOM at thumb size. */
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[];
@@ -6,6 +6,7 @@ type SliderBaseProps = {
6
6
  step?: number;
7
7
  className?: string;
8
8
  style?: CSSProperties;
9
+ tooltipSuffix?: string;
9
10
  'data-tooltip'?: string;
10
11
  'data-style-slider'?: string;
11
12
  };
@@ -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 (PowerPoint-style: none). */
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
  * S​t​y​l​e​ ​p​a​n​e​l​ ​s​t​a​y​s​ ​c​l​o​s​e​d​ ​w​h​e​n​ ​s​e​l​e​c​t​i​n​g​ ​t​e​x​t
723
723
  */
724
724
  openPanelOnTextSelectionDisabled: string;
725
+ layerStack: {
726
+ /**
727
+ * L​a​y​e​r​s
728
+ */
729
+ title: string;
730
+ /**
731
+ * A​l​t​ ​+​ ​C​l​i​c​k​ ​·​ ​n​e​x​t​ ​l​a​y​e​r
732
+ */
733
+ hint: string;
734
+ };
725
735
  shapeCreate: {
726
736
  /**
727
737
  * D​r​a​w​ ​f​r​e​e​l​y​ ​·​ ​E​n​t​e​r​ ​t​o​ ​a​p​p​l​y​ ​·​ ​E​s​c​ ​t​o​ ​d​i​s​c​a​r​d
@@ -1449,49 +1459,99 @@ export type NamespaceConfigsTranslation = {
1449
1459
  */
1450
1460
  no: string;
1451
1461
  /**
1452
- * R​a​n​d​o​m
1462
+ * F​a​d​e
1453
1463
  */
1454
- random: string;
1464
+ fade: string;
1465
+ /**
1466
+ * T​h​r​o​u​g​h​ ​i​n​k
1467
+ */
1468
+ throughInk: string;
1469
+ /**
1470
+ * D​i​s​s​o​l​v​e
1471
+ */
1472
+ dissolve: string;
1455
1473
  /**
1456
- * H​o​r​i​z​o​n​t​a​l​ ​s​l​i​d​e
1474
+ * P​u​s​h
1457
1475
  */
1458
1476
  slideX: string;
1459
1477
  /**
1460
- * V​e​r​t​i​c​a​l​ ​s​l​i​d​e
1478
+ * R​i​s​e
1461
1479
  */
1462
1480
  slideY: string;
1463
1481
  /**
1464
- * H​o​r​i​z​o​n​t​a​l​ ​s​l​i​d​e​ ​(​3​D​)
1482
+ * W​i​p​e
1465
1483
  */
1466
- slideX3D: string;
1484
+ wipe: string;
1467
1485
  /**
1468
- * V​e​r​t​i​c​a​l​ ​s​l​i​d​e​ ​(​3​D​)
1486
+ * R​e​v​e​a​l
1469
1487
  */
1470
- slideY3D: string;
1488
+ reveal: string;
1471
1489
  /**
1472
- * F​a​d​e
1490
+ * Z​o​o​m
1473
1491
  */
1474
- fade: string;
1492
+ scale: string;
1493
+ /**
1494
+ * Z​o​o​m​ ​o​u​t
1495
+ */
1496
+ scaleReverse: string;
1497
+ /**
1498
+ * M​o​r​p​h
1499
+ */
1500
+ morph: string;
1501
+ /**
1502
+ * R​i​p​p​l​e
1503
+ */
1504
+ ripple: string;
1505
+ /**
1506
+ * D​o​o​r​s
1507
+ */
1508
+ doors: string;
1509
+ /**
1510
+ * D​i​v​e
1511
+ */
1512
+ flythrough: string;
1475
1513
  /**
1476
- * R​o​t​a​t​e
1514
+ * F​l​i​p
1515
+ */
1516
+ slideX3D: string;
1517
+ /**
1518
+ * F​l​i​p​ ​v​e​r​t​i​c​a​l
1519
+ */
1520
+ slideY3D: string;
1521
+ /**
1522
+ * P​i​v​o​t
1477
1523
  */
1478
1524
  rotate: string;
1479
1525
  /**
1480
- * V​e​r​t​i​c​a​l​ ​s​t​r​e​t​c​h
1526
+ * S​t​r​e​t​c​h​ ​v​e​r​t​i​c​a​l
1481
1527
  */
1482
1528
  scaleY: string;
1483
1529
  /**
1484
- * H​o​r​i​z​o​n​t​a​l​ ​s​t​r​e​t​c​h
1530
+ * S​t​r​e​t​c​h
1485
1531
  */
1486
1532
  scaleX: string;
1487
1533
  /**
1488
- * Z​o​o​m​ ​i​n
1534
+ * R​a​n​d​o​m
1489
1535
  */
1490
- scale: string;
1536
+ random: string;
1537
+ };
1538
+ slideGroups: {
1491
1539
  /**
1492
- * Z​o​o​m​ ​o​u​t
1540
+ * A​t​m​o​s​p​h​e​r​e
1493
1541
  */
1494
- scaleReverse: string;
1542
+ atmosphere: string;
1543
+ /**
1544
+ * M​o​t​i​o​n
1545
+ */
1546
+ motion: string;
1547
+ /**
1548
+ * D​e​p​t​h
1549
+ */
1550
+ depth: string;
1551
+ /**
1552
+ * C​l​a​s​s​i​c
1553
+ */
1554
+ classic: string;
1495
1555
  };
1496
1556
  };
1497
1557
  chart: {
@@ -1844,6 +1904,10 @@ export type NamespaceConfigsTranslation = {
1844
1904
  * C​y​c​l​e​ ​f​o​c​u​s​ ​b​e​t​w​e​e​n​ ​e​l​e​m​e​n​t​s
1845
1905
  */
1846
1906
  cycleFocusElement: string;
1907
+ /**
1908
+ * C​y​c​l​e​ ​l​a​y​e​r​s​ ​u​n​d​e​r​ ​t​h​e​ ​c​u​r​s​o​r
1909
+ */
1910
+ cycleLayersAtPoint: string;
1847
1911
  /**
1848
1912
  * C​o​n​f​i​r​m​ ​i​m​a​g​e​ ​c​r​o​p
1849
1913
  */
@@ -1970,6 +2034,10 @@ export type NamespaceConfigsTranslation = {
1970
2034
  * R​i​g​h​t​-​c​l​i​c​k
1971
2035
  */
1972
2036
  rightClick: string;
2037
+ /**
2038
+ * A​l​t​ ​+​ ​c​l​i​c​k
2039
+ */
2040
+ altClick: string;
1973
2041
  /**
1974
2042
  * L​ ​/​ ​r​i​g​h​t​-​c​l​i​c​k​ ​d​r​a​g
1975
2043
  */
@@ -3471,6 +3539,22 @@ export type NamespaceEditorTranslation = {
3471
3539
  * K​e​e​p​ ​c​u​r​r​e​n​t​ ​s​l​i​d​e​s​ ​a​n​d​ ​a​p​p​e​n​d​ ​t​h​e​ ​i​m​p​o​r​t​e​d​ ​o​n​e​s​.
3472
3540
  */
3473
3541
  appendHint: string;
3542
+ /**
3543
+ * T​r​a​n​s​i​t​i​o​n​s
3544
+ */
3545
+ transitionLabel: string;
3546
+ /**
3547
+ * F​r​o​m​ ​f​i​l​e
3548
+ */
3549
+ transitionKeep: string;
3550
+ /**
3551
+ * K​e​e​p​ ​e​a​c​h​ ​s​l​i​d​e​’​s​ ​t​r​a​n​s​i​t​i​o​n​.​ ​S​l​i​d​e​s​ ​w​i​t​h​o​u​t​ ​o​n​e​ ​g​e​t​ ​R​i​s​e​.
3552
+ */
3553
+ transitionKeepHint: string;
3554
+ /**
3555
+ * S​a​m​e​ ​o​n​ ​e​v​e​r​y​ ​s​l​i​d​e
3556
+ */
3557
+ transitionAll: string;
3474
3558
  };
3475
3559
  /**
3476
3560
  * L​a​n​g​u​a​g​e
@@ -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
- * Random
6685
+ * Fade
6592
6686
  */
6593
- random: () => LocalizedString;
6687
+ fade: () => LocalizedString;
6688
+ /**
6689
+ * Through ink
6690
+ */
6691
+ throughInk: () => LocalizedString;
6692
+ /**
6693
+ * Dissolve
6694
+ */
6695
+ dissolve: () => LocalizedString;
6594
6696
  /**
6595
- * Horizontal slide
6697
+ * Push
6596
6698
  */
6597
6699
  slideX: () => LocalizedString;
6598
6700
  /**
6599
- * Vertical slide
6701
+ * Rise
6600
6702
  */
6601
6703
  slideY: () => LocalizedString;
6602
6704
  /**
6603
- * Horizontal slide (3D)
6705
+ * Wipe
6604
6706
  */
6605
- slideX3D: () => LocalizedString;
6707
+ wipe: () => LocalizedString;
6606
6708
  /**
6607
- * Vertical slide (3D)
6709
+ * Reveal
6608
6710
  */
6609
- slideY3D: () => LocalizedString;
6711
+ reveal: () => LocalizedString;
6610
6712
  /**
6611
- * Fade
6713
+ * Zoom
6612
6714
  */
6613
- fade: () => LocalizedString;
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
- * Rotate
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
- * Vertical stretch
6749
+ * Stretch vertical
6620
6750
  */
6621
6751
  scaleY: () => LocalizedString;
6622
6752
  /**
6623
- * Horizontal stretch
6753
+ * Stretch
6624
6754
  */
6625
6755
  scaleX: () => LocalizedString;
6626
6756
  /**
6627
- * Zoom in
6757
+ * Random
6628
6758
  */
6629
- scale: () => LocalizedString;
6759
+ random: () => LocalizedString;
6760
+ };
6761
+ slideGroups: {
6630
6762
  /**
6631
- * Zoom out
6763
+ * Atmosphere
6632
6764
  */
6633
- scaleReverse: () => LocalizedString;
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
- export type ImportConfirmChoice = ImportApplyMode | null;
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,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;
@@ -849,7 +852,7 @@ export declare const useSlidesStore: import("zustand").UseBoundStore<Omit<import
849
852
  duration: number;
850
853
  trigger: import("../types/slides").AnimationTrigger;
851
854
  }[];
852
- turningMode?: import("../types/slides").TurningMode;
855
+ turningMode?: TurningMode;
853
856
  sectionTag?: {
854
857
  id: string;
855
858
  title?: string;
@@ -1631,7 +1634,7 @@ export declare const useSlidesStore: import("zustand").UseBoundStore<Omit<import
1631
1634
  duration: number;
1632
1635
  trigger: import("../types/slides").AnimationTrigger;
1633
1636
  }[];
1634
- turningMode?: import("../types/slides").TurningMode;
1637
+ turningMode?: TurningMode;
1635
1638
  sectionTag?: {
1636
1639
  id: string;
1637
1640
  title?: string;
@@ -1661,6 +1664,7 @@ export declare const useSlidesStore: import("zustand").UseBoundStore<Omit<import
1661
1664
  width: number;
1662
1665
  height: number;
1663
1666
  }[];
1667
+ defaultTurningMode: TurningMode;
1664
1668
  setTitle: (title: string) => void;
1665
1669
  setTheme: (themeProps: Partial<SlideTheme>) => void;
1666
1670
  setViewportSize: (size: number) => void;
@@ -1678,6 +1682,7 @@ export declare const useSlidesStore: import("zustand").UseBoundStore<Omit<import
1678
1682
  moveSlide: (fromIndex: number, toIndex: number) => void;
1679
1683
  reorderSlides: (oldIndex: number, newIndex: number) => void;
1680
1684
  updateSlideIndex: (index: number) => void;
1685
+ setDefaultTurningMode: (mode: TurningMode) => void;
1681
1686
  addElement: (element: PPTElement | PPTElement[]) => void;
1682
1687
  deleteElement: (elementId: string | string[]) => void;
1683
1688
  updateElement: (data: UpdateElementData) => void;
@@ -2466,7 +2471,7 @@ export declare const useSlidesStore: import("zustand").UseBoundStore<Omit<import
2466
2471
  duration: number;
2467
2472
  trigger: import("../types/slides").AnimationTrigger;
2468
2473
  }[];
2469
- turningMode?: import("../types/slides").TurningMode;
2474
+ turningMode?: TurningMode;
2470
2475
  sectionTag?: {
2471
2476
  id: string;
2472
2477
  title?: string;
@@ -3248,7 +3253,7 @@ export declare const useSlidesStore: import("zustand").UseBoundStore<Omit<import
3248
3253
  duration: number;
3249
3254
  trigger: import("../types/slides").AnimationTrigger;
3250
3255
  }[];
3251
- turningMode?: import("../types/slides").TurningMode;
3256
+ turningMode?: TurningMode;
3252
3257
  sectionTag?: {
3253
3258
  id: string;
3254
3259
  title?: string;
@@ -3278,6 +3283,7 @@ export declare const useSlidesStore: import("zustand").UseBoundStore<Omit<import
3278
3283
  width: number;
3279
3284
  height: number;
3280
3285
  }[];
3286
+ defaultTurningMode: TurningMode;
3281
3287
  setTitle: (title: string) => void;
3282
3288
  setTheme: (themeProps: Partial<SlideTheme>) => void;
3283
3289
  setViewportSize: (size: number) => void;
@@ -3295,6 +3301,7 @@ export declare const useSlidesStore: import("zustand").UseBoundStore<Omit<import
3295
3301
  moveSlide: (fromIndex: number, toIndex: number) => void;
3296
3302
  reorderSlides: (oldIndex: number, newIndex: number) => void;
3297
3303
  updateSlideIndex: (index: number) => void;
3304
+ setDefaultTurningMode: (mode: TurningMode) => void;
3298
3305
  addElement: (element: PPTElement | PPTElement[]) => void;
3299
3306
  deleteElement: (elementId: string | string[]) => void;
3300
3307
  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?: corner radius in px
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' | 'random' | 'slideX3D' | 'slideY3D' | 'rotate' | 'scaleY' | 'scaleX' | 'scale' | 'scaleReverse';
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;