@cliquify.me/timeline 3.1.8 → 3.1.9

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 (72) hide show
  1. package/dist/constants/constants.d.ts +23 -0
  2. package/dist/constants/fabric.d.ts +6 -0
  3. package/dist/constants/index.d.ts +2 -0
  4. package/dist/constants/objects.d.ts +5 -0
  5. package/dist/constants/scale.d.ts +16 -0
  6. package/dist/constants/sizes.d.ts +3 -0
  7. package/dist/controls/controls.d.ts +22 -0
  8. package/dist/controls/draw.d.ts +3 -0
  9. package/dist/controls/index.d.ts +5 -0
  10. package/dist/events/canvas/before-transform.d.ts +4 -0
  11. package/dist/events/canvas/drag.d.ts +4 -0
  12. package/dist/events/canvas/events.d.ts +4 -0
  13. package/dist/events/canvas/guidelines.d.ts +6 -0
  14. package/dist/events/canvas/internal.d.ts +35 -0
  15. package/dist/events/canvas/modified.d.ts +4 -0
  16. package/dist/events/canvas/moving.d.ts +4 -0
  17. package/dist/events/canvas/placeholder.d.ts +4 -0
  18. package/dist/events/canvas/resized.d.ts +4 -0
  19. package/dist/events/canvas/resizing.d.ts +8 -0
  20. package/dist/events/canvas/scrolling.d.ts +7 -0
  21. package/dist/events/canvas/selection.d.ts +4 -0
  22. package/dist/events/canvas/timeline.d.ts +4 -0
  23. package/dist/events/store/connect.d.ts +4 -0
  24. package/dist/global/events.d.ts +6 -0
  25. package/dist/global/index.d.ts +1 -0
  26. package/dist/index.d.ts +10 -0
  27. package/dist/index.es.js +11831 -0
  28. package/dist/index.umd.js +498 -0
  29. package/dist/interfaces/canvas.d.ts +21 -0
  30. package/dist/mixins/canvas.d.ts +17 -0
  31. package/dist/mixins/track-items.d.ts +21 -0
  32. package/dist/mixins/tracks.d.ts +15 -0
  33. package/dist/mixins/transitions.d.ts +10 -0
  34. package/dist/objects/audio.d.ts +40 -0
  35. package/dist/objects/captions.d.ts +34 -0
  36. package/dist/objects/drag-track-item.d.ts +33 -0
  37. package/dist/objects/helper.d.ts +29 -0
  38. package/dist/objects/image.d.ts +36 -0
  39. package/dist/objects/index.d.ts +11 -0
  40. package/dist/objects/placeholder.d.ts +36 -0
  41. package/dist/objects/template.d.ts +36 -0
  42. package/dist/objects/text.d.ts +34 -0
  43. package/dist/objects/track.d.ts +28 -0
  44. package/dist/objects/transition-guide.d.ts +38 -0
  45. package/dist/objects/transition.d.ts +43 -0
  46. package/dist/objects/video.d.ts +43 -0
  47. package/dist/resize/audio.d.ts +13 -0
  48. package/dist/resize/common.d.ts +13 -0
  49. package/dist/resize/index.d.ts +1 -0
  50. package/dist/resize/media.d.ts +13 -0
  51. package/dist/resize/resize.d.ts +6 -0
  52. package/dist/resize/template.d.ts +13 -0
  53. package/dist/resize/transition.d.ts +4 -0
  54. package/dist/timeline.d.ts +94 -0
  55. package/dist/utils/accepts.d.ts +2 -0
  56. package/dist/utils/apply-mixins.d.ts +7 -0
  57. package/dist/utils/array.d.ts +6 -0
  58. package/dist/utils/canvas.d.ts +8 -0
  59. package/dist/utils/clone-deep.d.ts +1 -0
  60. package/dist/utils/fabric.d.ts +15 -0
  61. package/dist/utils/group-by-transition.d.ts +18 -0
  62. package/dist/utils/group-items.d.ts +11 -0
  63. package/dist/utils/guideline.d.ts +57 -0
  64. package/dist/utils/id.d.ts +1 -0
  65. package/dist/utils/index.d.ts +6 -0
  66. package/dist/utils/item.d.ts +3 -0
  67. package/dist/utils/load-object.d.ts +43 -0
  68. package/dist/utils/over-element.d.ts +6 -0
  69. package/dist/utils/resolve-origin.d.ts +9 -0
  70. package/dist/utils/sizes.d.ts +3 -0
  71. package/dist/utils/timeline.d.ts +6 -0
  72. package/package.json +2 -2
@@ -0,0 +1,23 @@
1
+ export declare const GIANT_ICON_SIZE = 100;
2
+ export declare const LARGE_ICON_SIZE = 30;
3
+ export declare const NORMAL_ICON_SIZE = 18;
4
+ export declare const SMALL_ICON_SIZE = 14;
5
+ export declare const LARGER_FONT_SIZE = 30;
6
+ export declare const LARGE_FONT_SIZE = 24;
7
+ export declare const NORMAL_FONT_SIZE = 16;
8
+ export declare const SMALL_FONT_SIZE = 12;
9
+ export declare const DEFAULT_FONT = "Roboto";
10
+ export declare const DEFAULT_WEIGHT = "Regular";
11
+ export declare const SECONDARY_FONT = "sans-serif";
12
+ export declare const PREVIEW_FRAME_WIDTH = 188;
13
+ export declare const TIMELINE_OFFSET_X = 40;
14
+ export declare const BASE_TIMELINE_ELEMENT_DURATION_MS = 4000;
15
+ export declare const DEFAULT_VIDEO_WIDTH = 1920;
16
+ export declare const DEFAULT_VIDEO_HEIGHT = 1080;
17
+ export declare const DEFAULT_FRAMERATE = 60;
18
+ export declare const FRAME_INTERVAL: number;
19
+ export declare const DEFAULT_VIDEO_MIN_BITRATE = 2000000;
20
+ export declare const DEFAULT_VIDEO_MAX_BITRATE = 10000000;
21
+ export declare const DEFAULT_AUDIO_SAMPLE_RATE = 48000;
22
+ export declare const DEFAULT_AUDIO_BITRATE = 192000;
23
+ export declare const DEFAULT_PREVIEW_SCALE = 2.3;
@@ -0,0 +1,6 @@
1
+ export declare const CENTER = "center";
2
+ export declare const LEFT = "left";
3
+ export declare const TOP = "top";
4
+ export declare const BOTTOM = "bottom";
5
+ export declare const RIGHT = "right";
6
+ export declare const NONE = "none";
@@ -0,0 +1,2 @@
1
+ export * from './scale';
2
+ export * from './fabric';
@@ -0,0 +1,5 @@
1
+ export declare const ACTIVE_SELECTION_WIDTH = 1;
2
+ export declare const ACTIVE_SELECTION_COLOR = "rgba(255, 255, 255,1.0)";
3
+ export declare const SELECTION_COLOR = "rgba(255, 211, 42,0.1)";
4
+ export declare const SELECTION_BORDER_COLOR = "rgba(255, 211, 42,1.0)";
5
+ export declare const ITEM_TYPES: string[];
@@ -0,0 +1,16 @@
1
+ export declare const ACCEPTS_MAP: {
2
+ video: string[];
3
+ image: string[];
4
+ audio: string[];
5
+ text: string[];
6
+ caption: string[];
7
+ template: string[];
8
+ };
9
+ export declare const SIZES_MAP: {
10
+ video: number;
11
+ image: number;
12
+ audio: number;
13
+ text: number;
14
+ caption: number;
15
+ template: number;
16
+ };
@@ -0,0 +1,3 @@
1
+ import { ItemType } from '@cliquify.me/types';
2
+
3
+ export declare const ITEM_SIZES: Record<ItemType | "main", number>;
@@ -0,0 +1,22 @@
1
+ import { Control } from 'fabric';
2
+
3
+ export declare const createResizeControls: () => {
4
+ mr: Control;
5
+ ml: Control;
6
+ };
7
+ export declare const createTemplateControls: () => {
8
+ mr: Control;
9
+ ml: Control;
10
+ };
11
+ export declare const createAudioControls: () => {
12
+ mr: Control;
13
+ ml: Control;
14
+ };
15
+ export declare const createMediaControls: () => {
16
+ mr: Control;
17
+ ml: Control;
18
+ };
19
+ export declare const createTransitionControls: () => {
20
+ mr: Control;
21
+ ml: Control;
22
+ };
@@ -0,0 +1,3 @@
1
+ import { FabricObject } from 'fabric';
2
+
3
+ export declare function drawVerticalLine(ctx: CanvasRenderingContext2D, left: number, top: number, _: {}, fabricObject: FabricObject): void;
@@ -0,0 +1,5 @@
1
+ export * from '../resize/audio';
2
+ export * from '../resize/media';
3
+ export * from '../resize/transition';
4
+ export * from '../resize/common';
5
+ export * from './controls';
@@ -0,0 +1,4 @@
1
+ import { default as Timeline } from '../../timeline';
2
+
3
+ export declare function addBeforeTransformEvents(timeline: Timeline): void;
4
+ export declare function removeBeforeTransformEvents(timeline: Timeline): void;
@@ -0,0 +1,4 @@
1
+ import { default as Timeline } from '../../timeline';
2
+
3
+ export declare function addDragEvents(timeline: Timeline): void;
4
+ export declare function removeDragEvents(timeline: Timeline): void;
@@ -0,0 +1,4 @@
1
+ import { default as Timeline } from '../../timeline';
2
+
3
+ export declare const addCanvasEvents: (timeline: Timeline) => void;
4
+ export declare const removeCanvasEvents: (timeline: Timeline) => void;
@@ -0,0 +1,6 @@
1
+ import { ModifiedEvent, TPointerEvent } from 'fabric';
2
+ import { default as Timeline } from '../../timeline';
3
+
4
+ export declare function onObjectMoving(this: Timeline, e: ModifiedEvent<TPointerEvent>): void;
5
+ export declare function addGuidelineEvents(timeline: Timeline): void;
6
+ export declare function removeGuidelineEvents(timeline: Timeline): void;
@@ -0,0 +1,35 @@
1
+ import { Canvas, FabricObject } from 'fabric';
2
+ import { Placeholder, Track } from '../../objects';
3
+
4
+ interface MovingState {
5
+ canvas: Canvas | null;
6
+ enableGuideRedraw: boolean;
7
+ isPointerOverHelperTrack: boolean;
8
+ draggingOverTrack: Track | null | undefined;
9
+ placeholderMovingObjects: Placeholder[];
10
+ primaryMovingObjects: FabricObject[];
11
+ secondaryMovingObjects: FabricObject[];
12
+ objectInitialPositions: Record<string, {
13
+ top: number;
14
+ left: number;
15
+ }>;
16
+ originTrack: Track | Record<string, any>;
17
+ trackToItemsMap: Record<string, FabricObject[]>;
18
+ activeTrackToItemsMap: Record<string, FabricObject[]>;
19
+ trackTopToIdMap: Record<number, string>;
20
+ trackTops: number[];
21
+ activeObjects: FabricObject[];
22
+ primaryTracks: Record<string, {
23
+ objects: FabricObject[];
24
+ index: number;
25
+ }>;
26
+ secondaryTracks: Record<string, {
27
+ objects: FabricObject[];
28
+ index: number;
29
+ }>;
30
+ isDragOver: boolean;
31
+ initialMagneticTrackPoints: number[];
32
+ }
33
+ export declare const getState: () => MovingState;
34
+ export declare const setState: (updates: Partial<MovingState>) => void;
35
+ export {};
@@ -0,0 +1,4 @@
1
+ import { default as Timeline } from '../../timeline';
2
+
3
+ export declare const addModifiedEvents: (timeline: Timeline) => void;
4
+ export declare const removeModifiedEvents: (timeline: Timeline) => void;
@@ -0,0 +1,4 @@
1
+ import { default as Timeline } from '../../timeline';
2
+
3
+ export declare function addMovingEvents(timeline: Timeline): void;
4
+ export declare function removeMovingEvents(timeline: Timeline): void;
@@ -0,0 +1,4 @@
1
+ import { default as Timeline } from '../../timeline';
2
+
3
+ export declare function addPlaceholderEvents(timeline: Timeline): void;
4
+ export declare function removePlaceholderEvents(timeline: Timeline): void;
@@ -0,0 +1,4 @@
1
+ import { default as Timeline } from '../../timeline';
2
+
3
+ export declare function addResizedEvents(timeline: Timeline): void;
4
+ export declare function removeResizedEvents(timeline: Timeline): void;
@@ -0,0 +1,8 @@
1
+ import { default as Timeline } from '../../timeline';
2
+ import { BasicTransformEvent, FabricObject, FabricObjectProps, ObjectEvents, SerializedObjectProps, TPointerEvent } from 'fabric';
3
+
4
+ export default function onObjectResizing(this: Timeline, e: BasicTransformEvent<TPointerEvent> & {
5
+ target: FabricObject<Partial<FabricObjectProps>, SerializedObjectProps, ObjectEvents>;
6
+ }): void;
7
+ export declare function addResizingEvents(timeline: Timeline): void;
8
+ export declare function removeResizingEvents(timeline: Timeline): void;
@@ -0,0 +1,7 @@
1
+ import { ModifiedEvent, TPointerEvent } from 'fabric';
2
+ import { default as Timeline } from '../../timeline';
3
+
4
+ export declare function onMouseUpForScroll(): void;
5
+ export declare function scrollOnMovingForScroll(this: Timeline, e: ModifiedEvent<TPointerEvent>): void;
6
+ export declare function addScrollEvents(timeline: Timeline): void;
7
+ export declare function removeScrollEvents(timeline: Timeline): void;
@@ -0,0 +1,4 @@
1
+ import { default as Timeline } from '../../timeline';
2
+
3
+ export declare const addSelectionEvents: (timeline: Timeline) => void;
4
+ export declare const removeSelectionEvents: (timeline: Timeline) => void;
@@ -0,0 +1,4 @@
1
+ import { default as Timeline } from '../../timeline';
2
+
3
+ export declare const addTimelineEvents: (timeline: Timeline) => void;
4
+ export declare function removeTimelineEvents(timeline: Timeline): void;
@@ -0,0 +1,4 @@
1
+ import { default as Timeline } from '../../timeline';
2
+
3
+ export declare const addStateEvents: (timeline: Timeline) => void;
4
+ export declare const removeStateEvents: (_: Timeline) => void;
@@ -0,0 +1,6 @@
1
+ export declare const DRAG_PREFIX = "drag";
2
+ export declare const DRAG_START = "drag:start";
3
+ export declare const DRAG_END = "drag:end";
4
+ export declare const TIMELINE_PREFIX = "timeline";
5
+ export declare const TIMELINE_BOUNDING_CHANGED = "timeline:boundingChanged";
6
+ export declare const TIMELINE_SEEK = "timeline:seek";
@@ -0,0 +1 @@
1
+ export * from './events';
@@ -0,0 +1,10 @@
1
+ export { drawVerticalLine } from './controls/draw';
2
+ export * from './objects';
3
+ export { default } from './timeline';
4
+ export * from './utils';
5
+ export * from './constants';
6
+ export * from './resize';
7
+ export * from './global';
8
+ export * from './timeline';
9
+ export { FabricObject, Control, classRegistry, Rect, util, controlsUtils, Pattern } from 'fabric';
10
+ export type { TransformActionHandler } from 'fabric';