@teambit/code 1.0.512 → 1.0.513

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.512" tests="0" failures="0" errors="0" skipped="0"/>
3
+ <testsuite name="teambit.component/code@1.0.513" 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={245:(e,t,o)=>{var n={id:"teambit.component/code@1.0.512",homepage:"https://bit.cloud/teambit/component/code",exported:!0};function r(){const e=i(o(594));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},594: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={};o.r(n),o.d(n,{compositions:()=>f,compositions_metadata:()=>v,overview:()=>m});var r={};o.r(r),o.d(r,{default:()=>l});var i=o(245);o(594);const c=MdxJsReact,a=TeambitMdxUiMdxScopeContext;var p=["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 n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},s.apply(null,arguments)}var d={},u="wrapper";function l(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={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;o[n]=e[n]}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],t.includes(o)||{}.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}(e,p);return(0,c.mdx)(u,s({},d,o,{components:t,mdxType:"MDXLayout"}),(0,c.mdx)(a.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"}))}l.isMDXComponent=!0;const f=[i],m=[r],v={compositions:[{displayName:"Logo",identifier:"Logo"}]};return 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={470:(e,t,o)=>{var n={id:"teambit.component/code@1.0.513",homepage:"https://bit.cloud/teambit/component/code",exported:!0};function r(){const e=i(o(594));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},594: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={};o.r(n),o.d(n,{compositions:()=>f,compositions_metadata:()=>v,overview:()=>m});var r={};o.r(r),o.d(r,{default:()=>l});var i=o(470);o(594);const c=MdxJsReact,a=TeambitMdxUiMdxScopeContext;var p=["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 n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},s.apply(null,arguments)}var d={},u="wrapper";function l(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={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;o[n]=e[n]}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],t.includes(o)||{}.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}(e,p);return(0,c.mdx)(u,s({},d,o,{components:t,mdxType:"MDXLayout"}),(0,c.mdx)(a.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"}))}l.isMDXComponent=!0;const f=[i],m=[r],v={compositions:[{displayName:"Logo",identifier:"Logo"}]};return n})()));
@@ -0,0 +1,1128 @@
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": "ExportSchema",
18
+ "location": {
19
+ "filePath": "index.ts",
20
+ "line": 3,
21
+ "character": 15
22
+ },
23
+ "signature": "class CodeUI",
24
+ "name": "CodeUI",
25
+ "exportNode": {
26
+ "__schema": "ClassSchema",
27
+ "location": {
28
+ "filePath": "code.ui.runtime.tsx",
29
+ "line": 23,
30
+ "character": 1
31
+ },
32
+ "doc": {
33
+ "__schema": "DocSchema",
34
+ "location": {
35
+ "filePath": "code.ui.runtime.tsx",
36
+ "line": 19,
37
+ "character": 1
38
+ },
39
+ "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 */",
40
+ "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.",
41
+ "tags": [
42
+ {
43
+ "__schema": "TagSchema",
44
+ "location": {
45
+ "filePath": "code.ui.runtime.tsx",
46
+ "line": 21,
47
+ "character": 5
48
+ },
49
+ "tagName": "example",
50
+ "comment": "CodeUI.registerEnvFileIcon([\n (fileName) => (/your-regexp/.test(fileName) ? 'your.icon.url' : undefined),\n]);\n"
51
+ }
52
+ ]
53
+ },
54
+ "signature": "class CodeUI",
55
+ "name": "CodeUI",
56
+ "members": [
57
+ {
58
+ "__schema": "ConstructorSchema",
59
+ "location": {
60
+ "filePath": "code.ui.runtime.tsx",
61
+ "line": 24,
62
+ "character": 3
63
+ },
64
+ "signature": "constructor CodeUI(host: string, fileIconSlot?: FileIconSlot | undefined): CodeUI",
65
+ "name": "constructor",
66
+ "params": [
67
+ {
68
+ "__schema": "ParameterSchema",
69
+ "location": {
70
+ "filePath": "code.ui.runtime.tsx",
71
+ "line": 28,
72
+ "character": 5
73
+ },
74
+ "name": "host",
75
+ "type": {
76
+ "__schema": "KeywordTypeSchema",
77
+ "location": {
78
+ "filePath": "code.ui.runtime.tsx",
79
+ "line": 28,
80
+ "character": 19
81
+ },
82
+ "name": "string"
83
+ },
84
+ "isOptional": false,
85
+ "isSpread": false
86
+ },
87
+ {
88
+ "__schema": "ParameterSchema",
89
+ "location": {
90
+ "filePath": "code.ui.runtime.tsx",
91
+ "line": 29,
92
+ "character": 5
93
+ },
94
+ "name": "fileIconSlot",
95
+ "type": {
96
+ "__schema": "TypeRefSchema",
97
+ "location": {
98
+ "filePath": "code.ui.runtime.tsx",
99
+ "line": 29,
100
+ "character": 28
101
+ },
102
+ "name": "FileIconSlot"
103
+ },
104
+ "isOptional": true,
105
+ "isSpread": false
106
+ }
107
+ ],
108
+ "returnType": {
109
+ "__schema": "ThisTypeSchema",
110
+ "location": {
111
+ "filePath": "code.ui.runtime.tsx",
112
+ "line": 23,
113
+ "character": 1
114
+ },
115
+ "name": "CodeUI"
116
+ },
117
+ "modifiers": []
118
+ },
119
+ {
120
+ "__schema": "VariableLikeSchema",
121
+ "location": {
122
+ "filePath": "code.ui.runtime.tsx",
123
+ "line": 32,
124
+ "character": 3
125
+ },
126
+ "signature": "(property) CodeUI.getCodePage: (props?: Partial<CodePageProps>) => React.JSX.Element",
127
+ "name": "getCodePage",
128
+ "type": {
129
+ "__schema": "InferenceTypeSchema",
130
+ "location": {
131
+ "filePath": "code.ui.runtime.tsx",
132
+ "line": 32,
133
+ "character": 3
134
+ },
135
+ "type": "(props?: Partial<CodePageProps>) => React.JSX.Element"
136
+ },
137
+ "isOptional": true,
138
+ "defaultValue": "(props?: Partial<CodePageProps>) => {\n return <CodePage {...(props || {})} fileIconSlot={this.fileIconSlot} host={this.host} />;\n }"
139
+ },
140
+ {
141
+ "__schema": "VariableLikeSchema",
142
+ "location": {
143
+ "filePath": "code.ui.runtime.tsx",
144
+ "line": 36,
145
+ "character": 3
146
+ },
147
+ "signature": "(property) CodeUI.getCodeCompare: (props?: Partial<CodeCompareProps>) => React.JSX.Element",
148
+ "name": "getCodeCompare",
149
+ "type": {
150
+ "__schema": "InferenceTypeSchema",
151
+ "location": {
152
+ "filePath": "code.ui.runtime.tsx",
153
+ "line": 36,
154
+ "character": 3
155
+ },
156
+ "type": "(props?: Partial<CodeCompareProps>) => React.JSX.Element"
157
+ },
158
+ "isOptional": true,
159
+ "defaultValue": "(props?: Partial<CodeCompareProps>) => {\n return (\n <CodeCompareEditorProvider>\n <CodeCompare {...(props || {})} fileIconSlot={this.fileIconSlot} />\n </CodeCompareEditorProvider>\n );\n }"
160
+ },
161
+ {
162
+ "__schema": "VariableLikeSchema",
163
+ "location": {
164
+ "filePath": "code.ui.runtime.tsx",
165
+ "line": 44,
166
+ "character": 3
167
+ },
168
+ "signature": "(property) CodeUI.getCodeEditorProvider: () => React.FC<CodeEditorProviderProps>",
169
+ "name": "getCodeEditorProvider",
170
+ "type": {
171
+ "__schema": "InferenceTypeSchema",
172
+ "location": {
173
+ "filePath": "code.ui.runtime.tsx",
174
+ "line": 44,
175
+ "character": 3
176
+ },
177
+ "type": "() => React.FC<CodeEditorProviderProps>"
178
+ },
179
+ "isOptional": true,
180
+ "defaultValue": "() => CodeEditorProvider"
181
+ },
182
+ {
183
+ "__schema": "VariableLikeSchema",
184
+ "location": {
185
+ "filePath": "code.ui.runtime.tsx",
186
+ "line": 45,
187
+ "character": 3
188
+ },
189
+ "signature": "(property) CodeUI.getCodeDiffEditorProvider: () => React.FC<CodeCompareEditorProviderProps>",
190
+ "name": "getCodeDiffEditorProvider",
191
+ "type": {
192
+ "__schema": "InferenceTypeSchema",
193
+ "location": {
194
+ "filePath": "code.ui.runtime.tsx",
195
+ "line": 45,
196
+ "character": 3
197
+ },
198
+ "type": "() => React.FC<CodeCompareEditorProviderProps>"
199
+ },
200
+ "isOptional": true,
201
+ "defaultValue": "() => CodeCompareEditorProvider"
202
+ },
203
+ {
204
+ "__schema": "FunctionLikeSchema",
205
+ "location": {
206
+ "filePath": "code.ui.runtime.tsx",
207
+ "line": 47,
208
+ "character": 3
209
+ },
210
+ "signature": "(method) CodeUI.registerEnvFileIcon(icons: FileIconMatch[]): this",
211
+ "name": "registerEnvFileIcon",
212
+ "params": [
213
+ {
214
+ "__schema": "ParameterSchema",
215
+ "location": {
216
+ "filePath": "code.ui.runtime.tsx",
217
+ "line": 47,
218
+ "character": 23
219
+ },
220
+ "name": "icons",
221
+ "type": {
222
+ "__schema": "TypeArraySchema",
223
+ "location": {
224
+ "filePath": "code.ui.runtime.tsx",
225
+ "line": 47,
226
+ "character": 30
227
+ },
228
+ "type": {
229
+ "__schema": "TypeRefSchema",
230
+ "location": {
231
+ "filePath": "code.ui.runtime.tsx",
232
+ "line": 47,
233
+ "character": 30
234
+ },
235
+ "name": "FileIconMatch"
236
+ }
237
+ },
238
+ "isOptional": false,
239
+ "isSpread": false
240
+ }
241
+ ],
242
+ "returnType": {
243
+ "__schema": "TypeRefSchema",
244
+ "location": {
245
+ "filePath": "code.ui.runtime.tsx",
246
+ "line": 47,
247
+ "character": 3
248
+ },
249
+ "name": "CodeUI"
250
+ },
251
+ "modifiers": []
252
+ },
253
+ {
254
+ "__schema": "VariableLikeSchema",
255
+ "location": {
256
+ "filePath": "code.ui.runtime.tsx",
257
+ "line": 52,
258
+ "character": 3
259
+ },
260
+ "signature": "(property) CodeUI.dependencies: Aspect[]",
261
+ "name": "dependencies",
262
+ "type": {
263
+ "__schema": "InferenceTypeSchema",
264
+ "location": {
265
+ "filePath": "code.ui.runtime.tsx",
266
+ "line": 52,
267
+ "character": 3
268
+ },
269
+ "type": "Aspect[]"
270
+ },
271
+ "isOptional": true,
272
+ "defaultValue": "[ComponentAspect, ComponentCompareAspect]"
273
+ },
274
+ {
275
+ "__schema": "VariableLikeSchema",
276
+ "location": {
277
+ "filePath": "code.ui.runtime.tsx",
278
+ "line": 54,
279
+ "character": 3
280
+ },
281
+ "signature": "(property) CodeUI.runtime: RuntimeDefinition",
282
+ "name": "runtime",
283
+ "type": {
284
+ "__schema": "InferenceTypeSchema",
285
+ "location": {
286
+ "filePath": "code.ui.runtime.tsx",
287
+ "line": 54,
288
+ "character": 3
289
+ },
290
+ "type": "RuntimeDefinition"
291
+ },
292
+ "isOptional": true,
293
+ "defaultValue": "UIRuntime"
294
+ },
295
+ {
296
+ "__schema": "VariableLikeSchema",
297
+ "location": {
298
+ "filePath": "code.ui.runtime.tsx",
299
+ "line": 56,
300
+ "character": 3
301
+ },
302
+ "signature": "(property) CodeUI.slots: ((registerFn: () => string) => SlotRegistry<string>)[]",
303
+ "name": "slots",
304
+ "type": {
305
+ "__schema": "InferenceTypeSchema",
306
+ "location": {
307
+ "filePath": "code.ui.runtime.tsx",
308
+ "line": 56,
309
+ "character": 3
310
+ },
311
+ "type": "((registerFn: () => string) => SlotRegistry<string>)[]"
312
+ },
313
+ "isOptional": true,
314
+ "defaultValue": "[Slot.withType<string>()]"
315
+ },
316
+ {
317
+ "__schema": "FunctionLikeSchema",
318
+ "location": {
319
+ "filePath": "code.ui.runtime.tsx",
320
+ "line": 58,
321
+ "character": 3
322
+ },
323
+ "signature": "(method) CodeUI.provider([component, componentCompare]: [ComponentUI, ComponentCompareUI], _: any, [fileIconSlot]: [FileIconSlot], harmony: Harmony): Promise<CodeUI>",
324
+ "name": "provider",
325
+ "params": [
326
+ {
327
+ "__schema": "ParameterSchema",
328
+ "location": {
329
+ "filePath": "code.ui.runtime.tsx",
330
+ "line": 59,
331
+ "character": 5
332
+ },
333
+ "name": "[ component, componentCompare ]",
334
+ "type": {
335
+ "__schema": "TupleTypeSchema",
336
+ "location": {
337
+ "filePath": "code.ui.runtime.tsx",
338
+ "line": 59,
339
+ "character": 36
340
+ },
341
+ "elements": [
342
+ {
343
+ "__schema": "TypeRefSchema",
344
+ "location": {
345
+ "filePath": "code.ui.runtime.tsx",
346
+ "line": 59,
347
+ "character": 37
348
+ },
349
+ "name": "ComponentUI"
350
+ },
351
+ {
352
+ "__schema": "TypeRefSchema",
353
+ "location": {
354
+ "filePath": "code.ui.runtime.tsx",
355
+ "line": 59,
356
+ "character": 50
357
+ },
358
+ "name": "ComponentCompareUI"
359
+ }
360
+ ]
361
+ },
362
+ "isOptional": false,
363
+ "isSpread": false
364
+ },
365
+ {
366
+ "__schema": "ParameterSchema",
367
+ "location": {
368
+ "filePath": "code.ui.runtime.tsx",
369
+ "line": 60,
370
+ "character": 5
371
+ },
372
+ "name": "_",
373
+ "type": {
374
+ "__schema": "InferenceTypeSchema",
375
+ "location": {
376
+ "filePath": "code.ui.runtime.tsx",
377
+ "line": 60,
378
+ "character": 5
379
+ },
380
+ "type": "any"
381
+ },
382
+ "isOptional": false,
383
+ "isSpread": false
384
+ },
385
+ {
386
+ "__schema": "ParameterSchema",
387
+ "location": {
388
+ "filePath": "code.ui.runtime.tsx",
389
+ "line": 61,
390
+ "character": 5
391
+ },
392
+ "name": "[ fileIconSlot ]",
393
+ "type": {
394
+ "__schema": "TupleTypeSchema",
395
+ "location": {
396
+ "filePath": "code.ui.runtime.tsx",
397
+ "line": 61,
398
+ "character": 21
399
+ },
400
+ "elements": [
401
+ {
402
+ "__schema": "TypeRefSchema",
403
+ "location": {
404
+ "filePath": "code.ui.runtime.tsx",
405
+ "line": 61,
406
+ "character": 22
407
+ },
408
+ "name": "FileIconSlot"
409
+ }
410
+ ]
411
+ },
412
+ "isOptional": false,
413
+ "isSpread": false
414
+ },
415
+ {
416
+ "__schema": "ParameterSchema",
417
+ "location": {
418
+ "filePath": "code.ui.runtime.tsx",
419
+ "line": 62,
420
+ "character": 5
421
+ },
422
+ "name": "harmony",
423
+ "type": {
424
+ "__schema": "TypeRefSchema",
425
+ "location": {
426
+ "filePath": "code.ui.runtime.tsx",
427
+ "line": 62,
428
+ "character": 14
429
+ },
430
+ "name": "Harmony"
431
+ },
432
+ "isOptional": false,
433
+ "isSpread": false
434
+ }
435
+ ],
436
+ "returnType": {
437
+ "__schema": "InferenceTypeSchema",
438
+ "location": {
439
+ "filePath": "code.ui.runtime.tsx",
440
+ "line": 58,
441
+ "character": 3
442
+ },
443
+ "type": "Promise<CodeUI>"
444
+ },
445
+ "modifiers": [
446
+ "static",
447
+ "async"
448
+ ]
449
+ }
450
+ ],
451
+ "extendsNodes": [],
452
+ "implementNodes": []
453
+ }
454
+ },
455
+ {
456
+ "__schema": "ExportSchema",
457
+ "location": {
458
+ "filePath": "index.ts",
459
+ "line": 3,
460
+ "character": 23
461
+ },
462
+ "signature": "type FileIconSlot = SlotRegistry<FileIconMatch[]>",
463
+ "name": "FileIconSlot",
464
+ "exportNode": {
465
+ "__schema": "TypeSchema",
466
+ "location": {
467
+ "filePath": "code.ui.runtime.tsx",
468
+ "line": 17,
469
+ "character": 1
470
+ },
471
+ "signature": "type FileIconSlot = SlotRegistry<FileIconMatch[]>",
472
+ "name": "FileIconSlot",
473
+ "type": {
474
+ "__schema": "TypeRefSchema",
475
+ "location": {
476
+ "filePath": "code.ui.runtime.tsx",
477
+ "line": 17,
478
+ "character": 28
479
+ },
480
+ "name": "SlotRegistry",
481
+ "typeArgs": [
482
+ {
483
+ "__schema": "TypeArraySchema",
484
+ "location": {
485
+ "filePath": "code.ui.runtime.tsx",
486
+ "line": 17,
487
+ "character": 41
488
+ },
489
+ "type": {
490
+ "__schema": "TypeRefSchema",
491
+ "location": {
492
+ "filePath": "code.ui.runtime.tsx",
493
+ "line": 17,
494
+ "character": 41
495
+ },
496
+ "name": "FileIconMatch"
497
+ }
498
+ }
499
+ ]
500
+ }
501
+ }
502
+ },
503
+ {
504
+ "__schema": "ExportSchema",
505
+ "location": {
506
+ "filePath": "index.ts",
507
+ "line": 4,
508
+ "character": 10
509
+ },
510
+ "signature": "const CodeAspect: Aspect",
511
+ "name": "CodeAspect",
512
+ "exportNode": {
513
+ "__schema": "VariableLikeSchema",
514
+ "location": {
515
+ "filePath": "code.aspect.ts",
516
+ "line": 3,
517
+ "character": 14
518
+ },
519
+ "signature": "const CodeAspect: Aspect",
520
+ "name": "CodeAspect",
521
+ "type": {
522
+ "__schema": "TypeRefSchema",
523
+ "location": {
524
+ "filePath": "code.aspect.ts",
525
+ "line": 3,
526
+ "character": 14
527
+ },
528
+ "name": "Aspect",
529
+ "componentId": {
530
+ "scope": "teambit.harmony",
531
+ "name": "harmony",
532
+ "version": "0.4.6"
533
+ }
534
+ },
535
+ "isOptional": false,
536
+ "defaultValue": "Aspect.create({\n id: 'teambit.component/code',\n dependencies: [],\n defaultConfig: {},\n})"
537
+ }
538
+ },
539
+ {
540
+ "__schema": "UnImplementedSchema",
541
+ "location": {
542
+ "filePath": "index.ts",
543
+ "line": 5,
544
+ "character": 16
545
+ },
546
+ "name": "CodeAspect",
547
+ "type": "Identifier"
548
+ }
549
+ ],
550
+ "internals": []
551
+ },
552
+ "internals": [
553
+ {
554
+ "__schema": "ModuleSchema",
555
+ "location": {
556
+ "filePath": "code.ui.runtime.tsx",
557
+ "line": 1,
558
+ "character": 1
559
+ },
560
+ "exports": [
561
+ {
562
+ "__schema": "TypeSchema",
563
+ "location": {
564
+ "filePath": "code.ui.runtime.tsx",
565
+ "line": 17,
566
+ "character": 1
567
+ },
568
+ "signature": "type FileIconSlot = SlotRegistry<FileIconMatch[]>",
569
+ "name": "FileIconSlot",
570
+ "type": {
571
+ "__schema": "TypeRefSchema",
572
+ "location": {
573
+ "filePath": "code.ui.runtime.tsx",
574
+ "line": 17,
575
+ "character": 28
576
+ },
577
+ "name": "SlotRegistry",
578
+ "typeArgs": [
579
+ {
580
+ "__schema": "TypeArraySchema",
581
+ "location": {
582
+ "filePath": "code.ui.runtime.tsx",
583
+ "line": 17,
584
+ "character": 41
585
+ },
586
+ "type": {
587
+ "__schema": "TypeRefSchema",
588
+ "location": {
589
+ "filePath": "code.ui.runtime.tsx",
590
+ "line": 17,
591
+ "character": 41
592
+ },
593
+ "name": "FileIconMatch"
594
+ }
595
+ }
596
+ ]
597
+ }
598
+ },
599
+ {
600
+ "__schema": "ClassSchema",
601
+ "location": {
602
+ "filePath": "code.ui.runtime.tsx",
603
+ "line": 23,
604
+ "character": 1
605
+ },
606
+ "doc": {
607
+ "__schema": "DocSchema",
608
+ "location": {
609
+ "filePath": "code.ui.runtime.tsx",
610
+ "line": 19,
611
+ "character": 1
612
+ },
613
+ "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 */",
614
+ "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.",
615
+ "tags": [
616
+ {
617
+ "__schema": "TagSchema",
618
+ "location": {
619
+ "filePath": "code.ui.runtime.tsx",
620
+ "line": 21,
621
+ "character": 5
622
+ },
623
+ "tagName": "example",
624
+ "comment": "CodeUI.registerEnvFileIcon([\n (fileName) => (/your-regexp/.test(fileName) ? 'your.icon.url' : undefined),\n]);\n"
625
+ }
626
+ ]
627
+ },
628
+ "signature": "class CodeUI",
629
+ "name": "CodeUI",
630
+ "members": [
631
+ {
632
+ "__schema": "ConstructorSchema",
633
+ "location": {
634
+ "filePath": "code.ui.runtime.tsx",
635
+ "line": 24,
636
+ "character": 3
637
+ },
638
+ "signature": "constructor CodeUI(host: string, fileIconSlot?: FileIconSlot | undefined): CodeUI",
639
+ "name": "constructor",
640
+ "params": [
641
+ {
642
+ "__schema": "ParameterSchema",
643
+ "location": {
644
+ "filePath": "code.ui.runtime.tsx",
645
+ "line": 28,
646
+ "character": 5
647
+ },
648
+ "name": "host",
649
+ "type": {
650
+ "__schema": "KeywordTypeSchema",
651
+ "location": {
652
+ "filePath": "code.ui.runtime.tsx",
653
+ "line": 28,
654
+ "character": 19
655
+ },
656
+ "name": "string"
657
+ },
658
+ "isOptional": false,
659
+ "isSpread": false
660
+ },
661
+ {
662
+ "__schema": "ParameterSchema",
663
+ "location": {
664
+ "filePath": "code.ui.runtime.tsx",
665
+ "line": 29,
666
+ "character": 5
667
+ },
668
+ "name": "fileIconSlot",
669
+ "type": {
670
+ "__schema": "TypeRefSchema",
671
+ "location": {
672
+ "filePath": "code.ui.runtime.tsx",
673
+ "line": 29,
674
+ "character": 28
675
+ },
676
+ "name": "FileIconSlot"
677
+ },
678
+ "isOptional": true,
679
+ "isSpread": false
680
+ }
681
+ ],
682
+ "returnType": {
683
+ "__schema": "ThisTypeSchema",
684
+ "location": {
685
+ "filePath": "code.ui.runtime.tsx",
686
+ "line": 23,
687
+ "character": 1
688
+ },
689
+ "name": "CodeUI"
690
+ },
691
+ "modifiers": []
692
+ },
693
+ {
694
+ "__schema": "VariableLikeSchema",
695
+ "location": {
696
+ "filePath": "code.ui.runtime.tsx",
697
+ "line": 32,
698
+ "character": 3
699
+ },
700
+ "signature": "(property) CodeUI.getCodePage: (props?: Partial<CodePageProps>) => React.JSX.Element",
701
+ "name": "getCodePage",
702
+ "type": {
703
+ "__schema": "InferenceTypeSchema",
704
+ "location": {
705
+ "filePath": "code.ui.runtime.tsx",
706
+ "line": 32,
707
+ "character": 3
708
+ },
709
+ "type": "(props?: Partial<CodePageProps>) => React.JSX.Element"
710
+ },
711
+ "isOptional": true,
712
+ "defaultValue": "(props?: Partial<CodePageProps>) => {\n return <CodePage {...(props || {})} fileIconSlot={this.fileIconSlot} host={this.host} />;\n }"
713
+ },
714
+ {
715
+ "__schema": "VariableLikeSchema",
716
+ "location": {
717
+ "filePath": "code.ui.runtime.tsx",
718
+ "line": 36,
719
+ "character": 3
720
+ },
721
+ "signature": "(property) CodeUI.getCodeCompare: (props?: Partial<CodeCompareProps>) => React.JSX.Element",
722
+ "name": "getCodeCompare",
723
+ "type": {
724
+ "__schema": "InferenceTypeSchema",
725
+ "location": {
726
+ "filePath": "code.ui.runtime.tsx",
727
+ "line": 36,
728
+ "character": 3
729
+ },
730
+ "type": "(props?: Partial<CodeCompareProps>) => React.JSX.Element"
731
+ },
732
+ "isOptional": true,
733
+ "defaultValue": "(props?: Partial<CodeCompareProps>) => {\n return (\n <CodeCompareEditorProvider>\n <CodeCompare {...(props || {})} fileIconSlot={this.fileIconSlot} />\n </CodeCompareEditorProvider>\n );\n }"
734
+ },
735
+ {
736
+ "__schema": "VariableLikeSchema",
737
+ "location": {
738
+ "filePath": "code.ui.runtime.tsx",
739
+ "line": 44,
740
+ "character": 3
741
+ },
742
+ "signature": "(property) CodeUI.getCodeEditorProvider: () => React.FC<CodeEditorProviderProps>",
743
+ "name": "getCodeEditorProvider",
744
+ "type": {
745
+ "__schema": "InferenceTypeSchema",
746
+ "location": {
747
+ "filePath": "code.ui.runtime.tsx",
748
+ "line": 44,
749
+ "character": 3
750
+ },
751
+ "type": "() => React.FC<CodeEditorProviderProps>"
752
+ },
753
+ "isOptional": true,
754
+ "defaultValue": "() => CodeEditorProvider"
755
+ },
756
+ {
757
+ "__schema": "VariableLikeSchema",
758
+ "location": {
759
+ "filePath": "code.ui.runtime.tsx",
760
+ "line": 45,
761
+ "character": 3
762
+ },
763
+ "signature": "(property) CodeUI.getCodeDiffEditorProvider: () => React.FC<CodeCompareEditorProviderProps>",
764
+ "name": "getCodeDiffEditorProvider",
765
+ "type": {
766
+ "__schema": "InferenceTypeSchema",
767
+ "location": {
768
+ "filePath": "code.ui.runtime.tsx",
769
+ "line": 45,
770
+ "character": 3
771
+ },
772
+ "type": "() => React.FC<CodeCompareEditorProviderProps>"
773
+ },
774
+ "isOptional": true,
775
+ "defaultValue": "() => CodeCompareEditorProvider"
776
+ },
777
+ {
778
+ "__schema": "FunctionLikeSchema",
779
+ "location": {
780
+ "filePath": "code.ui.runtime.tsx",
781
+ "line": 47,
782
+ "character": 3
783
+ },
784
+ "signature": "(method) CodeUI.registerEnvFileIcon(icons: FileIconMatch[]): this",
785
+ "name": "registerEnvFileIcon",
786
+ "params": [
787
+ {
788
+ "__schema": "ParameterSchema",
789
+ "location": {
790
+ "filePath": "code.ui.runtime.tsx",
791
+ "line": 47,
792
+ "character": 23
793
+ },
794
+ "name": "icons",
795
+ "type": {
796
+ "__schema": "TypeArraySchema",
797
+ "location": {
798
+ "filePath": "code.ui.runtime.tsx",
799
+ "line": 47,
800
+ "character": 30
801
+ },
802
+ "type": {
803
+ "__schema": "TypeRefSchema",
804
+ "location": {
805
+ "filePath": "code.ui.runtime.tsx",
806
+ "line": 47,
807
+ "character": 30
808
+ },
809
+ "name": "FileIconMatch"
810
+ }
811
+ },
812
+ "isOptional": false,
813
+ "isSpread": false
814
+ }
815
+ ],
816
+ "returnType": {
817
+ "__schema": "TypeRefSchema",
818
+ "location": {
819
+ "filePath": "code.ui.runtime.tsx",
820
+ "line": 47,
821
+ "character": 3
822
+ },
823
+ "name": "CodeUI"
824
+ },
825
+ "modifiers": []
826
+ },
827
+ {
828
+ "__schema": "VariableLikeSchema",
829
+ "location": {
830
+ "filePath": "code.ui.runtime.tsx",
831
+ "line": 52,
832
+ "character": 3
833
+ },
834
+ "signature": "(property) CodeUI.dependencies: Aspect[]",
835
+ "name": "dependencies",
836
+ "type": {
837
+ "__schema": "InferenceTypeSchema",
838
+ "location": {
839
+ "filePath": "code.ui.runtime.tsx",
840
+ "line": 52,
841
+ "character": 3
842
+ },
843
+ "type": "Aspect[]"
844
+ },
845
+ "isOptional": true,
846
+ "defaultValue": "[ComponentAspect, ComponentCompareAspect]"
847
+ },
848
+ {
849
+ "__schema": "VariableLikeSchema",
850
+ "location": {
851
+ "filePath": "code.ui.runtime.tsx",
852
+ "line": 54,
853
+ "character": 3
854
+ },
855
+ "signature": "(property) CodeUI.runtime: RuntimeDefinition",
856
+ "name": "runtime",
857
+ "type": {
858
+ "__schema": "InferenceTypeSchema",
859
+ "location": {
860
+ "filePath": "code.ui.runtime.tsx",
861
+ "line": 54,
862
+ "character": 3
863
+ },
864
+ "type": "RuntimeDefinition"
865
+ },
866
+ "isOptional": true,
867
+ "defaultValue": "UIRuntime"
868
+ },
869
+ {
870
+ "__schema": "VariableLikeSchema",
871
+ "location": {
872
+ "filePath": "code.ui.runtime.tsx",
873
+ "line": 56,
874
+ "character": 3
875
+ },
876
+ "signature": "(property) CodeUI.slots: ((registerFn: () => string) => SlotRegistry<string>)[]",
877
+ "name": "slots",
878
+ "type": {
879
+ "__schema": "InferenceTypeSchema",
880
+ "location": {
881
+ "filePath": "code.ui.runtime.tsx",
882
+ "line": 56,
883
+ "character": 3
884
+ },
885
+ "type": "((registerFn: () => string) => SlotRegistry<string>)[]"
886
+ },
887
+ "isOptional": true,
888
+ "defaultValue": "[Slot.withType<string>()]"
889
+ },
890
+ {
891
+ "__schema": "FunctionLikeSchema",
892
+ "location": {
893
+ "filePath": "code.ui.runtime.tsx",
894
+ "line": 58,
895
+ "character": 3
896
+ },
897
+ "signature": "(method) CodeUI.provider([component, componentCompare]: [ComponentUI, ComponentCompareUI], _: any, [fileIconSlot]: [FileIconSlot], harmony: Harmony): Promise<CodeUI>",
898
+ "name": "provider",
899
+ "params": [
900
+ {
901
+ "__schema": "ParameterSchema",
902
+ "location": {
903
+ "filePath": "code.ui.runtime.tsx",
904
+ "line": 59,
905
+ "character": 5
906
+ },
907
+ "name": "[ component, componentCompare ]",
908
+ "type": {
909
+ "__schema": "TupleTypeSchema",
910
+ "location": {
911
+ "filePath": "code.ui.runtime.tsx",
912
+ "line": 59,
913
+ "character": 36
914
+ },
915
+ "elements": [
916
+ {
917
+ "__schema": "TypeRefSchema",
918
+ "location": {
919
+ "filePath": "code.ui.runtime.tsx",
920
+ "line": 59,
921
+ "character": 37
922
+ },
923
+ "name": "ComponentUI"
924
+ },
925
+ {
926
+ "__schema": "TypeRefSchema",
927
+ "location": {
928
+ "filePath": "code.ui.runtime.tsx",
929
+ "line": 59,
930
+ "character": 50
931
+ },
932
+ "name": "ComponentCompareUI"
933
+ }
934
+ ]
935
+ },
936
+ "isOptional": false,
937
+ "isSpread": false
938
+ },
939
+ {
940
+ "__schema": "ParameterSchema",
941
+ "location": {
942
+ "filePath": "code.ui.runtime.tsx",
943
+ "line": 60,
944
+ "character": 5
945
+ },
946
+ "name": "_",
947
+ "type": {
948
+ "__schema": "InferenceTypeSchema",
949
+ "location": {
950
+ "filePath": "code.ui.runtime.tsx",
951
+ "line": 60,
952
+ "character": 5
953
+ },
954
+ "type": "any"
955
+ },
956
+ "isOptional": false,
957
+ "isSpread": false
958
+ },
959
+ {
960
+ "__schema": "ParameterSchema",
961
+ "location": {
962
+ "filePath": "code.ui.runtime.tsx",
963
+ "line": 61,
964
+ "character": 5
965
+ },
966
+ "name": "[ fileIconSlot ]",
967
+ "type": {
968
+ "__schema": "TupleTypeSchema",
969
+ "location": {
970
+ "filePath": "code.ui.runtime.tsx",
971
+ "line": 61,
972
+ "character": 21
973
+ },
974
+ "elements": [
975
+ {
976
+ "__schema": "TypeRefSchema",
977
+ "location": {
978
+ "filePath": "code.ui.runtime.tsx",
979
+ "line": 61,
980
+ "character": 22
981
+ },
982
+ "name": "FileIconSlot"
983
+ }
984
+ ]
985
+ },
986
+ "isOptional": false,
987
+ "isSpread": false
988
+ },
989
+ {
990
+ "__schema": "ParameterSchema",
991
+ "location": {
992
+ "filePath": "code.ui.runtime.tsx",
993
+ "line": 62,
994
+ "character": 5
995
+ },
996
+ "name": "harmony",
997
+ "type": {
998
+ "__schema": "TypeRefSchema",
999
+ "location": {
1000
+ "filePath": "code.ui.runtime.tsx",
1001
+ "line": 62,
1002
+ "character": 14
1003
+ },
1004
+ "name": "Harmony"
1005
+ },
1006
+ "isOptional": false,
1007
+ "isSpread": false
1008
+ }
1009
+ ],
1010
+ "returnType": {
1011
+ "__schema": "InferenceTypeSchema",
1012
+ "location": {
1013
+ "filePath": "code.ui.runtime.tsx",
1014
+ "line": 58,
1015
+ "character": 3
1016
+ },
1017
+ "type": "Promise<CodeUI>"
1018
+ },
1019
+ "modifiers": [
1020
+ "static",
1021
+ "async"
1022
+ ]
1023
+ }
1024
+ ],
1025
+ "extendsNodes": [],
1026
+ "implementNodes": []
1027
+ }
1028
+ ],
1029
+ "internals": [
1030
+ {
1031
+ "__schema": "ModuleSchema",
1032
+ "location": {
1033
+ "filePath": "code.ui.runtime.tsx",
1034
+ "line": 15,
1035
+ "character": 1
1036
+ },
1037
+ "exports": [
1038
+ {
1039
+ "__schema": "VariableLikeSchema",
1040
+ "location": {
1041
+ "filePath": "code.ui.runtime.tsx",
1042
+ "line": 15,
1043
+ "character": 7
1044
+ },
1045
+ "signature": "const isTsx: RegExp",
1046
+ "name": "isTsx",
1047
+ "type": {
1048
+ "__schema": "InferenceTypeSchema",
1049
+ "location": {
1050
+ "filePath": "code.ui.runtime.tsx",
1051
+ "line": 15,
1052
+ "character": 7
1053
+ },
1054
+ "type": "RegExp"
1055
+ },
1056
+ "isOptional": false,
1057
+ "defaultValue": "/\\.tsx$/"
1058
+ }
1059
+ ],
1060
+ "internals": []
1061
+ },
1062
+ {
1063
+ "__schema": "UnImplementedSchema",
1064
+ "location": {
1065
+ "filePath": "code.ui.runtime.tsx",
1066
+ "line": 82,
1067
+ "character": 1
1068
+ },
1069
+ "name": "CodeAspect.addRuntime(CodeUI);",
1070
+ "type": "ExpressionStatement"
1071
+ }
1072
+ ]
1073
+ },
1074
+ {
1075
+ "__schema": "ModuleSchema",
1076
+ "location": {
1077
+ "filePath": "code.aspect.ts",
1078
+ "line": 1,
1079
+ "character": 1
1080
+ },
1081
+ "exports": [
1082
+ {
1083
+ "__schema": "VariableLikeSchema",
1084
+ "location": {
1085
+ "filePath": "code.aspect.ts",
1086
+ "line": 3,
1087
+ "character": 14
1088
+ },
1089
+ "signature": "const CodeAspect: Aspect",
1090
+ "name": "CodeAspect",
1091
+ "type": {
1092
+ "__schema": "TypeRefSchema",
1093
+ "location": {
1094
+ "filePath": "code.aspect.ts",
1095
+ "line": 3,
1096
+ "character": 14
1097
+ },
1098
+ "name": "Aspect",
1099
+ "componentId": {
1100
+ "scope": "teambit.harmony",
1101
+ "name": "harmony",
1102
+ "version": "0.4.6"
1103
+ }
1104
+ },
1105
+ "isOptional": false,
1106
+ "defaultValue": "Aspect.create({\n id: 'teambit.component/code',\n dependencies: [],\n defaultConfig: {},\n})"
1107
+ },
1108
+ {
1109
+ "__schema": "UnImplementedSchema",
1110
+ "location": {
1111
+ "filePath": "code.aspect.ts",
1112
+ "line": 9,
1113
+ "character": 16
1114
+ },
1115
+ "name": "CodeAspect",
1116
+ "type": "Identifier"
1117
+ }
1118
+ ],
1119
+ "internals": []
1120
+ }
1121
+ ],
1122
+ "componentId": {
1123
+ "scope": "teambit.component",
1124
+ "name": "code",
1125
+ "version": "1.0.513"
1126
+ },
1127
+ "taggedModuleExports": []
1128
+ }
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_code@1.0.512/dist/code.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_code@1.0.512/dist/code.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_code@1.0.513/dist/code.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_code@1.0.513/dist/code.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/code",
3
- "version": "1.0.512",
3
+ "version": "1.0.513",
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.512"
9
+ "version": "1.0.513"
10
10
  },
11
11
  "dependencies": {
12
12
  "@teambit/harmony": "0.4.6",
@@ -14,12 +14,12 @@
14
14
  "@teambit/base-ui.constants.storage": "1.0.0",
15
15
  "@teambit/code.ui.code-compare-section": "0.0.5",
16
16
  "@teambit/code.ui.utils.get-file-icon": "0.0.496",
17
- "@teambit/component": "1.0.512",
18
- "@teambit/code.ui.code-compare": "0.0.318",
17
+ "@teambit/component": "1.0.513",
18
+ "@teambit/code.ui.code-compare": "0.0.319",
19
19
  "@teambit/code.ui.code-editor": "0.0.13",
20
20
  "@teambit/code.ui.code-tab-page": "0.0.655",
21
- "@teambit/component-compare": "1.0.512",
22
- "@teambit/ui": "1.0.512"
21
+ "@teambit/component-compare": "1.0.513",
22
+ "@teambit/ui": "1.0.513"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/mocha": "9.1.0",