@builder.io/sdk-qwik 0.0.9 → 0.0.10
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/lib/index.qwik.cjs +151 -207
- package/lib/index.qwik.mjs +152 -208
- package/package.json +3 -3
- package/src/blocks/button/button.jsx +0 -175
- package/src/blocks/columns/columns.jsx +27 -197
- package/src/blocks/custom-code/custom-code.jsx +16 -75
- package/src/blocks/embed/embed.jsx +20 -87
- package/src/blocks/form/builder-blocks.jsx +0 -75
- package/src/blocks/form/form.jsx +57 -536
- package/src/blocks/fragment/fragment.jsx +8 -56
- package/src/blocks/image/image.jsx +49 -493
- package/src/blocks/img/img.jsx +15 -72
- package/src/blocks/input/input.jsx +17 -83
- package/src/blocks/raw-text/raw-text.jsx +9 -50
- package/src/blocks/section/section.jsx +17 -94
- package/src/blocks/select/select.jsx +20 -145
- package/src/blocks/submit-button/submit-button.jsx +8 -84
- package/src/blocks/symbol/symbol.jsx +60 -194
- package/src/blocks/text/text.jsx +4 -43
- package/src/blocks/textarea/textarea.jsx +12 -62
- package/src/blocks/video/video.jsx +21 -71
- package/src/components/render-block/block-styles.jsx +0 -114
- package/src/components/render-block/render-block.jsx +0 -514
- package/src/components/render-block/render-component.jsx +0 -211
- package/src/components/render-block/render-repeated-block.jsx +0 -67
- package/src/components/render-blocks.jsx +40 -334
- package/src/components/render-content/components/render-styles.jsx +0 -50
- package/src/components/render-content/render-content.jsx +86 -385
- package/src/components/render-inlined-styles.jsx +0 -116
|
@@ -74,53 +74,3 @@ export const RenderContentStyles = component$((props) => {
|
|
|
74
74
|
);
|
|
75
75
|
});
|
|
76
76
|
export default RenderContentStyles;
|
|
77
|
-
export const COMPONENT = {
|
|
78
|
-
"@type": "@builder.io/mitosis/component",
|
|
79
|
-
imports: [
|
|
80
|
-
{
|
|
81
|
-
imports: {
|
|
82
|
-
RenderInlinedStyles: "default",
|
|
83
|
-
},
|
|
84
|
-
path: "../../render-inlined-styles.lite",
|
|
85
|
-
},
|
|
86
|
-
],
|
|
87
|
-
exports: {},
|
|
88
|
-
inputs: [],
|
|
89
|
-
meta: {},
|
|
90
|
-
refs: {},
|
|
91
|
-
state: {
|
|
92
|
-
getCssFromFont:
|
|
93
|
-
"@builder.io/mitosis/method:getCssFromFont(font: CustomFont) {\n // TODO: compute what font sizes are used and only load those.......\n const family = font.family + (font.kind && !font.kind.includes('#') ? ', ' + font.kind : '');\n const name = family.split(',')[0];\n const url = font.fileUrl ?? font?.files?.regular;\n let str = '';\n\n if (url && family && name) {\n str += `\n @font-face {\n font-family: \"${family}\";\n src: local(\"${name}\"), url('${url}') format('woff2');\n font-display: fallback;\n font-weight: 400;\n }\n `.trim();\n }\n\n if (font.files) {\n for (const weight in font.files) {\n const isNumber = String(Number(weight)) === weight;\n\n if (!isNumber) {\n continue;\n } // TODO: maybe limit number loaded\n\n\n const weightUrl = font.files[weight];\n\n if (weightUrl && weightUrl !== url) {\n str += `\n @font-face {\n font-family: \"${family}\";\n src: url('${weightUrl}') format('woff2');\n font-display: fallback;\n font-weight: ${weight};\n }\n `.trim();\n }\n }\n }\n\n return str;\n}",
|
|
94
|
-
getFontCss:
|
|
95
|
-
"@builder.io/mitosis/method:getFontCss({\n customFonts\n}: {\n customFonts?: CustomFont[];\n}) {\n // TODO: flag for this\n // if (!this.builder.allowCustomFonts) {\n // return '';\n // }\n // TODO: separate internal data from external\n return customFonts?.map(font => getCssFromFont(props,state,font))?.join(' ') || '';\n}",
|
|
96
|
-
injectedStyles:
|
|
97
|
-
"@builder.io/mitosis/method:get injectedStyles() {\n return `\n${props.cssCode || ''}\n${getFontCss(props,state,{\n customFonts: props.customFonts\n })}`;\n}",
|
|
98
|
-
},
|
|
99
|
-
children: [
|
|
100
|
-
{
|
|
101
|
-
"@type": "@builder.io/mitosis/node",
|
|
102
|
-
name: "RenderInlinedStyles",
|
|
103
|
-
meta: {},
|
|
104
|
-
scope: {},
|
|
105
|
-
properties: {},
|
|
106
|
-
bindings: {
|
|
107
|
-
styles: {
|
|
108
|
-
code: "injectedStyles(props,state)",
|
|
109
|
-
},
|
|
110
|
-
},
|
|
111
|
-
children: [],
|
|
112
|
-
},
|
|
113
|
-
],
|
|
114
|
-
hooks: {},
|
|
115
|
-
context: {
|
|
116
|
-
get: {},
|
|
117
|
-
set: {},
|
|
118
|
-
},
|
|
119
|
-
name: "RenderContentStyles",
|
|
120
|
-
subComponents: [],
|
|
121
|
-
interfaces: [
|
|
122
|
-
"interface CustomFont {\n family?: string;\n kind?: string;\n fileUrl?: string;\n files?: {\n [key: string]: string;\n };\n}",
|
|
123
|
-
"interface Props {\n cssCode?: string;\n customFonts?: CustomFont[];\n}",
|
|
124
|
-
],
|
|
125
|
-
propsTypeRef: "Props",
|
|
126
|
-
};
|