@weaverse/core 5.3.3 → 5.4.1-beta.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.mts +24 -24
- package/dist/index.d.ts +24 -24
- package/dist/index.js +11 -52
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -52
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -285,35 +285,35 @@ type WeaverseVideo = {
|
|
|
285
285
|
previewSrc: string;
|
|
286
286
|
};
|
|
287
287
|
type AdditionalInputConfigs = SelectInputConfigs | ToggleGroupConfigs | RangeInputConfigs;
|
|
288
|
-
|
|
288
|
+
type ElementCSS = {
|
|
289
289
|
'@desktop'?: WeaverseCSSProperties | ChildElementCSS;
|
|
290
290
|
'@mobile'?: WeaverseCSSProperties | ChildElementCSS;
|
|
291
|
-
}
|
|
292
|
-
|
|
291
|
+
};
|
|
292
|
+
type ElementData = {
|
|
293
293
|
id: string;
|
|
294
294
|
type: string;
|
|
295
295
|
[key: string]: any;
|
|
296
|
-
}
|
|
297
|
-
|
|
296
|
+
};
|
|
297
|
+
type WeaverseElement = {
|
|
298
298
|
Component: ForwardRefExoticComponent<any>;
|
|
299
299
|
type: string;
|
|
300
300
|
'data-wv-id': string;
|
|
301
301
|
'data-wv-type': string;
|
|
302
|
-
}
|
|
303
|
-
|
|
302
|
+
};
|
|
303
|
+
type ElementSchema = {
|
|
304
304
|
title: string;
|
|
305
305
|
type: string;
|
|
306
|
-
}
|
|
307
|
-
|
|
306
|
+
};
|
|
307
|
+
type BreakPoints = {
|
|
308
308
|
mobile: string;
|
|
309
309
|
desktop: string;
|
|
310
|
-
}
|
|
311
|
-
|
|
310
|
+
};
|
|
311
|
+
type WeaverseProjectDataType = {
|
|
312
312
|
id?: string;
|
|
313
313
|
items: ElementData[];
|
|
314
314
|
rootId: string;
|
|
315
|
-
}
|
|
316
|
-
|
|
315
|
+
};
|
|
316
|
+
type WeaverseCoreParams = {
|
|
317
317
|
mediaBreakPoints?: BreakPoints;
|
|
318
318
|
weaverseHost?: string;
|
|
319
319
|
weaverseVersion?: string;
|
|
@@ -321,7 +321,7 @@ interface WeaverseCoreParams {
|
|
|
321
321
|
data: WeaverseProjectDataType;
|
|
322
322
|
isDesignMode?: boolean;
|
|
323
323
|
platformType?: PlatformTypeEnum;
|
|
324
|
-
}
|
|
324
|
+
};
|
|
325
325
|
/**
|
|
326
326
|
* BasicInput interface
|
|
327
327
|
*
|
|
@@ -336,7 +336,7 @@ interface WeaverseCoreParams {
|
|
|
336
336
|
* // Bind to `element.css["@desktop"].backgroundColor`
|
|
337
337
|
* name: "backgroundColor"
|
|
338
338
|
*/
|
|
339
|
-
|
|
339
|
+
type BasicInput<ConfigsType = AdditionalInputConfigs> = {
|
|
340
340
|
type: InputType;
|
|
341
341
|
name: string;
|
|
342
342
|
label?: string;
|
|
@@ -347,26 +347,26 @@ interface BasicInput<ConfigsType = AdditionalInputConfigs> {
|
|
|
347
347
|
};
|
|
348
348
|
placeholder?: string;
|
|
349
349
|
helpText?: string;
|
|
350
|
-
}
|
|
351
|
-
|
|
350
|
+
};
|
|
351
|
+
type SelectInputConfigs = {
|
|
352
352
|
options?: {
|
|
353
353
|
value: string;
|
|
354
354
|
label: string;
|
|
355
355
|
}[];
|
|
356
|
-
}
|
|
357
|
-
|
|
356
|
+
};
|
|
357
|
+
type ToggleGroupConfigs = {
|
|
358
358
|
options?: {
|
|
359
359
|
value: string;
|
|
360
360
|
label: string;
|
|
361
361
|
icon?: IconName;
|
|
362
362
|
}[];
|
|
363
|
-
}
|
|
364
|
-
|
|
363
|
+
};
|
|
364
|
+
type RangeInputConfigs = {
|
|
365
365
|
min?: number;
|
|
366
366
|
max?: number;
|
|
367
367
|
step?: number;
|
|
368
368
|
unit?: string;
|
|
369
|
-
}
|
|
369
|
+
};
|
|
370
370
|
declare global {
|
|
371
371
|
interface Window {
|
|
372
372
|
weaverseStudio: any;
|
|
@@ -384,12 +384,12 @@ declare class EventEmitter {
|
|
|
384
384
|
|
|
385
385
|
declare class WeaverseItemStore extends EventEmitter {
|
|
386
386
|
weaverse: Weaverse;
|
|
387
|
-
ref: RefObject<HTMLElement>;
|
|
387
|
+
ref: RefObject<HTMLElement | null>;
|
|
388
388
|
_store: ElementData;
|
|
389
389
|
stitchesClass: string;
|
|
390
390
|
constructor(initialData: ElementData, weaverse: Weaverse);
|
|
391
391
|
get _id(): string;
|
|
392
|
-
get _element(): HTMLElement;
|
|
392
|
+
get _element(): HTMLElement | null;
|
|
393
393
|
get Element(): any;
|
|
394
394
|
getDefaultCss: () => ElementCSS;
|
|
395
395
|
get data(): ElementData;
|
package/dist/index.d.ts
CHANGED
|
@@ -285,35 +285,35 @@ type WeaverseVideo = {
|
|
|
285
285
|
previewSrc: string;
|
|
286
286
|
};
|
|
287
287
|
type AdditionalInputConfigs = SelectInputConfigs | ToggleGroupConfigs | RangeInputConfigs;
|
|
288
|
-
|
|
288
|
+
type ElementCSS = {
|
|
289
289
|
'@desktop'?: WeaverseCSSProperties | ChildElementCSS;
|
|
290
290
|
'@mobile'?: WeaverseCSSProperties | ChildElementCSS;
|
|
291
|
-
}
|
|
292
|
-
|
|
291
|
+
};
|
|
292
|
+
type ElementData = {
|
|
293
293
|
id: string;
|
|
294
294
|
type: string;
|
|
295
295
|
[key: string]: any;
|
|
296
|
-
}
|
|
297
|
-
|
|
296
|
+
};
|
|
297
|
+
type WeaverseElement = {
|
|
298
298
|
Component: ForwardRefExoticComponent<any>;
|
|
299
299
|
type: string;
|
|
300
300
|
'data-wv-id': string;
|
|
301
301
|
'data-wv-type': string;
|
|
302
|
-
}
|
|
303
|
-
|
|
302
|
+
};
|
|
303
|
+
type ElementSchema = {
|
|
304
304
|
title: string;
|
|
305
305
|
type: string;
|
|
306
|
-
}
|
|
307
|
-
|
|
306
|
+
};
|
|
307
|
+
type BreakPoints = {
|
|
308
308
|
mobile: string;
|
|
309
309
|
desktop: string;
|
|
310
|
-
}
|
|
311
|
-
|
|
310
|
+
};
|
|
311
|
+
type WeaverseProjectDataType = {
|
|
312
312
|
id?: string;
|
|
313
313
|
items: ElementData[];
|
|
314
314
|
rootId: string;
|
|
315
|
-
}
|
|
316
|
-
|
|
315
|
+
};
|
|
316
|
+
type WeaverseCoreParams = {
|
|
317
317
|
mediaBreakPoints?: BreakPoints;
|
|
318
318
|
weaverseHost?: string;
|
|
319
319
|
weaverseVersion?: string;
|
|
@@ -321,7 +321,7 @@ interface WeaverseCoreParams {
|
|
|
321
321
|
data: WeaverseProjectDataType;
|
|
322
322
|
isDesignMode?: boolean;
|
|
323
323
|
platformType?: PlatformTypeEnum;
|
|
324
|
-
}
|
|
324
|
+
};
|
|
325
325
|
/**
|
|
326
326
|
* BasicInput interface
|
|
327
327
|
*
|
|
@@ -336,7 +336,7 @@ interface WeaverseCoreParams {
|
|
|
336
336
|
* // Bind to `element.css["@desktop"].backgroundColor`
|
|
337
337
|
* name: "backgroundColor"
|
|
338
338
|
*/
|
|
339
|
-
|
|
339
|
+
type BasicInput<ConfigsType = AdditionalInputConfigs> = {
|
|
340
340
|
type: InputType;
|
|
341
341
|
name: string;
|
|
342
342
|
label?: string;
|
|
@@ -347,26 +347,26 @@ interface BasicInput<ConfigsType = AdditionalInputConfigs> {
|
|
|
347
347
|
};
|
|
348
348
|
placeholder?: string;
|
|
349
349
|
helpText?: string;
|
|
350
|
-
}
|
|
351
|
-
|
|
350
|
+
};
|
|
351
|
+
type SelectInputConfigs = {
|
|
352
352
|
options?: {
|
|
353
353
|
value: string;
|
|
354
354
|
label: string;
|
|
355
355
|
}[];
|
|
356
|
-
}
|
|
357
|
-
|
|
356
|
+
};
|
|
357
|
+
type ToggleGroupConfigs = {
|
|
358
358
|
options?: {
|
|
359
359
|
value: string;
|
|
360
360
|
label: string;
|
|
361
361
|
icon?: IconName;
|
|
362
362
|
}[];
|
|
363
|
-
}
|
|
364
|
-
|
|
363
|
+
};
|
|
364
|
+
type RangeInputConfigs = {
|
|
365
365
|
min?: number;
|
|
366
366
|
max?: number;
|
|
367
367
|
step?: number;
|
|
368
368
|
unit?: string;
|
|
369
|
-
}
|
|
369
|
+
};
|
|
370
370
|
declare global {
|
|
371
371
|
interface Window {
|
|
372
372
|
weaverseStudio: any;
|
|
@@ -384,12 +384,12 @@ declare class EventEmitter {
|
|
|
384
384
|
|
|
385
385
|
declare class WeaverseItemStore extends EventEmitter {
|
|
386
386
|
weaverse: Weaverse;
|
|
387
|
-
ref: RefObject<HTMLElement>;
|
|
387
|
+
ref: RefObject<HTMLElement | null>;
|
|
388
388
|
_store: ElementData;
|
|
389
389
|
stitchesClass: string;
|
|
390
390
|
constructor(initialData: ElementData, weaverse: Weaverse);
|
|
391
391
|
get _id(): string;
|
|
392
|
-
get _element(): HTMLElement;
|
|
392
|
+
get _element(): HTMLElement | null;
|
|
393
393
|
get Element(): any;
|
|
394
394
|
getDefaultCss: () => ElementCSS;
|
|
395
395
|
get data(): ElementData;
|
package/dist/index.js
CHANGED
|
@@ -471,7 +471,7 @@ var require_react_production = __commonJS({
|
|
|
471
471
|
exports2.useTransition = function() {
|
|
472
472
|
return ReactSharedInternals.H.useTransition();
|
|
473
473
|
};
|
|
474
|
-
exports2.version = "19.1.
|
|
474
|
+
exports2.version = "19.1.1";
|
|
475
475
|
}
|
|
476
476
|
});
|
|
477
477
|
|
|
@@ -479,7 +479,7 @@ var require_react_production = __commonJS({
|
|
|
479
479
|
var require_react_development = __commonJS({
|
|
480
480
|
"../../node_modules/react/cjs/react.development.js"(exports2, module2) {
|
|
481
481
|
"use strict";
|
|
482
|
-
"production" !== process.env.NODE_ENV && function() {
|
|
482
|
+
"production" !== process.env.NODE_ENV && (function() {
|
|
483
483
|
function defineDeprecationWarning(methodName, info) {
|
|
484
484
|
Object.defineProperty(Component.prototype, methodName, {
|
|
485
485
|
get: function() {
|
|
@@ -986,13 +986,16 @@ var require_react_development = __commonJS({
|
|
|
986
986
|
return null;
|
|
987
987
|
};
|
|
988
988
|
deprecatedAPIs = {
|
|
989
|
-
|
|
989
|
+
react_stack_bottom_frame: function(callStackForError) {
|
|
990
990
|
return callStackForError();
|
|
991
991
|
}
|
|
992
992
|
};
|
|
993
993
|
var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;
|
|
994
994
|
var didWarnAboutElementRef = {};
|
|
995
|
-
var unknownOwnerDebugStack = deprecatedAPIs
|
|
995
|
+
var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(
|
|
996
|
+
deprecatedAPIs,
|
|
997
|
+
UnknownOwner
|
|
998
|
+
)();
|
|
996
999
|
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
|
|
997
1000
|
var didWarnAboutMaps = false, userProvidedKeyEscapeRegex = /\/+/g, reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
|
|
998
1001
|
if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
|
|
@@ -1409,9 +1412,9 @@ var require_react_development = __commonJS({
|
|
|
1409
1412
|
exports2.useTransition = function() {
|
|
1410
1413
|
return resolveDispatcher().useTransition();
|
|
1411
1414
|
};
|
|
1412
|
-
exports2.version = "19.1.
|
|
1415
|
+
exports2.version = "19.1.1";
|
|
1413
1416
|
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
1414
|
-
}();
|
|
1417
|
+
})();
|
|
1415
1418
|
}
|
|
1416
1419
|
});
|
|
1417
1420
|
|
|
@@ -1447,51 +1450,7 @@ var stitches = __toESM(require("@stitches/core"));
|
|
|
1447
1450
|
var import_react = __toESM(require_react());
|
|
1448
1451
|
|
|
1449
1452
|
// package.json
|
|
1450
|
-
var
|
|
1451
|
-
name: "@weaverse/core",
|
|
1452
|
-
author: "Weaverse Team",
|
|
1453
|
-
description: "Weaverse Core",
|
|
1454
|
-
version: "5.3.3",
|
|
1455
|
-
license: "MIT",
|
|
1456
|
-
main: "dist/index.js",
|
|
1457
|
-
types: "dist/index.d.ts",
|
|
1458
|
-
module: "dist/index.mjs",
|
|
1459
|
-
repository: {
|
|
1460
|
-
url: "git+https://github.com/Weaverse/weaverse.git",
|
|
1461
|
-
directory: "packages/core"
|
|
1462
|
-
},
|
|
1463
|
-
publishConfig: {
|
|
1464
|
-
access: "public",
|
|
1465
|
-
"@weaverse:registry": "https://registry.npmjs.org"
|
|
1466
|
-
},
|
|
1467
|
-
files: [
|
|
1468
|
-
"dist/*"
|
|
1469
|
-
],
|
|
1470
|
-
engines: {
|
|
1471
|
-
node: ">=18"
|
|
1472
|
-
},
|
|
1473
|
-
scripts: {
|
|
1474
|
-
dev: "tsup --watch",
|
|
1475
|
-
build: "tsup",
|
|
1476
|
-
clean: "rimraf dist"
|
|
1477
|
-
},
|
|
1478
|
-
tsup: {
|
|
1479
|
-
entry: [
|
|
1480
|
-
"src/index.ts"
|
|
1481
|
-
],
|
|
1482
|
-
format: [
|
|
1483
|
-
"esm",
|
|
1484
|
-
"cjs"
|
|
1485
|
-
],
|
|
1486
|
-
dts: true,
|
|
1487
|
-
sourcemap: true,
|
|
1488
|
-
clean: true,
|
|
1489
|
-
outDir: "dist"
|
|
1490
|
-
},
|
|
1491
|
-
dependencies: {
|
|
1492
|
-
"@stitches/core": "^1.2.8"
|
|
1493
|
-
}
|
|
1494
|
-
};
|
|
1453
|
+
var version = "5.4.1-beta.0";
|
|
1495
1454
|
|
|
1496
1455
|
// src/utils/index.ts
|
|
1497
1456
|
var isReactNative = typeof navigator === "object" && navigator.product === "ReactNative";
|
|
@@ -1635,7 +1594,7 @@ var Weaverse = class _Weaverse extends EventEmitter {
|
|
|
1635
1594
|
contentRootElement = null;
|
|
1636
1595
|
static itemInstances = /* @__PURE__ */ new Map();
|
|
1637
1596
|
weaverseHost = "https://studio.weaverse.io";
|
|
1638
|
-
weaverseVersion =
|
|
1597
|
+
weaverseVersion = version;
|
|
1639
1598
|
projectId = "";
|
|
1640
1599
|
isDesignMode = false;
|
|
1641
1600
|
isPreviewMode = false;
|