@cliquify.me/transitions 0.11.9 → 0.11.10

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.
@@ -1,4 +1,4 @@
1
- import { TransitionPresentation } from '@remotion/transitions';
1
+ import { TransitionPresentation } from '../types';
2
2
 
3
3
  export type CustomPresentationProps = {
4
4
  width: number;
@@ -2,3 +2,9 @@ export { circle } from './circle';
2
2
  export { rectangle } from './rectangle';
3
3
  export { star } from './star';
4
4
  export { slidingDoors } from './sliding-doors';
5
+ export { linearTiming } from '../';
6
+ export { fade } from '@remotion/transitions/fade';
7
+ export { slide, type SlideDirection } from '@remotion/transitions/slide';
8
+ export { wipe } from '@remotion/transitions/wipe';
9
+ export { flip } from '@remotion/transitions/flip';
10
+ export { clockWipe } from '@remotion/transitions/clock-wipe';
@@ -1,4 +1,4 @@
1
- import { TransitionPresentation } from '@remotion/transitions';
1
+ import { TransitionPresentation } from '../types';
2
2
 
3
3
  export type CustomPresentationProps = {
4
4
  width: number;
@@ -0,0 +1,16 @@
1
+ import { default as React } from 'react';
2
+ import { TransitionPresentation } from '../types';
3
+
4
+ export type SlideDirection = "from-left" | "from-top" | "from-right" | "from-bottom";
5
+ export type SlideProps = {
6
+ direction?: SlideDirection;
7
+ exitStyle?: React.CSSProperties;
8
+ enterStyle?: React.CSSProperties;
9
+ };
10
+ /**
11
+ * Implements a sliding transition for presentation components where the entering slide pushes out the exiting slide based on the specified direction.
12
+ * @see [Documentation](https://remotion.dev/docs/transitions/presentations/slide)
13
+ * @param {SlideProps} [props] Configuration options for the slide transition: includes direction, enterStyle, and exitStyle.
14
+ * @returns {TransitionPresentation<SlideProps>} Returns a transition configuration object including the component and its props.
15
+ */
16
+ export declare const slide: (props?: SlideProps) => TransitionPresentation<SlideProps>;
@@ -1,4 +1,4 @@
1
- import { TransitionPresentation } from '@remotion/transitions';
1
+ import { TransitionPresentation } from '../types';
2
2
 
3
3
  export type CustomPresentationProps = {
4
4
  width: number;
@@ -1,4 +1,4 @@
1
- import { TransitionPresentation } from '@remotion/transitions';
1
+ import { TransitionPresentation } from '../types';
2
2
 
3
3
  export type CustomPresentationProps = {
4
4
  width: number;
@@ -0,0 +1,15 @@
1
+ import { TransitionTiming } from '../types';
2
+
3
+ /**
4
+ * Creates a linear timing object for managing animations in frame units.
5
+ * @description Provides a mechanism to handle frame-based transitions linearly, optionally incorporating easing functions.
6
+ * @see [Documentation](https://remotion.dev/docs/transitions/timings/lineartiming)
7
+ * @param {Object} fieldsToFetch Configuration options for the linear timing
8
+ * @param {number} fieldsToFetch.durationInFrames Specifies the total duration of the transition in frames
9
+ * @param {((input: number) => number)=} fieldsToFetch.easing Optional easing function to modify the interpolation of values
10
+ * @returns {TransitionTiming} An object representing the timing of the transition, including methods to get duration and progress
11
+ */
12
+ export declare const linearTiming: (options: {
13
+ durationInFrames: number;
14
+ easing?: ((input: number) => number) | undefined;
15
+ }) => TransitionTiming;
@@ -0,0 +1,9 @@
1
+ import { SpringConfig } from 'remotion';
2
+ import { TransitionTiming } from '../types';
3
+
4
+ export declare const springTiming: (options?: {
5
+ config?: Partial<SpringConfig>;
6
+ durationInFrames?: number;
7
+ durationRestThreshold?: number;
8
+ reverse?: boolean;
9
+ }) => TransitionTiming;
@@ -0,0 +1,12 @@
1
+ import { JSX } from 'react';
2
+ import { SlideDirection } from './presentations';
3
+
4
+ interface TransitionOptions {
5
+ width: number;
6
+ height: number;
7
+ durationInFrames: number;
8
+ id: string;
9
+ direction?: SlideDirection;
10
+ }
11
+ export declare const Transitions: Record<string, (options: TransitionOptions) => JSX.Element>;
12
+ export {};
@@ -0,0 +1,22 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ import { AbsoluteFillLayout, LayoutAndStyle, SequencePropsWithoutDuration } from 'remotion';
3
+ import { NoReactInternals } from 'remotion/no-react';
4
+ import { TransitionSeriesTransitionProps } from './types';
5
+
6
+ declare const TransitionSeriesTransition: <PresentationProps extends Record<string, unknown>>(_props: TransitionSeriesTransitionProps<PresentationProps>) => null;
7
+ type LayoutBasedProps = true extends typeof NoReactInternals.ENABLE_V5_BREAKING_CHANGES ? AbsoluteFillLayout : LayoutAndStyle;
8
+ type SeriesSequenceProps = PropsWithChildren<{
9
+ readonly durationInFrames: number;
10
+ readonly offset?: number;
11
+ readonly className?: string;
12
+ /**
13
+ * @deprecated For internal use only
14
+ */
15
+ readonly stack?: string;
16
+ } & LayoutBasedProps & Pick<SequencePropsWithoutDuration, "name">>;
17
+ declare const SeriesSequence: ({ children }: SeriesSequenceProps) => import("react").JSX.Element;
18
+ export declare const TransitionSeries: FC<SequencePropsWithoutDuration> & {
19
+ Sequence: typeof SeriesSequence;
20
+ Transition: typeof TransitionSeriesTransition;
21
+ };
22
+ export {};
@@ -0,0 +1,25 @@
1
+ import { ReactNode } from 'react';
2
+ import { TransitionPresentation as RemotionPresentation, TransitionPresentationComponentProps as RemotionProps } from '@remotion/transitions';
3
+
4
+ export type PresentationDirection = "entering" | "exiting";
5
+ export type TransitionTiming = {
6
+ getDurationInFrames: (options: {
7
+ fps: number;
8
+ }) => number;
9
+ getProgress: (options: {
10
+ frame: number;
11
+ fps: number;
12
+ }) => number;
13
+ };
14
+ export type TransitionSeriesTransitionProps<PresentationProps extends Record<string, unknown>> = {
15
+ timing: TransitionTiming;
16
+ presentation?: TransitionPresentation<PresentationProps>;
17
+ };
18
+ export type TransitionPresentation<PresentationProps extends Record<string, unknown>> = RemotionPresentation<PresentationProps>;
19
+ export type TransitionPresentationComponentProps<PresentationProps extends Record<string, unknown>> = Partial<RemotionProps<PresentationProps>> & {
20
+ presentationProgress: number;
21
+ children: ReactNode;
22
+ presentationDirection: PresentationDirection;
23
+ passedProps: PresentationProps;
24
+ presentationDurationInFrames: number;
25
+ };
@@ -0,0 +1,9 @@
1
+ export type TransitionState = {
2
+ entering: number;
3
+ exiting: number;
4
+ isInTransitionSeries: boolean;
5
+ };
6
+ /**
7
+ * Gets the progress and direction of a transition with a context() presentation.
8
+ */
9
+ export declare const useTransitionProgress: () => TransitionState;
@@ -0,0 +1,3 @@
1
+ import { NoReactInternals } from 'remotion/no-react';
2
+
3
+ export declare const validateDurationInFrames: typeof NoReactInternals.validateDurationInFrames;
package/package.json CHANGED
@@ -1,18 +1,21 @@
1
1
  {
2
2
  "name": "@cliquify.me/transitions",
3
- "version": "0.11.9",
3
+ "version": "0.11.10",
4
4
  "private": false,
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
5
8
  "files": [
6
9
  "dist"
7
10
  ],
8
- "main": "dist/index.umd.js",
9
- "module": "dist/index.es.js",
10
- "types": "dist/index.d.ts",
11
+ "main": "src/index.ts",
12
+ "module": "src/index.ts",
13
+ "types": "src/index.ts",
11
14
  "exports": {
12
15
  ".": {
13
- "import": "./dist/index.es.js",
14
- "require": "./dist/index.umd.js",
15
- "types": "./dist/index.d.ts"
16
+ "import": "./src/index.ts",
17
+ "require": "./src/index.ts",
18
+ "types": "./src/index.ts"
16
19
  }
17
20
  },
18
21
  "devDependencies": {
@@ -30,7 +33,7 @@
30
33
  "@remotion/shapes": "4.0.221"
31
34
  },
32
35
  "peerDependencies": {
33
- "react": "^16.8.0 || 17.x || 18.x",
36
+ "react": "^16.8.0 || 17.x || 18.x || 19.x",
34
37
  "remotion": "4.0.221",
35
38
  "@remotion/transitions": "4.0.221"
36
39
  },
package/src/index.ts ADDED
@@ -0,0 +1,15 @@
1
+ // Timings
2
+ export { linearTiming } from "./timings/linear-timing";
3
+ export { springTiming } from "./timings/spring-timing";
4
+ // Component
5
+ export { TransitionSeries } from "./transition-series";
6
+ export type {
7
+ TransitionPresentation,
8
+ TransitionPresentationComponentProps,
9
+ TransitionTiming
10
+ } from "./types";
11
+ // Hooks
12
+ export { useTransitionProgress } from "./use-transition-progress";
13
+ export type { TransitionState } from "./use-transition-progress";
14
+ export * from "./presentations";
15
+ export * from "./transition-presentations";