@builder.io/sdk-qwik 0.10.0 → 0.11.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.
@@ -490,8 +490,7 @@ function getBlockActions(options) {
490
490
  let eventHandlerName = getEventHandlerName(key);
491
491
  if (options.stripPrefix)
492
492
  switch (TARGET) {
493
- case "vue2":
494
- case "vue3":
493
+ case "vue":
495
494
  eventHandlerName = eventHandlerName.replace("v-on:", "");
496
495
  break;
497
496
  case "svelte":
@@ -533,8 +532,7 @@ function getBlockProperties({ block, context }) {
533
532
  function getStyleAttribute(style) {
534
533
  switch (TARGET) {
535
534
  case "svelte":
536
- case "vue2":
537
- case "vue3":
535
+ case "vue":
538
536
  case "solid":
539
537
  return convertStyleMapToCSSArray(style).join(" ");
540
538
  case "qwik":
@@ -580,7 +578,7 @@ const BlockWrapper = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
580
578
  const InteractiveElement = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
581
579
  return /* @__PURE__ */ qwik._jsxC(props.Wrapper, {
582
580
  ...props.wrapperProps,
583
- attributes: {
581
+ attributes: props.includeBlockProps ? {
584
582
  ...getBlockProperties({
585
583
  block: props.block,
586
584
  context: props.context
@@ -592,18 +590,12 @@ const InteractiveElement = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwi
592
590
  localState: props.context.localState,
593
591
  context: props.context.context
594
592
  })
595
- },
593
+ } : {},
596
594
  children: /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "q0_0")
597
595
  }, 0, "q0_1");
598
596
  }, "InteractiveElement_component_0UqfJpjhn0g"));
599
597
  const getWrapperProps = ({ componentOptions, builderBlock, context, componentRef, includeBlockProps, isInteractive, contextValue }) => {
600
- const interactiveElementProps = {
601
- Wrapper: componentRef,
602
- block: builderBlock,
603
- context,
604
- wrapperProps: componentOptions
605
- };
606
- return isInteractive ? interactiveElementProps : {
598
+ const wrapperPropsWithAttributes = {
607
599
  ...componentOptions,
608
600
  /**
609
601
  * If `noWrap` is set to `true`, then the block's props/attributes are provided to the
@@ -616,6 +608,14 @@ const getWrapperProps = ({ componentOptions, builderBlock, context, componentRef
616
608
  })
617
609
  } : {}
618
610
  };
611
+ const interactiveElementProps = {
612
+ Wrapper: componentRef,
613
+ block: builderBlock,
614
+ context,
615
+ wrapperProps: componentOptions,
616
+ includeBlockProps
617
+ };
618
+ return isInteractive ? interactiveElementProps : wrapperPropsWithAttributes;
619
619
  };
620
620
  const ComponentRef = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
621
621
  const state = qwik.useStore({
@@ -3206,7 +3206,7 @@ const getInteractionPropertiesForEvent = (event) => {
3206
3206
  }
3207
3207
  };
3208
3208
  };
3209
- const SDK_VERSION = "0.10.0";
3209
+ const SDK_VERSION = "0.11.1";
3210
3210
  const registry = {};
3211
3211
  function register(type, info) {
3212
3212
  let typeList = registry[type];
@@ -488,8 +488,7 @@ function getBlockActions(options) {
488
488
  let eventHandlerName = getEventHandlerName(key);
489
489
  if (options.stripPrefix)
490
490
  switch (TARGET) {
491
- case "vue2":
492
- case "vue3":
491
+ case "vue":
493
492
  eventHandlerName = eventHandlerName.replace("v-on:", "");
494
493
  break;
495
494
  case "svelte":
@@ -531,8 +530,7 @@ function getBlockProperties({ block, context }) {
531
530
  function getStyleAttribute(style) {
532
531
  switch (TARGET) {
533
532
  case "svelte":
534
- case "vue2":
535
- case "vue3":
533
+ case "vue":
536
534
  case "solid":
537
535
  return convertStyleMapToCSSArray(style).join(" ");
538
536
  case "qwik":
@@ -578,7 +576,7 @@ const BlockWrapper = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
578
576
  const InteractiveElement = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
579
577
  return /* @__PURE__ */ _jsxC(props.Wrapper, {
580
578
  ...props.wrapperProps,
581
- attributes: {
579
+ attributes: props.includeBlockProps ? {
582
580
  ...getBlockProperties({
583
581
  block: props.block,
584
582
  context: props.context
@@ -590,18 +588,12 @@ const InteractiveElement = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQ
590
588
  localState: props.context.localState,
591
589
  context: props.context.context
592
590
  })
593
- },
591
+ } : {},
594
592
  children: /* @__PURE__ */ _jsxC(Slot, null, 3, "q0_0")
595
593
  }, 0, "q0_1");
596
594
  }, "InteractiveElement_component_0UqfJpjhn0g"));
597
595
  const getWrapperProps = ({ componentOptions, builderBlock, context, componentRef, includeBlockProps, isInteractive, contextValue }) => {
598
- const interactiveElementProps = {
599
- Wrapper: componentRef,
600
- block: builderBlock,
601
- context,
602
- wrapperProps: componentOptions
603
- };
604
- return isInteractive ? interactiveElementProps : {
596
+ const wrapperPropsWithAttributes = {
605
597
  ...componentOptions,
606
598
  /**
607
599
  * If `noWrap` is set to `true`, then the block's props/attributes are provided to the
@@ -614,6 +606,14 @@ const getWrapperProps = ({ componentOptions, builderBlock, context, componentRef
614
606
  })
615
607
  } : {}
616
608
  };
609
+ const interactiveElementProps = {
610
+ Wrapper: componentRef,
611
+ block: builderBlock,
612
+ context,
613
+ wrapperProps: componentOptions,
614
+ includeBlockProps
615
+ };
616
+ return isInteractive ? interactiveElementProps : wrapperPropsWithAttributes;
617
617
  };
618
618
  const ComponentRef = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
619
619
  const state = useStore({
@@ -3204,7 +3204,7 @@ const getInteractionPropertiesForEvent = (event) => {
3204
3204
  }
3205
3205
  };
3206
3206
  };
3207
- const SDK_VERSION = "0.10.0";
3207
+ const SDK_VERSION = "0.11.1";
3208
3208
  const registry = {};
3209
3209
  function register(type, info) {
3210
3210
  let typeList = registry[type];
@@ -3721,8 +3721,7 @@ function getBlockActions(options) {
3721
3721
  let eventHandlerName = getEventHandlerName(key);
3722
3722
  if (options.stripPrefix)
3723
3723
  switch (TARGET) {
3724
- case "vue2":
3725
- case "vue3":
3724
+ case "vue":
3726
3725
  eventHandlerName = eventHandlerName.replace("v-on:", "");
3727
3726
  break;
3728
3727
  case "svelte":
@@ -3764,8 +3763,7 @@ function getBlockProperties({ block, context }) {
3764
3763
  function getStyleAttribute(style) {
3765
3764
  switch (TARGET) {
3766
3765
  case "svelte":
3767
- case "vue2":
3768
- case "vue3":
3766
+ case "vue":
3769
3767
  case "solid":
3770
3768
  return convertStyleMapToCSSArray(style).join(" ");
3771
3769
  case "qwik":
@@ -3811,7 +3809,7 @@ const BlockWrapper = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
3811
3809
  const InteractiveElement = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
3812
3810
  return /* @__PURE__ */ qwik._jsxC(props.Wrapper, {
3813
3811
  ...props.wrapperProps,
3814
- attributes: {
3812
+ attributes: props.includeBlockProps ? {
3815
3813
  ...getBlockProperties({
3816
3814
  block: props.block,
3817
3815
  context: props.context
@@ -3823,18 +3821,12 @@ const InteractiveElement = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwi
3823
3821
  localState: props.context.localState,
3824
3822
  context: props.context.context
3825
3823
  })
3826
- },
3824
+ } : {},
3827
3825
  children: /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "q0_0")
3828
3826
  }, 0, "q0_1");
3829
3827
  }, "InteractiveElement_component_0UqfJpjhn0g"));
3830
3828
  const getWrapperProps = ({ componentOptions, builderBlock, context, componentRef, includeBlockProps, isInteractive, contextValue }) => {
3831
- const interactiveElementProps = {
3832
- Wrapper: componentRef,
3833
- block: builderBlock,
3834
- context,
3835
- wrapperProps: componentOptions
3836
- };
3837
- return isInteractive ? interactiveElementProps : {
3829
+ const wrapperPropsWithAttributes = {
3838
3830
  ...componentOptions,
3839
3831
  /**
3840
3832
  * If `noWrap` is set to `true`, then the block's props/attributes are provided to the
@@ -3847,6 +3839,14 @@ const getWrapperProps = ({ componentOptions, builderBlock, context, componentRef
3847
3839
  })
3848
3840
  } : {}
3849
3841
  };
3842
+ const interactiveElementProps = {
3843
+ Wrapper: componentRef,
3844
+ block: builderBlock,
3845
+ context,
3846
+ wrapperProps: componentOptions,
3847
+ includeBlockProps
3848
+ };
3849
+ return isInteractive ? interactiveElementProps : wrapperPropsWithAttributes;
3850
3850
  };
3851
3851
  const ComponentRef = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
3852
3852
  const state = qwik.useStore({
@@ -6437,7 +6437,7 @@ const getInteractionPropertiesForEvent = (event) => {
6437
6437
  }
6438
6438
  };
6439
6439
  };
6440
- const SDK_VERSION = "0.10.0";
6440
+ const SDK_VERSION = "0.11.1";
6441
6441
  const registry = {};
6442
6442
  function register(type, info) {
6443
6443
  let typeList = registry[type];
@@ -3719,8 +3719,7 @@ function getBlockActions(options) {
3719
3719
  let eventHandlerName = getEventHandlerName(key);
3720
3720
  if (options.stripPrefix)
3721
3721
  switch (TARGET) {
3722
- case "vue2":
3723
- case "vue3":
3722
+ case "vue":
3724
3723
  eventHandlerName = eventHandlerName.replace("v-on:", "");
3725
3724
  break;
3726
3725
  case "svelte":
@@ -3762,8 +3761,7 @@ function getBlockProperties({ block, context }) {
3762
3761
  function getStyleAttribute(style) {
3763
3762
  switch (TARGET) {
3764
3763
  case "svelte":
3765
- case "vue2":
3766
- case "vue3":
3764
+ case "vue":
3767
3765
  case "solid":
3768
3766
  return convertStyleMapToCSSArray(style).join(" ");
3769
3767
  case "qwik":
@@ -3809,7 +3807,7 @@ const BlockWrapper = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
3809
3807
  const InteractiveElement = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
3810
3808
  return /* @__PURE__ */ _jsxC(props.Wrapper, {
3811
3809
  ...props.wrapperProps,
3812
- attributes: {
3810
+ attributes: props.includeBlockProps ? {
3813
3811
  ...getBlockProperties({
3814
3812
  block: props.block,
3815
3813
  context: props.context
@@ -3821,18 +3819,12 @@ const InteractiveElement = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQ
3821
3819
  localState: props.context.localState,
3822
3820
  context: props.context.context
3823
3821
  })
3824
- },
3822
+ } : {},
3825
3823
  children: /* @__PURE__ */ _jsxC(Slot, null, 3, "q0_0")
3826
3824
  }, 0, "q0_1");
3827
3825
  }, "InteractiveElement_component_0UqfJpjhn0g"));
3828
3826
  const getWrapperProps = ({ componentOptions, builderBlock, context, componentRef, includeBlockProps, isInteractive, contextValue }) => {
3829
- const interactiveElementProps = {
3830
- Wrapper: componentRef,
3831
- block: builderBlock,
3832
- context,
3833
- wrapperProps: componentOptions
3834
- };
3835
- return isInteractive ? interactiveElementProps : {
3827
+ const wrapperPropsWithAttributes = {
3836
3828
  ...componentOptions,
3837
3829
  /**
3838
3830
  * If `noWrap` is set to `true`, then the block's props/attributes are provided to the
@@ -3845,6 +3837,14 @@ const getWrapperProps = ({ componentOptions, builderBlock, context, componentRef
3845
3837
  })
3846
3838
  } : {}
3847
3839
  };
3840
+ const interactiveElementProps = {
3841
+ Wrapper: componentRef,
3842
+ block: builderBlock,
3843
+ context,
3844
+ wrapperProps: componentOptions,
3845
+ includeBlockProps
3846
+ };
3847
+ return isInteractive ? interactiveElementProps : wrapperPropsWithAttributes;
3848
3848
  };
3849
3849
  const ComponentRef = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
3850
3850
  const state = useStore({
@@ -6435,7 +6435,7 @@ const getInteractionPropertiesForEvent = (event) => {
6435
6435
  }
6436
6436
  };
6437
6437
  };
6438
- const SDK_VERSION = "0.10.0";
6438
+ const SDK_VERSION = "0.11.1";
6439
6439
  const registry = {};
6440
6440
  function register(type, info) {
6441
6441
  let typeList = registry[type];
@@ -591,8 +591,7 @@ function getBlockActions(options) {
591
591
  let eventHandlerName = getEventHandlerName(key);
592
592
  if (options.stripPrefix)
593
593
  switch (TARGET) {
594
- case "vue2":
595
- case "vue3":
594
+ case "vue":
596
595
  eventHandlerName = eventHandlerName.replace("v-on:", "");
597
596
  break;
598
597
  case "svelte":
@@ -634,8 +633,7 @@ function getBlockProperties({ block, context }) {
634
633
  function getStyleAttribute(style) {
635
634
  switch (TARGET) {
636
635
  case "svelte":
637
- case "vue2":
638
- case "vue3":
636
+ case "vue":
639
637
  case "solid":
640
638
  return convertStyleMapToCSSArray(style).join(" ");
641
639
  case "qwik":
@@ -681,7 +679,7 @@ const BlockWrapper = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
681
679
  const InteractiveElement = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
682
680
  return /* @__PURE__ */ qwik._jsxC(props.Wrapper, {
683
681
  ...props.wrapperProps,
684
- attributes: {
682
+ attributes: props.includeBlockProps ? {
685
683
  ...getBlockProperties({
686
684
  block: props.block,
687
685
  context: props.context
@@ -693,18 +691,12 @@ const InteractiveElement = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwi
693
691
  localState: props.context.localState,
694
692
  context: props.context.context
695
693
  })
696
- },
694
+ } : {},
697
695
  children: /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "q0_0")
698
696
  }, 0, "q0_1");
699
697
  }, "InteractiveElement_component_0UqfJpjhn0g"));
700
698
  const getWrapperProps = ({ componentOptions, builderBlock, context, componentRef, includeBlockProps, isInteractive, contextValue }) => {
701
- const interactiveElementProps = {
702
- Wrapper: componentRef,
703
- block: builderBlock,
704
- context,
705
- wrapperProps: componentOptions
706
- };
707
- return isInteractive ? interactiveElementProps : {
699
+ const wrapperPropsWithAttributes = {
708
700
  ...componentOptions,
709
701
  /**
710
702
  * If `noWrap` is set to `true`, then the block's props/attributes are provided to the
@@ -717,6 +709,14 @@ const getWrapperProps = ({ componentOptions, builderBlock, context, componentRef
717
709
  })
718
710
  } : {}
719
711
  };
712
+ const interactiveElementProps = {
713
+ Wrapper: componentRef,
714
+ block: builderBlock,
715
+ context,
716
+ wrapperProps: componentOptions,
717
+ includeBlockProps
718
+ };
719
+ return isInteractive ? interactiveElementProps : wrapperPropsWithAttributes;
720
720
  };
721
721
  const ComponentRef = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
722
722
  const state = qwik.useStore({
@@ -3307,7 +3307,7 @@ const getInteractionPropertiesForEvent = (event) => {
3307
3307
  }
3308
3308
  };
3309
3309
  };
3310
- const SDK_VERSION = "0.10.0";
3310
+ const SDK_VERSION = "0.11.1";
3311
3311
  const registry = {};
3312
3312
  function register(type, info) {
3313
3313
  let typeList = registry[type];
@@ -589,8 +589,7 @@ function getBlockActions(options) {
589
589
  let eventHandlerName = getEventHandlerName(key);
590
590
  if (options.stripPrefix)
591
591
  switch (TARGET) {
592
- case "vue2":
593
- case "vue3":
592
+ case "vue":
594
593
  eventHandlerName = eventHandlerName.replace("v-on:", "");
595
594
  break;
596
595
  case "svelte":
@@ -632,8 +631,7 @@ function getBlockProperties({ block, context }) {
632
631
  function getStyleAttribute(style) {
633
632
  switch (TARGET) {
634
633
  case "svelte":
635
- case "vue2":
636
- case "vue3":
634
+ case "vue":
637
635
  case "solid":
638
636
  return convertStyleMapToCSSArray(style).join(" ");
639
637
  case "qwik":
@@ -679,7 +677,7 @@ const BlockWrapper = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
679
677
  const InteractiveElement = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
680
678
  return /* @__PURE__ */ _jsxC(props.Wrapper, {
681
679
  ...props.wrapperProps,
682
- attributes: {
680
+ attributes: props.includeBlockProps ? {
683
681
  ...getBlockProperties({
684
682
  block: props.block,
685
683
  context: props.context
@@ -691,18 +689,12 @@ const InteractiveElement = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQ
691
689
  localState: props.context.localState,
692
690
  context: props.context.context
693
691
  })
694
- },
692
+ } : {},
695
693
  children: /* @__PURE__ */ _jsxC(Slot, null, 3, "q0_0")
696
694
  }, 0, "q0_1");
697
695
  }, "InteractiveElement_component_0UqfJpjhn0g"));
698
696
  const getWrapperProps = ({ componentOptions, builderBlock, context, componentRef, includeBlockProps, isInteractive, contextValue }) => {
699
- const interactiveElementProps = {
700
- Wrapper: componentRef,
701
- block: builderBlock,
702
- context,
703
- wrapperProps: componentOptions
704
- };
705
- return isInteractive ? interactiveElementProps : {
697
+ const wrapperPropsWithAttributes = {
706
698
  ...componentOptions,
707
699
  /**
708
700
  * If `noWrap` is set to `true`, then the block's props/attributes are provided to the
@@ -715,6 +707,14 @@ const getWrapperProps = ({ componentOptions, builderBlock, context, componentRef
715
707
  })
716
708
  } : {}
717
709
  };
710
+ const interactiveElementProps = {
711
+ Wrapper: componentRef,
712
+ block: builderBlock,
713
+ context,
714
+ wrapperProps: componentOptions,
715
+ includeBlockProps
716
+ };
717
+ return isInteractive ? interactiveElementProps : wrapperPropsWithAttributes;
718
718
  };
719
719
  const ComponentRef = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
720
720
  const state = useStore({
@@ -3305,7 +3305,7 @@ const getInteractionPropertiesForEvent = (event) => {
3305
3305
  }
3306
3306
  };
3307
3307
  };
3308
- const SDK_VERSION = "0.10.0";
3308
+ const SDK_VERSION = "0.11.1";
3309
3309
  const registry = {};
3310
3310
  function register(type, info) {
3311
3311
  let typeList = registry[type];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builder.io/sdk-qwik",
3
- "version": "0.10.0",
3
+ "version": "0.11.1",
4
4
  "homepage": "https://github.com/BuilderIO/builder/tree/main/packages/sdks/output/qwik",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,11 +1,12 @@
1
1
  import { BuilderContextInterface } from "../../../context/types.js";
2
2
  import { BuilderBlock } from "../../../types/builder-block.js";
3
- import { PropsWithChildren } from "../../../types/typescript.js";
3
+ import { Dictionary, PropsWithChildren } from "../../../types/typescript.js";
4
4
  export type InteractiveElementProps = {
5
5
  Wrapper: any;
6
6
  block: BuilderBlock;
7
7
  context: BuilderContextInterface;
8
- wrapperProps: object;
8
+ wrapperProps: Dictionary<any>;
9
+ includeBlockProps: boolean;
9
10
  };
10
11
  export declare const InteractiveElement: import("@builder.io/qwik").Component<PropsWithChildren<InteractiveElementProps>>;
11
12
  export default InteractiveElement;
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.10.0";
1
+ export declare const SDK_VERSION = "0.11.1";
@@ -1 +1 @@
1
- export type Target = 'vue3' | 'vue2' | 'reactNative' | 'svelte' | 'qwik' | 'react' | 'solid' | 'rsc';
1
+ export type Target = 'vue' | 'reactNative' | 'svelte' | 'qwik' | 'react' | 'solid' | 'rsc';