@teambit/sidebar 1.0.188 → 1.0.190

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.
@@ -1,4 +1,4 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <testsuites tests="0" failures="0" errors="0" skipped="0">
3
- <testsuite name="teambit.ui-foundation/sidebar@1.0.188" tests="0" failures="0" errors="0" skipped="0"/>
3
+ <testsuite name="teambit.ui-foundation/sidebar@1.0.190" tests="0" failures="0" errors="0" skipped="0"/>
4
4
  </testsuites>
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.ui-foundation/sidebar-preview"]=t():e["teambit.ui-foundation/sidebar-preview"]=t()}(self,(()=>(()=>{"use strict";var e={14426:(e,t,o)=>{var r={id:"teambit.ui-foundation/sidebar@1.0.188",homepage:"https://bit.cloud/teambit/ui-foundation/sidebar",exported:!0};function n(){const e=i(o(41594));return n=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,n.__bit_component=r,i.__bit_component=r;const a=()=>n().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},n().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/sidebar.svg"}));a.__bit_component=r,t.Logo=a},41594:e=>{e.exports=React}},t={};function o(r){var n=t[r];if(void 0!==n)return n.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{o.r(r),o.d(r,{compositions:()=>u,compositions_metadata:()=>l,overview:()=>f});var e={};o.r(e),o.d(e,{default:()=>d});var t=o(14426);o(41594);const n=MdxJsReact,i=TeambitMdxUiMdxScopeContext;var a=["components"];function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},s.apply(this,arguments)}var p={},c="wrapper";function d(e){var t=e.components,o=function(e,t){if(null==e)return{};var o,r,n=function(e,t){if(null==e)return{};var o,r,n={},i=Object.keys(e);for(r=0;r<i.length;r++)o=i[r],t.indexOf(o)>=0||(n[o]=e[o]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)o=i[r],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}(e,a);return(0,n.mdx)(c,s({},p,o,{components:t,mdxType:"MDXLayout"}),(0,n.mdx)(i.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"}))}d.isMDXComponent=!0;const u=[t],f=[e],l={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),r})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.ui-foundation/sidebar-preview"]=t():e["teambit.ui-foundation/sidebar-preview"]=t()}(self,(()=>(()=>{"use strict";var e={86429:(e,t,o)=>{var r={id:"teambit.ui-foundation/sidebar@1.0.190",homepage:"https://bit.cloud/teambit/ui-foundation/sidebar",exported:!0};function n(){const e=i(o(41594));return n=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,n.__bit_component=r,i.__bit_component=r;const a=()=>n().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},n().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/sidebar.svg"}));a.__bit_component=r,t.Logo=a},41594:e=>{e.exports=React}},t={};function o(r){var n=t[r];if(void 0!==n)return n.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{o.r(r),o.d(r,{compositions:()=>u,compositions_metadata:()=>l,overview:()=>f});var e={};o.r(e),o.d(e,{default:()=>d});var t=o(86429);o(41594);const n=MdxJsReact,i=TeambitMdxUiMdxScopeContext;var a=["components"];function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},s.apply(this,arguments)}var p={},c="wrapper";function d(e){var t=e.components,o=function(e,t){if(null==e)return{};var o,r,n=function(e,t){if(null==e)return{};var o,r,n={},i=Object.keys(e);for(r=0;r<i.length;r++)o=i[r],t.indexOf(o)>=0||(n[o]=e[o]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)o=i[r],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}(e,a);return(0,n.mdx)(c,s({},p,o,{components:t,mdxType:"MDXLayout"}),(0,n.mdx)(i.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"}))}d.isMDXComponent=!0;const u=[t],f=[e],l={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),r})()));
@@ -0,0 +1,1056 @@
1
+ {
2
+ "__schema": "APISchema",
3
+ "location": {
4
+ "filePath": "index.ts",
5
+ "line": 1,
6
+ "character": 1
7
+ },
8
+ "module": {
9
+ "__schema": "ModuleSchema",
10
+ "location": {
11
+ "filePath": "index.ts",
12
+ "line": 1,
13
+ "character": 1
14
+ },
15
+ "exports": [
16
+ {
17
+ "__schema": "ClassSchema",
18
+ "location": {
19
+ "filePath": "sidebar.ui.runtime.tsx",
20
+ "line": 23,
21
+ "character": 1
22
+ },
23
+ "signature": "class SidebarUI",
24
+ "name": "SidebarUI",
25
+ "members": [
26
+ {
27
+ "__schema": "ConstructorSchema",
28
+ "location": {
29
+ "filePath": "sidebar.ui.runtime.tsx",
30
+ "line": 24,
31
+ "character": 3
32
+ },
33
+ "signature": "constructor SidebarUI(drawerSlot: DrawerSlot): SidebarUI",
34
+ "name": "constructor",
35
+ "params": [
36
+ {
37
+ "__schema": "ParameterSchema",
38
+ "location": {
39
+ "filePath": "sidebar.ui.runtime.tsx",
40
+ "line": 24,
41
+ "character": 15
42
+ },
43
+ "name": "drawerSlot",
44
+ "type": {
45
+ "__schema": "TypeRefSchema",
46
+ "location": {
47
+ "filePath": "sidebar.ui.runtime.tsx",
48
+ "line": 24,
49
+ "character": 35
50
+ },
51
+ "name": "DrawerSlot",
52
+ "internalFilePath": "sidebar.ui.runtime.tsx"
53
+ },
54
+ "isOptional": false,
55
+ "isSpread": false
56
+ }
57
+ ],
58
+ "returnType": {
59
+ "__schema": "ThisTypeSchema",
60
+ "location": {
61
+ "filePath": "sidebar.ui.runtime.tsx",
62
+ "line": 23,
63
+ "character": 1
64
+ },
65
+ "name": "SidebarUI"
66
+ },
67
+ "modifiers": []
68
+ },
69
+ {
70
+ "__schema": "FunctionLikeSchema",
71
+ "location": {
72
+ "filePath": "sidebar.ui.runtime.tsx",
73
+ "line": 29,
74
+ "character": 3
75
+ },
76
+ "doc": {
77
+ "__schema": "DocSchema",
78
+ "location": {
79
+ "filePath": "sidebar.ui.runtime.tsx",
80
+ "line": 26,
81
+ "character": 3
82
+ },
83
+ "raw": "/**\n * register a new drawer into the component sidebar.\n */",
84
+ "comment": "register a new drawer into the component sidebar."
85
+ },
86
+ "signature": "(method) SidebarUI.registerDrawer(...drawer: DrawerType[]): this",
87
+ "name": "registerDrawer",
88
+ "params": [
89
+ {
90
+ "__schema": "ParameterSchema",
91
+ "location": {
92
+ "filePath": "sidebar.ui.runtime.tsx",
93
+ "line": 29,
94
+ "character": 18
95
+ },
96
+ "name": "drawer",
97
+ "type": {
98
+ "__schema": "TypeArraySchema",
99
+ "location": {
100
+ "filePath": "sidebar.ui.runtime.tsx",
101
+ "line": 29,
102
+ "character": 29
103
+ },
104
+ "type": {
105
+ "__schema": "TypeRefSchema",
106
+ "location": {
107
+ "filePath": "sidebar.ui.runtime.tsx",
108
+ "line": 29,
109
+ "character": 29
110
+ },
111
+ "name": "DrawerType",
112
+ "componentId": {
113
+ "scope": "teambit.ui-foundation",
114
+ "name": "ui/tree/drawer",
115
+ "version": "0.0.518"
116
+ }
117
+ }
118
+ },
119
+ "isOptional": false,
120
+ "isSpread": true
121
+ }
122
+ ],
123
+ "returnType": {
124
+ "__schema": "TypeRefSchema",
125
+ "location": {
126
+ "filePath": "sidebar.ui.runtime.tsx",
127
+ "line": 29,
128
+ "character": 3
129
+ },
130
+ "name": "SidebarUI"
131
+ },
132
+ "modifiers": []
133
+ },
134
+ {
135
+ "__schema": "VariableLikeSchema",
136
+ "location": {
137
+ "filePath": "sidebar.ui.runtime.tsx",
138
+ "line": 37,
139
+ "character": 3
140
+ },
141
+ "doc": {
142
+ "__schema": "DocSchema",
143
+ "location": {
144
+ "filePath": "sidebar.ui.runtime.tsx",
145
+ "line": 34,
146
+ "character": 3
147
+ },
148
+ "raw": "/**\n * render the sidebar.\n */",
149
+ "comment": "render the sidebar."
150
+ },
151
+ "signature": "(property) SidebarUI.render: (props: Partial<SideBarProps>) => React.JSX.Element",
152
+ "name": "render",
153
+ "type": {
154
+ "__schema": "InferenceTypeSchema",
155
+ "location": {
156
+ "filePath": "sidebar.ui.runtime.tsx",
157
+ "line": 37,
158
+ "character": 3
159
+ },
160
+ "type": "(props: Partial<SideBarProps>) => React.JSX.Element"
161
+ },
162
+ "isOptional": true,
163
+ "defaultValue": "(props: Partial<SideBarProps>) => {\n return <SideBar drawerSlot={this.drawerSlot} {...props}></SideBar>;\n }"
164
+ },
165
+ {
166
+ "__schema": "VariableLikeSchema",
167
+ "location": {
168
+ "filePath": "sidebar.ui.runtime.tsx",
169
+ "line": 41,
170
+ "character": 3
171
+ },
172
+ "signature": "(property) SidebarUI.runtime: RuntimeDefinition",
173
+ "name": "runtime",
174
+ "type": {
175
+ "__schema": "InferenceTypeSchema",
176
+ "location": {
177
+ "filePath": "sidebar.ui.runtime.tsx",
178
+ "line": 41,
179
+ "character": 3
180
+ },
181
+ "type": "RuntimeDefinition"
182
+ },
183
+ "isOptional": true,
184
+ "defaultValue": "UIRuntime"
185
+ },
186
+ {
187
+ "__schema": "VariableLikeSchema",
188
+ "location": {
189
+ "filePath": "sidebar.ui.runtime.tsx",
190
+ "line": 43,
191
+ "character": 3
192
+ },
193
+ "signature": "(property) SidebarUI.slots: ((registerFn: () => string) => SlotRegistry<DrawerType>)[]",
194
+ "name": "slots",
195
+ "type": {
196
+ "__schema": "InferenceTypeSchema",
197
+ "location": {
198
+ "filePath": "sidebar.ui.runtime.tsx",
199
+ "line": 43,
200
+ "character": 3
201
+ },
202
+ "type": "((registerFn: () => string) => SlotRegistry<DrawerType>)[]"
203
+ },
204
+ "isOptional": true,
205
+ "defaultValue": "[Slot.withType<DrawerType>()]"
206
+ },
207
+ {
208
+ "__schema": "VariableLikeSchema",
209
+ "location": {
210
+ "filePath": "sidebar.ui.runtime.tsx",
211
+ "line": 45,
212
+ "character": 3
213
+ },
214
+ "signature": "(property) SidebarUI.dependencies: never[]",
215
+ "name": "dependencies",
216
+ "type": {
217
+ "__schema": "InferenceTypeSchema",
218
+ "location": {
219
+ "filePath": "sidebar.ui.runtime.tsx",
220
+ "line": 45,
221
+ "character": 3
222
+ },
223
+ "type": "never[]"
224
+ },
225
+ "isOptional": true,
226
+ "defaultValue": "[]"
227
+ },
228
+ {
229
+ "__schema": "FunctionLikeSchema",
230
+ "location": {
231
+ "filePath": "sidebar.ui.runtime.tsx",
232
+ "line": 47,
233
+ "character": 3
234
+ },
235
+ "signature": "(method) SidebarUI.provider(deps: any, config: any, [drawerSlot]: [DrawerSlot]): Promise<SidebarUI>",
236
+ "name": "provider",
237
+ "params": [
238
+ {
239
+ "__schema": "ParameterSchema",
240
+ "location": {
241
+ "filePath": "sidebar.ui.runtime.tsx",
242
+ "line": 47,
243
+ "character": 25
244
+ },
245
+ "name": "deps",
246
+ "type": {
247
+ "__schema": "InferenceTypeSchema",
248
+ "location": {
249
+ "filePath": "sidebar.ui.runtime.tsx",
250
+ "line": 47,
251
+ "character": 25
252
+ },
253
+ "type": "any"
254
+ },
255
+ "isOptional": false,
256
+ "isSpread": false
257
+ },
258
+ {
259
+ "__schema": "ParameterSchema",
260
+ "location": {
261
+ "filePath": "sidebar.ui.runtime.tsx",
262
+ "line": 47,
263
+ "character": 31
264
+ },
265
+ "name": "config",
266
+ "type": {
267
+ "__schema": "InferenceTypeSchema",
268
+ "location": {
269
+ "filePath": "sidebar.ui.runtime.tsx",
270
+ "line": 47,
271
+ "character": 31
272
+ },
273
+ "type": "any"
274
+ },
275
+ "isOptional": false,
276
+ "isSpread": false
277
+ },
278
+ {
279
+ "__schema": "ParameterSchema",
280
+ "location": {
281
+ "filePath": "sidebar.ui.runtime.tsx",
282
+ "line": 47,
283
+ "character": 39
284
+ },
285
+ "name": "[ drawerSlot ]",
286
+ "type": {
287
+ "__schema": "TupleTypeSchema",
288
+ "location": {
289
+ "filePath": "sidebar.ui.runtime.tsx",
290
+ "line": 47,
291
+ "character": 53
292
+ },
293
+ "elements": [
294
+ {
295
+ "__schema": "TypeRefSchema",
296
+ "location": {
297
+ "filePath": "sidebar.ui.runtime.tsx",
298
+ "line": 47,
299
+ "character": 54
300
+ },
301
+ "name": "DrawerSlot",
302
+ "internalFilePath": "sidebar.ui.runtime.tsx"
303
+ }
304
+ ]
305
+ },
306
+ "isOptional": false,
307
+ "isSpread": false
308
+ }
309
+ ],
310
+ "returnType": {
311
+ "__schema": "InferenceTypeSchema",
312
+ "location": {
313
+ "filePath": "sidebar.ui.runtime.tsx",
314
+ "line": 47,
315
+ "character": 3
316
+ },
317
+ "type": "Promise<SidebarUI>"
318
+ },
319
+ "modifiers": [
320
+ "static",
321
+ "async"
322
+ ]
323
+ }
324
+ ],
325
+ "extendsNodes": [],
326
+ "implementNodes": []
327
+ },
328
+ {
329
+ "__schema": "TypeSchema",
330
+ "location": {
331
+ "filePath": "sidebar.ui.runtime.tsx",
332
+ "line": 19,
333
+ "character": 1
334
+ },
335
+ "signature": "type SidebarItemSlot = SlotRegistry<SidebarItem[]>",
336
+ "name": "SidebarItemSlot",
337
+ "type": {
338
+ "__schema": "TypeRefSchema",
339
+ "location": {
340
+ "filePath": "sidebar.ui.runtime.tsx",
341
+ "line": 19,
342
+ "character": 31
343
+ },
344
+ "name": "SlotRegistry",
345
+ "componentId": {
346
+ "scope": "teambit.harmony",
347
+ "name": "harmony",
348
+ "version": "0.4.6"
349
+ },
350
+ "typeArgs": [
351
+ {
352
+ "__schema": "TypeArraySchema",
353
+ "location": {
354
+ "filePath": "sidebar.ui.runtime.tsx",
355
+ "line": 19,
356
+ "character": 44
357
+ },
358
+ "type": {
359
+ "__schema": "TypeRefSchema",
360
+ "location": {
361
+ "filePath": "sidebar.ui.runtime.tsx",
362
+ "line": 19,
363
+ "character": 44
364
+ },
365
+ "name": "SidebarItem"
366
+ }
367
+ }
368
+ ]
369
+ }
370
+ },
371
+ {
372
+ "__schema": "TypeSchema",
373
+ "location": {
374
+ "filePath": "sidebar.ui.runtime.tsx",
375
+ "line": 14,
376
+ "character": 1
377
+ },
378
+ "signature": "type SidebarItem = {\n weight?: number | undefined;\n component?: React.ComponentType | undefined;\n}",
379
+ "name": "SidebarItem",
380
+ "type": {
381
+ "__schema": "TypeLiteralSchema",
382
+ "location": {
383
+ "filePath": "sidebar.ui.runtime.tsx",
384
+ "line": 14,
385
+ "character": 27
386
+ },
387
+ "members": [
388
+ {
389
+ "__schema": "VariableLikeSchema",
390
+ "location": {
391
+ "filePath": "sidebar.ui.runtime.tsx",
392
+ "line": 15,
393
+ "character": 3
394
+ },
395
+ "signature": "(property) weight?: number | undefined",
396
+ "name": "weight",
397
+ "type": {
398
+ "__schema": "KeywordTypeSchema",
399
+ "location": {
400
+ "filePath": "sidebar.ui.runtime.tsx",
401
+ "line": 15,
402
+ "character": 12
403
+ },
404
+ "name": "number"
405
+ },
406
+ "isOptional": true
407
+ },
408
+ {
409
+ "__schema": "VariableLikeSchema",
410
+ "location": {
411
+ "filePath": "sidebar.ui.runtime.tsx",
412
+ "line": 16,
413
+ "character": 3
414
+ },
415
+ "signature": "(property) component?: React.ComponentType | undefined",
416
+ "name": "component",
417
+ "type": {
418
+ "__schema": "TypeRefSchema",
419
+ "location": {
420
+ "filePath": "sidebar.ui.runtime.tsx",
421
+ "line": 16,
422
+ "character": 15
423
+ },
424
+ "name": "ComponentType",
425
+ "packageName": "react"
426
+ },
427
+ "isOptional": true
428
+ }
429
+ ]
430
+ }
431
+ },
432
+ {
433
+ "__schema": "VariableLikeSchema",
434
+ "location": {
435
+ "filePath": "sidebar.aspect.ts",
436
+ "line": 3,
437
+ "character": 14
438
+ },
439
+ "signature": "const SidebarAspect: Aspect",
440
+ "name": "SidebarAspect",
441
+ "type": {
442
+ "__schema": "TypeRefSchema",
443
+ "location": {
444
+ "filePath": "sidebar.aspect.ts",
445
+ "line": 3,
446
+ "character": 14
447
+ },
448
+ "name": "Aspect",
449
+ "componentId": {
450
+ "scope": "teambit.harmony",
451
+ "name": "harmony",
452
+ "version": "0.4.6"
453
+ }
454
+ },
455
+ "isOptional": false,
456
+ "defaultValue": "Aspect.create({\n id: 'teambit.ui-foundation/sidebar',\n})"
457
+ },
458
+ {
459
+ "__schema": "UnImplementedSchema",
460
+ "location": {
461
+ "filePath": "index.ts",
462
+ "line": 5,
463
+ "character": 16
464
+ },
465
+ "name": "SidebarAspect",
466
+ "type": "Identifier"
467
+ }
468
+ ],
469
+ "internals": []
470
+ },
471
+ "internals": [
472
+ {
473
+ "__schema": "ModuleSchema",
474
+ "location": {
475
+ "filePath": "sidebar.ui.runtime.tsx",
476
+ "line": 1,
477
+ "character": 1
478
+ },
479
+ "exports": [
480
+ {
481
+ "__schema": "TypeSchema",
482
+ "location": {
483
+ "filePath": "sidebar.ui.runtime.tsx",
484
+ "line": 10,
485
+ "character": 1
486
+ },
487
+ "signature": "type ComponentTypeProps = {\n component: ComponentModel;\n}",
488
+ "name": "ComponentTypeProps",
489
+ "type": {
490
+ "__schema": "TypeLiteralSchema",
491
+ "location": {
492
+ "filePath": "sidebar.ui.runtime.tsx",
493
+ "line": 10,
494
+ "character": 34
495
+ },
496
+ "members": [
497
+ {
498
+ "__schema": "VariableLikeSchema",
499
+ "location": {
500
+ "filePath": "sidebar.ui.runtime.tsx",
501
+ "line": 11,
502
+ "character": 3
503
+ },
504
+ "signature": "(property) component: ComponentModel",
505
+ "name": "component",
506
+ "type": {
507
+ "__schema": "TypeRefSchema",
508
+ "location": {
509
+ "filePath": "sidebar.ui.runtime.tsx",
510
+ "line": 11,
511
+ "character": 3
512
+ },
513
+ "name": "ComponentModel",
514
+ "componentId": {
515
+ "scope": "teambit.component",
516
+ "name": "component"
517
+ }
518
+ },
519
+ "isOptional": false
520
+ }
521
+ ]
522
+ }
523
+ },
524
+ {
525
+ "__schema": "TypeSchema",
526
+ "location": {
527
+ "filePath": "sidebar.ui.runtime.tsx",
528
+ "line": 14,
529
+ "character": 1
530
+ },
531
+ "signature": "type SidebarItem = {\n weight?: number | undefined;\n component?: React.ComponentType | undefined;\n}",
532
+ "name": "SidebarItem",
533
+ "type": {
534
+ "__schema": "TypeLiteralSchema",
535
+ "location": {
536
+ "filePath": "sidebar.ui.runtime.tsx",
537
+ "line": 14,
538
+ "character": 27
539
+ },
540
+ "members": [
541
+ {
542
+ "__schema": "VariableLikeSchema",
543
+ "location": {
544
+ "filePath": "sidebar.ui.runtime.tsx",
545
+ "line": 15,
546
+ "character": 3
547
+ },
548
+ "signature": "(property) weight?: number | undefined",
549
+ "name": "weight",
550
+ "type": {
551
+ "__schema": "KeywordTypeSchema",
552
+ "location": {
553
+ "filePath": "sidebar.ui.runtime.tsx",
554
+ "line": 15,
555
+ "character": 12
556
+ },
557
+ "name": "number"
558
+ },
559
+ "isOptional": true
560
+ },
561
+ {
562
+ "__schema": "VariableLikeSchema",
563
+ "location": {
564
+ "filePath": "sidebar.ui.runtime.tsx",
565
+ "line": 16,
566
+ "character": 3
567
+ },
568
+ "signature": "(property) component?: React.ComponentType | undefined",
569
+ "name": "component",
570
+ "type": {
571
+ "__schema": "TypeRefSchema",
572
+ "location": {
573
+ "filePath": "sidebar.ui.runtime.tsx",
574
+ "line": 16,
575
+ "character": 15
576
+ },
577
+ "name": "ComponentType",
578
+ "packageName": "react"
579
+ },
580
+ "isOptional": true
581
+ }
582
+ ]
583
+ }
584
+ },
585
+ {
586
+ "__schema": "TypeSchema",
587
+ "location": {
588
+ "filePath": "sidebar.ui.runtime.tsx",
589
+ "line": 19,
590
+ "character": 1
591
+ },
592
+ "signature": "type SidebarItemSlot = SlotRegistry<SidebarItem[]>",
593
+ "name": "SidebarItemSlot",
594
+ "type": {
595
+ "__schema": "TypeRefSchema",
596
+ "location": {
597
+ "filePath": "sidebar.ui.runtime.tsx",
598
+ "line": 19,
599
+ "character": 31
600
+ },
601
+ "name": "SlotRegistry",
602
+ "componentId": {
603
+ "scope": "teambit.harmony",
604
+ "name": "harmony",
605
+ "version": "0.4.6"
606
+ },
607
+ "typeArgs": [
608
+ {
609
+ "__schema": "TypeArraySchema",
610
+ "location": {
611
+ "filePath": "sidebar.ui.runtime.tsx",
612
+ "line": 19,
613
+ "character": 44
614
+ },
615
+ "type": {
616
+ "__schema": "TypeRefSchema",
617
+ "location": {
618
+ "filePath": "sidebar.ui.runtime.tsx",
619
+ "line": 19,
620
+ "character": 44
621
+ },
622
+ "name": "SidebarItem"
623
+ }
624
+ }
625
+ ]
626
+ }
627
+ },
628
+ {
629
+ "__schema": "TypeSchema",
630
+ "location": {
631
+ "filePath": "sidebar.ui.runtime.tsx",
632
+ "line": 21,
633
+ "character": 1
634
+ },
635
+ "signature": "type DrawerSlot = SlotRegistry<DrawerType[]>",
636
+ "name": "DrawerSlot",
637
+ "type": {
638
+ "__schema": "TypeRefSchema",
639
+ "location": {
640
+ "filePath": "sidebar.ui.runtime.tsx",
641
+ "line": 21,
642
+ "character": 26
643
+ },
644
+ "name": "SlotRegistry",
645
+ "componentId": {
646
+ "scope": "teambit.harmony",
647
+ "name": "harmony",
648
+ "version": "0.4.6"
649
+ },
650
+ "typeArgs": [
651
+ {
652
+ "__schema": "TypeArraySchema",
653
+ "location": {
654
+ "filePath": "sidebar.ui.runtime.tsx",
655
+ "line": 21,
656
+ "character": 39
657
+ },
658
+ "type": {
659
+ "__schema": "TypeRefSchema",
660
+ "location": {
661
+ "filePath": "sidebar.ui.runtime.tsx",
662
+ "line": 21,
663
+ "character": 39
664
+ },
665
+ "name": "DrawerType",
666
+ "componentId": {
667
+ "scope": "teambit.ui-foundation",
668
+ "name": "ui/tree/drawer",
669
+ "version": "0.0.518"
670
+ }
671
+ }
672
+ }
673
+ ]
674
+ }
675
+ },
676
+ {
677
+ "__schema": "ClassSchema",
678
+ "location": {
679
+ "filePath": "sidebar.ui.runtime.tsx",
680
+ "line": 23,
681
+ "character": 1
682
+ },
683
+ "signature": "class SidebarUI",
684
+ "name": "SidebarUI",
685
+ "members": [
686
+ {
687
+ "__schema": "ConstructorSchema",
688
+ "location": {
689
+ "filePath": "sidebar.ui.runtime.tsx",
690
+ "line": 24,
691
+ "character": 3
692
+ },
693
+ "signature": "constructor SidebarUI(drawerSlot: DrawerSlot): SidebarUI",
694
+ "name": "constructor",
695
+ "params": [
696
+ {
697
+ "__schema": "ParameterSchema",
698
+ "location": {
699
+ "filePath": "sidebar.ui.runtime.tsx",
700
+ "line": 24,
701
+ "character": 15
702
+ },
703
+ "name": "drawerSlot",
704
+ "type": {
705
+ "__schema": "TypeRefSchema",
706
+ "location": {
707
+ "filePath": "sidebar.ui.runtime.tsx",
708
+ "line": 24,
709
+ "character": 35
710
+ },
711
+ "name": "DrawerSlot",
712
+ "internalFilePath": "sidebar.ui.runtime.tsx"
713
+ },
714
+ "isOptional": false,
715
+ "isSpread": false
716
+ }
717
+ ],
718
+ "returnType": {
719
+ "__schema": "ThisTypeSchema",
720
+ "location": {
721
+ "filePath": "sidebar.ui.runtime.tsx",
722
+ "line": 23,
723
+ "character": 1
724
+ },
725
+ "name": "SidebarUI"
726
+ },
727
+ "modifiers": []
728
+ },
729
+ {
730
+ "__schema": "FunctionLikeSchema",
731
+ "location": {
732
+ "filePath": "sidebar.ui.runtime.tsx",
733
+ "line": 29,
734
+ "character": 3
735
+ },
736
+ "doc": {
737
+ "__schema": "DocSchema",
738
+ "location": {
739
+ "filePath": "sidebar.ui.runtime.tsx",
740
+ "line": 26,
741
+ "character": 3
742
+ },
743
+ "raw": "/**\n * register a new drawer into the component sidebar.\n */",
744
+ "comment": "register a new drawer into the component sidebar."
745
+ },
746
+ "signature": "(method) SidebarUI.registerDrawer(...drawer: DrawerType[]): this",
747
+ "name": "registerDrawer",
748
+ "params": [
749
+ {
750
+ "__schema": "ParameterSchema",
751
+ "location": {
752
+ "filePath": "sidebar.ui.runtime.tsx",
753
+ "line": 29,
754
+ "character": 18
755
+ },
756
+ "name": "drawer",
757
+ "type": {
758
+ "__schema": "TypeArraySchema",
759
+ "location": {
760
+ "filePath": "sidebar.ui.runtime.tsx",
761
+ "line": 29,
762
+ "character": 29
763
+ },
764
+ "type": {
765
+ "__schema": "TypeRefSchema",
766
+ "location": {
767
+ "filePath": "sidebar.ui.runtime.tsx",
768
+ "line": 29,
769
+ "character": 29
770
+ },
771
+ "name": "DrawerType",
772
+ "componentId": {
773
+ "scope": "teambit.ui-foundation",
774
+ "name": "ui/tree/drawer",
775
+ "version": "0.0.518"
776
+ }
777
+ }
778
+ },
779
+ "isOptional": false,
780
+ "isSpread": true
781
+ }
782
+ ],
783
+ "returnType": {
784
+ "__schema": "TypeRefSchema",
785
+ "location": {
786
+ "filePath": "sidebar.ui.runtime.tsx",
787
+ "line": 29,
788
+ "character": 3
789
+ },
790
+ "name": "SidebarUI"
791
+ },
792
+ "modifiers": []
793
+ },
794
+ {
795
+ "__schema": "VariableLikeSchema",
796
+ "location": {
797
+ "filePath": "sidebar.ui.runtime.tsx",
798
+ "line": 37,
799
+ "character": 3
800
+ },
801
+ "doc": {
802
+ "__schema": "DocSchema",
803
+ "location": {
804
+ "filePath": "sidebar.ui.runtime.tsx",
805
+ "line": 34,
806
+ "character": 3
807
+ },
808
+ "raw": "/**\n * render the sidebar.\n */",
809
+ "comment": "render the sidebar."
810
+ },
811
+ "signature": "(property) SidebarUI.render: (props: Partial<SideBarProps>) => React.JSX.Element",
812
+ "name": "render",
813
+ "type": {
814
+ "__schema": "InferenceTypeSchema",
815
+ "location": {
816
+ "filePath": "sidebar.ui.runtime.tsx",
817
+ "line": 37,
818
+ "character": 3
819
+ },
820
+ "type": "(props: Partial<SideBarProps>) => React.JSX.Element"
821
+ },
822
+ "isOptional": true,
823
+ "defaultValue": "(props: Partial<SideBarProps>) => {\n return <SideBar drawerSlot={this.drawerSlot} {...props}></SideBar>;\n }"
824
+ },
825
+ {
826
+ "__schema": "VariableLikeSchema",
827
+ "location": {
828
+ "filePath": "sidebar.ui.runtime.tsx",
829
+ "line": 41,
830
+ "character": 3
831
+ },
832
+ "signature": "(property) SidebarUI.runtime: RuntimeDefinition",
833
+ "name": "runtime",
834
+ "type": {
835
+ "__schema": "InferenceTypeSchema",
836
+ "location": {
837
+ "filePath": "sidebar.ui.runtime.tsx",
838
+ "line": 41,
839
+ "character": 3
840
+ },
841
+ "type": "RuntimeDefinition"
842
+ },
843
+ "isOptional": true,
844
+ "defaultValue": "UIRuntime"
845
+ },
846
+ {
847
+ "__schema": "VariableLikeSchema",
848
+ "location": {
849
+ "filePath": "sidebar.ui.runtime.tsx",
850
+ "line": 43,
851
+ "character": 3
852
+ },
853
+ "signature": "(property) SidebarUI.slots: ((registerFn: () => string) => SlotRegistry<DrawerType>)[]",
854
+ "name": "slots",
855
+ "type": {
856
+ "__schema": "InferenceTypeSchema",
857
+ "location": {
858
+ "filePath": "sidebar.ui.runtime.tsx",
859
+ "line": 43,
860
+ "character": 3
861
+ },
862
+ "type": "((registerFn: () => string) => SlotRegistry<DrawerType>)[]"
863
+ },
864
+ "isOptional": true,
865
+ "defaultValue": "[Slot.withType<DrawerType>()]"
866
+ },
867
+ {
868
+ "__schema": "VariableLikeSchema",
869
+ "location": {
870
+ "filePath": "sidebar.ui.runtime.tsx",
871
+ "line": 45,
872
+ "character": 3
873
+ },
874
+ "signature": "(property) SidebarUI.dependencies: never[]",
875
+ "name": "dependencies",
876
+ "type": {
877
+ "__schema": "InferenceTypeSchema",
878
+ "location": {
879
+ "filePath": "sidebar.ui.runtime.tsx",
880
+ "line": 45,
881
+ "character": 3
882
+ },
883
+ "type": "never[]"
884
+ },
885
+ "isOptional": true,
886
+ "defaultValue": "[]"
887
+ },
888
+ {
889
+ "__schema": "FunctionLikeSchema",
890
+ "location": {
891
+ "filePath": "sidebar.ui.runtime.tsx",
892
+ "line": 47,
893
+ "character": 3
894
+ },
895
+ "signature": "(method) SidebarUI.provider(deps: any, config: any, [drawerSlot]: [DrawerSlot]): Promise<SidebarUI>",
896
+ "name": "provider",
897
+ "params": [
898
+ {
899
+ "__schema": "ParameterSchema",
900
+ "location": {
901
+ "filePath": "sidebar.ui.runtime.tsx",
902
+ "line": 47,
903
+ "character": 25
904
+ },
905
+ "name": "deps",
906
+ "type": {
907
+ "__schema": "InferenceTypeSchema",
908
+ "location": {
909
+ "filePath": "sidebar.ui.runtime.tsx",
910
+ "line": 47,
911
+ "character": 25
912
+ },
913
+ "type": "any"
914
+ },
915
+ "isOptional": false,
916
+ "isSpread": false
917
+ },
918
+ {
919
+ "__schema": "ParameterSchema",
920
+ "location": {
921
+ "filePath": "sidebar.ui.runtime.tsx",
922
+ "line": 47,
923
+ "character": 31
924
+ },
925
+ "name": "config",
926
+ "type": {
927
+ "__schema": "InferenceTypeSchema",
928
+ "location": {
929
+ "filePath": "sidebar.ui.runtime.tsx",
930
+ "line": 47,
931
+ "character": 31
932
+ },
933
+ "type": "any"
934
+ },
935
+ "isOptional": false,
936
+ "isSpread": false
937
+ },
938
+ {
939
+ "__schema": "ParameterSchema",
940
+ "location": {
941
+ "filePath": "sidebar.ui.runtime.tsx",
942
+ "line": 47,
943
+ "character": 39
944
+ },
945
+ "name": "[ drawerSlot ]",
946
+ "type": {
947
+ "__schema": "TupleTypeSchema",
948
+ "location": {
949
+ "filePath": "sidebar.ui.runtime.tsx",
950
+ "line": 47,
951
+ "character": 53
952
+ },
953
+ "elements": [
954
+ {
955
+ "__schema": "TypeRefSchema",
956
+ "location": {
957
+ "filePath": "sidebar.ui.runtime.tsx",
958
+ "line": 47,
959
+ "character": 54
960
+ },
961
+ "name": "DrawerSlot",
962
+ "internalFilePath": "sidebar.ui.runtime.tsx"
963
+ }
964
+ ]
965
+ },
966
+ "isOptional": false,
967
+ "isSpread": false
968
+ }
969
+ ],
970
+ "returnType": {
971
+ "__schema": "InferenceTypeSchema",
972
+ "location": {
973
+ "filePath": "sidebar.ui.runtime.tsx",
974
+ "line": 47,
975
+ "character": 3
976
+ },
977
+ "type": "Promise<SidebarUI>"
978
+ },
979
+ "modifiers": [
980
+ "static",
981
+ "async"
982
+ ]
983
+ }
984
+ ],
985
+ "extendsNodes": [],
986
+ "implementNodes": []
987
+ }
988
+ ],
989
+ "internals": [
990
+ {
991
+ "__schema": "UnImplementedSchema",
992
+ "location": {
993
+ "filePath": "sidebar.ui.runtime.tsx",
994
+ "line": 52,
995
+ "character": 1
996
+ },
997
+ "name": "SidebarAspect.addRuntime(SidebarUI);",
998
+ "type": "ExpressionStatement"
999
+ }
1000
+ ]
1001
+ },
1002
+ {
1003
+ "__schema": "ModuleSchema",
1004
+ "location": {
1005
+ "filePath": "sidebar.aspect.ts",
1006
+ "line": 1,
1007
+ "character": 1
1008
+ },
1009
+ "exports": [
1010
+ {
1011
+ "__schema": "VariableLikeSchema",
1012
+ "location": {
1013
+ "filePath": "sidebar.aspect.ts",
1014
+ "line": 3,
1015
+ "character": 14
1016
+ },
1017
+ "signature": "const SidebarAspect: Aspect",
1018
+ "name": "SidebarAspect",
1019
+ "type": {
1020
+ "__schema": "TypeRefSchema",
1021
+ "location": {
1022
+ "filePath": "sidebar.aspect.ts",
1023
+ "line": 3,
1024
+ "character": 14
1025
+ },
1026
+ "name": "Aspect",
1027
+ "componentId": {
1028
+ "scope": "teambit.harmony",
1029
+ "name": "harmony",
1030
+ "version": "0.4.6"
1031
+ }
1032
+ },
1033
+ "isOptional": false,
1034
+ "defaultValue": "Aspect.create({\n id: 'teambit.ui-foundation/sidebar',\n})"
1035
+ },
1036
+ {
1037
+ "__schema": "UnImplementedSchema",
1038
+ "location": {
1039
+ "filePath": "sidebar.aspect.ts",
1040
+ "line": 7,
1041
+ "character": 16
1042
+ },
1043
+ "name": "SidebarAspect",
1044
+ "type": "Identifier"
1045
+ }
1046
+ ],
1047
+ "internals": []
1048
+ }
1049
+ ],
1050
+ "componentId": {
1051
+ "scope": "teambit.ui-foundation",
1052
+ "name": "sidebar",
1053
+ "version": "1.0.190"
1054
+ },
1055
+ "taggedModuleExports": []
1056
+ }
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["_sidebar","data","require","_default","exports","default","SidebarAspect"],"sources":["index.ts"],"sourcesContent":["import { SidebarAspect } from './sidebar.aspect';\n\nexport type { SidebarUI, SidebarItemSlot, SidebarItem } from './sidebar.ui.runtime';\nexport { SidebarAspect };\nexport default SidebarAspect;\n"],"mappings":";;;;;;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAiD,IAAAE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAIlCC,wBAAa"}
1
+ {"version":3,"names":["_sidebar","data","require","_default","exports","default","SidebarAspect"],"sources":["index.ts"],"sourcesContent":["import { SidebarAspect } from './sidebar.aspect';\n\nexport type { SidebarUI, SidebarItemSlot, SidebarItem } from './sidebar.ui.runtime';\nexport { SidebarAspect };\nexport default SidebarAspect;\n"],"mappings":";;;;;;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAiD,IAAAE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAIlCC,wBAAa","ignoreList":[]}
@@ -0,0 +1,7 @@
1
+ import * as compositions_0 from '/Users/giladshoham/Library/Caches/Bit/capsules/root/b5ea46ec36fa42b9dbedfc12ecb7bb63e03fcfe6/teambit.ui-foundation_sidebar@1.0.190/dist/sidebar.composition.js';
2
+ import * as overview_0 from '/Users/giladshoham/Library/Caches/Bit/capsules/root/b5ea46ec36fa42b9dbedfc12ecb7bb63e03fcfe6/teambit.ui-foundation_sidebar@1.0.190/dist/sidebar.docs.mdx';
3
+
4
+ export const compositions = [compositions_0];
5
+ export const overview = [overview_0];
6
+
7
+ export const compositions_metadata = {"compositions":[{"displayName":"Logo","identifier":"Logo"}]};
@@ -1 +1 @@
1
- {"version":3,"names":["_harmony","data","require","SidebarAspect","exports","Aspect","create","id","_default","default"],"sources":["sidebar.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const SidebarAspect = Aspect.create({\n id: 'teambit.ui-foundation/sidebar',\n});\n\nexport default SidebarAspect;\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAGE,iBAAM,CAACC,MAAM,CAAC;EACzCC,EAAE,EAAE;AACN,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAJ,OAAA,CAAAK,OAAA,GAEYN,aAAa"}
1
+ {"version":3,"names":["_harmony","data","require","SidebarAspect","exports","Aspect","create","id","_default","default"],"sources":["sidebar.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const SidebarAspect = Aspect.create({\n id: 'teambit.ui-foundation/sidebar',\n});\n\nexport default SidebarAspect;\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAGE,iBAAM,CAACC,MAAM,CAAC;EACzCC,EAAE,EAAE;AACN,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAJ,OAAA,CAAAK,OAAA,GAEYN,aAAa","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_react","data","_interopRequireDefault","require","obj","__esModule","default","Logo","createElement","style","height","display","justifyContent","width","src","exports"],"sources":["sidebar.composition.tsx"],"sourcesContent":["import React from 'react';\n\nexport const Logo = () => (\n <div style={{ height: '100%', display: 'flex', justifyContent: 'center' }}>\n <img style={{ width: 70 }} src=\"https://static.bit.dev/extensions-icons/sidebar.svg\" />\n </div>\n);\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA0B,SAAAC,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEnB,MAAMG,IAAI,GAAGA,CAAA,kBAClBP,MAAA,GAAAM,OAAA,CAAAE,aAAA;EAAKC,KAAK,EAAE;IAAEC,MAAM,EAAE,MAAM;IAAEC,OAAO,EAAE,MAAM;IAAEC,cAAc,EAAE;EAAS;AAAE,gBACxEZ,MAAA,GAAAM,OAAA,CAAAE,aAAA;EAAKC,KAAK,EAAE;IAAEI,KAAK,EAAE;EAAG,CAAE;EAACC,GAAG,EAAC;AAAqD,CAAE,CACnF,CACN;AAACC,OAAA,CAAAR,IAAA,GAAAA,IAAA"}
1
+ {"version":3,"names":["_react","data","_interopRequireDefault","require","obj","__esModule","default","Logo","createElement","style","height","display","justifyContent","width","src","exports"],"sources":["sidebar.composition.tsx"],"sourcesContent":["import React from 'react';\n\nexport const Logo = () => (\n <div style={{ height: '100%', display: 'flex', justifyContent: 'center' }}>\n <img style={{ width: 70 }} src=\"https://static.bit.dev/extensions-icons/sidebar.svg\" />\n </div>\n);\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA0B,SAAAC,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEnB,MAAMG,IAAI,GAAGA,CAAA,kBAClBP,MAAA,GAAAM,OAAA,CAAAE,aAAA;EAAKC,KAAK,EAAE;IAAEC,MAAM,EAAE,MAAM;IAAEC,OAAO,EAAE,MAAM;IAAEC,cAAc,EAAE;EAAS;AAAE,gBACxEZ,MAAA,GAAAM,OAAA,CAAAE,aAAA;EAAKC,KAAK,EAAE;IAAEI,KAAK,EAAE;EAAG,CAAE;EAACC,GAAG,EAAC;AAAqD,CAAE,CACnF,CACN;AAACC,OAAA,CAAAR,IAAA,GAAAA,IAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_harmony","data","require","_ui","_react","_interopRequireDefault","_sidebar","_ui2","obj","__esModule","default","_extends","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","_defineProperty","value","_toPropertyKey","defineProperty","enumerable","configurable","writable","t","_toPrimitive","String","r","e","Symbol","toPrimitive","TypeError","Number","SidebarUI","constructor","drawerSlot","props","createElement","SideBar","registerDrawer","drawer","register","provider","deps","config","exports","UIRuntime","Slot","withType","SidebarAspect","addRuntime"],"sources":["sidebar.ui.runtime.tsx"],"sourcesContent":["import { ComponentModel } from '@teambit/component';\nimport { Slot, SlotRegistry } from '@teambit/harmony';\nimport { UIRuntime } from '@teambit/ui';\nimport React, { ComponentType } from 'react';\n\nimport type { DrawerType } from '@teambit/ui-foundation.ui.tree.drawer';\nimport { SidebarAspect } from './sidebar.aspect';\nimport { SideBar, SideBarProps } from './ui';\n\nexport type ComponentTypeProps = {\n component: ComponentModel;\n};\n\nexport type SidebarItem = {\n weight?: number;\n component?: ComponentType;\n};\n\nexport type SidebarItemSlot = SlotRegistry<SidebarItem[]>;\n\nexport type DrawerSlot = SlotRegistry<DrawerType[]>;\n\nexport class SidebarUI {\n constructor(private drawerSlot: DrawerSlot) {}\n\n /**\n * register a new drawer into the component sidebar.\n */\n registerDrawer(...drawer: DrawerType[]) {\n this.drawerSlot.register(drawer);\n return this;\n }\n\n /**\n * render the sidebar.\n */\n render = (props: Partial<SideBarProps>) => {\n return <SideBar drawerSlot={this.drawerSlot} {...props}></SideBar>;\n };\n\n static runtime = UIRuntime;\n\n static slots = [Slot.withType<DrawerType>()];\n\n static dependencies = [];\n\n static async provider(deps, config, [drawerSlot]: [DrawerSlot]) {\n return new SidebarUI(drawerSlot);\n }\n}\n\nSidebarAspect.addRuntime(SidebarUI);\n"],"mappings":";;;;;;AACA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA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F;AAACU,OAAA,CAAAZ,SAAA,GAAAA,SAAA;AAAAhB,eAAA,CA3BYgB,SAAS,aAkBHa,eAAS;AAAA7B,eAAA,CAlBfgB,SAAS,WAoBL,CAACc,eAAI,CAACC,QAAQ,CAAa,CAAC,CAAC;AAAA/B,eAAA,CApBjCgB,SAAS,kBAsBE,EAAE;AAO1BgB,wBAAa,CAACC,UAAU,CAACjB,SAAS,CAAC"}
1
+ {"version":3,"names":["_harmony","data","require","_ui","_react","_interopRequireDefault","_sidebar","_ui2","obj","__esModule","default","_extends","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","_defineProperty","value","_toPropertyKey","defineProperty","enumerable","configurable","writable","t","_toPrimitive","String","r","e","Symbol","toPrimitive","TypeError","Number","SidebarUI","constructor","drawerSlot","props","createElement","SideBar","registerDrawer","drawer","register","provider","deps","config","exports","UIRuntime","Slot","withType","SidebarAspect","addRuntime"],"sources":["sidebar.ui.runtime.tsx"],"sourcesContent":["import { ComponentModel } from '@teambit/component';\nimport { Slot, SlotRegistry } from '@teambit/harmony';\nimport { UIRuntime } from '@teambit/ui';\nimport React, { ComponentType } from 'react';\n\nimport type { DrawerType } from '@teambit/ui-foundation.ui.tree.drawer';\nimport { SidebarAspect } from './sidebar.aspect';\nimport { SideBar, SideBarProps } from './ui';\n\nexport type ComponentTypeProps = {\n component: ComponentModel;\n};\n\nexport type SidebarItem = {\n weight?: number;\n component?: ComponentType;\n};\n\nexport type SidebarItemSlot = SlotRegistry<SidebarItem[]>;\n\nexport type DrawerSlot = SlotRegistry<DrawerType[]>;\n\nexport class SidebarUI {\n constructor(private drawerSlot: DrawerSlot) {}\n\n /**\n * register a new drawer into the component sidebar.\n */\n registerDrawer(...drawer: DrawerType[]) {\n this.drawerSlot.register(drawer);\n return this;\n }\n\n /**\n * render the sidebar.\n */\n render = (props: Partial<SideBarProps>) => {\n return <SideBar drawerSlot={this.drawerSlot} {...props}></SideBar>;\n };\n\n static runtime = UIRuntime;\n\n static slots = [Slot.withType<DrawerType>()];\n\n static dependencies = [];\n\n static async provider(deps, config, [drawerSlot]: [DrawerSlot]) {\n return new SidebarUI(drawerSlot);\n }\n}\n\nSidebarAspect.addRuntime(SidebarUI);\n"],"mappings":";;;;;;AACA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,IAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,GAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,OAAA;EAAA,MAAAH,IAAA,GAAAI,sBAAA,CAAAH,OAAA;EAAAE,MAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAK,SAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,QAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,KAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,IAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA6C,SAAAI,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,SAAA,IAAAA,QAAA,GAAAC,MAAA,CAAAC,MAAA,GAAAD,MAAA,CAAAC,MAAA,CAAAC,IAAA,eAAAC,MAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAF,CAAA,UAAAG,MAAA,GAAAF,SAAA,CAAAD,CAAA,YAAAI,GAAA,IAAAD,MAAA,QAAAP,MAAA,CAAAS,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAJ,MAAA,E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MAAoB,EAAE;IACtC,IAAI,CAACL,UAAU,CAACM,QAAQ,CAACD,MAAM,CAAC;IAChC,OAAO,IAAI;EACb;EAeA,aAAaE,QAAQA,CAACC,IAAI,EAAEC,MAAM,EAAE,CAACT,UAAU,CAAe,EAAE;IAC9D,OAAO,IAAIF,SAAS,CAACE,UAAU,CAAC;EAClC;AACF;AAACU,OAAA,CAAAZ,SAAA,GAAAA,SAAA;AAAAhB,eAAA,CA3BYgB,SAAS,aAkBHa,eAAS;AAAA7B,eAAA,CAlBfgB,SAAS,WAoBL,CAACc,eAAI,CAACC,QAAQ,CAAa,CAAC,CAAC;AAAA/B,eAAA,CApBjCgB,SAAS,kBAsBE,EAAE;AAO1BgB,wBAAa,CAACC,UAAU,CAACjB,SAAS,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_sideBar","data","require"],"sources":["index.ts"],"sourcesContent":["export { SideBar, SideBarProps } from './side-bar';\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA"}
1
+ {"version":3,"names":["_sideBar","data","require"],"sources":["index.ts"],"sourcesContent":["export { SideBar, SideBarProps } from './side-bar';\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_sideBar","data","require"],"sources":["index.ts"],"sourcesContent":["export { SideBar, SideBarProps } from './side-bar';\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA"}
1
+ {"version":3,"names":["_sideBar","data","require"],"sources":["index.ts"],"sourcesContent":["export { SideBar, SideBarProps } from './side-bar';\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_react","data","_interopRequireWildcard","require","_lodash","_classnames","_interopRequireDefault","_designUiSurfacesMenu","_uiFoundationUiTree","_sideBarModule","_excluded","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","_extends","assign","bind","target","arguments","length","source","key","apply","_objectWithoutProperties","excluded","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","indexOf","propertyIsEnumerable","sourceKeys","keys","SideBar","_ref","drawerSlot","items","overrideDrawerSlot","rest","drawers","flatten","values","filter","drawer","isHidden","sort","sortFn","openDrawerList","onToggleDrawer","useState","map","id","handleDrawerToggle","isDrawerOpen","includes","list","concat","createElement","className","styles","sidebar","MenuSection","name","isOpen","DrawerUI","classNames","sidebarDrawer","open","onToggle","Widgets","widgets","Context","render","first","second","order"],"sources":["side-bar.tsx"],"sourcesContent":["import React, { useState, ComponentType } from 'react';\nimport { flatten } from 'lodash';\nimport classNames from 'classnames';\nimport { MenuSection } from '@teambit/design.ui.surfaces.menu.section';\nimport { DrawerType, DrawerUI } from '@teambit/ui-foundation.ui.tree.drawer';\nimport { DrawerSlot } from '../../sidebar.ui.runtime';\nimport styles from './side-bar.module.scss';\n\nexport type SideBarProps = {\n /**\n * slot of registered drawers.\n */\n drawerSlot: DrawerSlot;\n /**\n * slot of registered items to the main section at the top.\n */\n items?: ComponentType[];\n /**\n * override register drawers from the slot\n */\n overrideDrawerSlot?: DrawerType[];\n} & React.HTMLAttributes<HTMLDivElement>;\n\n/**\n * side bar component.\n */\nexport function SideBar({ drawerSlot, items = [], overrideDrawerSlot, ...rest }: SideBarProps) {\n const drawers = (overrideDrawerSlot || flatten(drawerSlot.values()))\n .filter((drawer) => !drawer?.isHidden?.())\n .sort(sortFn);\n\n const [openDrawerList, onToggleDrawer] = useState<(string | undefined)[]>(drawers.map((drawer) => drawer.id));\n\n const handleDrawerToggle = (id: string) => {\n const isDrawerOpen = openDrawerList.includes(id);\n if (isDrawerOpen) {\n onToggleDrawer((list) => list.filter((drawer) => drawer !== id));\n return;\n }\n onToggleDrawer((list) => list.concat(id));\n };\n\n return (\n <div {...rest} className={styles.sidebar}>\n <MenuSection items={items} />\n {drawers.map((drawer) => {\n if (!drawer || !drawer.name) return null;\n // consider passing collapse all as a prop so each drawer collapses itself\n const isOpen = openDrawerList.includes(drawer.id);\n\n return (\n <DrawerUI\n className={classNames(styles.sidebarDrawer, isOpen && styles.open)}\n isOpen={isOpen}\n onToggle={() => handleDrawerToggle(drawer.id)}\n key={drawer.id}\n name={drawer.name}\n Widgets={drawer.widgets}\n Context={drawer.Context}\n >\n <drawer.render />\n </DrawerUI>\n );\n })}\n </div>\n );\n}\nfunction sortFn(first: DrawerType, second: DrawerType) {\n // 0 - equal\n // <0 - first < second\n // >0 - first > second\n\n return (first.order ?? 0) - (second.order ?? 0);\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,uBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,YAAA;EAAA,MAAAJ,IAAA,GAAAK,sBAAA,CAAAH,OAAA;EAAAE,WAAA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1B,MAAMA,CAAC2B,KAAiB,EAAEC,MAAkB,EAAE;EACrD;EACA;EACA;;EAEA,OAAO,CAACD,KAAK,CAACE,KAAK,IAAI,CAAC,KAAKD,MAAM,CAACC,KAAK,IAAI,CAAC,CAAC;AACjD"}
1
+ {"version":3,"names":["_react","data","_interopRequireWildcard","require","_lodash","_classnames","_interopRequireDefault","_designUiSurfacesMenu","_uiFoundationUiTree","_sideBarModule","_excluded","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","_extends","assign","bind","target","arguments","length","source","key","apply","_objectWithoutProperties","excluded","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","indexOf","propertyIsEnumerable","sourceKeys","keys","SideBar","_ref","drawerSlot","items","overrideDrawerSlot","rest","drawers","flatten","values","filter","drawer","isHidden","sort","sortFn","openDrawerList","onToggleDrawer","useState","map","id","handleDrawerToggle","isDrawerOpen","includes","list","concat","createElement","className","styles","sidebar","MenuSection","name","isOpen","DrawerUI","classNames","sidebarDrawer","open","onToggle","Widgets","widgets","Context","render","first","second","order"],"sources":["side-bar.tsx"],"sourcesContent":["import React, { useState, ComponentType } from 'react';\nimport { flatten } from 'lodash';\nimport classNames from 'classnames';\nimport { MenuSection } from '@teambit/design.ui.surfaces.menu.section';\nimport { DrawerType, DrawerUI } from '@teambit/ui-foundation.ui.tree.drawer';\nimport { DrawerSlot } from '../../sidebar.ui.runtime';\nimport styles from './side-bar.module.scss';\n\nexport type SideBarProps = {\n /**\n * slot of registered drawers.\n */\n drawerSlot: DrawerSlot;\n /**\n * slot of registered items to the main section at the top.\n */\n items?: ComponentType[];\n /**\n * override register drawers from the slot\n */\n overrideDrawerSlot?: DrawerType[];\n} & React.HTMLAttributes<HTMLDivElement>;\n\n/**\n * side bar component.\n */\nexport function SideBar({ drawerSlot, items = [], overrideDrawerSlot, ...rest }: SideBarProps) {\n const drawers = (overrideDrawerSlot || flatten(drawerSlot.values()))\n .filter((drawer) => !drawer?.isHidden?.())\n .sort(sortFn);\n\n const [openDrawerList, onToggleDrawer] = useState<(string | undefined)[]>(drawers.map((drawer) => drawer.id));\n\n const handleDrawerToggle = (id: string) => {\n const isDrawerOpen = openDrawerList.includes(id);\n if (isDrawerOpen) {\n onToggleDrawer((list) => list.filter((drawer) => drawer !== id));\n return;\n }\n onToggleDrawer((list) => list.concat(id));\n };\n\n return (\n <div {...rest} className={styles.sidebar}>\n <MenuSection items={items} />\n {drawers.map((drawer) => {\n if (!drawer || !drawer.name) return null;\n // consider passing collapse all as a prop so each drawer collapses itself\n const isOpen = openDrawerList.includes(drawer.id);\n\n return (\n <DrawerUI\n className={classNames(styles.sidebarDrawer, isOpen && styles.open)}\n isOpen={isOpen}\n onToggle={() => handleDrawerToggle(drawer.id)}\n key={drawer.id}\n name={drawer.name}\n Widgets={drawer.widgets}\n Context={drawer.Context}\n >\n <drawer.render />\n </DrawerUI>\n );\n })}\n </div>\n );\n}\nfunction sortFn(first: DrawerType, second: DrawerType) {\n // 0 - equal\n // <0 - first < second\n // >0 - first > second\n\n return (first.order ?? 0) - (second.order ?? 0);\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,uBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,YAAA;EAAA,MAAAJ,IAAA,GAAAK,sBAAA,CAAAH,OAAA;EAAAE,WAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,sBAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAA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M,CAACC,KAAK,IAAI,CAAC,CAAC;AACjD","ignoreList":[]}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/sidebar",
3
- "version": "1.0.188",
3
+ "version": "1.0.190",
4
4
  "homepage": "https://bit.cloud/teambit/ui-foundation/sidebar",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.ui-foundation",
8
8
  "name": "sidebar",
9
- "version": "1.0.188"
9
+ "version": "1.0.190"
10
10
  },
11
11
  "dependencies": {
12
12
  "classnames": "2.2.6",
@@ -14,15 +14,15 @@
14
14
  "@teambit/harmony": "0.4.6",
15
15
  "@teambit/ui-foundation.ui.tree.drawer": "0.0.518",
16
16
  "@teambit/design.ui.surfaces.menu.section": "0.0.357",
17
- "@teambit/component": "1.0.188",
18
- "@teambit/ui": "1.0.188"
17
+ "@teambit/component": "1.0.190",
18
+ "@teambit/ui": "1.0.190"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@types/classnames": "2.2.11",
22
22
  "@types/lodash": "4.14.165",
23
23
  "@types/mocha": "9.1.0",
24
24
  "chai": "4.3.0",
25
- "@teambit/harmony.envs.core-aspect-env": "0.0.25"
25
+ "@teambit/harmony.envs.core-aspect-env": "0.0.27"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "react": "^17.0.0 || ^18.0.0",
@@ -1,7 +0,0 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.ui-foundation_sidebar@1.0.188/dist/sidebar.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.ui-foundation_sidebar@1.0.188/dist/sidebar.docs.mdx';
3
-
4
- export const compositions = [compositions_0];
5
- export const overview = [overview_0];
6
-
7
- export const compositions_metadata = {"compositions":[{"displayName":"Logo","identifier":"Logo"}]};