@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.
Files changed (108) hide show
  1. package/README.md +2 -65
  2. package/lib/index.97024df8.js +80165 -0
  3. package/lib/index.d8c1e37f.cjs +80165 -0
  4. package/lib/index.qwik.cjs +2424 -0
  5. package/lib/index.qwik.mjs +2424 -0
  6. package/package.json +3 -4
  7. package/tsconfig.json +1 -1
  8. package/types.d.ts +12 -7
  9. package/src/blocks/button/button.jsx +0 -211
  10. package/src/blocks/button/component-info.js +0 -41
  11. package/src/blocks/columns/columns.jsx +0 -267
  12. package/src/blocks/columns/component-info.js +0 -242
  13. package/src/blocks/custom-code/component-info.js +0 -31
  14. package/src/blocks/custom-code/custom-code.jsx +0 -130
  15. package/src/blocks/embed/component-info.js +0 -44
  16. package/src/blocks/embed/embed.jsx +0 -130
  17. package/src/blocks/embed/helpers.js +0 -9
  18. package/src/blocks/form/builder-blocks.jsx +0 -100
  19. package/src/blocks/form/component-info.js +0 -262
  20. package/src/blocks/form/form.jsx +0 -789
  21. package/src/blocks/fragment/component-info.js +0 -11
  22. package/src/blocks/fragment/fragment.jsx +0 -59
  23. package/src/blocks/image/component-info.js +0 -151
  24. package/src/blocks/image/image.helpers.js +0 -48
  25. package/src/blocks/image/image.jsx +0 -554
  26. package/src/blocks/img/component-info.js +0 -20
  27. package/src/blocks/img/img.jsx +0 -76
  28. package/src/blocks/input/component-info.js +0 -74
  29. package/src/blocks/input/input.jsx +0 -87
  30. package/src/blocks/raw-text/component-info.js +0 -16
  31. package/src/blocks/raw-text/raw-text.jsx +0 -53
  32. package/src/blocks/section/component-info.js +0 -49
  33. package/src/blocks/section/section.jsx +0 -97
  34. package/src/blocks/select/component-info.js +0 -59
  35. package/src/blocks/select/select.jsx +0 -149
  36. package/src/blocks/submit-button/component-info.js +0 -28
  37. package/src/blocks/submit-button/submit-button.jsx +0 -87
  38. package/src/blocks/symbol/component-info.js +0 -43
  39. package/src/blocks/symbol/symbol.jsx +0 -230
  40. package/src/blocks/text/component-info.js +0 -24
  41. package/src/blocks/text/text.jsx +0 -46
  42. package/src/blocks/textarea/component-info.js +0 -47
  43. package/src/blocks/textarea/textarea.jsx +0 -65
  44. package/src/blocks/util.js +0 -12
  45. package/src/blocks/video/component-info.js +0 -106
  46. package/src/blocks/video/video.jsx +0 -103
  47. package/src/components/render-block/block-styles.jsx +0 -186
  48. package/src/components/render-block/render-block.helpers.js +0 -23
  49. package/src/components/render-block/render-block.jsx +0 -749
  50. package/src/components/render-block/render-component.jsx +0 -257
  51. package/src/components/render-block/render-repeated-block.jsx +0 -119
  52. package/src/components/render-block/types.js +0 -0
  53. package/src/components/render-blocks.jsx +0 -387
  54. package/src/components/render-content/components/render-styles.jsx +0 -140
  55. package/src/components/render-content/index.js +0 -4
  56. package/src/components/render-content/render-content.jsx +0 -636
  57. package/src/components/render-inlined-styles.jsx +0 -153
  58. package/src/constants/builder-registered-components.js +0 -48
  59. package/src/constants/device-sizes.js +0 -21
  60. package/src/constants/target.js +0 -4
  61. package/src/context/builder.context.js +0 -5
  62. package/src/functions/camel-to-kebab-case.js +0 -4
  63. package/src/functions/convert-style-object.js +0 -6
  64. package/src/functions/evaluate.js +0 -28
  65. package/src/functions/event-handler-name.js +0 -7
  66. package/src/functions/get-block-actions.js +0 -23
  67. package/src/functions/get-block-component-options.js +0 -28
  68. package/src/functions/get-block-properties.js +0 -29
  69. package/src/functions/get-block-styles.js +0 -34
  70. package/src/functions/get-block-tag.js +0 -6
  71. package/src/functions/get-builder-search-params/fn.test.js +0 -13
  72. package/src/functions/get-builder-search-params/index.js +0 -33
  73. package/src/functions/get-content/ab-testing.js +0 -38
  74. package/src/functions/get-content/fn.test.js +0 -31
  75. package/src/functions/get-content/index.js +0 -99
  76. package/src/functions/get-content/types.js +0 -0
  77. package/src/functions/get-fetch.js +0 -33
  78. package/src/functions/get-global-this.js +0 -18
  79. package/src/functions/get-processed-block.js +0 -53
  80. package/src/functions/get-processed-block.test.js +0 -32
  81. package/src/functions/if-target.js +0 -15
  82. package/src/functions/is-browser.js +0 -6
  83. package/src/functions/is-editing.js +0 -7
  84. package/src/functions/is-iframe.js +0 -7
  85. package/src/functions/is-previewing.js +0 -14
  86. package/src/functions/on-change.js +0 -27
  87. package/src/functions/on-change.test.js +0 -19
  88. package/src/functions/register-component.js +0 -72
  89. package/src/functions/register.js +0 -29
  90. package/src/functions/sanitize-styles.js +0 -5
  91. package/src/functions/set-editor-settings.js +0 -15
  92. package/src/functions/set.js +0 -11
  93. package/src/functions/set.test.js +0 -16
  94. package/src/functions/track.js +0 -22
  95. package/src/functions/transform-block.js +0 -6
  96. package/src/helpers/css.js +0 -12
  97. package/src/helpers/flatten.js +0 -34
  98. package/src/index-helpers/blocks-exports.js +0 -22
  99. package/src/index-helpers/top-of-file.js +0 -4
  100. package/src/index.js +0 -10
  101. package/src/scripts/init-editing.js +0 -79
  102. package/src/types/builder-block.js +0 -0
  103. package/src/types/builder-content.js +0 -0
  104. package/src/types/components.js +0 -0
  105. package/src/types/deep-partial.js +0 -0
  106. package/src/types/element.js +0 -0
  107. package/src/types/targets.js +0 -0
  108. package/src/types/typescript.js +0 -0
@@ -1,186 +0,0 @@
1
- // GENERATED BY MITOSIS
2
-
3
- import { getMaxWidthQueryForSize } from "../../constants/device-sizes.js";
4
- import { TARGET } from "../../constants/target.js";
5
- import { getProcessedBlock } from "../../functions/get-processed-block.js";
6
- import { convertStyleMaptoCSS } from "../../helpers/css.js";
7
- import RenderInlinedStyles from "../render-inlined-styles";
8
- import { Fragment, Host, h } from "@builder.io/qwik";
9
- export const useBlock = function useBlock(props, state) {
10
- return getProcessedBlock({
11
- block: props.block,
12
- state: props.context.state,
13
- context: props.context.context,
14
- evaluateBindings: true,
15
- });
16
- };
17
- export const css = function css(props, state) {
18
- const styles = useBlock(props, state).responsiveStyles;
19
- const largeStyles = styles?.large;
20
- const mediumStyles = styles?.medium;
21
- const smallStyles = styles?.small;
22
- return `
23
- ${
24
- largeStyles
25
- ? `.${useBlock(props, state).id} {${convertStyleMaptoCSS(
26
- largeStyles
27
- )}}`
28
- : ""
29
- }
30
- ${
31
- mediumStyles
32
- ? `${getMaxWidthQueryForSize("medium")} {
33
- .${useBlock(props, state).id} {${convertStyleMaptoCSS(
34
- mediumStyles
35
- )}}
36
- }`
37
- : ""
38
- }
39
- ${
40
- smallStyles
41
- ? `${getMaxWidthQueryForSize("small")} {
42
- .${useBlock(props, state).id} {${convertStyleMaptoCSS(
43
- smallStyles
44
- )}}
45
- }`
46
- : ""
47
- }
48
- }`;
49
- };
50
- export const BlockStyles = (props) => {
51
- const state = {};
52
- return (
53
- <Host q:host-pseudo="">
54
- {TARGET === "vue2" || TARGET === "vue3" || TARGET === "svelte" ? (
55
- <RenderInlinedStyles styles={css(props, state)}></RenderInlinedStyles>
56
- ) : null}
57
- </Host>
58
- );
59
- };
60
- export default BlockStyles;
61
- export const COMPONENT = {
62
- "@type": "@builder.io/mitosis/component",
63
- imports: [
64
- {
65
- imports: {
66
- getMaxWidthQueryForSize: "getMaxWidthQueryForSize",
67
- },
68
- path: "../../constants/device-sizes.js",
69
- },
70
- {
71
- imports: {
72
- TARGET: "TARGET",
73
- },
74
- path: "../../constants/target.js",
75
- },
76
- {
77
- imports: {
78
- getProcessedBlock: "getProcessedBlock",
79
- },
80
- path: "../../functions/get-processed-block.js",
81
- },
82
- {
83
- imports: {
84
- convertStyleMaptoCSS: "convertStyleMaptoCSS",
85
- },
86
- path: "../../helpers/css.js",
87
- },
88
- {
89
- imports: {
90
- RenderInlinedStyles: "default",
91
- },
92
- path: "../render-inlined-styles.lite",
93
- },
94
- ],
95
- exports: {},
96
- inputs: [],
97
- meta: {
98
- useMetadata: {
99
- qwik: {
100
- component: {
101
- isLight: true,
102
- },
103
- },
104
- },
105
- },
106
- refs: {},
107
- state: {
108
- useBlock:
109
- "@builder.io/mitosis/method:get useBlock() {\n return getProcessedBlock({\n block: props.block,\n state: props.context.state,\n context: props.context.context,\n evaluateBindings: true\n });\n}",
110
- css: "@builder.io/mitosis/method:get css() {\n const styles = useBlock(props,state).responsiveStyles;\n const largeStyles = styles?.large;\n const mediumStyles = styles?.medium;\n const smallStyles = styles?.small;\n return `\n ${largeStyles ? `.${useBlock(props,state).id} {${convertStyleMaptoCSS(largeStyles)}}` : ''}\n ${mediumStyles ? `${getMaxWidthQueryForSize('medium')} {\n .${useBlock(props,state).id} {${convertStyleMaptoCSS(mediumStyles)}}\n }` : ''}\n ${smallStyles ? `${getMaxWidthQueryForSize('small')} {\n .${useBlock(props,state).id} {${convertStyleMaptoCSS(smallStyles)}}\n }` : ''}\n }`;\n}",
111
- },
112
- children: [
113
- {
114
- "@type": "@builder.io/mitosis/node",
115
- name: "Host",
116
- meta: {},
117
- scope: {},
118
- properties: {
119
- "q:host-pseudo": "",
120
- },
121
- bindings: {},
122
- children: [
123
- {
124
- "@type": "@builder.io/mitosis/node",
125
- name: "Show",
126
- meta: {},
127
- scope: {},
128
- properties: {},
129
- bindings: {
130
- when: {
131
- code: "TARGET === 'vue2' || TARGET === 'vue3' || TARGET === 'svelte'",
132
- },
133
- },
134
- children: [
135
- {
136
- "@type": "@builder.io/mitosis/node",
137
- name: "div",
138
- meta: {},
139
- scope: {},
140
- properties: {
141
- _text: "\n ",
142
- },
143
- bindings: {},
144
- children: [],
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
- ],
171
- },
172
- ],
173
- },
174
- ],
175
- hooks: {},
176
- context: {
177
- get: {},
178
- set: {},
179
- },
180
- name: "BlockStyles",
181
- subComponents: [],
182
- types: [
183
- "export type BlockStylesProps = {\n block: BuilderBlock;\n context: BuilderContextInterface;\n};",
184
- ],
185
- propsTypeRef: "BlockStylesProps",
186
- };
@@ -1,23 +0,0 @@
1
- const EMPTY_HTML_ELEMENTS = [
2
- "area",
3
- "base",
4
- "br",
5
- "col",
6
- "embed",
7
- "hr",
8
- "img",
9
- "input",
10
- "keygen",
11
- "link",
12
- "meta",
13
- "param",
14
- "source",
15
- "track",
16
- "wbr"
17
- ];
18
- const isEmptyHtmlElement = (tagName) => {
19
- return typeof tagName === "string" && EMPTY_HTML_ELEMENTS.includes(tagName.toLowerCase());
20
- };
21
- export {
22
- isEmptyHtmlElement
23
- };