@weaverse/core 0.7.12 → 0.7.14

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
@@ -92,7 +92,7 @@ interface ElementCatalog {
92
92
  group?: CatalogGroup;
93
93
  data?: ElementData[];
94
94
  }
95
- declare type FlagType = "draggable" | "resizable" | "sortable" | "droppable" | "deletable" | "duplicable";
95
+ declare type FlagType = "draggable" | "resizable" | "sortable" | "droppable" | "ignoreShortcutKeys";
96
96
  declare type ElementFlags = Partial<Record<FlagType, boolean>>;
97
97
  interface ChildElement {
98
98
  label: string;
@@ -303,7 +303,7 @@ declare class Weaverse {
303
303
  unsubscribe(fn: any): void;
304
304
  triggerUpdate(): void;
305
305
  /**
306
- * fetch data from Weaverse API (https://weaverse.io/api/v1/projects/:projectKey)
306
+ * fetch data from Weaverse API (https://weaverse.io/api/v1/project/:projectKey)
307
307
  * @param fetch {fetch} custom fetch function, pass in custom fetch function if you want to use your own fetch function
308
308
  * @param appUrl
309
309
  * @param projectKey
package/dist/index.js CHANGED
@@ -151,7 +151,7 @@ var Weaverse = class {
151
151
  constructor({ appUrl, projectKey, projectData, mediaBreakPoints, isDesignMode, ssrMode } = {}) {
152
152
  this.elementInstances = /* @__PURE__ */ new Map();
153
153
  this.itemInstances = /* @__PURE__ */ new Map();
154
- this.appUrl = process.env.NODE_ENV === "development" ? "http://localhost:3000" : "https://ss.weaverse.io";
154
+ this.appUrl = process.env.NODE_ENV === "development" ? "http://localhost:3000" : "https://studio.weaverse.io";
155
155
  this.projectKey = "";
156
156
  this.projectData = {
157
157
  rootId: "",
@@ -243,7 +243,7 @@ var Weaverse = class {
243
243
  appUrl,
244
244
  projectKey
245
245
  }) {
246
- return fetch(appUrl + `/api/public/${projectKey}`).then((r) => r.json()).catch(console.error);
246
+ return fetch(appUrl + `/api/public/project/${projectKey}`).then((r) => r.json()).catch(console.error);
247
247
  }
248
248
  setProjectData(projectData) {
249
249
  this.projectData = projectData;
package/dist/index.mjs CHANGED
@@ -113,7 +113,7 @@ var Weaverse = class {
113
113
  constructor({ appUrl, projectKey, projectData, mediaBreakPoints, isDesignMode, ssrMode } = {}) {
114
114
  this.elementInstances = /* @__PURE__ */ new Map();
115
115
  this.itemInstances = /* @__PURE__ */ new Map();
116
- this.appUrl = process.env.NODE_ENV === "development" ? "http://localhost:3000" : "https://ss.weaverse.io";
116
+ this.appUrl = process.env.NODE_ENV === "development" ? "http://localhost:3000" : "https://studio.weaverse.io";
117
117
  this.projectKey = "";
118
118
  this.projectData = {
119
119
  rootId: "",
@@ -205,7 +205,7 @@ var Weaverse = class {
205
205
  appUrl,
206
206
  projectKey
207
207
  }) {
208
- return fetch(appUrl + `/api/public/${projectKey}`).then((r) => r.json()).catch(console.error);
208
+ return fetch(appUrl + `/api/public/project/${projectKey}`).then((r) => r.json()).catch(console.error);
209
209
  }
210
210
  setProjectData(projectData) {
211
211
  this.projectData = projectData;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.7.12",
2
+ "version": "0.7.14",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",