@builder.io/sdk-qwik 0.0.5 → 0.0.8
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/README.md +2 -65
- package/lib/index.97024df8.js +80165 -0
- package/lib/index.d8c1e37f.cjs +80165 -0
- package/lib/index.qwik.cjs +2424 -0
- package/lib/index.qwik.mjs +2424 -0
- package/package.json +3 -4
- package/tsconfig.json +1 -1
- package/types.d.ts +12 -7
- package/src/blocks/button/button.jsx +0 -211
- package/src/blocks/button/component-info.js +0 -41
- package/src/blocks/columns/columns.jsx +0 -267
- package/src/blocks/columns/component-info.js +0 -242
- package/src/blocks/custom-code/component-info.js +0 -31
- package/src/blocks/custom-code/custom-code.jsx +0 -130
- package/src/blocks/embed/component-info.js +0 -44
- package/src/blocks/embed/embed.jsx +0 -130
- package/src/blocks/embed/helpers.js +0 -9
- package/src/blocks/form/builder-blocks.jsx +0 -100
- package/src/blocks/form/component-info.js +0 -262
- package/src/blocks/form/form.jsx +0 -789
- package/src/blocks/fragment/component-info.js +0 -11
- package/src/blocks/fragment/fragment.jsx +0 -59
- package/src/blocks/image/component-info.js +0 -151
- package/src/blocks/image/image.helpers.js +0 -48
- package/src/blocks/image/image.jsx +0 -554
- package/src/blocks/img/component-info.js +0 -20
- package/src/blocks/img/img.jsx +0 -76
- package/src/blocks/input/component-info.js +0 -74
- package/src/blocks/input/input.jsx +0 -87
- package/src/blocks/raw-text/component-info.js +0 -16
- package/src/blocks/raw-text/raw-text.jsx +0 -53
- package/src/blocks/section/component-info.js +0 -49
- package/src/blocks/section/section.jsx +0 -97
- package/src/blocks/select/component-info.js +0 -59
- package/src/blocks/select/select.jsx +0 -149
- package/src/blocks/submit-button/component-info.js +0 -28
- package/src/blocks/submit-button/submit-button.jsx +0 -87
- package/src/blocks/symbol/component-info.js +0 -43
- package/src/blocks/symbol/symbol.jsx +0 -230
- package/src/blocks/text/component-info.js +0 -24
- package/src/blocks/text/text.jsx +0 -46
- package/src/blocks/textarea/component-info.js +0 -47
- package/src/blocks/textarea/textarea.jsx +0 -65
- package/src/blocks/util.js +0 -12
- package/src/blocks/video/component-info.js +0 -106
- package/src/blocks/video/video.jsx +0 -103
- package/src/components/render-block/block-styles.jsx +0 -186
- package/src/components/render-block/render-block.helpers.js +0 -23
- package/src/components/render-block/render-block.jsx +0 -749
- package/src/components/render-block/render-component.jsx +0 -257
- package/src/components/render-block/render-repeated-block.jsx +0 -119
- package/src/components/render-block/types.js +0 -0
- package/src/components/render-blocks.jsx +0 -387
- package/src/components/render-content/components/render-styles.jsx +0 -140
- package/src/components/render-content/index.js +0 -4
- package/src/components/render-content/render-content.jsx +0 -636
- package/src/components/render-inlined-styles.jsx +0 -153
- package/src/constants/builder-registered-components.js +0 -48
- package/src/constants/device-sizes.js +0 -21
- package/src/constants/target.js +0 -4
- package/src/context/builder.context.js +0 -5
- package/src/functions/camel-to-kebab-case.js +0 -4
- package/src/functions/convert-style-object.js +0 -6
- package/src/functions/evaluate.js +0 -28
- package/src/functions/event-handler-name.js +0 -7
- package/src/functions/get-block-actions.js +0 -23
- package/src/functions/get-block-component-options.js +0 -28
- package/src/functions/get-block-properties.js +0 -29
- package/src/functions/get-block-styles.js +0 -34
- package/src/functions/get-block-tag.js +0 -6
- package/src/functions/get-builder-search-params/fn.test.js +0 -13
- package/src/functions/get-builder-search-params/index.js +0 -33
- package/src/functions/get-content/ab-testing.js +0 -38
- package/src/functions/get-content/fn.test.js +0 -31
- package/src/functions/get-content/index.js +0 -99
- package/src/functions/get-content/types.js +0 -0
- package/src/functions/get-fetch.js +0 -33
- package/src/functions/get-global-this.js +0 -18
- package/src/functions/get-processed-block.js +0 -53
- package/src/functions/get-processed-block.test.js +0 -32
- package/src/functions/if-target.js +0 -15
- package/src/functions/is-browser.js +0 -6
- package/src/functions/is-editing.js +0 -7
- package/src/functions/is-iframe.js +0 -7
- package/src/functions/is-previewing.js +0 -14
- package/src/functions/on-change.js +0 -27
- package/src/functions/on-change.test.js +0 -19
- package/src/functions/register-component.js +0 -72
- package/src/functions/register.js +0 -29
- package/src/functions/sanitize-styles.js +0 -5
- package/src/functions/set-editor-settings.js +0 -15
- package/src/functions/set.js +0 -11
- package/src/functions/set.test.js +0 -16
- package/src/functions/track.js +0 -22
- package/src/functions/transform-block.js +0 -6
- package/src/helpers/css.js +0 -12
- package/src/helpers/flatten.js +0 -34
- package/src/index-helpers/blocks-exports.js +0 -22
- package/src/index-helpers/top-of-file.js +0 -4
- package/src/index.js +0 -10
- package/src/scripts/init-editing.js +0 -79
- package/src/types/builder-block.js +0 -0
- package/src/types/builder-content.js +0 -0
- package/src/types/components.js +0 -0
- package/src/types/deep-partial.js +0 -0
- package/src/types/element.js +0 -0
- package/src/types/targets.js +0 -0
- package/src/types/typescript.js +0 -0
|
@@ -1,257 +0,0 @@
|
|
|
1
|
-
// GENERATED BY MITOSIS
|
|
2
|
-
|
|
3
|
-
import BlockStyles from "./block-styles";
|
|
4
|
-
import RenderBlock from "./render-block";
|
|
5
|
-
import { Fragment, Host, h } from "@builder.io/qwik";
|
|
6
|
-
export const RenderComponent = (props) => {
|
|
7
|
-
return (
|
|
8
|
-
<Host q:host-pseudo="">
|
|
9
|
-
{props.componentRef ? (
|
|
10
|
-
<props.componentRef {...props.componentOptions}>
|
|
11
|
-
{(props.blockChildren || []).map((child) => {
|
|
12
|
-
return (
|
|
13
|
-
<RenderBlock
|
|
14
|
-
key={"render-block-" + child.id}
|
|
15
|
-
block={child}
|
|
16
|
-
context={props.context}
|
|
17
|
-
></RenderBlock>
|
|
18
|
-
);
|
|
19
|
-
})}
|
|
20
|
-
{(props.blockChildren || []).map((child) => {
|
|
21
|
-
return (
|
|
22
|
-
<BlockStyles
|
|
23
|
-
key={"block-style-" + child.id}
|
|
24
|
-
block={child}
|
|
25
|
-
context={props.context}
|
|
26
|
-
></BlockStyles>
|
|
27
|
-
);
|
|
28
|
-
})}
|
|
29
|
-
</props.componentRef>
|
|
30
|
-
) : null}
|
|
31
|
-
</Host>
|
|
32
|
-
);
|
|
33
|
-
};
|
|
34
|
-
export default RenderComponent;
|
|
35
|
-
export const COMPONENT = {
|
|
36
|
-
"@type": "@builder.io/mitosis/component",
|
|
37
|
-
imports: [
|
|
38
|
-
{
|
|
39
|
-
imports: {
|
|
40
|
-
BlockStyles: "default",
|
|
41
|
-
},
|
|
42
|
-
path: "./block-styles.lite",
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
imports: {
|
|
46
|
-
RenderBlock: "default",
|
|
47
|
-
},
|
|
48
|
-
path: "./render-block.lite",
|
|
49
|
-
},
|
|
50
|
-
],
|
|
51
|
-
exports: {},
|
|
52
|
-
inputs: [],
|
|
53
|
-
meta: {
|
|
54
|
-
useMetadata: {
|
|
55
|
-
qwik: {
|
|
56
|
-
component: {
|
|
57
|
-
isLight: true,
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
refs: {},
|
|
63
|
-
state: {},
|
|
64
|
-
children: [
|
|
65
|
-
{
|
|
66
|
-
"@type": "@builder.io/mitosis/node",
|
|
67
|
-
name: "Host",
|
|
68
|
-
meta: {},
|
|
69
|
-
scope: {},
|
|
70
|
-
properties: {
|
|
71
|
-
"q:host-pseudo": "",
|
|
72
|
-
},
|
|
73
|
-
bindings: {},
|
|
74
|
-
children: [
|
|
75
|
-
{
|
|
76
|
-
"@type": "@builder.io/mitosis/node",
|
|
77
|
-
name: "Show",
|
|
78
|
-
meta: {},
|
|
79
|
-
scope: {},
|
|
80
|
-
properties: {},
|
|
81
|
-
bindings: {
|
|
82
|
-
when: {
|
|
83
|
-
code: "props.componentRef",
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
children: [
|
|
87
|
-
{
|
|
88
|
-
"@type": "@builder.io/mitosis/node",
|
|
89
|
-
name: "div",
|
|
90
|
-
meta: {},
|
|
91
|
-
scope: {},
|
|
92
|
-
properties: {
|
|
93
|
-
_text: "\n ",
|
|
94
|
-
},
|
|
95
|
-
bindings: {},
|
|
96
|
-
children: [],
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
"@type": "@builder.io/mitosis/node",
|
|
100
|
-
name: "props.componentRef",
|
|
101
|
-
meta: {},
|
|
102
|
-
scope: {},
|
|
103
|
-
properties: {},
|
|
104
|
-
bindings: {
|
|
105
|
-
_spread: {
|
|
106
|
-
code: "props.componentOptions",
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
children: [
|
|
110
|
-
{
|
|
111
|
-
"@type": "@builder.io/mitosis/node",
|
|
112
|
-
name: "div",
|
|
113
|
-
meta: {},
|
|
114
|
-
scope: {},
|
|
115
|
-
properties: {
|
|
116
|
-
_text: "\n ",
|
|
117
|
-
},
|
|
118
|
-
bindings: {},
|
|
119
|
-
children: [],
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
"@type": "@builder.io/mitosis/node",
|
|
123
|
-
name: "div",
|
|
124
|
-
meta: {},
|
|
125
|
-
scope: {},
|
|
126
|
-
properties: {
|
|
127
|
-
_text: "\n ",
|
|
128
|
-
},
|
|
129
|
-
bindings: {},
|
|
130
|
-
children: [],
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
"@type": "@builder.io/mitosis/node",
|
|
134
|
-
name: "For",
|
|
135
|
-
meta: {},
|
|
136
|
-
scope: {
|
|
137
|
-
For: ["child"],
|
|
138
|
-
},
|
|
139
|
-
properties: {
|
|
140
|
-
_forName: "child",
|
|
141
|
-
},
|
|
142
|
-
bindings: {
|
|
143
|
-
each: {
|
|
144
|
-
code: "props.blockChildren",
|
|
145
|
-
},
|
|
146
|
-
},
|
|
147
|
-
children: [
|
|
148
|
-
{
|
|
149
|
-
"@type": "@builder.io/mitosis/node",
|
|
150
|
-
name: "RenderBlock",
|
|
151
|
-
meta: {},
|
|
152
|
-
scope: {},
|
|
153
|
-
properties: {},
|
|
154
|
-
bindings: {
|
|
155
|
-
key: {
|
|
156
|
-
code: "'render-block-' + child.id",
|
|
157
|
-
},
|
|
158
|
-
block: {
|
|
159
|
-
code: "child",
|
|
160
|
-
},
|
|
161
|
-
context: {
|
|
162
|
-
code: "props.context",
|
|
163
|
-
},
|
|
164
|
-
},
|
|
165
|
-
children: [],
|
|
166
|
-
},
|
|
167
|
-
],
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
"@type": "@builder.io/mitosis/node",
|
|
171
|
-
name: "div",
|
|
172
|
-
meta: {},
|
|
173
|
-
scope: {},
|
|
174
|
-
properties: {
|
|
175
|
-
_text: "\n ",
|
|
176
|
-
},
|
|
177
|
-
bindings: {},
|
|
178
|
-
children: [],
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
"@type": "@builder.io/mitosis/node",
|
|
182
|
-
name: "For",
|
|
183
|
-
meta: {},
|
|
184
|
-
scope: {
|
|
185
|
-
For: ["child"],
|
|
186
|
-
},
|
|
187
|
-
properties: {
|
|
188
|
-
_forName: "child",
|
|
189
|
-
},
|
|
190
|
-
bindings: {
|
|
191
|
-
each: {
|
|
192
|
-
code: "props.blockChildren",
|
|
193
|
-
},
|
|
194
|
-
},
|
|
195
|
-
children: [
|
|
196
|
-
{
|
|
197
|
-
"@type": "@builder.io/mitosis/node",
|
|
198
|
-
name: "BlockStyles",
|
|
199
|
-
meta: {},
|
|
200
|
-
scope: {},
|
|
201
|
-
properties: {},
|
|
202
|
-
bindings: {
|
|
203
|
-
key: {
|
|
204
|
-
code: "'block-style-' + child.id",
|
|
205
|
-
},
|
|
206
|
-
block: {
|
|
207
|
-
code: "child",
|
|
208
|
-
},
|
|
209
|
-
context: {
|
|
210
|
-
code: "props.context",
|
|
211
|
-
},
|
|
212
|
-
},
|
|
213
|
-
children: [],
|
|
214
|
-
},
|
|
215
|
-
],
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
"@type": "@builder.io/mitosis/node",
|
|
219
|
-
name: "div",
|
|
220
|
-
meta: {},
|
|
221
|
-
scope: {},
|
|
222
|
-
properties: {
|
|
223
|
-
_text: "\n ",
|
|
224
|
-
},
|
|
225
|
-
bindings: {},
|
|
226
|
-
children: [],
|
|
227
|
-
},
|
|
228
|
-
],
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
"@type": "@builder.io/mitosis/node",
|
|
232
|
-
name: "div",
|
|
233
|
-
meta: {},
|
|
234
|
-
scope: {},
|
|
235
|
-
properties: {
|
|
236
|
-
_text: "\n ",
|
|
237
|
-
},
|
|
238
|
-
bindings: {},
|
|
239
|
-
children: [],
|
|
240
|
-
},
|
|
241
|
-
],
|
|
242
|
-
},
|
|
243
|
-
],
|
|
244
|
-
},
|
|
245
|
-
],
|
|
246
|
-
hooks: {},
|
|
247
|
-
context: {
|
|
248
|
-
get: {},
|
|
249
|
-
set: {},
|
|
250
|
-
},
|
|
251
|
-
name: "RenderComponent",
|
|
252
|
-
subComponents: [],
|
|
253
|
-
interfaces: [
|
|
254
|
-
"export interface RenderComponentProps {\n componentRef: any;\n componentOptions: any;\n blockChildren: BuilderBlock[];\n context: BuilderContextInterface;\n} // eslint-disable-next-line @builder.io/mitosis/only-default-function-and-imports",
|
|
255
|
-
],
|
|
256
|
-
propsTypeRef: "RenderComponentProps",
|
|
257
|
-
};
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
// GENERATED BY MITOSIS
|
|
2
|
-
|
|
3
|
-
import BuilderContext from "../../context/builder.context";
|
|
4
|
-
import RenderBlock from "./render-block";
|
|
5
|
-
import {
|
|
6
|
-
Fragment,
|
|
7
|
-
Host,
|
|
8
|
-
component$,
|
|
9
|
-
h,
|
|
10
|
-
useContextProvider,
|
|
11
|
-
useStore,
|
|
12
|
-
} from "@builder.io/qwik";
|
|
13
|
-
export const RenderRepeatedBlock = component$((props) => {
|
|
14
|
-
useContextProvider(
|
|
15
|
-
BuilderContext,
|
|
16
|
-
useStore({
|
|
17
|
-
content: (() => {
|
|
18
|
-
return props.repeatContext.content;
|
|
19
|
-
})(),
|
|
20
|
-
state: (() => {
|
|
21
|
-
return props.repeatContext.state;
|
|
22
|
-
})(),
|
|
23
|
-
context: (() => {
|
|
24
|
-
return props.repeatContext.context;
|
|
25
|
-
})(),
|
|
26
|
-
apiKey: (() => {
|
|
27
|
-
return props.repeatContext.apiKey;
|
|
28
|
-
})(),
|
|
29
|
-
registeredComponents: (() => {
|
|
30
|
-
return props.repeatContext.registeredComponents;
|
|
31
|
-
})(),
|
|
32
|
-
})
|
|
33
|
-
);
|
|
34
|
-
return (
|
|
35
|
-
<Host q:host-pseudo="">
|
|
36
|
-
<RenderBlock block={props.block} context={props.context}></RenderBlock>
|
|
37
|
-
</Host>
|
|
38
|
-
);
|
|
39
|
-
});
|
|
40
|
-
export default RenderRepeatedBlock;
|
|
41
|
-
export const COMPONENT = {
|
|
42
|
-
"@type": "@builder.io/mitosis/component",
|
|
43
|
-
imports: [
|
|
44
|
-
{
|
|
45
|
-
imports: {
|
|
46
|
-
BuilderContext: "default",
|
|
47
|
-
},
|
|
48
|
-
path: "../../context/builder.context.lite",
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
imports: {
|
|
52
|
-
RenderBlock: "default",
|
|
53
|
-
},
|
|
54
|
-
path: "./render-block.lite",
|
|
55
|
-
},
|
|
56
|
-
],
|
|
57
|
-
exports: {},
|
|
58
|
-
inputs: [],
|
|
59
|
-
meta: {},
|
|
60
|
-
refs: {},
|
|
61
|
-
state: {},
|
|
62
|
-
children: [
|
|
63
|
-
{
|
|
64
|
-
"@type": "@builder.io/mitosis/node",
|
|
65
|
-
name: "Host",
|
|
66
|
-
meta: {},
|
|
67
|
-
scope: {},
|
|
68
|
-
properties: {
|
|
69
|
-
"q:host-pseudo": "",
|
|
70
|
-
},
|
|
71
|
-
bindings: {},
|
|
72
|
-
children: [
|
|
73
|
-
{
|
|
74
|
-
"@type": "@builder.io/mitosis/node",
|
|
75
|
-
name: "RenderBlock",
|
|
76
|
-
meta: {},
|
|
77
|
-
scope: {},
|
|
78
|
-
properties: {},
|
|
79
|
-
bindings: {
|
|
80
|
-
block: {
|
|
81
|
-
code: "props.block",
|
|
82
|
-
},
|
|
83
|
-
context: {
|
|
84
|
-
code: "props.context",
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
children: [],
|
|
88
|
-
},
|
|
89
|
-
],
|
|
90
|
-
},
|
|
91
|
-
],
|
|
92
|
-
hooks: {},
|
|
93
|
-
context: {
|
|
94
|
-
get: {},
|
|
95
|
-
set: {
|
|
96
|
-
"../../context/builder.context.lite:default": {
|
|
97
|
-
name: "BuilderContext",
|
|
98
|
-
value: {
|
|
99
|
-
content:
|
|
100
|
-
"@builder.io/mitosis/method:get content() {\n return props.repeatContext.content;\n}",
|
|
101
|
-
state:
|
|
102
|
-
"@builder.io/mitosis/method:get state() {\n return props.repeatContext.state;\n}",
|
|
103
|
-
context:
|
|
104
|
-
"@builder.io/mitosis/method:get context() {\n return props.repeatContext.context;\n}",
|
|
105
|
-
apiKey:
|
|
106
|
-
"@builder.io/mitosis/method:get apiKey() {\n return props.repeatContext.apiKey;\n}",
|
|
107
|
-
registeredComponents:
|
|
108
|
-
"@builder.io/mitosis/method:get registeredComponents() {\n return props.repeatContext.registeredComponents;\n}",
|
|
109
|
-
},
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
},
|
|
113
|
-
name: "RenderRepeatedBlock",
|
|
114
|
-
subComponents: [],
|
|
115
|
-
types: [
|
|
116
|
-
"type Props = {\n block: BuilderBlock;\n repeatContext: BuilderContextInterface;\n context: BuilderContextInterface;\n};\n/**\n * We can't make this a generic `ProvideContext` function because Vue 2 won't support root slots, e.g.\n *\n * ```vue\n * <template>\n * <slot></slot>\n * </template>\n * ```\n */",
|
|
117
|
-
],
|
|
118
|
-
propsTypeRef: "Props",
|
|
119
|
-
};
|
|
File without changes
|