@builder.io/sdk-qwik 0.13.4 → 0.14.1

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.
@@ -56,10 +56,6 @@ const getClassPropName = () => {
56
56
  };
57
57
  const Button = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
58
58
  return /* @__PURE__ */ qwik._jsxC(DynamicRenderer, {
59
- get TagName() {
60
- return props.link ? props.builderLinkComponent || "a" : "button";
61
- },
62
- actionAttributes: {},
63
59
  attributes: {
64
60
  ...props.attributes,
65
61
  [getClassPropName()]: `${props.link ? "" : "builder-button"} ${props.attributes[getClassPropName()] || ""}`,
@@ -71,6 +67,10 @@ const Button = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl
71
67
  role: "button"
72
68
  }
73
69
  },
70
+ get TagName() {
71
+ return props.link ? props.builderLinkComponent || "a" : "button";
72
+ },
73
+ actionAttributes: {},
74
74
  children: qwik._fnSignal((p0) => p0.text, [
75
75
  props
76
76
  ], "p0.text"),
@@ -3900,7 +3900,6 @@ const getDefaultRegisteredComponents = () => [
3900
3900
  },
3901
3901
  ...getExtraComponents()
3902
3902
  ];
3903
- const components = [];
3904
3903
  const createRegisterComponentMessage = (info) => ({
3905
3904
  type: "builder.registerComponent",
3906
3905
  data: serializeComponentInfo(info)
@@ -4034,17 +4033,23 @@ const getBuilderSearchParamsFromWindow = () => {
4034
4033
  const normalizeSearchParams = (searchParams) => searchParams instanceof URLSearchParams ? convertSearchParamsToQueryObject(searchParams) : searchParams;
4035
4034
  const isPositiveNumber = (thing) => typeof thing === "number" && !isNaN(thing) && thing >= 0;
4036
4035
  const generateContentUrl = (options) => {
4037
- let { noTraverse = false } = options;
4038
- const { limit = 30, userAttributes, query, model, apiKey, includeRefs = true, enrich, locale, apiVersion = DEFAULT_API_VERSION, fields, omit, offset, cacheSeconds, staleCacheSeconds, sort, includeUnpublished } = options;
4036
+ const { limit = 30, userAttributes, query, model, apiKey, enrich, locale, apiVersion = DEFAULT_API_VERSION, fields, omit, offset, cacheSeconds, staleCacheSeconds, sort, includeUnpublished } = options;
4039
4037
  if (!apiKey)
4040
4038
  throw new Error("Missing API key");
4041
4039
  if (![
4042
4040
  "v3"
4043
4041
  ].includes(apiVersion))
4044
4042
  throw new Error(`Invalid apiVersion: expected 'v3', received '${apiVersion}'`);
4045
- if ((options.limit === void 0 || options.limit > 1) && !("noTraverse" in options))
4046
- noTraverse = true;
4047
- const url = new URL(`https://cdn.builder.io/api/${apiVersion}/content/${model}?apiKey=${apiKey}&limit=${limit}&noTraverse=${noTraverse}&includeRefs=${includeRefs}${locale ? `&locale=${locale}` : ""}${enrich ? `&enrich=${enrich}` : ""}`);
4043
+ const noTraverse = limit !== 1;
4044
+ const url = new URL(`https://cdn.builder.io/api/${apiVersion}/content/${model}`);
4045
+ url.searchParams.set("apiKey", apiKey);
4046
+ url.searchParams.set("limit", String(limit));
4047
+ url.searchParams.set("noTraverse", String(noTraverse));
4048
+ url.searchParams.set("includeRefs", String(true));
4049
+ if (locale)
4050
+ url.searchParams.set("locale", locale);
4051
+ if (enrich)
4052
+ url.searchParams.set("enrich", String(enrich));
4048
4053
  url.searchParams.set("omit", omit || "meta.componentsUsed");
4049
4054
  if (fields)
4050
4055
  url.searchParams.set("fields", fields);
@@ -4091,7 +4096,6 @@ async function fetchOneEntry(options) {
4091
4096
  return allContent[0] || null;
4092
4097
  return null;
4093
4098
  }
4094
- const getContent = fetchOneEntry;
4095
4099
  const _fetchContent = async (options) => {
4096
4100
  const url = generateContentUrl(options);
4097
4101
  const res = await fetch$1(url.href);
@@ -4136,7 +4140,6 @@ async function fetchEntries(options) {
4136
4140
  return null;
4137
4141
  }
4138
4142
  }
4139
- const getAllContent = fetchEntries;
4140
4143
  function isPreviewing() {
4141
4144
  if (!isBrowser())
4142
4145
  return false;
@@ -4347,7 +4350,7 @@ function isFromTrustedHost(trustedHosts, e) {
4347
4350
  const url = new URL(e.origin), hostname = url.hostname;
4348
4351
  return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
4349
4352
  }
4350
- const SDK_VERSION = "0.13.4";
4353
+ const SDK_VERSION = "0.14.1";
4351
4354
  const registry = {};
4352
4355
  function register(type, info) {
4353
4356
  let typeList = registry[type];
@@ -4687,9 +4690,6 @@ const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
4687
4690
  ...props2.locale ? {
4688
4691
  locale: props2.locale
4689
4692
  } : {},
4690
- ...props2.includeRefs ? {
4691
- includeRefs: props2.includeRefs
4692
- } : {},
4693
4693
  ...props2.enrich ? {
4694
4694
  enrich: props2.enrich
4695
4695
  } : {},
@@ -4993,12 +4993,6 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
4993
4993
  apiVersion: props.apiVersion,
4994
4994
  componentInfos: [
4995
4995
  ...getDefaultRegisteredComponents(),
4996
- // While this `components` object is deprecated, we must maintain support for it.
4997
- // Since users are able to override our default components, we need to make sure that we do not break such
4998
- // existing usage.
4999
- // This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
5000
- // which is the new standard way of providing custom components, and must therefore take precedence.
5001
- ...components,
5002
4996
  ...props.customComponents || []
5003
4997
  ].reduce((acc, { component: _, ...info }) => ({
5004
4998
  ...acc,
@@ -5010,12 +5004,6 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
5010
5004
  },
5011
5005
  registeredComponents: [
5012
5006
  ...getDefaultRegisteredComponents(),
5013
- // While this `components` object is deprecated, we must maintain support for it.
5014
- // Since users are able to override our default components, we need to make sure that we do not break such
5015
- // existing usage.
5016
- // This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
5017
- // which is the new standard way of providing custom components, and must therefore take precedence.
5018
- ...components,
5019
5007
  ...props.customComponents || []
5020
5008
  ].reduce((acc, { component, ...info }) => ({
5021
5009
  ...acc,
@@ -5058,9 +5046,6 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
5058
5046
  get locale() {
5059
5047
  return props.locale;
5060
5048
  },
5061
- get includeRefs() {
5062
- return props.includeRefs;
5063
- },
5064
5049
  get enrich() {
5065
5050
  return props.enrich;
5066
5051
  },
@@ -5188,9 +5173,6 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
5188
5173
  enrich: qwik._fnSignal((p0) => p0.enrich, [
5189
5174
  props
5190
5175
  ], "p0.enrich"),
5191
- includeRefs: qwik._fnSignal((p0) => p0.includeRefs, [
5192
- props
5193
- ], "p0.includeRefs"),
5194
5176
  linkComponent: qwik._fnSignal((p0) => p0.linkComponent, [
5195
5177
  props
5196
5178
  ], "p0.linkComponent"),
@@ -5320,9 +5302,6 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
5320
5302
  get locale() {
5321
5303
  return props.locale;
5322
5304
  },
5323
- get includeRefs() {
5324
- return props.includeRefs;
5325
- },
5326
5305
  get enrich() {
5327
5306
  return props.enrich;
5328
5307
  },
@@ -5378,9 +5357,6 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
5378
5357
  enrich: qwik._fnSignal((p0) => p0.enrich, [
5379
5358
  props
5380
5359
  ], "p0.enrich"),
5381
- includeRefs: qwik._fnSignal((p0) => p0.includeRefs, [
5382
- props
5383
- ], "p0.includeRefs"),
5384
5360
  isSsrAbTest: qwik._fnSignal((p0) => p0.shouldRenderVariants, [
5385
5361
  state
5386
5362
  ], "p0.shouldRenderVariants"),
@@ -5434,9 +5410,6 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
5434
5410
  get locale() {
5435
5411
  return props.locale;
5436
5412
  },
5437
- get includeRefs() {
5438
- return props.includeRefs;
5439
- },
5440
5413
  get enrich() {
5441
5414
  return props.enrich;
5442
5415
  },
@@ -5495,9 +5468,6 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
5495
5468
  enrich: qwik._fnSignal((p0) => p0.enrich, [
5496
5469
  props
5497
5470
  ], "p0.enrich"),
5498
- includeRefs: qwik._fnSignal((p0) => p0.includeRefs, [
5499
- props
5500
- ], "p0.includeRefs"),
5501
5471
  isSsrAbTest: qwik._fnSignal((p0) => p0.shouldRenderVariants, [
5502
5472
  state
5503
5473
  ], "p0.shouldRenderVariants"),
@@ -5660,8 +5630,6 @@ const Symbol$1 = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQ
5660
5630
  ], "p0.value")
5661
5631
  }, 0, "Wt_1");
5662
5632
  }, "Symbol_component_WVvggdkUPdk"));
5663
- const RenderBlocks = Blocks;
5664
- const RenderContent = ContentVariants;
5665
5633
  const settings = {};
5666
5634
  function setEditorSettings(newSettings) {
5667
5635
  if (isBrowser()) {
@@ -5700,8 +5668,6 @@ exports.Columns = Columns;
5700
5668
  exports.Content = ContentVariants;
5701
5669
  exports.Fragment = FragmentComponent;
5702
5670
  exports.Image = Image;
5703
- exports.RenderBlocks = RenderBlocks;
5704
- exports.RenderContent = RenderContent;
5705
5671
  exports.Section = SectionComponent;
5706
5672
  exports.Symbol = Symbol$1;
5707
5673
  exports.Text = Text;
@@ -5711,9 +5677,7 @@ exports.createRegisterComponentMessage = createRegisterComponentMessage;
5711
5677
  exports.fetchBuilderProps = fetchBuilderProps;
5712
5678
  exports.fetchEntries = fetchEntries;
5713
5679
  exports.fetchOneEntry = fetchOneEntry;
5714
- exports.getAllContent = getAllContent;
5715
5680
  exports.getBuilderSearchParams = getBuilderSearchParams;
5716
- exports.getContent = getContent;
5717
5681
  exports.isEditing = isEditing;
5718
5682
  exports.isPreviewing = isPreviewing;
5719
5683
  exports.register = register;
@@ -54,10 +54,6 @@ const getClassPropName = () => {
54
54
  };
55
55
  const Button = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
56
56
  return /* @__PURE__ */ _jsxC(DynamicRenderer, {
57
- get TagName() {
58
- return props.link ? props.builderLinkComponent || "a" : "button";
59
- },
60
- actionAttributes: {},
61
57
  attributes: {
62
58
  ...props.attributes,
63
59
  [getClassPropName()]: `${props.link ? "" : "builder-button"} ${props.attributes[getClassPropName()] || ""}`,
@@ -69,6 +65,10 @@ const Button = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =
69
65
  role: "button"
70
66
  }
71
67
  },
68
+ get TagName() {
69
+ return props.link ? props.builderLinkComponent || "a" : "button";
70
+ },
71
+ actionAttributes: {},
72
72
  children: _fnSignal((p0) => p0.text, [
73
73
  props
74
74
  ], "p0.text"),
@@ -3898,7 +3898,6 @@ const getDefaultRegisteredComponents = () => [
3898
3898
  },
3899
3899
  ...getExtraComponents()
3900
3900
  ];
3901
- const components = [];
3902
3901
  const createRegisterComponentMessage = (info) => ({
3903
3902
  type: "builder.registerComponent",
3904
3903
  data: serializeComponentInfo(info)
@@ -4032,17 +4031,23 @@ const getBuilderSearchParamsFromWindow = () => {
4032
4031
  const normalizeSearchParams = (searchParams) => searchParams instanceof URLSearchParams ? convertSearchParamsToQueryObject(searchParams) : searchParams;
4033
4032
  const isPositiveNumber = (thing) => typeof thing === "number" && !isNaN(thing) && thing >= 0;
4034
4033
  const generateContentUrl = (options) => {
4035
- let { noTraverse = false } = options;
4036
- const { limit = 30, userAttributes, query, model, apiKey, includeRefs = true, enrich, locale, apiVersion = DEFAULT_API_VERSION, fields, omit, offset, cacheSeconds, staleCacheSeconds, sort, includeUnpublished } = options;
4034
+ const { limit = 30, userAttributes, query, model, apiKey, enrich, locale, apiVersion = DEFAULT_API_VERSION, fields, omit, offset, cacheSeconds, staleCacheSeconds, sort, includeUnpublished } = options;
4037
4035
  if (!apiKey)
4038
4036
  throw new Error("Missing API key");
4039
4037
  if (![
4040
4038
  "v3"
4041
4039
  ].includes(apiVersion))
4042
4040
  throw new Error(`Invalid apiVersion: expected 'v3', received '${apiVersion}'`);
4043
- if ((options.limit === void 0 || options.limit > 1) && !("noTraverse" in options))
4044
- noTraverse = true;
4045
- const url = new URL(`https://cdn.builder.io/api/${apiVersion}/content/${model}?apiKey=${apiKey}&limit=${limit}&noTraverse=${noTraverse}&includeRefs=${includeRefs}${locale ? `&locale=${locale}` : ""}${enrich ? `&enrich=${enrich}` : ""}`);
4041
+ const noTraverse = limit !== 1;
4042
+ const url = new URL(`https://cdn.builder.io/api/${apiVersion}/content/${model}`);
4043
+ url.searchParams.set("apiKey", apiKey);
4044
+ url.searchParams.set("limit", String(limit));
4045
+ url.searchParams.set("noTraverse", String(noTraverse));
4046
+ url.searchParams.set("includeRefs", String(true));
4047
+ if (locale)
4048
+ url.searchParams.set("locale", locale);
4049
+ if (enrich)
4050
+ url.searchParams.set("enrich", String(enrich));
4046
4051
  url.searchParams.set("omit", omit || "meta.componentsUsed");
4047
4052
  if (fields)
4048
4053
  url.searchParams.set("fields", fields);
@@ -4089,7 +4094,6 @@ async function fetchOneEntry(options) {
4089
4094
  return allContent[0] || null;
4090
4095
  return null;
4091
4096
  }
4092
- const getContent = fetchOneEntry;
4093
4097
  const _fetchContent = async (options) => {
4094
4098
  const url = generateContentUrl(options);
4095
4099
  const res = await fetch$1(url.href);
@@ -4134,7 +4138,6 @@ async function fetchEntries(options) {
4134
4138
  return null;
4135
4139
  }
4136
4140
  }
4137
- const getAllContent = fetchEntries;
4138
4141
  function isPreviewing() {
4139
4142
  if (!isBrowser())
4140
4143
  return false;
@@ -4345,7 +4348,7 @@ function isFromTrustedHost(trustedHosts, e) {
4345
4348
  const url = new URL(e.origin), hostname = url.hostname;
4346
4349
  return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
4347
4350
  }
4348
- const SDK_VERSION = "0.13.4";
4351
+ const SDK_VERSION = "0.14.1";
4349
4352
  const registry = {};
4350
4353
  function register(type, info) {
4351
4354
  let typeList = registry[type];
@@ -4685,9 +4688,6 @@ const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
4685
4688
  ...props2.locale ? {
4686
4689
  locale: props2.locale
4687
4690
  } : {},
4688
- ...props2.includeRefs ? {
4689
- includeRefs: props2.includeRefs
4690
- } : {},
4691
4691
  ...props2.enrich ? {
4692
4692
  enrich: props2.enrich
4693
4693
  } : {},
@@ -4991,12 +4991,6 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
4991
4991
  apiVersion: props.apiVersion,
4992
4992
  componentInfos: [
4993
4993
  ...getDefaultRegisteredComponents(),
4994
- // While this `components` object is deprecated, we must maintain support for it.
4995
- // Since users are able to override our default components, we need to make sure that we do not break such
4996
- // existing usage.
4997
- // This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
4998
- // which is the new standard way of providing custom components, and must therefore take precedence.
4999
- ...components,
5000
4994
  ...props.customComponents || []
5001
4995
  ].reduce((acc, { component: _, ...info }) => ({
5002
4996
  ...acc,
@@ -5008,12 +5002,6 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
5008
5002
  },
5009
5003
  registeredComponents: [
5010
5004
  ...getDefaultRegisteredComponents(),
5011
- // While this `components` object is deprecated, we must maintain support for it.
5012
- // Since users are able to override our default components, we need to make sure that we do not break such
5013
- // existing usage.
5014
- // This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
5015
- // which is the new standard way of providing custom components, and must therefore take precedence.
5016
- ...components,
5017
5005
  ...props.customComponents || []
5018
5006
  ].reduce((acc, { component, ...info }) => ({
5019
5007
  ...acc,
@@ -5056,9 +5044,6 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
5056
5044
  get locale() {
5057
5045
  return props.locale;
5058
5046
  },
5059
- get includeRefs() {
5060
- return props.includeRefs;
5061
- },
5062
5047
  get enrich() {
5063
5048
  return props.enrich;
5064
5049
  },
@@ -5186,9 +5171,6 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
5186
5171
  enrich: _fnSignal((p0) => p0.enrich, [
5187
5172
  props
5188
5173
  ], "p0.enrich"),
5189
- includeRefs: _fnSignal((p0) => p0.includeRefs, [
5190
- props
5191
- ], "p0.includeRefs"),
5192
5174
  linkComponent: _fnSignal((p0) => p0.linkComponent, [
5193
5175
  props
5194
5176
  ], "p0.linkComponent"),
@@ -5318,9 +5300,6 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
5318
5300
  get locale() {
5319
5301
  return props.locale;
5320
5302
  },
5321
- get includeRefs() {
5322
- return props.includeRefs;
5323
- },
5324
5303
  get enrich() {
5325
5304
  return props.enrich;
5326
5305
  },
@@ -5376,9 +5355,6 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
5376
5355
  enrich: _fnSignal((p0) => p0.enrich, [
5377
5356
  props
5378
5357
  ], "p0.enrich"),
5379
- includeRefs: _fnSignal((p0) => p0.includeRefs, [
5380
- props
5381
- ], "p0.includeRefs"),
5382
5358
  isSsrAbTest: _fnSignal((p0) => p0.shouldRenderVariants, [
5383
5359
  state
5384
5360
  ], "p0.shouldRenderVariants"),
@@ -5432,9 +5408,6 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
5432
5408
  get locale() {
5433
5409
  return props.locale;
5434
5410
  },
5435
- get includeRefs() {
5436
- return props.includeRefs;
5437
- },
5438
5411
  get enrich() {
5439
5412
  return props.enrich;
5440
5413
  },
@@ -5493,9 +5466,6 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
5493
5466
  enrich: _fnSignal((p0) => p0.enrich, [
5494
5467
  props
5495
5468
  ], "p0.enrich"),
5496
- includeRefs: _fnSignal((p0) => p0.includeRefs, [
5497
- props
5498
- ], "p0.includeRefs"),
5499
5469
  isSsrAbTest: _fnSignal((p0) => p0.shouldRenderVariants, [
5500
5470
  state
5501
5471
  ], "p0.shouldRenderVariants"),
@@ -5658,8 +5628,6 @@ const Symbol$1 = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props)
5658
5628
  ], "p0.value")
5659
5629
  }, 0, "Wt_1");
5660
5630
  }, "Symbol_component_WVvggdkUPdk"));
5661
- const RenderBlocks = Blocks;
5662
- const RenderContent = ContentVariants;
5663
5631
  const settings = {};
5664
5632
  function setEditorSettings(newSettings) {
5665
5633
  if (isBrowser()) {
@@ -5699,8 +5667,6 @@ export {
5699
5667
  ContentVariants as Content,
5700
5668
  FragmentComponent as Fragment,
5701
5669
  Image,
5702
- RenderBlocks,
5703
- RenderContent,
5704
5670
  SectionComponent as Section,
5705
5671
  Symbol$1 as Symbol,
5706
5672
  Text,
@@ -5710,9 +5676,7 @@ export {
5710
5676
  fetchBuilderProps,
5711
5677
  fetchEntries,
5712
5678
  fetchOneEntry,
5713
- getAllContent,
5714
5679
  getBuilderSearchParams,
5715
- getContent,
5716
5680
  isEditing,
5717
5681
  isPreviewing,
5718
5682
  register,
@@ -56,10 +56,6 @@ const getClassPropName = () => {
56
56
  };
57
57
  const Button = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
58
58
  return /* @__PURE__ */ qwik._jsxC(DynamicRenderer, {
59
- get TagName() {
60
- return props.link ? props.builderLinkComponent || "a" : "button";
61
- },
62
- actionAttributes: {},
63
59
  attributes: {
64
60
  ...props.attributes,
65
61
  [getClassPropName()]: `${props.link ? "" : "builder-button"} ${props.attributes[getClassPropName()] || ""}`,
@@ -71,6 +67,10 @@ const Button = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl
71
67
  role: "button"
72
68
  }
73
69
  },
70
+ get TagName() {
71
+ return props.link ? props.builderLinkComponent || "a" : "button";
72
+ },
73
+ actionAttributes: {},
74
74
  children: qwik._fnSignal((p0) => p0.text, [
75
75
  props
76
76
  ], "p0.text"),
@@ -7131,7 +7131,6 @@ const getDefaultRegisteredComponents = () => [
7131
7131
  },
7132
7132
  ...getExtraComponents()
7133
7133
  ];
7134
- const components = [];
7135
7134
  const createRegisterComponentMessage = (info) => ({
7136
7135
  type: "builder.registerComponent",
7137
7136
  data: serializeComponentInfo(info)
@@ -7265,17 +7264,23 @@ const getBuilderSearchParamsFromWindow = () => {
7265
7264
  const normalizeSearchParams = (searchParams) => searchParams instanceof URLSearchParams ? convertSearchParamsToQueryObject(searchParams) : searchParams;
7266
7265
  const isPositiveNumber = (thing) => typeof thing === "number" && !isNaN(thing) && thing >= 0;
7267
7266
  const generateContentUrl = (options) => {
7268
- let { noTraverse = false } = options;
7269
- const { limit = 30, userAttributes, query, model, apiKey, includeRefs = true, enrich, locale, apiVersion = DEFAULT_API_VERSION, fields, omit, offset, cacheSeconds, staleCacheSeconds, sort, includeUnpublished } = options;
7267
+ const { limit = 30, userAttributes, query, model, apiKey, enrich, locale, apiVersion = DEFAULT_API_VERSION, fields, omit, offset, cacheSeconds, staleCacheSeconds, sort, includeUnpublished } = options;
7270
7268
  if (!apiKey)
7271
7269
  throw new Error("Missing API key");
7272
7270
  if (![
7273
7271
  "v3"
7274
7272
  ].includes(apiVersion))
7275
7273
  throw new Error(`Invalid apiVersion: expected 'v3', received '${apiVersion}'`);
7276
- if ((options.limit === void 0 || options.limit > 1) && !("noTraverse" in options))
7277
- noTraverse = true;
7278
- const url = new URL(`https://cdn.builder.io/api/${apiVersion}/content/${model}?apiKey=${apiKey}&limit=${limit}&noTraverse=${noTraverse}&includeRefs=${includeRefs}${locale ? `&locale=${locale}` : ""}${enrich ? `&enrich=${enrich}` : ""}`);
7274
+ const noTraverse = limit !== 1;
7275
+ const url = new URL(`https://cdn.builder.io/api/${apiVersion}/content/${model}`);
7276
+ url.searchParams.set("apiKey", apiKey);
7277
+ url.searchParams.set("limit", String(limit));
7278
+ url.searchParams.set("noTraverse", String(noTraverse));
7279
+ url.searchParams.set("includeRefs", String(true));
7280
+ if (locale)
7281
+ url.searchParams.set("locale", locale);
7282
+ if (enrich)
7283
+ url.searchParams.set("enrich", String(enrich));
7279
7284
  url.searchParams.set("omit", omit || "meta.componentsUsed");
7280
7285
  if (fields)
7281
7286
  url.searchParams.set("fields", fields);
@@ -7322,7 +7327,6 @@ async function fetchOneEntry(options) {
7322
7327
  return allContent[0] || null;
7323
7328
  return null;
7324
7329
  }
7325
- const getContent = fetchOneEntry;
7326
7330
  const _fetchContent = async (options) => {
7327
7331
  const url = generateContentUrl(options);
7328
7332
  const res = await fetch$1(url.href);
@@ -7367,7 +7371,6 @@ async function fetchEntries(options) {
7367
7371
  return null;
7368
7372
  }
7369
7373
  }
7370
- const getAllContent = fetchEntries;
7371
7374
  function isPreviewing() {
7372
7375
  if (!isBrowser())
7373
7376
  return false;
@@ -7578,7 +7581,7 @@ function isFromTrustedHost(trustedHosts, e) {
7578
7581
  const url = new URL(e.origin), hostname = url.hostname;
7579
7582
  return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
7580
7583
  }
7581
- const SDK_VERSION = "0.13.4";
7584
+ const SDK_VERSION = "0.14.1";
7582
7585
  const registry = {};
7583
7586
  function register(type, info) {
7584
7587
  let typeList = registry[type];
@@ -7918,9 +7921,6 @@ const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
7918
7921
  ...props2.locale ? {
7919
7922
  locale: props2.locale
7920
7923
  } : {},
7921
- ...props2.includeRefs ? {
7922
- includeRefs: props2.includeRefs
7923
- } : {},
7924
7924
  ...props2.enrich ? {
7925
7925
  enrich: props2.enrich
7926
7926
  } : {},
@@ -8224,12 +8224,6 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
8224
8224
  apiVersion: props.apiVersion,
8225
8225
  componentInfos: [
8226
8226
  ...getDefaultRegisteredComponents(),
8227
- // While this `components` object is deprecated, we must maintain support for it.
8228
- // Since users are able to override our default components, we need to make sure that we do not break such
8229
- // existing usage.
8230
- // This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
8231
- // which is the new standard way of providing custom components, and must therefore take precedence.
8232
- ...components,
8233
8227
  ...props.customComponents || []
8234
8228
  ].reduce((acc, { component: _, ...info }) => ({
8235
8229
  ...acc,
@@ -8241,12 +8235,6 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
8241
8235
  },
8242
8236
  registeredComponents: [
8243
8237
  ...getDefaultRegisteredComponents(),
8244
- // While this `components` object is deprecated, we must maintain support for it.
8245
- // Since users are able to override our default components, we need to make sure that we do not break such
8246
- // existing usage.
8247
- // This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
8248
- // which is the new standard way of providing custom components, and must therefore take precedence.
8249
- ...components,
8250
8238
  ...props.customComponents || []
8251
8239
  ].reduce((acc, { component, ...info }) => ({
8252
8240
  ...acc,
@@ -8289,9 +8277,6 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
8289
8277
  get locale() {
8290
8278
  return props.locale;
8291
8279
  },
8292
- get includeRefs() {
8293
- return props.includeRefs;
8294
- },
8295
8280
  get enrich() {
8296
8281
  return props.enrich;
8297
8282
  },
@@ -8419,9 +8404,6 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
8419
8404
  enrich: qwik._fnSignal((p0) => p0.enrich, [
8420
8405
  props
8421
8406
  ], "p0.enrich"),
8422
- includeRefs: qwik._fnSignal((p0) => p0.includeRefs, [
8423
- props
8424
- ], "p0.includeRefs"),
8425
8407
  linkComponent: qwik._fnSignal((p0) => p0.linkComponent, [
8426
8408
  props
8427
8409
  ], "p0.linkComponent"),
@@ -8551,9 +8533,6 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
8551
8533
  get locale() {
8552
8534
  return props.locale;
8553
8535
  },
8554
- get includeRefs() {
8555
- return props.includeRefs;
8556
- },
8557
8536
  get enrich() {
8558
8537
  return props.enrich;
8559
8538
  },
@@ -8609,9 +8588,6 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
8609
8588
  enrich: qwik._fnSignal((p0) => p0.enrich, [
8610
8589
  props
8611
8590
  ], "p0.enrich"),
8612
- includeRefs: qwik._fnSignal((p0) => p0.includeRefs, [
8613
- props
8614
- ], "p0.includeRefs"),
8615
8591
  isSsrAbTest: qwik._fnSignal((p0) => p0.shouldRenderVariants, [
8616
8592
  state
8617
8593
  ], "p0.shouldRenderVariants"),
@@ -8665,9 +8641,6 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
8665
8641
  get locale() {
8666
8642
  return props.locale;
8667
8643
  },
8668
- get includeRefs() {
8669
- return props.includeRefs;
8670
- },
8671
8644
  get enrich() {
8672
8645
  return props.enrich;
8673
8646
  },
@@ -8726,9 +8699,6 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
8726
8699
  enrich: qwik._fnSignal((p0) => p0.enrich, [
8727
8700
  props
8728
8701
  ], "p0.enrich"),
8729
- includeRefs: qwik._fnSignal((p0) => p0.includeRefs, [
8730
- props
8731
- ], "p0.includeRefs"),
8732
8702
  isSsrAbTest: qwik._fnSignal((p0) => p0.shouldRenderVariants, [
8733
8703
  state
8734
8704
  ], "p0.shouldRenderVariants"),
@@ -8891,8 +8861,6 @@ const Symbol$1 = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQ
8891
8861
  ], "p0.value")
8892
8862
  }, 0, "Wt_1");
8893
8863
  }, "Symbol_component_WVvggdkUPdk"));
8894
- const RenderBlocks = Blocks;
8895
- const RenderContent = ContentVariants;
8896
8864
  const settings = {};
8897
8865
  function setEditorSettings(newSettings) {
8898
8866
  if (isBrowser()) {
@@ -8931,8 +8899,6 @@ exports.Columns = Columns;
8931
8899
  exports.Content = ContentVariants;
8932
8900
  exports.Fragment = FragmentComponent;
8933
8901
  exports.Image = Image;
8934
- exports.RenderBlocks = RenderBlocks;
8935
- exports.RenderContent = RenderContent;
8936
8902
  exports.Section = SectionComponent;
8937
8903
  exports.Symbol = Symbol$1;
8938
8904
  exports.Text = Text;
@@ -8942,9 +8908,7 @@ exports.createRegisterComponentMessage = createRegisterComponentMessage;
8942
8908
  exports.fetchBuilderProps = fetchBuilderProps;
8943
8909
  exports.fetchEntries = fetchEntries;
8944
8910
  exports.fetchOneEntry = fetchOneEntry;
8945
- exports.getAllContent = getAllContent;
8946
8911
  exports.getBuilderSearchParams = getBuilderSearchParams;
8947
- exports.getContent = getContent;
8948
8912
  exports.isEditing = isEditing;
8949
8913
  exports.isPreviewing = isPreviewing;
8950
8914
  exports.register = register;