@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 CHANGED
@@ -7,6 +7,7 @@ import viteReactPlugin from '@vitejs/plugin-react';
7
7
  import * as fs from 'node:fs/promises';
8
8
  import { readdir, lstat, rm } from 'node:fs/promises';
9
9
  import * as url from 'node:url';
10
+ import { GlobalRegistrator } from '@happy-dom/global-registrator';
10
11
  import 'node:child_process';
11
12
  import { z } from 'zod';
12
13
  import { parse } from '@babel/parser';
@@ -25,6 +26,11 @@ var createContext = (pluginRoot, coreCtx) => {
25
26
  };
26
27
  };
27
28
 
29
+ GlobalRegistrator.register({
30
+ url: "http://localhost:3000",
31
+ width: 1920,
32
+ height: 1080,
33
+ });
28
34
  const loadComponentMeta = async (moduleId) => {
29
35
  const module = await import(url.pathToFileURL(moduleId).href);
30
36
  return module.meta;
@@ -485,6 +491,9 @@ createBuiltInType("time", {
485
491
  });
486
492
  createBuiltInType("timeRange", {
487
493
  transform: function (value) {
494
+ // Return undefined instead of a null populated object
495
+ if (!value)
496
+ return undefined;
488
497
  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];
489
498
  var fromDate = new Date(from);
490
499
  var toDate = new Date(to);