@builder.io/sdk-qwik 0.0.7 → 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.
Files changed (35) hide show
  1. package/README.md +65 -2
  2. package/lib/index.97024df8.js +80165 -0
  3. package/lib/index.d8c1e37f.cjs +80165 -0
  4. package/lib/index.qwik.cjs +2465 -0
  5. package/lib/index.qwik.mjs +2465 -0
  6. package/package.json +3 -3
  7. package/src/blocks/button/button.jsx +0 -175
  8. package/src/blocks/columns/columns.jsx +27 -197
  9. package/src/blocks/custom-code/custom-code.jsx +16 -75
  10. package/src/blocks/embed/embed.jsx +20 -87
  11. package/src/blocks/form/builder-blocks.jsx +0 -75
  12. package/src/blocks/form/form.jsx +57 -536
  13. package/src/blocks/fragment/fragment.jsx +8 -56
  14. package/src/blocks/image/image.jsx +49 -493
  15. package/src/blocks/img/img.jsx +15 -72
  16. package/src/blocks/input/input.jsx +17 -83
  17. package/src/blocks/raw-text/raw-text.jsx +9 -50
  18. package/src/blocks/section/section.jsx +17 -94
  19. package/src/blocks/select/select.jsx +20 -145
  20. package/src/blocks/submit-button/submit-button.jsx +8 -84
  21. package/src/blocks/symbol/symbol.jsx +60 -194
  22. package/src/blocks/text/text.jsx +4 -43
  23. package/src/blocks/textarea/textarea.jsx +12 -62
  24. package/src/blocks/video/video.jsx +21 -71
  25. package/src/components/render-block/block-styles.jsx +0 -114
  26. package/src/components/render-block/render-block.jsx +0 -514
  27. package/src/components/render-block/render-component.jsx +0 -211
  28. package/src/components/render-block/render-repeated-block.jsx +0 -67
  29. package/src/components/render-blocks.jsx +40 -334
  30. package/src/components/render-content/components/render-styles.jsx +0 -50
  31. package/src/components/render-content/render-content.jsx +96 -374
  32. package/src/components/render-inlined-styles.jsx +0 -116
  33. package/src/scripts/init-editing.js +4 -5
  34. package/types.d.ts +7 -12
  35. package/root.json +0 -1176
@@ -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
- };