@teambit/code 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.component/code@1.0.188" tests="0" failures="0" errors="0" skipped="0"/>
3
+ <testsuite name="teambit.component/code@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.component/code-preview"]=t():e["teambit.component/code-preview"]=t()}(self,(()=>(()=>{"use strict";var e={59747:(e,t,o)=>{var n={id:"teambit.component/code@1.0.188",homepage:"https://bit.cloud/teambit/component/code",exported:!0};function r(){const e=i(o(41594));return r=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,r.__bit_component=n,i.__bit_component=n;const c=()=>r().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},r().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/code.svg"}));c.__bit_component=n,t.Logo=c},41594:e=>{e.exports=React}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},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 n={};return(()=>{o.r(n),o.d(n,{compositions:()=>u,compositions_metadata:()=>l,overview:()=>f});var e={};o.r(e),o.d(e,{default:()=>d});var t=o(59747);o(41594);const r=MdxJsReact,i=TeambitMdxUiMdxScopeContext;var c=["components"];function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},p.apply(this,arguments)}var a={},s="wrapper";function d(e){var t=e.components,o=function(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o,n,r={},i=Object.keys(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}(e,c);return(0,r.mdx)(s,p({},a,o,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)(i.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"}))}d.isMDXComponent=!0;const u=[t],f=[e],l={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),n})()));
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.component/code-preview"]=t():e["teambit.component/code-preview"]=t()}(self,(()=>(()=>{"use strict";var e={12006:(e,t,o)=>{var n={id:"teambit.component/code@1.0.190",homepage:"https://bit.cloud/teambit/component/code",exported:!0};function r(){const e=i(o(41594));return r=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,r.__bit_component=n,i.__bit_component=n;const c=()=>r().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},r().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/code.svg"}));c.__bit_component=n,t.Logo=c},41594:e=>{e.exports=React}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},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 n={};return(()=>{o.r(n),o.d(n,{compositions:()=>u,compositions_metadata:()=>l,overview:()=>f});var e={};o.r(e),o.d(e,{default:()=>d});var t=o(12006);o(41594);const r=MdxJsReact,i=TeambitMdxUiMdxScopeContext;var c=["components"];function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},p.apply(this,arguments)}var a={},s="wrapper";function d(e){var t=e.components,o=function(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o,n,r={},i=Object.keys(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}(e,c);return(0,r.mdx)(s,p({},a,o,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)(i.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"}))}d.isMDXComponent=!0;const u=[t],f=[e],l={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),n})()));
@@ -0,0 +1,1154 @@
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": "code.ui.runtime.tsx",
20
+ "line": 23,
21
+ "character": 1
22
+ },
23
+ "doc": {
24
+ "__schema": "DocSchema",
25
+ "location": {
26
+ "filePath": "code.ui.runtime.tsx",
27
+ "line": 19,
28
+ "character": 1
29
+ },
30
+ "raw": "/**\n * Component code tab aspect. Presents the code tab page and allows to control the code tab and register specific icons for each file type.\n * @example CodeUI.registerEnvFileIcon([(fileName) => (/your-regexp/.test(fileName) ? 'your.icon.url' : undefined)])\n */",
31
+ "comment": "Component code tab aspect. Presents the code tab page and allows to control the code tab and register specific icons for each file type.",
32
+ "tags": [
33
+ {
34
+ "__schema": "TagSchema",
35
+ "location": {
36
+ "filePath": "code.ui.runtime.tsx",
37
+ "line": 21,
38
+ "character": 5
39
+ },
40
+ "tagName": "example",
41
+ "comment": "CodeUI.registerEnvFileIcon([\n (fileName) => (/your-regexp/.test(fileName) ? 'your.icon.url' : undefined),\n]);\n"
42
+ }
43
+ ]
44
+ },
45
+ "signature": "class CodeUI",
46
+ "name": "CodeUI",
47
+ "members": [
48
+ {
49
+ "__schema": "ConstructorSchema",
50
+ "location": {
51
+ "filePath": "code.ui.runtime.tsx",
52
+ "line": 24,
53
+ "character": 3
54
+ },
55
+ "signature": "constructor CodeUI(host: string, fileIconSlot?: FileIconSlot): CodeUI",
56
+ "name": "constructor",
57
+ "params": [
58
+ {
59
+ "__schema": "ParameterSchema",
60
+ "location": {
61
+ "filePath": "code.ui.runtime.tsx",
62
+ "line": 28,
63
+ "character": 5
64
+ },
65
+ "name": "host",
66
+ "type": {
67
+ "__schema": "KeywordTypeSchema",
68
+ "location": {
69
+ "filePath": "code.ui.runtime.tsx",
70
+ "line": 28,
71
+ "character": 19
72
+ },
73
+ "name": "string"
74
+ },
75
+ "isOptional": false,
76
+ "isSpread": false
77
+ },
78
+ {
79
+ "__schema": "ParameterSchema",
80
+ "location": {
81
+ "filePath": "code.ui.runtime.tsx",
82
+ "line": 29,
83
+ "character": 5
84
+ },
85
+ "name": "fileIconSlot",
86
+ "type": {
87
+ "__schema": "TypeRefSchema",
88
+ "location": {
89
+ "filePath": "code.ui.runtime.tsx",
90
+ "line": 29,
91
+ "character": 28
92
+ },
93
+ "name": "FileIconSlot"
94
+ },
95
+ "isOptional": true,
96
+ "isSpread": false
97
+ }
98
+ ],
99
+ "returnType": {
100
+ "__schema": "ThisTypeSchema",
101
+ "location": {
102
+ "filePath": "code.ui.runtime.tsx",
103
+ "line": 23,
104
+ "character": 1
105
+ },
106
+ "name": "CodeUI"
107
+ },
108
+ "modifiers": []
109
+ },
110
+ {
111
+ "__schema": "VariableLikeSchema",
112
+ "location": {
113
+ "filePath": "code.ui.runtime.tsx",
114
+ "line": 32,
115
+ "character": 3
116
+ },
117
+ "signature": "(property) CodeUI.getCodePage: (props?: Partial<CodePageProps>) => React.JSX.Element",
118
+ "name": "getCodePage",
119
+ "type": {
120
+ "__schema": "InferenceTypeSchema",
121
+ "location": {
122
+ "filePath": "code.ui.runtime.tsx",
123
+ "line": 32,
124
+ "character": 3
125
+ },
126
+ "type": "(props?: Partial<CodePageProps>) => React.JSX.Element"
127
+ },
128
+ "isOptional": true,
129
+ "defaultValue": "(props?: Partial<CodePageProps>) => {\n return <CodePage {...(props || {})} fileIconSlot={this.fileIconSlot} host={this.host} />;\n }"
130
+ },
131
+ {
132
+ "__schema": "VariableLikeSchema",
133
+ "location": {
134
+ "filePath": "code.ui.runtime.tsx",
135
+ "line": 36,
136
+ "character": 3
137
+ },
138
+ "signature": "(property) CodeUI.getCodeCompare: (props?: Partial<CodeCompareProps>) => React.JSX.Element",
139
+ "name": "getCodeCompare",
140
+ "type": {
141
+ "__schema": "InferenceTypeSchema",
142
+ "location": {
143
+ "filePath": "code.ui.runtime.tsx",
144
+ "line": 36,
145
+ "character": 3
146
+ },
147
+ "type": "(props?: Partial<CodeCompareProps>) => React.JSX.Element"
148
+ },
149
+ "isOptional": true,
150
+ "defaultValue": "(props?: Partial<CodeCompareProps>) => {\n return (\n <CodeCompareEditorProvider>\n <CodeCompare {...(props || {})} fileIconSlot={this.fileIconSlot} />\n </CodeCompareEditorProvider>\n );\n }"
151
+ },
152
+ {
153
+ "__schema": "VariableLikeSchema",
154
+ "location": {
155
+ "filePath": "code.ui.runtime.tsx",
156
+ "line": 44,
157
+ "character": 3
158
+ },
159
+ "signature": "(property) CodeUI.getCodeEditorProvider: () => React.FC<CodeEditorProviderProps>",
160
+ "name": "getCodeEditorProvider",
161
+ "type": {
162
+ "__schema": "InferenceTypeSchema",
163
+ "location": {
164
+ "filePath": "code.ui.runtime.tsx",
165
+ "line": 44,
166
+ "character": 3
167
+ },
168
+ "type": "() => React.FC<CodeEditorProviderProps>"
169
+ },
170
+ "isOptional": true,
171
+ "defaultValue": "() => CodeEditorProvider"
172
+ },
173
+ {
174
+ "__schema": "VariableLikeSchema",
175
+ "location": {
176
+ "filePath": "code.ui.runtime.tsx",
177
+ "line": 45,
178
+ "character": 3
179
+ },
180
+ "signature": "(property) CodeUI.getCodeDiffEditorProvider: () => React.FC<CodeCompareEditorProviderProps>",
181
+ "name": "getCodeDiffEditorProvider",
182
+ "type": {
183
+ "__schema": "InferenceTypeSchema",
184
+ "location": {
185
+ "filePath": "code.ui.runtime.tsx",
186
+ "line": 45,
187
+ "character": 3
188
+ },
189
+ "type": "() => React.FC<CodeCompareEditorProviderProps>"
190
+ },
191
+ "isOptional": true,
192
+ "defaultValue": "() => CodeCompareEditorProvider"
193
+ },
194
+ {
195
+ "__schema": "FunctionLikeSchema",
196
+ "location": {
197
+ "filePath": "code.ui.runtime.tsx",
198
+ "line": 47,
199
+ "character": 3
200
+ },
201
+ "signature": "(method) CodeUI.registerEnvFileIcon(icons: FileIconMatch[]): this",
202
+ "name": "registerEnvFileIcon",
203
+ "params": [
204
+ {
205
+ "__schema": "ParameterSchema",
206
+ "location": {
207
+ "filePath": "code.ui.runtime.tsx",
208
+ "line": 47,
209
+ "character": 23
210
+ },
211
+ "name": "icons",
212
+ "type": {
213
+ "__schema": "TypeArraySchema",
214
+ "location": {
215
+ "filePath": "code.ui.runtime.tsx",
216
+ "line": 47,
217
+ "character": 30
218
+ },
219
+ "type": {
220
+ "__schema": "TypeRefSchema",
221
+ "location": {
222
+ "filePath": "code.ui.runtime.tsx",
223
+ "line": 47,
224
+ "character": 30
225
+ },
226
+ "name": "FileIconMatch",
227
+ "componentId": {
228
+ "scope": "teambit.code",
229
+ "name": "ui/utils/get-file-icon",
230
+ "version": "0.0.495"
231
+ }
232
+ }
233
+ },
234
+ "isOptional": false,
235
+ "isSpread": false
236
+ }
237
+ ],
238
+ "returnType": {
239
+ "__schema": "TypeRefSchema",
240
+ "location": {
241
+ "filePath": "code.ui.runtime.tsx",
242
+ "line": 47,
243
+ "character": 3
244
+ },
245
+ "name": "CodeUI"
246
+ },
247
+ "modifiers": []
248
+ },
249
+ {
250
+ "__schema": "VariableLikeSchema",
251
+ "location": {
252
+ "filePath": "code.ui.runtime.tsx",
253
+ "line": 52,
254
+ "character": 3
255
+ },
256
+ "signature": "(property) CodeUI.dependencies: Aspect[]",
257
+ "name": "dependencies",
258
+ "type": {
259
+ "__schema": "InferenceTypeSchema",
260
+ "location": {
261
+ "filePath": "code.ui.runtime.tsx",
262
+ "line": 52,
263
+ "character": 3
264
+ },
265
+ "type": "Aspect[]"
266
+ },
267
+ "isOptional": true,
268
+ "defaultValue": "[ComponentAspect, ComponentCompareAspect]"
269
+ },
270
+ {
271
+ "__schema": "VariableLikeSchema",
272
+ "location": {
273
+ "filePath": "code.ui.runtime.tsx",
274
+ "line": 54,
275
+ "character": 3
276
+ },
277
+ "signature": "(property) CodeUI.runtime: RuntimeDefinition",
278
+ "name": "runtime",
279
+ "type": {
280
+ "__schema": "InferenceTypeSchema",
281
+ "location": {
282
+ "filePath": "code.ui.runtime.tsx",
283
+ "line": 54,
284
+ "character": 3
285
+ },
286
+ "type": "RuntimeDefinition"
287
+ },
288
+ "isOptional": true,
289
+ "defaultValue": "UIRuntime"
290
+ },
291
+ {
292
+ "__schema": "VariableLikeSchema",
293
+ "location": {
294
+ "filePath": "code.ui.runtime.tsx",
295
+ "line": 56,
296
+ "character": 3
297
+ },
298
+ "signature": "(property) CodeUI.slots: ((registerFn: () => string) => SlotRegistry<string>)[]",
299
+ "name": "slots",
300
+ "type": {
301
+ "__schema": "InferenceTypeSchema",
302
+ "location": {
303
+ "filePath": "code.ui.runtime.tsx",
304
+ "line": 56,
305
+ "character": 3
306
+ },
307
+ "type": "((registerFn: () => string) => SlotRegistry<string>)[]"
308
+ },
309
+ "isOptional": true,
310
+ "defaultValue": "[Slot.withType<string>()]"
311
+ },
312
+ {
313
+ "__schema": "FunctionLikeSchema",
314
+ "location": {
315
+ "filePath": "code.ui.runtime.tsx",
316
+ "line": 58,
317
+ "character": 3
318
+ },
319
+ "signature": "(method) CodeUI.provider([component, componentCompare]: [ComponentUI, ComponentCompareUI], _: any, [fileIconSlot]: [FileIconSlot], harmony: Harmony): Promise<CodeUI>",
320
+ "name": "provider",
321
+ "params": [
322
+ {
323
+ "__schema": "ParameterSchema",
324
+ "location": {
325
+ "filePath": "code.ui.runtime.tsx",
326
+ "line": 59,
327
+ "character": 5
328
+ },
329
+ "name": "[ component, componentCompare ]",
330
+ "type": {
331
+ "__schema": "TupleTypeSchema",
332
+ "location": {
333
+ "filePath": "code.ui.runtime.tsx",
334
+ "line": 59,
335
+ "character": 36
336
+ },
337
+ "elements": [
338
+ {
339
+ "__schema": "TypeRefSchema",
340
+ "location": {
341
+ "filePath": "code.ui.runtime.tsx",
342
+ "line": 59,
343
+ "character": 37
344
+ },
345
+ "name": "ComponentUI",
346
+ "componentId": {
347
+ "scope": "teambit.component",
348
+ "name": "component"
349
+ }
350
+ },
351
+ {
352
+ "__schema": "TypeRefSchema",
353
+ "location": {
354
+ "filePath": "code.ui.runtime.tsx",
355
+ "line": 59,
356
+ "character": 50
357
+ },
358
+ "name": "ComponentCompareUI",
359
+ "componentId": {
360
+ "scope": "teambit.component",
361
+ "name": "component-compare"
362
+ }
363
+ }
364
+ ]
365
+ },
366
+ "isOptional": false,
367
+ "isSpread": false
368
+ },
369
+ {
370
+ "__schema": "ParameterSchema",
371
+ "location": {
372
+ "filePath": "code.ui.runtime.tsx",
373
+ "line": 60,
374
+ "character": 5
375
+ },
376
+ "name": "_",
377
+ "type": {
378
+ "__schema": "InferenceTypeSchema",
379
+ "location": {
380
+ "filePath": "code.ui.runtime.tsx",
381
+ "line": 60,
382
+ "character": 5
383
+ },
384
+ "type": "any"
385
+ },
386
+ "isOptional": false,
387
+ "isSpread": false
388
+ },
389
+ {
390
+ "__schema": "ParameterSchema",
391
+ "location": {
392
+ "filePath": "code.ui.runtime.tsx",
393
+ "line": 61,
394
+ "character": 5
395
+ },
396
+ "name": "[ fileIconSlot ]",
397
+ "type": {
398
+ "__schema": "TupleTypeSchema",
399
+ "location": {
400
+ "filePath": "code.ui.runtime.tsx",
401
+ "line": 61,
402
+ "character": 21
403
+ },
404
+ "elements": [
405
+ {
406
+ "__schema": "TypeRefSchema",
407
+ "location": {
408
+ "filePath": "code.ui.runtime.tsx",
409
+ "line": 61,
410
+ "character": 22
411
+ },
412
+ "name": "FileIconSlot"
413
+ }
414
+ ]
415
+ },
416
+ "isOptional": false,
417
+ "isSpread": false
418
+ },
419
+ {
420
+ "__schema": "ParameterSchema",
421
+ "location": {
422
+ "filePath": "code.ui.runtime.tsx",
423
+ "line": 62,
424
+ "character": 5
425
+ },
426
+ "name": "harmony",
427
+ "type": {
428
+ "__schema": "TypeRefSchema",
429
+ "location": {
430
+ "filePath": "code.ui.runtime.tsx",
431
+ "line": 62,
432
+ "character": 14
433
+ },
434
+ "name": "Harmony",
435
+ "componentId": {
436
+ "scope": "teambit.harmony",
437
+ "name": "harmony",
438
+ "version": "0.4.6"
439
+ }
440
+ },
441
+ "isOptional": false,
442
+ "isSpread": false
443
+ }
444
+ ],
445
+ "returnType": {
446
+ "__schema": "InferenceTypeSchema",
447
+ "location": {
448
+ "filePath": "code.ui.runtime.tsx",
449
+ "line": 58,
450
+ "character": 3
451
+ },
452
+ "type": "Promise<CodeUI>"
453
+ },
454
+ "modifiers": [
455
+ "static",
456
+ "async"
457
+ ]
458
+ }
459
+ ],
460
+ "extendsNodes": [],
461
+ "implementNodes": []
462
+ },
463
+ {
464
+ "__schema": "TypeSchema",
465
+ "location": {
466
+ "filePath": "code.ui.runtime.tsx",
467
+ "line": 17,
468
+ "character": 1
469
+ },
470
+ "signature": "type FileIconSlot = SlotRegistry<FileIconMatch[]>",
471
+ "name": "FileIconSlot",
472
+ "type": {
473
+ "__schema": "TypeRefSchema",
474
+ "location": {
475
+ "filePath": "code.ui.runtime.tsx",
476
+ "line": 17,
477
+ "character": 28
478
+ },
479
+ "name": "SlotRegistry",
480
+ "componentId": {
481
+ "scope": "teambit.harmony",
482
+ "name": "harmony",
483
+ "version": "0.4.6"
484
+ },
485
+ "typeArgs": [
486
+ {
487
+ "__schema": "TypeArraySchema",
488
+ "location": {
489
+ "filePath": "code.ui.runtime.tsx",
490
+ "line": 17,
491
+ "character": 41
492
+ },
493
+ "type": {
494
+ "__schema": "TypeRefSchema",
495
+ "location": {
496
+ "filePath": "code.ui.runtime.tsx",
497
+ "line": 17,
498
+ "character": 41
499
+ },
500
+ "name": "FileIconMatch",
501
+ "componentId": {
502
+ "scope": "teambit.code",
503
+ "name": "ui/utils/get-file-icon",
504
+ "version": "0.0.495"
505
+ }
506
+ }
507
+ }
508
+ ]
509
+ }
510
+ },
511
+ {
512
+ "__schema": "VariableLikeSchema",
513
+ "location": {
514
+ "filePath": "code.aspect.ts",
515
+ "line": 3,
516
+ "character": 14
517
+ },
518
+ "signature": "const CodeAspect: Aspect",
519
+ "name": "CodeAspect",
520
+ "type": {
521
+ "__schema": "TypeRefSchema",
522
+ "location": {
523
+ "filePath": "code.aspect.ts",
524
+ "line": 3,
525
+ "character": 14
526
+ },
527
+ "name": "Aspect",
528
+ "componentId": {
529
+ "scope": "teambit.harmony",
530
+ "name": "harmony",
531
+ "version": "0.4.6"
532
+ }
533
+ },
534
+ "isOptional": false,
535
+ "defaultValue": "Aspect.create({\n id: 'teambit.component/code',\n dependencies: [],\n defaultConfig: {},\n})"
536
+ },
537
+ {
538
+ "__schema": "UnImplementedSchema",
539
+ "location": {
540
+ "filePath": "index.ts",
541
+ "line": 5,
542
+ "character": 16
543
+ },
544
+ "name": "CodeAspect",
545
+ "type": "Identifier"
546
+ }
547
+ ],
548
+ "internals": []
549
+ },
550
+ "internals": [
551
+ {
552
+ "__schema": "ModuleSchema",
553
+ "location": {
554
+ "filePath": "code.ui.runtime.tsx",
555
+ "line": 1,
556
+ "character": 1
557
+ },
558
+ "exports": [
559
+ {
560
+ "__schema": "TypeSchema",
561
+ "location": {
562
+ "filePath": "code.ui.runtime.tsx",
563
+ "line": 17,
564
+ "character": 1
565
+ },
566
+ "signature": "type FileIconSlot = SlotRegistry<FileIconMatch[]>",
567
+ "name": "FileIconSlot",
568
+ "type": {
569
+ "__schema": "TypeRefSchema",
570
+ "location": {
571
+ "filePath": "code.ui.runtime.tsx",
572
+ "line": 17,
573
+ "character": 28
574
+ },
575
+ "name": "SlotRegistry",
576
+ "componentId": {
577
+ "scope": "teambit.harmony",
578
+ "name": "harmony",
579
+ "version": "0.4.6"
580
+ },
581
+ "typeArgs": [
582
+ {
583
+ "__schema": "TypeArraySchema",
584
+ "location": {
585
+ "filePath": "code.ui.runtime.tsx",
586
+ "line": 17,
587
+ "character": 41
588
+ },
589
+ "type": {
590
+ "__schema": "TypeRefSchema",
591
+ "location": {
592
+ "filePath": "code.ui.runtime.tsx",
593
+ "line": 17,
594
+ "character": 41
595
+ },
596
+ "name": "FileIconMatch",
597
+ "componentId": {
598
+ "scope": "teambit.code",
599
+ "name": "ui/utils/get-file-icon",
600
+ "version": "0.0.495"
601
+ }
602
+ }
603
+ }
604
+ ]
605
+ }
606
+ },
607
+ {
608
+ "__schema": "ClassSchema",
609
+ "location": {
610
+ "filePath": "code.ui.runtime.tsx",
611
+ "line": 23,
612
+ "character": 1
613
+ },
614
+ "doc": {
615
+ "__schema": "DocSchema",
616
+ "location": {
617
+ "filePath": "code.ui.runtime.tsx",
618
+ "line": 19,
619
+ "character": 1
620
+ },
621
+ "raw": "/**\n * Component code tab aspect. Presents the code tab page and allows to control the code tab and register specific icons for each file type.\n * @example CodeUI.registerEnvFileIcon([(fileName) => (/your-regexp/.test(fileName) ? 'your.icon.url' : undefined)])\n */",
622
+ "comment": "Component code tab aspect. Presents the code tab page and allows to control the code tab and register specific icons for each file type.",
623
+ "tags": [
624
+ {
625
+ "__schema": "TagSchema",
626
+ "location": {
627
+ "filePath": "code.ui.runtime.tsx",
628
+ "line": 21,
629
+ "character": 5
630
+ },
631
+ "tagName": "example",
632
+ "comment": "CodeUI.registerEnvFileIcon([\n (fileName) => (/your-regexp/.test(fileName) ? 'your.icon.url' : undefined),\n]);\n"
633
+ }
634
+ ]
635
+ },
636
+ "signature": "class CodeUI",
637
+ "name": "CodeUI",
638
+ "members": [
639
+ {
640
+ "__schema": "ConstructorSchema",
641
+ "location": {
642
+ "filePath": "code.ui.runtime.tsx",
643
+ "line": 24,
644
+ "character": 3
645
+ },
646
+ "signature": "constructor CodeUI(host: string, fileIconSlot?: FileIconSlot): CodeUI",
647
+ "name": "constructor",
648
+ "params": [
649
+ {
650
+ "__schema": "ParameterSchema",
651
+ "location": {
652
+ "filePath": "code.ui.runtime.tsx",
653
+ "line": 28,
654
+ "character": 5
655
+ },
656
+ "name": "host",
657
+ "type": {
658
+ "__schema": "KeywordTypeSchema",
659
+ "location": {
660
+ "filePath": "code.ui.runtime.tsx",
661
+ "line": 28,
662
+ "character": 19
663
+ },
664
+ "name": "string"
665
+ },
666
+ "isOptional": false,
667
+ "isSpread": false
668
+ },
669
+ {
670
+ "__schema": "ParameterSchema",
671
+ "location": {
672
+ "filePath": "code.ui.runtime.tsx",
673
+ "line": 29,
674
+ "character": 5
675
+ },
676
+ "name": "fileIconSlot",
677
+ "type": {
678
+ "__schema": "TypeRefSchema",
679
+ "location": {
680
+ "filePath": "code.ui.runtime.tsx",
681
+ "line": 29,
682
+ "character": 28
683
+ },
684
+ "name": "FileIconSlot"
685
+ },
686
+ "isOptional": true,
687
+ "isSpread": false
688
+ }
689
+ ],
690
+ "returnType": {
691
+ "__schema": "ThisTypeSchema",
692
+ "location": {
693
+ "filePath": "code.ui.runtime.tsx",
694
+ "line": 23,
695
+ "character": 1
696
+ },
697
+ "name": "CodeUI"
698
+ },
699
+ "modifiers": []
700
+ },
701
+ {
702
+ "__schema": "VariableLikeSchema",
703
+ "location": {
704
+ "filePath": "code.ui.runtime.tsx",
705
+ "line": 32,
706
+ "character": 3
707
+ },
708
+ "signature": "(property) CodeUI.getCodePage: (props?: Partial<CodePageProps>) => React.JSX.Element",
709
+ "name": "getCodePage",
710
+ "type": {
711
+ "__schema": "InferenceTypeSchema",
712
+ "location": {
713
+ "filePath": "code.ui.runtime.tsx",
714
+ "line": 32,
715
+ "character": 3
716
+ },
717
+ "type": "(props?: Partial<CodePageProps>) => React.JSX.Element"
718
+ },
719
+ "isOptional": true,
720
+ "defaultValue": "(props?: Partial<CodePageProps>) => {\n return <CodePage {...(props || {})} fileIconSlot={this.fileIconSlot} host={this.host} />;\n }"
721
+ },
722
+ {
723
+ "__schema": "VariableLikeSchema",
724
+ "location": {
725
+ "filePath": "code.ui.runtime.tsx",
726
+ "line": 36,
727
+ "character": 3
728
+ },
729
+ "signature": "(property) CodeUI.getCodeCompare: (props?: Partial<CodeCompareProps>) => React.JSX.Element",
730
+ "name": "getCodeCompare",
731
+ "type": {
732
+ "__schema": "InferenceTypeSchema",
733
+ "location": {
734
+ "filePath": "code.ui.runtime.tsx",
735
+ "line": 36,
736
+ "character": 3
737
+ },
738
+ "type": "(props?: Partial<CodeCompareProps>) => React.JSX.Element"
739
+ },
740
+ "isOptional": true,
741
+ "defaultValue": "(props?: Partial<CodeCompareProps>) => {\n return (\n <CodeCompareEditorProvider>\n <CodeCompare {...(props || {})} fileIconSlot={this.fileIconSlot} />\n </CodeCompareEditorProvider>\n );\n }"
742
+ },
743
+ {
744
+ "__schema": "VariableLikeSchema",
745
+ "location": {
746
+ "filePath": "code.ui.runtime.tsx",
747
+ "line": 44,
748
+ "character": 3
749
+ },
750
+ "signature": "(property) CodeUI.getCodeEditorProvider: () => React.FC<CodeEditorProviderProps>",
751
+ "name": "getCodeEditorProvider",
752
+ "type": {
753
+ "__schema": "InferenceTypeSchema",
754
+ "location": {
755
+ "filePath": "code.ui.runtime.tsx",
756
+ "line": 44,
757
+ "character": 3
758
+ },
759
+ "type": "() => React.FC<CodeEditorProviderProps>"
760
+ },
761
+ "isOptional": true,
762
+ "defaultValue": "() => CodeEditorProvider"
763
+ },
764
+ {
765
+ "__schema": "VariableLikeSchema",
766
+ "location": {
767
+ "filePath": "code.ui.runtime.tsx",
768
+ "line": 45,
769
+ "character": 3
770
+ },
771
+ "signature": "(property) CodeUI.getCodeDiffEditorProvider: () => React.FC<CodeCompareEditorProviderProps>",
772
+ "name": "getCodeDiffEditorProvider",
773
+ "type": {
774
+ "__schema": "InferenceTypeSchema",
775
+ "location": {
776
+ "filePath": "code.ui.runtime.tsx",
777
+ "line": 45,
778
+ "character": 3
779
+ },
780
+ "type": "() => React.FC<CodeCompareEditorProviderProps>"
781
+ },
782
+ "isOptional": true,
783
+ "defaultValue": "() => CodeCompareEditorProvider"
784
+ },
785
+ {
786
+ "__schema": "FunctionLikeSchema",
787
+ "location": {
788
+ "filePath": "code.ui.runtime.tsx",
789
+ "line": 47,
790
+ "character": 3
791
+ },
792
+ "signature": "(method) CodeUI.registerEnvFileIcon(icons: FileIconMatch[]): this",
793
+ "name": "registerEnvFileIcon",
794
+ "params": [
795
+ {
796
+ "__schema": "ParameterSchema",
797
+ "location": {
798
+ "filePath": "code.ui.runtime.tsx",
799
+ "line": 47,
800
+ "character": 23
801
+ },
802
+ "name": "icons",
803
+ "type": {
804
+ "__schema": "TypeArraySchema",
805
+ "location": {
806
+ "filePath": "code.ui.runtime.tsx",
807
+ "line": 47,
808
+ "character": 30
809
+ },
810
+ "type": {
811
+ "__schema": "TypeRefSchema",
812
+ "location": {
813
+ "filePath": "code.ui.runtime.tsx",
814
+ "line": 47,
815
+ "character": 30
816
+ },
817
+ "name": "FileIconMatch",
818
+ "componentId": {
819
+ "scope": "teambit.code",
820
+ "name": "ui/utils/get-file-icon",
821
+ "version": "0.0.495"
822
+ }
823
+ }
824
+ },
825
+ "isOptional": false,
826
+ "isSpread": false
827
+ }
828
+ ],
829
+ "returnType": {
830
+ "__schema": "TypeRefSchema",
831
+ "location": {
832
+ "filePath": "code.ui.runtime.tsx",
833
+ "line": 47,
834
+ "character": 3
835
+ },
836
+ "name": "CodeUI"
837
+ },
838
+ "modifiers": []
839
+ },
840
+ {
841
+ "__schema": "VariableLikeSchema",
842
+ "location": {
843
+ "filePath": "code.ui.runtime.tsx",
844
+ "line": 52,
845
+ "character": 3
846
+ },
847
+ "signature": "(property) CodeUI.dependencies: Aspect[]",
848
+ "name": "dependencies",
849
+ "type": {
850
+ "__schema": "InferenceTypeSchema",
851
+ "location": {
852
+ "filePath": "code.ui.runtime.tsx",
853
+ "line": 52,
854
+ "character": 3
855
+ },
856
+ "type": "Aspect[]"
857
+ },
858
+ "isOptional": true,
859
+ "defaultValue": "[ComponentAspect, ComponentCompareAspect]"
860
+ },
861
+ {
862
+ "__schema": "VariableLikeSchema",
863
+ "location": {
864
+ "filePath": "code.ui.runtime.tsx",
865
+ "line": 54,
866
+ "character": 3
867
+ },
868
+ "signature": "(property) CodeUI.runtime: RuntimeDefinition",
869
+ "name": "runtime",
870
+ "type": {
871
+ "__schema": "InferenceTypeSchema",
872
+ "location": {
873
+ "filePath": "code.ui.runtime.tsx",
874
+ "line": 54,
875
+ "character": 3
876
+ },
877
+ "type": "RuntimeDefinition"
878
+ },
879
+ "isOptional": true,
880
+ "defaultValue": "UIRuntime"
881
+ },
882
+ {
883
+ "__schema": "VariableLikeSchema",
884
+ "location": {
885
+ "filePath": "code.ui.runtime.tsx",
886
+ "line": 56,
887
+ "character": 3
888
+ },
889
+ "signature": "(property) CodeUI.slots: ((registerFn: () => string) => SlotRegistry<string>)[]",
890
+ "name": "slots",
891
+ "type": {
892
+ "__schema": "InferenceTypeSchema",
893
+ "location": {
894
+ "filePath": "code.ui.runtime.tsx",
895
+ "line": 56,
896
+ "character": 3
897
+ },
898
+ "type": "((registerFn: () => string) => SlotRegistry<string>)[]"
899
+ },
900
+ "isOptional": true,
901
+ "defaultValue": "[Slot.withType<string>()]"
902
+ },
903
+ {
904
+ "__schema": "FunctionLikeSchema",
905
+ "location": {
906
+ "filePath": "code.ui.runtime.tsx",
907
+ "line": 58,
908
+ "character": 3
909
+ },
910
+ "signature": "(method) CodeUI.provider([component, componentCompare]: [ComponentUI, ComponentCompareUI], _: any, [fileIconSlot]: [FileIconSlot], harmony: Harmony): Promise<CodeUI>",
911
+ "name": "provider",
912
+ "params": [
913
+ {
914
+ "__schema": "ParameterSchema",
915
+ "location": {
916
+ "filePath": "code.ui.runtime.tsx",
917
+ "line": 59,
918
+ "character": 5
919
+ },
920
+ "name": "[ component, componentCompare ]",
921
+ "type": {
922
+ "__schema": "TupleTypeSchema",
923
+ "location": {
924
+ "filePath": "code.ui.runtime.tsx",
925
+ "line": 59,
926
+ "character": 36
927
+ },
928
+ "elements": [
929
+ {
930
+ "__schema": "TypeRefSchema",
931
+ "location": {
932
+ "filePath": "code.ui.runtime.tsx",
933
+ "line": 59,
934
+ "character": 37
935
+ },
936
+ "name": "ComponentUI",
937
+ "componentId": {
938
+ "scope": "teambit.component",
939
+ "name": "component"
940
+ }
941
+ },
942
+ {
943
+ "__schema": "TypeRefSchema",
944
+ "location": {
945
+ "filePath": "code.ui.runtime.tsx",
946
+ "line": 59,
947
+ "character": 50
948
+ },
949
+ "name": "ComponentCompareUI",
950
+ "componentId": {
951
+ "scope": "teambit.component",
952
+ "name": "component-compare"
953
+ }
954
+ }
955
+ ]
956
+ },
957
+ "isOptional": false,
958
+ "isSpread": false
959
+ },
960
+ {
961
+ "__schema": "ParameterSchema",
962
+ "location": {
963
+ "filePath": "code.ui.runtime.tsx",
964
+ "line": 60,
965
+ "character": 5
966
+ },
967
+ "name": "_",
968
+ "type": {
969
+ "__schema": "InferenceTypeSchema",
970
+ "location": {
971
+ "filePath": "code.ui.runtime.tsx",
972
+ "line": 60,
973
+ "character": 5
974
+ },
975
+ "type": "any"
976
+ },
977
+ "isOptional": false,
978
+ "isSpread": false
979
+ },
980
+ {
981
+ "__schema": "ParameterSchema",
982
+ "location": {
983
+ "filePath": "code.ui.runtime.tsx",
984
+ "line": 61,
985
+ "character": 5
986
+ },
987
+ "name": "[ fileIconSlot ]",
988
+ "type": {
989
+ "__schema": "TupleTypeSchema",
990
+ "location": {
991
+ "filePath": "code.ui.runtime.tsx",
992
+ "line": 61,
993
+ "character": 21
994
+ },
995
+ "elements": [
996
+ {
997
+ "__schema": "TypeRefSchema",
998
+ "location": {
999
+ "filePath": "code.ui.runtime.tsx",
1000
+ "line": 61,
1001
+ "character": 22
1002
+ },
1003
+ "name": "FileIconSlot"
1004
+ }
1005
+ ]
1006
+ },
1007
+ "isOptional": false,
1008
+ "isSpread": false
1009
+ },
1010
+ {
1011
+ "__schema": "ParameterSchema",
1012
+ "location": {
1013
+ "filePath": "code.ui.runtime.tsx",
1014
+ "line": 62,
1015
+ "character": 5
1016
+ },
1017
+ "name": "harmony",
1018
+ "type": {
1019
+ "__schema": "TypeRefSchema",
1020
+ "location": {
1021
+ "filePath": "code.ui.runtime.tsx",
1022
+ "line": 62,
1023
+ "character": 14
1024
+ },
1025
+ "name": "Harmony",
1026
+ "componentId": {
1027
+ "scope": "teambit.harmony",
1028
+ "name": "harmony",
1029
+ "version": "0.4.6"
1030
+ }
1031
+ },
1032
+ "isOptional": false,
1033
+ "isSpread": false
1034
+ }
1035
+ ],
1036
+ "returnType": {
1037
+ "__schema": "InferenceTypeSchema",
1038
+ "location": {
1039
+ "filePath": "code.ui.runtime.tsx",
1040
+ "line": 58,
1041
+ "character": 3
1042
+ },
1043
+ "type": "Promise<CodeUI>"
1044
+ },
1045
+ "modifiers": [
1046
+ "static",
1047
+ "async"
1048
+ ]
1049
+ }
1050
+ ],
1051
+ "extendsNodes": [],
1052
+ "implementNodes": []
1053
+ }
1054
+ ],
1055
+ "internals": [
1056
+ {
1057
+ "__schema": "ModuleSchema",
1058
+ "location": {
1059
+ "filePath": "code.ui.runtime.tsx",
1060
+ "line": 15,
1061
+ "character": 1
1062
+ },
1063
+ "exports": [
1064
+ {
1065
+ "__schema": "VariableLikeSchema",
1066
+ "location": {
1067
+ "filePath": "code.ui.runtime.tsx",
1068
+ "line": 15,
1069
+ "character": 7
1070
+ },
1071
+ "signature": "const isTsx: RegExp",
1072
+ "name": "isTsx",
1073
+ "type": {
1074
+ "__schema": "InferenceTypeSchema",
1075
+ "location": {
1076
+ "filePath": "code.ui.runtime.tsx",
1077
+ "line": 15,
1078
+ "character": 7
1079
+ },
1080
+ "type": "RegExp"
1081
+ },
1082
+ "isOptional": false,
1083
+ "defaultValue": "/\\.tsx$/"
1084
+ }
1085
+ ],
1086
+ "internals": []
1087
+ },
1088
+ {
1089
+ "__schema": "UnImplementedSchema",
1090
+ "location": {
1091
+ "filePath": "code.ui.runtime.tsx",
1092
+ "line": 82,
1093
+ "character": 1
1094
+ },
1095
+ "name": "CodeAspect.addRuntime(CodeUI);",
1096
+ "type": "ExpressionStatement"
1097
+ }
1098
+ ]
1099
+ },
1100
+ {
1101
+ "__schema": "ModuleSchema",
1102
+ "location": {
1103
+ "filePath": "code.aspect.ts",
1104
+ "line": 1,
1105
+ "character": 1
1106
+ },
1107
+ "exports": [
1108
+ {
1109
+ "__schema": "VariableLikeSchema",
1110
+ "location": {
1111
+ "filePath": "code.aspect.ts",
1112
+ "line": 3,
1113
+ "character": 14
1114
+ },
1115
+ "signature": "const CodeAspect: Aspect",
1116
+ "name": "CodeAspect",
1117
+ "type": {
1118
+ "__schema": "TypeRefSchema",
1119
+ "location": {
1120
+ "filePath": "code.aspect.ts",
1121
+ "line": 3,
1122
+ "character": 14
1123
+ },
1124
+ "name": "Aspect",
1125
+ "componentId": {
1126
+ "scope": "teambit.harmony",
1127
+ "name": "harmony",
1128
+ "version": "0.4.6"
1129
+ }
1130
+ },
1131
+ "isOptional": false,
1132
+ "defaultValue": "Aspect.create({\n id: 'teambit.component/code',\n dependencies: [],\n defaultConfig: {},\n})"
1133
+ },
1134
+ {
1135
+ "__schema": "UnImplementedSchema",
1136
+ "location": {
1137
+ "filePath": "code.aspect.ts",
1138
+ "line": 9,
1139
+ "character": 16
1140
+ },
1141
+ "name": "CodeAspect",
1142
+ "type": "Identifier"
1143
+ }
1144
+ ],
1145
+ "internals": []
1146
+ }
1147
+ ],
1148
+ "componentId": {
1149
+ "scope": "teambit.component",
1150
+ "name": "code",
1151
+ "version": "1.0.190"
1152
+ },
1153
+ "taggedModuleExports": []
1154
+ }
@@ -1 +1 @@
1
- {"version":3,"names":["_harmony","data","require","CodeAspect","exports","Aspect","create","id","dependencies","defaultConfig","_default","default"],"sources":["code.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const CodeAspect = Aspect.create({\n id: 'teambit.component/code',\n dependencies: [],\n defaultConfig: {},\n});\n\nexport default CodeAspect;\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,UAAU,GAAAC,OAAA,CAAAD,UAAA,GAAGE,iBAAM,CAACC,MAAM,CAAC;EACtCC,EAAE,EAAE,wBAAwB;EAC5BC,YAAY,EAAE,EAAE;EAChBC,aAAa,EAAE,CAAC;AAClB,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAN,OAAA,CAAAO,OAAA,GAEYR,UAAU"}
1
+ {"version":3,"names":["_harmony","data","require","CodeAspect","exports","Aspect","create","id","dependencies","defaultConfig","_default","default"],"sources":["code.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const CodeAspect = Aspect.create({\n id: 'teambit.component/code',\n dependencies: [],\n defaultConfig: {},\n});\n\nexport default CodeAspect;\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,UAAU,GAAAC,OAAA,CAAAD,UAAA,GAAGE,iBAAM,CAACC,MAAM,CAAC;EACtCC,EAAE,EAAE,wBAAwB;EAC5BC,YAAY,EAAE,EAAE;EAChBC,aAAa,EAAE,CAAC;AAClB,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAN,OAAA,CAAAO,OAAA,GAEYR,UAAU","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_react","data","_interopRequireDefault","require","obj","__esModule","default","Logo","createElement","style","height","display","justifyContent","width","src","exports"],"sources":["code.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/code.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;AAAkD,CAAE,CAChF,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":["code.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/code.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;AAAkD,CAAE,CAChF,CACN;AAACC,OAAA,CAAAR,IAAA,GAAAA,IAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_react","data","_interopRequireDefault","require","_uiFoundationUi","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","CodeSection","constructor","codeUI","path","element","getCodePage","href","children","createElement","MenuWidgetIcon","icon","tooltipContent","displayName","exports"],"sources":["code.section.tsx"],"sourcesContent":["import { Section } from '@teambit/component';\nimport React from 'react';\nimport { MenuWidgetIcon } from '@teambit/ui-foundation.ui.menu-widget-icon';\nimport type { CodeUI } from './code.ui.runtime';\n\nexport class CodeSection implements Section {\n constructor(private codeUI: CodeUI) {}\n route = {\n path: '~code/*',\n element: this.codeUI.getCodePage(),\n };\n navigationLink = {\n href: '~code',\n children: <MenuWidgetIcon icon=\"Code\" tooltipContent=\"Code\" />,\n displayName: 'Code',\n };\n order = 30;\n}\n"],"mappings":";;;;;;AACA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,gBAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,eAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA4E,SAAAC,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,gBAAAH,GAAA,EAAAI,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAJ,GAAA,IAAAO,MAAA,CAAAC,cAAA,CAAAR,GAAA,EAAAI,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAX,GAAA,CAAAI,GAAA,IAAAC,KAAA,WAAAL,GAAA;AAAA,SAAAM,eAAAM,CAAA,QAAAC,CAAA,GAAAC,YAAA,CAAAF,CAAA,uCAAAC,CAAA,GAAAA,CAAA,GAAAE,MAAA,CAAAF,CAAA;AAAA,SAAAC,aAAAF,CAAA,EAAAI,CAAA,2BAAAJ,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAK,CAAA,GAAAL,CAAA,CAAAM,MAAA,CAAAC,WAAA,kBAAAF,CAAA,QAAAJ,CAAA,GAAAI,CAAA,CAAAG,IAAA,CAAAR,CAAA,EAAAI,CAAA,uCAAAH,CAAA,SAAAA,CAAA,YAAAQ,SAAA,yEAAAL,CAAA,GAAAD,MAAA,GAAAO,MAAA,EAAAV,CAAA;AAGrE,MAAMW,WAAW,CAAoB;EAC1CC,WAAWA,CAASC,MAAc,EAAE;IAAA,KAAhBA,MAAc,GAAdA,MAAc;IAAAtB,eAAA,gBAC1B;MACNuB,IAAI,EAAE,SAAS;MACfC,OAAO,EAAE,IAAI,CAACF,MAAM,CAACG,WAAW,CAAC;IACnC,CAAC;IAAAzB,eAAA,yBACgB;MACf0B,IAAI,EAAE,OAAO;MACbC,QAAQ,eAAEnC,MAAA,GAAAO,OAAA,CAAA6B,aAAA,CAAChC,eAAA,GAAAiC,cAAc;QAACC,IAAI,EAAC,MAAM;QAACC,cAAc,EAAC;MAAM,CAAE,CAAC;MAC9DC,WAAW,EAAE;IACf,CAAC;IAAAhC,eAAA,gBACO,EAAE;EAV2B;AAWvC;AAACiC,OAAA,CAAAb,WAAA,GAAAA,WAAA"}
1
+ {"version":3,"names":["_react","data","_interopRequireDefault","require","_uiFoundationUi","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","CodeSection","constructor","codeUI","path","element","getCodePage","href","children","createElement","MenuWidgetIcon","icon","tooltipContent","displayName","exports"],"sources":["code.section.tsx"],"sourcesContent":["import { Section } from '@teambit/component';\nimport React from 'react';\nimport { MenuWidgetIcon } from '@teambit/ui-foundation.ui.menu-widget-icon';\nimport type { CodeUI } from './code.ui.runtime';\n\nexport class CodeSection implements Section {\n constructor(private codeUI: CodeUI) {}\n route = {\n path: '~code/*',\n element: this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V,CAAA;AAGrE,MAAMW,WAAW,CAAoB;EAC1CC,WAAWA,CAASC,MAAc,EAAE;IAAA,KAAhBA,MAAc,GAAdA,MAAc;IAAAtB,eAAA,gBAC1B;MACNuB,IAAI,EAAE,SAAS;MACfC,OAAO,EAAE,IAAI,CAACF,MAAM,CAACG,WAAW,CAAC;IACnC,CAAC;IAAAzB,eAAA,yBACgB;MACf0B,IAAI,EAAE,OAAO;MACbC,QAAQ,eAAEnC,MAAA,GAAAO,OAAA,CAAA6B,aAAA,CAAChC,eAAA,GAAAiC,cAAc;QAACC,IAAI,EAAC,MAAM;QAACC,cAAc,EAAC;MAAM,CAAE,CAAC;MAC9DC,WAAW,EAAE;IACf,CAAC;IAAAhC,eAAA,gBACO,EAAE;EAV2B;AAWvC;AAACiC,OAAA,CAAAb,WAAA,GAAAA,WAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_react","data","_interopRequireDefault","require","_component","_ui","_codeUi","_harmony","_baseUiConstants","_codeUi2","_componentCompare","_codeUi3","_codeUi4","_code","_code2","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","isTsx","CodeUI","constructor","host","fileIconSlot","props","createElement","CodePage","CodeCompareEditorProvider","CodeCompare","CodeEditorProvider","registerEnvFileIcon","icons","register","provider","component","componentCompare","_","harmony","config","get","ui","section","CodeSection","fileName","test","staticStorageUrl","undefined","registerRoute","route","registerWidget","navigationLink","order","codeCompare","CodeCompareSection","registerNavigation","registerRoutes","exports","ComponentAspect","ComponentCompareAspect","UIRuntime","Slot","withType","CodeAspect","addRuntime"],"sources":["code.ui.runtime.tsx"],"sourcesContent":["import React from 'react';\nimport { ComponentAspect, ComponentUI } from '@teambit/component';\nimport { UIRuntime } from '@teambit/ui';\nimport { CodeCompare, CodeCompareEditorProvider, type CodeCompareProps } from '@teambit/code.ui.code-compare';\nimport { Harmony, SlotRegistry, Slot } from '@teambit/harmony';\nimport type { FileIconMatch } from '@teambit/code.ui.utils.get-file-icon';\nimport { staticStorageUrl } from '@teambit/base-ui.constants.storage';\nimport { CodePage, CodePageProps } from '@teambit/code.ui.code-tab-page';\nimport { ComponentCompareUI, ComponentCompareAspect } from '@teambit/component-compare';\nimport { CodeEditorProvider } from '@teambit/code.ui.code-editor';\nimport { CodeCompareSection } from '@teambit/code.ui.code-compare-section';\nimport { CodeAspect } from './code.aspect';\nimport { CodeSection } from './code.section';\n\nconst isTsx = /\\.tsx$/;\n\nexport type FileIconSlot = SlotRegistry<FileIconMatch[]>;\n\n/**\n * Component code tab aspect. Presents the code tab page and allows to control the code tab and register specific icons for each file type.\n * @example CodeUI.registerEnvFileIcon([(fileName) => (/your-regexp/.test(fileName) ? 'your.icon.url' : undefined)])\n */\nexport class CodeUI {\n constructor(\n /**\n * register an icon for a specific file type. pass icon and a match method/regexp\n */\n private host: string,\n private fileIconSlot?: FileIconSlot\n ) {}\n\n getCodePage = (props?: Partial<CodePageProps>) => {\n return <CodePage {...(props || {})} fileIconSlot={this.fileIconSlot} host={this.host} />;\n };\n\n getCodeCompare = (props?: Partial<CodeCompareProps>) => {\n return (\n <CodeCompareEditorProvider>\n <CodeCompare {...(props || {})} fileIconSlot={this.fileIconSlot} />\n </CodeCompareEditorProvider>\n );\n };\n\n getCodeEditorProvider = () => CodeEditorProvider;\n getCodeDiffEditorProvider = () => CodeCompareEditorProvider;\n\n registerEnvFileIcon(icons: FileIconMatch[]) {\n this.fileIconSlot?.register(icons);\n return this;\n }\n\n static dependencies = [ComponentAspect, ComponentCompareAspect];\n\n static runtime = UIRuntime;\n\n static slots = [Slot.withType<string>()];\n\n static async provider(\n [component, componentCompare]: [ComponentUI, ComponentCompareUI],\n _,\n [fileIconSlot]: [FileIconSlot],\n harmony: Harmony\n ) {\n const { config } = harmony;\n const host = String(config.get('teambit.harmony/bit'));\n const ui = new CodeUI(host, fileIconSlot);\n const section = new CodeSection(ui);\n\n // overrides the default tsx react icon with the typescript icon\n ui.registerEnvFileIcon([\n (fileName) => (isTsx.test(fileName) ? `${staticStorageUrl}/file-icons/file_type_typescript.svg` : undefined),\n ]);\n component.registerRoute([section.route]);\n component.registerWidget(section.navigationLink, section.order);\n const codeCompare = new CodeCompareSection(ui);\n componentCompare.registerNavigation(codeCompare);\n componentCompare.registerRoutes([codeCompare.route]);\n return ui;\n }\n}\n\nCodeAspect.addRuntime(CodeUI);\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,IAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,GAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,QAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,OAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,SAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,QAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAO,iBAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,gBAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,SAAA;EAAA,MAAAR,IAAA,GAAAE,OAAA;EAAAM,QAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAA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CAACmB,kBAAkB,CAACF,WAAW,CAAC;IAChDjB,gBAAgB,CAACoB,cAAc,CAAC,CAACH,WAAW,CAACJ,KAAK,CAAC,CAAC;IACpD,OAAOR,EAAE;EACX;AACF;AAACgB,OAAA,CAAApC,MAAA,GAAAA,MAAA;AAAAjB,eAAA,CAzDYiB,MAAM,kBA6BK,CAACqC,4BAAe,EAAEC,0CAAsB,CAAC;AAAAvD,eAAA,CA7BpDiB,MAAM,aA+BAuC,eAAS;AAAAxD,eAAA,CA/BfiB,MAAM,WAiCF,CAACwC,eAAI,CAACC,QAAQ,CAAS,CAAC,CAAC;AA0B1CC,kBAAU,CAACC,UAAU,CAAC3C,MAAM,CAAC"}
1
+ {"version":3,"names":["_react","data","_interopRequireDefault","require","_component","_ui","_codeUi","_harmony","_baseUiConstants","_codeUi2","_componentCompare","_codeUi3","_codeUi4","_code","_code2","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","isTsx","CodeUI","constructor","host","fileIconSlot","props","createElement","CodePage","CodeCompareEditorProvider","CodeCompare","CodeEditorProvider","registerEnvFileIcon","icons","register","provider","component","componentCompare","_","harmony","config","get","ui","section","CodeSection","fileName","test","staticStorageUrl","undefined","registerRoute","route","registerWidget","navigationLink","order","codeCompare","CodeCompareSection","registerNavigation","registerRoutes","exports","ComponentAspect","ComponentCompareAspect","UIRuntime","Slot","withType","CodeAspect","addRuntime"],"sources":["code.ui.runtime.tsx"],"sourcesContent":["import React from 'react';\nimport { ComponentAspect, ComponentUI } from '@teambit/component';\nimport { UIRuntime } from '@teambit/ui';\nimport { CodeCompare, CodeCompareEditorProvider, type CodeCompareProps } from '@teambit/code.ui.code-compare';\nimport { Harmony, SlotRegistry, Slot } from '@teambit/harmony';\nimport type { FileIconMatch } from '@teambit/code.ui.utils.get-file-icon';\nimport { staticStorageUrl } from '@teambit/base-ui.constants.storage';\nimport { CodePage, CodePageProps } from '@teambit/code.ui.code-tab-page';\nimport { ComponentCompareUI, ComponentCompareAspect } from '@teambit/component-compare';\nimport { CodeEditorProvider } from '@teambit/code.ui.code-editor';\nimport { CodeCompareSection } from '@teambit/code.ui.code-compare-section';\nimport { CodeAspect } from './code.aspect';\nimport { CodeSection } from './code.section';\n\nconst isTsx = /\\.tsx$/;\n\nexport type FileIconSlot = SlotRegistry<FileIconMatch[]>;\n\n/**\n * Component code tab aspect. Presents the code tab page and allows to control the code tab and register specific icons for each file type.\n * @example CodeUI.registerEnvFileIcon([(fileName) => (/your-regexp/.test(fileName) ? 'your.icon.url' : undefined)])\n */\nexport class CodeUI {\n constructor(\n /**\n * register an icon for a specific file type. pass icon and a match method/regexp\n */\n private host: string,\n private fileIconSlot?: FileIconSlot\n ) {}\n\n getCodePage = (props?: Partial<CodePageProps>) => {\n return <CodePage {...(props || {})} fileIconSlot={this.fileIconSlot} host={this.host} />;\n };\n\n getCodeCompare = (props?: Partial<CodeCompareProps>) => {\n return (\n <CodeCompareEditorProvider>\n <CodeCompare {...(props || {})} fileIconSlot={this.fileIconSlot} />\n </CodeCompareEditorProvider>\n );\n };\n\n getCodeEditorProvider = () => CodeEditorProvider;\n getCodeDiffEditorProvider = () => CodeCompareEditorProvider;\n\n registerEnvFileIcon(icons: FileIconMatch[]) {\n this.fileIconSlot?.register(icons);\n return this;\n }\n\n static dependencies = [ComponentAspect, ComponentCompareAspect];\n\n static runtime = UIRuntime;\n\n static slots = [Slot.withType<string>()];\n\n static async provider(\n [component, componentCompare]: [ComponentUI, ComponentCompareUI],\n _,\n [fileIconSlot]: [FileIconSlot],\n harmony: Harmony\n ) {\n const { config } = harmony;\n const host = String(config.get('teambit.harmony/bit'));\n const ui = new CodeUI(host, fileIconSlot);\n const section = new CodeSection(ui);\n\n // overrides the default tsx react icon with the typescript icon\n ui.registerEnvFileIcon([\n (fileName) => (isTsx.test(fileName) ? `${staticStorageUrl}/file-icons/file_type_typescript.svg` : undefined),\n ]);\n component.registerRoute([section.route]);\n component.registerWidget(section.navigationLink, section.order);\n const codeCompare = new CodeCompareSection(ui);\n componentCompare.registerNavigation(codeCompare);\n componentCompare.registerRoutes([codeCompare.route]);\n return ui;\n }\n}\n\nCodeAspect.addRuntime(CodeUI);\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,IAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,GAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,QAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,OAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,SAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,QAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAO,iBAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,gBAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,SAAA;EAAA,MAAAR,IAAA,GAAAE,OAAA;EAAAM,QAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAS,kBAAA;EAAA,MAAAT,IAAA,GAAAE,OAAA;EAAAO,iBAAA,YAAAA,CAAA;IAAA,O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AAOR,EAAE;EACX;AACF;AAACgB,OAAA,CAAApC,MAAA,GAAAA,MAAA;AAAAjB,eAAA,CAzDYiB,MAAM,kBA6BK,CAACqC,4BAAe,EAAEC,0CAAsB,CAAC;AAAAvD,eAAA,CA7BpDiB,MAAM,aA+BAuC,eAAS;AAAAxD,eAAA,CA/BfiB,MAAM,WAiCF,CAACwC,eAAI,CAACC,QAAQ,CAAS,CAAC,CAAC;AA0B1CC,kBAAU,CAACC,UAAU,CAAC3C,MAAM,CAAC","ignoreList":[]}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["_code","data","require","_default","exports","default","CodeAspect"],"sources":["index.ts"],"sourcesContent":["import { CodeAspect } from './code.aspect';\n\nexport type { CodeUI, FileIconSlot } from './code.ui.runtime';\nexport { CodeAspect };\nexport default CodeAspect;\n"],"mappings":";;;;;;;;;;;;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA2C,IAAAE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAI5BC,kBAAU"}
1
+ {"version":3,"names":["_code","data","require","_default","exports","default","CodeAspect"],"sources":["index.ts"],"sourcesContent":["import { CodeAspect } from './code.aspect';\n\nexport type { CodeUI, FileIconSlot } from './code.ui.runtime';\nexport { CodeAspect };\nexport default CodeAspect;\n"],"mappings":";;;;;;;;;;;;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA2C,IAAAE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAI5BC,kBAAU","ignoreList":[]}
@@ -0,0 +1,7 @@
1
+ import * as compositions_0 from '/Users/giladshoham/Library/Caches/Bit/capsules/root/b5ea46ec36fa42b9dbedfc12ecb7bb63e03fcfe6/teambit.component_code@1.0.190/dist/code.composition.js';
2
+ import * as overview_0 from '/Users/giladshoham/Library/Caches/Bit/capsules/root/b5ea46ec36fa42b9dbedfc12ecb7bb63e03fcfe6/teambit.component_code@1.0.190/dist/code.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"}]};
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/code",
3
- "version": "1.0.188",
3
+ "version": "1.0.190",
4
4
  "homepage": "https://bit.cloud/teambit/component/code",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.component",
8
8
  "name": "code",
9
- "version": "1.0.188"
9
+ "version": "1.0.190"
10
10
  },
11
11
  "dependencies": {
12
12
  "@teambit/harmony": "0.4.6",
@@ -15,16 +15,16 @@
15
15
  "@teambit/code.ui.code-compare-section": "0.0.5",
16
16
  "@teambit/code.ui.code-editor": "0.0.8",
17
17
  "@teambit/code.ui.utils.get-file-icon": "0.0.495",
18
- "@teambit/component": "1.0.188",
19
- "@teambit/code.ui.code-compare": "0.0.291",
20
- "@teambit/code.ui.code-tab-page": "0.0.639",
21
- "@teambit/component-compare": "1.0.188",
22
- "@teambit/ui": "1.0.188"
18
+ "@teambit/component": "1.0.190",
19
+ "@teambit/code.ui.code-compare": "0.0.293",
20
+ "@teambit/code.ui.code-tab-page": "0.0.641",
21
+ "@teambit/component-compare": "1.0.190",
22
+ "@teambit/ui": "1.0.190"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/mocha": "9.1.0",
26
26
  "chai": "4.3.0",
27
- "@teambit/harmony.envs.core-aspect-env": "0.0.25"
27
+ "@teambit/harmony.envs.core-aspect-env": "0.0.27"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "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.component_code@1.0.188/dist/code.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_code@1.0.188/dist/code.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"}]};