@builder.io/sdk-qwik 0.16.5 → 0.16.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.
@@ -4763,14 +4763,14 @@ const getDefaultRegisteredComponents = () => [
4763
4763
  ];
4764
4764
  const createRegisterComponentMessage = (info) => ({
4765
4765
  type: "builder.registerComponent",
4766
- data: serializeComponentInfo(info)
4766
+ data: serializeIncludingFunctions(info)
4767
4767
  });
4768
4768
  const serializeFn = (fnValue) => {
4769
4769
  const fnStr = fnValue.toString().trim();
4770
4770
  const appendFunction = !fnStr.startsWith("function") && !fnStr.startsWith("(");
4771
4771
  return `return (${appendFunction ? "function " : ""}${fnStr}).apply(this, arguments)`;
4772
4772
  };
4773
- function serializeComponentInfo(info) {
4773
+ function serializeIncludingFunctions(info) {
4774
4774
  return JSON.parse(JSON.stringify(info, (key, value) => {
4775
4775
  if (typeof value === "function")
4776
4776
  return serializeFn(value);
@@ -5219,9 +5219,11 @@ function isFromTrustedHost(trustedHosts, e) {
5219
5219
  const url = new URL(e.origin), hostname = url.hostname;
5220
5220
  return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
5221
5221
  }
5222
- const SDK_VERSION = "0.16.5";
5222
+ const SDK_VERSION = "0.16.6";
5223
5223
  const registry = {};
5224
5224
  function register(type, info) {
5225
+ if (type === "plugin")
5226
+ info = serializeIncludingFunctions(info);
5225
5227
  let typeList = registry[type];
5226
5228
  if (!typeList)
5227
5229
  typeList = registry[type] = [];
@@ -5935,7 +5937,7 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
5935
5937
  })) || []
5936
5938
  ].reduce((acc, { component: _, ...info }) => ({
5937
5939
  ...acc,
5938
- [info.name]: serializeComponentInfo(info)
5940
+ [info.name]: serializeIncludingFunctions(info)
5939
5941
  }), {}),
5940
5942
  inheritedStyles: {},
5941
5943
  BlocksWrapper: props.blocksWrapper || "div",
@@ -5955,7 +5957,7 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
5955
5957
  ...acc,
5956
5958
  [info.name]: {
5957
5959
  component,
5958
- ...serializeComponentInfo(info)
5960
+ ...serializeIncludingFunctions(info)
5959
5961
  }
5960
5962
  }), {}),
5961
5963
  scriptStr: getUpdateVariantVisibilityScript({
@@ -4761,14 +4761,14 @@ const getDefaultRegisteredComponents = () => [
4761
4761
  ];
4762
4762
  const createRegisterComponentMessage = (info) => ({
4763
4763
  type: "builder.registerComponent",
4764
- data: serializeComponentInfo(info)
4764
+ data: serializeIncludingFunctions(info)
4765
4765
  });
4766
4766
  const serializeFn = (fnValue) => {
4767
4767
  const fnStr = fnValue.toString().trim();
4768
4768
  const appendFunction = !fnStr.startsWith("function") && !fnStr.startsWith("(");
4769
4769
  return `return (${appendFunction ? "function " : ""}${fnStr}).apply(this, arguments)`;
4770
4770
  };
4771
- function serializeComponentInfo(info) {
4771
+ function serializeIncludingFunctions(info) {
4772
4772
  return JSON.parse(JSON.stringify(info, (key, value) => {
4773
4773
  if (typeof value === "function")
4774
4774
  return serializeFn(value);
@@ -5217,9 +5217,11 @@ function isFromTrustedHost(trustedHosts, e) {
5217
5217
  const url = new URL(e.origin), hostname = url.hostname;
5218
5218
  return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
5219
5219
  }
5220
- const SDK_VERSION = "0.16.5";
5220
+ const SDK_VERSION = "0.16.6";
5221
5221
  const registry = {};
5222
5222
  function register(type, info) {
5223
+ if (type === "plugin")
5224
+ info = serializeIncludingFunctions(info);
5223
5225
  let typeList = registry[type];
5224
5226
  if (!typeList)
5225
5227
  typeList = registry[type] = [];
@@ -5933,7 +5935,7 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
5933
5935
  })) || []
5934
5936
  ].reduce((acc, { component: _, ...info }) => ({
5935
5937
  ...acc,
5936
- [info.name]: serializeComponentInfo(info)
5938
+ [info.name]: serializeIncludingFunctions(info)
5937
5939
  }), {}),
5938
5940
  inheritedStyles: {},
5939
5941
  BlocksWrapper: props.blocksWrapper || "div",
@@ -5953,7 +5955,7 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
5953
5955
  ...acc,
5954
5956
  [info.name]: {
5955
5957
  component,
5956
- ...serializeComponentInfo(info)
5958
+ ...serializeIncludingFunctions(info)
5957
5959
  }
5958
5960
  }), {}),
5959
5961
  scriptStr: getUpdateVariantVisibilityScript({
@@ -7987,14 +7987,14 @@ const getDefaultRegisteredComponents = () => [
7987
7987
  ];
7988
7988
  const createRegisterComponentMessage = (info) => ({
7989
7989
  type: "builder.registerComponent",
7990
- data: serializeComponentInfo(info)
7990
+ data: serializeIncludingFunctions(info)
7991
7991
  });
7992
7992
  const serializeFn = (fnValue) => {
7993
7993
  const fnStr = fnValue.toString().trim();
7994
7994
  const appendFunction = !fnStr.startsWith("function") && !fnStr.startsWith("(");
7995
7995
  return `return (${appendFunction ? "function " : ""}${fnStr}).apply(this, arguments)`;
7996
7996
  };
7997
- function serializeComponentInfo(info) {
7997
+ function serializeIncludingFunctions(info) {
7998
7998
  return JSON.parse(JSON.stringify(info, (key, value) => {
7999
7999
  if (typeof value === "function")
8000
8000
  return serializeFn(value);
@@ -8443,9 +8443,11 @@ function isFromTrustedHost(trustedHosts, e) {
8443
8443
  const url = new URL(e.origin), hostname = url.hostname;
8444
8444
  return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
8445
8445
  }
8446
- const SDK_VERSION = "0.16.5";
8446
+ const SDK_VERSION = "0.16.6";
8447
8447
  const registry = {};
8448
8448
  function register(type, info) {
8449
+ if (type === "plugin")
8450
+ info = serializeIncludingFunctions(info);
8449
8451
  let typeList = registry[type];
8450
8452
  if (!typeList)
8451
8453
  typeList = registry[type] = [];
@@ -9159,7 +9161,7 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
9159
9161
  })) || []
9160
9162
  ].reduce((acc, { component: _, ...info }) => ({
9161
9163
  ...acc,
9162
- [info.name]: serializeComponentInfo(info)
9164
+ [info.name]: serializeIncludingFunctions(info)
9163
9165
  }), {}),
9164
9166
  inheritedStyles: {},
9165
9167
  BlocksWrapper: props.blocksWrapper || "div",
@@ -9179,7 +9181,7 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
9179
9181
  ...acc,
9180
9182
  [info.name]: {
9181
9183
  component,
9182
- ...serializeComponentInfo(info)
9184
+ ...serializeIncludingFunctions(info)
9183
9185
  }
9184
9186
  }), {}),
9185
9187
  scriptStr: getUpdateVariantVisibilityScript({
@@ -7985,14 +7985,14 @@ const getDefaultRegisteredComponents = () => [
7985
7985
  ];
7986
7986
  const createRegisterComponentMessage = (info) => ({
7987
7987
  type: "builder.registerComponent",
7988
- data: serializeComponentInfo(info)
7988
+ data: serializeIncludingFunctions(info)
7989
7989
  });
7990
7990
  const serializeFn = (fnValue) => {
7991
7991
  const fnStr = fnValue.toString().trim();
7992
7992
  const appendFunction = !fnStr.startsWith("function") && !fnStr.startsWith("(");
7993
7993
  return `return (${appendFunction ? "function " : ""}${fnStr}).apply(this, arguments)`;
7994
7994
  };
7995
- function serializeComponentInfo(info) {
7995
+ function serializeIncludingFunctions(info) {
7996
7996
  return JSON.parse(JSON.stringify(info, (key, value) => {
7997
7997
  if (typeof value === "function")
7998
7998
  return serializeFn(value);
@@ -8441,9 +8441,11 @@ function isFromTrustedHost(trustedHosts, e) {
8441
8441
  const url = new URL(e.origin), hostname = url.hostname;
8442
8442
  return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
8443
8443
  }
8444
- const SDK_VERSION = "0.16.5";
8444
+ const SDK_VERSION = "0.16.6";
8445
8445
  const registry = {};
8446
8446
  function register(type, info) {
8447
+ if (type === "plugin")
8448
+ info = serializeIncludingFunctions(info);
8447
8449
  let typeList = registry[type];
8448
8450
  if (!typeList)
8449
8451
  typeList = registry[type] = [];
@@ -9157,7 +9159,7 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
9157
9159
  })) || []
9158
9160
  ].reduce((acc, { component: _, ...info }) => ({
9159
9161
  ...acc,
9160
- [info.name]: serializeComponentInfo(info)
9162
+ [info.name]: serializeIncludingFunctions(info)
9161
9163
  }), {}),
9162
9164
  inheritedStyles: {},
9163
9165
  BlocksWrapper: props.blocksWrapper || "div",
@@ -9177,7 +9179,7 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
9177
9179
  ...acc,
9178
9180
  [info.name]: {
9179
9181
  component,
9180
- ...serializeComponentInfo(info)
9182
+ ...serializeIncludingFunctions(info)
9181
9183
  }
9182
9184
  }), {}),
9183
9185
  scriptStr: getUpdateVariantVisibilityScript({
@@ -4908,14 +4908,14 @@ const getDefaultRegisteredComponents = () => [
4908
4908
  ];
4909
4909
  const createRegisterComponentMessage = (info) => ({
4910
4910
  type: "builder.registerComponent",
4911
- data: serializeComponentInfo(info)
4911
+ data: serializeIncludingFunctions(info)
4912
4912
  });
4913
4913
  const serializeFn = (fnValue) => {
4914
4914
  const fnStr = fnValue.toString().trim();
4915
4915
  const appendFunction = !fnStr.startsWith("function") && !fnStr.startsWith("(");
4916
4916
  return `return (${appendFunction ? "function " : ""}${fnStr}).apply(this, arguments)`;
4917
4917
  };
4918
- function serializeComponentInfo(info) {
4918
+ function serializeIncludingFunctions(info) {
4919
4919
  return JSON.parse(JSON.stringify(info, (key, value) => {
4920
4920
  if (typeof value === "function")
4921
4921
  return serializeFn(value);
@@ -5364,9 +5364,11 @@ function isFromTrustedHost(trustedHosts, e) {
5364
5364
  const url = new URL(e.origin), hostname = url.hostname;
5365
5365
  return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
5366
5366
  }
5367
- const SDK_VERSION = "0.16.5";
5367
+ const SDK_VERSION = "0.16.6";
5368
5368
  const registry = {};
5369
5369
  function register(type, info) {
5370
+ if (type === "plugin")
5371
+ info = serializeIncludingFunctions(info);
5370
5372
  let typeList = registry[type];
5371
5373
  if (!typeList)
5372
5374
  typeList = registry[type] = [];
@@ -6080,7 +6082,7 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
6080
6082
  })) || []
6081
6083
  ].reduce((acc, { component: _, ...info }) => ({
6082
6084
  ...acc,
6083
- [info.name]: serializeComponentInfo(info)
6085
+ [info.name]: serializeIncludingFunctions(info)
6084
6086
  }), {}),
6085
6087
  inheritedStyles: {},
6086
6088
  BlocksWrapper: props.blocksWrapper || "div",
@@ -6100,7 +6102,7 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
6100
6102
  ...acc,
6101
6103
  [info.name]: {
6102
6104
  component,
6103
- ...serializeComponentInfo(info)
6105
+ ...serializeIncludingFunctions(info)
6104
6106
  }
6105
6107
  }), {}),
6106
6108
  scriptStr: getUpdateVariantVisibilityScript({
@@ -4906,14 +4906,14 @@ const getDefaultRegisteredComponents = () => [
4906
4906
  ];
4907
4907
  const createRegisterComponentMessage = (info) => ({
4908
4908
  type: "builder.registerComponent",
4909
- data: serializeComponentInfo(info)
4909
+ data: serializeIncludingFunctions(info)
4910
4910
  });
4911
4911
  const serializeFn = (fnValue) => {
4912
4912
  const fnStr = fnValue.toString().trim();
4913
4913
  const appendFunction = !fnStr.startsWith("function") && !fnStr.startsWith("(");
4914
4914
  return `return (${appendFunction ? "function " : ""}${fnStr}).apply(this, arguments)`;
4915
4915
  };
4916
- function serializeComponentInfo(info) {
4916
+ function serializeIncludingFunctions(info) {
4917
4917
  return JSON.parse(JSON.stringify(info, (key, value) => {
4918
4918
  if (typeof value === "function")
4919
4919
  return serializeFn(value);
@@ -5362,9 +5362,11 @@ function isFromTrustedHost(trustedHosts, e) {
5362
5362
  const url = new URL(e.origin), hostname = url.hostname;
5363
5363
  return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
5364
5364
  }
5365
- const SDK_VERSION = "0.16.5";
5365
+ const SDK_VERSION = "0.16.6";
5366
5366
  const registry = {};
5367
5367
  function register(type, info) {
5368
+ if (type === "plugin")
5369
+ info = serializeIncludingFunctions(info);
5368
5370
  let typeList = registry[type];
5369
5371
  if (!typeList)
5370
5372
  typeList = registry[type] = [];
@@ -6078,7 +6080,7 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
6078
6080
  })) || []
6079
6081
  ].reduce((acc, { component: _, ...info }) => ({
6080
6082
  ...acc,
6081
- [info.name]: serializeComponentInfo(info)
6083
+ [info.name]: serializeIncludingFunctions(info)
6082
6084
  }), {}),
6083
6085
  inheritedStyles: {},
6084
6086
  BlocksWrapper: props.blocksWrapper || "div",
@@ -6098,7 +6100,7 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
6098
6100
  ...acc,
6099
6101
  [info.name]: {
6100
6102
  component,
6101
- ...serializeComponentInfo(info)
6103
+ ...serializeIncludingFunctions(info)
6102
6104
  }
6103
6105
  }), {}),
6104
6106
  scriptStr: getUpdateVariantVisibilityScript({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builder.io/sdk-qwik",
3
- "version": "0.16.5",
3
+ "version": "0.16.6",
4
4
  "homepage": "https://github.com/BuilderIO/builder/tree/main/packages/sdks/output/qwik",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.16.5";
1
+ export declare const SDK_VERSION = "0.16.6";
@@ -3,4 +3,4 @@ export declare const createRegisterComponentMessage: (info: ComponentInfo) => {
3
3
  type: string;
4
4
  data: any;
5
5
  };
6
- export declare function serializeComponentInfo(info: ComponentInfo): any;
6
+ export declare function serializeIncludingFunctions(info: ComponentInfo): any;