@dreamerbird/core 1.0.1 → 1.2.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 +17 -6
- package/dist/index.js +3 -3
- package/dist/index.js.map +2 -2
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -527,13 +527,9 @@ 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;
|
|
538
534
|
name: string;
|
|
539
535
|
}>;
|
|
@@ -889,6 +885,10 @@ type IProjectConfig = {
|
|
|
889
885
|
state?: any;
|
|
890
886
|
assets?: {
|
|
891
887
|
baseUrl?: string;
|
|
888
|
+
storage?: {
|
|
889
|
+
getAssetUrl: (assetId: string) => string;
|
|
890
|
+
createAsset: (asset: globalThis.File) => Promise<string | null>;
|
|
891
|
+
};
|
|
892
892
|
};
|
|
893
893
|
};
|
|
894
894
|
/**
|
|
@@ -1757,6 +1757,12 @@ type StudioPanelVisibility = {
|
|
|
1757
1757
|
outline?: boolean;
|
|
1758
1758
|
details?: boolean;
|
|
1759
1759
|
};
|
|
1760
|
+
/** Logo content. Accepts JSX elements created with different React type versions. */
|
|
1761
|
+
type StudioLogo = ReactNode | {
|
|
1762
|
+
readonly type: unknown;
|
|
1763
|
+
readonly props: unknown;
|
|
1764
|
+
readonly key: string | null;
|
|
1765
|
+
};
|
|
1760
1766
|
interface IStudioUI {
|
|
1761
1767
|
/**
|
|
1762
1768
|
* Temporarily hides the studio
|
|
@@ -1775,6 +1781,11 @@ interface IStudioUI {
|
|
|
1775
1781
|
* 宿主嵌入场景可用它去掉左上角的 logo 条;缺省为显示。
|
|
1776
1782
|
*/
|
|
1777
1783
|
setLeftStripHidden(hidden: boolean): void;
|
|
1784
|
+
/**
|
|
1785
|
+
* Replaces the toolbar logo and its built-in menu with host-provided content.
|
|
1786
|
+
* Omit the logo to restore the default. This setting is local to the UI.
|
|
1787
|
+
*/
|
|
1788
|
+
setLogo(logo?: StudioLogo): void;
|
|
1778
1789
|
setPanelVisibility(visibility: StudioPanelVisibility): void;
|
|
1779
1790
|
renderToolset(toolsetId: string, htmlNode: HTMLElement): () => void;
|
|
1780
1791
|
}
|
|
@@ -2705,4 +2716,4 @@ declare const theatre: {
|
|
|
2705
2716
|
init: typeof init;
|
|
2706
2717
|
};
|
|
2707
2718
|
|
|
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 };
|
|
2719
|
+
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 StudioLogo, 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 };
|
package/dist/index.js
CHANGED
|
@@ -3963,7 +3963,7 @@ var Project = class {
|
|
|
3963
3963
|
__publicField(this, "_studio");
|
|
3964
3964
|
__publicField(this, "assetStorage");
|
|
3965
3965
|
__publicField(this, "type", "Theatre_Project");
|
|
3966
|
-
var _a;
|
|
3966
|
+
var _a, _b, _c;
|
|
3967
3967
|
this.address = { projectId: id };
|
|
3968
3968
|
let onDiskEphemeralAtom = new import_dataverse18.Atom({
|
|
3969
3969
|
loadingState: {
|
|
@@ -3977,7 +3977,7 @@ var Project = class {
|
|
|
3977
3977
|
revisionHistory: []
|
|
3978
3978
|
}
|
|
3979
3979
|
});
|
|
3980
|
-
if (this._assetStorageReadyDeferred = defer(), this.assetStorage = {
|
|
3980
|
+
if (this._assetStorageReadyDeferred = defer(), this.assetStorage = (_c = (_b = config.assets) == null ? void 0 : _b.storage) != null ? _c : {
|
|
3981
3981
|
getAssetUrl: (assetId) => {
|
|
3982
3982
|
var _a2;
|
|
3983
3983
|
return "".concat((_a2 = config.assets) == null ? void 0 : _a2.baseUrl, "/").concat(assetId);
|
|
@@ -4154,7 +4154,7 @@ function val8(pointer3) {
|
|
|
4154
4154
|
// src/env.ts
|
|
4155
4155
|
var env = {
|
|
4156
4156
|
BUILT_FOR_PLAYGROUND: "false",
|
|
4157
|
-
THEATRE_VERSION: "1.0
|
|
4157
|
+
THEATRE_VERSION: "1.2.0",
|
|
4158
4158
|
BACKEND_URL: "https://app.theatrejs.com"
|
|
4159
4159
|
};
|
|
4160
4160
|
|