@builder.io/mitosis 0.0.50-6 → 0.0.50
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/dist/src/__tests__/angular.test.js +6 -0
- package/dist/src/__tests__/builder.test.js +5 -1
- package/dist/src/__tests__/data/blocks/multiple-onUpdate.raw.d.ts +1 -0
- package/dist/src/__tests__/data/blocks/multiple-onUpdate.raw.jsx +13 -0
- package/dist/src/__tests__/data/blocks/multiple-onUpdateWithDeps.raw.d.ts +1 -0
- package/dist/src/__tests__/data/blocks/multiple-onUpdateWithDeps.raw.jsx +19 -0
- package/dist/src/__tests__/data/blocks/onUpdateWithDeps.raw.jsx +6 -3
- package/dist/src/__tests__/data/blocks/self-referencing-component-with-children.raw.d.ts +1 -0
- package/dist/src/__tests__/data/blocks/self-referencing-component-with-children.raw.jsx +15 -0
- package/dist/src/__tests__/data/blocks/self-referencing-component.raw.d.ts +1 -0
- package/dist/src/__tests__/data/blocks/self-referencing-component.raw.jsx +12 -0
- package/dist/src/__tests__/data/blocks/shadow-dom.raw.d.ts +6 -0
- package/dist/src/__tests__/data/blocks/shadow-dom.raw.jsx +54 -0
- package/dist/src/__tests__/data/blocks/slot.raw.d.ts +5 -0
- package/dist/src/__tests__/data/blocks/slot.raw.jsx +6 -0
- package/dist/src/__tests__/data/blocks/stamped-io.raw.jsx +8 -0
- package/dist/src/__tests__/data/blocks/styles.raw.d.ts +1 -0
- package/dist/src/__tests__/data/blocks/styles.raw.jsx +10 -0
- package/dist/src/__tests__/data/context/simple.context.lite.d.ts +8 -1
- package/dist/src/__tests__/html.test.js +6 -0
- package/dist/src/__tests__/qwik.directive.test.d.ts +1 -0
- package/dist/src/__tests__/qwik.directive.test.js +107 -0
- package/dist/src/__tests__/qwik.test.js +256 -128
- package/dist/src/__tests__/react-native.test.js +12 -0
- package/dist/src/__tests__/react.test.js +12 -0
- package/dist/src/__tests__/svelte.test.js +24 -0
- package/dist/src/__tests__/vue.test.js +12 -0
- package/dist/src/__tests__/webcomponent.test.d.ts +1 -0
- package/dist/src/__tests__/webcomponent.test.js +12 -0
- package/dist/src/constants/html_tags.d.ts +1 -0
- package/dist/src/constants/html_tags.js +119 -0
- package/dist/src/generators/angular.js +7 -4
- package/dist/src/generators/context/react copy.d.ts +8 -0
- package/dist/src/generators/context/react copy.js +28 -0
- package/dist/src/generators/context/solid.d.ts +8 -0
- package/dist/src/generators/context/solid.js +28 -0
- package/dist/src/generators/context/svelte.d.ts +8 -0
- package/dist/src/generators/context/svelte.js +28 -0
- package/dist/src/generators/helpers/context.d.ts +2 -0
- package/dist/src/generators/helpers/context.js +8 -0
- package/dist/src/generators/html.js +20 -14
- package/dist/src/generators/mitosis.js +4 -3
- package/dist/src/generators/qwik/component.js +26 -5
- package/dist/src/generators/qwik/directives.d.ts +14 -5
- package/dist/src/generators/qwik/directives.js +32 -25
- package/dist/src/generators/qwik/handlers.js +3 -4
- package/dist/src/generators/qwik/jsx.js +17 -5
- package/dist/src/generators/qwik/src-generator.d.ts +0 -9
- package/dist/src/generators/qwik/src-generator.js +93 -101
- package/dist/src/generators/qwik/styles.js +8 -11
- package/dist/src/generators/react.js +9 -8
- package/dist/src/generators/solid.js +82 -8
- package/dist/src/generators/stencil/generate.js +5 -3
- package/dist/src/generators/stencil/index.js +5 -1
- package/dist/src/generators/svelte.d.ts +9 -1
- package/dist/src/generators/svelte.js +175 -76
- package/dist/src/generators/vue.d.ts +1 -1
- package/dist/src/generators/vue.js +86 -10
- package/dist/src/helpers/babel-transform copy.d.ts +8 -0
- package/dist/src/helpers/babel-transform copy.js +138 -0
- package/dist/src/helpers/babel-transform.d.ts +4 -7
- package/dist/src/helpers/babel-transform.js +18 -2
- package/dist/src/helpers/babel-transform.test.d.ts +1 -0
- package/dist/src/helpers/babel-transform.test.js +7 -0
- package/dist/src/helpers/create-mitosis-component.js +1 -1
- package/dist/src/helpers/get-state-object-string.js +2 -1
- package/dist/src/helpers/map-refs.js +22 -9
- package/dist/src/helpers/parsers.d.ts +8 -0
- package/dist/src/helpers/parsers.js +66 -0
- package/dist/src/helpers/render-imports.d.ts +2 -4
- package/dist/src/helpers/render-imports.js +32 -14
- package/dist/src/index.d.ts +10 -5
- package/dist/src/index.js +11 -5
- package/dist/src/parsers/builder.d.ts +16 -50
- package/dist/src/parsers/builder.js +22 -40
- package/dist/src/parsers/context.js +5 -1
- package/dist/src/parsers/jsx.d.ts +7 -0
- package/dist/src/parsers/jsx.js +27 -5
- package/dist/src/parsers/liquid.js +5 -1
- package/dist/src/plugins/compile-away-builder-components.js +5 -1
- package/dist/src/symbols/symbol-processor.js +3 -3
- package/dist/src/targets.d.ts +1 -1
- package/dist/src/types/mitosis-component.d.ts +8 -3
- package/dist/test/qwik/Accordion/high.jsx +0 -1
- package/dist/test/qwik/Accordion/low.jsx +171 -65
- package/dist/test/qwik/Accordion/med.jsx +9 -10
- package/dist/test/qwik/For/high.jsx +0 -1
- package/dist/test/qwik/For/low.jsx +25 -58
- package/dist/test/qwik/For/med.jsx +9 -10
- package/dist/test/qwik/Image/high.js +9 -1
- package/dist/test/qwik/Image/low.js +0 -42
- package/dist/test/qwik/Image/med.js +149 -12
- package/dist/test/qwik/Image.slow/high.js +9 -1
- package/dist/test/qwik/Image.slow/low.js +0 -42
- package/dist/test/qwik/Image.slow/med.js +149 -12
- package/dist/{src/types/generators.d.ts → test/qwik/bindings/high.cjs} +0 -0
- package/dist/test/qwik/bindings/low.cjs +33 -0
- package/dist/test/qwik/bindings/med.cjs +12 -0
- package/dist/test/qwik/button/high.js +1 -13
- package/dist/test/qwik/button/low.js +8 -40
- package/dist/test/qwik/button/med.js +36 -11
- package/dist/test/qwik/component/bindings/high.jsx +0 -1
- package/dist/test/qwik/component/bindings/low.jsx +26 -71
- package/dist/test/qwik/component/bindings/med.jsx +48 -39
- package/dist/test/qwik/component/component/inputs/high.cjsx +9 -0
- package/dist/test/qwik/component/component/inputs/low.cjsx +0 -0
- package/dist/test/qwik/component/component/inputs/med.cjsx +65 -0
- package/dist/test/qwik/hello_world/stylesheet/high.jsx +0 -1
- package/dist/test/qwik/hello_world/stylesheet/low.jsx +6 -27
- package/dist/test/qwik/hello_world/stylesheet/med.jsx +9 -10
- package/dist/test/qwik/page-with-symbol/high.js +0 -1
- package/dist/test/qwik/page-with-symbol/low.js +15 -52
- package/dist/test/qwik/page-with-symbol/med.js +9 -10
- package/dist/test/qwik/show-hide/high.jsx +9 -0
- package/dist/test/qwik/show-hide/low.jsx +0 -0
- package/dist/test/qwik/show-hide/med.jsx +174 -0
- package/dist/test/qwik/svg/high.js +0 -1
- package/dist/test/qwik/svg/low.js +9 -35
- package/dist/test/qwik/svg/med.js +9 -10
- package/dist/test/qwik/todo/Todo.cjs/high.cjs +4 -39
- package/dist/test/qwik/todo/Todo.cjs/low.cjs +0 -1
- package/dist/test/qwik/todo/Todo.cjs/med.cjs +38 -61
- package/dist/test/qwik/todo/Todo.js/high.js +22 -5
- package/dist/test/qwik/todo/Todo.js/med.js +45 -1
- package/dist/test/qwik/todo/Todo.tsx/high.tsx +4 -39
- package/dist/test/qwik/todo/Todo.tsx/low.tsx +0 -1
- package/dist/test/qwik/todo/Todo.tsx/med.tsx +31 -34
- package/dist/test/qwik/todos/Todo.tsx/high.tsx +0 -12
- package/dist/test/qwik/todos/Todo.tsx/low.tsx +18 -25
- package/dist/test/qwik/todos/Todo.tsx/med.tsx +8 -10
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +22 -22
- package/dist/src/__tests__/data/blocks/onMount-onUnMount.d.ts +0 -1
- package/dist/src/__tests__/data/blocks/onMount-onUnMount.jsx +0 -13
- package/dist/src/__tests__/data/blocks/onMount.d.ts +0 -1
- package/dist/src/__tests__/data/blocks/onMount.jsx +0 -13
- package/dist/src/types/generators.js +0 -1
|
@@ -1,76 +1,183 @@
|
|
|
1
|
-
import { __merge } from "./med.js";
|
|
2
|
-
|
|
3
1
|
import { h, qrl, useLexicalScope } from "@builder.io/qwik";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export const MyComponent_styles = `
|
|
7
|
-
.csw5022{
|
|
8
|
-
display: flex;
|
|
9
|
-
flex-direction: column;
|
|
10
|
-
position: relative;
|
|
11
|
-
flex-shrink: 0;
|
|
12
|
-
box-sizing: border-box;
|
|
13
|
-
margin-top: 20px;
|
|
14
|
-
align-items: stretch;
|
|
15
|
-
}
|
|
16
|
-
.csanagh{
|
|
17
|
-
margin-top: 10px;
|
|
18
|
-
position: relative;
|
|
19
|
-
display: flex;
|
|
20
|
-
align-items: stretch;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
padding-bottom: 10px;
|
|
23
|
-
}
|
|
24
|
-
.c4qyc1p{
|
|
25
|
-
position: relative;
|
|
26
|
-
display: flex;
|
|
27
|
-
align-items: stretch;
|
|
28
|
-
flex-direction: column;
|
|
29
|
-
margin-top: 10px;
|
|
30
|
-
padding-bottom: 10px;
|
|
31
|
-
}
|
|
32
|
-
.crwdrpw{
|
|
33
|
-
text-align: left;
|
|
34
|
-
display: flex;
|
|
35
|
-
flex-direction: column;
|
|
36
|
-
}
|
|
37
|
-
.ctcw2m4{
|
|
38
|
-
padding-top: 50px;
|
|
39
|
-
text-align: left;
|
|
40
|
-
display: flex;
|
|
41
|
-
flex-direction: column;
|
|
42
|
-
padding-bottom: 50px;
|
|
43
|
-
}
|
|
44
|
-
`;
|
|
45
|
-
|
|
2
|
+
export const MyComponent_styles = `.csw5022{display:flex;flex-direction:column;position:relative;flex-shrink:0;box-sizing:border-box;margin-top:20px;align-items:stretch}.csanagh{margin-top:10px;position:relative;display:flex;align-items:stretch;flex-direction:column;padding-bottom:10px}.c4qyc1p{position:relative;display:flex;align-items:stretch;flex-direction:column;margin-top:10px;padding-bottom:10px}.crwdrpw{text-align:left;display:flex;flex-direction:column}.ctcw2m4{padding-top:50px;text-align:left;display:flex;flex-direction:column;padding-bottom:50px}`;
|
|
46
3
|
export const MyComponent_onRender = () => {
|
|
47
|
-
const
|
|
48
|
-
const __props__ = __scope__[0];
|
|
49
|
-
const __state__ = __scope__[1];
|
|
50
|
-
const state = __merge(__state__, __props__);
|
|
51
|
-
;
|
|
4
|
+
const state = useLexicalScope()[0];
|
|
52
5
|
return (
|
|
53
|
-
<div
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
6
|
+
<div
|
|
7
|
+
gridRowWidth="25%"
|
|
8
|
+
class="csw5022"
|
|
9
|
+
items={[
|
|
10
|
+
{
|
|
11
|
+
title: [
|
|
12
|
+
{
|
|
13
|
+
"@type": "@builder.io/sdk:Element",
|
|
14
|
+
"@version": 2,
|
|
15
|
+
layerName: "Accordion item title",
|
|
16
|
+
id: "builder-5fed2723c1cc4fb39e9d22b9c54ef179",
|
|
17
|
+
children: [
|
|
18
|
+
{
|
|
19
|
+
"@type": "@builder.io/sdk:Element",
|
|
20
|
+
"@version": 2,
|
|
21
|
+
id: "builder-2cad86b387ec405d82917895d7af0a12",
|
|
22
|
+
component: {
|
|
23
|
+
name: "Text",
|
|
24
|
+
options: { text: "<p>Item 1</p>" },
|
|
25
|
+
},
|
|
26
|
+
responsiveStyles: {
|
|
27
|
+
large: {
|
|
28
|
+
textAlign: "left",
|
|
29
|
+
display: "flex",
|
|
30
|
+
flexDirection: "column",
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
responsiveStyles: {
|
|
36
|
+
large: {
|
|
37
|
+
marginTop: "10px",
|
|
38
|
+
position: "relative",
|
|
39
|
+
display: "flex",
|
|
40
|
+
alignItems: "stretch",
|
|
41
|
+
flexDirection: "column",
|
|
42
|
+
paddingBottom: "10px",
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
detail: [
|
|
48
|
+
{
|
|
49
|
+
"@type": "@builder.io/sdk:Element",
|
|
50
|
+
"@version": 2,
|
|
51
|
+
layerName: "Accordion item detail",
|
|
52
|
+
id: "builder-18279a99b32240f19aa21d3f4b015cc9",
|
|
53
|
+
children: [
|
|
54
|
+
{
|
|
55
|
+
"@type": "@builder.io/sdk:Element",
|
|
56
|
+
"@version": 2,
|
|
57
|
+
id: "builder-2dbfa56b8988461c8566bbe759580e9b",
|
|
58
|
+
component: {
|
|
59
|
+
name: "Text",
|
|
60
|
+
options: { text: "<p>Item 1 content</p>" },
|
|
61
|
+
},
|
|
62
|
+
responsiveStyles: {
|
|
63
|
+
large: {
|
|
64
|
+
paddingTop: "50px",
|
|
65
|
+
textAlign: "left",
|
|
66
|
+
display: "flex",
|
|
67
|
+
flexDirection: "column",
|
|
68
|
+
paddingBottom: "50px",
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
responsiveStyles: {
|
|
74
|
+
large: {
|
|
75
|
+
position: "relative",
|
|
76
|
+
display: "flex",
|
|
77
|
+
alignItems: "stretch",
|
|
78
|
+
flexDirection: "column",
|
|
79
|
+
marginTop: "10px",
|
|
80
|
+
paddingBottom: "10px",
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
title: [
|
|
88
|
+
{
|
|
89
|
+
"@type": "@builder.io/sdk:Element",
|
|
90
|
+
"@version": 2,
|
|
91
|
+
layerName: "Accordion item title",
|
|
92
|
+
id: "builder-2a93def22a354cf7aa193c20d1ad6def",
|
|
93
|
+
children: [
|
|
94
|
+
{
|
|
95
|
+
"@type": "@builder.io/sdk:Element",
|
|
96
|
+
"@version": 2,
|
|
97
|
+
id: "builder-1365fc457ece45db82ad90dbe9819e7c",
|
|
98
|
+
component: {
|
|
99
|
+
name: "Text",
|
|
100
|
+
options: { text: "<p>Item 2</p>" },
|
|
101
|
+
},
|
|
102
|
+
responsiveStyles: {
|
|
103
|
+
large: {
|
|
104
|
+
textAlign: "left",
|
|
105
|
+
display: "flex",
|
|
106
|
+
flexDirection: "column",
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
],
|
|
111
|
+
responsiveStyles: {
|
|
112
|
+
large: {
|
|
113
|
+
marginTop: "10px",
|
|
114
|
+
position: "relative",
|
|
115
|
+
display: "flex",
|
|
116
|
+
alignItems: "stretch",
|
|
117
|
+
flexDirection: "column",
|
|
118
|
+
paddingBottom: "10px",
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
],
|
|
123
|
+
detail: [
|
|
124
|
+
{
|
|
125
|
+
"@type": "@builder.io/sdk:Element",
|
|
126
|
+
"@version": 2,
|
|
127
|
+
layerName: "Accordion item detail",
|
|
128
|
+
id: "builder-fd6ef41da6d040328fbd8b0801611fe5",
|
|
129
|
+
children: [
|
|
130
|
+
{
|
|
131
|
+
"@type": "@builder.io/sdk:Element",
|
|
132
|
+
"@version": 2,
|
|
133
|
+
id: "builder-7362f9fd64c647c5a400d9e75c74473f",
|
|
134
|
+
component: {
|
|
135
|
+
name: "Text",
|
|
136
|
+
options: { text: "<p>Item 2 content</p>" },
|
|
137
|
+
},
|
|
138
|
+
responsiveStyles: {
|
|
139
|
+
large: {
|
|
140
|
+
paddingTop: "50px",
|
|
141
|
+
textAlign: "left",
|
|
142
|
+
display: "flex",
|
|
143
|
+
flexDirection: "column",
|
|
144
|
+
paddingBottom: "50px",
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
responsiveStyles: {
|
|
150
|
+
large: {
|
|
151
|
+
position: "relative",
|
|
152
|
+
display: "flex",
|
|
153
|
+
alignItems: "stretch",
|
|
154
|
+
flexDirection: "column",
|
|
155
|
+
marginTop: "10px",
|
|
156
|
+
paddingBottom: "10px",
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
],
|
|
161
|
+
},
|
|
162
|
+
]}
|
|
163
|
+
animate={true}
|
|
164
|
+
>
|
|
57
165
|
<div>
|
|
58
166
|
<div builder="accordion">
|
|
59
167
|
<div builder="accordion-title">
|
|
60
168
|
<div class="csanagh">
|
|
61
169
|
<div class="crwdrpw">
|
|
62
|
-
<div innerHTML="<p>Item 1</p>"
|
|
63
|
-
class="builder-text">
|
|
64
|
-
</div>
|
|
170
|
+
<div innerHTML="<p>Item 1</p>" class="builder-text"></div>
|
|
65
171
|
</div>
|
|
66
172
|
</div>
|
|
67
173
|
</div>
|
|
68
174
|
<div builder="accordion-detail">
|
|
69
175
|
<div class="c4qyc1p">
|
|
70
176
|
<div class="ctcw2m4">
|
|
71
|
-
<div
|
|
72
|
-
|
|
73
|
-
|
|
177
|
+
<div
|
|
178
|
+
innerHTML="<p>Item 1 content</p>"
|
|
179
|
+
class="builder-text"
|
|
180
|
+
></div>
|
|
74
181
|
</div>
|
|
75
182
|
</div>
|
|
76
183
|
</div>
|
|
@@ -79,18 +186,17 @@ export const MyComponent_onRender = () => {
|
|
|
79
186
|
<div builder="accordion-title">
|
|
80
187
|
<div class="csanagh">
|
|
81
188
|
<div class="crwdrpw">
|
|
82
|
-
<div innerHTML="<p>Item 2</p>"
|
|
83
|
-
class="builder-text">
|
|
84
|
-
</div>
|
|
189
|
+
<div innerHTML="<p>Item 2</p>" class="builder-text"></div>
|
|
85
190
|
</div>
|
|
86
191
|
</div>
|
|
87
192
|
</div>
|
|
88
193
|
<div builder="accordion-detail">
|
|
89
194
|
<div class="c4qyc1p">
|
|
90
195
|
<div class="ctcw2m4">
|
|
91
|
-
<div
|
|
92
|
-
|
|
93
|
-
|
|
196
|
+
<div
|
|
197
|
+
innerHTML="<p>Item 2 content</p>"
|
|
198
|
+
class="builder-text"
|
|
199
|
+
></div>
|
|
94
200
|
</div>
|
|
95
201
|
</div>
|
|
96
202
|
</div>
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const state = __merge(__state__, __props__,true);
|
|
8
|
-
;withScopedStyles(qrl("./low.js", "MyComponent_styles", []))
|
|
9
|
-
return qrl("./low.js", "MyComponent_onRender", [__props__,__state__]);
|
|
1
|
+
import { componentQrl, qrl, withScopedStylesQrl } from "@builder.io/qwik";
|
|
2
|
+
export const MyComponent_onMount = (state) => {
|
|
3
|
+
typeof __STATE__ === "object" &&
|
|
4
|
+
Object.assign(state, __STATE__[state.serverStateId]);
|
|
5
|
+
withScopedStylesQrl(qrl("./low.js", "MyComponent_styles", []));
|
|
6
|
+
return qrl("./low.js", "MyComponent_onRender", [state]);
|
|
10
7
|
};
|
|
11
|
-
export const MyComponent =
|
|
8
|
+
export const MyComponent = componentQrl(
|
|
9
|
+
qrl("./med.js", "MyComponent_onMount", [])
|
|
10
|
+
);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,65 +1,32 @@
|
|
|
1
|
-
import { __merge } from "./med.js";
|
|
2
|
-
|
|
3
1
|
import { h, qrl, useLexicalScope } from "@builder.io/qwik";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export const MyComponent_styles = `
|
|
7
|
-
.cvdfnp5{
|
|
8
|
-
display: flex;
|
|
9
|
-
flex-direction: column;
|
|
10
|
-
position: relative;
|
|
11
|
-
flex-shrink: 0;
|
|
12
|
-
box-sizing: border-box;
|
|
13
|
-
margin-top: 0px;
|
|
14
|
-
padding-left: 20px;
|
|
15
|
-
padding-right: 20px;
|
|
16
|
-
padding-top: 50px;
|
|
17
|
-
padding-bottom: 50px;
|
|
18
|
-
width: 100vw;
|
|
19
|
-
margin-left: calc(50% - 50vw);
|
|
20
|
-
}
|
|
21
|
-
.cz5wnof{
|
|
22
|
-
width: 100%;
|
|
23
|
-
align-self: stretch;
|
|
24
|
-
flex-grow: 1;
|
|
25
|
-
box-sizing: border-box;
|
|
26
|
-
max-width: 1200px;
|
|
27
|
-
display: flex;
|
|
28
|
-
flex-direction: column;
|
|
29
|
-
align-items: stretch;
|
|
30
|
-
margin-left: auto;
|
|
31
|
-
margin-right: auto;
|
|
32
|
-
}
|
|
33
|
-
.cdrk993{
|
|
34
|
-
text-align: center;
|
|
35
|
-
}
|
|
36
|
-
`;
|
|
37
|
-
|
|
2
|
+
export const MyComponent_styles = `.cvdfnp5{display:flex;flex-direction:column;position:relative;flex-shrink:0;box-sizing:border-box;margin-top:0px;padding-left:20px;padding-right:20px;padding-top:50px;padding-bottom:50px;width:100vw;margin-left:calc(50% - 50vw)}.cz5wnof{width:100%;align-self:stretch;flex-grow:1;box-sizing:border-box;max-width:1200px;display:flex;flex-direction:column;align-items:stretch;margin-left:auto;margin-right:auto}.cdrk993{text-align:center}`;
|
|
38
3
|
export const MyComponent_onRender = () => {
|
|
39
|
-
const
|
|
40
|
-
const __props__ = __scope__[0];
|
|
41
|
-
const __state__ = __scope__[1];
|
|
42
|
-
const state = __merge(__state__, __props__);
|
|
43
|
-
;
|
|
4
|
+
const state = useLexicalScope()[0];
|
|
44
5
|
return (
|
|
45
|
-
<div class="cvdfnp5"
|
|
46
|
-
maxWidth={1200}>
|
|
6
|
+
<div class="cvdfnp5" maxWidth={1200}>
|
|
47
7
|
<section class="cz5wnof">
|
|
48
|
-
{
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
8
|
+
{(state.simpleList.results || []).map(
|
|
9
|
+
function (__value__) {
|
|
10
|
+
var state = Object.assign({}, this, {
|
|
11
|
+
resultsItem: __value__ == null ? {} : __value__,
|
|
12
|
+
});
|
|
13
|
+
return (
|
|
14
|
+
<div class="cdrk993">
|
|
15
|
+
<div
|
|
16
|
+
class="builder-text"
|
|
17
|
+
innerHTML={(() => {
|
|
18
|
+
try {
|
|
19
|
+
var _virtual_index = state.resultsItem.data.title;
|
|
20
|
+
return _virtual_index;
|
|
21
|
+
} catch (err) {
|
|
22
|
+
console.warn("Builder code error", err);
|
|
23
|
+
}
|
|
24
|
+
})()}
|
|
25
|
+
></div>
|
|
26
|
+
</div>
|
|
27
|
+
);
|
|
28
|
+
}.bind(state)
|
|
29
|
+
)}
|
|
63
30
|
</section>
|
|
64
31
|
</div>
|
|
65
32
|
);
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const state = __merge(__state__, __props__,true);
|
|
8
|
-
;withScopedStyles(qrl("./low.js", "MyComponent_styles", []))
|
|
9
|
-
return qrl("./low.js", "MyComponent_onRender", [__props__,__state__]);
|
|
1
|
+
import { componentQrl, qrl, withScopedStylesQrl } from "@builder.io/qwik";
|
|
2
|
+
export const MyComponent_onMount = (state) => {
|
|
3
|
+
typeof __STATE__ === "object" &&
|
|
4
|
+
Object.assign(state, __STATE__[state.serverStateId]);
|
|
5
|
+
withScopedStylesQrl(qrl("./low.js", "MyComponent_styles", []));
|
|
6
|
+
return qrl("./low.js", "MyComponent_onRender", [state]);
|
|
10
7
|
};
|
|
11
|
-
export const MyComponent =
|
|
8
|
+
export const MyComponent = componentQrl(
|
|
9
|
+
qrl("./med.js", "MyComponent_onMount", [])
|
|
10
|
+
);
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { Image, __merge } from "./med.js";
|
|
2
|
-
|
|
3
|
-
import { h, qrl, useLexicalScope } from "@builder.io/qwik";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export const MyComponent_styles = `
|
|
7
|
-
.cvk52jt{
|
|
8
|
-
display: flex;
|
|
9
|
-
flex-direction: column;
|
|
10
|
-
position: relative;
|
|
11
|
-
flex-shrink: 0;
|
|
12
|
-
box-sizing: border-box;
|
|
13
|
-
margin-top: 20px;
|
|
14
|
-
min-height: 20px;
|
|
15
|
-
min-width: 20px;
|
|
16
|
-
overflow: hidden;
|
|
17
|
-
}
|
|
18
|
-
`;
|
|
19
|
-
|
|
20
|
-
export const MyComponent_onRender = () => {
|
|
21
|
-
const __scope__ = useLexicalScope();
|
|
22
|
-
const __props__ = __scope__[0];
|
|
23
|
-
const __state__ = __scope__[1];
|
|
24
|
-
const state = __merge(__state__, __props__);
|
|
25
|
-
;
|
|
26
|
-
return (
|
|
27
|
-
h(
|
|
28
|
-
Image,
|
|
29
|
-
{
|
|
30
|
-
image: "https://cdn.builder.io/api/v1/image/assets%2F23dfd7cef1104af59f281d58ec525923%2F4ecf7b7554464b0183ab8250f67e797b",
|
|
31
|
-
backgroundSize: "cover",
|
|
32
|
-
backgroundPosition: "center",
|
|
33
|
-
class: "cvk52jt",
|
|
34
|
-
lazy: true,
|
|
35
|
-
fitContent: true,
|
|
36
|
-
aspectRatio: 1,
|
|
37
|
-
height: 1300,
|
|
38
|
-
width: 1300
|
|
39
|
-
}
|
|
40
|
-
)
|
|
41
|
-
);
|
|
42
|
-
};
|
|
@@ -1,12 +1,149 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import {
|
|
2
|
+
Fragment,
|
|
3
|
+
componentQrl,
|
|
4
|
+
h,
|
|
5
|
+
qrl,
|
|
6
|
+
useLexicalScope,
|
|
7
|
+
withScopedStylesQrl,
|
|
8
|
+
} from "@builder.io/qwik";
|
|
9
|
+
export const MyComponent_styles = `.cvk52jt{display:flex;flex-direction:column;position:relative;flex-shrink:0;box-sizing:border-box;margin-top:20px;min-height:20px;min-width:20px;overflow:hidden}.cjrqfb1{display:flex;flex-direction:column;position:relative;flex-shrink:0;box-sizing:border-box;margin-top:20px;line-height:normal;height:auto;text-align:center}`;
|
|
10
|
+
export const MyComponent_onMount = (state) => {
|
|
11
|
+
if (state.myState === undefined) state.myState = "initialValue";
|
|
12
|
+
typeof __STATE__ === "object" &&
|
|
13
|
+
Object.assign(state, __STATE__[state.serverStateId]);
|
|
14
|
+
withScopedStylesQrl(qrl("./med.js", "MyComponent_styles", []));
|
|
15
|
+
return qrl("./med.js", "MyComponent_onRender", [state]);
|
|
16
|
+
};
|
|
17
|
+
export const MyComponent = componentQrl(
|
|
18
|
+
qrl("./med.js", "MyComponent_onMount", [])
|
|
19
|
+
);
|
|
20
|
+
export const MyComponent_onRender = () => {
|
|
21
|
+
const state = useLexicalScope()[0];
|
|
22
|
+
return h(
|
|
23
|
+
Fragment,
|
|
24
|
+
null,
|
|
25
|
+
h(Image, {
|
|
26
|
+
image:
|
|
27
|
+
"https://cdn.builder.io/api/v1/image/assets%2F23dfd7cef1104af59f281d58ec525923%2F4ecf7b7554464b0183ab8250f67e797b?width=1160",
|
|
28
|
+
backgroundSize: "cover",
|
|
29
|
+
backgroundPosition: "center",
|
|
30
|
+
srcset:
|
|
31
|
+
"https://cdn.builder.io/api/v1/image/assets%2F23dfd7cef1104af59f281d58ec525923%2F4ecf7b7554464b0183ab8250f67e797b?width=100 100w, https://cdn.builder.io/api/v1/image/assets%2F23dfd7cef1104af59f281d58ec525923%2F4ecf7b7554464b0183ab8250f67e797b?width=200 200w, https://cdn.builder.io/api/v1/image/assets%2F23dfd7cef1104af59f281d58ec525923%2F4ecf7b7554464b0183ab8250f67e797b?width=400 400w, https://cdn.builder.io/api/v1/image/assets%2F23dfd7cef1104af59f281d58ec525923%2F4ecf7b7554464b0183ab8250f67e797b?width=800 800w, https://cdn.builder.io/api/v1/image/assets%2F23dfd7cef1104af59f281d58ec525923%2F4ecf7b7554464b0183ab8250f67e797b?width=1200 1200w, https://cdn.builder.io/api/v1/image/assets%2F23dfd7cef1104af59f281d58ec525923%2F4ecf7b7554464b0183ab8250f67e797b?width=1600 1600w, https://cdn.builder.io/api/v1/image/assets%2F23dfd7cef1104af59f281d58ec525923%2F4ecf7b7554464b0183ab8250f67e797b?width=2000 2000w, https://cdn.builder.io/api/v1/image/assets%2F23dfd7cef1104af59f281d58ec525923%2F4ecf7b7554464b0183ab8250f67e797b?width=1160 1160w, https://cdn.builder.io/api/v1/image/assets%2F23dfd7cef1104af59f281d58ec525923%2F4ecf7b7554464b0183ab8250f67e797b?width=598 598w, https://cdn.builder.io/api/v1/image/assets%2F23dfd7cef1104af59f281d58ec525923%2F4ecf7b7554464b0183ab8250f67e797b?width=958 958w",
|
|
32
|
+
sizes: "(max-width: 638px) 94vw, (max-width: 998px) 96vw, 83vw",
|
|
33
|
+
class: "cvk52jt",
|
|
34
|
+
onClickQrl: qrl("./high.js", "MyComponent_onClick_0", [state]),
|
|
35
|
+
lazy: false,
|
|
36
|
+
fitContent: true,
|
|
37
|
+
aspectRatio: 1,
|
|
38
|
+
height: 1300,
|
|
39
|
+
width: 1300,
|
|
40
|
+
}),
|
|
41
|
+
h(
|
|
42
|
+
"div",
|
|
43
|
+
{ class: "cjrqfb1" },
|
|
44
|
+
h("div", {
|
|
45
|
+
class: "builder-text",
|
|
46
|
+
innerHTML: (() => {
|
|
47
|
+
try {
|
|
48
|
+
var _virtual_index = state.myState;
|
|
49
|
+
return _virtual_index;
|
|
50
|
+
} catch (err) {
|
|
51
|
+
console.warn("Builder code error", err);
|
|
52
|
+
}
|
|
53
|
+
})(),
|
|
54
|
+
})
|
|
55
|
+
)
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
export const Image = function Image(props) {
|
|
59
|
+
var _a;
|
|
60
|
+
var jsx = props.children || [];
|
|
61
|
+
var image = props.image;
|
|
62
|
+
if (image) {
|
|
63
|
+
var isBuilderIoImage = !!(image || "").match(/\.builder\.io/);
|
|
64
|
+
var isPixel =
|
|
65
|
+
(_a = props.builderBlock) === null || _a === void 0
|
|
66
|
+
? void 0
|
|
67
|
+
: _a.id.startsWith("builder-pixel-");
|
|
68
|
+
var imgProps = {
|
|
69
|
+
src: props.image,
|
|
70
|
+
style:
|
|
71
|
+
"object-fit:"
|
|
72
|
+
.concat(props.backgroundSize || "cover", ";object-position:")
|
|
73
|
+
.concat(props.backgroundPosition || "center", ";") +
|
|
74
|
+
(props.aspectRatio
|
|
75
|
+
? "position:absolute;height:100%;width:100%;top:0;left:0"
|
|
76
|
+
: ""),
|
|
77
|
+
sizes: props.sizes,
|
|
78
|
+
alt: props.altText,
|
|
79
|
+
role: !props.altText ? "presentation" : undefined,
|
|
80
|
+
loading: isPixel ? "eager" : "lazy",
|
|
81
|
+
srcset: undefined,
|
|
82
|
+
};
|
|
83
|
+
if (isBuilderIoImage) {
|
|
84
|
+
image = updateQueryParam(image, "format", "webp");
|
|
85
|
+
var srcset = ["100", "200", "400", "800", "1200", "1600", "2000"]
|
|
86
|
+
.concat(props.srcsetSizes ? String(props.srcsetSizes).split(" ") : [])
|
|
87
|
+
.map(function (size) {
|
|
88
|
+
return updateQueryParam(image, "width", size) + " " + size + "w";
|
|
89
|
+
})
|
|
90
|
+
.join(",");
|
|
91
|
+
imgProps.srcset = srcset;
|
|
92
|
+
jsx = jsx = [
|
|
93
|
+
h("picture", {}, [
|
|
94
|
+
h("source", { type: "image/webp", srcset: srcset }),
|
|
95
|
+
h("img", imgProps, jsx),
|
|
96
|
+
]),
|
|
97
|
+
];
|
|
98
|
+
} else {
|
|
99
|
+
jsx = [h("img", imgProps, jsx)];
|
|
100
|
+
}
|
|
101
|
+
if (
|
|
102
|
+
props.aspectRatio &&
|
|
103
|
+
!(props.fitContent && props.children && props.children.length)
|
|
104
|
+
) {
|
|
105
|
+
var sizingDiv = h("div", {
|
|
106
|
+
class: "builder-image-sizer",
|
|
107
|
+
style: "width:100%;padding-top:".concat(
|
|
108
|
+
(props.aspectRatio || 1) * 100,
|
|
109
|
+
"%;pointer-events:none;font-size:0"
|
|
110
|
+
),
|
|
111
|
+
});
|
|
112
|
+
jsx.push(sizingDiv);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
var children = props.children ? [jsx].concat(props.children) : [jsx];
|
|
116
|
+
return h(
|
|
117
|
+
props.href ? "a" : "div",
|
|
118
|
+
__passThroughProps__({ href: props.href, class: props.class }, props),
|
|
119
|
+
children
|
|
120
|
+
);
|
|
121
|
+
function updateQueryParam(uri, key, value) {
|
|
122
|
+
if (uri === void 0) {
|
|
123
|
+
uri = "";
|
|
124
|
+
}
|
|
125
|
+
var re = new RegExp("([?&])" + key + "=.*?(&|$)", "i");
|
|
126
|
+
var separator = uri.indexOf("?") !== -1 ? "&" : "?";
|
|
127
|
+
if (uri.match(re)) {
|
|
128
|
+
return uri.replace(
|
|
129
|
+
re,
|
|
130
|
+
"$1" + key + "=" + encodeURIComponent(value) + "$2"
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
return uri + separator + key + "=" + encodeURIComponent(value);
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
export const __passThroughProps__ = function __passThroughProps__(
|
|
137
|
+
dstProps,
|
|
138
|
+
srcProps
|
|
139
|
+
) {
|
|
140
|
+
for (var key in srcProps) {
|
|
141
|
+
if (
|
|
142
|
+
Object.prototype.hasOwnProperty.call(srcProps, key) &&
|
|
143
|
+
((key.startsWith("on") && key.endsWith("Qrl")) || key == "style")
|
|
144
|
+
) {
|
|
145
|
+
dstProps[key] = srcProps[key];
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return dstProps;
|
|
149
|
+
};
|