@builder.io/sdk-qwik 0.14.3 → 0.14.5

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.
@@ -105,11 +105,26 @@ const logger = {
105
105
  function isBrowser() {
106
106
  return typeof window !== "undefined" && typeof document !== "undefined";
107
107
  }
108
+ const convertSearchParamsToQueryObject = (searchParams) => {
109
+ const options = {};
110
+ searchParams.forEach((value, key) => {
111
+ options[key] = value;
112
+ });
113
+ return options;
114
+ };
115
+ const normalizeSearchParams = (searchParams) => searchParams instanceof URLSearchParams ? convertSearchParamsToQueryObject(searchParams) : searchParams;
116
+ const getSearchString = (search) => {
117
+ if (typeof search === "string")
118
+ return search;
119
+ else if (search instanceof URLSearchParams)
120
+ return search.toString();
121
+ return new URLSearchParams(search).toString();
122
+ };
108
123
  function isIframe() {
109
124
  return isBrowser() && window.self !== window.top;
110
125
  }
111
- function isEditing() {
112
- return isIframe() && window.location.search.indexOf("builder.frameEditing=") !== -1;
126
+ function isEditing(search) {
127
+ return isIframe() && getSearchString(search || window.location.search).indexOf("builder.frameEditing=") !== -1;
113
128
  }
114
129
  const getLocation = () => {
115
130
  if (isBrowser()) {
@@ -1393,11 +1408,11 @@ const Blocks = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl
1393
1408
  },
1394
1409
  get BlocksWrapper() {
1395
1410
  var _a;
1396
- return (_a = props.context) == null ? void 0 : _a.BlocksWrapper;
1411
+ return ((_a = props.context) == null ? void 0 : _a.BlocksWrapper) || builderContext$1.BlocksWrapper;
1397
1412
  },
1398
1413
  get BlocksWrapperProps() {
1399
1414
  var _a;
1400
- return (_a = props.context) == null ? void 0 : _a.BlocksWrapperProps;
1415
+ return ((_a = props.context) == null ? void 0 : _a.BlocksWrapperProps) || builderContext$1.BlocksWrapperProps;
1401
1416
  },
1402
1417
  children: props.blocks ? (props.blocks || []).map((block) => {
1403
1418
  return /* @__PURE__ */ qwik._jsxC(Block, {
@@ -1427,18 +1442,20 @@ const Blocks = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl
1427
1442
  }, 3, block.id);
1428
1443
  }) : null,
1429
1444
  [qwik._IMMUTABLE]: {
1430
- BlocksWrapper: qwik._fnSignal((p0) => {
1445
+ BlocksWrapper: qwik._fnSignal((p0, p1) => {
1431
1446
  var _a;
1432
- return (_a = p0.context) == null ? void 0 : _a.BlocksWrapper;
1447
+ return ((_a = p1.context) == null ? void 0 : _a.BlocksWrapper) || p0.BlocksWrapper;
1433
1448
  }, [
1449
+ builderContext$1,
1434
1450
  props
1435
- ], "p0.context?.BlocksWrapper"),
1436
- BlocksWrapperProps: qwik._fnSignal((p0) => {
1451
+ ], "p1.context?.BlocksWrapper||p0.BlocksWrapper"),
1452
+ BlocksWrapperProps: qwik._fnSignal((p0, p1) => {
1437
1453
  var _a;
1438
- return (_a = p0.context) == null ? void 0 : _a.BlocksWrapperProps;
1454
+ return ((_a = p1.context) == null ? void 0 : _a.BlocksWrapperProps) || p0.BlocksWrapperProps;
1439
1455
  }, [
1456
+ builderContext$1,
1440
1457
  props
1441
- ], "p0.context?.BlocksWrapperProps"),
1458
+ ], "p1.context?.BlocksWrapperProps||p0.BlocksWrapperProps"),
1442
1459
  blocks: qwik._fnSignal((p0) => p0.blocks, [
1443
1460
  props
1444
1461
  ], "p0.blocks"),
@@ -4004,13 +4021,6 @@ function flatten(object, path = null, separator = ".") {
4004
4021
  const DEFAULT_API_VERSION = "v3";
4005
4022
  const BUILDER_SEARCHPARAMS_PREFIX = "builder.";
4006
4023
  const BUILDER_OPTIONS_PREFIX = "options.";
4007
- const convertSearchParamsToQueryObject = (searchParams) => {
4008
- const options = {};
4009
- searchParams.forEach((value, key) => {
4010
- options[key] = value;
4011
- });
4012
- return options;
4013
- };
4014
4024
  const getBuilderSearchParams = (_options) => {
4015
4025
  if (!_options)
4016
4026
  return {};
@@ -4030,7 +4040,6 @@ const getBuilderSearchParamsFromWindow = () => {
4030
4040
  const searchParams = new URLSearchParams(window.location.search);
4031
4041
  return getBuilderSearchParams(searchParams);
4032
4042
  };
4033
- const normalizeSearchParams = (searchParams) => searchParams instanceof URLSearchParams ? convertSearchParamsToQueryObject(searchParams) : searchParams;
4034
4043
  const isPositiveNumber = (thing) => typeof thing === "number" && !isNaN(thing) && thing >= 0;
4035
4044
  const generateContentUrl = (options) => {
4036
4045
  const { limit = 30, userAttributes, query, model, apiKey, enrich, locale, apiVersion = DEFAULT_API_VERSION, fields, omit, offset, cacheSeconds, staleCacheSeconds, sort, includeUnpublished } = options;
@@ -4140,12 +4149,13 @@ async function fetchEntries(options) {
4140
4149
  return null;
4141
4150
  }
4142
4151
  }
4143
- function isPreviewing() {
4152
+ function isPreviewing(search) {
4144
4153
  if (!isBrowser())
4145
4154
  return false;
4146
- if (isEditing())
4155
+ const normalizedSearch = getSearchString(search || window.location.search);
4156
+ if (isEditing(normalizedSearch))
4147
4157
  return false;
4148
- return Boolean(location.search.indexOf("builder.preview=") !== -1);
4158
+ return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
4149
4159
  }
4150
4160
  function uuidv4() {
4151
4161
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
@@ -4350,7 +4360,7 @@ function isFromTrustedHost(trustedHosts, e) {
4350
4360
  const url = new URL(e.origin), hostname = url.hostname;
4351
4361
  return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
4352
4362
  }
4353
- const SDK_VERSION = "0.14.3";
4363
+ const SDK_VERSION = "0.14.5";
4354
4364
  const registry = {};
4355
4365
  function register(type, info) {
4356
4366
  let typeList = registry[type];
@@ -4731,8 +4741,10 @@ const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
4731
4741
  qwik.useOn("qvisible", /* @__PURE__ */ qwik.inlinedQrl((event, element) => {
4732
4742
  var _a2, _b2, _c2, _d2;
4733
4743
  if (isBrowser()) {
4734
- if (isEditing() && element)
4735
- element.dispatchEvent(new CustomEvent("initeditingbldr"));
4744
+ if (isEditing()) {
4745
+ if (element)
4746
+ element.dispatchEvent(new CustomEvent("initeditingbldr"));
4747
+ }
4736
4748
  const shouldTrackImpression = ((_a2 = element.attributes.getNamedItem("shouldTrack")) == null ? void 0 : _a2.value) === "true";
4737
4749
  if (shouldTrackImpression) {
4738
4750
  const variationId = (_b2 = element.attributes.getNamedItem("variationId")) == null ? void 0 : _b2.value;
@@ -4746,8 +4758,10 @@ const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
4746
4758
  variationId: variationId !== contentId ? variationId : void 0
4747
4759
  });
4748
4760
  }
4749
- if (isPreviewing() && element)
4750
- element.dispatchEvent(new CustomEvent("initpreviewingbldr"));
4761
+ if (isPreviewing()) {
4762
+ if (element)
4763
+ element.dispatchEvent(new CustomEvent("initpreviewingbldr"));
4764
+ }
4751
4765
  }
4752
4766
  }, "EnableEditor_component_useOn_2_FyR0YPSlJlw"));
4753
4767
  qwik.useContextProvider(builderContext, props.builderContextSignal);
@@ -103,11 +103,26 @@ const logger = {
103
103
  function isBrowser() {
104
104
  return typeof window !== "undefined" && typeof document !== "undefined";
105
105
  }
106
+ const convertSearchParamsToQueryObject = (searchParams) => {
107
+ const options = {};
108
+ searchParams.forEach((value, key) => {
109
+ options[key] = value;
110
+ });
111
+ return options;
112
+ };
113
+ const normalizeSearchParams = (searchParams) => searchParams instanceof URLSearchParams ? convertSearchParamsToQueryObject(searchParams) : searchParams;
114
+ const getSearchString = (search) => {
115
+ if (typeof search === "string")
116
+ return search;
117
+ else if (search instanceof URLSearchParams)
118
+ return search.toString();
119
+ return new URLSearchParams(search).toString();
120
+ };
106
121
  function isIframe() {
107
122
  return isBrowser() && window.self !== window.top;
108
123
  }
109
- function isEditing() {
110
- return isIframe() && window.location.search.indexOf("builder.frameEditing=") !== -1;
124
+ function isEditing(search) {
125
+ return isIframe() && getSearchString(search || window.location.search).indexOf("builder.frameEditing=") !== -1;
111
126
  }
112
127
  const getLocation = () => {
113
128
  if (isBrowser()) {
@@ -1391,11 +1406,11 @@ const Blocks = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =
1391
1406
  },
1392
1407
  get BlocksWrapper() {
1393
1408
  var _a;
1394
- return (_a = props.context) == null ? void 0 : _a.BlocksWrapper;
1409
+ return ((_a = props.context) == null ? void 0 : _a.BlocksWrapper) || builderContext$1.BlocksWrapper;
1395
1410
  },
1396
1411
  get BlocksWrapperProps() {
1397
1412
  var _a;
1398
- return (_a = props.context) == null ? void 0 : _a.BlocksWrapperProps;
1413
+ return ((_a = props.context) == null ? void 0 : _a.BlocksWrapperProps) || builderContext$1.BlocksWrapperProps;
1399
1414
  },
1400
1415
  children: props.blocks ? (props.blocks || []).map((block) => {
1401
1416
  return /* @__PURE__ */ _jsxC(Block, {
@@ -1425,18 +1440,20 @@ const Blocks = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =
1425
1440
  }, 3, block.id);
1426
1441
  }) : null,
1427
1442
  [_IMMUTABLE]: {
1428
- BlocksWrapper: _fnSignal((p0) => {
1443
+ BlocksWrapper: _fnSignal((p0, p1) => {
1429
1444
  var _a;
1430
- return (_a = p0.context) == null ? void 0 : _a.BlocksWrapper;
1445
+ return ((_a = p1.context) == null ? void 0 : _a.BlocksWrapper) || p0.BlocksWrapper;
1431
1446
  }, [
1447
+ builderContext$1,
1432
1448
  props
1433
- ], "p0.context?.BlocksWrapper"),
1434
- BlocksWrapperProps: _fnSignal((p0) => {
1449
+ ], "p1.context?.BlocksWrapper||p0.BlocksWrapper"),
1450
+ BlocksWrapperProps: _fnSignal((p0, p1) => {
1435
1451
  var _a;
1436
- return (_a = p0.context) == null ? void 0 : _a.BlocksWrapperProps;
1452
+ return ((_a = p1.context) == null ? void 0 : _a.BlocksWrapperProps) || p0.BlocksWrapperProps;
1437
1453
  }, [
1454
+ builderContext$1,
1438
1455
  props
1439
- ], "p0.context?.BlocksWrapperProps"),
1456
+ ], "p1.context?.BlocksWrapperProps||p0.BlocksWrapperProps"),
1440
1457
  blocks: _fnSignal((p0) => p0.blocks, [
1441
1458
  props
1442
1459
  ], "p0.blocks"),
@@ -4002,13 +4019,6 @@ function flatten(object, path = null, separator = ".") {
4002
4019
  const DEFAULT_API_VERSION = "v3";
4003
4020
  const BUILDER_SEARCHPARAMS_PREFIX = "builder.";
4004
4021
  const BUILDER_OPTIONS_PREFIX = "options.";
4005
- const convertSearchParamsToQueryObject = (searchParams) => {
4006
- const options = {};
4007
- searchParams.forEach((value, key) => {
4008
- options[key] = value;
4009
- });
4010
- return options;
4011
- };
4012
4022
  const getBuilderSearchParams = (_options) => {
4013
4023
  if (!_options)
4014
4024
  return {};
@@ -4028,7 +4038,6 @@ const getBuilderSearchParamsFromWindow = () => {
4028
4038
  const searchParams = new URLSearchParams(window.location.search);
4029
4039
  return getBuilderSearchParams(searchParams);
4030
4040
  };
4031
- const normalizeSearchParams = (searchParams) => searchParams instanceof URLSearchParams ? convertSearchParamsToQueryObject(searchParams) : searchParams;
4032
4041
  const isPositiveNumber = (thing) => typeof thing === "number" && !isNaN(thing) && thing >= 0;
4033
4042
  const generateContentUrl = (options) => {
4034
4043
  const { limit = 30, userAttributes, query, model, apiKey, enrich, locale, apiVersion = DEFAULT_API_VERSION, fields, omit, offset, cacheSeconds, staleCacheSeconds, sort, includeUnpublished } = options;
@@ -4138,12 +4147,13 @@ async function fetchEntries(options) {
4138
4147
  return null;
4139
4148
  }
4140
4149
  }
4141
- function isPreviewing() {
4150
+ function isPreviewing(search) {
4142
4151
  if (!isBrowser())
4143
4152
  return false;
4144
- if (isEditing())
4153
+ const normalizedSearch = getSearchString(search || window.location.search);
4154
+ if (isEditing(normalizedSearch))
4145
4155
  return false;
4146
- return Boolean(location.search.indexOf("builder.preview=") !== -1);
4156
+ return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
4147
4157
  }
4148
4158
  function uuidv4() {
4149
4159
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
@@ -4348,7 +4358,7 @@ function isFromTrustedHost(trustedHosts, e) {
4348
4358
  const url = new URL(e.origin), hostname = url.hostname;
4349
4359
  return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
4350
4360
  }
4351
- const SDK_VERSION = "0.14.3";
4361
+ const SDK_VERSION = "0.14.5";
4352
4362
  const registry = {};
4353
4363
  function register(type, info) {
4354
4364
  let typeList = registry[type];
@@ -4729,8 +4739,10 @@ const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
4729
4739
  useOn("qvisible", /* @__PURE__ */ inlinedQrl((event, element) => {
4730
4740
  var _a2, _b2, _c2, _d2;
4731
4741
  if (isBrowser()) {
4732
- if (isEditing() && element)
4733
- element.dispatchEvent(new CustomEvent("initeditingbldr"));
4742
+ if (isEditing()) {
4743
+ if (element)
4744
+ element.dispatchEvent(new CustomEvent("initeditingbldr"));
4745
+ }
4734
4746
  const shouldTrackImpression = ((_a2 = element.attributes.getNamedItem("shouldTrack")) == null ? void 0 : _a2.value) === "true";
4735
4747
  if (shouldTrackImpression) {
4736
4748
  const variationId = (_b2 = element.attributes.getNamedItem("variationId")) == null ? void 0 : _b2.value;
@@ -4744,8 +4756,10 @@ const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
4744
4756
  variationId: variationId !== contentId ? variationId : void 0
4745
4757
  });
4746
4758
  }
4747
- if (isPreviewing() && element)
4748
- element.dispatchEvent(new CustomEvent("initpreviewingbldr"));
4759
+ if (isPreviewing()) {
4760
+ if (element)
4761
+ element.dispatchEvent(new CustomEvent("initpreviewingbldr"));
4762
+ }
4749
4763
  }
4750
4764
  }, "EnableEditor_component_useOn_2_FyR0YPSlJlw"));
4751
4765
  useContextProvider(builderContext, props.builderContextSignal);
@@ -105,11 +105,26 @@ const logger = {
105
105
  function isBrowser() {
106
106
  return typeof window !== "undefined" && typeof document !== "undefined";
107
107
  }
108
+ const convertSearchParamsToQueryObject = (searchParams) => {
109
+ const options = {};
110
+ searchParams.forEach((value, key) => {
111
+ options[key] = value;
112
+ });
113
+ return options;
114
+ };
115
+ const normalizeSearchParams = (searchParams) => searchParams instanceof URLSearchParams ? convertSearchParamsToQueryObject(searchParams) : searchParams;
116
+ const getSearchString = (search) => {
117
+ if (typeof search === "string")
118
+ return search;
119
+ else if (search instanceof URLSearchParams)
120
+ return search.toString();
121
+ return new URLSearchParams(search).toString();
122
+ };
108
123
  function isIframe() {
109
124
  return isBrowser() && window.self !== window.top;
110
125
  }
111
- function isEditing() {
112
- return isIframe() && window.location.search.indexOf("builder.frameEditing=") !== -1;
126
+ function isEditing(search) {
127
+ return isIframe() && getSearchString(search || window.location.search).indexOf("builder.frameEditing=") !== -1;
113
128
  }
114
129
  const getLocation = () => {
115
130
  if (isBrowser()) {
@@ -4624,11 +4639,11 @@ const Blocks = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl
4624
4639
  },
4625
4640
  get BlocksWrapper() {
4626
4641
  var _a;
4627
- return (_a = props.context) == null ? void 0 : _a.BlocksWrapper;
4642
+ return ((_a = props.context) == null ? void 0 : _a.BlocksWrapper) || builderContext$1.BlocksWrapper;
4628
4643
  },
4629
4644
  get BlocksWrapperProps() {
4630
4645
  var _a;
4631
- return (_a = props.context) == null ? void 0 : _a.BlocksWrapperProps;
4646
+ return ((_a = props.context) == null ? void 0 : _a.BlocksWrapperProps) || builderContext$1.BlocksWrapperProps;
4632
4647
  },
4633
4648
  children: props.blocks ? (props.blocks || []).map((block) => {
4634
4649
  return /* @__PURE__ */ qwik._jsxC(Block, {
@@ -4658,18 +4673,20 @@ const Blocks = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl
4658
4673
  }, 3, block.id);
4659
4674
  }) : null,
4660
4675
  [qwik._IMMUTABLE]: {
4661
- BlocksWrapper: qwik._fnSignal((p0) => {
4676
+ BlocksWrapper: qwik._fnSignal((p0, p1) => {
4662
4677
  var _a;
4663
- return (_a = p0.context) == null ? void 0 : _a.BlocksWrapper;
4678
+ return ((_a = p1.context) == null ? void 0 : _a.BlocksWrapper) || p0.BlocksWrapper;
4664
4679
  }, [
4680
+ builderContext$1,
4665
4681
  props
4666
- ], "p0.context?.BlocksWrapper"),
4667
- BlocksWrapperProps: qwik._fnSignal((p0) => {
4682
+ ], "p1.context?.BlocksWrapper||p0.BlocksWrapper"),
4683
+ BlocksWrapperProps: qwik._fnSignal((p0, p1) => {
4668
4684
  var _a;
4669
- return (_a = p0.context) == null ? void 0 : _a.BlocksWrapperProps;
4685
+ return ((_a = p1.context) == null ? void 0 : _a.BlocksWrapperProps) || p0.BlocksWrapperProps;
4670
4686
  }, [
4687
+ builderContext$1,
4671
4688
  props
4672
- ], "p0.context?.BlocksWrapperProps"),
4689
+ ], "p1.context?.BlocksWrapperProps||p0.BlocksWrapperProps"),
4673
4690
  blocks: qwik._fnSignal((p0) => p0.blocks, [
4674
4691
  props
4675
4692
  ], "p0.blocks"),
@@ -7235,13 +7252,6 @@ function flatten(object, path = null, separator = ".") {
7235
7252
  const DEFAULT_API_VERSION = "v3";
7236
7253
  const BUILDER_SEARCHPARAMS_PREFIX = "builder.";
7237
7254
  const BUILDER_OPTIONS_PREFIX = "options.";
7238
- const convertSearchParamsToQueryObject = (searchParams) => {
7239
- const options = {};
7240
- searchParams.forEach((value, key) => {
7241
- options[key] = value;
7242
- });
7243
- return options;
7244
- };
7245
7255
  const getBuilderSearchParams = (_options) => {
7246
7256
  if (!_options)
7247
7257
  return {};
@@ -7261,7 +7271,6 @@ const getBuilderSearchParamsFromWindow = () => {
7261
7271
  const searchParams = new URLSearchParams(window.location.search);
7262
7272
  return getBuilderSearchParams(searchParams);
7263
7273
  };
7264
- const normalizeSearchParams = (searchParams) => searchParams instanceof URLSearchParams ? convertSearchParamsToQueryObject(searchParams) : searchParams;
7265
7274
  const isPositiveNumber = (thing) => typeof thing === "number" && !isNaN(thing) && thing >= 0;
7266
7275
  const generateContentUrl = (options) => {
7267
7276
  const { limit = 30, userAttributes, query, model, apiKey, enrich, locale, apiVersion = DEFAULT_API_VERSION, fields, omit, offset, cacheSeconds, staleCacheSeconds, sort, includeUnpublished } = options;
@@ -7371,12 +7380,13 @@ async function fetchEntries(options) {
7371
7380
  return null;
7372
7381
  }
7373
7382
  }
7374
- function isPreviewing() {
7383
+ function isPreviewing(search) {
7375
7384
  if (!isBrowser())
7376
7385
  return false;
7377
- if (isEditing())
7386
+ const normalizedSearch = getSearchString(search || window.location.search);
7387
+ if (isEditing(normalizedSearch))
7378
7388
  return false;
7379
- return Boolean(location.search.indexOf("builder.preview=") !== -1);
7389
+ return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
7380
7390
  }
7381
7391
  function uuidv4() {
7382
7392
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
@@ -7581,7 +7591,7 @@ function isFromTrustedHost(trustedHosts, e) {
7581
7591
  const url = new URL(e.origin), hostname = url.hostname;
7582
7592
  return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
7583
7593
  }
7584
- const SDK_VERSION = "0.14.3";
7594
+ const SDK_VERSION = "0.14.5";
7585
7595
  const registry = {};
7586
7596
  function register(type, info) {
7587
7597
  let typeList = registry[type];
@@ -7962,8 +7972,10 @@ const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
7962
7972
  qwik.useOn("qvisible", /* @__PURE__ */ qwik.inlinedQrl((event, element) => {
7963
7973
  var _a2, _b2, _c2, _d2;
7964
7974
  if (isBrowser()) {
7965
- if (isEditing() && element)
7966
- element.dispatchEvent(new CustomEvent("initeditingbldr"));
7975
+ if (isEditing()) {
7976
+ if (element)
7977
+ element.dispatchEvent(new CustomEvent("initeditingbldr"));
7978
+ }
7967
7979
  const shouldTrackImpression = ((_a2 = element.attributes.getNamedItem("shouldTrack")) == null ? void 0 : _a2.value) === "true";
7968
7980
  if (shouldTrackImpression) {
7969
7981
  const variationId = (_b2 = element.attributes.getNamedItem("variationId")) == null ? void 0 : _b2.value;
@@ -7977,8 +7989,10 @@ const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
7977
7989
  variationId: variationId !== contentId ? variationId : void 0
7978
7990
  });
7979
7991
  }
7980
- if (isPreviewing() && element)
7981
- element.dispatchEvent(new CustomEvent("initpreviewingbldr"));
7992
+ if (isPreviewing()) {
7993
+ if (element)
7994
+ element.dispatchEvent(new CustomEvent("initpreviewingbldr"));
7995
+ }
7982
7996
  }
7983
7997
  }, "EnableEditor_component_useOn_2_FyR0YPSlJlw"));
7984
7998
  qwik.useContextProvider(builderContext, props.builderContextSignal);
@@ -103,11 +103,26 @@ const logger = {
103
103
  function isBrowser() {
104
104
  return typeof window !== "undefined" && typeof document !== "undefined";
105
105
  }
106
+ const convertSearchParamsToQueryObject = (searchParams) => {
107
+ const options = {};
108
+ searchParams.forEach((value, key) => {
109
+ options[key] = value;
110
+ });
111
+ return options;
112
+ };
113
+ const normalizeSearchParams = (searchParams) => searchParams instanceof URLSearchParams ? convertSearchParamsToQueryObject(searchParams) : searchParams;
114
+ const getSearchString = (search) => {
115
+ if (typeof search === "string")
116
+ return search;
117
+ else if (search instanceof URLSearchParams)
118
+ return search.toString();
119
+ return new URLSearchParams(search).toString();
120
+ };
106
121
  function isIframe() {
107
122
  return isBrowser() && window.self !== window.top;
108
123
  }
109
- function isEditing() {
110
- return isIframe() && window.location.search.indexOf("builder.frameEditing=") !== -1;
124
+ function isEditing(search) {
125
+ return isIframe() && getSearchString(search || window.location.search).indexOf("builder.frameEditing=") !== -1;
111
126
  }
112
127
  const getLocation = () => {
113
128
  if (isBrowser()) {
@@ -4622,11 +4637,11 @@ const Blocks = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =
4622
4637
  },
4623
4638
  get BlocksWrapper() {
4624
4639
  var _a;
4625
- return (_a = props.context) == null ? void 0 : _a.BlocksWrapper;
4640
+ return ((_a = props.context) == null ? void 0 : _a.BlocksWrapper) || builderContext$1.BlocksWrapper;
4626
4641
  },
4627
4642
  get BlocksWrapperProps() {
4628
4643
  var _a;
4629
- return (_a = props.context) == null ? void 0 : _a.BlocksWrapperProps;
4644
+ return ((_a = props.context) == null ? void 0 : _a.BlocksWrapperProps) || builderContext$1.BlocksWrapperProps;
4630
4645
  },
4631
4646
  children: props.blocks ? (props.blocks || []).map((block) => {
4632
4647
  return /* @__PURE__ */ _jsxC(Block, {
@@ -4656,18 +4671,20 @@ const Blocks = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =
4656
4671
  }, 3, block.id);
4657
4672
  }) : null,
4658
4673
  [_IMMUTABLE]: {
4659
- BlocksWrapper: _fnSignal((p0) => {
4674
+ BlocksWrapper: _fnSignal((p0, p1) => {
4660
4675
  var _a;
4661
- return (_a = p0.context) == null ? void 0 : _a.BlocksWrapper;
4676
+ return ((_a = p1.context) == null ? void 0 : _a.BlocksWrapper) || p0.BlocksWrapper;
4662
4677
  }, [
4678
+ builderContext$1,
4663
4679
  props
4664
- ], "p0.context?.BlocksWrapper"),
4665
- BlocksWrapperProps: _fnSignal((p0) => {
4680
+ ], "p1.context?.BlocksWrapper||p0.BlocksWrapper"),
4681
+ BlocksWrapperProps: _fnSignal((p0, p1) => {
4666
4682
  var _a;
4667
- return (_a = p0.context) == null ? void 0 : _a.BlocksWrapperProps;
4683
+ return ((_a = p1.context) == null ? void 0 : _a.BlocksWrapperProps) || p0.BlocksWrapperProps;
4668
4684
  }, [
4685
+ builderContext$1,
4669
4686
  props
4670
- ], "p0.context?.BlocksWrapperProps"),
4687
+ ], "p1.context?.BlocksWrapperProps||p0.BlocksWrapperProps"),
4671
4688
  blocks: _fnSignal((p0) => p0.blocks, [
4672
4689
  props
4673
4690
  ], "p0.blocks"),
@@ -7233,13 +7250,6 @@ function flatten(object, path = null, separator = ".") {
7233
7250
  const DEFAULT_API_VERSION = "v3";
7234
7251
  const BUILDER_SEARCHPARAMS_PREFIX = "builder.";
7235
7252
  const BUILDER_OPTIONS_PREFIX = "options.";
7236
- const convertSearchParamsToQueryObject = (searchParams) => {
7237
- const options = {};
7238
- searchParams.forEach((value, key) => {
7239
- options[key] = value;
7240
- });
7241
- return options;
7242
- };
7243
7253
  const getBuilderSearchParams = (_options) => {
7244
7254
  if (!_options)
7245
7255
  return {};
@@ -7259,7 +7269,6 @@ const getBuilderSearchParamsFromWindow = () => {
7259
7269
  const searchParams = new URLSearchParams(window.location.search);
7260
7270
  return getBuilderSearchParams(searchParams);
7261
7271
  };
7262
- const normalizeSearchParams = (searchParams) => searchParams instanceof URLSearchParams ? convertSearchParamsToQueryObject(searchParams) : searchParams;
7263
7272
  const isPositiveNumber = (thing) => typeof thing === "number" && !isNaN(thing) && thing >= 0;
7264
7273
  const generateContentUrl = (options) => {
7265
7274
  const { limit = 30, userAttributes, query, model, apiKey, enrich, locale, apiVersion = DEFAULT_API_VERSION, fields, omit, offset, cacheSeconds, staleCacheSeconds, sort, includeUnpublished } = options;
@@ -7369,12 +7378,13 @@ async function fetchEntries(options) {
7369
7378
  return null;
7370
7379
  }
7371
7380
  }
7372
- function isPreviewing() {
7381
+ function isPreviewing(search) {
7373
7382
  if (!isBrowser())
7374
7383
  return false;
7375
- if (isEditing())
7384
+ const normalizedSearch = getSearchString(search || window.location.search);
7385
+ if (isEditing(normalizedSearch))
7376
7386
  return false;
7377
- return Boolean(location.search.indexOf("builder.preview=") !== -1);
7387
+ return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
7378
7388
  }
7379
7389
  function uuidv4() {
7380
7390
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
@@ -7579,7 +7589,7 @@ function isFromTrustedHost(trustedHosts, e) {
7579
7589
  const url = new URL(e.origin), hostname = url.hostname;
7580
7590
  return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
7581
7591
  }
7582
- const SDK_VERSION = "0.14.3";
7592
+ const SDK_VERSION = "0.14.5";
7583
7593
  const registry = {};
7584
7594
  function register(type, info) {
7585
7595
  let typeList = registry[type];
@@ -7960,8 +7970,10 @@ const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
7960
7970
  useOn("qvisible", /* @__PURE__ */ inlinedQrl((event, element) => {
7961
7971
  var _a2, _b2, _c2, _d2;
7962
7972
  if (isBrowser()) {
7963
- if (isEditing() && element)
7964
- element.dispatchEvent(new CustomEvent("initeditingbldr"));
7973
+ if (isEditing()) {
7974
+ if (element)
7975
+ element.dispatchEvent(new CustomEvent("initeditingbldr"));
7976
+ }
7965
7977
  const shouldTrackImpression = ((_a2 = element.attributes.getNamedItem("shouldTrack")) == null ? void 0 : _a2.value) === "true";
7966
7978
  if (shouldTrackImpression) {
7967
7979
  const variationId = (_b2 = element.attributes.getNamedItem("variationId")) == null ? void 0 : _b2.value;
@@ -7975,8 +7987,10 @@ const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
7975
7987
  variationId: variationId !== contentId ? variationId : void 0
7976
7988
  });
7977
7989
  }
7978
- if (isPreviewing() && element)
7979
- element.dispatchEvent(new CustomEvent("initpreviewingbldr"));
7990
+ if (isPreviewing()) {
7991
+ if (element)
7992
+ element.dispatchEvent(new CustomEvent("initpreviewingbldr"));
7993
+ }
7980
7994
  }
7981
7995
  }, "EnableEditor_component_useOn_2_FyR0YPSlJlw"));
7982
7996
  useContextProvider(builderContext, props.builderContextSignal);
@@ -107,11 +107,26 @@ const logger = {
107
107
  function isBrowser() {
108
108
  return typeof window !== "undefined" && typeof document !== "undefined";
109
109
  }
110
+ const convertSearchParamsToQueryObject = (searchParams) => {
111
+ const options = {};
112
+ searchParams.forEach((value, key) => {
113
+ options[key] = value;
114
+ });
115
+ return options;
116
+ };
117
+ const normalizeSearchParams = (searchParams) => searchParams instanceof URLSearchParams ? convertSearchParamsToQueryObject(searchParams) : searchParams;
118
+ const getSearchString = (search) => {
119
+ if (typeof search === "string")
120
+ return search;
121
+ else if (search instanceof URLSearchParams)
122
+ return search.toString();
123
+ return new URLSearchParams(search).toString();
124
+ };
110
125
  function isIframe() {
111
126
  return isBrowser() && window.self !== window.top;
112
127
  }
113
- function isEditing() {
114
- return isIframe() && window.location.search.indexOf("builder.frameEditing=") !== -1;
128
+ function isEditing(search) {
129
+ return isIframe() && getSearchString(search || window.location.search).indexOf("builder.frameEditing=") !== -1;
115
130
  }
116
131
  const getLocation = () => {
117
132
  if (isBrowser()) {
@@ -1495,11 +1510,11 @@ const Blocks = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl
1495
1510
  },
1496
1511
  get BlocksWrapper() {
1497
1512
  var _a;
1498
- return (_a = props.context) == null ? void 0 : _a.BlocksWrapper;
1513
+ return ((_a = props.context) == null ? void 0 : _a.BlocksWrapper) || builderContext$1.BlocksWrapper;
1499
1514
  },
1500
1515
  get BlocksWrapperProps() {
1501
1516
  var _a;
1502
- return (_a = props.context) == null ? void 0 : _a.BlocksWrapperProps;
1517
+ return ((_a = props.context) == null ? void 0 : _a.BlocksWrapperProps) || builderContext$1.BlocksWrapperProps;
1503
1518
  },
1504
1519
  children: props.blocks ? (props.blocks || []).map((block) => {
1505
1520
  return /* @__PURE__ */ qwik._jsxC(Block, {
@@ -1529,18 +1544,20 @@ const Blocks = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl
1529
1544
  }, 3, block.id);
1530
1545
  }) : null,
1531
1546
  [qwik._IMMUTABLE]: {
1532
- BlocksWrapper: qwik._fnSignal((p0) => {
1547
+ BlocksWrapper: qwik._fnSignal((p0, p1) => {
1533
1548
  var _a;
1534
- return (_a = p0.context) == null ? void 0 : _a.BlocksWrapper;
1549
+ return ((_a = p1.context) == null ? void 0 : _a.BlocksWrapper) || p0.BlocksWrapper;
1535
1550
  }, [
1551
+ builderContext$1,
1536
1552
  props
1537
- ], "p0.context?.BlocksWrapper"),
1538
- BlocksWrapperProps: qwik._fnSignal((p0) => {
1553
+ ], "p1.context?.BlocksWrapper||p0.BlocksWrapper"),
1554
+ BlocksWrapperProps: qwik._fnSignal((p0, p1) => {
1539
1555
  var _a;
1540
- return (_a = p0.context) == null ? void 0 : _a.BlocksWrapperProps;
1556
+ return ((_a = p1.context) == null ? void 0 : _a.BlocksWrapperProps) || p0.BlocksWrapperProps;
1541
1557
  }, [
1558
+ builderContext$1,
1542
1559
  props
1543
- ], "p0.context?.BlocksWrapperProps"),
1560
+ ], "p1.context?.BlocksWrapperProps||p0.BlocksWrapperProps"),
1544
1561
  blocks: qwik._fnSignal((p0) => p0.blocks, [
1545
1562
  props
1546
1563
  ], "p0.blocks"),
@@ -4106,13 +4123,6 @@ function flatten(object, path = null, separator = ".") {
4106
4123
  const DEFAULT_API_VERSION = "v3";
4107
4124
  const BUILDER_SEARCHPARAMS_PREFIX = "builder.";
4108
4125
  const BUILDER_OPTIONS_PREFIX = "options.";
4109
- const convertSearchParamsToQueryObject = (searchParams) => {
4110
- const options = {};
4111
- searchParams.forEach((value, key) => {
4112
- options[key] = value;
4113
- });
4114
- return options;
4115
- };
4116
4126
  const getBuilderSearchParams = (_options) => {
4117
4127
  if (!_options)
4118
4128
  return {};
@@ -4132,7 +4142,6 @@ const getBuilderSearchParamsFromWindow = () => {
4132
4142
  const searchParams = new URLSearchParams(window.location.search);
4133
4143
  return getBuilderSearchParams(searchParams);
4134
4144
  };
4135
- const normalizeSearchParams = (searchParams) => searchParams instanceof URLSearchParams ? convertSearchParamsToQueryObject(searchParams) : searchParams;
4136
4145
  const isPositiveNumber = (thing) => typeof thing === "number" && !isNaN(thing) && thing >= 0;
4137
4146
  const generateContentUrl = (options) => {
4138
4147
  const { limit = 30, userAttributes, query, model, apiKey, enrich, locale, apiVersion = DEFAULT_API_VERSION, fields, omit, offset, cacheSeconds, staleCacheSeconds, sort, includeUnpublished } = options;
@@ -4242,12 +4251,13 @@ async function fetchEntries(options) {
4242
4251
  return null;
4243
4252
  }
4244
4253
  }
4245
- function isPreviewing() {
4254
+ function isPreviewing(search) {
4246
4255
  if (!isBrowser())
4247
4256
  return false;
4248
- if (isEditing())
4257
+ const normalizedSearch = getSearchString(search || window.location.search);
4258
+ if (isEditing(normalizedSearch))
4249
4259
  return false;
4250
- return Boolean(location.search.indexOf("builder.preview=") !== -1);
4260
+ return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
4251
4261
  }
4252
4262
  function uuidv4() {
4253
4263
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
@@ -4452,7 +4462,7 @@ function isFromTrustedHost(trustedHosts, e) {
4452
4462
  const url = new URL(e.origin), hostname = url.hostname;
4453
4463
  return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
4454
4464
  }
4455
- const SDK_VERSION = "0.14.3";
4465
+ const SDK_VERSION = "0.14.5";
4456
4466
  const registry = {};
4457
4467
  function register(type, info) {
4458
4468
  let typeList = registry[type];
@@ -4833,8 +4843,10 @@ const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
4833
4843
  qwik.useOn("qvisible", /* @__PURE__ */ qwik.inlinedQrl((event, element) => {
4834
4844
  var _a2, _b2, _c2, _d2;
4835
4845
  if (isBrowser()) {
4836
- if (isEditing() && element)
4837
- element.dispatchEvent(new CustomEvent("initeditingbldr"));
4846
+ if (isEditing()) {
4847
+ if (element)
4848
+ element.dispatchEvent(new CustomEvent("initeditingbldr"));
4849
+ }
4838
4850
  const shouldTrackImpression = ((_a2 = element.attributes.getNamedItem("shouldTrack")) == null ? void 0 : _a2.value) === "true";
4839
4851
  if (shouldTrackImpression) {
4840
4852
  const variationId = (_b2 = element.attributes.getNamedItem("variationId")) == null ? void 0 : _b2.value;
@@ -4848,8 +4860,10 @@ const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
4848
4860
  variationId: variationId !== contentId ? variationId : void 0
4849
4861
  });
4850
4862
  }
4851
- if (isPreviewing() && element)
4852
- element.dispatchEvent(new CustomEvent("initpreviewingbldr"));
4863
+ if (isPreviewing()) {
4864
+ if (element)
4865
+ element.dispatchEvent(new CustomEvent("initpreviewingbldr"));
4866
+ }
4853
4867
  }
4854
4868
  }, "EnableEditor_component_useOn_2_FyR0YPSlJlw"));
4855
4869
  qwik.useContextProvider(builderContext, props.builderContextSignal);
@@ -105,11 +105,26 @@ const logger = {
105
105
  function isBrowser() {
106
106
  return typeof window !== "undefined" && typeof document !== "undefined";
107
107
  }
108
+ const convertSearchParamsToQueryObject = (searchParams) => {
109
+ const options = {};
110
+ searchParams.forEach((value, key) => {
111
+ options[key] = value;
112
+ });
113
+ return options;
114
+ };
115
+ const normalizeSearchParams = (searchParams) => searchParams instanceof URLSearchParams ? convertSearchParamsToQueryObject(searchParams) : searchParams;
116
+ const getSearchString = (search) => {
117
+ if (typeof search === "string")
118
+ return search;
119
+ else if (search instanceof URLSearchParams)
120
+ return search.toString();
121
+ return new URLSearchParams(search).toString();
122
+ };
108
123
  function isIframe() {
109
124
  return isBrowser() && window.self !== window.top;
110
125
  }
111
- function isEditing() {
112
- return isIframe() && window.location.search.indexOf("builder.frameEditing=") !== -1;
126
+ function isEditing(search) {
127
+ return isIframe() && getSearchString(search || window.location.search).indexOf("builder.frameEditing=") !== -1;
113
128
  }
114
129
  const getLocation = () => {
115
130
  if (isBrowser()) {
@@ -1493,11 +1508,11 @@ const Blocks = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =
1493
1508
  },
1494
1509
  get BlocksWrapper() {
1495
1510
  var _a;
1496
- return (_a = props.context) == null ? void 0 : _a.BlocksWrapper;
1511
+ return ((_a = props.context) == null ? void 0 : _a.BlocksWrapper) || builderContext$1.BlocksWrapper;
1497
1512
  },
1498
1513
  get BlocksWrapperProps() {
1499
1514
  var _a;
1500
- return (_a = props.context) == null ? void 0 : _a.BlocksWrapperProps;
1515
+ return ((_a = props.context) == null ? void 0 : _a.BlocksWrapperProps) || builderContext$1.BlocksWrapperProps;
1501
1516
  },
1502
1517
  children: props.blocks ? (props.blocks || []).map((block) => {
1503
1518
  return /* @__PURE__ */ _jsxC(Block, {
@@ -1527,18 +1542,20 @@ const Blocks = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =
1527
1542
  }, 3, block.id);
1528
1543
  }) : null,
1529
1544
  [_IMMUTABLE]: {
1530
- BlocksWrapper: _fnSignal((p0) => {
1545
+ BlocksWrapper: _fnSignal((p0, p1) => {
1531
1546
  var _a;
1532
- return (_a = p0.context) == null ? void 0 : _a.BlocksWrapper;
1547
+ return ((_a = p1.context) == null ? void 0 : _a.BlocksWrapper) || p0.BlocksWrapper;
1533
1548
  }, [
1549
+ builderContext$1,
1534
1550
  props
1535
- ], "p0.context?.BlocksWrapper"),
1536
- BlocksWrapperProps: _fnSignal((p0) => {
1551
+ ], "p1.context?.BlocksWrapper||p0.BlocksWrapper"),
1552
+ BlocksWrapperProps: _fnSignal((p0, p1) => {
1537
1553
  var _a;
1538
- return (_a = p0.context) == null ? void 0 : _a.BlocksWrapperProps;
1554
+ return ((_a = p1.context) == null ? void 0 : _a.BlocksWrapperProps) || p0.BlocksWrapperProps;
1539
1555
  }, [
1556
+ builderContext$1,
1540
1557
  props
1541
- ], "p0.context?.BlocksWrapperProps"),
1558
+ ], "p1.context?.BlocksWrapperProps||p0.BlocksWrapperProps"),
1542
1559
  blocks: _fnSignal((p0) => p0.blocks, [
1543
1560
  props
1544
1561
  ], "p0.blocks"),
@@ -4104,13 +4121,6 @@ function flatten(object, path = null, separator = ".") {
4104
4121
  const DEFAULT_API_VERSION = "v3";
4105
4122
  const BUILDER_SEARCHPARAMS_PREFIX = "builder.";
4106
4123
  const BUILDER_OPTIONS_PREFIX = "options.";
4107
- const convertSearchParamsToQueryObject = (searchParams) => {
4108
- const options = {};
4109
- searchParams.forEach((value, key) => {
4110
- options[key] = value;
4111
- });
4112
- return options;
4113
- };
4114
4124
  const getBuilderSearchParams = (_options) => {
4115
4125
  if (!_options)
4116
4126
  return {};
@@ -4130,7 +4140,6 @@ const getBuilderSearchParamsFromWindow = () => {
4130
4140
  const searchParams = new URLSearchParams(window.location.search);
4131
4141
  return getBuilderSearchParams(searchParams);
4132
4142
  };
4133
- const normalizeSearchParams = (searchParams) => searchParams instanceof URLSearchParams ? convertSearchParamsToQueryObject(searchParams) : searchParams;
4134
4143
  const isPositiveNumber = (thing) => typeof thing === "number" && !isNaN(thing) && thing >= 0;
4135
4144
  const generateContentUrl = (options) => {
4136
4145
  const { limit = 30, userAttributes, query, model, apiKey, enrich, locale, apiVersion = DEFAULT_API_VERSION, fields, omit, offset, cacheSeconds, staleCacheSeconds, sort, includeUnpublished } = options;
@@ -4240,12 +4249,13 @@ async function fetchEntries(options) {
4240
4249
  return null;
4241
4250
  }
4242
4251
  }
4243
- function isPreviewing() {
4252
+ function isPreviewing(search) {
4244
4253
  if (!isBrowser())
4245
4254
  return false;
4246
- if (isEditing())
4255
+ const normalizedSearch = getSearchString(search || window.location.search);
4256
+ if (isEditing(normalizedSearch))
4247
4257
  return false;
4248
- return Boolean(location.search.indexOf("builder.preview=") !== -1);
4258
+ return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
4249
4259
  }
4250
4260
  function uuidv4() {
4251
4261
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
@@ -4450,7 +4460,7 @@ function isFromTrustedHost(trustedHosts, e) {
4450
4460
  const url = new URL(e.origin), hostname = url.hostname;
4451
4461
  return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
4452
4462
  }
4453
- const SDK_VERSION = "0.14.3";
4463
+ const SDK_VERSION = "0.14.5";
4454
4464
  const registry = {};
4455
4465
  function register(type, info) {
4456
4466
  let typeList = registry[type];
@@ -4831,8 +4841,10 @@ const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
4831
4841
  useOn("qvisible", /* @__PURE__ */ inlinedQrl((event, element) => {
4832
4842
  var _a2, _b2, _c2, _d2;
4833
4843
  if (isBrowser()) {
4834
- if (isEditing() && element)
4835
- element.dispatchEvent(new CustomEvent("initeditingbldr"));
4844
+ if (isEditing()) {
4845
+ if (element)
4846
+ element.dispatchEvent(new CustomEvent("initeditingbldr"));
4847
+ }
4836
4848
  const shouldTrackImpression = ((_a2 = element.attributes.getNamedItem("shouldTrack")) == null ? void 0 : _a2.value) === "true";
4837
4849
  if (shouldTrackImpression) {
4838
4850
  const variationId = (_b2 = element.attributes.getNamedItem("variationId")) == null ? void 0 : _b2.value;
@@ -4846,8 +4858,10 @@ const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
4846
4858
  variationId: variationId !== contentId ? variationId : void 0
4847
4859
  });
4848
4860
  }
4849
- if (isPreviewing() && element)
4850
- element.dispatchEvent(new CustomEvent("initpreviewingbldr"));
4861
+ if (isPreviewing()) {
4862
+ if (element)
4863
+ element.dispatchEvent(new CustomEvent("initpreviewingbldr"));
4864
+ }
4851
4865
  }
4852
4866
  }, "EnableEditor_component_useOn_2_FyR0YPSlJlw"));
4853
4867
  useContextProvider(builderContext, props.builderContextSignal);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builder.io/sdk-qwik",
3
- "version": "0.14.3",
3
+ "version": "0.14.5",
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.14.3";
1
+ export declare const SDK_VERSION = "0.14.5";
@@ -1,5 +1,4 @@
1
- type QueryObject = Record<string, string | string[]>;
2
- export declare const convertSearchParamsToQueryObject: (searchParams: URLSearchParams) => QueryObject;
1
+ import type { QueryObject } from '../../helpers/search/search.js';
3
2
  /**
4
3
  * Receives a `URLSearchParams` object or a regular query object, and returns the subset of query params that are
5
4
  * relevant to the Builder SDK.
@@ -8,5 +7,3 @@ export declare const convertSearchParamsToQueryObject: (searchParams: URLSearchP
8
7
  */
9
8
  export declare const getBuilderSearchParams: (_options: QueryObject | URLSearchParams | undefined) => QueryObject;
10
9
  export declare const getBuilderSearchParamsFromWindow: () => QueryObject;
11
- export declare const normalizeSearchParams: (searchParams: QueryObject | URLSearchParams) => QueryObject;
12
- export {};
@@ -1 +1,2 @@
1
- export declare function isEditing(): boolean;
1
+ import { type Search } from '../helpers/search/search.js';
2
+ export declare function isEditing(search?: Search): boolean;
@@ -1 +1,2 @@
1
- export declare function isPreviewing(): boolean;
1
+ import type { Search } from '../helpers/search/search.js';
2
+ export declare function isPreviewing(search?: Search): boolean;
@@ -0,0 +1,5 @@
1
+ export type QueryObject = Record<string, string | string[]>;
2
+ export declare const convertSearchParamsToQueryObject: (searchParams: URLSearchParams) => QueryObject;
3
+ export declare const normalizeSearchParams: (searchParams: QueryObject | URLSearchParams) => QueryObject;
4
+ export type Search = URLSearchParams | string | QueryObject;
5
+ export declare const getSearchString: (search: Search) => string;
@@ -1,7 +1,10 @@
1
1
  export * from './index-helpers/top-of-file.js';
2
+ /**
3
+ * In the React SDK, this file is marked with `use client`.
4
+ */
2
5
  export * from './index-helpers/blocks-exports.js';
3
6
  /**
4
- * We have a separate entry point to the SDKs that guarantees no components are being imported. This is useful
5
- * for React SDK, which would break in the NextJS App directory because the component imports have `use client` in them.
7
+ * In the React SDK, this file is not marked with `use client`, to allow
8
+ * NextJS App Directory to use the SDK helper functions without issues.
6
9
  */
7
10
  export * from './server-index.js';