@builder.io/sdk-vue 0.0.1-48 → 0.0.1-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.
Files changed (161) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +20 -4
  3. package/nuxt2/src/blocks/button.vue +20 -20
  4. package/nuxt2/src/blocks/columns.vue +137 -137
  5. package/nuxt2/src/blocks/custom-code.vue +22 -22
  6. package/nuxt2/src/blocks/embed.vue +17 -17
  7. package/nuxt2/src/blocks/form.vue +143 -143
  8. package/nuxt2/src/blocks/fragment.vue +3 -3
  9. package/nuxt2/src/blocks/image.vue +55 -63
  10. package/nuxt2/src/blocks/img.vue +13 -13
  11. package/nuxt2/src/blocks/input.vue +52 -52
  12. package/nuxt2/src/blocks/raw-text.vue +7 -12
  13. package/nuxt2/src/blocks/section.vue +19 -19
  14. package/nuxt2/src/blocks/select.vue +17 -17
  15. package/nuxt2/src/blocks/submit-button.vue +15 -15
  16. package/nuxt2/src/blocks/symbol.vue +110 -13
  17. package/nuxt2/src/blocks/text.vue +11 -11
  18. package/nuxt2/src/blocks/textarea.vue +19 -19
  19. package/nuxt2/src/blocks/video.vue +61 -61
  20. package/nuxt2/src/components/render-block.vue +21 -24
  21. package/nuxt2/src/components/render-blocks.vue +25 -21
  22. package/nuxt2/src/components/render-content.vue +169 -75
  23. package/nuxt2/src/constants/device-sizes.js +9 -10
  24. package/nuxt2/src/context/builder.context.js +2 -3
  25. package/nuxt2/src/functions/apply-patch-with-mutation.js +87 -0
  26. package/nuxt2/src/functions/evaluate.js +23 -44
  27. package/nuxt2/src/functions/event-handler-name.js +2 -3
  28. package/nuxt2/src/functions/get-block-actions.js +20 -40
  29. package/nuxt2/src/functions/get-block-component-options.js +8 -18
  30. package/nuxt2/src/functions/get-block-properties.js +10 -26
  31. package/nuxt2/src/functions/get-block-styles.js +2 -3
  32. package/nuxt2/src/functions/get-block-tag.js +3 -4
  33. package/nuxt2/src/functions/get-builder-search-params/fn.test.js +31 -0
  34. package/nuxt2/src/functions/get-builder-search-params/index.js +29 -0
  35. package/nuxt2/src/functions/get-content/fn.test.js +49 -0
  36. package/nuxt2/src/functions/get-content/index.js +158 -0
  37. package/nuxt2/src/functions/get-fetch.js +10 -29
  38. package/nuxt2/src/functions/get-global-this.js +6 -7
  39. package/nuxt2/src/functions/get-processed-block.js +16 -41
  40. package/nuxt2/src/functions/get-processed-block.test.js +23 -43
  41. package/nuxt2/src/functions/get-target.js +3 -4
  42. package/nuxt2/src/functions/if-target.js +2 -3
  43. package/nuxt2/src/functions/is-browser.js +3 -4
  44. package/nuxt2/src/functions/is-editing.js +8 -30
  45. package/nuxt2/src/functions/is-iframe.js +7 -26
  46. package/nuxt2/src/functions/is-previewing.js +9 -28
  47. package/nuxt2/src/functions/is-react-native.js +2 -3
  48. package/nuxt2/src/functions/macro-eval.js +4 -4
  49. package/nuxt2/src/functions/on-change.js +5 -6
  50. package/nuxt2/src/functions/on-change.test.js +20 -52
  51. package/nuxt2/src/functions/previewing-model-name.js +8 -27
  52. package/nuxt2/src/functions/register-component.js +29 -62
  53. package/nuxt2/src/functions/register.js +13 -32
  54. package/nuxt2/src/functions/set-editor-settings.js +10 -29
  55. package/nuxt2/src/functions/set.js +4 -16
  56. package/nuxt2/src/functions/set.test.js +18 -38
  57. package/nuxt2/src/functions/track.js +16 -36
  58. package/nuxt2/src/functions/transform-block.js +2 -3
  59. package/nuxt2/src/index-helpers/blocks-exports.js +11 -0
  60. package/nuxt2/src/index-helpers/top-of-file.js +11 -0
  61. package/nuxt2/src/index.js +16 -31
  62. package/nuxt2/src/scripts/init-editing.js +45 -88
  63. package/nuxt2/src/types/builder-block.js +1 -2
  64. package/nuxt2/src/types/builder-content.js +1 -2
  65. package/nuxt2/src/types/deep-partial.js +1 -2
  66. package/nuxt2/src/types/typescript.js +3 -0
  67. package/package.json +1 -1
  68. package/vue2/src/constants/device-sizes.js +9 -10
  69. package/vue2/src/context/builder.context.js +2 -3
  70. package/vue2/src/functions/apply-patch-with-mutation.js +87 -0
  71. package/vue2/src/functions/evaluate.js +23 -44
  72. package/vue2/src/functions/event-handler-name.js +2 -3
  73. package/vue2/src/functions/get-block-actions.js +20 -40
  74. package/vue2/src/functions/get-block-component-options.js +8 -18
  75. package/vue2/src/functions/get-block-properties.js +10 -26
  76. package/vue2/src/functions/get-block-styles.js +2 -3
  77. package/vue2/src/functions/get-block-tag.js +3 -4
  78. package/vue2/src/functions/get-builder-search-params/fn.test.js +31 -0
  79. package/vue2/src/functions/get-builder-search-params/index.js +29 -0
  80. package/vue2/src/functions/get-content/fn.test.js +49 -0
  81. package/vue2/src/functions/get-content/index.js +158 -0
  82. package/vue2/src/functions/get-fetch.js +10 -29
  83. package/vue2/src/functions/get-global-this.js +6 -7
  84. package/vue2/src/functions/get-processed-block.js +16 -41
  85. package/vue2/src/functions/get-processed-block.test.js +23 -43
  86. package/vue2/src/functions/get-target.js +3 -4
  87. package/vue2/src/functions/if-target.js +2 -3
  88. package/vue2/src/functions/is-browser.js +3 -4
  89. package/vue2/src/functions/is-editing.js +8 -30
  90. package/vue2/src/functions/is-iframe.js +7 -26
  91. package/vue2/src/functions/is-previewing.js +9 -28
  92. package/vue2/src/functions/is-react-native.js +2 -3
  93. package/vue2/src/functions/macro-eval.js +4 -4
  94. package/vue2/src/functions/on-change.js +5 -6
  95. package/vue2/src/functions/on-change.test.js +20 -52
  96. package/vue2/src/functions/previewing-model-name.js +8 -27
  97. package/vue2/src/functions/register-component.js +29 -62
  98. package/vue2/src/functions/register.js +13 -32
  99. package/vue2/src/functions/set-editor-settings.js +10 -29
  100. package/vue2/src/functions/set.js +4 -16
  101. package/vue2/src/functions/set.test.js +18 -38
  102. package/vue2/src/functions/track.js +16 -36
  103. package/vue2/src/functions/transform-block.js +2 -3
  104. package/vue2/src/index-helpers/blocks-exports.js +11 -0
  105. package/vue2/src/index-helpers/top-of-file.js +11 -0
  106. package/vue2/src/index.js +16 -31
  107. package/vue2/src/scripts/init-editing.js +45 -88
  108. package/vue2/src/types/builder-block.js +1 -2
  109. package/vue2/src/types/builder-content.js +1 -2
  110. package/vue2/src/types/deep-partial.js +1 -2
  111. package/vue2/src/types/typescript.js +3 -0
  112. package/vue3/src/constants/device-sizes.js +9 -10
  113. package/vue3/src/context/builder.context.js +2 -3
  114. package/vue3/src/functions/apply-patch-with-mutation.js +87 -0
  115. package/vue3/src/functions/evaluate.js +23 -44
  116. package/vue3/src/functions/event-handler-name.js +2 -3
  117. package/vue3/src/functions/get-block-actions.js +20 -40
  118. package/vue3/src/functions/get-block-component-options.js +8 -18
  119. package/vue3/src/functions/get-block-properties.js +10 -26
  120. package/vue3/src/functions/get-block-styles.js +2 -3
  121. package/vue3/src/functions/get-block-tag.js +3 -4
  122. package/vue3/src/functions/get-builder-search-params/fn.test.js +31 -0
  123. package/vue3/src/functions/get-builder-search-params/index.js +29 -0
  124. package/vue3/src/functions/get-content/fn.test.js +49 -0
  125. package/vue3/src/functions/get-content/index.js +158 -0
  126. package/vue3/src/functions/get-fetch.js +10 -29
  127. package/vue3/src/functions/get-global-this.js +6 -7
  128. package/vue3/src/functions/get-processed-block.js +16 -41
  129. package/vue3/src/functions/get-processed-block.test.js +23 -43
  130. package/vue3/src/functions/get-target.js +3 -4
  131. package/vue3/src/functions/if-target.js +2 -3
  132. package/vue3/src/functions/is-browser.js +3 -4
  133. package/vue3/src/functions/is-editing.js +8 -30
  134. package/vue3/src/functions/is-iframe.js +7 -26
  135. package/vue3/src/functions/is-previewing.js +9 -28
  136. package/vue3/src/functions/is-react-native.js +2 -3
  137. package/vue3/src/functions/macro-eval.js +4 -4
  138. package/vue3/src/functions/on-change.js +5 -6
  139. package/vue3/src/functions/on-change.test.js +20 -52
  140. package/vue3/src/functions/previewing-model-name.js +8 -27
  141. package/vue3/src/functions/register-component.js +29 -62
  142. package/vue3/src/functions/register.js +13 -32
  143. package/vue3/src/functions/set-editor-settings.js +10 -29
  144. package/vue3/src/functions/set.js +4 -16
  145. package/vue3/src/functions/set.test.js +18 -38
  146. package/vue3/src/functions/track.js +16 -36
  147. package/vue3/src/functions/transform-block.js +2 -3
  148. package/vue3/src/index-helpers/blocks-exports.js +11 -0
  149. package/vue3/src/index-helpers/top-of-file.js +11 -0
  150. package/vue3/src/index.js +16 -31
  151. package/vue3/src/scripts/init-editing.js +45 -88
  152. package/vue3/src/types/builder-block.js +1 -2
  153. package/vue3/src/types/builder-content.js +1 -2
  154. package/vue3/src/types/deep-partial.js +1 -2
  155. package/vue3/src/types/typescript.js +3 -0
  156. package/nuxt2/src/functions/get-content.js +0 -194
  157. package/nuxt2/src/functions/get-content.test.js +0 -95
  158. package/vue2/src/functions/get-content.js +0 -194
  159. package/vue2/src/functions/get-content.test.js +0 -95
  160. package/vue3/src/functions/get-content.js +0 -194
  161. package/vue3/src/functions/get-content.test.js +0 -95
package/CHANGELOG.md ADDED
@@ -0,0 +1,13 @@
1
+ ### 0.0.1-49
2
+
3
+ - Fix: show the "+ add block" button on empty pages https://github.com/BuilderIO/builder/pull/934
4
+ - Add `getBuilderSearchParams` helper export to easily view current drafts on your production site. https://github.com/BuilderIO/builder/pull/883
5
+
6
+ ### 0.0.1-48
7
+
8
+ Changes:
9
+
10
+ - Adds support for Columns https://github.com/BuilderIO/builder/pull/717
11
+ - Add preliminary support for Children within custom components https://github.com/BuilderIO/builder/pull/753
12
+ - Seeds classnames to reduce variation in changes https://github.com/BuilderIO/builder/pull/703
13
+ - Fixes `getAllContent` to traverse all symbols/references https://github.com/BuilderIO/builder/pull/718
package/README.md CHANGED
@@ -2,12 +2,28 @@
2
2
 
3
3
  This is the 2.0 Vue SDK. It is currently in beta.
4
4
 
5
- NOTE: If you are looking for the stable 1.0 Vue SDK, you can find it [here](https://github.com/BuilderIO/builder/tree/main/packages/vue)
5
+ NOTE: If you are looking for the stable 1.0 Vue SDK, you can find it [here](/packages/vue)
6
6
 
7
7
  ## Feature Support
8
8
 
9
9
  To check the status of the SDK, look at [these tables](../../README.md#feature-implementation).
10
10
 
11
+ ## Version Support
12
+
13
+ Legend:
14
+
15
+ - ✅: implemented
16
+ - 🏗: currently in progress
17
+ - ⚠️: not-yet implemented
18
+ - N/A : does not apply
19
+
20
+ | Platform | Support |
21
+ | -------- | ------- |
22
+ | Vue 2 | 🏗 |
23
+ | Nuxt 2 | 🏗 |
24
+ | Vue 3 | ⚠️ |
25
+ | Nuxt 3 | ⚠️ |
26
+
11
27
  ## Getting Started
12
28
 
13
29
  ```
@@ -24,9 +40,9 @@ Add to your `nuxt.config.js`:
24
40
  buildModules: ['@builder.io/sdk-vue/nuxt'];
25
41
  ```
26
42
 
27
- Then register built in and custom components as seen [here](/examples/vue-nuxt/scripts/register-builder-components.js)
43
+ Then register built in and custom components as seen [here](/examples/vue/nuxt-2/scripts/register-builder-components.js)
28
44
 
29
45
  You can see examples of using Builder.io:
30
46
 
31
- - with Nuxt [here](/examples/vue-nuxt)
32
- - with Vue Storefront [here](/examples/vue/vue-storefront/)
47
+ - with Nuxt [here](/examples/vue/nuxt-2/)
48
+ - with Vue Storefront [here](/examples/vue/vue-storefront-2)
@@ -11,39 +11,39 @@
11
11
  <span v-bind="attributes" v-else="">{{ text }}</span>
12
12
  </template>
13
13
  <script>
14
- import { registerComponent } from '../functions/register-component';
14
+ import { registerComponent } from "../functions/register-component";
15
15
 
16
16
  export default registerComponent(
17
17
  {
18
- name: 'builder-button',
18
+ name: "builder-button",
19
19
 
20
- props: ['attributes', 'text', 'link', 'openLinkInNewTab'],
20
+ props: ["attributes", "text", "link", "openLinkInNewTab"],
21
21
  },
22
22
  {
23
- name: 'Core:Button',
23
+ name: "Core:Button",
24
24
  builtIn: true,
25
25
  image:
26
- 'https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13',
26
+ "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
27
27
  defaultStyles: {
28
- appearance: 'none',
29
- paddingTop: '15px',
30
- paddingBottom: '15px',
31
- paddingLeft: '25px',
32
- paddingRight: '25px',
33
- backgroundColor: '#000000',
34
- color: 'white',
35
- borderRadius: '4px',
36
- textAlign: 'center',
37
- cursor: 'pointer',
28
+ appearance: "none",
29
+ paddingTop: "15px",
30
+ paddingBottom: "15px",
31
+ paddingLeft: "25px",
32
+ paddingRight: "25px",
33
+ backgroundColor: "#000000",
34
+ color: "white",
35
+ borderRadius: "4px",
36
+ textAlign: "center",
37
+ cursor: "pointer",
38
38
  },
39
39
  inputs: [
40
- { name: 'text', type: 'text', defaultValue: 'Click me!', bubble: true },
41
- { name: 'link', type: 'url', bubble: true },
40
+ { name: "text", type: "text", defaultValue: "Click me!", bubble: true },
41
+ { name: "link", type: "url", bubble: true },
42
42
  {
43
- name: 'openLinkInNewTab',
44
- type: 'boolean',
43
+ name: "openLinkInNewTab",
44
+ type: "boolean",
45
45
  defaultValue: false,
46
- friendlyName: 'Open link in new tab',
46
+ friendlyName: "Open link in new tab",
47
47
  },
48
48
  ],
49
49
  static: true,
@@ -1,7 +1,7 @@
1
1
  <template>
2
- <div class="builder-columns div-23e8fqt91nf" :style="columnsCssVars">
2
+ <div class="builder-columns div-21azgz5avex" :style="columnsCssVars">
3
3
  <div
4
- class="builder-column div-23e8fqt91nf-2"
4
+ class="builder-column div-21azgz5avex-2"
5
5
  v-for="(column, index) in columns"
6
6
  :style="{
7
7
  width: getColumnCssWidth(index),
@@ -15,44 +15,44 @@
15
15
  </div>
16
16
  </template>
17
17
  <script>
18
- import RenderBlocks from '../components/render-blocks';
18
+ import RenderBlocks from "../components/render-blocks";
19
19
 
20
- import { registerComponent } from '../functions/register-component';
20
+ import { registerComponent } from "../functions/register-component";
21
21
 
22
22
  export default registerComponent(
23
23
  {
24
- name: 'builder-columns',
25
- components: { 'render-blocks': async () => RenderBlocks },
26
- props: ['space', 'columns', 'stackColumnsAt', 'reverseColumnsWhenStacked'],
24
+ name: "builder-columns",
25
+ components: { "render-blocks": async () => RenderBlocks },
26
+ props: ["space", "columns", "stackColumnsAt", "reverseColumnsWhenStacked"],
27
27
 
28
28
  computed: {
29
29
  columnsCssVars() {
30
30
  const flexDir =
31
- this.stackColumnsAt === 'never'
32
- ? 'inherit'
31
+ this.stackColumnsAt === "never"
32
+ ? "inherit"
33
33
  : this.reverseColumnsWhenStacked
34
- ? 'column-reverse'
35
- : 'column';
34
+ ? "column-reverse"
35
+ : "column";
36
36
  return {
37
- '--flex-dir': flexDir,
38
- '--flex-dir-tablet': this.maybeApplyForTablet(flexDir),
37
+ "--flex-dir": flexDir,
38
+ "--flex-dir-tablet": this.maybeApplyForTablet(flexDir),
39
39
  };
40
40
  },
41
41
  columnCssVars() {
42
- const width = '100%';
43
- const marginLeft = '0';
42
+ const width = "100%";
43
+ const marginLeft = "0";
44
44
  return {
45
- '--column-width': width,
46
- '--column-margin-left': marginLeft,
47
- '--column-width-tablet': this.maybeApplyForTablet(width),
48
- '--column-margin-left-tablet': this.maybeApplyForTablet(marginLeft),
45
+ "--column-width": width,
46
+ "--column-margin-left": marginLeft,
47
+ "--column-width-tablet": this.maybeApplyForTablet(width),
48
+ "--column-margin-left-tablet": this.maybeApplyForTablet(marginLeft),
49
49
  };
50
50
  },
51
51
  },
52
52
 
53
53
  methods: {
54
54
  getGutterSize() {
55
- return typeof this.space === 'number' ? this.space || 0 : 20;
55
+ return typeof this.space === "number" ? this.space || 0 : 20;
56
56
  },
57
57
  getColumns() {
58
58
  return this.columns || [];
@@ -69,139 +69,139 @@ export default registerComponent(
69
69
  return `calc(${this.getWidth(index)}% - ${subtractWidth}px)`;
70
70
  },
71
71
  maybeApplyForTablet(prop) {
72
- const stackColumnsAt = this.stackColumnsAt || 'tablet';
73
- return stackColumnsAt === 'tablet' ? prop : 'inherit';
72
+ const stackColumnsAt = this.stackColumnsAt || "tablet";
73
+ return stackColumnsAt === "tablet" ? prop : "inherit";
74
74
  },
75
75
  },
76
76
  },
77
77
  {
78
- name: 'Columns',
78
+ name: "Columns",
79
79
  builtIn: true,
80
80
  inputs: [
81
81
  {
82
- name: 'columns',
83
- type: 'array',
82
+ name: "columns",
83
+ type: "array",
84
84
  broadcast: true,
85
85
  subFields: [
86
86
  {
87
- name: 'blocks',
88
- type: 'array',
87
+ name: "blocks",
88
+ type: "array",
89
89
  hideFromUI: true,
90
90
  defaultValue: [
91
91
  {
92
- '@type': '@builder.io/sdk:Element',
92
+ "@type": "@builder.io/sdk:Element",
93
93
  responsiveStyles: {
94
94
  large: {
95
- display: 'flex',
96
- flexDirection: 'column',
97
- alignItems: 'stretch',
98
- flexShrink: '0',
99
- position: 'relative',
100
- marginTop: '30px',
101
- textAlign: 'center',
102
- lineHeight: 'normal',
103
- height: 'auto',
104
- minHeight: '20px',
105
- minWidth: '20px',
106
- overflow: 'hidden',
95
+ display: "flex",
96
+ flexDirection: "column",
97
+ alignItems: "stretch",
98
+ flexShrink: "0",
99
+ position: "relative",
100
+ marginTop: "30px",
101
+ textAlign: "center",
102
+ lineHeight: "normal",
103
+ height: "auto",
104
+ minHeight: "20px",
105
+ minWidth: "20px",
106
+ overflow: "hidden",
107
107
  },
108
108
  },
109
109
  component: {
110
- name: 'Image',
110
+ name: "Image",
111
111
  options: {
112
112
  image:
113
- 'https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d',
114
- backgroundPosition: 'center',
115
- backgroundSize: 'cover',
113
+ "https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
114
+ backgroundPosition: "center",
115
+ backgroundSize: "cover",
116
116
  aspectRatio: 0.7004048582995948,
117
117
  },
118
118
  },
119
119
  },
120
120
  {
121
- '@type': '@builder.io/sdk:Element',
121
+ "@type": "@builder.io/sdk:Element",
122
122
  responsiveStyles: {
123
123
  large: {
124
- display: 'flex',
125
- flexDirection: 'column',
126
- alignItems: 'stretch',
127
- flexShrink: '0',
128
- position: 'relative',
129
- marginTop: '30px',
130
- textAlign: 'center',
131
- lineHeight: 'normal',
132
- height: 'auto',
124
+ display: "flex",
125
+ flexDirection: "column",
126
+ alignItems: "stretch",
127
+ flexShrink: "0",
128
+ position: "relative",
129
+ marginTop: "30px",
130
+ textAlign: "center",
131
+ lineHeight: "normal",
132
+ height: "auto",
133
133
  },
134
134
  },
135
135
  component: {
136
- name: 'Text',
137
- options: { text: '<p>Enter some text...</p>' },
136
+ name: "Text",
137
+ options: { text: "<p>Enter some text...</p>" },
138
138
  },
139
139
  },
140
140
  ],
141
141
  },
142
142
  {
143
- name: 'width',
144
- type: 'number',
143
+ name: "width",
144
+ type: "number",
145
145
  hideFromUI: true,
146
- helperText: 'Width %, e.g. set to 50 to fill half of the space',
146
+ helperText: "Width %, e.g. set to 50 to fill half of the space",
147
147
  },
148
148
  {
149
- name: 'link',
150
- type: 'url',
149
+ name: "link",
150
+ type: "url",
151
151
  helperText:
152
- 'Optionally set a url that clicking this column will link to',
152
+ "Optionally set a url that clicking this column will link to",
153
153
  },
154
154
  ],
155
155
  defaultValue: [
156
156
  {
157
157
  blocks: [
158
158
  {
159
- '@type': '@builder.io/sdk:Element',
159
+ "@type": "@builder.io/sdk:Element",
160
160
  responsiveStyles: {
161
161
  large: {
162
- display: 'flex',
163
- flexDirection: 'column',
164
- alignItems: 'stretch',
165
- flexShrink: '0',
166
- position: 'relative',
167
- marginTop: '30px',
168
- textAlign: 'center',
169
- lineHeight: 'normal',
170
- height: 'auto',
171
- minHeight: '20px',
172
- minWidth: '20px',
173
- overflow: 'hidden',
162
+ display: "flex",
163
+ flexDirection: "column",
164
+ alignItems: "stretch",
165
+ flexShrink: "0",
166
+ position: "relative",
167
+ marginTop: "30px",
168
+ textAlign: "center",
169
+ lineHeight: "normal",
170
+ height: "auto",
171
+ minHeight: "20px",
172
+ minWidth: "20px",
173
+ overflow: "hidden",
174
174
  },
175
175
  },
176
176
  component: {
177
- name: 'Image',
177
+ name: "Image",
178
178
  options: {
179
179
  image:
180
- 'https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d',
181
- backgroundPosition: 'center',
182
- backgroundSize: 'cover',
180
+ "https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
181
+ backgroundPosition: "center",
182
+ backgroundSize: "cover",
183
183
  aspectRatio: 0.7004048582995948,
184
184
  },
185
185
  },
186
186
  },
187
187
  {
188
- '@type': '@builder.io/sdk:Element',
188
+ "@type": "@builder.io/sdk:Element",
189
189
  responsiveStyles: {
190
190
  large: {
191
- display: 'flex',
192
- flexDirection: 'column',
193
- alignItems: 'stretch',
194
- flexShrink: '0',
195
- position: 'relative',
196
- marginTop: '30px',
197
- textAlign: 'center',
198
- lineHeight: 'normal',
199
- height: 'auto',
191
+ display: "flex",
192
+ flexDirection: "column",
193
+ alignItems: "stretch",
194
+ flexShrink: "0",
195
+ position: "relative",
196
+ marginTop: "30px",
197
+ textAlign: "center",
198
+ lineHeight: "normal",
199
+ height: "auto",
200
200
  },
201
201
  },
202
202
  component: {
203
- name: 'Text',
204
- options: { text: '<p>Enter some text...</p>' },
203
+ name: "Text",
204
+ options: { text: "<p>Enter some text...</p>" },
205
205
  },
206
206
  },
207
207
  ],
@@ -209,52 +209,52 @@ export default registerComponent(
209
209
  {
210
210
  blocks: [
211
211
  {
212
- '@type': '@builder.io/sdk:Element',
212
+ "@type": "@builder.io/sdk:Element",
213
213
  responsiveStyles: {
214
214
  large: {
215
- display: 'flex',
216
- flexDirection: 'column',
217
- alignItems: 'stretch',
218
- flexShrink: '0',
219
- position: 'relative',
220
- marginTop: '30px',
221
- textAlign: 'center',
222
- lineHeight: 'normal',
223
- height: 'auto',
224
- minHeight: '20px',
225
- minWidth: '20px',
226
- overflow: 'hidden',
215
+ display: "flex",
216
+ flexDirection: "column",
217
+ alignItems: "stretch",
218
+ flexShrink: "0",
219
+ position: "relative",
220
+ marginTop: "30px",
221
+ textAlign: "center",
222
+ lineHeight: "normal",
223
+ height: "auto",
224
+ minHeight: "20px",
225
+ minWidth: "20px",
226
+ overflow: "hidden",
227
227
  },
228
228
  },
229
229
  component: {
230
- name: 'Image',
230
+ name: "Image",
231
231
  options: {
232
232
  image:
233
- 'https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d',
234
- backgroundPosition: 'center',
235
- backgroundSize: 'cover',
233
+ "https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
234
+ backgroundPosition: "center",
235
+ backgroundSize: "cover",
236
236
  aspectRatio: 0.7004048582995948,
237
237
  },
238
238
  },
239
239
  },
240
240
  {
241
- '@type': '@builder.io/sdk:Element',
241
+ "@type": "@builder.io/sdk:Element",
242
242
  responsiveStyles: {
243
243
  large: {
244
- display: 'flex',
245
- flexDirection: 'column',
246
- alignItems: 'stretch',
247
- flexShrink: '0',
248
- position: 'relative',
249
- marginTop: '30px',
250
- textAlign: 'center',
251
- lineHeight: 'normal',
252
- height: 'auto',
244
+ display: "flex",
245
+ flexDirection: "column",
246
+ alignItems: "stretch",
247
+ flexShrink: "0",
248
+ position: "relative",
249
+ marginTop: "30px",
250
+ textAlign: "center",
251
+ lineHeight: "normal",
252
+ height: "auto",
253
253
  },
254
254
  },
255
255
  component: {
256
- name: 'Text',
257
- options: { text: '<p>Enter some text...</p>' },
256
+ name: "Text",
257
+ options: { text: "<p>Enter some text...</p>" },
258
258
  },
259
259
  },
260
260
  ],
@@ -264,27 +264,27 @@ export default registerComponent(
264
264
  " function clearWidths() { columns.forEach(col => { col.delete('width'); }); } const columns = options.get('columns') as Array<map<string, any>>; if (Array.isArray(columns)) { const containsColumnWithWidth = !!columns.find(col => col.get('width')); if (containsColumnWithWidth) { const containsColumnWithoutWidth = !!columns.find(col => !col.get('width')); if (containsColumnWithoutWidth) { clearWidths(); } else { const sumWidths = columns.reduce((memo, col) => { return memo + col.get('width'); }, 0); const widthsDontAddUp = sumWidths !== 100; if (widthsDontAddUp) { clearWidths(); } } } } ",
265
265
  },
266
266
  {
267
- name: 'space',
268
- type: 'number',
267
+ name: "space",
268
+ type: "number",
269
269
  defaultValue: 20,
270
- helperText: 'Size of gap between columns',
270
+ helperText: "Size of gap between columns",
271
271
  advanced: true,
272
272
  },
273
273
  {
274
- name: 'stackColumnsAt',
275
- type: 'string',
276
- defaultValue: 'tablet',
274
+ name: "stackColumnsAt",
275
+ type: "string",
276
+ defaultValue: "tablet",
277
277
  helperText:
278
- 'Convert horizontal columns to vertical at what device size',
279
- enum: ['tablet', 'mobile', 'never'],
278
+ "Convert horizontal columns to vertical at what device size",
279
+ enum: ["tablet", "mobile", "never"],
280
280
  advanced: true,
281
281
  },
282
282
  {
283
- name: 'reverseColumnsWhenStacked',
284
- type: 'boolean',
283
+ name: "reverseColumnsWhenStacked",
284
+ type: "boolean",
285
285
  defaultValue: false,
286
286
  helperText:
287
- 'When stacking columns for mobile devices, reverse the ordering',
287
+ "When stacking columns for mobile devices, reverse the ordering",
288
288
  advanced: true,
289
289
  },
290
290
  ],
@@ -292,32 +292,32 @@ export default registerComponent(
292
292
  );
293
293
  </script>
294
294
  <style scoped>
295
- .div-23e8fqt91nf {
295
+ .div-21azgz5avex {
296
296
  display: flex;
297
297
  align-items: stretch;
298
298
  line-height: normal;
299
299
  }
300
300
  @media (max-width: 999px) {
301
- .div-23e8fqt91nf {
301
+ .div-21azgz5avex {
302
302
  flex-direction: var(--flex-dir-tablet);
303
303
  }
304
304
  }
305
305
  @media (max-width: 639px) {
306
- .div-23e8fqt91nf {
306
+ .div-21azgz5avex {
307
307
  flex-direction: var(--flex-dir);
308
308
  }
309
309
  }
310
- .div-23e8fqt91nf-2 {
310
+ .div-21azgz5avex-2 {
311
311
  flex-grow: 1;
312
312
  }
313
313
  @media (max-width: 999px) {
314
- .div-23e8fqt91nf-2 {
314
+ .div-21azgz5avex-2 {
315
315
  width: var(--column-width-tablet) !important;
316
316
  margin-left: var(--column-margin-left-tablet) !important;
317
317
  }
318
318
  }
319
319
  @media (max-width: 639px) {
320
- .div-23e8fqt91nf-2 {
320
+ .div-21azgz5avex-2 {
321
321
  width: var(--column-width) !important;
322
322
  margin-left: var(--column-margin-left) !important;
323
323
  }