@builder.io/sdk-qwik 0.0.2-1 → 0.0.6
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/package.json +2 -3
- package/src/blocks/button/button.jsx +94 -108
- package/src/blocks/form/builder-blocks.jsx +30 -44
- package/src/blocks/form/form.jsx +1 -8
- package/src/blocks/symbol/symbol.jsx +5 -24
- package/src/blocks/util.js +0 -5
- package/src/components/render-block/block-styles.jsx +35 -47
- package/src/components/render-block/render-block.jsx +214 -230
- package/src/components/render-block/render-component.jsx +103 -115
- package/src/components/render-block/render-repeated-block.jsx +11 -26
- package/src/components/render-content/components/render-styles.jsx +11 -25
- package/src/components/render-content/render-content.jsx +92 -99
- package/src/components/render-inlined-styles.jsx +66 -78
- package/src/functions/get-content/index.js +0 -3
- package/src/functions/get-fetch.js +2 -1
- package/src/scripts/init-editing.js +5 -4
- package/tsconfig.json +1 -1
- package/types.d.ts +12 -7
|
@@ -5,7 +5,7 @@ import { TARGET } from "../../constants/target.js";
|
|
|
5
5
|
import { getProcessedBlock } from "../../functions/get-processed-block.js";
|
|
6
6
|
import { convertStyleMaptoCSS } from "../../helpers/css.js";
|
|
7
7
|
import RenderInlinedStyles from "../render-inlined-styles";
|
|
8
|
-
import { Fragment,
|
|
8
|
+
import { Fragment, h } from "@builder.io/qwik";
|
|
9
9
|
export const useBlock = function useBlock(props, state) {
|
|
10
10
|
return getProcessedBlock({
|
|
11
11
|
block: props.block,
|
|
@@ -50,11 +50,11 @@ export const css = function css(props, state) {
|
|
|
50
50
|
export const BlockStyles = (props) => {
|
|
51
51
|
const state = {};
|
|
52
52
|
return (
|
|
53
|
-
|
|
53
|
+
<>
|
|
54
54
|
{TARGET === "vue2" || TARGET === "vue3" || TARGET === "svelte" ? (
|
|
55
55
|
<RenderInlinedStyles styles={css(props, state)}></RenderInlinedStyles>
|
|
56
56
|
) : null}
|
|
57
|
-
|
|
57
|
+
</>
|
|
58
58
|
);
|
|
59
59
|
};
|
|
60
60
|
export default BlockStyles;
|
|
@@ -112,62 +112,50 @@ export const COMPONENT = {
|
|
|
112
112
|
children: [
|
|
113
113
|
{
|
|
114
114
|
"@type": "@builder.io/mitosis/node",
|
|
115
|
-
name: "
|
|
115
|
+
name: "Show",
|
|
116
116
|
meta: {},
|
|
117
117
|
scope: {},
|
|
118
|
-
properties: {
|
|
119
|
-
|
|
118
|
+
properties: {},
|
|
119
|
+
bindings: {
|
|
120
|
+
when: {
|
|
121
|
+
code: "TARGET === 'vue2' || TARGET === 'vue3' || TARGET === 'svelte'",
|
|
122
|
+
},
|
|
120
123
|
},
|
|
121
|
-
bindings: {},
|
|
122
124
|
children: [
|
|
123
125
|
{
|
|
124
126
|
"@type": "@builder.io/mitosis/node",
|
|
125
|
-
name: "
|
|
127
|
+
name: "div",
|
|
128
|
+
meta: {},
|
|
129
|
+
scope: {},
|
|
130
|
+
properties: {
|
|
131
|
+
_text: "\n ",
|
|
132
|
+
},
|
|
133
|
+
bindings: {},
|
|
134
|
+
children: [],
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"@type": "@builder.io/mitosis/node",
|
|
138
|
+
name: "RenderInlinedStyles",
|
|
126
139
|
meta: {},
|
|
127
140
|
scope: {},
|
|
128
141
|
properties: {},
|
|
129
142
|
bindings: {
|
|
130
|
-
|
|
131
|
-
code: "
|
|
143
|
+
styles: {
|
|
144
|
+
code: "css(props,state)",
|
|
132
145
|
},
|
|
133
146
|
},
|
|
134
|
-
children: [
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
{
|
|
147
|
-
"@type": "@builder.io/mitosis/node",
|
|
148
|
-
name: "RenderInlinedStyles",
|
|
149
|
-
meta: {},
|
|
150
|
-
scope: {},
|
|
151
|
-
properties: {},
|
|
152
|
-
bindings: {
|
|
153
|
-
styles: {
|
|
154
|
-
code: "css(props,state)",
|
|
155
|
-
},
|
|
156
|
-
},
|
|
157
|
-
children: [],
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
"@type": "@builder.io/mitosis/node",
|
|
161
|
-
name: "div",
|
|
162
|
-
meta: {},
|
|
163
|
-
scope: {},
|
|
164
|
-
properties: {
|
|
165
|
-
_text: "\n ",
|
|
166
|
-
},
|
|
167
|
-
bindings: {},
|
|
168
|
-
children: [],
|
|
169
|
-
},
|
|
170
|
-
],
|
|
147
|
+
children: [],
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"@type": "@builder.io/mitosis/node",
|
|
151
|
+
name: "div",
|
|
152
|
+
meta: {},
|
|
153
|
+
scope: {},
|
|
154
|
+
properties: {
|
|
155
|
+
_text: "\n ",
|
|
156
|
+
},
|
|
157
|
+
bindings: {},
|
|
158
|
+
children: [],
|
|
171
159
|
},
|
|
172
160
|
],
|
|
173
161
|
},
|