@slidev/types 52.19.2 → 52.20.1

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 (2) hide show
  1. package/dist/index.d.mts +76 -0
  2. package/package.json +2 -2
package/dist/index.d.mts CHANGED
@@ -632,6 +632,12 @@ export interface HeadmatterConfig extends TransitionOptions {
632
632
  * @default 800
633
633
  */
634
634
  magicMoveDuration?: number;
635
+ /**
636
+ * Configure Shiki
637
+ *
638
+ * @default {}
639
+ */
640
+ shiki?: ShikiOptions;
635
641
  /**
636
642
  * Default click animation for the slides
637
643
  */
@@ -803,6 +809,76 @@ export interface FontOptions {
803
809
  */
804
810
  fallbacks?: boolean;
805
811
  }
812
+ export interface ShikiOptions {
813
+ /**
814
+ * Options passed to Shiki Magic Move for customizing code transition animations
815
+ *
816
+ * See https://shiki.style/packages/magic-move#options for the full list of options
817
+ *
818
+ * @default {}
819
+ */
820
+ magicMove?: ShikiMagicMoveOptions;
821
+ }
822
+ export interface ShikiMagicMoveOptions {
823
+ /**
824
+ * Ratio of the duration to delay the move animation
825
+ *
826
+ * @default 0.3
827
+ */
828
+ delayMove?: number;
829
+ /**
830
+ * Ratio of the duration to delay the leave animation
831
+ *
832
+ * @default 0
833
+ */
834
+ delayLeave?: number;
835
+ /**
836
+ * Ratio of the duration to delay the enter animation
837
+ *
838
+ * @default 0.7
839
+ */
840
+ delayEnter?: number;
841
+ /**
842
+ * Ratio of the duration to delay the container animation
843
+ *
844
+ * @default 0.4
845
+ */
846
+ delayContainer?: number;
847
+ /**
848
+ * Easing function, in the CSS `transition-timing-function` format
849
+ *
850
+ * @default 'ease'
851
+ */
852
+ easing?: string;
853
+ /**
854
+ * Apply animation to the container
855
+ *
856
+ * @default false
857
+ */
858
+ animateContainer?: boolean;
859
+ /**
860
+ * Apply styles (color and background) to the container
861
+ *
862
+ * @default true
863
+ */
864
+ containerStyle?: boolean;
865
+ /**
866
+ * Stagger the animation of the tokens, in milliseconds
867
+ *
868
+ * @default 1
869
+ */
870
+ stagger?: number;
871
+ /**
872
+ * Split the tokens at the edge of diff chunks
873
+ *
874
+ * @default false
875
+ */
876
+ splitTokens?: boolean;
877
+ /**
878
+ * Enhance the matching algorithm to match tokens that has same content
879
+ */
880
+ enhanceMatching?: boolean;
881
+ }
806
882
  export type BuiltinSlideTransition = 'fade' | 'fade-out' | 'slide-up' | 'slide-down' | 'slide-left' | 'slide-right' | 'view-transition';
807
883
  export interface TransitionOptions {
808
884
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slidev/types",
3
- "version": "52.19.2",
3
+ "version": "52.20.1",
4
4
  "description": "Shared types declarations for Slidev",
5
5
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",
@@ -31,7 +31,7 @@
31
31
  "mermaid": "^11.16.1",
32
32
  "monaco-editor": "^0.56.0",
33
33
  "shiki": "^4.4.3",
34
- "unocss": "^66.10.3",
34
+ "unocss": "^66.10.4",
35
35
  "unplugin-icons": "^24.0.0",
36
36
  "unplugin-vue-markdown": "^32.1.1",
37
37
  "vite-plugin-inspect": "^12.0.2",