@unseenco/theatre-studio 0.4.1 → 0.4.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/dist/index.d.ts +15 -56
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { IProject
|
|
2
|
+
import { IProject, ISheet, IRafDriver, ISheetObject, __UNSTABLE_Project_OnDiskState } from '@unseenco/theatre-core';
|
|
3
3
|
import * as _unseenco_theatre_dataverse from '@unseenco/theatre-dataverse';
|
|
4
|
-
import {
|
|
5
|
-
import { IProject } from '@unseenco/theatre-core/projects/TheatreProject';
|
|
6
|
-
import Project from '@unseenco/theatre-core/projects/Project';
|
|
7
|
-
import Sequence from '@unseenco/theatre-core/sequences/Sequence';
|
|
8
|
-
import { ISequence } from '@unseenco/theatre-core/sequences/TheatreSequence';
|
|
9
|
-
import SheetObject from '@unseenco/theatre-core/sheetObjects/SheetObject';
|
|
10
|
-
import TheatreSheetObject, { ISheetObject } from '@unseenco/theatre-core/sheetObjects/TheatreSheetObject';
|
|
11
|
-
import Sheet from '@unseenco/theatre-core/sheets/Sheet';
|
|
12
|
-
import TheatreSheet, { ISheet } from '@unseenco/theatre-core/sheets/TheatreSheet';
|
|
4
|
+
import { Pointer, PointerProxy, Ticker } from '@unseenco/theatre-dataverse';
|
|
13
5
|
import { ProjectState, ProjectState_Historic, SheetAhistoricState, OnDiskState } from '@unseenco/theatre-core/projects/store/storeTypes';
|
|
14
6
|
import { Keyframe, SheetState_Historic, HistoricPositionalSequence, KeyframeType, GsapTimelineChildClip } from '@unseenco/theatre-core/projects/store/types/SheetState_Historic';
|
|
7
|
+
import Project from '@unseenco/theatre-core/projects/Project';
|
|
8
|
+
import Sheet from '@unseenco/theatre-core/sheets/Sheet';
|
|
9
|
+
import SheetObject from '@unseenco/theatre-core/sheetObjects/SheetObject';
|
|
15
10
|
import { SequenceVariantId } from '@unseenco/theatre-core/sequences/sequenceVariants';
|
|
16
11
|
import * as immer_dist_internal from 'immer/dist/internal';
|
|
17
12
|
import SheetTemplate from '@unseenco/theatre-core/sheets/SheetTemplate';
|
|
@@ -20,6 +15,8 @@ import { PropTypeConfig } from '@unseenco/theatre-core/propTypes';
|
|
|
20
15
|
import { Draft } from 'immer';
|
|
21
16
|
import { CoreBits } from '@unseenco/theatre-core/CoreBundle';
|
|
22
17
|
import * as _coreExports from '@unseenco/theatre-core/coreExports';
|
|
18
|
+
import TheatreSheetObject from '@unseenco/theatre-core/sheetObjects/TheatreSheetObject';
|
|
19
|
+
import TheatreSheet from '@unseenco/theatre-core/sheets/TheatreSheet';
|
|
23
20
|
import React$1 from 'react';
|
|
24
21
|
|
|
25
22
|
type DockedPageViewportRect = {
|
|
@@ -72,44 +69,6 @@ type IRange<T extends number = number> = {
|
|
|
72
69
|
start: T;
|
|
73
70
|
end: T;
|
|
74
71
|
};
|
|
75
|
-
/** For `any`s that we don't care about */
|
|
76
|
-
type $IntentionalAny = any;
|
|
77
|
-
|
|
78
|
-
/** Public API for a custom requestAnimationFrame driver that advances Theatre's core ticker. */
|
|
79
|
-
interface IRafDriver {
|
|
80
|
-
/**
|
|
81
|
-
* All raf derivers have have `driver.type === 'Theatre_RafDriver_PublicAPI'`
|
|
82
|
-
*/
|
|
83
|
-
readonly type: 'Theatre_RafDriver_PublicAPI';
|
|
84
|
-
/**
|
|
85
|
-
* The name of the driver. This is used for debugging purposes.
|
|
86
|
-
*/
|
|
87
|
-
name: string;
|
|
88
|
-
/**
|
|
89
|
-
* The id of the driver. This is used for debugging purposes.
|
|
90
|
-
* It's guaranteed to be unique.
|
|
91
|
-
*/
|
|
92
|
-
id: number;
|
|
93
|
-
/**
|
|
94
|
-
* This is called by the driver when it's time to tick forward.
|
|
95
|
-
* The time param is of the same type returned by `performance.now()`.
|
|
96
|
-
*/
|
|
97
|
-
tick: (time: number) => void;
|
|
98
|
-
}
|
|
99
|
-
interface RafDriverPrivateAPI {
|
|
100
|
-
readonly type: 'Theatre_RafDriver_PrivateAPI';
|
|
101
|
-
publicApi: IRafDriver;
|
|
102
|
-
ticker: Ticker;
|
|
103
|
-
start?: () => void;
|
|
104
|
-
stop?: () => void;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* Given a public API object, returns the corresponding private API object.
|
|
109
|
-
*/
|
|
110
|
-
declare function privateAPI<P extends {
|
|
111
|
-
type: string;
|
|
112
|
-
}>(pub: P): P extends IProject ? Project : P extends ISheet ? Sheet : P extends ISheetObject<$IntentionalAny> ? SheetObject : P extends ISequence ? Sequence : P extends IRafDriver ? RafDriverPrivateAPI : never;
|
|
113
72
|
|
|
114
73
|
/**
|
|
115
74
|
* Using a symbol, we can sort of add unique properties to arbitrary other types.
|
|
@@ -1161,14 +1120,14 @@ declare class Studio {
|
|
|
1161
1120
|
undoable?: boolean;
|
|
1162
1121
|
}): void;
|
|
1163
1122
|
__dev_startHistoryFromScratch(newHistoricPart: StudioHistoricState): void;
|
|
1164
|
-
get corePrivateAPI(): typeof privateAPI | undefined;
|
|
1123
|
+
get corePrivateAPI(): typeof _coreExports.privateAPI | undefined;
|
|
1165
1124
|
get core(): typeof _coreExports | undefined;
|
|
1166
1125
|
get coreP(): Pointer<typeof _coreExports | undefined>;
|
|
1167
1126
|
extend(extension: IExtension, opts?: {
|
|
1168
1127
|
__experimental_reconfigure?: boolean;
|
|
1169
1128
|
}): void;
|
|
1170
|
-
getStudioProject(core: CoreExports): IProject
|
|
1171
|
-
getExtensionSheet(extensionId: string, core: CoreExports): ISheet
|
|
1129
|
+
getStudioProject(core: CoreExports): IProject;
|
|
1130
|
+
getExtensionSheet(extensionId: string, core: CoreExports): ISheet;
|
|
1172
1131
|
undo(): void;
|
|
1173
1132
|
redo(): void;
|
|
1174
1133
|
createContentOfSaveFile(projectId: string): OnDiskState;
|
|
@@ -1485,7 +1444,7 @@ interface _StudioInitializeOpts {
|
|
|
1485
1444
|
*/
|
|
1486
1445
|
usePersistentStorage?: boolean;
|
|
1487
1446
|
/** Optional custom raf driver shared with `@unseenco/theatre-core` for synchronized ticking. */
|
|
1488
|
-
__experimental_rafDriver?: IRafDriver
|
|
1447
|
+
__experimental_rafDriver?: IRafDriver | undefined;
|
|
1489
1448
|
/**
|
|
1490
1449
|
* Source hex for Studio’s accent palette (selection, outline, keyframes,
|
|
1491
1450
|
* playhead, etc.). All other accent colors are derived from this value.
|
|
@@ -1640,11 +1599,11 @@ interface IStudio {
|
|
|
1640
1599
|
*
|
|
1641
1600
|
* You can read the current selection from studio.selection
|
|
1642
1601
|
*/
|
|
1643
|
-
setSelection(selection: Array<ISheetObject
|
|
1602
|
+
setSelection(selection: Array<ISheetObject<any> | ISheet>): void;
|
|
1644
1603
|
/**
|
|
1645
1604
|
* Calls fn every time the current selection changes.
|
|
1646
1605
|
*/
|
|
1647
|
-
onSelectionChange(fn: (s: Array<ISheetObject
|
|
1606
|
+
onSelectionChange(fn: (s: Array<ISheetObject<{}> | ISheet>) => void): VoidFunction;
|
|
1648
1607
|
/**
|
|
1649
1608
|
* The current selection, consisting of Sheets and Sheet Objects
|
|
1650
1609
|
*
|
|
@@ -1654,7 +1613,7 @@ interface IStudio {
|
|
|
1654
1613
|
* console.log(studio.selection) // => [ISheetObject, ISheet]
|
|
1655
1614
|
* ```
|
|
1656
1615
|
*/
|
|
1657
|
-
readonly selection: Array<ISheetObject
|
|
1616
|
+
readonly selection: Array<ISheetObject<{}> | ISheet>;
|
|
1658
1617
|
/**
|
|
1659
1618
|
* Registers an extension
|
|
1660
1619
|
*/
|
|
@@ -1689,7 +1648,7 @@ interface IStudio {
|
|
|
1689
1648
|
* It is useful if you'd like to have sheets/objects that are present only when
|
|
1690
1649
|
* studio is present.
|
|
1691
1650
|
*/
|
|
1692
|
-
getStudioProject(): IProject
|
|
1651
|
+
getStudioProject(): IProject;
|
|
1693
1652
|
/**
|
|
1694
1653
|
* Creates a JSON object that contains the state of the project. You can use this
|
|
1695
1654
|
* to programmatically save the state of your projects to the storage system of your
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unseenco/theatre-studio",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"description": "Motion design editor for the web",
|
|
6
6
|
"repository": {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@unseenco/theatre-core": "*"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@unseenco/theatre-dataverse": "0.4.
|
|
52
|
+
"@unseenco/theatre-dataverse": "0.4.2"
|
|
53
53
|
},
|
|
54
54
|
"//": "Add packages here to make them externals of studio. Add them to theatre/package.json if you want to bundle them with studio."
|
|
55
55
|
}
|