@builder.io/sdk-qwik 0.14.31 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/index.qwik.cjs +165 -46
- package/lib/browser/index.qwik.mjs +165 -46
- package/lib/edge/index.qwik.cjs +165 -46
- package/lib/edge/index.qwik.mjs +165 -46
- package/lib/node/index.qwik.cjs +165 -46
- package/lib/node/index.qwik.mjs +165 -46
- package/package.json +1 -1
- package/types/src/components/block/block.helpers.d.ts +8 -8
- package/types/src/components/content-variants/inlined-fns.d.ts +1 -1
- package/types/src/constants/sdk-version.d.ts +1 -1
- package/types/src/types/components.d.ts +41 -0
package/lib/edge/index.qwik.mjs
CHANGED
|
@@ -3848,53 +3848,56 @@ const getRepeatItemData = ({ block, context }) => {
|
|
|
3848
3848
|
}));
|
|
3849
3849
|
return repeatArray;
|
|
3850
3850
|
};
|
|
3851
|
+
const applyDefaults = (shouldReceiveBuilderProps) => {
|
|
3852
|
+
return {
|
|
3853
|
+
// once we bump to a major version, toggle this to `false`.
|
|
3854
|
+
builderBlock: true,
|
|
3855
|
+
// once we bump to a major version, toggle this to `false`.
|
|
3856
|
+
builderContext: true,
|
|
3857
|
+
builderComponents: false,
|
|
3858
|
+
builderLinkComponent: false,
|
|
3859
|
+
...shouldReceiveBuilderProps
|
|
3860
|
+
};
|
|
3861
|
+
};
|
|
3851
3862
|
const provideLinkComponent = (block, linkComponent) => {
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
"Builder:Accordion"
|
|
3859
|
-
].includes(block.name)) ? {
|
|
3863
|
+
if (!block)
|
|
3864
|
+
return {};
|
|
3865
|
+
const shouldReceiveProp = applyDefaults(block.shouldReceiveBuilderProps).builderLinkComponent;
|
|
3866
|
+
if (!shouldReceiveProp)
|
|
3867
|
+
return {};
|
|
3868
|
+
return {
|
|
3860
3869
|
builderLinkComponent: linkComponent
|
|
3861
|
-
}
|
|
3870
|
+
};
|
|
3862
3871
|
};
|
|
3863
3872
|
const provideRegisteredComponents = (block, registeredComponents) => {
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
].includes(block.name)) ? {
|
|
3873
|
+
if (!block)
|
|
3874
|
+
return {};
|
|
3875
|
+
const shouldReceiveProp = applyDefaults(block.shouldReceiveBuilderProps).builderComponents;
|
|
3876
|
+
if (!shouldReceiveProp)
|
|
3877
|
+
return {};
|
|
3878
|
+
return {
|
|
3871
3879
|
builderComponents: registeredComponents
|
|
3872
|
-
}
|
|
3880
|
+
};
|
|
3873
3881
|
};
|
|
3874
3882
|
const provideBuilderBlock = (block, builderBlock) => {
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
"Image",
|
|
3882
|
-
"Video"
|
|
3883
|
-
].includes(block.name)) ? {
|
|
3883
|
+
if (!block)
|
|
3884
|
+
return {};
|
|
3885
|
+
const shouldReceiveProp = applyDefaults(block.shouldReceiveBuilderProps).builderBlock;
|
|
3886
|
+
if (!shouldReceiveProp)
|
|
3887
|
+
return {};
|
|
3888
|
+
return {
|
|
3884
3889
|
builderBlock
|
|
3885
|
-
}
|
|
3890
|
+
};
|
|
3886
3891
|
};
|
|
3887
3892
|
const provideBuilderContext = (block, context) => {
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
"Slot"
|
|
3895
|
-
].includes(block.name)) ? {
|
|
3893
|
+
if (!block)
|
|
3894
|
+
return {};
|
|
3895
|
+
const shouldReceiveProp = applyDefaults(block.shouldReceiveBuilderProps).builderContext;
|
|
3896
|
+
if (!shouldReceiveProp)
|
|
3897
|
+
return {};
|
|
3898
|
+
return {
|
|
3896
3899
|
builderContext: context
|
|
3897
|
-
}
|
|
3900
|
+
};
|
|
3898
3901
|
};
|
|
3899
3902
|
const SIZES = {
|
|
3900
3903
|
small: {
|
|
@@ -5476,7 +5479,13 @@ const componentInfo$i = {
|
|
|
5476
5479
|
options.set("items", []);
|
|
5477
5480
|
}
|
|
5478
5481
|
}
|
|
5479
|
-
]
|
|
5482
|
+
],
|
|
5483
|
+
shouldReceiveBuilderProps: {
|
|
5484
|
+
builderBlock: true,
|
|
5485
|
+
builderContext: true,
|
|
5486
|
+
builderComponents: true,
|
|
5487
|
+
builderLinkComponent: true
|
|
5488
|
+
}
|
|
5480
5489
|
};
|
|
5481
5490
|
const convertOrderNumberToString = (order) => {
|
|
5482
5491
|
return order.toString();
|
|
@@ -5722,7 +5731,13 @@ const componentInfo$h = {
|
|
|
5722
5731
|
}
|
|
5723
5732
|
],
|
|
5724
5733
|
static: true,
|
|
5725
|
-
noWrap: true
|
|
5734
|
+
noWrap: true,
|
|
5735
|
+
shouldReceiveBuilderProps: {
|
|
5736
|
+
builderBlock: false,
|
|
5737
|
+
builderContext: false,
|
|
5738
|
+
builderComponents: false,
|
|
5739
|
+
builderLinkComponent: true
|
|
5740
|
+
}
|
|
5726
5741
|
};
|
|
5727
5742
|
const componentInfo$g = {
|
|
5728
5743
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
@@ -5964,9 +5979,21 @@ const componentInfo$g = {
|
|
|
5964
5979
|
helperText: "When stacking columns for mobile devices, reverse the ordering",
|
|
5965
5980
|
advanced: true
|
|
5966
5981
|
}
|
|
5967
|
-
]
|
|
5982
|
+
],
|
|
5983
|
+
shouldReceiveBuilderProps: {
|
|
5984
|
+
builderBlock: true,
|
|
5985
|
+
builderContext: true,
|
|
5986
|
+
builderComponents: true,
|
|
5987
|
+
builderLinkComponent: true
|
|
5988
|
+
}
|
|
5968
5989
|
};
|
|
5969
5990
|
const componentInfo$f = {
|
|
5991
|
+
shouldReceiveBuilderProps: {
|
|
5992
|
+
builderBlock: false,
|
|
5993
|
+
builderContext: false,
|
|
5994
|
+
builderComponents: false,
|
|
5995
|
+
builderLinkComponent: false
|
|
5996
|
+
},
|
|
5970
5997
|
name: "Fragment",
|
|
5971
5998
|
static: true,
|
|
5972
5999
|
hidden: true,
|
|
@@ -6126,9 +6153,21 @@ const componentInfo$e = {
|
|
|
6126
6153
|
advanced: true,
|
|
6127
6154
|
defaultValue: 0.7041
|
|
6128
6155
|
}
|
|
6129
|
-
]
|
|
6156
|
+
],
|
|
6157
|
+
shouldReceiveBuilderProps: {
|
|
6158
|
+
builderBlock: true,
|
|
6159
|
+
builderContext: false,
|
|
6160
|
+
builderComponents: false,
|
|
6161
|
+
builderLinkComponent: false
|
|
6162
|
+
}
|
|
6130
6163
|
};
|
|
6131
6164
|
const componentInfo$d = {
|
|
6165
|
+
shouldReceiveBuilderProps: {
|
|
6166
|
+
builderBlock: false,
|
|
6167
|
+
builderContext: false,
|
|
6168
|
+
builderComponents: false,
|
|
6169
|
+
builderLinkComponent: false
|
|
6170
|
+
},
|
|
6132
6171
|
name: "Core:Section",
|
|
6133
6172
|
static: true,
|
|
6134
6173
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -6187,7 +6226,13 @@ const componentInfo$c = {
|
|
|
6187
6226
|
required: true,
|
|
6188
6227
|
defaultValue: "children"
|
|
6189
6228
|
}
|
|
6190
|
-
]
|
|
6229
|
+
],
|
|
6230
|
+
shouldReceiveBuilderProps: {
|
|
6231
|
+
builderBlock: false,
|
|
6232
|
+
builderContext: true,
|
|
6233
|
+
builderComponents: false,
|
|
6234
|
+
builderLinkComponent: false
|
|
6235
|
+
}
|
|
6191
6236
|
};
|
|
6192
6237
|
const Slot = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
6193
6238
|
var _a, _b;
|
|
@@ -6266,7 +6311,13 @@ const componentInfo$b = {
|
|
|
6266
6311
|
hideFromUI: true,
|
|
6267
6312
|
type: "boolean"
|
|
6268
6313
|
}
|
|
6269
|
-
]
|
|
6314
|
+
],
|
|
6315
|
+
shouldReceiveBuilderProps: {
|
|
6316
|
+
builderBlock: true,
|
|
6317
|
+
builderContext: true,
|
|
6318
|
+
builderComponents: true,
|
|
6319
|
+
builderLinkComponent: true
|
|
6320
|
+
}
|
|
6270
6321
|
};
|
|
6271
6322
|
const defaultTab = {
|
|
6272
6323
|
"@type": "@builder.io/sdk:Element",
|
|
@@ -6434,7 +6485,13 @@ const componentInfo$a = {
|
|
|
6434
6485
|
}
|
|
6435
6486
|
]
|
|
6436
6487
|
}
|
|
6437
|
-
]
|
|
6488
|
+
],
|
|
6489
|
+
shouldReceiveBuilderProps: {
|
|
6490
|
+
builderBlock: true,
|
|
6491
|
+
builderContext: true,
|
|
6492
|
+
builderComponents: true,
|
|
6493
|
+
builderLinkComponent: true
|
|
6494
|
+
}
|
|
6438
6495
|
};
|
|
6439
6496
|
const activeTabContent = function activeTabContent2(props, state, active) {
|
|
6440
6497
|
return props.tabs && props.tabs[active].content;
|
|
@@ -6547,6 +6604,12 @@ const Tabs = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
6547
6604
|
], 1, "6k_3");
|
|
6548
6605
|
}, "Tabs_component_MhWcxXy0lMY"));
|
|
6549
6606
|
const componentInfo$9 = {
|
|
6607
|
+
shouldReceiveBuilderProps: {
|
|
6608
|
+
builderBlock: false,
|
|
6609
|
+
builderContext: false,
|
|
6610
|
+
builderComponents: false,
|
|
6611
|
+
builderLinkComponent: false
|
|
6612
|
+
},
|
|
6550
6613
|
name: "Text",
|
|
6551
6614
|
static: true,
|
|
6552
6615
|
isRSC: true,
|
|
@@ -6582,6 +6645,12 @@ const Text = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
6582
6645
|
}, null, 3, "yO_0");
|
|
6583
6646
|
}, "Text_component_15p0cKUxgIE"));
|
|
6584
6647
|
const componentInfo$8 = {
|
|
6648
|
+
shouldReceiveBuilderProps: {
|
|
6649
|
+
builderBlock: false,
|
|
6650
|
+
builderContext: false,
|
|
6651
|
+
builderComponents: false,
|
|
6652
|
+
builderLinkComponent: false
|
|
6653
|
+
},
|
|
6585
6654
|
name: "Custom Code",
|
|
6586
6655
|
static: true,
|
|
6587
6656
|
requiredPermissions: [
|
|
@@ -6661,6 +6730,12 @@ const CustomCode = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((prop
|
|
|
6661
6730
|
}, null, 3, "bY_0");
|
|
6662
6731
|
}, "CustomCode_component_uYOSy7w7Zqw"));
|
|
6663
6732
|
const componentInfo$7 = {
|
|
6733
|
+
shouldReceiveBuilderProps: {
|
|
6734
|
+
builderBlock: false,
|
|
6735
|
+
builderContext: false,
|
|
6736
|
+
builderComponents: false,
|
|
6737
|
+
builderLinkComponent: false
|
|
6738
|
+
},
|
|
6664
6739
|
name: "Embed",
|
|
6665
6740
|
static: true,
|
|
6666
6741
|
inputs: [
|
|
@@ -7023,7 +7098,13 @@ const componentInfo$6 = {
|
|
|
7023
7098
|
}
|
|
7024
7099
|
}
|
|
7025
7100
|
}
|
|
7026
|
-
]
|
|
7101
|
+
],
|
|
7102
|
+
shouldReceiveBuilderProps: {
|
|
7103
|
+
builderBlock: true,
|
|
7104
|
+
builderContext: true,
|
|
7105
|
+
builderComponents: true,
|
|
7106
|
+
builderLinkComponent: true
|
|
7107
|
+
}
|
|
7027
7108
|
};
|
|
7028
7109
|
const validEnvList = [
|
|
7029
7110
|
"production",
|
|
@@ -7335,6 +7416,12 @@ const STYLES = `
|
|
|
7335
7416
|
}
|
|
7336
7417
|
`;
|
|
7337
7418
|
const componentInfo$5 = {
|
|
7419
|
+
shouldReceiveBuilderProps: {
|
|
7420
|
+
builderBlock: false,
|
|
7421
|
+
builderContext: false,
|
|
7422
|
+
builderComponents: false,
|
|
7423
|
+
builderLinkComponent: false
|
|
7424
|
+
},
|
|
7338
7425
|
name: "Form:Input",
|
|
7339
7426
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
7340
7427
|
inputs: [
|
|
@@ -7418,6 +7505,12 @@ const FormInputComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQ
|
|
|
7418
7505
|
});
|
|
7419
7506
|
}, "FormInputComponent_component_AUUjdN0ueMs"));
|
|
7420
7507
|
const componentInfo$4 = {
|
|
7508
|
+
shouldReceiveBuilderProps: {
|
|
7509
|
+
builderBlock: false,
|
|
7510
|
+
builderContext: false,
|
|
7511
|
+
builderComponents: false,
|
|
7512
|
+
builderLinkComponent: false
|
|
7513
|
+
},
|
|
7421
7514
|
name: "Form:Select",
|
|
7422
7515
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
7423
7516
|
defaultStyles: {
|
|
@@ -7487,6 +7580,12 @@ const SelectComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
7487
7580
|
}));
|
|
7488
7581
|
}, "SelectComponent_component_SPKbsFLikZU"));
|
|
7489
7582
|
const componentInfo$3 = {
|
|
7583
|
+
shouldReceiveBuilderProps: {
|
|
7584
|
+
builderBlock: false,
|
|
7585
|
+
builderContext: false,
|
|
7586
|
+
builderComponents: false,
|
|
7587
|
+
builderLinkComponent: false
|
|
7588
|
+
},
|
|
7490
7589
|
name: "Form:SubmitButton",
|
|
7491
7590
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
7492
7591
|
defaultStyles: {
|
|
@@ -7521,6 +7620,12 @@ const SubmitButton = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
|
|
|
7521
7620
|
}, 0, "6z_0");
|
|
7522
7621
|
}, "SubmitButton_component_NXvMBMCDhwc"));
|
|
7523
7622
|
const componentInfo$2 = {
|
|
7623
|
+
shouldReceiveBuilderProps: {
|
|
7624
|
+
builderBlock: false,
|
|
7625
|
+
builderContext: false,
|
|
7626
|
+
builderComponents: false,
|
|
7627
|
+
builderLinkComponent: false
|
|
7628
|
+
},
|
|
7524
7629
|
name: "Form:TextArea",
|
|
7525
7630
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
|
|
7526
7631
|
inputs: [
|
|
@@ -7585,6 +7690,12 @@ const Textarea = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props)
|
|
|
7585
7690
|
}, 0, "kE_0");
|
|
7586
7691
|
}, "Textarea_component_o1TcxV139Oc"));
|
|
7587
7692
|
const componentInfo$1 = {
|
|
7693
|
+
shouldReceiveBuilderProps: {
|
|
7694
|
+
builderBlock: false,
|
|
7695
|
+
builderContext: false,
|
|
7696
|
+
builderComponents: false,
|
|
7697
|
+
builderLinkComponent: false
|
|
7698
|
+
},
|
|
7588
7699
|
// friendlyName?
|
|
7589
7700
|
name: "Raw:Img",
|
|
7590
7701
|
hideFromInsertMenu: true,
|
|
@@ -7746,7 +7857,13 @@ const componentInfo = {
|
|
|
7746
7857
|
defaultValue: true,
|
|
7747
7858
|
advanced: true
|
|
7748
7859
|
}
|
|
7749
|
-
]
|
|
7860
|
+
],
|
|
7861
|
+
shouldReceiveBuilderProps: {
|
|
7862
|
+
builderBlock: true,
|
|
7863
|
+
builderContext: false,
|
|
7864
|
+
builderComponents: false,
|
|
7865
|
+
builderLinkComponent: false
|
|
7866
|
+
}
|
|
7750
7867
|
};
|
|
7751
7868
|
const Video = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
7752
7869
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
@@ -8393,7 +8510,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
8393
8510
|
const url = new URL(e.origin), hostname = url.hostname;
|
|
8394
8511
|
return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
|
|
8395
8512
|
}
|
|
8396
|
-
const SDK_VERSION = "0.
|
|
8513
|
+
const SDK_VERSION = "0.15.1";
|
|
8397
8514
|
const registry = {};
|
|
8398
8515
|
function register(type, info) {
|
|
8399
8516
|
let typeList = registry[type];
|
|
@@ -9332,6 +9449,8 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
9332
9449
|
props,
|
|
9333
9450
|
state
|
|
9334
9451
|
]));
|
|
9452
|
+
useTaskQrl(/* @__PURE__ */ inlinedQrl(({ track: track2 }) => {
|
|
9453
|
+
}, "ContentVariants_component_useTask_lSvynevU008"));
|
|
9335
9454
|
return /* @__PURE__ */ _jsxC(Fragment$1, {
|
|
9336
9455
|
children: [
|
|
9337
9456
|
!props.isNestedRender && TARGET !== "reactNative" ? /* @__PURE__ */ _jsxC(InlinedScript, {
|