@builder.io/sdk 1.1.27-0 → 1.1.27-3

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 (57) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +5 -4
  3. package/dist/index.browser.js +1 -1
  4. package/dist/index.browser.js.map +1 -1
  5. package/dist/index.cjs.js +61 -56
  6. package/dist/index.cjs.js.map +1 -1
  7. package/dist/index.esm.js +61 -56
  8. package/dist/index.esm.js.map +1 -1
  9. package/dist/index.js +7 -6
  10. package/dist/index.js.map +1 -1
  11. package/dist/index.umd.js +61 -56
  12. package/dist/index.umd.js.map +1 -1
  13. package/dist/package.json +9 -2
  14. package/dist/src/builder.class.d.ts +203 -18
  15. package/dist/src/builder.class.js +63 -57
  16. package/dist/src/builder.class.js.map +1 -1
  17. package/dist/src/classes/animator.class.js +13 -12
  18. package/dist/src/classes/animator.class.js.map +1 -1
  19. package/dist/src/classes/cookies.class.js +8 -8
  20. package/dist/src/classes/cookies.class.js.map +1 -1
  21. package/dist/src/classes/observable.class.js +2 -1
  22. package/dist/src/classes/observable.class.js.map +1 -1
  23. package/dist/src/classes/promise.class.js +5 -4
  24. package/dist/src/classes/promise.class.js.map +1 -1
  25. package/dist/src/classes/query-string.class.js +2 -1
  26. package/dist/src/classes/query-string.class.js.map +1 -1
  27. package/dist/src/constants/builder.js +1 -0
  28. package/dist/src/constants/builder.js.map +1 -1
  29. package/dist/src/functions/assign.function.js +1 -0
  30. package/dist/src/functions/assign.function.js.map +1 -1
  31. package/dist/src/functions/fetch.function.js +3 -2
  32. package/dist/src/functions/fetch.function.js.map +1 -1
  33. package/dist/src/functions/finder.function.js +13 -11
  34. package/dist/src/functions/finder.function.js.map +1 -1
  35. package/dist/src/functions/get-top-level-domain.js +1 -0
  36. package/dist/src/functions/get-top-level-domain.js.map +1 -1
  37. package/dist/src/functions/next-tick.function.js +1 -0
  38. package/dist/src/functions/next-tick.function.js.map +1 -1
  39. package/dist/src/functions/omit.function.js +1 -0
  40. package/dist/src/functions/omit.function.js.map +1 -1
  41. package/dist/src/functions/throttle.function.js +1 -0
  42. package/dist/src/functions/throttle.function.js.map +1 -1
  43. package/dist/src/functions/uuid.js +1 -0
  44. package/dist/src/functions/uuid.js.map +1 -1
  45. package/dist/src/types/element.d.ts +4 -2
  46. package/docs/interfaces/Component.md +267 -0
  47. package/docs/interfaces/GetContentOptions.md +396 -0
  48. package/docs/interfaces/Input.md +232 -0
  49. package/docs/interfaces/InsertMenuConfig.md +83 -0
  50. package/docs/interfaces/InsertMenuItem.md +39 -0
  51. package/docs/interfaces/ParamsMap.md +5 -0
  52. package/docs/interfaces/UserAttributes.md +25 -0
  53. package/jest.config.ts +4 -4
  54. package/package.json +9 -2
  55. package/scripts/cleanup-generated-docs.js +18 -0
  56. package/typedoc.js +5 -0
  57. package/BUILD +0 -19
@@ -0,0 +1,396 @@
1
+ # Interface: GetContentOptions
2
+
3
+ ## Table of contents
4
+
5
+ ### Properties
6
+
7
+ - [cache](GetContentOptions.md#cache)
8
+ - [cacheSeconds](GetContentOptions.md#cacheseconds)
9
+ - [cachebust](GetContentOptions.md#cachebust)
10
+ - [entry](GetContentOptions.md#entry)
11
+ - [extractCss](GetContentOptions.md#extractcss)
12
+ - [fields](GetContentOptions.md#fields)
13
+ - [format](GetContentOptions.md#format)
14
+ - [includeRefs](GetContentOptions.md#includerefs)
15
+ - [includeUrl](GetContentOptions.md#includeurl)
16
+ - [initialContent](GetContentOptions.md#initialcontent)
17
+ - [key](GetContentOptions.md#key)
18
+ - [limit](GetContentOptions.md#limit)
19
+ - [model](GetContentOptions.md#model)
20
+ - [noEditorUpdates](GetContentOptions.md#noeditorupdates)
21
+ - [offset](GetContentOptions.md#offset)
22
+ - [omit](GetContentOptions.md#omit)
23
+ - [options](GetContentOptions.md#options)
24
+ - [prerender](GetContentOptions.md#prerender)
25
+ - [preview](GetContentOptions.md#preview)
26
+ - [query](GetContentOptions.md#query)
27
+ - [rev](GetContentOptions.md#rev)
28
+ - [staleCacheSeconds](GetContentOptions.md#stalecacheseconds)
29
+ - [static](GetContentOptions.md#static)
30
+ - [url](GetContentOptions.md#url)
31
+ - [userAttributes](GetContentOptions.md#userattributes)
32
+
33
+ ## Properties
34
+
35
+ ### cache
36
+
37
+ • `Optional` **cache**: `boolean`
38
+
39
+ Set to `false` to not cache responses when running on the client.
40
+
41
+ #### Defined in
42
+
43
+ [builder.class.ts:362](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L362)
44
+
45
+ ___
46
+
47
+ ### cacheSeconds
48
+
49
+ • `Optional` **cacheSeconds**: `number`
50
+
51
+ How long in seconds content should be cached for. Sets the max-age of the cache-control header
52
+ response header.
53
+
54
+ Use a higher value for better performance, lower for content that will change more frequently
55
+
56
+ **`see`** [https://www.builder.io/c/docs/query-api#__next:~:text=%26includeRefs%3Dtrue-,cacheSeconds,-No](https://www.builder.io/c/docs/query-api#__next:~:text=%26includeRefs%3Dtrue-,cacheSeconds,-No)
57
+
58
+ #### Defined in
59
+
60
+ [builder.class.ts:296](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L296)
61
+
62
+ ___
63
+
64
+ ### cachebust
65
+
66
+ • `Optional` **cachebust**: `boolean`
67
+
68
+ Bust through all caches. Not recommended for production (for performance),
69
+ but can be useful for development and static builds (so the static site has
70
+ fully fresh / up to date content)
71
+
72
+ #### Defined in
73
+
74
+ [builder.class.ts:334](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L334)
75
+
76
+ ___
77
+
78
+ ### entry
79
+
80
+ • `Optional` **entry**: `string`
81
+
82
+ Specific content entry ID to fetch.
83
+
84
+ #### Defined in
85
+
86
+ [builder.class.ts:372](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L372)
87
+
88
+ ___
89
+
90
+ ### extractCss
91
+
92
+ • `Optional` **extractCss**: `boolean`
93
+
94
+ Extract any styles to a separate css property when generating HTML.
95
+
96
+ #### Defined in
97
+
98
+ [builder.class.ts:344](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L344)
99
+
100
+ ___
101
+
102
+ ### fields
103
+
104
+ • `Optional` **fields**: `string`
105
+
106
+ #### Defined in
107
+
108
+ [builder.class.ts:379](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L379)
109
+
110
+ ___
111
+
112
+ ### format
113
+
114
+ • `Optional` **format**: ``"amp"`` \| ``"email"`` \| ``"html"`` \| ``"react"`` \| ``"solid"``
115
+
116
+ **`package`**
117
+
118
+ Affects HTML generation for specific targets.
119
+
120
+ #### Defined in
121
+
122
+ [builder.class.ts:395](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L395)
123
+
124
+ ___
125
+
126
+ ### includeRefs
127
+
128
+ • `Optional` **includeRefs**: `boolean`
129
+
130
+ Follow references. If you use the `reference` field to pull in other content without this
131
+ enabled we will not fetch that content for the final response.
132
+
133
+ #### Defined in
134
+
135
+ [builder.class.ts:287](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L287)
136
+
137
+ ___
138
+
139
+ ### includeUrl
140
+
141
+ • `Optional` **includeUrl**: `boolean`
142
+
143
+ **`package`**
144
+
145
+ #### Defined in
146
+
147
+ [builder.class.ts:282](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L282)
148
+
149
+ ___
150
+
151
+ ### initialContent
152
+
153
+ • `Optional` **initialContent**: `any`
154
+
155
+ **`package`**
156
+
157
+ `BuilderContent` to render instead of fetching.
158
+
159
+ #### Defined in
160
+
161
+ [builder.class.ts:354](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L354)
162
+
163
+ ___
164
+
165
+ ### key
166
+
167
+ • `Optional` **key**: `string`
168
+
169
+ #### Defined in
170
+
171
+ [builder.class.ts:389](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L389)
172
+
173
+ ___
174
+
175
+ ### limit
176
+
177
+ • `Optional` **limit**: `number`
178
+
179
+ Maximum number of results to return. Defaults to `1`.
180
+
181
+ #### Defined in
182
+
183
+ [builder.class.ts:311](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L311)
184
+
185
+ ___
186
+
187
+ ### model
188
+
189
+ • `Optional` **model**: `string`
190
+
191
+ The name of the model to fetch content for.
192
+
193
+ #### Defined in
194
+
195
+ [builder.class.ts:358](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L358)
196
+
197
+ ___
198
+
199
+ ### noEditorUpdates
200
+
201
+ • `Optional` **noEditorUpdates**: `boolean`
202
+
203
+ **`package`**
204
+
205
+ Don't listen to updates in the editor - this is useful for embedded
206
+ symbols so they don't accidentally listen to messages as you are editing
207
+ content thinking they should updates when they actually shouldn't.
208
+
209
+ #### Defined in
210
+
211
+ [builder.class.ts:430](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L430)
212
+
213
+ ___
214
+
215
+ ### offset
216
+
217
+ • `Optional` **offset**: `number`
218
+
219
+ Pagination results offset. Defaults to zero.
220
+
221
+ #### Defined in
222
+
223
+ [builder.class.ts:348](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L348)
224
+
225
+ ___
226
+
227
+ ### omit
228
+
229
+ • `Optional` **omit**: `string`
230
+
231
+ Omit only these fields.
232
+
233
+ **`example`**
234
+ ```
235
+ &omit=data.bigField,data.blocks
236
+ ```
237
+
238
+ #### Defined in
239
+
240
+ [builder.class.ts:388](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L388)
241
+
242
+ ___
243
+
244
+ ### options
245
+
246
+ • `Optional` **options**: `Object`
247
+
248
+ Additional query params of the Content API to send.
249
+
250
+ #### Index signature
251
+
252
+ ▪ [key: `string`]: `any`
253
+
254
+ #### Defined in
255
+
256
+ [builder.class.ts:422](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L422)
257
+
258
+ ___
259
+
260
+ ### prerender
261
+
262
+ • `Optional` **prerender**: `boolean`
263
+
264
+ Convert any visual builder content to HTML.
265
+
266
+ This will be on data.html of the response's content entry object json.
267
+
268
+ #### Defined in
269
+
270
+ [builder.class.ts:340](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L340)
271
+
272
+ ___
273
+
274
+ ### preview
275
+
276
+ • `Optional` **preview**: `boolean`
277
+
278
+ **`package`**
279
+
280
+ Indicate that the fetch request is for preview purposes.
281
+
282
+ #### Defined in
283
+
284
+ [builder.class.ts:368](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L368)
285
+
286
+ ___
287
+
288
+ ### query
289
+
290
+ • `Optional` **query**: `any`
291
+
292
+ Mongodb style query of your data. E.g.:
293
+
294
+ ```js
295
+ query: {
296
+ id: 'abc123',
297
+ data: {
298
+ myCustomField: { $gt: 20 },
299
+ }
300
+ }
301
+ ```
302
+
303
+ See more info on MongoDB's query operators and format.
304
+
305
+ **`see`** [https://docs.mongodb.com/manual/reference/operator/query/](https://docs.mongodb.com/manual/reference/operator/query/)
306
+
307
+ #### Defined in
308
+
309
+ [builder.class.ts:328](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L328)
310
+
311
+ ___
312
+
313
+ ### rev
314
+
315
+ • `Optional` **rev**: `string`
316
+
317
+ **`package`**
318
+
319
+ Specific string to use for cache busting. e.g. every time we generate
320
+ HTML we generate a rev (a revision ID) and we send that with each request
321
+ on the client, such that if we generate new server HTML we get a new rev
322
+ and we use that to bust the cache because even though the content ID may
323
+ be the same, it could be an updated version of this content that needs to
324
+ be fresh.
325
+
326
+ #### Defined in
327
+
328
+ [builder.class.ts:411](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L411)
329
+
330
+ ___
331
+
332
+ ### staleCacheSeconds
333
+
334
+ • `Optional` **staleCacheSeconds**: `number`
335
+
336
+ Builder.io uses stale-while-revalidate caching at the CDN level. This means we always serve
337
+ from edge cache and update caches in the background for maximum possible performance. This also
338
+ means that the more frequently content is requested, the more fresh it will be. The longest we
339
+ will ever hold something in stale cache is 1 day by default, and you can set this to be shorter
340
+ yourself as well. We suggest keeping this high unless you have content that must change rapidly
341
+ and gets very little traffic.
342
+
343
+ **`see`** [https://www.fastly.com/blog/prevent-application-network-instability-serve-stale-content](https://www.fastly.com/blog/prevent-application-network-instability-serve-stale-content)
344
+
345
+ #### Defined in
346
+
347
+ [builder.class.ts:307](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L307)
348
+
349
+ ___
350
+
351
+ ### static
352
+
353
+ • `Optional` **static**: `boolean`
354
+
355
+ **`package`**
356
+
357
+ Tell the API that when generating HTML to generate it in static mode for
358
+ a/b tests instead of the older way we did this
359
+
360
+ #### Defined in
361
+
362
+ [builder.class.ts:418](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L418)
363
+
364
+ ___
365
+
366
+ ### url
367
+
368
+ • `Optional` **url**: `string`
369
+
370
+ Alias for userAttributes.urlPath except it can handle a full URL (optionally with host,
371
+ protocol, query, etc) and we will parse out the path.
372
+
373
+ #### Defined in
374
+
375
+ [builder.class.ts:278](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L278)
376
+
377
+ ___
378
+
379
+ ### userAttributes
380
+
381
+ • `Optional` **userAttributes**: [`UserAttributes`](UserAttributes.md)
382
+
383
+ User attribute key value pairs to be used for targeting
384
+ https://www.builder.io/c/docs/custom-targeting-attributes
385
+
386
+ e.g.
387
+ ```js
388
+ userAttributes: {
389
+ urlPath: '/',
390
+ returnVisitor: true,
391
+ }
392
+ ```
393
+
394
+ #### Defined in
395
+
396
+ [builder.class.ts:273](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L273)
@@ -0,0 +1,232 @@
1
+ # Interface: Input
2
+
3
+ This is the interface for inputs in `Builder.registerComponent`
4
+
5
+ ```js
6
+ Builder.registerComponent(MyComponent, {
7
+ inputs: [{ name: 'title', type: 'text' }] // <- Input[]
8
+ })
9
+ ```
10
+
11
+ Learn more about registering custom components [here](https://www.builder.io/c/docs/custom-react-components)
12
+
13
+ ## Table of contents
14
+
15
+ ### Properties
16
+
17
+ - [advanced](Input.md#advanced)
18
+ - [broadcast](Input.md#broadcast)
19
+ - [bubble](Input.md#bubble)
20
+ - [defaultValue](Input.md#defaultvalue)
21
+ - [enum](Input.md#enum)
22
+ - [friendlyName](Input.md#friendlyname)
23
+ - [helperText](Input.md#helpertext)
24
+ - [max](Input.md#max)
25
+ - [min](Input.md#min)
26
+ - [name](Input.md#name)
27
+ - [regex](Input.md#regex)
28
+ - [required](Input.md#required)
29
+ - [step](Input.md#step)
30
+ - [subFields](Input.md#subfields)
31
+ - [type](Input.md#type)
32
+
33
+ ## Properties
34
+
35
+ ### advanced
36
+
37
+ • `Optional` **advanced**: `boolean`
38
+
39
+ Set this to `true` to put this under the "show more" section of
40
+ the options editor. Useful for things that are more advanced
41
+ or more rarely used and don't need to be too prominent
42
+
43
+ #### Defined in
44
+
45
+ [builder.class.ts:556](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L556)
46
+
47
+ ___
48
+
49
+ ### broadcast
50
+
51
+ • `Optional` **broadcast**: `boolean`
52
+
53
+ Set this to `true` to show the editor for this input when
54
+ children of this component are selected. This is useful for things
55
+ like Tabs, such that users may not always select the Tabs component
56
+ directly but will still be looking for how to add additional tabs
57
+
58
+ #### Defined in
59
+
60
+ [builder.class.ts:526](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L526)
61
+
62
+ ___
63
+
64
+ ### bubble
65
+
66
+ • `Optional` **bubble**: `boolean`
67
+
68
+ Set this to `true` to show the editor for this input when
69
+ group locked parents of this component are selected. This is useful
70
+ to bubble up important inputs for locked groups, like text and images
71
+
72
+ #### Defined in
73
+
74
+ [builder.class.ts:532](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L532)
75
+
76
+ ___
77
+
78
+ ### defaultValue
79
+
80
+ • `Optional` **defaultValue**: `any`
81
+
82
+ A default value to use
83
+
84
+ #### Defined in
85
+
86
+ [builder.class.ts:471](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L471)
87
+
88
+ ___
89
+
90
+ ### enum
91
+
92
+ • `Optional` **enum**: `string`[] \| { `helperText?`: `string` ; `label`: `string` ; `value`: `any` }[]
93
+
94
+ For "text" input type, specifying an enum will show a dropdown of options instead
95
+
96
+ #### Defined in
97
+
98
+ [builder.class.ts:538](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L538)
99
+
100
+ ___
101
+
102
+ ### friendlyName
103
+
104
+ • `Optional` **friendlyName**: `string`
105
+
106
+ A friendlier name to show in the UI if the component prop name is not ideal for end users
107
+
108
+ #### Defined in
109
+
110
+ [builder.class.ts:467](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L467)
111
+
112
+ ___
113
+
114
+ ### helperText
115
+
116
+ • `Optional` **helperText**: `string`
117
+
118
+ Additional text to render in the UI to give guidance on how to use this
119
+
120
+ **`example`**
121
+ ```js
122
+ helperText: 'Be sure to use a proper URL, starting with "https://"'
123
+ ```
124
+
125
+ #### Defined in
126
+
127
+ [builder.class.ts:492](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L492)
128
+
129
+ ___
130
+
131
+ ### max
132
+
133
+ • `Optional` **max**: `number`
134
+
135
+ Number field type validation maximum accepted input
136
+
137
+ #### Defined in
138
+
139
+ [builder.class.ts:510](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L510)
140
+
141
+ ___
142
+
143
+ ### min
144
+
145
+ • `Optional` **min**: `number`
146
+
147
+ Number field type validation minimum accepted input
148
+
149
+ #### Defined in
150
+
151
+ [builder.class.ts:514](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L514)
152
+
153
+ ___
154
+
155
+ ### name
156
+
157
+ • **name**: `string`
158
+
159
+ This is the name of the component prop this input represents
160
+
161
+ #### Defined in
162
+
163
+ [builder.class.ts:465](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L465)
164
+
165
+ ___
166
+
167
+ ### regex
168
+
169
+ • `Optional` **regex**: `Object`
170
+
171
+ Regex field validation for all string types (text, longText, html, url, etc)
172
+
173
+ #### Type declaration
174
+
175
+ | Name | Type | Description |
176
+ | :------ | :------ | :------ |
177
+ | `message` | `string` | Friendly message to display to end-users if the regex fails, e.g. "You must use a relative url starting with '/...' " |
178
+ | `options?` | `string` | flags for the RegExp constructor, e.g. "gi" |
179
+ | `pattern` | `string` | pattern to test, like "^\/[a-z]$" |
180
+
181
+ #### Defined in
182
+
183
+ [builder.class.ts:540](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L540)
184
+
185
+ ___
186
+
187
+ ### required
188
+
189
+ • `Optional` **required**: `boolean`
190
+
191
+ Is this input mandatory or not
192
+
193
+ #### Defined in
194
+
195
+ [builder.class.ts:480](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L480)
196
+
197
+ ___
198
+
199
+ ### step
200
+
201
+ • `Optional` **step**: `number`
202
+
203
+ Number field type step size when using arrows
204
+
205
+ #### Defined in
206
+
207
+ [builder.class.ts:518](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L518)
208
+
209
+ ___
210
+
211
+ ### subFields
212
+
213
+ • `Optional` **subFields**: [`Input`](Input.md)[]
214
+
215
+ #### Defined in
216
+
217
+ [builder.class.ts:483](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L483)
218
+
219
+ ___
220
+
221
+ ### type
222
+
223
+ • **type**: `string`
224
+
225
+ The type of input to use, such as 'text'
226
+
227
+ See all available inputs [here](https://www.builder.io/c/docs/custom-react-components#input-types)
228
+ and you can create your own custom input types and associated editor UIs with [plugins](https://www.builder.io/c/docs/extending/plugins)
229
+
230
+ #### Defined in
231
+
232
+ [builder.class.ts:478](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L478)
@@ -0,0 +1,83 @@
1
+ # Interface: InsertMenuConfig
2
+
3
+ Use this to register custom sections in the Insert menu, for instance
4
+ to make new sections to organize your custom components
5
+
6
+ ![Example of what a custom section looks like](https://cdn.builder.io/api/v1/image/assets%2F7f7bbcf72a1a4d72bac5daa359e7befd%2Fe5f2792e9c0f44ed89a9dcb77b945858)
7
+
8
+ **`example`**
9
+ ```js
10
+ Builder.register('insertMenu', {
11
+ name: 'Our components',
12
+ items: [
13
+ { name: 'Hero' },
14
+ { name: 'Double Columns' },
15
+ { name: 'Triple Columns' },
16
+ { name: 'Dynamic Columns' },
17
+ ],
18
+ })
19
+ ```
20
+
21
+ You can make as many custom sections as you like
22
+
23
+ See a complete usage example [here](https://github.com/builderio/builder/blob/main/examples/react-design-system/src/builder-settings.js)
24
+
25
+ ## Table of contents
26
+
27
+ ### Properties
28
+
29
+ - [advanced](InsertMenuConfig.md#advanced)
30
+ - [items](InsertMenuConfig.md#items)
31
+ - [name](InsertMenuConfig.md#name)
32
+ - [persist](InsertMenuConfig.md#persist)
33
+ - [priority](InsertMenuConfig.md#priority)
34
+
35
+ ## Properties
36
+
37
+ ### advanced
38
+
39
+ • `Optional` **advanced**: `boolean`
40
+
41
+ #### Defined in
42
+
43
+ [builder.class.ts:763](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L763)
44
+
45
+ ___
46
+
47
+ ### items
48
+
49
+ • **items**: [`InsertMenuItem`](InsertMenuItem.md)[]
50
+
51
+ #### Defined in
52
+
53
+ [builder.class.ts:764](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L764)
54
+
55
+ ___
56
+
57
+ ### name
58
+
59
+ • **name**: `string`
60
+
61
+ #### Defined in
62
+
63
+ [builder.class.ts:760](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L760)
64
+
65
+ ___
66
+
67
+ ### persist
68
+
69
+ • `Optional` **persist**: `boolean`
70
+
71
+ #### Defined in
72
+
73
+ [builder.class.ts:762](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L762)
74
+
75
+ ___
76
+
77
+ ### priority
78
+
79
+ • `Optional` **priority**: `number`
80
+
81
+ #### Defined in
82
+
83
+ [builder.class.ts:761](https://github.com/builderio/builder/blob/faf038e7/packages/core/src/builder.class.ts#L761)