@builder.io/sdk-qwik 0.13.3 → 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.
- package/lib/browser/index.qwik.cjs +13 -49
- package/lib/browser/index.qwik.mjs +13 -49
- package/lib/edge/index.qwik.cjs +13 -49
- package/lib/edge/index.qwik.mjs +13 -49
- package/lib/node/index.qwik.cjs +13 -49
- package/lib/node/index.qwik.mjs +13 -49
- package/package.json +1 -1
- package/types/src/components/content-variants/content-variants.types.d.ts +0 -2
- package/types/src/constants/sdk-version.d.ts +1 -1
- package/types/src/functions/get-content/index.d.ts +0 -10
- package/types/src/functions/get-content/types.d.ts +0 -11
- package/types/src/functions/register-component.d.ts +0 -9
- package/types/src/index-helpers/blocks-exports.d.ts +0 -10
- package/types/src/server-index.d.ts +1 -1
|
@@ -3619,7 +3619,7 @@ const componentInfo = {
|
|
|
3619
3619
|
"mp4"
|
|
3620
3620
|
],
|
|
3621
3621
|
bubble: true,
|
|
3622
|
-
defaultValue: "https://
|
|
3622
|
+
defaultValue: "https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",
|
|
3623
3623
|
required: true
|
|
3624
3624
|
},
|
|
3625
3625
|
{
|
|
@@ -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
|
-
|
|
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
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
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.
|
|
4353
|
+
const SDK_VERSION = "0.14.0";
|
|
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;
|
|
@@ -3617,7 +3617,7 @@ const componentInfo = {
|
|
|
3617
3617
|
"mp4"
|
|
3618
3618
|
],
|
|
3619
3619
|
bubble: true,
|
|
3620
|
-
defaultValue: "https://
|
|
3620
|
+
defaultValue: "https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",
|
|
3621
3621
|
required: true
|
|
3622
3622
|
},
|
|
3623
3623
|
{
|
|
@@ -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
|
-
|
|
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
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
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.
|
|
4351
|
+
const SDK_VERSION = "0.14.0";
|
|
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,
|
package/lib/edge/index.qwik.cjs
CHANGED
|
@@ -6850,7 +6850,7 @@ const componentInfo = {
|
|
|
6850
6850
|
"mp4"
|
|
6851
6851
|
],
|
|
6852
6852
|
bubble: true,
|
|
6853
|
-
defaultValue: "https://
|
|
6853
|
+
defaultValue: "https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",
|
|
6854
6854
|
required: true
|
|
6855
6855
|
},
|
|
6856
6856
|
{
|
|
@@ -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
|
-
|
|
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
|
-
|
|
7277
|
-
|
|
7278
|
-
|
|
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.
|
|
7584
|
+
const SDK_VERSION = "0.14.0";
|
|
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;
|
package/lib/edge/index.qwik.mjs
CHANGED
|
@@ -6848,7 +6848,7 @@ const componentInfo = {
|
|
|
6848
6848
|
"mp4"
|
|
6849
6849
|
],
|
|
6850
6850
|
bubble: true,
|
|
6851
|
-
defaultValue: "https://
|
|
6851
|
+
defaultValue: "https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",
|
|
6852
6852
|
required: true
|
|
6853
6853
|
},
|
|
6854
6854
|
{
|
|
@@ -7129,7 +7129,6 @@ const getDefaultRegisteredComponents = () => [
|
|
|
7129
7129
|
},
|
|
7130
7130
|
...getExtraComponents()
|
|
7131
7131
|
];
|
|
7132
|
-
const components = [];
|
|
7133
7132
|
const createRegisterComponentMessage = (info) => ({
|
|
7134
7133
|
type: "builder.registerComponent",
|
|
7135
7134
|
data: serializeComponentInfo(info)
|
|
@@ -7263,17 +7262,23 @@ const getBuilderSearchParamsFromWindow = () => {
|
|
|
7263
7262
|
const normalizeSearchParams = (searchParams) => searchParams instanceof URLSearchParams ? convertSearchParamsToQueryObject(searchParams) : searchParams;
|
|
7264
7263
|
const isPositiveNumber = (thing) => typeof thing === "number" && !isNaN(thing) && thing >= 0;
|
|
7265
7264
|
const generateContentUrl = (options) => {
|
|
7266
|
-
|
|
7267
|
-
const { limit = 30, userAttributes, query, model, apiKey, includeRefs = true, enrich, locale, apiVersion = DEFAULT_API_VERSION, fields, omit, offset, cacheSeconds, staleCacheSeconds, sort, includeUnpublished } = options;
|
|
7265
|
+
const { limit = 30, userAttributes, query, model, apiKey, enrich, locale, apiVersion = DEFAULT_API_VERSION, fields, omit, offset, cacheSeconds, staleCacheSeconds, sort, includeUnpublished } = options;
|
|
7268
7266
|
if (!apiKey)
|
|
7269
7267
|
throw new Error("Missing API key");
|
|
7270
7268
|
if (![
|
|
7271
7269
|
"v3"
|
|
7272
7270
|
].includes(apiVersion))
|
|
7273
7271
|
throw new Error(`Invalid apiVersion: expected 'v3', received '${apiVersion}'`);
|
|
7274
|
-
|
|
7275
|
-
|
|
7276
|
-
|
|
7272
|
+
const noTraverse = limit !== 1;
|
|
7273
|
+
const url = new URL(`https://cdn.builder.io/api/${apiVersion}/content/${model}`);
|
|
7274
|
+
url.searchParams.set("apiKey", apiKey);
|
|
7275
|
+
url.searchParams.set("limit", String(limit));
|
|
7276
|
+
url.searchParams.set("noTraverse", String(noTraverse));
|
|
7277
|
+
url.searchParams.set("includeRefs", String(true));
|
|
7278
|
+
if (locale)
|
|
7279
|
+
url.searchParams.set("locale", locale);
|
|
7280
|
+
if (enrich)
|
|
7281
|
+
url.searchParams.set("enrich", String(enrich));
|
|
7277
7282
|
url.searchParams.set("omit", omit || "meta.componentsUsed");
|
|
7278
7283
|
if (fields)
|
|
7279
7284
|
url.searchParams.set("fields", fields);
|
|
@@ -7320,7 +7325,6 @@ async function fetchOneEntry(options) {
|
|
|
7320
7325
|
return allContent[0] || null;
|
|
7321
7326
|
return null;
|
|
7322
7327
|
}
|
|
7323
|
-
const getContent = fetchOneEntry;
|
|
7324
7328
|
const _fetchContent = async (options) => {
|
|
7325
7329
|
const url = generateContentUrl(options);
|
|
7326
7330
|
const res = await fetch$1(url.href);
|
|
@@ -7365,7 +7369,6 @@ async function fetchEntries(options) {
|
|
|
7365
7369
|
return null;
|
|
7366
7370
|
}
|
|
7367
7371
|
}
|
|
7368
|
-
const getAllContent = fetchEntries;
|
|
7369
7372
|
function isPreviewing() {
|
|
7370
7373
|
if (!isBrowser())
|
|
7371
7374
|
return false;
|
|
@@ -7576,7 +7579,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
7576
7579
|
const url = new URL(e.origin), hostname = url.hostname;
|
|
7577
7580
|
return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
|
|
7578
7581
|
}
|
|
7579
|
-
const SDK_VERSION = "0.
|
|
7582
|
+
const SDK_VERSION = "0.14.0";
|
|
7580
7583
|
const registry = {};
|
|
7581
7584
|
function register(type, info) {
|
|
7582
7585
|
let typeList = registry[type];
|
|
@@ -7916,9 +7919,6 @@ const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
|
|
|
7916
7919
|
...props2.locale ? {
|
|
7917
7920
|
locale: props2.locale
|
|
7918
7921
|
} : {},
|
|
7919
|
-
...props2.includeRefs ? {
|
|
7920
|
-
includeRefs: props2.includeRefs
|
|
7921
|
-
} : {},
|
|
7922
7922
|
...props2.enrich ? {
|
|
7923
7923
|
enrich: props2.enrich
|
|
7924
7924
|
} : {},
|
|
@@ -8222,12 +8222,6 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
|
|
|
8222
8222
|
apiVersion: props.apiVersion,
|
|
8223
8223
|
componentInfos: [
|
|
8224
8224
|
...getDefaultRegisteredComponents(),
|
|
8225
|
-
// While this `components` object is deprecated, we must maintain support for it.
|
|
8226
|
-
// Since users are able to override our default components, we need to make sure that we do not break such
|
|
8227
|
-
// existing usage.
|
|
8228
|
-
// This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
|
|
8229
|
-
// which is the new standard way of providing custom components, and must therefore take precedence.
|
|
8230
|
-
...components,
|
|
8231
8225
|
...props.customComponents || []
|
|
8232
8226
|
].reduce((acc, { component: _, ...info }) => ({
|
|
8233
8227
|
...acc,
|
|
@@ -8239,12 +8233,6 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
|
|
|
8239
8233
|
},
|
|
8240
8234
|
registeredComponents: [
|
|
8241
8235
|
...getDefaultRegisteredComponents(),
|
|
8242
|
-
// While this `components` object is deprecated, we must maintain support for it.
|
|
8243
|
-
// Since users are able to override our default components, we need to make sure that we do not break such
|
|
8244
|
-
// existing usage.
|
|
8245
|
-
// This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
|
|
8246
|
-
// which is the new standard way of providing custom components, and must therefore take precedence.
|
|
8247
|
-
...components,
|
|
8248
8236
|
...props.customComponents || []
|
|
8249
8237
|
].reduce((acc, { component, ...info }) => ({
|
|
8250
8238
|
...acc,
|
|
@@ -8287,9 +8275,6 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
|
|
|
8287
8275
|
get locale() {
|
|
8288
8276
|
return props.locale;
|
|
8289
8277
|
},
|
|
8290
|
-
get includeRefs() {
|
|
8291
|
-
return props.includeRefs;
|
|
8292
|
-
},
|
|
8293
8278
|
get enrich() {
|
|
8294
8279
|
return props.enrich;
|
|
8295
8280
|
},
|
|
@@ -8417,9 +8402,6 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
|
|
|
8417
8402
|
enrich: _fnSignal((p0) => p0.enrich, [
|
|
8418
8403
|
props
|
|
8419
8404
|
], "p0.enrich"),
|
|
8420
|
-
includeRefs: _fnSignal((p0) => p0.includeRefs, [
|
|
8421
|
-
props
|
|
8422
|
-
], "p0.includeRefs"),
|
|
8423
8405
|
linkComponent: _fnSignal((p0) => p0.linkComponent, [
|
|
8424
8406
|
props
|
|
8425
8407
|
], "p0.linkComponent"),
|
|
@@ -8549,9 +8531,6 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
8549
8531
|
get locale() {
|
|
8550
8532
|
return props.locale;
|
|
8551
8533
|
},
|
|
8552
|
-
get includeRefs() {
|
|
8553
|
-
return props.includeRefs;
|
|
8554
|
-
},
|
|
8555
8534
|
get enrich() {
|
|
8556
8535
|
return props.enrich;
|
|
8557
8536
|
},
|
|
@@ -8607,9 +8586,6 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
8607
8586
|
enrich: _fnSignal((p0) => p0.enrich, [
|
|
8608
8587
|
props
|
|
8609
8588
|
], "p0.enrich"),
|
|
8610
|
-
includeRefs: _fnSignal((p0) => p0.includeRefs, [
|
|
8611
|
-
props
|
|
8612
|
-
], "p0.includeRefs"),
|
|
8613
8589
|
isSsrAbTest: _fnSignal((p0) => p0.shouldRenderVariants, [
|
|
8614
8590
|
state
|
|
8615
8591
|
], "p0.shouldRenderVariants"),
|
|
@@ -8663,9 +8639,6 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
8663
8639
|
get locale() {
|
|
8664
8640
|
return props.locale;
|
|
8665
8641
|
},
|
|
8666
|
-
get includeRefs() {
|
|
8667
|
-
return props.includeRefs;
|
|
8668
|
-
},
|
|
8669
8642
|
get enrich() {
|
|
8670
8643
|
return props.enrich;
|
|
8671
8644
|
},
|
|
@@ -8724,9 +8697,6 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
8724
8697
|
enrich: _fnSignal((p0) => p0.enrich, [
|
|
8725
8698
|
props
|
|
8726
8699
|
], "p0.enrich"),
|
|
8727
|
-
includeRefs: _fnSignal((p0) => p0.includeRefs, [
|
|
8728
|
-
props
|
|
8729
|
-
], "p0.includeRefs"),
|
|
8730
8700
|
isSsrAbTest: _fnSignal((p0) => p0.shouldRenderVariants, [
|
|
8731
8701
|
state
|
|
8732
8702
|
], "p0.shouldRenderVariants"),
|
|
@@ -8889,8 +8859,6 @@ const Symbol$1 = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props)
|
|
|
8889
8859
|
], "p0.value")
|
|
8890
8860
|
}, 0, "Wt_1");
|
|
8891
8861
|
}, "Symbol_component_WVvggdkUPdk"));
|
|
8892
|
-
const RenderBlocks = Blocks;
|
|
8893
|
-
const RenderContent = ContentVariants;
|
|
8894
8862
|
const settings = {};
|
|
8895
8863
|
function setEditorSettings(newSettings) {
|
|
8896
8864
|
if (isBrowser()) {
|
|
@@ -8930,8 +8898,6 @@ export {
|
|
|
8930
8898
|
ContentVariants as Content,
|
|
8931
8899
|
FragmentComponent as Fragment,
|
|
8932
8900
|
Image,
|
|
8933
|
-
RenderBlocks,
|
|
8934
|
-
RenderContent,
|
|
8935
8901
|
SectionComponent as Section,
|
|
8936
8902
|
Symbol$1 as Symbol,
|
|
8937
8903
|
Text,
|
|
@@ -8941,9 +8907,7 @@ export {
|
|
|
8941
8907
|
fetchBuilderProps,
|
|
8942
8908
|
fetchEntries,
|
|
8943
8909
|
fetchOneEntry,
|
|
8944
|
-
getAllContent,
|
|
8945
8910
|
getBuilderSearchParams,
|
|
8946
|
-
getContent,
|
|
8947
8911
|
isEditing,
|
|
8948
8912
|
isPreviewing,
|
|
8949
8913
|
register,
|
package/lib/node/index.qwik.cjs
CHANGED
|
@@ -3720,7 +3720,7 @@ const componentInfo = {
|
|
|
3720
3720
|
"mp4"
|
|
3721
3721
|
],
|
|
3722
3722
|
bubble: true,
|
|
3723
|
-
defaultValue: "https://
|
|
3723
|
+
defaultValue: "https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",
|
|
3724
3724
|
required: true
|
|
3725
3725
|
},
|
|
3726
3726
|
{
|
|
@@ -4001,7 +4001,6 @@ const getDefaultRegisteredComponents = () => [
|
|
|
4001
4001
|
},
|
|
4002
4002
|
...getExtraComponents()
|
|
4003
4003
|
];
|
|
4004
|
-
const components = [];
|
|
4005
4004
|
const createRegisterComponentMessage = (info) => ({
|
|
4006
4005
|
type: "builder.registerComponent",
|
|
4007
4006
|
data: serializeComponentInfo(info)
|
|
@@ -4135,17 +4134,23 @@ const getBuilderSearchParamsFromWindow = () => {
|
|
|
4135
4134
|
const normalizeSearchParams = (searchParams) => searchParams instanceof URLSearchParams ? convertSearchParamsToQueryObject(searchParams) : searchParams;
|
|
4136
4135
|
const isPositiveNumber = (thing) => typeof thing === "number" && !isNaN(thing) && thing >= 0;
|
|
4137
4136
|
const generateContentUrl = (options) => {
|
|
4138
|
-
|
|
4139
|
-
const { limit = 30, userAttributes, query, model, apiKey, includeRefs = true, enrich, locale, apiVersion = DEFAULT_API_VERSION, fields, omit, offset, cacheSeconds, staleCacheSeconds, sort, includeUnpublished } = options;
|
|
4137
|
+
const { limit = 30, userAttributes, query, model, apiKey, enrich, locale, apiVersion = DEFAULT_API_VERSION, fields, omit, offset, cacheSeconds, staleCacheSeconds, sort, includeUnpublished } = options;
|
|
4140
4138
|
if (!apiKey)
|
|
4141
4139
|
throw new Error("Missing API key");
|
|
4142
4140
|
if (![
|
|
4143
4141
|
"v3"
|
|
4144
4142
|
].includes(apiVersion))
|
|
4145
4143
|
throw new Error(`Invalid apiVersion: expected 'v3', received '${apiVersion}'`);
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4144
|
+
const noTraverse = limit !== 1;
|
|
4145
|
+
const url = new URL(`https://cdn.builder.io/api/${apiVersion}/content/${model}`);
|
|
4146
|
+
url.searchParams.set("apiKey", apiKey);
|
|
4147
|
+
url.searchParams.set("limit", String(limit));
|
|
4148
|
+
url.searchParams.set("noTraverse", String(noTraverse));
|
|
4149
|
+
url.searchParams.set("includeRefs", String(true));
|
|
4150
|
+
if (locale)
|
|
4151
|
+
url.searchParams.set("locale", locale);
|
|
4152
|
+
if (enrich)
|
|
4153
|
+
url.searchParams.set("enrich", String(enrich));
|
|
4149
4154
|
url.searchParams.set("omit", omit || "meta.componentsUsed");
|
|
4150
4155
|
if (fields)
|
|
4151
4156
|
url.searchParams.set("fields", fields);
|
|
@@ -4192,7 +4197,6 @@ async function fetchOneEntry(options) {
|
|
|
4192
4197
|
return allContent[0] || null;
|
|
4193
4198
|
return null;
|
|
4194
4199
|
}
|
|
4195
|
-
const getContent = fetchOneEntry;
|
|
4196
4200
|
const _fetchContent = async (options) => {
|
|
4197
4201
|
const url = generateContentUrl(options);
|
|
4198
4202
|
const res = await fetch$1(url.href);
|
|
@@ -4237,7 +4241,6 @@ async function fetchEntries(options) {
|
|
|
4237
4241
|
return null;
|
|
4238
4242
|
}
|
|
4239
4243
|
}
|
|
4240
|
-
const getAllContent = fetchEntries;
|
|
4241
4244
|
function isPreviewing() {
|
|
4242
4245
|
if (!isBrowser())
|
|
4243
4246
|
return false;
|
|
@@ -4448,7 +4451,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
4448
4451
|
const url = new URL(e.origin), hostname = url.hostname;
|
|
4449
4452
|
return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
|
|
4450
4453
|
}
|
|
4451
|
-
const SDK_VERSION = "0.
|
|
4454
|
+
const SDK_VERSION = "0.14.0";
|
|
4452
4455
|
const registry = {};
|
|
4453
4456
|
function register(type, info) {
|
|
4454
4457
|
let typeList = registry[type];
|
|
@@ -4788,9 +4791,6 @@ const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
|
|
|
4788
4791
|
...props2.locale ? {
|
|
4789
4792
|
locale: props2.locale
|
|
4790
4793
|
} : {},
|
|
4791
|
-
...props2.includeRefs ? {
|
|
4792
|
-
includeRefs: props2.includeRefs
|
|
4793
|
-
} : {},
|
|
4794
4794
|
...props2.enrich ? {
|
|
4795
4795
|
enrich: props2.enrich
|
|
4796
4796
|
} : {},
|
|
@@ -5094,12 +5094,6 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
|
|
|
5094
5094
|
apiVersion: props.apiVersion,
|
|
5095
5095
|
componentInfos: [
|
|
5096
5096
|
...getDefaultRegisteredComponents(),
|
|
5097
|
-
// While this `components` object is deprecated, we must maintain support for it.
|
|
5098
|
-
// Since users are able to override our default components, we need to make sure that we do not break such
|
|
5099
|
-
// existing usage.
|
|
5100
|
-
// This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
|
|
5101
|
-
// which is the new standard way of providing custom components, and must therefore take precedence.
|
|
5102
|
-
...components,
|
|
5103
5097
|
...props.customComponents || []
|
|
5104
5098
|
].reduce((acc, { component: _, ...info }) => ({
|
|
5105
5099
|
...acc,
|
|
@@ -5111,12 +5105,6 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
|
|
|
5111
5105
|
},
|
|
5112
5106
|
registeredComponents: [
|
|
5113
5107
|
...getDefaultRegisteredComponents(),
|
|
5114
|
-
// While this `components` object is deprecated, we must maintain support for it.
|
|
5115
|
-
// Since users are able to override our default components, we need to make sure that we do not break such
|
|
5116
|
-
// existing usage.
|
|
5117
|
-
// This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
|
|
5118
|
-
// which is the new standard way of providing custom components, and must therefore take precedence.
|
|
5119
|
-
...components,
|
|
5120
5108
|
...props.customComponents || []
|
|
5121
5109
|
].reduce((acc, { component, ...info }) => ({
|
|
5122
5110
|
...acc,
|
|
@@ -5159,9 +5147,6 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
|
|
|
5159
5147
|
get locale() {
|
|
5160
5148
|
return props.locale;
|
|
5161
5149
|
},
|
|
5162
|
-
get includeRefs() {
|
|
5163
|
-
return props.includeRefs;
|
|
5164
|
-
},
|
|
5165
5150
|
get enrich() {
|
|
5166
5151
|
return props.enrich;
|
|
5167
5152
|
},
|
|
@@ -5289,9 +5274,6 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
|
|
|
5289
5274
|
enrich: qwik._fnSignal((p0) => p0.enrich, [
|
|
5290
5275
|
props
|
|
5291
5276
|
], "p0.enrich"),
|
|
5292
|
-
includeRefs: qwik._fnSignal((p0) => p0.includeRefs, [
|
|
5293
|
-
props
|
|
5294
|
-
], "p0.includeRefs"),
|
|
5295
5277
|
linkComponent: qwik._fnSignal((p0) => p0.linkComponent, [
|
|
5296
5278
|
props
|
|
5297
5279
|
], "p0.linkComponent"),
|
|
@@ -5421,9 +5403,6 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
5421
5403
|
get locale() {
|
|
5422
5404
|
return props.locale;
|
|
5423
5405
|
},
|
|
5424
|
-
get includeRefs() {
|
|
5425
|
-
return props.includeRefs;
|
|
5426
|
-
},
|
|
5427
5406
|
get enrich() {
|
|
5428
5407
|
return props.enrich;
|
|
5429
5408
|
},
|
|
@@ -5479,9 +5458,6 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
5479
5458
|
enrich: qwik._fnSignal((p0) => p0.enrich, [
|
|
5480
5459
|
props
|
|
5481
5460
|
], "p0.enrich"),
|
|
5482
|
-
includeRefs: qwik._fnSignal((p0) => p0.includeRefs, [
|
|
5483
|
-
props
|
|
5484
|
-
], "p0.includeRefs"),
|
|
5485
5461
|
isSsrAbTest: qwik._fnSignal((p0) => p0.shouldRenderVariants, [
|
|
5486
5462
|
state
|
|
5487
5463
|
], "p0.shouldRenderVariants"),
|
|
@@ -5535,9 +5511,6 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
5535
5511
|
get locale() {
|
|
5536
5512
|
return props.locale;
|
|
5537
5513
|
},
|
|
5538
|
-
get includeRefs() {
|
|
5539
|
-
return props.includeRefs;
|
|
5540
|
-
},
|
|
5541
5514
|
get enrich() {
|
|
5542
5515
|
return props.enrich;
|
|
5543
5516
|
},
|
|
@@ -5596,9 +5569,6 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
5596
5569
|
enrich: qwik._fnSignal((p0) => p0.enrich, [
|
|
5597
5570
|
props
|
|
5598
5571
|
], "p0.enrich"),
|
|
5599
|
-
includeRefs: qwik._fnSignal((p0) => p0.includeRefs, [
|
|
5600
|
-
props
|
|
5601
|
-
], "p0.includeRefs"),
|
|
5602
5572
|
isSsrAbTest: qwik._fnSignal((p0) => p0.shouldRenderVariants, [
|
|
5603
5573
|
state
|
|
5604
5574
|
], "p0.shouldRenderVariants"),
|
|
@@ -5761,8 +5731,6 @@ const Symbol$1 = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQ
|
|
|
5761
5731
|
], "p0.value")
|
|
5762
5732
|
}, 0, "Wt_1");
|
|
5763
5733
|
}, "Symbol_component_WVvggdkUPdk"));
|
|
5764
|
-
const RenderBlocks = Blocks;
|
|
5765
|
-
const RenderContent = ContentVariants;
|
|
5766
5734
|
const settings = {};
|
|
5767
5735
|
function setEditorSettings(newSettings) {
|
|
5768
5736
|
if (isBrowser()) {
|
|
@@ -5801,8 +5769,6 @@ exports.Columns = Columns;
|
|
|
5801
5769
|
exports.Content = ContentVariants;
|
|
5802
5770
|
exports.Fragment = FragmentComponent;
|
|
5803
5771
|
exports.Image = Image;
|
|
5804
|
-
exports.RenderBlocks = RenderBlocks;
|
|
5805
|
-
exports.RenderContent = RenderContent;
|
|
5806
5772
|
exports.Section = SectionComponent;
|
|
5807
5773
|
exports.Symbol = Symbol$1;
|
|
5808
5774
|
exports.Text = Text;
|
|
@@ -5812,9 +5778,7 @@ exports.createRegisterComponentMessage = createRegisterComponentMessage;
|
|
|
5812
5778
|
exports.fetchBuilderProps = fetchBuilderProps;
|
|
5813
5779
|
exports.fetchEntries = fetchEntries;
|
|
5814
5780
|
exports.fetchOneEntry = fetchOneEntry;
|
|
5815
|
-
exports.getAllContent = getAllContent;
|
|
5816
5781
|
exports.getBuilderSearchParams = getBuilderSearchParams;
|
|
5817
|
-
exports.getContent = getContent;
|
|
5818
5782
|
exports.isEditing = isEditing;
|
|
5819
5783
|
exports.isPreviewing = isPreviewing;
|
|
5820
5784
|
exports.register = register;
|
package/lib/node/index.qwik.mjs
CHANGED
|
@@ -3718,7 +3718,7 @@ const componentInfo = {
|
|
|
3718
3718
|
"mp4"
|
|
3719
3719
|
],
|
|
3720
3720
|
bubble: true,
|
|
3721
|
-
defaultValue: "https://
|
|
3721
|
+
defaultValue: "https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",
|
|
3722
3722
|
required: true
|
|
3723
3723
|
},
|
|
3724
3724
|
{
|
|
@@ -3999,7 +3999,6 @@ const getDefaultRegisteredComponents = () => [
|
|
|
3999
3999
|
},
|
|
4000
4000
|
...getExtraComponents()
|
|
4001
4001
|
];
|
|
4002
|
-
const components = [];
|
|
4003
4002
|
const createRegisterComponentMessage = (info) => ({
|
|
4004
4003
|
type: "builder.registerComponent",
|
|
4005
4004
|
data: serializeComponentInfo(info)
|
|
@@ -4133,17 +4132,23 @@ const getBuilderSearchParamsFromWindow = () => {
|
|
|
4133
4132
|
const normalizeSearchParams = (searchParams) => searchParams instanceof URLSearchParams ? convertSearchParamsToQueryObject(searchParams) : searchParams;
|
|
4134
4133
|
const isPositiveNumber = (thing) => typeof thing === "number" && !isNaN(thing) && thing >= 0;
|
|
4135
4134
|
const generateContentUrl = (options) => {
|
|
4136
|
-
|
|
4137
|
-
const { limit = 30, userAttributes, query, model, apiKey, includeRefs = true, enrich, locale, apiVersion = DEFAULT_API_VERSION, fields, omit, offset, cacheSeconds, staleCacheSeconds, sort, includeUnpublished } = options;
|
|
4135
|
+
const { limit = 30, userAttributes, query, model, apiKey, enrich, locale, apiVersion = DEFAULT_API_VERSION, fields, omit, offset, cacheSeconds, staleCacheSeconds, sort, includeUnpublished } = options;
|
|
4138
4136
|
if (!apiKey)
|
|
4139
4137
|
throw new Error("Missing API key");
|
|
4140
4138
|
if (![
|
|
4141
4139
|
"v3"
|
|
4142
4140
|
].includes(apiVersion))
|
|
4143
4141
|
throw new Error(`Invalid apiVersion: expected 'v3', received '${apiVersion}'`);
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4142
|
+
const noTraverse = limit !== 1;
|
|
4143
|
+
const url = new URL(`https://cdn.builder.io/api/${apiVersion}/content/${model}`);
|
|
4144
|
+
url.searchParams.set("apiKey", apiKey);
|
|
4145
|
+
url.searchParams.set("limit", String(limit));
|
|
4146
|
+
url.searchParams.set("noTraverse", String(noTraverse));
|
|
4147
|
+
url.searchParams.set("includeRefs", String(true));
|
|
4148
|
+
if (locale)
|
|
4149
|
+
url.searchParams.set("locale", locale);
|
|
4150
|
+
if (enrich)
|
|
4151
|
+
url.searchParams.set("enrich", String(enrich));
|
|
4147
4152
|
url.searchParams.set("omit", omit || "meta.componentsUsed");
|
|
4148
4153
|
if (fields)
|
|
4149
4154
|
url.searchParams.set("fields", fields);
|
|
@@ -4190,7 +4195,6 @@ async function fetchOneEntry(options) {
|
|
|
4190
4195
|
return allContent[0] || null;
|
|
4191
4196
|
return null;
|
|
4192
4197
|
}
|
|
4193
|
-
const getContent = fetchOneEntry;
|
|
4194
4198
|
const _fetchContent = async (options) => {
|
|
4195
4199
|
const url = generateContentUrl(options);
|
|
4196
4200
|
const res = await fetch$1(url.href);
|
|
@@ -4235,7 +4239,6 @@ async function fetchEntries(options) {
|
|
|
4235
4239
|
return null;
|
|
4236
4240
|
}
|
|
4237
4241
|
}
|
|
4238
|
-
const getAllContent = fetchEntries;
|
|
4239
4242
|
function isPreviewing() {
|
|
4240
4243
|
if (!isBrowser())
|
|
4241
4244
|
return false;
|
|
@@ -4446,7 +4449,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
4446
4449
|
const url = new URL(e.origin), hostname = url.hostname;
|
|
4447
4450
|
return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
|
|
4448
4451
|
}
|
|
4449
|
-
const SDK_VERSION = "0.
|
|
4452
|
+
const SDK_VERSION = "0.14.0";
|
|
4450
4453
|
const registry = {};
|
|
4451
4454
|
function register(type, info) {
|
|
4452
4455
|
let typeList = registry[type];
|
|
@@ -4786,9 +4789,6 @@ const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
|
|
|
4786
4789
|
...props2.locale ? {
|
|
4787
4790
|
locale: props2.locale
|
|
4788
4791
|
} : {},
|
|
4789
|
-
...props2.includeRefs ? {
|
|
4790
|
-
includeRefs: props2.includeRefs
|
|
4791
|
-
} : {},
|
|
4792
4792
|
...props2.enrich ? {
|
|
4793
4793
|
enrich: props2.enrich
|
|
4794
4794
|
} : {},
|
|
@@ -5092,12 +5092,6 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
|
|
|
5092
5092
|
apiVersion: props.apiVersion,
|
|
5093
5093
|
componentInfos: [
|
|
5094
5094
|
...getDefaultRegisteredComponents(),
|
|
5095
|
-
// While this `components` object is deprecated, we must maintain support for it.
|
|
5096
|
-
// Since users are able to override our default components, we need to make sure that we do not break such
|
|
5097
|
-
// existing usage.
|
|
5098
|
-
// This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
|
|
5099
|
-
// which is the new standard way of providing custom components, and must therefore take precedence.
|
|
5100
|
-
...components,
|
|
5101
5095
|
...props.customComponents || []
|
|
5102
5096
|
].reduce((acc, { component: _, ...info }) => ({
|
|
5103
5097
|
...acc,
|
|
@@ -5109,12 +5103,6 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
|
|
|
5109
5103
|
},
|
|
5110
5104
|
registeredComponents: [
|
|
5111
5105
|
...getDefaultRegisteredComponents(),
|
|
5112
|
-
// While this `components` object is deprecated, we must maintain support for it.
|
|
5113
|
-
// Since users are able to override our default components, we need to make sure that we do not break such
|
|
5114
|
-
// existing usage.
|
|
5115
|
-
// This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
|
|
5116
|
-
// which is the new standard way of providing custom components, and must therefore take precedence.
|
|
5117
|
-
...components,
|
|
5118
5106
|
...props.customComponents || []
|
|
5119
5107
|
].reduce((acc, { component, ...info }) => ({
|
|
5120
5108
|
...acc,
|
|
@@ -5157,9 +5145,6 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
|
|
|
5157
5145
|
get locale() {
|
|
5158
5146
|
return props.locale;
|
|
5159
5147
|
},
|
|
5160
|
-
get includeRefs() {
|
|
5161
|
-
return props.includeRefs;
|
|
5162
|
-
},
|
|
5163
5148
|
get enrich() {
|
|
5164
5149
|
return props.enrich;
|
|
5165
5150
|
},
|
|
@@ -5287,9 +5272,6 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
|
|
|
5287
5272
|
enrich: _fnSignal((p0) => p0.enrich, [
|
|
5288
5273
|
props
|
|
5289
5274
|
], "p0.enrich"),
|
|
5290
|
-
includeRefs: _fnSignal((p0) => p0.includeRefs, [
|
|
5291
|
-
props
|
|
5292
|
-
], "p0.includeRefs"),
|
|
5293
5275
|
linkComponent: _fnSignal((p0) => p0.linkComponent, [
|
|
5294
5276
|
props
|
|
5295
5277
|
], "p0.linkComponent"),
|
|
@@ -5419,9 +5401,6 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
5419
5401
|
get locale() {
|
|
5420
5402
|
return props.locale;
|
|
5421
5403
|
},
|
|
5422
|
-
get includeRefs() {
|
|
5423
|
-
return props.includeRefs;
|
|
5424
|
-
},
|
|
5425
5404
|
get enrich() {
|
|
5426
5405
|
return props.enrich;
|
|
5427
5406
|
},
|
|
@@ -5477,9 +5456,6 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
5477
5456
|
enrich: _fnSignal((p0) => p0.enrich, [
|
|
5478
5457
|
props
|
|
5479
5458
|
], "p0.enrich"),
|
|
5480
|
-
includeRefs: _fnSignal((p0) => p0.includeRefs, [
|
|
5481
|
-
props
|
|
5482
|
-
], "p0.includeRefs"),
|
|
5483
5459
|
isSsrAbTest: _fnSignal((p0) => p0.shouldRenderVariants, [
|
|
5484
5460
|
state
|
|
5485
5461
|
], "p0.shouldRenderVariants"),
|
|
@@ -5533,9 +5509,6 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
5533
5509
|
get locale() {
|
|
5534
5510
|
return props.locale;
|
|
5535
5511
|
},
|
|
5536
|
-
get includeRefs() {
|
|
5537
|
-
return props.includeRefs;
|
|
5538
|
-
},
|
|
5539
5512
|
get enrich() {
|
|
5540
5513
|
return props.enrich;
|
|
5541
5514
|
},
|
|
@@ -5594,9 +5567,6 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
5594
5567
|
enrich: _fnSignal((p0) => p0.enrich, [
|
|
5595
5568
|
props
|
|
5596
5569
|
], "p0.enrich"),
|
|
5597
|
-
includeRefs: _fnSignal((p0) => p0.includeRefs, [
|
|
5598
|
-
props
|
|
5599
|
-
], "p0.includeRefs"),
|
|
5600
5570
|
isSsrAbTest: _fnSignal((p0) => p0.shouldRenderVariants, [
|
|
5601
5571
|
state
|
|
5602
5572
|
], "p0.shouldRenderVariants"),
|
|
@@ -5759,8 +5729,6 @@ const Symbol$1 = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props)
|
|
|
5759
5729
|
], "p0.value")
|
|
5760
5730
|
}, 0, "Wt_1");
|
|
5761
5731
|
}, "Symbol_component_WVvggdkUPdk"));
|
|
5762
|
-
const RenderBlocks = Blocks;
|
|
5763
|
-
const RenderContent = ContentVariants;
|
|
5764
5732
|
const settings = {};
|
|
5765
5733
|
function setEditorSettings(newSettings) {
|
|
5766
5734
|
if (isBrowser()) {
|
|
@@ -5800,8 +5768,6 @@ export {
|
|
|
5800
5768
|
ContentVariants as Content,
|
|
5801
5769
|
FragmentComponent as Fragment,
|
|
5802
5770
|
Image,
|
|
5803
|
-
RenderBlocks,
|
|
5804
|
-
RenderContent,
|
|
5805
5771
|
SectionComponent as Section,
|
|
5806
5772
|
Symbol$1 as Symbol,
|
|
5807
5773
|
Text,
|
|
@@ -5811,9 +5777,7 @@ export {
|
|
|
5811
5777
|
fetchBuilderProps,
|
|
5812
5778
|
fetchEntries,
|
|
5813
5779
|
fetchOneEntry,
|
|
5814
|
-
getAllContent,
|
|
5815
5780
|
getBuilderSearchParams,
|
|
5816
|
-
getContent,
|
|
5817
5781
|
isEditing,
|
|
5818
5782
|
isPreviewing,
|
|
5819
5783
|
register,
|
package/package.json
CHANGED
|
@@ -42,8 +42,6 @@ export interface ContentVariantsPrps {
|
|
|
42
42
|
* If provided, the API will auto-resolve localized objects to the value of this `locale` key (optional).
|
|
43
43
|
*/
|
|
44
44
|
locale?: string;
|
|
45
|
-
/** @deprecated use `enrich` instead */
|
|
46
|
-
includeRefs?: boolean;
|
|
47
45
|
/**
|
|
48
46
|
* A boolean to enable or disable enriching API content (optional).
|
|
49
47
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.
|
|
1
|
+
export declare const SDK_VERSION = "0.14.0";
|
|
@@ -4,12 +4,6 @@ import type { GetContentOptions } from './types.js';
|
|
|
4
4
|
* Returns the first content entry that matches the given options.
|
|
5
5
|
*/
|
|
6
6
|
export declare function fetchOneEntry(options: GetContentOptions): Promise<BuilderContent | null>;
|
|
7
|
-
/**
|
|
8
|
-
* @deprecated `getContent` was renamed to `fetchOneEntry`. This is a temporary alias to avoid breaking changes.
|
|
9
|
-
*
|
|
10
|
-
* NOTE: consider using `fetchBuilderProps` instead for easier setup.
|
|
11
|
-
*/
|
|
12
|
-
export declare const getContent: typeof fetchOneEntry;
|
|
13
7
|
type ContentResults = {
|
|
14
8
|
results: BuilderContent[];
|
|
15
9
|
};
|
|
@@ -21,8 +15,4 @@ export declare const _processContentResult: (options: GetContentOptions, content
|
|
|
21
15
|
* Returns a paginated array of entries that match the given options.
|
|
22
16
|
*/
|
|
23
17
|
export declare function fetchEntries(options: GetContentOptions): Promise<BuilderContent[] | null>;
|
|
24
|
-
/**
|
|
25
|
-
* @deprecated `getAllContent` was renamed to `fetchEntries`. This is a temporary alias to avoid breaking changes.
|
|
26
|
-
*/
|
|
27
|
-
export declare const getAllContent: typeof fetchEntries;
|
|
28
18
|
export {};
|
|
@@ -47,12 +47,6 @@ export interface GetContentOptions {
|
|
|
47
47
|
* Accepts both a key/value object or a `URLSearchParams` instance
|
|
48
48
|
* */
|
|
49
49
|
options?: Record<string, any> | URLSearchParams;
|
|
50
|
-
/**
|
|
51
|
-
* If set to `true`, it will lazy load symbols/references.
|
|
52
|
-
* If set to `false`, it will render the entire content tree eagerly.
|
|
53
|
-
* @deprecated use `enrich` instead
|
|
54
|
-
*/
|
|
55
|
-
noTraverse?: boolean;
|
|
56
50
|
/**
|
|
57
51
|
* If set to `false`, it will not use cookies to target content. Therefore, A/B Testing will be disabled and
|
|
58
52
|
* only the default variation will be returned to every user.
|
|
@@ -60,11 +54,6 @@ export interface GetContentOptions {
|
|
|
60
54
|
* Defaults to `true`.
|
|
61
55
|
*/
|
|
62
56
|
canTrack?: boolean;
|
|
63
|
-
/**
|
|
64
|
-
* Include content of references in the response. Defaults to `true`.
|
|
65
|
-
* @deprecated use `enrich` instead
|
|
66
|
-
*/
|
|
67
|
-
includeRefs?: boolean;
|
|
68
57
|
/**
|
|
69
58
|
* Include multilevel references in the response.
|
|
70
59
|
*/
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
import type { RegisteredComponent } from '../context/types.js';
|
|
2
1
|
import type { ComponentInfo } from '../types/components.js';
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated. Use the `customComponents` prop in RenderContent instead to provide your custom components to the builder SDK.
|
|
5
|
-
*/
|
|
6
|
-
export declare const components: RegisteredComponent[];
|
|
7
|
-
/**
|
|
8
|
-
* @deprecated. Use the `customComponents` prop in RenderContent instead to provide your custom components to the builder SDK.
|
|
9
|
-
*/
|
|
10
|
-
export declare function registerComponent(component: any, info: ComponentInfo): void;
|
|
11
2
|
export declare const createRegisterComponentMessage: (info: ComponentInfo) => {
|
|
12
3
|
type: string;
|
|
13
4
|
data: ComponentInfo;
|
|
@@ -9,13 +9,3 @@ export { default as Video } from '../blocks/video/video.jsx';
|
|
|
9
9
|
import { default as Blocks } from '../components/blocks/blocks.jsx';
|
|
10
10
|
import { default as Content } from '../components/content-variants/content-variants.jsx';
|
|
11
11
|
export { Blocks, Content };
|
|
12
|
-
/**
|
|
13
|
-
* @deprecated Renamed to `Blocks`.
|
|
14
|
-
*/
|
|
15
|
-
export declare const RenderBlocks: import("@builder.io/qwik").Component<import("../server-index.js").BlocksProps>;
|
|
16
|
-
/**
|
|
17
|
-
* @deprecated Renamed to `Content`.
|
|
18
|
-
*/
|
|
19
|
-
export declare const RenderContent: import("@builder.io/qwik").Component<import("../server-index.js").ContentProps & {
|
|
20
|
-
__isNestedRender?: boolean | undefined;
|
|
21
|
-
}>;
|
|
@@ -36,4 +36,4 @@ export { subscribeToEditor } from './helpers/subscribe-to-editor.js';
|
|
|
36
36
|
* Content fetching
|
|
37
37
|
*/
|
|
38
38
|
export { fetchBuilderProps } from './functions/fetch-builder-props.js';
|
|
39
|
-
export { _processContentResult, fetchEntries, fetchOneEntry
|
|
39
|
+
export { _processContentResult, fetchEntries, fetchOneEntry } from './functions/get-content/index.js';
|