@elserlabs/timeline 0.0.2
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/LICENSE +46 -0
- package/README.md +7 -0
- package/dist/constants/constants.d.ts +25 -0
- package/dist/constants/fabric.d.ts +6 -0
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/objects.d.ts +5 -0
- package/dist/controls/controls.d.ts +22 -0
- package/dist/controls/draw.d.ts +3 -0
- package/dist/controls/index.d.ts +5 -0
- package/dist/events/canvas/before-transform.d.ts +4 -0
- package/dist/events/canvas/drag.d.ts +4 -0
- package/dist/events/canvas/events.d.ts +4 -0
- package/dist/events/canvas/guidelines.d.ts +6 -0
- package/dist/events/canvas/hover-control.d.ts +4 -0
- package/dist/events/canvas/internal.d.ts +36 -0
- package/dist/events/canvas/modified.d.ts +4 -0
- package/dist/events/canvas/moving.d.ts +4 -0
- package/dist/events/canvas/placeholder.d.ts +4 -0
- package/dist/events/canvas/resized.d.ts +4 -0
- package/dist/events/canvas/resizing.d.ts +8 -0
- package/dist/events/canvas/scrolling.d.ts +7 -0
- package/dist/events/canvas/selection.d.ts +4 -0
- package/dist/events/canvas/timeline.d.ts +4 -0
- package/dist/events/store/connect.d.ts +4 -0
- package/dist/global/events.d.ts +6 -0
- package/dist/global/index.d.ts +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.es.js +11692 -0
- package/dist/index.umd.js +498 -0
- package/dist/interfaces/canvas.d.ts +21 -0
- package/dist/mixins/canvas.d.ts +17 -0
- package/dist/mixins/track-items.d.ts +20 -0
- package/dist/mixins/tracks.d.ts +15 -0
- package/dist/mixins/transitions.d.ts +10 -0
- package/dist/objects/drag-track-item.d.ts +33 -0
- package/dist/objects/helper.d.ts +29 -0
- package/dist/objects/index.d.ts +7 -0
- package/dist/objects/placeholder.d.ts +36 -0
- package/dist/objects/resizable.d.ts +36 -0
- package/dist/objects/track.d.ts +28 -0
- package/dist/objects/transition-guide.d.ts +38 -0
- package/dist/objects/transition.d.ts +44 -0
- package/dist/objects/trimmable.d.ts +46 -0
- package/dist/resize/audio.d.ts +13 -0
- package/dist/resize/common.d.ts +13 -0
- package/dist/resize/index.d.ts +1 -0
- package/dist/resize/media.d.ts +13 -0
- package/dist/resize/resize.d.ts +6 -0
- package/dist/resize/template.d.ts +13 -0
- package/dist/resize/transition.d.ts +4 -0
- package/dist/scrollbar/index.d.ts +57 -0
- package/dist/scrollbar/types.d.ts +26 -0
- package/dist/scrollbar/util.d.ts +15 -0
- package/dist/timeline.d.ts +115 -0
- package/dist/utils/apply-mixins.d.ts +7 -0
- package/dist/utils/array.d.ts +6 -0
- package/dist/utils/canvas.d.ts +8 -0
- package/dist/utils/clone-deep.d.ts +1 -0
- package/dist/utils/fabric.d.ts +15 -0
- package/dist/utils/group-by-transition.d.ts +18 -0
- package/dist/utils/group-items.d.ts +11 -0
- package/dist/utils/guideline.d.ts +57 -0
- package/dist/utils/id.d.ts +1 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/item.d.ts +3 -0
- package/dist/utils/load-object.d.ts +6 -0
- package/dist/utils/over-element.d.ts +6 -0
- package/dist/utils/resolve-origin.d.ts +9 -0
- package/dist/utils/sizes.d.ts +1 -0
- package/dist/utils/timeline.d.ts +6 -0
- package/package.json +41 -0
- package/src/index.ts +18 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
DESIGNCOMBO COMMERCIAL LICENSE
|
|
2
|
+
Copyright (c) 2024 Layerhub LLC
|
|
3
|
+
|
|
4
|
+
This is a commercial license agreement between Layerhub LLC ("Licensor") and the purchaser ("Licensee") of the DesignCombo software package.
|
|
5
|
+
|
|
6
|
+
1. GRANT OF LICENSE
|
|
7
|
+
Subject to the terms and conditions of this Agreement, Licensor grants Licensee a non-exclusive, non-transferable license to:
|
|
8
|
+
a) Use the DesignCombo software package for commercial and non-commercial purposes
|
|
9
|
+
b) Modify the source code to suit Licensee's specific needs
|
|
10
|
+
c) Deploy the modified version in production environments
|
|
11
|
+
|
|
12
|
+
2. SUBSCRIPTION TERMS
|
|
13
|
+
a) The license is granted for a specified subscription period (e.g., 12 months)
|
|
14
|
+
b) During the subscription period, Licensee will receive:
|
|
15
|
+
- Access to the source code
|
|
16
|
+
- Regular updates and improvements
|
|
17
|
+
- Technical support
|
|
18
|
+
c) After the subscription period ends:
|
|
19
|
+
- Licensee may continue using the last version received during the subscription
|
|
20
|
+
- Licensee may continue using any modifications made to that version
|
|
21
|
+
- Licensee will no longer receive updates or technical support
|
|
22
|
+
- Licensee may renew the subscription to receive updates and support
|
|
23
|
+
|
|
24
|
+
3. RESTRICTIONS
|
|
25
|
+
Licensee may not:
|
|
26
|
+
a) Redistribute, resell, or sublicense the original or modified software
|
|
27
|
+
b) Remove or alter any copyright notices or proprietary markings
|
|
28
|
+
c) Use the software to create a competing product
|
|
29
|
+
d) Transfer the license to another party
|
|
30
|
+
|
|
31
|
+
4. INTELLECTUAL PROPERTY
|
|
32
|
+
The original DesignCombo software and all its components remain the exclusive property of Layerhub.
|
|
33
|
+
Licensee retains rights to their specific modifications, but not to the underlying software.
|
|
34
|
+
|
|
35
|
+
5. WARRANTY
|
|
36
|
+
The software is provided "as is" without warranty of any kind. Layerhub is not liable for any damages arising from the use of the software.
|
|
37
|
+
|
|
38
|
+
6. TERMINATION
|
|
39
|
+
This license is effective until terminated. Layerhub may terminate this license if Licensee fails to comply with any of its terms and conditions.
|
|
40
|
+
|
|
41
|
+
7. GOVERNING LAW
|
|
42
|
+
This Agreement shall be governed by and construed in accordance with the laws of the jurisdiction in which Layerhub LLC is established.
|
|
43
|
+
|
|
44
|
+
For licensing inquiries, please contact Layerhub LLC at [contact information].
|
|
45
|
+
|
|
46
|
+
Version 1.1 - Effective Date: March 19, 2024
|
package/README.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
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 SPACE_TO_RESIZE_X = 3;
|
|
6
|
+
export declare const SPACE_TO_RESIZE_Y = 4;
|
|
7
|
+
export declare const LARGER_FONT_SIZE = 30;
|
|
8
|
+
export declare const LARGE_FONT_SIZE = 24;
|
|
9
|
+
export declare const NORMAL_FONT_SIZE = 16;
|
|
10
|
+
export declare const SMALL_FONT_SIZE = 12;
|
|
11
|
+
export declare const DEFAULT_FONT = "Roboto";
|
|
12
|
+
export declare const DEFAULT_WEIGHT = "Regular";
|
|
13
|
+
export declare const SECONDARY_FONT = "sans-serif";
|
|
14
|
+
export declare const PREVIEW_FRAME_WIDTH = 188;
|
|
15
|
+
export declare const TIMELINE_OFFSET_X = 40;
|
|
16
|
+
export declare const BASE_TIMELINE_ELEMENT_DURATION_MS = 4000;
|
|
17
|
+
export declare const DEFAULT_VIDEO_WIDTH = 1920;
|
|
18
|
+
export declare const DEFAULT_VIDEO_HEIGHT = 1080;
|
|
19
|
+
export declare const DEFAULT_FRAMERATE = 60;
|
|
20
|
+
export declare const FRAME_INTERVAL: number;
|
|
21
|
+
export declare const DEFAULT_VIDEO_MIN_BITRATE = 2000000;
|
|
22
|
+
export declare const DEFAULT_VIDEO_MAX_BITRATE = 10000000;
|
|
23
|
+
export declare const DEFAULT_AUDIO_SAMPLE_RATE = 48000;
|
|
24
|
+
export declare const DEFAULT_AUDIO_BITRATE = 192000;
|
|
25
|
+
export declare const DEFAULT_PREVIEW_SCALE = 2.3;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
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 INTERNAL_OBJECT_TYPES: string[];
|
|
@@ -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,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,36 @@
|
|
|
1
|
+
import { Canvas, FabricObject } from 'fabric';
|
|
2
|
+
import { Helper, Placeholder, Track } from '../../objects';
|
|
3
|
+
|
|
4
|
+
export interface MovingState {
|
|
5
|
+
canvas: Canvas | null;
|
|
6
|
+
enableGuideRedraw: boolean;
|
|
7
|
+
isPointerOverHelperTrack: boolean;
|
|
8
|
+
draggingOverTrack: Track | Helper | 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
|
+
initialTrackPoints: number[];
|
|
32
|
+
updateItemsInTrack: string | null;
|
|
33
|
+
orderNormalTrack: boolean;
|
|
34
|
+
}
|
|
35
|
+
export declare const getState: () => MovingState;
|
|
36
|
+
export declare const setState: (updates: Partial<MovingState>) => 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,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';
|
package/dist/index.d.ts
ADDED
|
@@ -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';
|