@builder.io/sdk-qwik 0.16.0 → 0.16.2

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.
@@ -853,7 +853,10 @@ const InlinedStyles = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inl
853
853
  ], "p0.styles"),
854
854
  "data-id": qwik._fnSignal((p0) => p0.id, [
855
855
  props
856
- ], "p0.id")
856
+ ], "p0.id"),
857
+ nonce: qwik._fnSignal((p0) => p0.nonce, [
858
+ props
859
+ ], "p0.nonce")
857
860
  }, null, 3, "NG_0");
858
861
  }, "InlinedStyles_component_IOsg46hMexk"));
859
862
  const BlockStyles = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
@@ -938,8 +941,14 @@ const BlockStyles = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlin
938
941
  get styles() {
939
942
  return css.value;
940
943
  },
944
+ get nonce() {
945
+ return props.context.nonce;
946
+ },
941
947
  [qwik._IMMUTABLE]: {
942
948
  id: qwik._IMMUTABLE,
949
+ nonce: qwik._fnSignal((p0) => p0.context.nonce, [
950
+ props
951
+ ], "p0.context.nonce"),
943
952
  styles: qwik._fnSignal((p0) => p0.value, [
944
953
  css
945
954
  ], "p0.value")
@@ -1800,8 +1809,14 @@ const Columns = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQr
1800
1809
  /* @__PURE__ */ qwik._jsxC(InlinedStyles, {
1801
1810
  id: "builderio-columns",
1802
1811
  styles: columnsStyles(props, state),
1812
+ get nonce() {
1813
+ return props.builderContext.nonce;
1814
+ },
1803
1815
  [qwik._IMMUTABLE]: {
1804
- id: qwik._IMMUTABLE
1816
+ id: qwik._IMMUTABLE,
1817
+ nonce: qwik._fnSignal((p0) => p0.builderContext.nonce, [
1818
+ props
1819
+ ], "p0.builderContext.nonce")
1805
1820
  }
1806
1821
  }, 3, "c0_0"),
1807
1822
  (props.columns || []).map((column, index) => {
@@ -1928,6 +1943,8 @@ const Image = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(
1928
1943
  // images, otherwise you can supply this prop manually
1929
1944
  !(url.match(/builder\.io/) || url.match(/cdn\.shopify\.com/)))
1930
1945
  return props2.srcset;
1946
+ if (props2.noWebp)
1947
+ return void 0;
1931
1948
  if (props2.srcset && ((_a2 = props2.image) == null ? void 0 : _a2.includes("builder.io/api/v1/image"))) {
1932
1949
  if (!props2.srcset.includes(props2.image.split("?")[0])) {
1933
1950
  console.debug("Removed given srcset");
@@ -4928,7 +4945,10 @@ const InlinedScript = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inl
4928
4945
  ], "p0.scriptStr"),
4929
4946
  "data-id": qwik._fnSignal((p0) => p0.id, [
4930
4947
  props
4931
- ], "p0.id")
4948
+ ], "p0.id"),
4949
+ nonce: qwik._fnSignal((p0) => p0.nonce || "", [
4950
+ props
4951
+ ], 'p0.nonce||""')
4932
4952
  }, null, 3, "WO_0");
4933
4953
  }, "InlinedScript_component_hwThBdhA8rw"));
4934
4954
  function getGlobalThis() {
@@ -5328,7 +5348,7 @@ function isFromTrustedHost(trustedHosts, e) {
5328
5348
  const url = new URL(e.origin), hostname = url.hostname;
5329
5349
  return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
5330
5350
  }
5331
- const SDK_VERSION = "0.16.0";
5351
+ const SDK_VERSION = "0.16.2";
5332
5352
  const registry = {};
5333
5353
  function register(type, info) {
5334
5354
  let typeList = registry[type];
@@ -5972,8 +5992,14 @@ ${getDefaultStyles(props.isNestedRender)}
5972
5992
  get styles() {
5973
5993
  return state.injectedStyles;
5974
5994
  },
5995
+ get nonce() {
5996
+ return props.nonce;
5997
+ },
5975
5998
  [qwik._IMMUTABLE]: {
5976
5999
  id: qwik._IMMUTABLE,
6000
+ nonce: qwik._fnSignal((p0) => p0.nonce, [
6001
+ props
6002
+ ], "p0.nonce"),
5977
6003
  styles: qwik._fnSignal((p0) => p0.injectedStyles, [
5978
6004
  state
5979
6005
  ], "p0.injectedStyles")
@@ -6008,7 +6034,7 @@ const getContentInitialValue = ({ content, data }) => {
6008
6034
  };
6009
6035
  };
6010
6036
  const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
6011
- var _a, _b;
6037
+ var _a, _b, _c, _d;
6012
6038
  qwik._jsxBranch();
6013
6039
  const state = qwik.useStore({
6014
6040
  builderContextSignal: {
@@ -6029,18 +6055,31 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
6029
6055
  apiVersion: props.apiVersion,
6030
6056
  componentInfos: [
6031
6057
  ...getDefaultRegisteredComponents(),
6032
- ...props.customComponents || []
6058
+ ...((_a = props.customComponents) == null ? void 0 : _a.filter(({ models }) => {
6059
+ if (!(models == null ? void 0 : models.length))
6060
+ return true;
6061
+ if (!props.model)
6062
+ return true;
6063
+ return models.includes(props.model);
6064
+ })) || []
6033
6065
  ].reduce((acc, { component: _, ...info }) => ({
6034
6066
  ...acc,
6035
6067
  [info.name]: serializeComponentInfo(info)
6036
6068
  }), {}),
6037
6069
  inheritedStyles: {},
6038
6070
  BlocksWrapper: props.blocksWrapper || "div",
6039
- BlocksWrapperProps: props.blocksWrapperProps || {}
6071
+ BlocksWrapperProps: props.blocksWrapperProps || {},
6072
+ nonce: props.nonce || ""
6040
6073
  },
6041
6074
  registeredComponents: [
6042
6075
  ...getDefaultRegisteredComponents(),
6043
- ...props.customComponents || []
6076
+ ...((_b = props.customComponents) == null ? void 0 : _b.filter(({ models }) => {
6077
+ if (!(models == null ? void 0 : models.length))
6078
+ return true;
6079
+ if (!props.model)
6080
+ return true;
6081
+ return models.includes(props.model);
6082
+ })) || []
6044
6083
  ].reduce((acc, { component, ...info }) => ({
6045
6084
  ...acc,
6046
6085
  [info.name]: {
@@ -6050,9 +6089,9 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
6050
6089
  }), {}),
6051
6090
  scriptStr: getUpdateVariantVisibilityScript({
6052
6091
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
6053
- variationId: (_a = props.content) == null ? void 0 : _a.testVariationId,
6092
+ variationId: (_c = props.content) == null ? void 0 : _c.testVariationId,
6054
6093
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
6055
- contentId: (_b = props.content) == null ? void 0 : _b.id
6094
+ contentId: (_d = props.content) == null ? void 0 : _d.id
6056
6095
  })
6057
6096
  }, {
6058
6097
  deep: true
@@ -6061,6 +6100,9 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
6061
6100
  registeredComponents: state.registeredComponents
6062
6101
  }));
6063
6102
  return /* @__PURE__ */ qwik._jsxC(EnableEditor, {
6103
+ get nonce() {
6104
+ return props.nonce;
6105
+ },
6064
6106
  get content() {
6065
6107
  return props.content;
6066
6108
  },
@@ -6106,14 +6148,23 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
6106
6148
  get scriptStr() {
6107
6149
  return state.scriptStr;
6108
6150
  },
6151
+ get nonce() {
6152
+ return props.nonce || "";
6153
+ },
6109
6154
  [qwik._IMMUTABLE]: {
6110
6155
  id: qwik._IMMUTABLE,
6156
+ nonce: qwik._fnSignal((p0) => p0.nonce || "", [
6157
+ props
6158
+ ], 'p0.nonce||""'),
6111
6159
  scriptStr: qwik._fnSignal((p0) => p0.scriptStr, [
6112
6160
  state
6113
6161
  ], "p0.scriptStr")
6114
6162
  }
6115
6163
  }, 3, "LQ_0") : null,
6116
6164
  /* @__PURE__ */ qwik._jsxC(ContentStyles, {
6165
+ get nonce() {
6166
+ return props.nonce || "";
6167
+ },
6117
6168
  get isNestedRender() {
6118
6169
  return props.isNestedRender;
6119
6170
  },
@@ -6150,7 +6201,10 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
6150
6201
  ], "p0.builderContextSignal.content?.data?.customFonts"),
6151
6202
  isNestedRender: qwik._fnSignal((p0) => p0.isNestedRender, [
6152
6203
  props
6153
- ], "p0.isNestedRender")
6204
+ ], "p0.isNestedRender"),
6205
+ nonce: qwik._fnSignal((p0) => p0.nonce || "", [
6206
+ props
6207
+ ], 'p0.nonce||""')
6154
6208
  }
6155
6209
  }, 3, "LQ_1"),
6156
6210
  /* @__PURE__ */ qwik._jsxC(Blocks, {
@@ -6220,6 +6274,9 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
6220
6274
  model: qwik._fnSignal((p0) => p0.model, [
6221
6275
  props
6222
6276
  ], "p0.model"),
6277
+ nonce: qwik._fnSignal((p0) => p0.nonce, [
6278
+ props
6279
+ ], "p0.nonce"),
6223
6280
  showContent: qwik._fnSignal((p0) => p0.showContent, [
6224
6281
  props
6225
6282
  ], "p0.showContent"),
@@ -6267,7 +6324,7 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
6267
6324
  props,
6268
6325
  state
6269
6326
  ]));
6270
- qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(({ track: track2 }) => {
6327
+ qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
6271
6328
  }, "ContentVariants_component_useTask_lSvynevU008"));
6272
6329
  return /* @__PURE__ */ qwik._jsxC(qwik.Fragment, {
6273
6330
  children: [
@@ -6276,8 +6333,14 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
6276
6333
  get scriptStr() {
6277
6334
  return getInitVariantsFnsScriptString();
6278
6335
  },
6336
+ get nonce() {
6337
+ return props.nonce || "";
6338
+ },
6279
6339
  [qwik._IMMUTABLE]: {
6280
6340
  id: qwik._IMMUTABLE,
6341
+ nonce: qwik._fnSignal((p0) => p0.nonce || "", [
6342
+ props
6343
+ ], 'p0.nonce||""'),
6281
6344
  scriptStr: qwik._IMMUTABLE
6282
6345
  }
6283
6346
  }, 3, "XM_0") : null,
@@ -6288,8 +6351,14 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
6288
6351
  get styles() {
6289
6352
  return hideVariantsStyleString.value;
6290
6353
  },
6354
+ get nonce() {
6355
+ return props.nonce || "";
6356
+ },
6291
6357
  [qwik._IMMUTABLE]: {
6292
6358
  id: qwik._IMMUTABLE,
6359
+ nonce: qwik._fnSignal((p0) => p0.nonce || "", [
6360
+ props
6361
+ ], 'p0.nonce||""'),
6293
6362
  styles: qwik._fnSignal((p0) => p0.value, [
6294
6363
  hideVariantsStyleString
6295
6364
  ], "p0.value")
@@ -6300,8 +6369,14 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
6300
6369
  get scriptStr() {
6301
6370
  return updateCookieAndStylesScriptStr.value;
6302
6371
  },
6372
+ get nonce() {
6373
+ return props.nonce || "";
6374
+ },
6303
6375
  [qwik._IMMUTABLE]: {
6304
6376
  id: qwik._IMMUTABLE,
6377
+ nonce: qwik._fnSignal((p0) => p0.nonce || "", [
6378
+ props
6379
+ ], 'p0.nonce||""'),
6305
6380
  scriptStr: qwik._fnSignal((p0) => p0.value, [
6306
6381
  updateCookieAndStylesScriptStr
6307
6382
  ], "p0.value")
@@ -6312,6 +6387,9 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
6312
6387
  get isNestedRender() {
6313
6388
  return props.isNestedRender;
6314
6389
  },
6390
+ get nonce() {
6391
+ return props.nonce;
6392
+ },
6315
6393
  content: variant,
6316
6394
  showContent: false,
6317
6395
  get model() {
@@ -6411,6 +6489,9 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
6411
6489
  model: qwik._fnSignal((p0) => p0.model, [
6412
6490
  props
6413
6491
  ], "p0.model"),
6492
+ nonce: qwik._fnSignal((p0) => p0.nonce, [
6493
+ props
6494
+ ], "p0.nonce"),
6414
6495
  showContent: qwik._IMMUTABLE,
6415
6496
  trustedHosts: qwik._fnSignal((p0) => p0.trustedHosts, [
6416
6497
  props
@@ -6421,6 +6502,9 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
6421
6502
  ]
6422
6503
  }, 1, "XM_3") : null,
6423
6504
  /* @__PURE__ */ qwik._jsxC(ContentComponent, {
6505
+ get nonce() {
6506
+ return props.nonce;
6507
+ },
6424
6508
  get isNestedRender() {
6425
6509
  return props.isNestedRender;
6426
6510
  },
@@ -6528,6 +6612,9 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
6528
6612
  model: qwik._fnSignal((p0) => p0.model, [
6529
6613
  props
6530
6614
  ], "p0.model"),
6615
+ nonce: qwik._fnSignal((p0) => p0.nonce, [
6616
+ props
6617
+ ], "p0.nonce"),
6531
6618
  showContent: qwik._IMMUTABLE,
6532
6619
  trustedHosts: qwik._fnSignal((p0) => p0.trustedHosts, [
6533
6620
  props
@@ -6603,6 +6690,9 @@ const Symbol$1 = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQ
6603
6690
  return /* @__PURE__ */ qwik._jsxS("div", {
6604
6691
  ...props.attributes,
6605
6692
  children: /* @__PURE__ */ qwik._jsxC(ContentVariants, {
6693
+ get nonce() {
6694
+ return props.builderContext.nonce;
6695
+ },
6606
6696
  isNestedRender: true,
6607
6697
  get apiVersion() {
6608
6698
  return props.builderContext.apiVersion;
@@ -6698,7 +6788,10 @@ const Symbol$1 = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQ
6698
6788
  return (_a2 = p0.symbol) == null ? void 0 : _a2.model;
6699
6789
  }, [
6700
6790
  props
6701
- ], "p0.symbol?.model")
6791
+ ], "p0.symbol?.model"),
6792
+ nonce: qwik._fnSignal((p0) => p0.builderContext.nonce, [
6793
+ props
6794
+ ], "p0.builderContext.nonce")
6702
6795
  }
6703
6796
  }, 3, "Wt_0")
6704
6797
  }, {
@@ -851,7 +851,10 @@ const InlinedStyles = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((p
851
851
  ], "p0.styles"),
852
852
  "data-id": _fnSignal((p0) => p0.id, [
853
853
  props
854
- ], "p0.id")
854
+ ], "p0.id"),
855
+ nonce: _fnSignal((p0) => p0.nonce, [
856
+ props
857
+ ], "p0.nonce")
855
858
  }, null, 3, "NG_0");
856
859
  }, "InlinedStyles_component_IOsg46hMexk"));
857
860
  const BlockStyles = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
@@ -936,8 +939,14 @@ const BlockStyles = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pro
936
939
  get styles() {
937
940
  return css.value;
938
941
  },
942
+ get nonce() {
943
+ return props.context.nonce;
944
+ },
939
945
  [_IMMUTABLE]: {
940
946
  id: _IMMUTABLE,
947
+ nonce: _fnSignal((p0) => p0.context.nonce, [
948
+ props
949
+ ], "p0.context.nonce"),
941
950
  styles: _fnSignal((p0) => p0.value, [
942
951
  css
943
952
  ], "p0.value")
@@ -1798,8 +1807,14 @@ const Columns = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props)
1798
1807
  /* @__PURE__ */ _jsxC(InlinedStyles, {
1799
1808
  id: "builderio-columns",
1800
1809
  styles: columnsStyles(props, state),
1810
+ get nonce() {
1811
+ return props.builderContext.nonce;
1812
+ },
1801
1813
  [_IMMUTABLE]: {
1802
- id: _IMMUTABLE
1814
+ id: _IMMUTABLE,
1815
+ nonce: _fnSignal((p0) => p0.builderContext.nonce, [
1816
+ props
1817
+ ], "p0.builderContext.nonce")
1803
1818
  }
1804
1819
  }, 3, "c0_0"),
1805
1820
  (props.columns || []).map((column, index) => {
@@ -1926,6 +1941,8 @@ const Image = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
1926
1941
  // images, otherwise you can supply this prop manually
1927
1942
  !(url.match(/builder\.io/) || url.match(/cdn\.shopify\.com/)))
1928
1943
  return props2.srcset;
1944
+ if (props2.noWebp)
1945
+ return void 0;
1929
1946
  if (props2.srcset && ((_a2 = props2.image) == null ? void 0 : _a2.includes("builder.io/api/v1/image"))) {
1930
1947
  if (!props2.srcset.includes(props2.image.split("?")[0])) {
1931
1948
  console.debug("Removed given srcset");
@@ -4926,7 +4943,10 @@ const InlinedScript = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((p
4926
4943
  ], "p0.scriptStr"),
4927
4944
  "data-id": _fnSignal((p0) => p0.id, [
4928
4945
  props
4929
- ], "p0.id")
4946
+ ], "p0.id"),
4947
+ nonce: _fnSignal((p0) => p0.nonce || "", [
4948
+ props
4949
+ ], 'p0.nonce||""')
4930
4950
  }, null, 3, "WO_0");
4931
4951
  }, "InlinedScript_component_hwThBdhA8rw"));
4932
4952
  function getGlobalThis() {
@@ -5326,7 +5346,7 @@ function isFromTrustedHost(trustedHosts, e) {
5326
5346
  const url = new URL(e.origin), hostname = url.hostname;
5327
5347
  return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
5328
5348
  }
5329
- const SDK_VERSION = "0.16.0";
5349
+ const SDK_VERSION = "0.16.2";
5330
5350
  const registry = {};
5331
5351
  function register(type, info) {
5332
5352
  let typeList = registry[type];
@@ -5970,8 +5990,14 @@ ${getDefaultStyles(props.isNestedRender)}
5970
5990
  get styles() {
5971
5991
  return state.injectedStyles;
5972
5992
  },
5993
+ get nonce() {
5994
+ return props.nonce;
5995
+ },
5973
5996
  [_IMMUTABLE]: {
5974
5997
  id: _IMMUTABLE,
5998
+ nonce: _fnSignal((p0) => p0.nonce, [
5999
+ props
6000
+ ], "p0.nonce"),
5975
6001
  styles: _fnSignal((p0) => p0.injectedStyles, [
5976
6002
  state
5977
6003
  ], "p0.injectedStyles")
@@ -6006,7 +6032,7 @@ const getContentInitialValue = ({ content, data }) => {
6006
6032
  };
6007
6033
  };
6008
6034
  const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
6009
- var _a, _b;
6035
+ var _a, _b, _c, _d;
6010
6036
  _jsxBranch();
6011
6037
  const state = useStore({
6012
6038
  builderContextSignal: {
@@ -6027,18 +6053,31 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
6027
6053
  apiVersion: props.apiVersion,
6028
6054
  componentInfos: [
6029
6055
  ...getDefaultRegisteredComponents(),
6030
- ...props.customComponents || []
6056
+ ...((_a = props.customComponents) == null ? void 0 : _a.filter(({ models }) => {
6057
+ if (!(models == null ? void 0 : models.length))
6058
+ return true;
6059
+ if (!props.model)
6060
+ return true;
6061
+ return models.includes(props.model);
6062
+ })) || []
6031
6063
  ].reduce((acc, { component: _, ...info }) => ({
6032
6064
  ...acc,
6033
6065
  [info.name]: serializeComponentInfo(info)
6034
6066
  }), {}),
6035
6067
  inheritedStyles: {},
6036
6068
  BlocksWrapper: props.blocksWrapper || "div",
6037
- BlocksWrapperProps: props.blocksWrapperProps || {}
6069
+ BlocksWrapperProps: props.blocksWrapperProps || {},
6070
+ nonce: props.nonce || ""
6038
6071
  },
6039
6072
  registeredComponents: [
6040
6073
  ...getDefaultRegisteredComponents(),
6041
- ...props.customComponents || []
6074
+ ...((_b = props.customComponents) == null ? void 0 : _b.filter(({ models }) => {
6075
+ if (!(models == null ? void 0 : models.length))
6076
+ return true;
6077
+ if (!props.model)
6078
+ return true;
6079
+ return models.includes(props.model);
6080
+ })) || []
6042
6081
  ].reduce((acc, { component, ...info }) => ({
6043
6082
  ...acc,
6044
6083
  [info.name]: {
@@ -6048,9 +6087,9 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
6048
6087
  }), {}),
6049
6088
  scriptStr: getUpdateVariantVisibilityScript({
6050
6089
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
6051
- variationId: (_a = props.content) == null ? void 0 : _a.testVariationId,
6090
+ variationId: (_c = props.content) == null ? void 0 : _c.testVariationId,
6052
6091
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
6053
- contentId: (_b = props.content) == null ? void 0 : _b.id
6092
+ contentId: (_d = props.content) == null ? void 0 : _d.id
6054
6093
  })
6055
6094
  }, {
6056
6095
  deep: true
@@ -6059,6 +6098,9 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
6059
6098
  registeredComponents: state.registeredComponents
6060
6099
  }));
6061
6100
  return /* @__PURE__ */ _jsxC(EnableEditor, {
6101
+ get nonce() {
6102
+ return props.nonce;
6103
+ },
6062
6104
  get content() {
6063
6105
  return props.content;
6064
6106
  },
@@ -6104,14 +6146,23 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
6104
6146
  get scriptStr() {
6105
6147
  return state.scriptStr;
6106
6148
  },
6149
+ get nonce() {
6150
+ return props.nonce || "";
6151
+ },
6107
6152
  [_IMMUTABLE]: {
6108
6153
  id: _IMMUTABLE,
6154
+ nonce: _fnSignal((p0) => p0.nonce || "", [
6155
+ props
6156
+ ], 'p0.nonce||""'),
6109
6157
  scriptStr: _fnSignal((p0) => p0.scriptStr, [
6110
6158
  state
6111
6159
  ], "p0.scriptStr")
6112
6160
  }
6113
6161
  }, 3, "LQ_0") : null,
6114
6162
  /* @__PURE__ */ _jsxC(ContentStyles, {
6163
+ get nonce() {
6164
+ return props.nonce || "";
6165
+ },
6115
6166
  get isNestedRender() {
6116
6167
  return props.isNestedRender;
6117
6168
  },
@@ -6148,7 +6199,10 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
6148
6199
  ], "p0.builderContextSignal.content?.data?.customFonts"),
6149
6200
  isNestedRender: _fnSignal((p0) => p0.isNestedRender, [
6150
6201
  props
6151
- ], "p0.isNestedRender")
6202
+ ], "p0.isNestedRender"),
6203
+ nonce: _fnSignal((p0) => p0.nonce || "", [
6204
+ props
6205
+ ], 'p0.nonce||""')
6152
6206
  }
6153
6207
  }, 3, "LQ_1"),
6154
6208
  /* @__PURE__ */ _jsxC(Blocks, {
@@ -6218,6 +6272,9 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
6218
6272
  model: _fnSignal((p0) => p0.model, [
6219
6273
  props
6220
6274
  ], "p0.model"),
6275
+ nonce: _fnSignal((p0) => p0.nonce, [
6276
+ props
6277
+ ], "p0.nonce"),
6221
6278
  showContent: _fnSignal((p0) => p0.showContent, [
6222
6279
  props
6223
6280
  ], "p0.showContent"),
@@ -6265,7 +6322,7 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
6265
6322
  props,
6266
6323
  state
6267
6324
  ]));
6268
- useTaskQrl(/* @__PURE__ */ inlinedQrl(({ track: track2 }) => {
6325
+ useTaskQrl(/* @__PURE__ */ inlinedQrl(() => {
6269
6326
  }, "ContentVariants_component_useTask_lSvynevU008"));
6270
6327
  return /* @__PURE__ */ _jsxC(Fragment$1, {
6271
6328
  children: [
@@ -6274,8 +6331,14 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
6274
6331
  get scriptStr() {
6275
6332
  return getInitVariantsFnsScriptString();
6276
6333
  },
6334
+ get nonce() {
6335
+ return props.nonce || "";
6336
+ },
6277
6337
  [_IMMUTABLE]: {
6278
6338
  id: _IMMUTABLE,
6339
+ nonce: _fnSignal((p0) => p0.nonce || "", [
6340
+ props
6341
+ ], 'p0.nonce||""'),
6279
6342
  scriptStr: _IMMUTABLE
6280
6343
  }
6281
6344
  }, 3, "XM_0") : null,
@@ -6286,8 +6349,14 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
6286
6349
  get styles() {
6287
6350
  return hideVariantsStyleString.value;
6288
6351
  },
6352
+ get nonce() {
6353
+ return props.nonce || "";
6354
+ },
6289
6355
  [_IMMUTABLE]: {
6290
6356
  id: _IMMUTABLE,
6357
+ nonce: _fnSignal((p0) => p0.nonce || "", [
6358
+ props
6359
+ ], 'p0.nonce||""'),
6291
6360
  styles: _fnSignal((p0) => p0.value, [
6292
6361
  hideVariantsStyleString
6293
6362
  ], "p0.value")
@@ -6298,8 +6367,14 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
6298
6367
  get scriptStr() {
6299
6368
  return updateCookieAndStylesScriptStr.value;
6300
6369
  },
6370
+ get nonce() {
6371
+ return props.nonce || "";
6372
+ },
6301
6373
  [_IMMUTABLE]: {
6302
6374
  id: _IMMUTABLE,
6375
+ nonce: _fnSignal((p0) => p0.nonce || "", [
6376
+ props
6377
+ ], 'p0.nonce||""'),
6303
6378
  scriptStr: _fnSignal((p0) => p0.value, [
6304
6379
  updateCookieAndStylesScriptStr
6305
6380
  ], "p0.value")
@@ -6310,6 +6385,9 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
6310
6385
  get isNestedRender() {
6311
6386
  return props.isNestedRender;
6312
6387
  },
6388
+ get nonce() {
6389
+ return props.nonce;
6390
+ },
6313
6391
  content: variant,
6314
6392
  showContent: false,
6315
6393
  get model() {
@@ -6409,6 +6487,9 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
6409
6487
  model: _fnSignal((p0) => p0.model, [
6410
6488
  props
6411
6489
  ], "p0.model"),
6490
+ nonce: _fnSignal((p0) => p0.nonce, [
6491
+ props
6492
+ ], "p0.nonce"),
6412
6493
  showContent: _IMMUTABLE,
6413
6494
  trustedHosts: _fnSignal((p0) => p0.trustedHosts, [
6414
6495
  props
@@ -6419,6 +6500,9 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
6419
6500
  ]
6420
6501
  }, 1, "XM_3") : null,
6421
6502
  /* @__PURE__ */ _jsxC(ContentComponent, {
6503
+ get nonce() {
6504
+ return props.nonce;
6505
+ },
6422
6506
  get isNestedRender() {
6423
6507
  return props.isNestedRender;
6424
6508
  },
@@ -6526,6 +6610,9 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
6526
6610
  model: _fnSignal((p0) => p0.model, [
6527
6611
  props
6528
6612
  ], "p0.model"),
6613
+ nonce: _fnSignal((p0) => p0.nonce, [
6614
+ props
6615
+ ], "p0.nonce"),
6529
6616
  showContent: _IMMUTABLE,
6530
6617
  trustedHosts: _fnSignal((p0) => p0.trustedHosts, [
6531
6618
  props
@@ -6601,6 +6688,9 @@ const Symbol$1 = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props)
6601
6688
  return /* @__PURE__ */ _jsxS("div", {
6602
6689
  ...props.attributes,
6603
6690
  children: /* @__PURE__ */ _jsxC(ContentVariants, {
6691
+ get nonce() {
6692
+ return props.builderContext.nonce;
6693
+ },
6604
6694
  isNestedRender: true,
6605
6695
  get apiVersion() {
6606
6696
  return props.builderContext.apiVersion;
@@ -6696,7 +6786,10 @@ const Symbol$1 = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props)
6696
6786
  return (_a2 = p0.symbol) == null ? void 0 : _a2.model;
6697
6787
  }, [
6698
6788
  props
6699
- ], "p0.symbol?.model")
6789
+ ], "p0.symbol?.model"),
6790
+ nonce: _fnSignal((p0) => p0.builderContext.nonce, [
6791
+ props
6792
+ ], "p0.builderContext.nonce")
6700
6793
  }
6701
6794
  }, 3, "Wt_0")
6702
6795
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builder.io/sdk-qwik",
3
- "version": "0.16.0",
3
+ "version": "0.16.2",
4
4
  "homepage": "https://github.com/BuilderIO/builder/tree/main/packages/sdks/output/qwik",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,5 +1,6 @@
1
+ import { BuilderNonceProp } from "../../../types/builder-props";
1
2
  import { CustomFont } from "./styles.helpers";
2
- interface Props {
3
+ interface Props extends BuilderNonceProp {
3
4
  cssCode?: string;
4
5
  customFonts?: CustomFont[];
5
6
  contentId?: string;
@@ -68,4 +68,8 @@ export interface ContentVariantsPrps {
68
68
  * List of hosts to allow editing content from.
69
69
  */
70
70
  trustedHosts?: string[];
71
+ /**
72
+ * A CSP nonce to use for the SDK's inlined `<script>` and `<style>` tags.
73
+ */
74
+ nonce?: string;
71
75
  }
@@ -1,4 +1,5 @@
1
- interface Props {
1
+ import { BuilderNonceProp } from "../types/builder-props";
2
+ interface Props extends BuilderNonceProp {
2
3
  scriptStr: string;
3
4
  id: string;
4
5
  }
@@ -1,4 +1,5 @@
1
- interface Props {
1
+ import { BuilderNonceProp } from "../types/builder-props";
2
+ interface Props extends BuilderNonceProp {
2
3
  styles: string;
3
4
  id: string;
4
5
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.16.0";
1
+ export declare const SDK_VERSION = "0.16.2";
@@ -33,5 +33,6 @@ export interface BuilderContextInterface extends Pick<BlocksWrapperProps, 'Block
33
33
  apiVersion: ApiVersion | undefined;
34
34
  componentInfos: Dictionary<ComponentInfo>;
35
35
  inheritedStyles: Record<string, unknown>;
36
+ nonce: string;
36
37
  canTrack?: boolean;
37
38
  }
@@ -10,3 +10,6 @@ export type BuilderComponentsProp = {
10
10
  export type BuilderLinkComponentProp = {
11
11
  builderLinkComponent?: any;
12
12
  };
13
+ export type BuilderNonceProp = {
14
+ nonce: string;
15
+ };