@elserlabs/timeline 0.0.2 → 0.1.0

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,6 +1,6 @@
1
1
  import { FabricObject } from 'fabric';
2
2
  import { default as Timeline } from '../timeline';
3
- import { ITrackItemAndDetails } from '@designcombo/types';
3
+ import { ITrackItemAndDetails } from '@elserlabs/types';
4
4
 
5
5
  declare class TrackItemsMixin {
6
6
  addTrackItem(this: Timeline, trackItem: ITrackItemAndDetails): void;
@@ -1,5 +1,5 @@
1
1
  import { default as Timeline } from '../timeline';
2
- import { ITrackItem } from '@designcombo/types';
2
+ import { ITrackItem } from '@elserlabs/types';
3
3
 
4
4
  declare class TracksMixin {
5
5
  findOrCreateTrack(this: Timeline, trackItemData: ITrackItem, { trackId, trackIndex }: {
@@ -1,5 +1,5 @@
1
1
  import { Group, GroupProps, Rect } from 'fabric';
2
- import { IMetadata, ItemType } from '@designcombo/types';
2
+ import { IMetadata, ItemType } from '@elserlabs/types';
3
3
 
4
4
  export interface HelperProps extends Partial<GroupProps> {
5
5
  id: string;
@@ -1,5 +1,5 @@
1
1
  import { FabricObject, Rect, RectProps } from 'fabric';
2
- import { ItemType } from '@designcombo/types';
2
+ import { ItemType } from '@elserlabs/types';
3
3
 
4
4
  interface PlaceholderProps extends Pick<RectProps, "width" | "height" | "top" | "left"> {
5
5
  id: string;
@@ -1,5 +1,5 @@
1
1
  import { Control, Rect, RectProps } from 'fabric';
2
- import { IDisplay } from '@designcombo/types';
2
+ import { IDisplay } from '@elserlabs/types';
3
3
 
4
4
  export interface ResizableBaseProps extends Pick<RectProps, "width" | "height" | "top" | "left"> {
5
5
  id: string;
@@ -1,5 +1,5 @@
1
1
  import { Rect } from 'fabric';
2
- import { IMetadata } from '@designcombo/types';
2
+ import { IMetadata } from '@elserlabs/types';
3
3
 
4
4
  export interface TrackItemProps extends Pick<Rect, "top" | "left" | "width" | "height"> {
5
5
  id: string;
@@ -10,6 +10,7 @@ export interface TrackItemProps extends Pick<Rect, "top" | "left" | "width" | "h
10
10
  items: string[];
11
11
  magnetic?: boolean;
12
12
  static?: boolean;
13
+ hidden?: boolean;
13
14
  metadata?: Partial<IMetadata>;
14
15
  }
15
16
  declare class Track extends Rect {
@@ -21,6 +22,7 @@ declare class Track extends Rect {
21
22
  items: string[];
22
23
  magnetic?: boolean;
23
24
  static?: boolean;
25
+ hidden?: boolean;
24
26
  static getDefaults(): Record<string, any>;
25
27
  constructor(props: TrackItemProps);
26
28
  updateCoords(size: number): void;
@@ -1,5 +1,5 @@
1
1
  import { Control, Rect, RectProps } from 'fabric';
2
- import { ITrim } from '@designcombo/types';
2
+ import { ITrim } from '@elserlabs/types';
3
3
 
4
4
  interface IDisplay {
5
5
  from: number;
@@ -3,7 +3,7 @@ import { default as CanvasMixin } from './mixins/canvas';
3
3
  import { default as TrackItemsMixin } from './mixins/track-items';
4
4
  import { default as TracksMixin } from './mixins/tracks';
5
5
  import { default as TransitionsMixin } from './mixins/transitions';
6
- import { ITimelineScaleState, ITrack, ITrackItem, ITransition, IStateManager, IUpdateStateOptions, CanvasSpacing } from '@designcombo/types';
6
+ import { ITimelineScaleState, ITrack, ITrackItem, ITransition, IStateManager, IUpdateStateOptions, CanvasSpacing } from '@elserlabs/types';
7
7
 
8
8
  interface Bounding {
9
9
  width: number;
@@ -1,4 +1,4 @@
1
- import { ITrack } from '@designcombo/types';
1
+ import { ITrack } from '@elserlabs/types';
2
2
 
3
3
  export declare function findRelativePosition(arr: number[], referenceValue: number, targetValue: number): number | null;
4
4
  export declare function createCombinedTracksArray(refTrack: ITrack, newTracks: (ITrack & {
@@ -1,5 +1,5 @@
1
1
  import { Canvas, FabricObject, TPointerEvent } from 'fabric';
2
- import { CanvasSpacing } from '@designcombo/types';
2
+ import { CanvasSpacing } from '@elserlabs/types';
3
3
 
4
4
  export declare const clearPlaceholderObjects: (canvas: Canvas, placeholderMovingObjects: FabricObject[]) => void;
5
5
  export declare const clearTrackHelperGuides: (allObjects: FabricObject[]) => void;
@@ -1,4 +1,4 @@
1
- import { ITrackItemsMap, ITransition, ITrackItem } from '@designcombo/types';
1
+ import { ITrackItemsMap, ITransition, ITrackItem } from '@elserlabs/types';
2
2
  import { FabricObject, RectProps } from 'fabric';
3
3
 
4
4
  export type GroupElement = ITrackItem | ITransition;
@@ -1,4 +1,4 @@
1
- import { ITrackItemsMap, ITransition, ITrackItem } from '@designcombo/types';
1
+ import { ITrackItemsMap, ITransition, ITrackItem } from '@elserlabs/types';
2
2
  import { default as Timeline } from '../timeline';
3
3
 
4
4
  type GroupElement = ITrackItem | ITransition;
@@ -1,3 +1,3 @@
1
- import { ITrack } from '@designcombo/types';
1
+ import { ITrack } from '@elserlabs/types';
2
2
 
3
3
  export declare function removeItemsFromTrack(tracks: ITrack[], itemsToRemove: string[]): ITrack[];
@@ -1,4 +1,4 @@
1
- import { ITrackItemAndDetails } from '@designcombo/types';
1
+ import { ITrackItemAndDetails } from '@elserlabs/types';
2
2
 
3
3
  export declare const loadObject: (item: ITrackItemAndDetails, options: {
4
4
  tScale: number;
@@ -1,4 +1,4 @@
1
- import { ITrackItem } from '@designcombo/types';
1
+ import { ITrackItem } from '@elserlabs/types';
2
2
 
3
3
  export declare function timeMsToUnits(timeMs: number, zoom?: number, playbackRate?: number): number;
4
4
  export declare function unitsToTimeMs(units: number, zoom?: number, playbackRate?: number): number;
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@elserlabs/timeline",
3
- "version": "0.0.2",
3
+ "version": "0.1.0",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist"
7
7
  ],
8
- "main": "src/index.ts",
9
- "module": "src/index.ts",
10
- "types": "src/index.ts",
8
+ "main": "./dist/index.umd.js",
9
+ "module": "./dist/index.es.js",
10
+ "types": "./dist/index.d.ts",
11
11
  "devDependencies": {
12
12
  "@types/lodash-es": "^4.17.12",
13
13
  "@types/node": "^20.11.24",
@@ -26,8 +26,8 @@
26
26
  },
27
27
  "peerDependencies": {
28
28
  "@types/lodash-es": "^4.17.12",
29
- "@elserlabs/events": "0.0.2",
30
- "@elserlabs/types": "0.0.2"
29
+ "@elserlabs/events": "0.0.3",
30
+ "@elserlabs/types": "0.1.0"
31
31
  },
32
32
  "publishConfig": {
33
33
  "access": "public"
package/src/index.ts DELETED
@@ -1,18 +0,0 @@
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 {
10
- FabricObject,
11
- Control,
12
- classRegistry,
13
- Rect,
14
- util,
15
- controlsUtils,
16
- Pattern
17
- } from "fabric";
18
- export type { TransformActionHandler } from "fabric";