@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.
@@ -626,53 +626,56 @@ const getRepeatItemData = ({ block, context }) => {
626
626
  }));
627
627
  return repeatArray;
628
628
  };
629
+ const applyDefaults = (shouldReceiveBuilderProps) => {
630
+ return {
631
+ // once we bump to a major version, toggle this to `false`.
632
+ builderBlock: true,
633
+ // once we bump to a major version, toggle this to `false`.
634
+ builderContext: true,
635
+ builderComponents: false,
636
+ builderLinkComponent: false,
637
+ ...shouldReceiveBuilderProps
638
+ };
639
+ };
629
640
  const provideLinkComponent = (block, linkComponent) => {
630
- return block && (block.isRSC && TARGET === "rsc" || [
631
- "Core:Button",
632
- "Symbol",
633
- "Columns",
634
- "Form:Form",
635
- "Builder: Tabs",
636
- "Builder:Accordion"
637
- ].includes(block.name)) ? {
641
+ if (!block)
642
+ return {};
643
+ const shouldReceiveProp = applyDefaults(block.shouldReceiveBuilderProps).builderLinkComponent;
644
+ if (!shouldReceiveProp)
645
+ return {};
646
+ return {
638
647
  builderLinkComponent: linkComponent
639
- } : {};
648
+ };
640
649
  };
641
650
  const provideRegisteredComponents = (block, registeredComponents) => {
642
- return block && (block.isRSC && TARGET === "rsc" || [
643
- "Symbol",
644
- "Columns",
645
- "Form:Form",
646
- "Builder: Tabs",
647
- "Builder:Accordion"
648
- ].includes(block.name)) ? {
651
+ if (!block)
652
+ return {};
653
+ const shouldReceiveProp = applyDefaults(block.shouldReceiveBuilderProps).builderComponents;
654
+ if (!shouldReceiveProp)
655
+ return {};
656
+ return {
649
657
  builderComponents: registeredComponents
650
- } : {};
658
+ };
651
659
  };
652
660
  const provideBuilderBlock = (block, builderBlock) => {
653
- return block && (block.isRSC && TARGET === "rsc" || TARGET === "reactNative" || [
654
- "Builder:Accordion",
655
- "Columns",
656
- "Form:Form",
657
- "Builder: Tabs",
658
- "Symbol",
659
- "Image",
660
- "Video"
661
- ].includes(block.name)) ? {
661
+ if (!block)
662
+ return {};
663
+ const shouldReceiveProp = applyDefaults(block.shouldReceiveBuilderProps).builderBlock;
664
+ if (!shouldReceiveProp)
665
+ return {};
666
+ return {
662
667
  builderBlock
663
- } : {};
668
+ };
664
669
  };
665
670
  const provideBuilderContext = (block, context) => {
666
- return block && (block.isRSC && TARGET === "rsc" || [
667
- "Builder:Accordion",
668
- "Columns",
669
- "Form:Form",
670
- "Builder: Tabs",
671
- "Symbol",
672
- "Slot"
673
- ].includes(block.name)) ? {
671
+ if (!block)
672
+ return {};
673
+ const shouldReceiveProp = applyDefaults(block.shouldReceiveBuilderProps).builderContext;
674
+ if (!shouldReceiveProp)
675
+ return {};
676
+ return {
674
677
  builderContext: context
675
- } : {};
678
+ };
676
679
  };
677
680
  const SIZES = {
678
681
  small: {
@@ -2254,7 +2257,13 @@ const componentInfo$i = {
2254
2257
  options.set("items", []);
2255
2258
  }
2256
2259
  }
2257
- ]
2260
+ ],
2261
+ shouldReceiveBuilderProps: {
2262
+ builderBlock: true,
2263
+ builderContext: true,
2264
+ builderComponents: true,
2265
+ builderLinkComponent: true
2266
+ }
2258
2267
  };
2259
2268
  const convertOrderNumberToString = (order) => {
2260
2269
  return order.toString();
@@ -2500,7 +2509,13 @@ const componentInfo$h = {
2500
2509
  }
2501
2510
  ],
2502
2511
  static: true,
2503
- noWrap: true
2512
+ noWrap: true,
2513
+ shouldReceiveBuilderProps: {
2514
+ builderBlock: false,
2515
+ builderContext: false,
2516
+ builderComponents: false,
2517
+ builderLinkComponent: true
2518
+ }
2504
2519
  };
2505
2520
  const componentInfo$g = {
2506
2521
  // TODO: ways to statically preprocess JSON for references, functions, etc
@@ -2742,9 +2757,21 @@ const componentInfo$g = {
2742
2757
  helperText: "When stacking columns for mobile devices, reverse the ordering",
2743
2758
  advanced: true
2744
2759
  }
2745
- ]
2760
+ ],
2761
+ shouldReceiveBuilderProps: {
2762
+ builderBlock: true,
2763
+ builderContext: true,
2764
+ builderComponents: true,
2765
+ builderLinkComponent: true
2766
+ }
2746
2767
  };
2747
2768
  const componentInfo$f = {
2769
+ shouldReceiveBuilderProps: {
2770
+ builderBlock: false,
2771
+ builderContext: false,
2772
+ builderComponents: false,
2773
+ builderLinkComponent: false
2774
+ },
2748
2775
  name: "Fragment",
2749
2776
  static: true,
2750
2777
  hidden: true,
@@ -2904,9 +2931,21 @@ const componentInfo$e = {
2904
2931
  advanced: true,
2905
2932
  defaultValue: 0.7041
2906
2933
  }
2907
- ]
2934
+ ],
2935
+ shouldReceiveBuilderProps: {
2936
+ builderBlock: true,
2937
+ builderContext: false,
2938
+ builderComponents: false,
2939
+ builderLinkComponent: false
2940
+ }
2908
2941
  };
2909
2942
  const componentInfo$d = {
2943
+ shouldReceiveBuilderProps: {
2944
+ builderBlock: false,
2945
+ builderContext: false,
2946
+ builderComponents: false,
2947
+ builderLinkComponent: false
2948
+ },
2910
2949
  name: "Core:Section",
2911
2950
  static: true,
2912
2951
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
@@ -2965,7 +3004,13 @@ const componentInfo$c = {
2965
3004
  required: true,
2966
3005
  defaultValue: "children"
2967
3006
  }
2968
- ]
3007
+ ],
3008
+ shouldReceiveBuilderProps: {
3009
+ builderBlock: false,
3010
+ builderContext: true,
3011
+ builderComponents: false,
3012
+ builderLinkComponent: false
3013
+ }
2969
3014
  };
2970
3015
  const Slot = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
2971
3016
  var _a, _b;
@@ -3044,7 +3089,13 @@ const componentInfo$b = {
3044
3089
  hideFromUI: true,
3045
3090
  type: "boolean"
3046
3091
  }
3047
- ]
3092
+ ],
3093
+ shouldReceiveBuilderProps: {
3094
+ builderBlock: true,
3095
+ builderContext: true,
3096
+ builderComponents: true,
3097
+ builderLinkComponent: true
3098
+ }
3048
3099
  };
3049
3100
  const defaultTab = {
3050
3101
  "@type": "@builder.io/sdk:Element",
@@ -3212,7 +3263,13 @@ const componentInfo$a = {
3212
3263
  }
3213
3264
  ]
3214
3265
  }
3215
- ]
3266
+ ],
3267
+ shouldReceiveBuilderProps: {
3268
+ builderBlock: true,
3269
+ builderContext: true,
3270
+ builderComponents: true,
3271
+ builderLinkComponent: true
3272
+ }
3216
3273
  };
3217
3274
  const activeTabContent = function activeTabContent2(props, state, active) {
3218
3275
  return props.tabs && props.tabs[active].content;
@@ -3325,6 +3382,12 @@ const Tabs = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((
3325
3382
  ], 1, "6k_3");
3326
3383
  }, "Tabs_component_MhWcxXy0lMY"));
3327
3384
  const componentInfo$9 = {
3385
+ shouldReceiveBuilderProps: {
3386
+ builderBlock: false,
3387
+ builderContext: false,
3388
+ builderComponents: false,
3389
+ builderLinkComponent: false
3390
+ },
3328
3391
  name: "Text",
3329
3392
  static: true,
3330
3393
  isRSC: true,
@@ -3360,6 +3423,12 @@ const Text = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((
3360
3423
  }, null, 3, "yO_0");
3361
3424
  }, "Text_component_15p0cKUxgIE"));
3362
3425
  const componentInfo$8 = {
3426
+ shouldReceiveBuilderProps: {
3427
+ builderBlock: false,
3428
+ builderContext: false,
3429
+ builderComponents: false,
3430
+ builderLinkComponent: false
3431
+ },
3363
3432
  name: "Custom Code",
3364
3433
  static: true,
3365
3434
  requiredPermissions: [
@@ -3439,6 +3508,12 @@ const CustomCode = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inline
3439
3508
  }, null, 3, "bY_0");
3440
3509
  }, "CustomCode_component_uYOSy7w7Zqw"));
3441
3510
  const componentInfo$7 = {
3511
+ shouldReceiveBuilderProps: {
3512
+ builderBlock: false,
3513
+ builderContext: false,
3514
+ builderComponents: false,
3515
+ builderLinkComponent: false
3516
+ },
3442
3517
  name: "Embed",
3443
3518
  static: true,
3444
3519
  inputs: [
@@ -3801,7 +3876,13 @@ const componentInfo$6 = {
3801
3876
  }
3802
3877
  }
3803
3878
  }
3804
- ]
3879
+ ],
3880
+ shouldReceiveBuilderProps: {
3881
+ builderBlock: true,
3882
+ builderContext: true,
3883
+ builderComponents: true,
3884
+ builderLinkComponent: true
3885
+ }
3805
3886
  };
3806
3887
  const validEnvList = [
3807
3888
  "production",
@@ -4113,6 +4194,12 @@ const STYLES = `
4113
4194
  }
4114
4195
  `;
4115
4196
  const componentInfo$5 = {
4197
+ shouldReceiveBuilderProps: {
4198
+ builderBlock: false,
4199
+ builderContext: false,
4200
+ builderComponents: false,
4201
+ builderLinkComponent: false
4202
+ },
4116
4203
  name: "Form:Input",
4117
4204
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
4118
4205
  inputs: [
@@ -4196,6 +4283,12 @@ const FormInputComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwi
4196
4283
  });
4197
4284
  }, "FormInputComponent_component_AUUjdN0ueMs"));
4198
4285
  const componentInfo$4 = {
4286
+ shouldReceiveBuilderProps: {
4287
+ builderBlock: false,
4288
+ builderContext: false,
4289
+ builderComponents: false,
4290
+ builderLinkComponent: false
4291
+ },
4199
4292
  name: "Form:Select",
4200
4293
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
4201
4294
  defaultStyles: {
@@ -4265,6 +4358,12 @@ const SelectComponent = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
4265
4358
  }));
4266
4359
  }, "SelectComponent_component_SPKbsFLikZU"));
4267
4360
  const componentInfo$3 = {
4361
+ shouldReceiveBuilderProps: {
4362
+ builderBlock: false,
4363
+ builderContext: false,
4364
+ builderComponents: false,
4365
+ builderLinkComponent: false
4366
+ },
4268
4367
  name: "Form:SubmitButton",
4269
4368
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
4270
4369
  defaultStyles: {
@@ -4299,6 +4398,12 @@ const SubmitButton = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
4299
4398
  }, 0, "6z_0");
4300
4399
  }, "SubmitButton_component_NXvMBMCDhwc"));
4301
4400
  const componentInfo$2 = {
4401
+ shouldReceiveBuilderProps: {
4402
+ builderBlock: false,
4403
+ builderContext: false,
4404
+ builderComponents: false,
4405
+ builderLinkComponent: false
4406
+ },
4302
4407
  name: "Form:TextArea",
4303
4408
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
4304
4409
  inputs: [
@@ -4363,6 +4468,12 @@ const Textarea = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQ
4363
4468
  }, 0, "kE_0");
4364
4469
  }, "Textarea_component_o1TcxV139Oc"));
4365
4470
  const componentInfo$1 = {
4471
+ shouldReceiveBuilderProps: {
4472
+ builderBlock: false,
4473
+ builderContext: false,
4474
+ builderComponents: false,
4475
+ builderLinkComponent: false
4476
+ },
4366
4477
  // friendlyName?
4367
4478
  name: "Raw:Img",
4368
4479
  hideFromInsertMenu: true,
@@ -4524,7 +4635,13 @@ const componentInfo = {
4524
4635
  defaultValue: true,
4525
4636
  advanced: true
4526
4637
  }
4527
- ]
4638
+ ],
4639
+ shouldReceiveBuilderProps: {
4640
+ builderBlock: true,
4641
+ builderContext: false,
4642
+ builderComponents: false,
4643
+ builderLinkComponent: false
4644
+ }
4528
4645
  };
4529
4646
  const Video = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
4530
4647
  var _a, _b, _c, _d, _e, _f, _g;
@@ -5171,7 +5288,7 @@ function isFromTrustedHost(trustedHosts, e) {
5171
5288
  const url = new URL(e.origin), hostname = url.hostname;
5172
5289
  return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
5173
5290
  }
5174
- const SDK_VERSION = "0.14.31";
5291
+ const SDK_VERSION = "0.15.0";
5175
5292
  const registry = {};
5176
5293
  function register(type, info) {
5177
5294
  let typeList = registry[type];
@@ -6110,6 +6227,8 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
6110
6227
  props,
6111
6228
  state
6112
6229
  ]));
6230
+ qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(({ track: track2 }) => {
6231
+ }, "ContentVariants_component_useTask_lSvynevU008"));
6113
6232
  return /* @__PURE__ */ qwik._jsxC(qwik.Fragment, {
6114
6233
  children: [
6115
6234
  !props.isNestedRender && TARGET !== "reactNative" ? /* @__PURE__ */ qwik._jsxC(InlinedScript, {