@builder.io/sdk-solid 0.13.4 → 0.14.0

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.
@@ -3513,7 +3513,6 @@ var getDefaultRegisteredComponents = () => [{
3513
3513
  }, ...getExtraComponents()];
3514
3514
 
3515
3515
  // src/functions/register-component.ts
3516
- var components = [];
3517
3516
  var createRegisterComponentMessage = (info) => ({
3518
3517
  type: "builder.registerComponent",
3519
3518
  data: serializeComponentInfo(info)
@@ -3678,16 +3677,12 @@ var normalizeSearchParams = (searchParams) => searchParams instanceof URLSearchP
3678
3677
  // src/functions/get-content/generate-content-url.ts
3679
3678
  var isPositiveNumber = (thing) => typeof thing === "number" && !isNaN(thing) && thing >= 0;
3680
3679
  var generateContentUrl = (options) => {
3681
- let {
3682
- noTraverse = false
3683
- } = options;
3684
3680
  const {
3685
3681
  limit = 30,
3686
3682
  userAttributes,
3687
3683
  query,
3688
3684
  model,
3689
3685
  apiKey,
3690
- includeRefs = true,
3691
3686
  enrich,
3692
3687
  locale,
3693
3688
  apiVersion = DEFAULT_API_VERSION,
@@ -3705,10 +3700,16 @@ var generateContentUrl = (options) => {
3705
3700
  if (!["v3"].includes(apiVersion)) {
3706
3701
  throw new Error(`Invalid apiVersion: expected 'v3', received '${apiVersion}'`);
3707
3702
  }
3708
- if ((options.limit === void 0 || options.limit > 1) && !("noTraverse" in options)) {
3709
- noTraverse = true;
3710
- }
3711
- 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}` : ""}`);
3703
+ const noTraverse = limit !== 1;
3704
+ const url = new URL(`https://cdn.builder.io/api/${apiVersion}/content/${model}`);
3705
+ url.searchParams.set("apiKey", apiKey);
3706
+ url.searchParams.set("limit", String(limit));
3707
+ url.searchParams.set("noTraverse", String(noTraverse));
3708
+ url.searchParams.set("includeRefs", String(true));
3709
+ if (locale)
3710
+ url.searchParams.set("locale", locale);
3711
+ if (enrich)
3712
+ url.searchParams.set("enrich", String(enrich));
3712
3713
  url.searchParams.set("omit", omit || "meta.componentsUsed");
3713
3714
  if (fields) {
3714
3715
  url.searchParams.set("fields", fields);
@@ -3767,7 +3768,6 @@ async function fetchOneEntry(options) {
3767
3768
  }
3768
3769
  return null;
3769
3770
  }
3770
- var getContent = fetchOneEntry;
3771
3771
  var _fetchContent = async (options) => {
3772
3772
  const url = generateContentUrl(options);
3773
3773
  const res = await fetch2(url.href);
@@ -3821,7 +3821,6 @@ async function fetchEntries(options) {
3821
3821
  return null;
3822
3822
  }
3823
3823
  }
3824
- var getAllContent = fetchEntries;
3825
3824
 
3826
3825
  // src/functions/is-previewing.ts
3827
3826
  function isPreviewing() {
@@ -4078,7 +4077,7 @@ function isFromTrustedHost(trustedHosts, e) {
4078
4077
  }
4079
4078
 
4080
4079
  // src/constants/sdk-version.ts
4081
- var SDK_VERSION = "0.13.4";
4080
+ var SDK_VERSION = "0.14.0";
4082
4081
 
4083
4082
  // src/functions/register.ts
4084
4083
  var registry = {};
@@ -4440,9 +4439,6 @@ function EnableEditor(props) {
4440
4439
  ...props.locale ? {
4441
4440
  locale: props.locale
4442
4441
  } : {},
4443
- ...props.includeRefs ? {
4444
- includeRefs: props.includeRefs
4445
- } : {},
4446
4442
  ...props.enrich ? {
4447
4443
  enrich: props.enrich
4448
4444
  } : {},
@@ -4707,12 +4703,6 @@ function ContentComponent(props) {
4707
4703
  const [registeredComponents, setRegisteredComponents] = createSignal13(
4708
4704
  [
4709
4705
  ...getDefaultRegisteredComponents(),
4710
- // While this `components` object is deprecated, we must maintain support for it.
4711
- // Since users are able to override our default components, we need to make sure that we do not break such
4712
- // existing usage.
4713
- // This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
4714
- // which is the new standard way of providing custom components, and must therefore take precedence.
4715
- ...components,
4716
4706
  ...props.customComponents || []
4717
4707
  ].reduce(
4718
4708
  (acc, { component, ...info }) => ({
@@ -4742,12 +4732,6 @@ function ContentComponent(props) {
4742
4732
  apiVersion: props.apiVersion,
4743
4733
  componentInfos: [
4744
4734
  ...getDefaultRegisteredComponents(),
4745
- // While this `components` object is deprecated, we must maintain support for it.
4746
- // Since users are able to override our default components, we need to make sure that we do not break such
4747
- // existing usage.
4748
- // This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
4749
- // which is the new standard way of providing custom components, and must therefore take precedence.
4750
- ...components,
4751
4735
  ...props.customComponents || []
4752
4736
  ].reduce(
4753
4737
  (acc, { component: _, ...info }) => ({
@@ -4778,7 +4762,6 @@ function ContentComponent(props) {
4778
4762
  apiKey={props.apiKey}
4779
4763
  canTrack={props.canTrack}
4780
4764
  locale={props.locale}
4781
- includeRefs={props.includeRefs}
4782
4765
  enrich={props.enrich}
4783
4766
  showContent={props.showContent}
4784
4767
  builderContextSignal={builderContextSignal()}
@@ -4863,7 +4846,6 @@ function ContentVariants(props) {
4863
4846
  linkComponent={props.linkComponent}
4864
4847
  canTrack={props.canTrack}
4865
4848
  locale={props.locale}
4866
- includeRefs={props.includeRefs}
4867
4849
  enrich={props.enrich}
4868
4850
  isSsrAbTest={shouldRenderVariants()}
4869
4851
  blocksWrapper={props.blocksWrapper}
@@ -4887,7 +4869,6 @@ function ContentVariants(props) {
4887
4869
  linkComponent={props.linkComponent}
4888
4870
  canTrack={props.canTrack}
4889
4871
  locale={props.locale}
4890
- includeRefs={props.includeRefs}
4891
4872
  enrich={props.enrich}
4892
4873
  isSsrAbTest={shouldRenderVariants()}
4893
4874
  blocksWrapper={props.blocksWrapper}
@@ -4975,10 +4956,6 @@ function Symbol(props) {
4975
4956
  }
4976
4957
  var symbol_default = Symbol;
4977
4958
 
4978
- // src/index-helpers/blocks-exports.ts
4979
- var RenderBlocks = Blocks_default;
4980
- var RenderContent = Content_variants_default;
4981
-
4982
4959
  // src/functions/set-editor-settings.ts
4983
4960
  var settings = {};
4984
4961
  function setEditorSettings(newSettings) {
@@ -5020,8 +4997,6 @@ export {
5020
4997
  Content_variants_default as Content,
5021
4998
  fragment_default as Fragment,
5022
4999
  image_default as Image,
5023
- RenderBlocks,
5024
- RenderContent,
5025
5000
  section_default as Section,
5026
5001
  symbol_default as Symbol,
5027
5002
  text_default as Text,
@@ -5031,9 +5006,7 @@ export {
5031
5006
  fetchBuilderProps,
5032
5007
  fetchEntries,
5033
5008
  fetchOneEntry,
5034
- getAllContent,
5035
5009
  getBuilderSearchParams,
5036
- getContent,
5037
5010
  isEditing,
5038
5011
  isPreviewing,
5039
5012
  register,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builder.io/sdk-solid",
3
- "version": "0.13.4",
3
+ "version": "0.14.0",
4
4
  "description": "",
5
5
  "files": [
6
6
  "dist",