@builder.io/sdk-qwik 0.0.9 → 0.0.12

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.
Files changed (31) hide show
  1. package/README.md +13 -14
  2. package/lib/index.qwik.cjs +212 -229
  3. package/lib/index.qwik.mjs +213 -230
  4. package/package.json +4 -4
  5. package/src/blocks/button/button.jsx +0 -175
  6. package/src/blocks/columns/columns.jsx +27 -197
  7. package/src/blocks/custom-code/custom-code.jsx +16 -75
  8. package/src/blocks/embed/embed.jsx +20 -87
  9. package/src/blocks/form/builder-blocks.jsx +0 -75
  10. package/src/blocks/form/form.jsx +57 -536
  11. package/src/blocks/fragment/fragment.jsx +8 -56
  12. package/src/blocks/image/image.jsx +49 -493
  13. package/src/blocks/img/img.jsx +15 -72
  14. package/src/blocks/input/input.jsx +17 -83
  15. package/src/blocks/raw-text/raw-text.jsx +9 -50
  16. package/src/blocks/section/section.jsx +17 -94
  17. package/src/blocks/select/select.jsx +20 -145
  18. package/src/blocks/submit-button/submit-button.jsx +8 -84
  19. package/src/blocks/symbol/symbol.jsx +60 -194
  20. package/src/blocks/text/text.jsx +4 -43
  21. package/src/blocks/textarea/textarea.jsx +12 -62
  22. package/src/blocks/video/video.jsx +21 -71
  23. package/src/components/render-block/block-styles.jsx +0 -114
  24. package/src/components/render-block/render-block.jsx +2 -514
  25. package/src/components/render-block/render-component.jsx +0 -211
  26. package/src/components/render-block/render-repeated-block.jsx +0 -67
  27. package/src/components/render-blocks.jsx +40 -334
  28. package/src/components/render-content/components/render-styles.jsx +0 -50
  29. package/src/components/render-content/render-content.jsx +86 -385
  30. package/src/components/render-inlined-styles.jsx +0 -116
  31. package/src/constants/builder-registered-components.js +3 -0
@@ -1,76 +1,19 @@
1
1
  // GENERATED BY MITOSIS
2
2
 
3
3
  import { isEditing } from "../../functions/is-editing.js";
4
- import { Fragment, Host, component$, h } from "@builder.io/qwik";
5
- export const ImgComponent = component$(
6
- (props) => {
7
- return (
8
- <Host
9
- style={{
10
- objectFit: props.backgroundSize || "cover",
11
- objectPosition: props.backgroundPosition || "center",
12
- }}
13
- {...props.attributes}
14
- key={(isEditing() && props.imgSrc) || "default-key"}
15
- alt={props.altText}
16
- src={props.imgSrc}
17
- ></Host>
18
- );
19
- },
20
- { tagName: "img" }
21
- );
4
+ import { Fragment, component$, h } from "@builder.io/qwik";
5
+ export const ImgComponent = component$((props) => {
6
+ return (
7
+ <img
8
+ style={{
9
+ objectFit: props.backgroundSize || "cover",
10
+ objectPosition: props.backgroundPosition || "center",
11
+ }}
12
+ key={(isEditing() && props.imgSrc) || "default-key"}
13
+ alt={props.altText}
14
+ src={props.imgSrc || props.image}
15
+ {...props.attributes}
16
+ ></img>
17
+ );
18
+ });
22
19
  export default ImgComponent;
23
- export const COMPONENT = {
24
- "@type": "@builder.io/mitosis/component",
25
- imports: [
26
- {
27
- imports: {
28
- isEditing: "isEditing",
29
- },
30
- path: "../../functions/is-editing.js",
31
- },
32
- ],
33
- exports: {},
34
- inputs: [],
35
- meta: {},
36
- refs: {},
37
- state: {},
38
- children: [
39
- {
40
- "@type": "@builder.io/mitosis/node",
41
- name: "Host",
42
- meta: {},
43
- scope: {},
44
- properties: {},
45
- bindings: {
46
- style: {
47
- code: "{\n objectFit: props.backgroundSize || 'cover',\n objectPosition: props.backgroundPosition || 'center'\n}",
48
- },
49
- _spread: {
50
- code: "props.attributes",
51
- },
52
- key: {
53
- code: "isEditing() && props.imgSrc || 'default-key'",
54
- },
55
- alt: {
56
- code: "props.altText",
57
- },
58
- src: {
59
- code: "props.imgSrc",
60
- },
61
- },
62
- children: [],
63
- },
64
- ],
65
- hooks: {},
66
- context: {
67
- get: {},
68
- set: {},
69
- },
70
- name: "ImgComponent",
71
- subComponents: [],
72
- interfaces: [
73
- "export interface ImgProps {\n attributes?: any;\n imgSrc?: string;\n altText?: string;\n backgroundSize?: 'cover' | 'contain';\n backgroundPosition?: 'center' | 'top' | 'left' | 'right' | 'bottom' | 'top left' | 'top right' | 'bottom left' | 'bottom right';\n}",
74
- ],
75
- propsTypeRef: "ImgProps",
76
- };
@@ -1,87 +1,21 @@
1
1
  // GENERATED BY MITOSIS
2
2
 
3
3
  import { isEditing } from "../../functions/is-editing.js";
4
- import { Fragment, Host, component$, h } from "@builder.io/qwik";
5
- export const FormInputComponent = component$(
6
- (props) => {
7
- return (
8
- <Host
9
- {...props.attributes}
10
- key={
11
- isEditing() && props.defaultValue ? props.defaultValue : "default-key"
12
- }
13
- placeholder={props.placeholder}
14
- type={props.type}
15
- name={props.name}
16
- value={props.value}
17
- defaultValue={props.defaultValue}
18
- required={props.required}
19
- ></Host>
20
- );
21
- },
22
- { tagName: "input" }
23
- );
4
+ import { Fragment, component$, h } from "@builder.io/qwik";
5
+ export const FormInputComponent = component$((props) => {
6
+ return (
7
+ <input
8
+ {...props.attributes}
9
+ key={
10
+ isEditing() && props.defaultValue ? props.defaultValue : "default-key"
11
+ }
12
+ placeholder={props.placeholder}
13
+ type={props.type}
14
+ name={props.name}
15
+ value={props.value}
16
+ defaultValue={props.defaultValue}
17
+ required={props.required}
18
+ ></input>
19
+ );
20
+ });
24
21
  export default FormInputComponent;
25
- export const COMPONENT = {
26
- "@type": "@builder.io/mitosis/component",
27
- imports: [
28
- {
29
- imports: {
30
- isEditing: "isEditing",
31
- },
32
- path: "../../functions/is-editing.js",
33
- },
34
- ],
35
- exports: {},
36
- inputs: [],
37
- meta: {},
38
- refs: {},
39
- state: {},
40
- children: [
41
- {
42
- "@type": "@builder.io/mitosis/node",
43
- name: "Host",
44
- meta: {},
45
- scope: {},
46
- properties: {},
47
- bindings: {
48
- _spread: {
49
- code: "props.attributes",
50
- },
51
- key: {
52
- code: "isEditing() && props.defaultValue ? props.defaultValue : 'default-key'",
53
- },
54
- placeholder: {
55
- code: "props.placeholder",
56
- },
57
- type: {
58
- code: "props.type",
59
- },
60
- name: {
61
- code: "props.name",
62
- },
63
- value: {
64
- code: "props.value",
65
- },
66
- defaultValue: {
67
- code: "props.defaultValue",
68
- },
69
- required: {
70
- code: "props.required",
71
- },
72
- },
73
- children: [],
74
- },
75
- ],
76
- hooks: {},
77
- context: {
78
- get: {},
79
- set: {},
80
- },
81
- name: "FormInputComponent",
82
- subComponents: [],
83
- interfaces: [
84
- "export interface FormInputProps {\n type?: string;\n attributes?: any;\n name?: string;\n value?: string;\n placeholder?: string;\n defaultValue?: string;\n required?: boolean;\n}",
85
- ],
86
- propsTypeRef: "FormInputProps",
87
- };
@@ -1,53 +1,12 @@
1
1
  // GENERATED BY MITOSIS
2
2
 
3
- import { Fragment, Host, component$, h } from "@builder.io/qwik";
4
- export const RawText = component$(
5
- (props) => {
6
- return (
7
- <Host
8
- class={props.attributes?.class || props.attributes?.className}
9
- dangerouslySetInnerHTML={props.text || ""}
10
- ></Host>
11
- );
12
- },
13
- { tagName: "span" }
14
- );
3
+ import { Fragment, component$, h } from "@builder.io/qwik";
4
+ export const RawText = component$((props) => {
5
+ return (
6
+ <span
7
+ class={props.attributes?.class || props.attributes?.className}
8
+ dangerouslySetInnerHTML={props.text || ""}
9
+ ></span>
10
+ );
11
+ });
15
12
  export default RawText;
16
- export const COMPONENT = {
17
- "@type": "@builder.io/mitosis/component",
18
- imports: [],
19
- exports: {},
20
- inputs: [],
21
- meta: {},
22
- refs: {},
23
- state: {},
24
- children: [
25
- {
26
- "@type": "@builder.io/mitosis/node",
27
- name: "Host",
28
- meta: {},
29
- scope: {},
30
- properties: {},
31
- bindings: {
32
- class: {
33
- code: "props.attributes?.class || props.attributes?.className",
34
- },
35
- innerHTML: {
36
- code: "props.text || ''",
37
- },
38
- },
39
- children: [],
40
- },
41
- ],
42
- hooks: {},
43
- context: {
44
- get: {},
45
- set: {},
46
- },
47
- name: "RawText",
48
- subComponents: [],
49
- interfaces: [
50
- "export interface RawTextProps {\n attributes?: any;\n text?: string; // builderBlock?: any;\n\n}",
51
- ],
52
- propsTypeRef: "RawTextProps",
53
- };
@@ -1,97 +1,20 @@
1
1
  // GENERATED BY MITOSIS
2
2
 
3
- import { Fragment, Host, Slot, component$, h } from "@builder.io/qwik";
4
- export const SectionComponent = component$(
5
- (props) => {
6
- return (
7
- <Host
8
- {...props.attributes}
9
- style={(() => {
10
- props.maxWidth && typeof props.maxWidth === "number"
11
- ? {
12
- maxWidth: props.maxWidth,
13
- }
14
- : undefined;
15
- })()}
16
- >
17
- <Slot></Slot>
18
- </Host>
19
- );
20
- },
21
- { tagName: "section" }
22
- );
3
+ import { Fragment, Slot, component$, h } from "@builder.io/qwik";
4
+ export const SectionComponent = component$((props) => {
5
+ return (
6
+ <section
7
+ {...props.attributes}
8
+ style={(() => {
9
+ props.maxWidth && typeof props.maxWidth === "number"
10
+ ? {
11
+ maxWidth: props.maxWidth,
12
+ }
13
+ : undefined;
14
+ })()}
15
+ >
16
+ <Slot></Slot>
17
+ </section>
18
+ );
19
+ });
23
20
  export default SectionComponent;
24
- export const COMPONENT = {
25
- "@type": "@builder.io/mitosis/component",
26
- imports: [],
27
- exports: {},
28
- inputs: [],
29
- meta: {},
30
- refs: {},
31
- state: {},
32
- children: [
33
- {
34
- "@type": "@builder.io/mitosis/node",
35
- name: "Host",
36
- meta: {},
37
- scope: {},
38
- properties: {},
39
- bindings: {
40
- _spread: {
41
- code: "props.attributes",
42
- },
43
- style: {
44
- code: "props.maxWidth && typeof props.maxWidth === 'number' ? {\n maxWidth: props.maxWidth\n} : undefined",
45
- },
46
- },
47
- children: [
48
- {
49
- "@type": "@builder.io/mitosis/node",
50
- name: "div",
51
- meta: {},
52
- scope: {},
53
- properties: {
54
- _text: "\n ",
55
- },
56
- bindings: {},
57
- children: [],
58
- },
59
- {
60
- "@type": "@builder.io/mitosis/node",
61
- name: "div",
62
- meta: {},
63
- scope: {},
64
- properties: {},
65
- bindings: {
66
- _text: {
67
- code: "props.children",
68
- },
69
- },
70
- children: [],
71
- },
72
- {
73
- "@type": "@builder.io/mitosis/node",
74
- name: "div",
75
- meta: {},
76
- scope: {},
77
- properties: {
78
- _text: "\n ",
79
- },
80
- bindings: {},
81
- children: [],
82
- },
83
- ],
84
- },
85
- ],
86
- hooks: {},
87
- context: {
88
- get: {},
89
- set: {},
90
- },
91
- name: "SectionComponent",
92
- subComponents: [],
93
- interfaces: [
94
- "export interface SectionProps {\n maxWidth?: number;\n attributes?: any;\n children?: any;\n builderBlock?: any;\n}",
95
- ],
96
- propsTypeRef: "SectionProps",
97
- };
@@ -1,149 +1,24 @@
1
1
  // GENERATED BY MITOSIS
2
2
 
3
3
  import { isEditing } from "../../functions/is-editing.js";
4
- import { Fragment, Host, component$, h } from "@builder.io/qwik";
5
- export const SelectComponent = component$(
6
- (props) => {
7
- return (
8
- <Host
9
- {...props.attributes}
10
- value={props.value}
11
- key={
12
- isEditing() && props.defaultValue ? props.defaultValue : "default-key"
13
- }
14
- defaultValue={props.defaultValue}
15
- name={props.name}
16
- >
17
- {(props.options || []).map((option) => {
18
- return (
19
- <option value={option.value}>{option.name || option.value}</option>
20
- );
21
- })}
22
- </Host>
23
- );
24
- },
25
- { tagName: "select" }
26
- );
4
+ import { Fragment, component$, h } from "@builder.io/qwik";
5
+ export const SelectComponent = component$((props) => {
6
+ return (
7
+ <select
8
+ {...props.attributes}
9
+ value={props.value}
10
+ key={
11
+ isEditing() && props.defaultValue ? props.defaultValue : "default-key"
12
+ }
13
+ defaultValue={props.defaultValue}
14
+ name={props.name}
15
+ >
16
+ {(props.options || []).map((option) => {
17
+ return (
18
+ <option value={option.value}>{option.name || option.value}</option>
19
+ );
20
+ })}
21
+ </select>
22
+ );
23
+ });
27
24
  export default SelectComponent;
28
- export const COMPONENT = {
29
- "@type": "@builder.io/mitosis/component",
30
- imports: [
31
- {
32
- imports: {
33
- isEditing: "isEditing",
34
- },
35
- path: "../../functions/is-editing.js",
36
- },
37
- ],
38
- exports: {},
39
- inputs: [],
40
- meta: {},
41
- refs: {},
42
- state: {},
43
- children: [
44
- {
45
- "@type": "@builder.io/mitosis/node",
46
- name: "Host",
47
- meta: {},
48
- scope: {},
49
- properties: {},
50
- bindings: {
51
- _spread: {
52
- code: "props.attributes",
53
- },
54
- value: {
55
- code: "props.value",
56
- },
57
- key: {
58
- code: "isEditing() && props.defaultValue ? props.defaultValue : 'default-key'",
59
- },
60
- defaultValue: {
61
- code: "props.defaultValue",
62
- },
63
- name: {
64
- code: "props.name",
65
- },
66
- },
67
- children: [
68
- {
69
- "@type": "@builder.io/mitosis/node",
70
- name: "div",
71
- meta: {},
72
- scope: {},
73
- properties: {
74
- _text: "\n ",
75
- },
76
- bindings: {},
77
- children: [],
78
- },
79
- {
80
- "@type": "@builder.io/mitosis/node",
81
- name: "For",
82
- meta: {},
83
- scope: {
84
- For: ["option"],
85
- },
86
- properties: {
87
- _forName: "option",
88
- },
89
- bindings: {
90
- each: {
91
- code: "props.options",
92
- },
93
- },
94
- children: [
95
- {
96
- "@type": "@builder.io/mitosis/node",
97
- name: "option",
98
- meta: {},
99
- scope: {},
100
- properties: {},
101
- bindings: {
102
- value: {
103
- code: "option.value",
104
- },
105
- },
106
- children: [
107
- {
108
- "@type": "@builder.io/mitosis/node",
109
- name: "div",
110
- meta: {},
111
- scope: {},
112
- properties: {},
113
- bindings: {
114
- _text: {
115
- code: "option.name || option.value",
116
- },
117
- },
118
- children: [],
119
- },
120
- ],
121
- },
122
- ],
123
- },
124
- {
125
- "@type": "@builder.io/mitosis/node",
126
- name: "div",
127
- meta: {},
128
- scope: {},
129
- properties: {
130
- _text: "\n ",
131
- },
132
- bindings: {},
133
- children: [],
134
- },
135
- ],
136
- },
137
- ],
138
- hooks: {},
139
- context: {
140
- get: {},
141
- set: {},
142
- },
143
- name: "SelectComponent",
144
- subComponents: [],
145
- interfaces: [
146
- "export interface FormSelectProps {\n options?: {\n name?: string;\n value: string;\n }[];\n attributes?: any;\n name?: string;\n value?: string;\n defaultValue?: string;\n}",
147
- ],
148
- propsTypeRef: "FormSelectProps",
149
- };
@@ -1,87 +1,11 @@
1
1
  // GENERATED BY MITOSIS
2
2
 
3
- import { Fragment, Host, component$, h } from "@builder.io/qwik";
4
- export const SubmitButton = component$(
5
- (props) => {
6
- return (
7
- <Host type="submit" {...props.attributes}>
8
- <>{props.text}</>
9
- </Host>
10
- );
11
- },
12
- { tagName: "button" }
13
- );
3
+ import { Fragment, component$, h } from "@builder.io/qwik";
4
+ export const SubmitButton = component$((props) => {
5
+ return (
6
+ <button type="submit" {...props.attributes}>
7
+ {props.text}
8
+ </button>
9
+ );
10
+ });
14
11
  export default SubmitButton;
15
- export const COMPONENT = {
16
- "@type": "@builder.io/mitosis/component",
17
- imports: [],
18
- exports: {},
19
- inputs: [],
20
- meta: {},
21
- refs: {},
22
- state: {},
23
- children: [
24
- {
25
- "@type": "@builder.io/mitosis/node",
26
- name: "Host",
27
- meta: {},
28
- scope: {},
29
- properties: {
30
- type: "submit",
31
- },
32
- bindings: {
33
- _spread: {
34
- code: "props.attributes",
35
- },
36
- },
37
- children: [
38
- {
39
- "@type": "@builder.io/mitosis/node",
40
- name: "div",
41
- meta: {},
42
- scope: {},
43
- properties: {
44
- _text: "\n ",
45
- },
46
- bindings: {},
47
- children: [],
48
- },
49
- {
50
- "@type": "@builder.io/mitosis/node",
51
- name: "div",
52
- meta: {},
53
- scope: {},
54
- properties: {},
55
- bindings: {
56
- _text: {
57
- code: "props.text",
58
- },
59
- },
60
- children: [],
61
- },
62
- {
63
- "@type": "@builder.io/mitosis/node",
64
- name: "div",
65
- meta: {},
66
- scope: {},
67
- properties: {
68
- _text: "\n ",
69
- },
70
- bindings: {},
71
- children: [],
72
- },
73
- ],
74
- },
75
- ],
76
- hooks: {},
77
- context: {
78
- get: {},
79
- set: {},
80
- },
81
- name: "SubmitButton",
82
- subComponents: [],
83
- interfaces: [
84
- "export interface ButtonProps {\n attributes?: any;\n text?: string;\n}",
85
- ],
86
- propsTypeRef: "ButtonProps",
87
- };