@dreamerbird/core 1.0.1 → 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 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: IAssetConf;
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
  /**
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.1",
4157
+ THEATRE_VERSION: "1.1.0",
4158
4158
  BACKEND_URL: "https://app.theatrejs.com"
4159
4159
  };
4160
4160