@builder.io/sdk-qwik 0.14.25 → 0.14.27
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 +61 -33
- package/lib/browser/index.qwik.mjs +61 -33
- package/lib/edge/index.qwik.cjs +65 -44
- package/lib/edge/index.qwik.mjs +65 -44
- package/lib/node/index.qwik.cjs +61 -33
- package/lib/node/index.qwik.mjs +61 -33
- package/package.json +2 -2
- package/types/src/blocks/image/image.types.d.ts +1 -0
- package/types/src/components/block/block.helpers.d.ts +20 -2
- package/types/src/components/block/components/block-wrapper.d.ts +0 -1
- package/types/src/components/block/components/component-ref/component-ref.helpers.d.ts +1 -1
- package/types/src/components/content/components/enable-editor.d.ts +1 -1
- package/types/src/components/content/components/styles.helpers.d.ts +3 -3
- package/types/src/components/content/content.helpers.d.ts +2 -2
- package/types/src/components/content-variants/helpers.d.ts +13 -13
- package/types/src/constants/sdk-version.d.ts +1 -1
- package/types/src/constants/target.d.ts +3 -1
- package/types/src/context/types.d.ts +1 -0
- package/types/src/functions/apply-patch-with-mutation.d.ts +1 -1
- package/types/src/functions/evaluate/helpers.d.ts +2 -2
- package/types/src/functions/get-global-this.d.ts +0 -1
- package/types/src/helpers/cookie.d.ts +1 -1
- package/types/src/helpers/css.d.ts +1 -1
package/lib/edge/index.qwik.mjs
CHANGED
|
@@ -90,11 +90,7 @@ function getBlockComponentOptions(block) {
|
|
|
90
90
|
var _a;
|
|
91
91
|
return {
|
|
92
92
|
...(_a = block.component) == null ? void 0 : _a.options,
|
|
93
|
-
...block.options
|
|
94
|
-
/**
|
|
95
|
-
* Our built-in components frequently make use of the block, so we provide all of it under `builderBlock`
|
|
96
|
-
*/
|
|
97
|
-
builderBlock: block
|
|
93
|
+
...block.options
|
|
98
94
|
};
|
|
99
95
|
}
|
|
100
96
|
const MSG_PREFIX = "[Builder.io]: ";
|
|
@@ -3460,17 +3456,10 @@ theFunction();
|
|
|
3460
3456
|
});
|
|
3461
3457
|
interpreter.setProperty(globalObject, "setRootState", interpreter.createNativeFunction(setRootState));
|
|
3462
3458
|
};
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
return output;
|
|
3468
|
-
} catch (e) {
|
|
3469
|
-
logger.warn("Custom code error in edge runtime. NOTE: your code must be ES5 JavaScript.", {
|
|
3470
|
-
e
|
|
3471
|
-
});
|
|
3472
|
-
return;
|
|
3473
|
-
}
|
|
3459
|
+
const myInterpreter = new t(transformed, initFunc);
|
|
3460
|
+
myInterpreter.run();
|
|
3461
|
+
const output = myInterpreter.pseudoToNative(myInterpreter.value);
|
|
3462
|
+
return output;
|
|
3474
3463
|
};
|
|
3475
3464
|
const checkIsDefined = (maybeT) => maybeT !== null && maybeT !== void 0;
|
|
3476
3465
|
function isNodeRuntime() {
|
|
@@ -3859,24 +3848,53 @@ const getRepeatItemData = ({ block, context }) => {
|
|
|
3859
3848
|
}));
|
|
3860
3849
|
return repeatArray;
|
|
3861
3850
|
};
|
|
3862
|
-
const
|
|
3863
|
-
return block && (block.isRSC || [
|
|
3851
|
+
const provideLinkComponent = (block, linkComponent) => {
|
|
3852
|
+
return block && (block.isRSC && TARGET === "rsc" || [
|
|
3864
3853
|
"Core:Button",
|
|
3865
3854
|
"Symbol",
|
|
3866
3855
|
"Columns",
|
|
3867
3856
|
"Form:Form",
|
|
3868
3857
|
"Builder: Tabs",
|
|
3869
3858
|
"Builder:Accordion"
|
|
3870
|
-
].includes(block.name))
|
|
3859
|
+
].includes(block.name)) ? {
|
|
3860
|
+
builderLinkComponent: linkComponent
|
|
3861
|
+
} : {};
|
|
3871
3862
|
};
|
|
3872
|
-
const
|
|
3873
|
-
return block && (block.isRSC || [
|
|
3863
|
+
const provideRegisteredComponents = (block, registeredComponents) => {
|
|
3864
|
+
return block && (block.isRSC && TARGET === "rsc" || [
|
|
3874
3865
|
"Symbol",
|
|
3875
3866
|
"Columns",
|
|
3876
3867
|
"Form:Form",
|
|
3877
3868
|
"Builder: Tabs",
|
|
3878
3869
|
"Builder:Accordion"
|
|
3879
|
-
].includes(block.name))
|
|
3870
|
+
].includes(block.name)) ? {
|
|
3871
|
+
builderComponents: registeredComponents
|
|
3872
|
+
} : {};
|
|
3873
|
+
};
|
|
3874
|
+
const provideBuilderBlock = (block, builderBlock) => {
|
|
3875
|
+
return block && (block.isRSC && TARGET === "rsc" || TARGET === "reactNative" || [
|
|
3876
|
+
"Builder:Accordion",
|
|
3877
|
+
"Columns",
|
|
3878
|
+
"Form:Form",
|
|
3879
|
+
"Builder: Tabs",
|
|
3880
|
+
"Symbol",
|
|
3881
|
+
"Image",
|
|
3882
|
+
"Video"
|
|
3883
|
+
].includes(block.name)) ? {
|
|
3884
|
+
builderBlock
|
|
3885
|
+
} : {};
|
|
3886
|
+
};
|
|
3887
|
+
const provideBuilderContext = (block, context) => {
|
|
3888
|
+
return block && (block.isRSC && TARGET === "rsc" || [
|
|
3889
|
+
"Builder:Accordion",
|
|
3890
|
+
"Columns",
|
|
3891
|
+
"Form:Form",
|
|
3892
|
+
"Builder: Tabs",
|
|
3893
|
+
"Symbol",
|
|
3894
|
+
"Slot"
|
|
3895
|
+
].includes(block.name)) ? {
|
|
3896
|
+
builderContext: context
|
|
3897
|
+
} : {};
|
|
3880
3898
|
};
|
|
3881
3899
|
const SIZES = {
|
|
3882
3900
|
small: {
|
|
@@ -4334,13 +4352,10 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
4334
4352
|
componentRef: (_a2 = blockComponent2.value) == null ? void 0 : _a2.component,
|
|
4335
4353
|
componentOptions: {
|
|
4336
4354
|
...getBlockComponentOptions(processedBlock2.value),
|
|
4337
|
-
|
|
4338
|
-
...
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
...shouldPassRegisteredComponents(blockComponent2.value) ? {
|
|
4342
|
-
builderComponents: props2.registeredComponents
|
|
4343
|
-
} : {}
|
|
4355
|
+
...provideBuilderBlock(blockComponent2.value, processedBlock2.value),
|
|
4356
|
+
...provideBuilderContext(blockComponent2.value, props2.context),
|
|
4357
|
+
...provideLinkComponent(blockComponent2.value, props2.linkComponent),
|
|
4358
|
+
...provideRegisteredComponents(blockComponent2.value, props2.registeredComponents)
|
|
4344
4359
|
},
|
|
4345
4360
|
context: props2.context,
|
|
4346
4361
|
linkComponent: props2.linkComponent,
|
|
@@ -4395,9 +4410,6 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
4395
4410
|
get context() {
|
|
4396
4411
|
return props.context;
|
|
4397
4412
|
},
|
|
4398
|
-
get linkComponent() {
|
|
4399
|
-
return props.linkComponent;
|
|
4400
|
-
},
|
|
4401
4413
|
children: [
|
|
4402
4414
|
/* @__PURE__ */ _jsxC(ComponentRef, {
|
|
4403
4415
|
get componentRef() {
|
|
@@ -4492,10 +4504,7 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
4492
4504
|
], "p0.value"),
|
|
4493
4505
|
context: _fnSignal((p0) => p0.context, [
|
|
4494
4506
|
props
|
|
4495
|
-
], "p0.context")
|
|
4496
|
-
linkComponent: _fnSignal((p0) => p0.linkComponent, [
|
|
4497
|
-
props
|
|
4498
|
-
], "p0.linkComponent")
|
|
4507
|
+
], "p0.context")
|
|
4499
4508
|
}
|
|
4500
4509
|
}, 1, "jN_2") : (repeatItem.value || []).map((data, index) => {
|
|
4501
4510
|
return /* @__PURE__ */ _jsxC(RepeatedBlock, {
|
|
@@ -5063,7 +5072,12 @@ const Image = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
5063
5072
|
class: _fnSignal((p0) => "builder-image" + (p0.className ? " " + p0.className : "") + " img-Image", [
|
|
5064
5073
|
props
|
|
5065
5074
|
], '"builder-image"+(p0.className?" "+p0.className:"")+" img-Image"'),
|
|
5066
|
-
|
|
5075
|
+
fetchPriority: _fnSignal((p0) => p0.highPriority ? "high" : "auto", [
|
|
5076
|
+
props
|
|
5077
|
+
], 'p0.highPriority?"high":"auto"'),
|
|
5078
|
+
loading: _fnSignal((p0) => p0.highPriority ? "eager" : "lazy", [
|
|
5079
|
+
props
|
|
5080
|
+
], 'p0.highPriority?"eager":"lazy"'),
|
|
5067
5081
|
role: _fnSignal((p0) => p0.altText ? void 0 : "presentation", [
|
|
5068
5082
|
props
|
|
5069
5083
|
], 'p0.altText?undefined:"presentation"'),
|
|
@@ -6098,6 +6112,12 @@ const componentInfo$d = {
|
|
|
6098
6112
|
helperText: "When child blocks are provided, fit to them instead of using the image's aspect ratio",
|
|
6099
6113
|
defaultValue: true
|
|
6100
6114
|
},
|
|
6115
|
+
{
|
|
6116
|
+
name: "highPriority",
|
|
6117
|
+
type: "boolean",
|
|
6118
|
+
advanced: true,
|
|
6119
|
+
helperText: "Mark this image as high priority compared to other images on the page. This prevents lazy loading of the image and tells the browser to load this image before others on the page."
|
|
6120
|
+
},
|
|
6101
6121
|
{
|
|
6102
6122
|
name: "aspectRatio",
|
|
6103
6123
|
type: "number",
|
|
@@ -8301,7 +8321,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
8301
8321
|
const url = new URL(e.origin), hostname = url.hostname;
|
|
8302
8322
|
return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
|
|
8303
8323
|
}
|
|
8304
|
-
const SDK_VERSION = "0.14.
|
|
8324
|
+
const SDK_VERSION = "0.14.27";
|
|
8305
8325
|
const registry = {};
|
|
8306
8326
|
function register(type, info) {
|
|
8307
8327
|
let typeList = registry[type];
|
|
@@ -8997,6 +9017,7 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
|
|
|
8997
9017
|
}),
|
|
8998
9018
|
rootSetState: void 0,
|
|
8999
9019
|
context: props.context || {},
|
|
9020
|
+
canTrack: props.canTrack,
|
|
9000
9021
|
apiKey: props.apiKey,
|
|
9001
9022
|
apiVersion: props.apiVersion,
|
|
9002
9023
|
componentInfos: [
|
|
@@ -9069,9 +9090,6 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
|
|
|
9069
9090
|
get contentWrapperProps() {
|
|
9070
9091
|
return props.contentWrapperProps;
|
|
9071
9092
|
},
|
|
9072
|
-
get linkComponent() {
|
|
9073
|
-
return props.linkComponent;
|
|
9074
|
-
},
|
|
9075
9093
|
get trustedHosts() {
|
|
9076
9094
|
return props.trustedHosts;
|
|
9077
9095
|
},
|
|
@@ -9189,9 +9207,6 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
|
|
|
9189
9207
|
enrich: _fnSignal((p0) => p0.enrich, [
|
|
9190
9208
|
props
|
|
9191
9209
|
], "p0.enrich"),
|
|
9192
|
-
linkComponent: _fnSignal((p0) => p0.linkComponent, [
|
|
9193
|
-
props
|
|
9194
|
-
], "p0.linkComponent"),
|
|
9195
9210
|
locale: _fnSignal((p0) => p0.locale, [
|
|
9196
9211
|
props
|
|
9197
9212
|
], "p0.locale"),
|
|
@@ -9604,6 +9619,9 @@ const Symbol$1 = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props)
|
|
|
9604
9619
|
...(_c = (_b = state.contentToUse) == null ? void 0 : _b.data) == null ? void 0 : _c.state
|
|
9605
9620
|
};
|
|
9606
9621
|
},
|
|
9622
|
+
get canTrack() {
|
|
9623
|
+
return props.builderContext.canTrack;
|
|
9624
|
+
},
|
|
9607
9625
|
get model() {
|
|
9608
9626
|
var _a2;
|
|
9609
9627
|
return (_a2 = props.symbol) == null ? void 0 : _a2.model;
|
|
@@ -9630,6 +9648,9 @@ const Symbol$1 = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props)
|
|
|
9630
9648
|
blocksWrapper: _fnSignal((p0) => p0.value, [
|
|
9631
9649
|
blocksWrapper
|
|
9632
9650
|
], "p0.value"),
|
|
9651
|
+
canTrack: _fnSignal((p0) => p0.builderContext.canTrack, [
|
|
9652
|
+
props
|
|
9653
|
+
], "p0.builderContext.canTrack"),
|
|
9633
9654
|
content: _fnSignal((p0) => p0.contentToUse, [
|
|
9634
9655
|
state
|
|
9635
9656
|
], "p0.contentToUse"),
|
package/lib/node/index.qwik.cjs
CHANGED
|
@@ -94,11 +94,7 @@ function getBlockComponentOptions(block) {
|
|
|
94
94
|
var _a;
|
|
95
95
|
return {
|
|
96
96
|
...(_a = block.component) == null ? void 0 : _a.options,
|
|
97
|
-
...block.options
|
|
98
|
-
/**
|
|
99
|
-
* Our built-in components frequently make use of the block, so we provide all of it under `builderBlock`
|
|
100
|
-
*/
|
|
101
|
-
builderBlock: block
|
|
97
|
+
...block.options
|
|
102
98
|
};
|
|
103
99
|
}
|
|
104
100
|
const MSG_PREFIX = "[Builder.io]: ";
|
|
@@ -762,24 +758,53 @@ const getRepeatItemData = ({ block, context }) => {
|
|
|
762
758
|
}));
|
|
763
759
|
return repeatArray;
|
|
764
760
|
};
|
|
765
|
-
const
|
|
766
|
-
return block && (block.isRSC || [
|
|
761
|
+
const provideLinkComponent = (block, linkComponent) => {
|
|
762
|
+
return block && (block.isRSC && TARGET === "rsc" || [
|
|
767
763
|
"Core:Button",
|
|
768
764
|
"Symbol",
|
|
769
765
|
"Columns",
|
|
770
766
|
"Form:Form",
|
|
771
767
|
"Builder: Tabs",
|
|
772
768
|
"Builder:Accordion"
|
|
773
|
-
].includes(block.name))
|
|
769
|
+
].includes(block.name)) ? {
|
|
770
|
+
builderLinkComponent: linkComponent
|
|
771
|
+
} : {};
|
|
774
772
|
};
|
|
775
|
-
const
|
|
776
|
-
return block && (block.isRSC || [
|
|
773
|
+
const provideRegisteredComponents = (block, registeredComponents) => {
|
|
774
|
+
return block && (block.isRSC && TARGET === "rsc" || [
|
|
777
775
|
"Symbol",
|
|
778
776
|
"Columns",
|
|
779
777
|
"Form:Form",
|
|
780
778
|
"Builder: Tabs",
|
|
781
779
|
"Builder:Accordion"
|
|
782
|
-
].includes(block.name))
|
|
780
|
+
].includes(block.name)) ? {
|
|
781
|
+
builderComponents: registeredComponents
|
|
782
|
+
} : {};
|
|
783
|
+
};
|
|
784
|
+
const provideBuilderBlock = (block, builderBlock) => {
|
|
785
|
+
return block && (block.isRSC && TARGET === "rsc" || TARGET === "reactNative" || [
|
|
786
|
+
"Builder:Accordion",
|
|
787
|
+
"Columns",
|
|
788
|
+
"Form:Form",
|
|
789
|
+
"Builder: Tabs",
|
|
790
|
+
"Symbol",
|
|
791
|
+
"Image",
|
|
792
|
+
"Video"
|
|
793
|
+
].includes(block.name)) ? {
|
|
794
|
+
builderBlock
|
|
795
|
+
} : {};
|
|
796
|
+
};
|
|
797
|
+
const provideBuilderContext = (block, context) => {
|
|
798
|
+
return block && (block.isRSC && TARGET === "rsc" || [
|
|
799
|
+
"Builder:Accordion",
|
|
800
|
+
"Columns",
|
|
801
|
+
"Form:Form",
|
|
802
|
+
"Builder: Tabs",
|
|
803
|
+
"Symbol",
|
|
804
|
+
"Slot"
|
|
805
|
+
].includes(block.name)) ? {
|
|
806
|
+
builderContext: context
|
|
807
|
+
} : {};
|
|
783
808
|
};
|
|
784
809
|
const SIZES = {
|
|
785
810
|
small: {
|
|
@@ -1237,13 +1262,10 @@ const Block = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(
|
|
|
1237
1262
|
componentRef: (_a2 = blockComponent2.value) == null ? void 0 : _a2.component,
|
|
1238
1263
|
componentOptions: {
|
|
1239
1264
|
...getBlockComponentOptions(processedBlock2.value),
|
|
1240
|
-
|
|
1241
|
-
...
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
...shouldPassRegisteredComponents(blockComponent2.value) ? {
|
|
1245
|
-
builderComponents: props2.registeredComponents
|
|
1246
|
-
} : {}
|
|
1265
|
+
...provideBuilderBlock(blockComponent2.value, processedBlock2.value),
|
|
1266
|
+
...provideBuilderContext(blockComponent2.value, props2.context),
|
|
1267
|
+
...provideLinkComponent(blockComponent2.value, props2.linkComponent),
|
|
1268
|
+
...provideRegisteredComponents(blockComponent2.value, props2.registeredComponents)
|
|
1247
1269
|
},
|
|
1248
1270
|
context: props2.context,
|
|
1249
1271
|
linkComponent: props2.linkComponent,
|
|
@@ -1298,9 +1320,6 @@ const Block = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(
|
|
|
1298
1320
|
get context() {
|
|
1299
1321
|
return props.context;
|
|
1300
1322
|
},
|
|
1301
|
-
get linkComponent() {
|
|
1302
|
-
return props.linkComponent;
|
|
1303
|
-
},
|
|
1304
1323
|
children: [
|
|
1305
1324
|
/* @__PURE__ */ qwik._jsxC(ComponentRef, {
|
|
1306
1325
|
get componentRef() {
|
|
@@ -1395,10 +1414,7 @@ const Block = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(
|
|
|
1395
1414
|
], "p0.value"),
|
|
1396
1415
|
context: qwik._fnSignal((p0) => p0.context, [
|
|
1397
1416
|
props
|
|
1398
|
-
], "p0.context")
|
|
1399
|
-
linkComponent: qwik._fnSignal((p0) => p0.linkComponent, [
|
|
1400
|
-
props
|
|
1401
|
-
], "p0.linkComponent")
|
|
1417
|
+
], "p0.context")
|
|
1402
1418
|
}
|
|
1403
1419
|
}, 1, "jN_2") : (repeatItem.value || []).map((data, index) => {
|
|
1404
1420
|
return /* @__PURE__ */ qwik._jsxC(RepeatedBlock, {
|
|
@@ -1966,7 +1982,12 @@ const Image = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(
|
|
|
1966
1982
|
class: qwik._fnSignal((p0) => "builder-image" + (p0.className ? " " + p0.className : "") + " img-Image", [
|
|
1967
1983
|
props
|
|
1968
1984
|
], '"builder-image"+(p0.className?" "+p0.className:"")+" img-Image"'),
|
|
1969
|
-
|
|
1985
|
+
fetchPriority: qwik._fnSignal((p0) => p0.highPriority ? "high" : "auto", [
|
|
1986
|
+
props
|
|
1987
|
+
], 'p0.highPriority?"high":"auto"'),
|
|
1988
|
+
loading: qwik._fnSignal((p0) => p0.highPriority ? "eager" : "lazy", [
|
|
1989
|
+
props
|
|
1990
|
+
], 'p0.highPriority?"eager":"lazy"'),
|
|
1970
1991
|
role: qwik._fnSignal((p0) => p0.altText ? void 0 : "presentation", [
|
|
1971
1992
|
props
|
|
1972
1993
|
], 'p0.altText?undefined:"presentation"'),
|
|
@@ -3001,6 +3022,12 @@ const componentInfo$d = {
|
|
|
3001
3022
|
helperText: "When child blocks are provided, fit to them instead of using the image's aspect ratio",
|
|
3002
3023
|
defaultValue: true
|
|
3003
3024
|
},
|
|
3025
|
+
{
|
|
3026
|
+
name: "highPriority",
|
|
3027
|
+
type: "boolean",
|
|
3028
|
+
advanced: true,
|
|
3029
|
+
helperText: "Mark this image as high priority compared to other images on the page. This prevents lazy loading of the image and tells the browser to load this image before others on the page."
|
|
3030
|
+
},
|
|
3004
3031
|
{
|
|
3005
3032
|
name: "aspectRatio",
|
|
3006
3033
|
type: "number",
|
|
@@ -5204,7 +5231,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
5204
5231
|
const url = new URL(e.origin), hostname = url.hostname;
|
|
5205
5232
|
return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
|
|
5206
5233
|
}
|
|
5207
|
-
const SDK_VERSION = "0.14.
|
|
5234
|
+
const SDK_VERSION = "0.14.27";
|
|
5208
5235
|
const registry = {};
|
|
5209
5236
|
function register(type, info) {
|
|
5210
5237
|
let typeList = registry[type];
|
|
@@ -5900,6 +5927,7 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
|
|
|
5900
5927
|
}),
|
|
5901
5928
|
rootSetState: void 0,
|
|
5902
5929
|
context: props.context || {},
|
|
5930
|
+
canTrack: props.canTrack,
|
|
5903
5931
|
apiKey: props.apiKey,
|
|
5904
5932
|
apiVersion: props.apiVersion,
|
|
5905
5933
|
componentInfos: [
|
|
@@ -5972,9 +6000,6 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
|
|
|
5972
6000
|
get contentWrapperProps() {
|
|
5973
6001
|
return props.contentWrapperProps;
|
|
5974
6002
|
},
|
|
5975
|
-
get linkComponent() {
|
|
5976
|
-
return props.linkComponent;
|
|
5977
|
-
},
|
|
5978
6003
|
get trustedHosts() {
|
|
5979
6004
|
return props.trustedHosts;
|
|
5980
6005
|
},
|
|
@@ -6092,9 +6117,6 @@ const ContentComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.
|
|
|
6092
6117
|
enrich: qwik._fnSignal((p0) => p0.enrich, [
|
|
6093
6118
|
props
|
|
6094
6119
|
], "p0.enrich"),
|
|
6095
|
-
linkComponent: qwik._fnSignal((p0) => p0.linkComponent, [
|
|
6096
|
-
props
|
|
6097
|
-
], "p0.linkComponent"),
|
|
6098
6120
|
locale: qwik._fnSignal((p0) => p0.locale, [
|
|
6099
6121
|
props
|
|
6100
6122
|
], "p0.locale"),
|
|
@@ -6507,6 +6529,9 @@ const Symbol$1 = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQ
|
|
|
6507
6529
|
...(_c = (_b = state.contentToUse) == null ? void 0 : _b.data) == null ? void 0 : _c.state
|
|
6508
6530
|
};
|
|
6509
6531
|
},
|
|
6532
|
+
get canTrack() {
|
|
6533
|
+
return props.builderContext.canTrack;
|
|
6534
|
+
},
|
|
6510
6535
|
get model() {
|
|
6511
6536
|
var _a2;
|
|
6512
6537
|
return (_a2 = props.symbol) == null ? void 0 : _a2.model;
|
|
@@ -6533,6 +6558,9 @@ const Symbol$1 = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQ
|
|
|
6533
6558
|
blocksWrapper: qwik._fnSignal((p0) => p0.value, [
|
|
6534
6559
|
blocksWrapper
|
|
6535
6560
|
], "p0.value"),
|
|
6561
|
+
canTrack: qwik._fnSignal((p0) => p0.builderContext.canTrack, [
|
|
6562
|
+
props
|
|
6563
|
+
], "p0.builderContext.canTrack"),
|
|
6536
6564
|
content: qwik._fnSignal((p0) => p0.contentToUse, [
|
|
6537
6565
|
state
|
|
6538
6566
|
], "p0.contentToUse"),
|
package/lib/node/index.qwik.mjs
CHANGED
|
@@ -92,11 +92,7 @@ function getBlockComponentOptions(block) {
|
|
|
92
92
|
var _a;
|
|
93
93
|
return {
|
|
94
94
|
...(_a = block.component) == null ? void 0 : _a.options,
|
|
95
|
-
...block.options
|
|
96
|
-
/**
|
|
97
|
-
* Our built-in components frequently make use of the block, so we provide all of it under `builderBlock`
|
|
98
|
-
*/
|
|
99
|
-
builderBlock: block
|
|
95
|
+
...block.options
|
|
100
96
|
};
|
|
101
97
|
}
|
|
102
98
|
const MSG_PREFIX = "[Builder.io]: ";
|
|
@@ -760,24 +756,53 @@ const getRepeatItemData = ({ block, context }) => {
|
|
|
760
756
|
}));
|
|
761
757
|
return repeatArray;
|
|
762
758
|
};
|
|
763
|
-
const
|
|
764
|
-
return block && (block.isRSC || [
|
|
759
|
+
const provideLinkComponent = (block, linkComponent) => {
|
|
760
|
+
return block && (block.isRSC && TARGET === "rsc" || [
|
|
765
761
|
"Core:Button",
|
|
766
762
|
"Symbol",
|
|
767
763
|
"Columns",
|
|
768
764
|
"Form:Form",
|
|
769
765
|
"Builder: Tabs",
|
|
770
766
|
"Builder:Accordion"
|
|
771
|
-
].includes(block.name))
|
|
767
|
+
].includes(block.name)) ? {
|
|
768
|
+
builderLinkComponent: linkComponent
|
|
769
|
+
} : {};
|
|
772
770
|
};
|
|
773
|
-
const
|
|
774
|
-
return block && (block.isRSC || [
|
|
771
|
+
const provideRegisteredComponents = (block, registeredComponents) => {
|
|
772
|
+
return block && (block.isRSC && TARGET === "rsc" || [
|
|
775
773
|
"Symbol",
|
|
776
774
|
"Columns",
|
|
777
775
|
"Form:Form",
|
|
778
776
|
"Builder: Tabs",
|
|
779
777
|
"Builder:Accordion"
|
|
780
|
-
].includes(block.name))
|
|
778
|
+
].includes(block.name)) ? {
|
|
779
|
+
builderComponents: registeredComponents
|
|
780
|
+
} : {};
|
|
781
|
+
};
|
|
782
|
+
const provideBuilderBlock = (block, builderBlock) => {
|
|
783
|
+
return block && (block.isRSC && TARGET === "rsc" || TARGET === "reactNative" || [
|
|
784
|
+
"Builder:Accordion",
|
|
785
|
+
"Columns",
|
|
786
|
+
"Form:Form",
|
|
787
|
+
"Builder: Tabs",
|
|
788
|
+
"Symbol",
|
|
789
|
+
"Image",
|
|
790
|
+
"Video"
|
|
791
|
+
].includes(block.name)) ? {
|
|
792
|
+
builderBlock
|
|
793
|
+
} : {};
|
|
794
|
+
};
|
|
795
|
+
const provideBuilderContext = (block, context) => {
|
|
796
|
+
return block && (block.isRSC && TARGET === "rsc" || [
|
|
797
|
+
"Builder:Accordion",
|
|
798
|
+
"Columns",
|
|
799
|
+
"Form:Form",
|
|
800
|
+
"Builder: Tabs",
|
|
801
|
+
"Symbol",
|
|
802
|
+
"Slot"
|
|
803
|
+
].includes(block.name)) ? {
|
|
804
|
+
builderContext: context
|
|
805
|
+
} : {};
|
|
781
806
|
};
|
|
782
807
|
const SIZES = {
|
|
783
808
|
small: {
|
|
@@ -1235,13 +1260,10 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
1235
1260
|
componentRef: (_a2 = blockComponent2.value) == null ? void 0 : _a2.component,
|
|
1236
1261
|
componentOptions: {
|
|
1237
1262
|
...getBlockComponentOptions(processedBlock2.value),
|
|
1238
|
-
|
|
1239
|
-
...
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
...shouldPassRegisteredComponents(blockComponent2.value) ? {
|
|
1243
|
-
builderComponents: props2.registeredComponents
|
|
1244
|
-
} : {}
|
|
1263
|
+
...provideBuilderBlock(blockComponent2.value, processedBlock2.value),
|
|
1264
|
+
...provideBuilderContext(blockComponent2.value, props2.context),
|
|
1265
|
+
...provideLinkComponent(blockComponent2.value, props2.linkComponent),
|
|
1266
|
+
...provideRegisteredComponents(blockComponent2.value, props2.registeredComponents)
|
|
1245
1267
|
},
|
|
1246
1268
|
context: props2.context,
|
|
1247
1269
|
linkComponent: props2.linkComponent,
|
|
@@ -1296,9 +1318,6 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
1296
1318
|
get context() {
|
|
1297
1319
|
return props.context;
|
|
1298
1320
|
},
|
|
1299
|
-
get linkComponent() {
|
|
1300
|
-
return props.linkComponent;
|
|
1301
|
-
},
|
|
1302
1321
|
children: [
|
|
1303
1322
|
/* @__PURE__ */ _jsxC(ComponentRef, {
|
|
1304
1323
|
get componentRef() {
|
|
@@ -1393,10 +1412,7 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
1393
1412
|
], "p0.value"),
|
|
1394
1413
|
context: _fnSignal((p0) => p0.context, [
|
|
1395
1414
|
props
|
|
1396
|
-
], "p0.context")
|
|
1397
|
-
linkComponent: _fnSignal((p0) => p0.linkComponent, [
|
|
1398
|
-
props
|
|
1399
|
-
], "p0.linkComponent")
|
|
1415
|
+
], "p0.context")
|
|
1400
1416
|
}
|
|
1401
1417
|
}, 1, "jN_2") : (repeatItem.value || []).map((data, index) => {
|
|
1402
1418
|
return /* @__PURE__ */ _jsxC(RepeatedBlock, {
|
|
@@ -1964,7 +1980,12 @@ const Image = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
1964
1980
|
class: _fnSignal((p0) => "builder-image" + (p0.className ? " " + p0.className : "") + " img-Image", [
|
|
1965
1981
|
props
|
|
1966
1982
|
], '"builder-image"+(p0.className?" "+p0.className:"")+" img-Image"'),
|
|
1967
|
-
|
|
1983
|
+
fetchPriority: _fnSignal((p0) => p0.highPriority ? "high" : "auto", [
|
|
1984
|
+
props
|
|
1985
|
+
], 'p0.highPriority?"high":"auto"'),
|
|
1986
|
+
loading: _fnSignal((p0) => p0.highPriority ? "eager" : "lazy", [
|
|
1987
|
+
props
|
|
1988
|
+
], 'p0.highPriority?"eager":"lazy"'),
|
|
1968
1989
|
role: _fnSignal((p0) => p0.altText ? void 0 : "presentation", [
|
|
1969
1990
|
props
|
|
1970
1991
|
], 'p0.altText?undefined:"presentation"'),
|
|
@@ -2999,6 +3020,12 @@ const componentInfo$d = {
|
|
|
2999
3020
|
helperText: "When child blocks are provided, fit to them instead of using the image's aspect ratio",
|
|
3000
3021
|
defaultValue: true
|
|
3001
3022
|
},
|
|
3023
|
+
{
|
|
3024
|
+
name: "highPriority",
|
|
3025
|
+
type: "boolean",
|
|
3026
|
+
advanced: true,
|
|
3027
|
+
helperText: "Mark this image as high priority compared to other images on the page. This prevents lazy loading of the image and tells the browser to load this image before others on the page."
|
|
3028
|
+
},
|
|
3002
3029
|
{
|
|
3003
3030
|
name: "aspectRatio",
|
|
3004
3031
|
type: "number",
|
|
@@ -5202,7 +5229,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
5202
5229
|
const url = new URL(e.origin), hostname = url.hostname;
|
|
5203
5230
|
return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
|
|
5204
5231
|
}
|
|
5205
|
-
const SDK_VERSION = "0.14.
|
|
5232
|
+
const SDK_VERSION = "0.14.27";
|
|
5206
5233
|
const registry = {};
|
|
5207
5234
|
function register(type, info) {
|
|
5208
5235
|
let typeList = registry[type];
|
|
@@ -5898,6 +5925,7 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
|
|
|
5898
5925
|
}),
|
|
5899
5926
|
rootSetState: void 0,
|
|
5900
5927
|
context: props.context || {},
|
|
5928
|
+
canTrack: props.canTrack,
|
|
5901
5929
|
apiKey: props.apiKey,
|
|
5902
5930
|
apiVersion: props.apiVersion,
|
|
5903
5931
|
componentInfos: [
|
|
@@ -5970,9 +5998,6 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
|
|
|
5970
5998
|
get contentWrapperProps() {
|
|
5971
5999
|
return props.contentWrapperProps;
|
|
5972
6000
|
},
|
|
5973
|
-
get linkComponent() {
|
|
5974
|
-
return props.linkComponent;
|
|
5975
|
-
},
|
|
5976
6001
|
get trustedHosts() {
|
|
5977
6002
|
return props.trustedHosts;
|
|
5978
6003
|
},
|
|
@@ -6090,9 +6115,6 @@ const ContentComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl
|
|
|
6090
6115
|
enrich: _fnSignal((p0) => p0.enrich, [
|
|
6091
6116
|
props
|
|
6092
6117
|
], "p0.enrich"),
|
|
6093
|
-
linkComponent: _fnSignal((p0) => p0.linkComponent, [
|
|
6094
|
-
props
|
|
6095
|
-
], "p0.linkComponent"),
|
|
6096
6118
|
locale: _fnSignal((p0) => p0.locale, [
|
|
6097
6119
|
props
|
|
6098
6120
|
], "p0.locale"),
|
|
@@ -6505,6 +6527,9 @@ const Symbol$1 = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props)
|
|
|
6505
6527
|
...(_c = (_b = state.contentToUse) == null ? void 0 : _b.data) == null ? void 0 : _c.state
|
|
6506
6528
|
};
|
|
6507
6529
|
},
|
|
6530
|
+
get canTrack() {
|
|
6531
|
+
return props.builderContext.canTrack;
|
|
6532
|
+
},
|
|
6508
6533
|
get model() {
|
|
6509
6534
|
var _a2;
|
|
6510
6535
|
return (_a2 = props.symbol) == null ? void 0 : _a2.model;
|
|
@@ -6531,6 +6556,9 @@ const Symbol$1 = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props)
|
|
|
6531
6556
|
blocksWrapper: _fnSignal((p0) => p0.value, [
|
|
6532
6557
|
blocksWrapper
|
|
6533
6558
|
], "p0.value"),
|
|
6559
|
+
canTrack: _fnSignal((p0) => p0.builderContext.canTrack, [
|
|
6560
|
+
props
|
|
6561
|
+
], "p0.builderContext.canTrack"),
|
|
6534
6562
|
content: _fnSignal((p0) => p0.contentToUse, [
|
|
6535
6563
|
state
|
|
6536
6564
|
], "p0.contentToUse"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@builder.io/sdk-qwik",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.27",
|
|
4
4
|
"homepage": "https://github.com/BuilderIO/builder/tree/main/packages/sdks/output/qwik",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"@types/node": "latest",
|
|
115
115
|
"nx": "16.10.0",
|
|
116
116
|
"nx-cloud": "16.5.2",
|
|
117
|
-
"typescript": "
|
|
117
|
+
"typescript": "5.5.2",
|
|
118
118
|
"vite": "^4.3.2"
|
|
119
119
|
},
|
|
120
120
|
"peerDependencies": {
|
|
@@ -14,5 +14,23 @@ export declare const getInheritedStyles: ({ block, context }: {
|
|
|
14
14
|
block: BuilderBlock;
|
|
15
15
|
context: BuilderContextInterface;
|
|
16
16
|
}) => Partial<CSSStyleDeclaration>;
|
|
17
|
-
export declare const
|
|
18
|
-
|
|
17
|
+
export declare const provideLinkComponent: (block: RegisteredComponent | null | undefined, linkComponent: any) => {
|
|
18
|
+
builderLinkComponent: any;
|
|
19
|
+
} | {
|
|
20
|
+
builderLinkComponent?: undefined;
|
|
21
|
+
};
|
|
22
|
+
export declare const provideRegisteredComponents: (block: RegisteredComponent | null | undefined, registeredComponents: RegisteredComponents) => {
|
|
23
|
+
builderComponents: RegisteredComponents;
|
|
24
|
+
} | {
|
|
25
|
+
builderComponents?: undefined;
|
|
26
|
+
};
|
|
27
|
+
export declare const provideBuilderBlock: (block: RegisteredComponent | null | undefined, builderBlock: BuilderBlock) => {
|
|
28
|
+
builderBlock: BuilderBlock;
|
|
29
|
+
} | {
|
|
30
|
+
builderBlock?: undefined;
|
|
31
|
+
};
|
|
32
|
+
export declare const provideBuilderContext: (block: RegisteredComponent | null | undefined, context: BuilderContextInterface) => {
|
|
33
|
+
builderContext: BuilderContextInterface;
|
|
34
|
+
} | {
|
|
35
|
+
builderContext?: undefined;
|
|
36
|
+
};
|
|
@@ -19,7 +19,7 @@ export interface ComponentProps {
|
|
|
19
19
|
includeBlockProps: boolean;
|
|
20
20
|
isInteractive: boolean | undefined;
|
|
21
21
|
}
|
|
22
|
-
export declare const getWrapperProps: ({ componentOptions, builderBlock, context, componentRef, includeBlockProps, isInteractive, contextValue }: Omit<ComponentProps, "
|
|
22
|
+
export declare const getWrapperProps: ({ componentOptions, builderBlock, context, componentRef, includeBlockProps, isInteractive, contextValue }: Omit<ComponentProps, "blockChildren" | "registeredComponents"> & {
|
|
23
23
|
contextValue: BuilderContextInterface;
|
|
24
24
|
}) => InteractiveElementProps | {
|
|
25
25
|
attributes?: {
|