@builder.io/sdk-qwik 0.14.31 → 0.15.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 +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 +31 -0
package/lib/node/index.qwik.cjs
CHANGED
|
@@ -771,53 +771,56 @@ const getRepeatItemData = ({ block, context }) => {
|
|
|
771
771
|
}));
|
|
772
772
|
return repeatArray;
|
|
773
773
|
};
|
|
774
|
+
const applyDefaults = (shouldReceiveBuilderProps) => {
|
|
775
|
+
return {
|
|
776
|
+
// once we bump to a major version, toggle this to `false`.
|
|
777
|
+
builderBlock: true,
|
|
778
|
+
// once we bump to a major version, toggle this to `false`.
|
|
779
|
+
builderContext: true,
|
|
780
|
+
builderComponents: false,
|
|
781
|
+
builderLinkComponent: false,
|
|
782
|
+
...shouldReceiveBuilderProps
|
|
783
|
+
};
|
|
784
|
+
};
|
|
774
785
|
const provideLinkComponent = (block, linkComponent) => {
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
"Builder:Accordion"
|
|
782
|
-
].includes(block.name)) ? {
|
|
786
|
+
if (!block)
|
|
787
|
+
return {};
|
|
788
|
+
const shouldReceiveProp = applyDefaults(block.shouldReceiveBuilderProps).builderLinkComponent;
|
|
789
|
+
if (!shouldReceiveProp)
|
|
790
|
+
return {};
|
|
791
|
+
return {
|
|
783
792
|
builderLinkComponent: linkComponent
|
|
784
|
-
}
|
|
793
|
+
};
|
|
785
794
|
};
|
|
786
795
|
const provideRegisteredComponents = (block, registeredComponents) => {
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
].includes(block.name)) ? {
|
|
796
|
+
if (!block)
|
|
797
|
+
return {};
|
|
798
|
+
const shouldReceiveProp = applyDefaults(block.shouldReceiveBuilderProps).builderComponents;
|
|
799
|
+
if (!shouldReceiveProp)
|
|
800
|
+
return {};
|
|
801
|
+
return {
|
|
794
802
|
builderComponents: registeredComponents
|
|
795
|
-
}
|
|
803
|
+
};
|
|
796
804
|
};
|
|
797
805
|
const provideBuilderBlock = (block, builderBlock) => {
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
"Image",
|
|
805
|
-
"Video"
|
|
806
|
-
].includes(block.name)) ? {
|
|
806
|
+
if (!block)
|
|
807
|
+
return {};
|
|
808
|
+
const shouldReceiveProp = applyDefaults(block.shouldReceiveBuilderProps).builderBlock;
|
|
809
|
+
if (!shouldReceiveProp)
|
|
810
|
+
return {};
|
|
811
|
+
return {
|
|
807
812
|
builderBlock
|
|
808
|
-
}
|
|
813
|
+
};
|
|
809
814
|
};
|
|
810
815
|
const provideBuilderContext = (block, context) => {
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
"Slot"
|
|
818
|
-
].includes(block.name)) ? {
|
|
816
|
+
if (!block)
|
|
817
|
+
return {};
|
|
818
|
+
const shouldReceiveProp = applyDefaults(block.shouldReceiveBuilderProps).builderContext;
|
|
819
|
+
if (!shouldReceiveProp)
|
|
820
|
+
return {};
|
|
821
|
+
return {
|
|
819
822
|
builderContext: context
|
|
820
|
-
}
|
|
823
|
+
};
|
|
821
824
|
};
|
|
822
825
|
const SIZES = {
|
|
823
826
|
small: {
|
|
@@ -2399,7 +2402,13 @@ const componentInfo$i = {
|
|
|
2399
2402
|
options.set("items", []);
|
|
2400
2403
|
}
|
|
2401
2404
|
}
|
|
2402
|
-
]
|
|
2405
|
+
],
|
|
2406
|
+
shouldReceiveBuilderProps: {
|
|
2407
|
+
builderBlock: true,
|
|
2408
|
+
builderContext: true,
|
|
2409
|
+
builderComponents: true,
|
|
2410
|
+
builderLinkComponent: true
|
|
2411
|
+
}
|
|
2403
2412
|
};
|
|
2404
2413
|
const convertOrderNumberToString = (order) => {
|
|
2405
2414
|
return order.toString();
|
|
@@ -2645,7 +2654,13 @@ const componentInfo$h = {
|
|
|
2645
2654
|
}
|
|
2646
2655
|
],
|
|
2647
2656
|
static: true,
|
|
2648
|
-
noWrap: true
|
|
2657
|
+
noWrap: true,
|
|
2658
|
+
shouldReceiveBuilderProps: {
|
|
2659
|
+
builderBlock: false,
|
|
2660
|
+
builderContext: false,
|
|
2661
|
+
builderComponents: false,
|
|
2662
|
+
builderLinkComponent: true
|
|
2663
|
+
}
|
|
2649
2664
|
};
|
|
2650
2665
|
const componentInfo$g = {
|
|
2651
2666
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
@@ -2887,9 +2902,21 @@ const componentInfo$g = {
|
|
|
2887
2902
|
helperText: "When stacking columns for mobile devices, reverse the ordering",
|
|
2888
2903
|
advanced: true
|
|
2889
2904
|
}
|
|
2890
|
-
]
|
|
2905
|
+
],
|
|
2906
|
+
shouldReceiveBuilderProps: {
|
|
2907
|
+
builderBlock: true,
|
|
2908
|
+
builderContext: true,
|
|
2909
|
+
builderComponents: true,
|
|
2910
|
+
builderLinkComponent: true
|
|
2911
|
+
}
|
|
2891
2912
|
};
|
|
2892
2913
|
const componentInfo$f = {
|
|
2914
|
+
shouldReceiveBuilderProps: {
|
|
2915
|
+
builderBlock: false,
|
|
2916
|
+
builderContext: false,
|
|
2917
|
+
builderComponents: false,
|
|
2918
|
+
builderLinkComponent: false
|
|
2919
|
+
},
|
|
2893
2920
|
name: "Fragment",
|
|
2894
2921
|
static: true,
|
|
2895
2922
|
hidden: true,
|
|
@@ -3049,9 +3076,21 @@ const componentInfo$e = {
|
|
|
3049
3076
|
advanced: true,
|
|
3050
3077
|
defaultValue: 0.7041
|
|
3051
3078
|
}
|
|
3052
|
-
]
|
|
3079
|
+
],
|
|
3080
|
+
shouldReceiveBuilderProps: {
|
|
3081
|
+
builderBlock: true,
|
|
3082
|
+
builderContext: false,
|
|
3083
|
+
builderComponents: false,
|
|
3084
|
+
builderLinkComponent: false
|
|
3085
|
+
}
|
|
3053
3086
|
};
|
|
3054
3087
|
const componentInfo$d = {
|
|
3088
|
+
shouldReceiveBuilderProps: {
|
|
3089
|
+
builderBlock: false,
|
|
3090
|
+
builderContext: false,
|
|
3091
|
+
builderComponents: false,
|
|
3092
|
+
builderLinkComponent: false
|
|
3093
|
+
},
|
|
3055
3094
|
name: "Core:Section",
|
|
3056
3095
|
static: true,
|
|
3057
3096
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -3110,7 +3149,13 @@ const componentInfo$c = {
|
|
|
3110
3149
|
required: true,
|
|
3111
3150
|
defaultValue: "children"
|
|
3112
3151
|
}
|
|
3113
|
-
]
|
|
3152
|
+
],
|
|
3153
|
+
shouldReceiveBuilderProps: {
|
|
3154
|
+
builderBlock: false,
|
|
3155
|
+
builderContext: true,
|
|
3156
|
+
builderComponents: false,
|
|
3157
|
+
builderLinkComponent: false
|
|
3158
|
+
}
|
|
3114
3159
|
};
|
|
3115
3160
|
const Slot = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
3116
3161
|
var _a, _b;
|
|
@@ -3189,7 +3234,13 @@ const componentInfo$b = {
|
|
|
3189
3234
|
hideFromUI: true,
|
|
3190
3235
|
type: "boolean"
|
|
3191
3236
|
}
|
|
3192
|
-
]
|
|
3237
|
+
],
|
|
3238
|
+
shouldReceiveBuilderProps: {
|
|
3239
|
+
builderBlock: true,
|
|
3240
|
+
builderContext: true,
|
|
3241
|
+
builderComponents: true,
|
|
3242
|
+
builderLinkComponent: true
|
|
3243
|
+
}
|
|
3193
3244
|
};
|
|
3194
3245
|
const defaultTab = {
|
|
3195
3246
|
"@type": "@builder.io/sdk:Element",
|
|
@@ -3357,7 +3408,13 @@ const componentInfo$a = {
|
|
|
3357
3408
|
}
|
|
3358
3409
|
]
|
|
3359
3410
|
}
|
|
3360
|
-
]
|
|
3411
|
+
],
|
|
3412
|
+
shouldReceiveBuilderProps: {
|
|
3413
|
+
builderBlock: true,
|
|
3414
|
+
builderContext: true,
|
|
3415
|
+
builderComponents: true,
|
|
3416
|
+
builderLinkComponent: true
|
|
3417
|
+
}
|
|
3361
3418
|
};
|
|
3362
3419
|
const activeTabContent = function activeTabContent2(props, state, active) {
|
|
3363
3420
|
return props.tabs && props.tabs[active].content;
|
|
@@ -3470,6 +3527,12 @@ const Tabs = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((
|
|
|
3470
3527
|
], 1, "6k_3");
|
|
3471
3528
|
}, "Tabs_component_MhWcxXy0lMY"));
|
|
3472
3529
|
const componentInfo$9 = {
|
|
3530
|
+
shouldReceiveBuilderProps: {
|
|
3531
|
+
builderBlock: false,
|
|
3532
|
+
builderContext: false,
|
|
3533
|
+
builderComponents: false,
|
|
3534
|
+
builderLinkComponent: false
|
|
3535
|
+
},
|
|
3473
3536
|
name: "Text",
|
|
3474
3537
|
static: true,
|
|
3475
3538
|
isRSC: true,
|
|
@@ -3505,6 +3568,12 @@ const Text = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((
|
|
|
3505
3568
|
}, null, 3, "yO_0");
|
|
3506
3569
|
}, "Text_component_15p0cKUxgIE"));
|
|
3507
3570
|
const componentInfo$8 = {
|
|
3571
|
+
shouldReceiveBuilderProps: {
|
|
3572
|
+
builderBlock: false,
|
|
3573
|
+
builderContext: false,
|
|
3574
|
+
builderComponents: false,
|
|
3575
|
+
builderLinkComponent: false
|
|
3576
|
+
},
|
|
3508
3577
|
name: "Custom Code",
|
|
3509
3578
|
static: true,
|
|
3510
3579
|
requiredPermissions: [
|
|
@@ -3584,6 +3653,12 @@ const CustomCode = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inline
|
|
|
3584
3653
|
}, null, 3, "bY_0");
|
|
3585
3654
|
}, "CustomCode_component_uYOSy7w7Zqw"));
|
|
3586
3655
|
const componentInfo$7 = {
|
|
3656
|
+
shouldReceiveBuilderProps: {
|
|
3657
|
+
builderBlock: false,
|
|
3658
|
+
builderContext: false,
|
|
3659
|
+
builderComponents: false,
|
|
3660
|
+
builderLinkComponent: false
|
|
3661
|
+
},
|
|
3587
3662
|
name: "Embed",
|
|
3588
3663
|
static: true,
|
|
3589
3664
|
inputs: [
|
|
@@ -3946,7 +4021,13 @@ const componentInfo$6 = {
|
|
|
3946
4021
|
}
|
|
3947
4022
|
}
|
|
3948
4023
|
}
|
|
3949
|
-
]
|
|
4024
|
+
],
|
|
4025
|
+
shouldReceiveBuilderProps: {
|
|
4026
|
+
builderBlock: true,
|
|
4027
|
+
builderContext: true,
|
|
4028
|
+
builderComponents: true,
|
|
4029
|
+
builderLinkComponent: true
|
|
4030
|
+
}
|
|
3950
4031
|
};
|
|
3951
4032
|
const validEnvList = [
|
|
3952
4033
|
"production",
|
|
@@ -4258,6 +4339,12 @@ const STYLES = `
|
|
|
4258
4339
|
}
|
|
4259
4340
|
`;
|
|
4260
4341
|
const componentInfo$5 = {
|
|
4342
|
+
shouldReceiveBuilderProps: {
|
|
4343
|
+
builderBlock: false,
|
|
4344
|
+
builderContext: false,
|
|
4345
|
+
builderComponents: false,
|
|
4346
|
+
builderLinkComponent: false
|
|
4347
|
+
},
|
|
4261
4348
|
name: "Form:Input",
|
|
4262
4349
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
4263
4350
|
inputs: [
|
|
@@ -4341,6 +4428,12 @@ const FormInputComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwi
|
|
|
4341
4428
|
});
|
|
4342
4429
|
}, "FormInputComponent_component_AUUjdN0ueMs"));
|
|
4343
4430
|
const componentInfo$4 = {
|
|
4431
|
+
shouldReceiveBuilderProps: {
|
|
4432
|
+
builderBlock: false,
|
|
4433
|
+
builderContext: false,
|
|
4434
|
+
builderComponents: false,
|
|
4435
|
+
builderLinkComponent: false
|
|
4436
|
+
},
|
|
4344
4437
|
name: "Form:Select",
|
|
4345
4438
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
4346
4439
|
defaultStyles: {
|
|
@@ -4410,6 +4503,12 @@ const SelectComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
4410
4503
|
}));
|
|
4411
4504
|
}, "SelectComponent_component_SPKbsFLikZU"));
|
|
4412
4505
|
const componentInfo$3 = {
|
|
4506
|
+
shouldReceiveBuilderProps: {
|
|
4507
|
+
builderBlock: false,
|
|
4508
|
+
builderContext: false,
|
|
4509
|
+
builderComponents: false,
|
|
4510
|
+
builderLinkComponent: false
|
|
4511
|
+
},
|
|
4413
4512
|
name: "Form:SubmitButton",
|
|
4414
4513
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
4415
4514
|
defaultStyles: {
|
|
@@ -4444,6 +4543,12 @@ const SubmitButton = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
|
|
|
4444
4543
|
}, 0, "6z_0");
|
|
4445
4544
|
}, "SubmitButton_component_NXvMBMCDhwc"));
|
|
4446
4545
|
const componentInfo$2 = {
|
|
4546
|
+
shouldReceiveBuilderProps: {
|
|
4547
|
+
builderBlock: false,
|
|
4548
|
+
builderContext: false,
|
|
4549
|
+
builderComponents: false,
|
|
4550
|
+
builderLinkComponent: false
|
|
4551
|
+
},
|
|
4447
4552
|
name: "Form:TextArea",
|
|
4448
4553
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
|
|
4449
4554
|
inputs: [
|
|
@@ -4508,6 +4613,12 @@ const Textarea = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQ
|
|
|
4508
4613
|
}, 0, "kE_0");
|
|
4509
4614
|
}, "Textarea_component_o1TcxV139Oc"));
|
|
4510
4615
|
const componentInfo$1 = {
|
|
4616
|
+
shouldReceiveBuilderProps: {
|
|
4617
|
+
builderBlock: false,
|
|
4618
|
+
builderContext: false,
|
|
4619
|
+
builderComponents: false,
|
|
4620
|
+
builderLinkComponent: false
|
|
4621
|
+
},
|
|
4511
4622
|
// friendlyName?
|
|
4512
4623
|
name: "Raw:Img",
|
|
4513
4624
|
hideFromInsertMenu: true,
|
|
@@ -4669,7 +4780,13 @@ const componentInfo = {
|
|
|
4669
4780
|
defaultValue: true,
|
|
4670
4781
|
advanced: true
|
|
4671
4782
|
}
|
|
4672
|
-
]
|
|
4783
|
+
],
|
|
4784
|
+
shouldReceiveBuilderProps: {
|
|
4785
|
+
builderBlock: true,
|
|
4786
|
+
builderContext: false,
|
|
4787
|
+
builderComponents: false,
|
|
4788
|
+
builderLinkComponent: false
|
|
4789
|
+
}
|
|
4673
4790
|
};
|
|
4674
4791
|
const Video = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
4675
4792
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
@@ -5316,7 +5433,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
5316
5433
|
const url = new URL(e.origin), hostname = url.hostname;
|
|
5317
5434
|
return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
|
|
5318
5435
|
}
|
|
5319
|
-
const SDK_VERSION = "0.
|
|
5436
|
+
const SDK_VERSION = "0.15.0";
|
|
5320
5437
|
const registry = {};
|
|
5321
5438
|
function register(type, info) {
|
|
5322
5439
|
let typeList = registry[type];
|
|
@@ -6255,6 +6372,8 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
6255
6372
|
props,
|
|
6256
6373
|
state
|
|
6257
6374
|
]));
|
|
6375
|
+
qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(({ track: track2 }) => {
|
|
6376
|
+
}, "ContentVariants_component_useTask_lSvynevU008"));
|
|
6258
6377
|
return /* @__PURE__ */ qwik._jsxC(qwik.Fragment, {
|
|
6259
6378
|
children: [
|
|
6260
6379
|
!props.isNestedRender && TARGET !== "reactNative" ? /* @__PURE__ */ qwik._jsxC(InlinedScript, {
|