@embeddable.com/sdk-react 3.1.4 → 3.1.6
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/lib/index.esm.js +9 -0
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +9 -0
- package/lib/index.js.map +1 -1
- package/package.json +2 -1
package/lib/index.js
CHANGED
|
@@ -7,6 +7,7 @@ var vite = require('vite');
|
|
|
7
7
|
var viteReactPlugin = require('@vitejs/plugin-react');
|
|
8
8
|
var fs = require('node:fs/promises');
|
|
9
9
|
var url = require('node:url');
|
|
10
|
+
var globalRegistrator = require('@happy-dom/global-registrator');
|
|
10
11
|
require('node:child_process');
|
|
11
12
|
var zod = require('zod');
|
|
12
13
|
var parser = require('@babel/parser');
|
|
@@ -50,6 +51,11 @@ var createContext = (pluginRoot, coreCtx) => {
|
|
|
50
51
|
};
|
|
51
52
|
};
|
|
52
53
|
|
|
54
|
+
globalRegistrator.GlobalRegistrator.register({
|
|
55
|
+
url: "http://localhost:3000",
|
|
56
|
+
width: 1920,
|
|
57
|
+
height: 1080,
|
|
58
|
+
});
|
|
53
59
|
const loadComponentMeta = async (moduleId) => {
|
|
54
60
|
const module = await import(url__namespace.pathToFileURL(moduleId).href);
|
|
55
61
|
return module.meta;
|
|
@@ -510,6 +516,9 @@ createBuiltInType("time", {
|
|
|
510
516
|
});
|
|
511
517
|
createBuiltInType("timeRange", {
|
|
512
518
|
transform: function (value) {
|
|
519
|
+
// Return undefined instead of a null populated object
|
|
520
|
+
if (!value)
|
|
521
|
+
return undefined;
|
|
513
522
|
var _a = [value === null || value === void 0 ? void 0 : value.from, value === null || value === void 0 ? void 0 : value.to], from = _a[0], to = _a[1];
|
|
514
523
|
var fromDate = new Date(from);
|
|
515
524
|
var toDate = new Date(to);
|