@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.
@@ -624,53 +624,56 @@ const getRepeatItemData = ({ block, context }) => {
624
624
  }));
625
625
  return repeatArray;
626
626
  };
627
+ const applyDefaults = (shouldReceiveBuilderProps) => {
628
+ return {
629
+ // once we bump to a major version, toggle this to `false`.
630
+ builderBlock: true,
631
+ // once we bump to a major version, toggle this to `false`.
632
+ builderContext: true,
633
+ builderComponents: false,
634
+ builderLinkComponent: false,
635
+ ...shouldReceiveBuilderProps
636
+ };
637
+ };
627
638
  const provideLinkComponent = (block, linkComponent) => {
628
- return block && (block.isRSC && TARGET === "rsc" || [
629
- "Core:Button",
630
- "Symbol",
631
- "Columns",
632
- "Form:Form",
633
- "Builder: Tabs",
634
- "Builder:Accordion"
635
- ].includes(block.name)) ? {
639
+ if (!block)
640
+ return {};
641
+ const shouldReceiveProp = applyDefaults(block.shouldReceiveBuilderProps).builderLinkComponent;
642
+ if (!shouldReceiveProp)
643
+ return {};
644
+ return {
636
645
  builderLinkComponent: linkComponent
637
- } : {};
646
+ };
638
647
  };
639
648
  const provideRegisteredComponents = (block, registeredComponents) => {
640
- return block && (block.isRSC && TARGET === "rsc" || [
641
- "Symbol",
642
- "Columns",
643
- "Form:Form",
644
- "Builder: Tabs",
645
- "Builder:Accordion"
646
- ].includes(block.name)) ? {
649
+ if (!block)
650
+ return {};
651
+ const shouldReceiveProp = applyDefaults(block.shouldReceiveBuilderProps).builderComponents;
652
+ if (!shouldReceiveProp)
653
+ return {};
654
+ return {
647
655
  builderComponents: registeredComponents
648
- } : {};
656
+ };
649
657
  };
650
658
  const provideBuilderBlock = (block, builderBlock) => {
651
- return block && (block.isRSC && TARGET === "rsc" || TARGET === "reactNative" || [
652
- "Builder:Accordion",
653
- "Columns",
654
- "Form:Form",
655
- "Builder: Tabs",
656
- "Symbol",
657
- "Image",
658
- "Video"
659
- ].includes(block.name)) ? {
659
+ if (!block)
660
+ return {};
661
+ const shouldReceiveProp = applyDefaults(block.shouldReceiveBuilderProps).builderBlock;
662
+ if (!shouldReceiveProp)
663
+ return {};
664
+ return {
660
665
  builderBlock
661
- } : {};
666
+ };
662
667
  };
663
668
  const provideBuilderContext = (block, context) => {
664
- return block && (block.isRSC && TARGET === "rsc" || [
665
- "Builder:Accordion",
666
- "Columns",
667
- "Form:Form",
668
- "Builder: Tabs",
669
- "Symbol",
670
- "Slot"
671
- ].includes(block.name)) ? {
669
+ if (!block)
670
+ return {};
671
+ const shouldReceiveProp = applyDefaults(block.shouldReceiveBuilderProps).builderContext;
672
+ if (!shouldReceiveProp)
673
+ return {};
674
+ return {
672
675
  builderContext: context
673
- } : {};
676
+ };
674
677
  };
675
678
  const SIZES = {
676
679
  small: {
@@ -2252,7 +2255,13 @@ const componentInfo$i = {
2252
2255
  options.set("items", []);
2253
2256
  }
2254
2257
  }
2255
- ]
2258
+ ],
2259
+ shouldReceiveBuilderProps: {
2260
+ builderBlock: true,
2261
+ builderContext: true,
2262
+ builderComponents: true,
2263
+ builderLinkComponent: true
2264
+ }
2256
2265
  };
2257
2266
  const convertOrderNumberToString = (order) => {
2258
2267
  return order.toString();
@@ -2498,7 +2507,13 @@ const componentInfo$h = {
2498
2507
  }
2499
2508
  ],
2500
2509
  static: true,
2501
- noWrap: true
2510
+ noWrap: true,
2511
+ shouldReceiveBuilderProps: {
2512
+ builderBlock: false,
2513
+ builderContext: false,
2514
+ builderComponents: false,
2515
+ builderLinkComponent: true
2516
+ }
2502
2517
  };
2503
2518
  const componentInfo$g = {
2504
2519
  // TODO: ways to statically preprocess JSON for references, functions, etc
@@ -2740,9 +2755,21 @@ const componentInfo$g = {
2740
2755
  helperText: "When stacking columns for mobile devices, reverse the ordering",
2741
2756
  advanced: true
2742
2757
  }
2743
- ]
2758
+ ],
2759
+ shouldReceiveBuilderProps: {
2760
+ builderBlock: true,
2761
+ builderContext: true,
2762
+ builderComponents: true,
2763
+ builderLinkComponent: true
2764
+ }
2744
2765
  };
2745
2766
  const componentInfo$f = {
2767
+ shouldReceiveBuilderProps: {
2768
+ builderBlock: false,
2769
+ builderContext: false,
2770
+ builderComponents: false,
2771
+ builderLinkComponent: false
2772
+ },
2746
2773
  name: "Fragment",
2747
2774
  static: true,
2748
2775
  hidden: true,
@@ -2902,9 +2929,21 @@ const componentInfo$e = {
2902
2929
  advanced: true,
2903
2930
  defaultValue: 0.7041
2904
2931
  }
2905
- ]
2932
+ ],
2933
+ shouldReceiveBuilderProps: {
2934
+ builderBlock: true,
2935
+ builderContext: false,
2936
+ builderComponents: false,
2937
+ builderLinkComponent: false
2938
+ }
2906
2939
  };
2907
2940
  const componentInfo$d = {
2941
+ shouldReceiveBuilderProps: {
2942
+ builderBlock: false,
2943
+ builderContext: false,
2944
+ builderComponents: false,
2945
+ builderLinkComponent: false
2946
+ },
2908
2947
  name: "Core:Section",
2909
2948
  static: true,
2910
2949
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
@@ -2963,7 +3002,13 @@ const componentInfo$c = {
2963
3002
  required: true,
2964
3003
  defaultValue: "children"
2965
3004
  }
2966
- ]
3005
+ ],
3006
+ shouldReceiveBuilderProps: {
3007
+ builderBlock: false,
3008
+ builderContext: true,
3009
+ builderComponents: false,
3010
+ builderLinkComponent: false
3011
+ }
2967
3012
  };
2968
3013
  const Slot = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
2969
3014
  var _a, _b;
@@ -3042,7 +3087,13 @@ const componentInfo$b = {
3042
3087
  hideFromUI: true,
3043
3088
  type: "boolean"
3044
3089
  }
3045
- ]
3090
+ ],
3091
+ shouldReceiveBuilderProps: {
3092
+ builderBlock: true,
3093
+ builderContext: true,
3094
+ builderComponents: true,
3095
+ builderLinkComponent: true
3096
+ }
3046
3097
  };
3047
3098
  const defaultTab = {
3048
3099
  "@type": "@builder.io/sdk:Element",
@@ -3210,7 +3261,13 @@ const componentInfo$a = {
3210
3261
  }
3211
3262
  ]
3212
3263
  }
3213
- ]
3264
+ ],
3265
+ shouldReceiveBuilderProps: {
3266
+ builderBlock: true,
3267
+ builderContext: true,
3268
+ builderComponents: true,
3269
+ builderLinkComponent: true
3270
+ }
3214
3271
  };
3215
3272
  const activeTabContent = function activeTabContent2(props, state, active) {
3216
3273
  return props.tabs && props.tabs[active].content;
@@ -3323,6 +3380,12 @@ const Tabs = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
3323
3380
  ], 1, "6k_3");
3324
3381
  }, "Tabs_component_MhWcxXy0lMY"));
3325
3382
  const componentInfo$9 = {
3383
+ shouldReceiveBuilderProps: {
3384
+ builderBlock: false,
3385
+ builderContext: false,
3386
+ builderComponents: false,
3387
+ builderLinkComponent: false
3388
+ },
3326
3389
  name: "Text",
3327
3390
  static: true,
3328
3391
  isRSC: true,
@@ -3358,6 +3421,12 @@ const Text = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
3358
3421
  }, null, 3, "yO_0");
3359
3422
  }, "Text_component_15p0cKUxgIE"));
3360
3423
  const componentInfo$8 = {
3424
+ shouldReceiveBuilderProps: {
3425
+ builderBlock: false,
3426
+ builderContext: false,
3427
+ builderComponents: false,
3428
+ builderLinkComponent: false
3429
+ },
3361
3430
  name: "Custom Code",
3362
3431
  static: true,
3363
3432
  requiredPermissions: [
@@ -3437,6 +3506,12 @@ const CustomCode = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((prop
3437
3506
  }, null, 3, "bY_0");
3438
3507
  }, "CustomCode_component_uYOSy7w7Zqw"));
3439
3508
  const componentInfo$7 = {
3509
+ shouldReceiveBuilderProps: {
3510
+ builderBlock: false,
3511
+ builderContext: false,
3512
+ builderComponents: false,
3513
+ builderLinkComponent: false
3514
+ },
3440
3515
  name: "Embed",
3441
3516
  static: true,
3442
3517
  inputs: [
@@ -3799,7 +3874,13 @@ const componentInfo$6 = {
3799
3874
  }
3800
3875
  }
3801
3876
  }
3802
- ]
3877
+ ],
3878
+ shouldReceiveBuilderProps: {
3879
+ builderBlock: true,
3880
+ builderContext: true,
3881
+ builderComponents: true,
3882
+ builderLinkComponent: true
3883
+ }
3803
3884
  };
3804
3885
  const validEnvList = [
3805
3886
  "production",
@@ -4111,6 +4192,12 @@ const STYLES = `
4111
4192
  }
4112
4193
  `;
4113
4194
  const componentInfo$5 = {
4195
+ shouldReceiveBuilderProps: {
4196
+ builderBlock: false,
4197
+ builderContext: false,
4198
+ builderComponents: false,
4199
+ builderLinkComponent: false
4200
+ },
4114
4201
  name: "Form:Input",
4115
4202
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
4116
4203
  inputs: [
@@ -4194,6 +4281,12 @@ const FormInputComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQ
4194
4281
  });
4195
4282
  }, "FormInputComponent_component_AUUjdN0ueMs"));
4196
4283
  const componentInfo$4 = {
4284
+ shouldReceiveBuilderProps: {
4285
+ builderBlock: false,
4286
+ builderContext: false,
4287
+ builderComponents: false,
4288
+ builderLinkComponent: false
4289
+ },
4197
4290
  name: "Form:Select",
4198
4291
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
4199
4292
  defaultStyles: {
@@ -4263,6 +4356,12 @@ const SelectComponent = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
4263
4356
  }));
4264
4357
  }, "SelectComponent_component_SPKbsFLikZU"));
4265
4358
  const componentInfo$3 = {
4359
+ shouldReceiveBuilderProps: {
4360
+ builderBlock: false,
4361
+ builderContext: false,
4362
+ builderComponents: false,
4363
+ builderLinkComponent: false
4364
+ },
4266
4365
  name: "Form:SubmitButton",
4267
4366
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
4268
4367
  defaultStyles: {
@@ -4297,6 +4396,12 @@ const SubmitButton = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
4297
4396
  }, 0, "6z_0");
4298
4397
  }, "SubmitButton_component_NXvMBMCDhwc"));
4299
4398
  const componentInfo$2 = {
4399
+ shouldReceiveBuilderProps: {
4400
+ builderBlock: false,
4401
+ builderContext: false,
4402
+ builderComponents: false,
4403
+ builderLinkComponent: false
4404
+ },
4300
4405
  name: "Form:TextArea",
4301
4406
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
4302
4407
  inputs: [
@@ -4361,6 +4466,12 @@ const Textarea = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props)
4361
4466
  }, 0, "kE_0");
4362
4467
  }, "Textarea_component_o1TcxV139Oc"));
4363
4468
  const componentInfo$1 = {
4469
+ shouldReceiveBuilderProps: {
4470
+ builderBlock: false,
4471
+ builderContext: false,
4472
+ builderComponents: false,
4473
+ builderLinkComponent: false
4474
+ },
4364
4475
  // friendlyName?
4365
4476
  name: "Raw:Img",
4366
4477
  hideFromInsertMenu: true,
@@ -4522,7 +4633,13 @@ const componentInfo = {
4522
4633
  defaultValue: true,
4523
4634
  advanced: true
4524
4635
  }
4525
- ]
4636
+ ],
4637
+ shouldReceiveBuilderProps: {
4638
+ builderBlock: true,
4639
+ builderContext: false,
4640
+ builderComponents: false,
4641
+ builderLinkComponent: false
4642
+ }
4526
4643
  };
4527
4644
  const Video = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
4528
4645
  var _a, _b, _c, _d, _e, _f, _g;
@@ -5169,7 +5286,7 @@ function isFromTrustedHost(trustedHosts, e) {
5169
5286
  const url = new URL(e.origin), hostname = url.hostname;
5170
5287
  return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
5171
5288
  }
5172
- const SDK_VERSION = "0.14.31";
5289
+ const SDK_VERSION = "0.15.0";
5173
5290
  const registry = {};
5174
5291
  function register(type, info) {
5175
5292
  let typeList = registry[type];
@@ -6108,6 +6225,8 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
6108
6225
  props,
6109
6226
  state
6110
6227
  ]));
6228
+ useTaskQrl(/* @__PURE__ */ inlinedQrl(({ track: track2 }) => {
6229
+ }, "ContentVariants_component_useTask_lSvynevU008"));
6111
6230
  return /* @__PURE__ */ _jsxC(Fragment$1, {
6112
6231
  children: [
6113
6232
  !props.isNestedRender && TARGET !== "reactNative" ? /* @__PURE__ */ _jsxC(InlinedScript, {