@dreamerbird/core 1.0.0 → 1.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.
- package/dist/index.d.ts +13 -6
- package/dist/index.js +199 -190
- package/dist/index.js.map +3 -3
- package/package.json +12 -13
package/dist/index.d.ts
CHANGED
|
@@ -527,14 +527,11 @@ interface IStudioAssetStorage extends ICoreAssetStorage {
|
|
|
527
527
|
/** Creates an asset from the provided blob and returns a promise to its ID */
|
|
528
528
|
createAsset: (asset: File) => Promise<string | null>;
|
|
529
529
|
}
|
|
530
|
-
type IAssetConf = {
|
|
531
|
-
/** The base URL for assets. */
|
|
532
|
-
baseUrl?: string;
|
|
533
|
-
};
|
|
534
530
|
type Conf = Partial<{
|
|
535
531
|
state: OnDiskState;
|
|
536
|
-
assets:
|
|
532
|
+
assets: IProjectConfig['assets'];
|
|
537
533
|
experiments: ExperimentsConf;
|
|
534
|
+
name: string;
|
|
538
535
|
}>;
|
|
539
536
|
type ExperimentsConf = Partial<{}>;
|
|
540
537
|
declare class Project {
|
|
@@ -576,6 +573,7 @@ declare class ProjectsSingleton {
|
|
|
576
573
|
add(id: ProjectId, project: Project): void;
|
|
577
574
|
get(id: ProjectId): Project | undefined;
|
|
578
575
|
has(id: ProjectId): boolean;
|
|
576
|
+
remove(id: ProjectId): void;
|
|
579
577
|
}
|
|
580
578
|
declare const singleton: ProjectsSingleton;
|
|
581
579
|
//# sourceMappingURL=projectsSingleton.d.ts.map
|
|
@@ -887,6 +885,10 @@ type IProjectConfig = {
|
|
|
887
885
|
state?: any;
|
|
888
886
|
assets?: {
|
|
889
887
|
baseUrl?: string;
|
|
888
|
+
storage?: {
|
|
889
|
+
getAssetUrl: (assetId: string) => string;
|
|
890
|
+
createAsset: (asset: globalThis.File) => Promise<string | null>;
|
|
891
|
+
};
|
|
890
892
|
};
|
|
891
893
|
};
|
|
892
894
|
/**
|
|
@@ -1751,6 +1753,10 @@ type PaneInstance<ClassName extends string> = {
|
|
|
1751
1753
|
instanceId: PaneInstanceId;
|
|
1752
1754
|
definition: PaneClassDefinition;
|
|
1753
1755
|
};
|
|
1756
|
+
type StudioPanelVisibility = {
|
|
1757
|
+
outline?: boolean;
|
|
1758
|
+
details?: boolean;
|
|
1759
|
+
};
|
|
1754
1760
|
interface IStudioUI {
|
|
1755
1761
|
/**
|
|
1756
1762
|
* Temporarily hides the studio
|
|
@@ -1769,6 +1775,7 @@ interface IStudioUI {
|
|
|
1769
1775
|
* 宿主嵌入场景可用它去掉左上角的 logo 条;缺省为显示。
|
|
1770
1776
|
*/
|
|
1771
1777
|
setLeftStripHidden(hidden: boolean): void;
|
|
1778
|
+
setPanelVisibility(visibility: StudioPanelVisibility): void;
|
|
1772
1779
|
renderToolset(toolsetId: string, htmlNode: HTMLElement): () => void;
|
|
1773
1780
|
}
|
|
1774
1781
|
interface InitOpts {
|
|
@@ -2698,4 +2705,4 @@ declare const theatre: {
|
|
|
2698
2705
|
init: typeof init;
|
|
2699
2706
|
};
|
|
2700
2707
|
|
|
2701
|
-
export { type $FixMe, type $IntentionalAny, type $____FixmeStudio, type Asset, type BasicKeyframe, type DeepPartialOfSerializableValue, type File$1 as File, type I18nMessages, type I18nVars, type IAttachAudioArgs, type IBasePropType, type IExtension, type IExtensionI18n, type IPlaybackDirection, type IPlaybackRange, type IProject, type IProjectConfig, type IRafDriver, type IRange, type IScrub, type IScrubApi, type ISequence, type ISheet, type ISheetObject, type IStudio, type IStudioBundle, type IStudioI18nAPI, type IStudioInternal, type IStudioUI, type ITransactionAPI, type IWorkspaceButtonConfig, type InitOpts, type Interpolator, type KeyframeId, type KeyframeType, type Laba, type NumberNudgeFn, type ObjectAddressKey, type OnDiskState, type OutlineMenuItem, type OutlineObjectMenuContribution, type PaneClassDefinition, type PaneInstance, type PaneInstanceId, type PathToProp, type PositionInScreenSpace, type ProjectAddress, type ProjectId, type PropAddress, type PropLabel, type PropTypeConfig, type PropTypeConfig_AllSimples, type PropTypeConfig_Boolean, type PropTypeConfig_Compound, type PropTypeConfig_Enum, type PropTypeConfig_File, type PropTypeConfig_Image, type PropTypeConfig_Number, type PropTypeConfig_Rgba, type PropTypeConfig_String, type PropTypeConfig_StringLiteral, type PropsValue, type Rgba, type SequenceAddress, type SequenceMarkerId, type SequenceTrackId, type SerializableMap, type SerializablePrimitive, type SerializableValue, type SheetAddress, type SheetId, type SheetInstanceId, type SheetInstanceOptional, type SheetObjectAction, type SheetObjectActionsConfig, type SheetObjectAddress, type SheetObjectPropTypeConfig, type ShorthandCompoundPropsToInitialValue, type ShorthandCompoundPropsToLonghandCompoundProps, type ShorthandPropToLonghandProp, type StrictRecord, type ToolConfig, type ToolConfigFlyoutMenu, type ToolConfigIcon, type ToolConfigOption, type ToolConfigSwitch, type ToolconfigFlyoutMenuItem, type ToolsetConfig, type UnknownShorthandCompoundProps, type UnknownValidCompoundProps, type VoidFn, type WithoutSheetInstance, __private, createRafDriver, theatre as default, getProject, getStudio, getStudioSync, init, notify, onChange, propTypeSymbol, resolvePropLabel, index_d as types, val };
|
|
2708
|
+
export { type $FixMe, type $IntentionalAny, type $____FixmeStudio, type Asset, type BasicKeyframe, type DeepPartialOfSerializableValue, type File$1 as File, type I18nMessages, type I18nVars, type IAttachAudioArgs, type IBasePropType, type IExtension, type IExtensionI18n, type IPlaybackDirection, type IPlaybackRange, type IProject, type IProjectConfig, type IRafDriver, type IRange, type IScrub, type IScrubApi, type ISequence, type ISheet, type ISheetObject, type IStudio, type IStudioBundle, type IStudioI18nAPI, type IStudioInternal, type IStudioUI, type ITransactionAPI, type IWorkspaceButtonConfig, type InitOpts, type Interpolator, type KeyframeId, type KeyframeType, type Laba, type NumberNudgeFn, type ObjectAddressKey, type OnDiskState, type OutlineMenuItem, type OutlineObjectMenuContribution, type PaneClassDefinition, type PaneInstance, type PaneInstanceId, type PathToProp, type PositionInScreenSpace, type ProjectAddress, type ProjectId, type PropAddress, type PropLabel, type PropTypeConfig, type PropTypeConfig_AllSimples, type PropTypeConfig_Boolean, type PropTypeConfig_Compound, type PropTypeConfig_Enum, type PropTypeConfig_File, type PropTypeConfig_Image, type PropTypeConfig_Number, type PropTypeConfig_Rgba, type PropTypeConfig_String, type PropTypeConfig_StringLiteral, type PropsValue, type Rgba, type SequenceAddress, type SequenceMarkerId, type SequenceTrackId, type SerializableMap, type SerializablePrimitive, type SerializableValue, type SheetAddress, type SheetId, type SheetInstanceId, type SheetInstanceOptional, type SheetObjectAction, type SheetObjectActionsConfig, type SheetObjectAddress, type SheetObjectPropTypeConfig, type ShorthandCompoundPropsToInitialValue, type ShorthandCompoundPropsToLonghandCompoundProps, type ShorthandPropToLonghandProp, type StrictRecord, type StudioPanelVisibility, type ToolConfig, type ToolConfigFlyoutMenu, type ToolConfigIcon, type ToolConfigOption, type ToolConfigSwitch, type ToolconfigFlyoutMenuItem, type ToolsetConfig, type UnknownShorthandCompoundProps, type UnknownValidCompoundProps, type VoidFn, type WithoutSheetInstance, __private, createRafDriver, theatre as default, getProject, getStudio, getStudioSync, init, notify, onChange, propTypeSymbol, resolvePropLabel, index_d as types, val };
|