@teambit/code 1.0.157 → 1.0.159

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
- <testsuites>
3
- <testsuite name="teambit.component/code@1.0.157" tests="0" failures="0" errors="0" skipped="0"/>
2
+ <testsuites tests="0" failures="0" errors="0" skipped="0">
3
+ <testsuite name="teambit.component/code@1.0.159" 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={3483:(e,t,o)=>{var n={id:"teambit.component/code@1.0.157",homepage:"https://bit.cloud/teambit/component/code",exported:!0};function r(){const e=i(o(87363));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},87363: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(3483);o(87363);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={31516:(e,t,o)=>{var n={id:"teambit.component/code@1.0.159",homepage:"https://bit.cloud/teambit/component/code",exported:!0};function r(){const e=i(o(6376));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},6376: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(31516);o(6376);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,1098 @@
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
+ }
228
+ },
229
+ "isOptional": false,
230
+ "isSpread": false
231
+ }
232
+ ],
233
+ "returnType": {
234
+ "__schema": "TypeRefSchema",
235
+ "location": {
236
+ "filePath": "code.ui.runtime.tsx",
237
+ "line": 47,
238
+ "character": 3
239
+ },
240
+ "name": "CodeUI"
241
+ },
242
+ "modifiers": []
243
+ },
244
+ {
245
+ "__schema": "VariableLikeSchema",
246
+ "location": {
247
+ "filePath": "code.ui.runtime.tsx",
248
+ "line": 52,
249
+ "character": 3
250
+ },
251
+ "signature": "(property) CodeUI.dependencies: Aspect[]",
252
+ "name": "dependencies",
253
+ "type": {
254
+ "__schema": "InferenceTypeSchema",
255
+ "location": {
256
+ "filePath": "code.ui.runtime.tsx",
257
+ "line": 52,
258
+ "character": 3
259
+ },
260
+ "type": "Aspect[]"
261
+ },
262
+ "isOptional": true,
263
+ "defaultValue": "[ComponentAspect, ComponentCompareAspect]"
264
+ },
265
+ {
266
+ "__schema": "VariableLikeSchema",
267
+ "location": {
268
+ "filePath": "code.ui.runtime.tsx",
269
+ "line": 54,
270
+ "character": 3
271
+ },
272
+ "signature": "(property) CodeUI.runtime: RuntimeDefinition",
273
+ "name": "runtime",
274
+ "type": {
275
+ "__schema": "InferenceTypeSchema",
276
+ "location": {
277
+ "filePath": "code.ui.runtime.tsx",
278
+ "line": 54,
279
+ "character": 3
280
+ },
281
+ "type": "RuntimeDefinition"
282
+ },
283
+ "isOptional": true,
284
+ "defaultValue": "UIRuntime"
285
+ },
286
+ {
287
+ "__schema": "VariableLikeSchema",
288
+ "location": {
289
+ "filePath": "code.ui.runtime.tsx",
290
+ "line": 56,
291
+ "character": 3
292
+ },
293
+ "signature": "(property) CodeUI.slots: ((registerFn: () => string) => SlotRegistry<string>)[]",
294
+ "name": "slots",
295
+ "type": {
296
+ "__schema": "InferenceTypeSchema",
297
+ "location": {
298
+ "filePath": "code.ui.runtime.tsx",
299
+ "line": 56,
300
+ "character": 3
301
+ },
302
+ "type": "((registerFn: () => string) => SlotRegistry<string>)[]"
303
+ },
304
+ "isOptional": true,
305
+ "defaultValue": "[Slot.withType<string>()]"
306
+ },
307
+ {
308
+ "__schema": "FunctionLikeSchema",
309
+ "location": {
310
+ "filePath": "code.ui.runtime.tsx",
311
+ "line": 58,
312
+ "character": 3
313
+ },
314
+ "signature": "(method) CodeUI.provider([component, componentCompare]: [ComponentUI, ComponentCompareUI], _: any, [fileIconSlot]: [FileIconSlot], harmony: Harmony): Promise<CodeUI>",
315
+ "name": "provider",
316
+ "params": [
317
+ {
318
+ "__schema": "ParameterSchema",
319
+ "location": {
320
+ "filePath": "code.ui.runtime.tsx",
321
+ "line": 59,
322
+ "character": 5
323
+ },
324
+ "name": "[ component, componentCompare ]",
325
+ "type": {
326
+ "__schema": "TupleTypeSchema",
327
+ "location": {
328
+ "filePath": "code.ui.runtime.tsx",
329
+ "line": 59,
330
+ "character": 36
331
+ },
332
+ "elements": [
333
+ {
334
+ "__schema": "TypeRefSchema",
335
+ "location": {
336
+ "filePath": "code.ui.runtime.tsx",
337
+ "line": 59,
338
+ "character": 37
339
+ },
340
+ "name": "ComponentUI"
341
+ },
342
+ {
343
+ "__schema": "TypeRefSchema",
344
+ "location": {
345
+ "filePath": "code.ui.runtime.tsx",
346
+ "line": 59,
347
+ "character": 50
348
+ },
349
+ "name": "ComponentCompareUI"
350
+ }
351
+ ]
352
+ },
353
+ "isOptional": false,
354
+ "isSpread": false
355
+ },
356
+ {
357
+ "__schema": "ParameterSchema",
358
+ "location": {
359
+ "filePath": "code.ui.runtime.tsx",
360
+ "line": 60,
361
+ "character": 5
362
+ },
363
+ "name": "_",
364
+ "type": {
365
+ "__schema": "InferenceTypeSchema",
366
+ "location": {
367
+ "filePath": "code.ui.runtime.tsx",
368
+ "line": 60,
369
+ "character": 5
370
+ },
371
+ "type": "any"
372
+ },
373
+ "isOptional": false,
374
+ "isSpread": false
375
+ },
376
+ {
377
+ "__schema": "ParameterSchema",
378
+ "location": {
379
+ "filePath": "code.ui.runtime.tsx",
380
+ "line": 61,
381
+ "character": 5
382
+ },
383
+ "name": "[ fileIconSlot ]",
384
+ "type": {
385
+ "__schema": "TupleTypeSchema",
386
+ "location": {
387
+ "filePath": "code.ui.runtime.tsx",
388
+ "line": 61,
389
+ "character": 21
390
+ },
391
+ "elements": [
392
+ {
393
+ "__schema": "TypeRefSchema",
394
+ "location": {
395
+ "filePath": "code.ui.runtime.tsx",
396
+ "line": 61,
397
+ "character": 22
398
+ },
399
+ "name": "FileIconSlot"
400
+ }
401
+ ]
402
+ },
403
+ "isOptional": false,
404
+ "isSpread": false
405
+ },
406
+ {
407
+ "__schema": "ParameterSchema",
408
+ "location": {
409
+ "filePath": "code.ui.runtime.tsx",
410
+ "line": 62,
411
+ "character": 5
412
+ },
413
+ "name": "harmony",
414
+ "type": {
415
+ "__schema": "TypeRefSchema",
416
+ "location": {
417
+ "filePath": "code.ui.runtime.tsx",
418
+ "line": 62,
419
+ "character": 14
420
+ },
421
+ "name": "Harmony"
422
+ },
423
+ "isOptional": false,
424
+ "isSpread": false
425
+ }
426
+ ],
427
+ "returnType": {
428
+ "__schema": "InferenceTypeSchema",
429
+ "location": {
430
+ "filePath": "code.ui.runtime.tsx",
431
+ "line": 58,
432
+ "character": 3
433
+ },
434
+ "type": "Promise<CodeUI>"
435
+ },
436
+ "modifiers": [
437
+ "static",
438
+ "async"
439
+ ]
440
+ }
441
+ ],
442
+ "extendsNodes": [],
443
+ "implementNodes": []
444
+ },
445
+ {
446
+ "__schema": "TypeSchema",
447
+ "location": {
448
+ "filePath": "code.ui.runtime.tsx",
449
+ "line": 17,
450
+ "character": 1
451
+ },
452
+ "signature": "type FileIconSlot = SlotRegistry<FileIconMatch[]>",
453
+ "name": "FileIconSlot",
454
+ "type": {
455
+ "__schema": "TypeRefSchema",
456
+ "location": {
457
+ "filePath": "code.ui.runtime.tsx",
458
+ "line": 17,
459
+ "character": 28
460
+ },
461
+ "name": "SlotRegistry",
462
+ "typeArgs": [
463
+ {
464
+ "__schema": "TypeArraySchema",
465
+ "location": {
466
+ "filePath": "code.ui.runtime.tsx",
467
+ "line": 17,
468
+ "character": 41
469
+ },
470
+ "type": {
471
+ "__schema": "TypeRefSchema",
472
+ "location": {
473
+ "filePath": "code.ui.runtime.tsx",
474
+ "line": 17,
475
+ "character": 41
476
+ },
477
+ "name": "FileIconMatch"
478
+ }
479
+ }
480
+ ]
481
+ }
482
+ },
483
+ {
484
+ "__schema": "VariableLikeSchema",
485
+ "location": {
486
+ "filePath": "code.aspect.ts",
487
+ "line": 3,
488
+ "character": 14
489
+ },
490
+ "signature": "const CodeAspect: Aspect",
491
+ "name": "CodeAspect",
492
+ "type": {
493
+ "__schema": "TypeRefSchema",
494
+ "location": {
495
+ "filePath": "code.aspect.ts",
496
+ "line": 3,
497
+ "character": 14
498
+ },
499
+ "name": "Aspect",
500
+ "componentId": {
501
+ "scope": "teambit.harmony",
502
+ "name": "harmony",
503
+ "version": "0.4.6"
504
+ }
505
+ },
506
+ "isOptional": false,
507
+ "defaultValue": "Aspect.create({\n id: 'teambit.component/code',\n dependencies: [],\n defaultConfig: {},\n})"
508
+ },
509
+ {
510
+ "__schema": "UnImplementedSchema",
511
+ "location": {
512
+ "filePath": "index.ts",
513
+ "line": 5,
514
+ "character": 16
515
+ },
516
+ "name": "CodeAspect",
517
+ "type": "Identifier"
518
+ }
519
+ ],
520
+ "internals": []
521
+ },
522
+ "internals": [
523
+ {
524
+ "__schema": "ModuleSchema",
525
+ "location": {
526
+ "filePath": "code.ui.runtime.tsx",
527
+ "line": 1,
528
+ "character": 1
529
+ },
530
+ "exports": [
531
+ {
532
+ "__schema": "TypeSchema",
533
+ "location": {
534
+ "filePath": "code.ui.runtime.tsx",
535
+ "line": 17,
536
+ "character": 1
537
+ },
538
+ "signature": "type FileIconSlot = SlotRegistry<FileIconMatch[]>",
539
+ "name": "FileIconSlot",
540
+ "type": {
541
+ "__schema": "TypeRefSchema",
542
+ "location": {
543
+ "filePath": "code.ui.runtime.tsx",
544
+ "line": 17,
545
+ "character": 28
546
+ },
547
+ "name": "SlotRegistry",
548
+ "typeArgs": [
549
+ {
550
+ "__schema": "TypeArraySchema",
551
+ "location": {
552
+ "filePath": "code.ui.runtime.tsx",
553
+ "line": 17,
554
+ "character": 41
555
+ },
556
+ "type": {
557
+ "__schema": "TypeRefSchema",
558
+ "location": {
559
+ "filePath": "code.ui.runtime.tsx",
560
+ "line": 17,
561
+ "character": 41
562
+ },
563
+ "name": "FileIconMatch"
564
+ }
565
+ }
566
+ ]
567
+ }
568
+ },
569
+ {
570
+ "__schema": "ClassSchema",
571
+ "location": {
572
+ "filePath": "code.ui.runtime.tsx",
573
+ "line": 23,
574
+ "character": 1
575
+ },
576
+ "doc": {
577
+ "__schema": "DocSchema",
578
+ "location": {
579
+ "filePath": "code.ui.runtime.tsx",
580
+ "line": 19,
581
+ "character": 1
582
+ },
583
+ "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 */",
584
+ "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.",
585
+ "tags": [
586
+ {
587
+ "__schema": "TagSchema",
588
+ "location": {
589
+ "filePath": "code.ui.runtime.tsx",
590
+ "line": 21,
591
+ "character": 5
592
+ },
593
+ "tagName": "example",
594
+ "comment": "CodeUI.registerEnvFileIcon([\n (fileName) => (/your-regexp/.test(fileName) ? 'your.icon.url' : undefined),\n]);\n"
595
+ }
596
+ ]
597
+ },
598
+ "signature": "class CodeUI",
599
+ "name": "CodeUI",
600
+ "members": [
601
+ {
602
+ "__schema": "ConstructorSchema",
603
+ "location": {
604
+ "filePath": "code.ui.runtime.tsx",
605
+ "line": 24,
606
+ "character": 3
607
+ },
608
+ "signature": "constructor CodeUI(host: string, fileIconSlot?: FileIconSlot): CodeUI",
609
+ "name": "constructor",
610
+ "params": [
611
+ {
612
+ "__schema": "ParameterSchema",
613
+ "location": {
614
+ "filePath": "code.ui.runtime.tsx",
615
+ "line": 28,
616
+ "character": 5
617
+ },
618
+ "name": "host",
619
+ "type": {
620
+ "__schema": "KeywordTypeSchema",
621
+ "location": {
622
+ "filePath": "code.ui.runtime.tsx",
623
+ "line": 28,
624
+ "character": 19
625
+ },
626
+ "name": "string"
627
+ },
628
+ "isOptional": false,
629
+ "isSpread": false
630
+ },
631
+ {
632
+ "__schema": "ParameterSchema",
633
+ "location": {
634
+ "filePath": "code.ui.runtime.tsx",
635
+ "line": 29,
636
+ "character": 5
637
+ },
638
+ "name": "fileIconSlot",
639
+ "type": {
640
+ "__schema": "TypeRefSchema",
641
+ "location": {
642
+ "filePath": "code.ui.runtime.tsx",
643
+ "line": 29,
644
+ "character": 28
645
+ },
646
+ "name": "FileIconSlot"
647
+ },
648
+ "isOptional": true,
649
+ "isSpread": false
650
+ }
651
+ ],
652
+ "returnType": {
653
+ "__schema": "ThisTypeSchema",
654
+ "location": {
655
+ "filePath": "code.ui.runtime.tsx",
656
+ "line": 23,
657
+ "character": 1
658
+ },
659
+ "name": "CodeUI"
660
+ },
661
+ "modifiers": []
662
+ },
663
+ {
664
+ "__schema": "VariableLikeSchema",
665
+ "location": {
666
+ "filePath": "code.ui.runtime.tsx",
667
+ "line": 32,
668
+ "character": 3
669
+ },
670
+ "signature": "(property) CodeUI.getCodePage: (props?: Partial<CodePageProps>) => React.JSX.Element",
671
+ "name": "getCodePage",
672
+ "type": {
673
+ "__schema": "InferenceTypeSchema",
674
+ "location": {
675
+ "filePath": "code.ui.runtime.tsx",
676
+ "line": 32,
677
+ "character": 3
678
+ },
679
+ "type": "(props?: Partial<CodePageProps>) => React.JSX.Element"
680
+ },
681
+ "isOptional": true,
682
+ "defaultValue": "(props?: Partial<CodePageProps>) => {\n return <CodePage {...(props || {})} fileIconSlot={this.fileIconSlot} host={this.host} />;\n }"
683
+ },
684
+ {
685
+ "__schema": "VariableLikeSchema",
686
+ "location": {
687
+ "filePath": "code.ui.runtime.tsx",
688
+ "line": 36,
689
+ "character": 3
690
+ },
691
+ "signature": "(property) CodeUI.getCodeCompare: (props?: Partial<CodeCompareProps>) => React.JSX.Element",
692
+ "name": "getCodeCompare",
693
+ "type": {
694
+ "__schema": "InferenceTypeSchema",
695
+ "location": {
696
+ "filePath": "code.ui.runtime.tsx",
697
+ "line": 36,
698
+ "character": 3
699
+ },
700
+ "type": "(props?: Partial<CodeCompareProps>) => React.JSX.Element"
701
+ },
702
+ "isOptional": true,
703
+ "defaultValue": "(props?: Partial<CodeCompareProps>) => {\n return (\n <CodeCompareEditorProvider>\n <CodeCompare {...(props || {})} fileIconSlot={this.fileIconSlot} />\n </CodeCompareEditorProvider>\n );\n }"
704
+ },
705
+ {
706
+ "__schema": "VariableLikeSchema",
707
+ "location": {
708
+ "filePath": "code.ui.runtime.tsx",
709
+ "line": 44,
710
+ "character": 3
711
+ },
712
+ "signature": "(property) CodeUI.getCodeEditorProvider: () => React.FC<CodeEditorProviderProps>",
713
+ "name": "getCodeEditorProvider",
714
+ "type": {
715
+ "__schema": "InferenceTypeSchema",
716
+ "location": {
717
+ "filePath": "code.ui.runtime.tsx",
718
+ "line": 44,
719
+ "character": 3
720
+ },
721
+ "type": "() => React.FC<CodeEditorProviderProps>"
722
+ },
723
+ "isOptional": true,
724
+ "defaultValue": "() => CodeEditorProvider"
725
+ },
726
+ {
727
+ "__schema": "VariableLikeSchema",
728
+ "location": {
729
+ "filePath": "code.ui.runtime.tsx",
730
+ "line": 45,
731
+ "character": 3
732
+ },
733
+ "signature": "(property) CodeUI.getCodeDiffEditorProvider: () => React.FC<CodeCompareEditorProviderProps>",
734
+ "name": "getCodeDiffEditorProvider",
735
+ "type": {
736
+ "__schema": "InferenceTypeSchema",
737
+ "location": {
738
+ "filePath": "code.ui.runtime.tsx",
739
+ "line": 45,
740
+ "character": 3
741
+ },
742
+ "type": "() => React.FC<CodeCompareEditorProviderProps>"
743
+ },
744
+ "isOptional": true,
745
+ "defaultValue": "() => CodeCompareEditorProvider"
746
+ },
747
+ {
748
+ "__schema": "FunctionLikeSchema",
749
+ "location": {
750
+ "filePath": "code.ui.runtime.tsx",
751
+ "line": 47,
752
+ "character": 3
753
+ },
754
+ "signature": "(method) CodeUI.registerEnvFileIcon(icons: FileIconMatch[]): this",
755
+ "name": "registerEnvFileIcon",
756
+ "params": [
757
+ {
758
+ "__schema": "ParameterSchema",
759
+ "location": {
760
+ "filePath": "code.ui.runtime.tsx",
761
+ "line": 47,
762
+ "character": 23
763
+ },
764
+ "name": "icons",
765
+ "type": {
766
+ "__schema": "TypeArraySchema",
767
+ "location": {
768
+ "filePath": "code.ui.runtime.tsx",
769
+ "line": 47,
770
+ "character": 30
771
+ },
772
+ "type": {
773
+ "__schema": "TypeRefSchema",
774
+ "location": {
775
+ "filePath": "code.ui.runtime.tsx",
776
+ "line": 47,
777
+ "character": 30
778
+ },
779
+ "name": "FileIconMatch"
780
+ }
781
+ },
782
+ "isOptional": false,
783
+ "isSpread": false
784
+ }
785
+ ],
786
+ "returnType": {
787
+ "__schema": "TypeRefSchema",
788
+ "location": {
789
+ "filePath": "code.ui.runtime.tsx",
790
+ "line": 47,
791
+ "character": 3
792
+ },
793
+ "name": "CodeUI"
794
+ },
795
+ "modifiers": []
796
+ },
797
+ {
798
+ "__schema": "VariableLikeSchema",
799
+ "location": {
800
+ "filePath": "code.ui.runtime.tsx",
801
+ "line": 52,
802
+ "character": 3
803
+ },
804
+ "signature": "(property) CodeUI.dependencies: Aspect[]",
805
+ "name": "dependencies",
806
+ "type": {
807
+ "__schema": "InferenceTypeSchema",
808
+ "location": {
809
+ "filePath": "code.ui.runtime.tsx",
810
+ "line": 52,
811
+ "character": 3
812
+ },
813
+ "type": "Aspect[]"
814
+ },
815
+ "isOptional": true,
816
+ "defaultValue": "[ComponentAspect, ComponentCompareAspect]"
817
+ },
818
+ {
819
+ "__schema": "VariableLikeSchema",
820
+ "location": {
821
+ "filePath": "code.ui.runtime.tsx",
822
+ "line": 54,
823
+ "character": 3
824
+ },
825
+ "signature": "(property) CodeUI.runtime: RuntimeDefinition",
826
+ "name": "runtime",
827
+ "type": {
828
+ "__schema": "InferenceTypeSchema",
829
+ "location": {
830
+ "filePath": "code.ui.runtime.tsx",
831
+ "line": 54,
832
+ "character": 3
833
+ },
834
+ "type": "RuntimeDefinition"
835
+ },
836
+ "isOptional": true,
837
+ "defaultValue": "UIRuntime"
838
+ },
839
+ {
840
+ "__schema": "VariableLikeSchema",
841
+ "location": {
842
+ "filePath": "code.ui.runtime.tsx",
843
+ "line": 56,
844
+ "character": 3
845
+ },
846
+ "signature": "(property) CodeUI.slots: ((registerFn: () => string) => SlotRegistry<string>)[]",
847
+ "name": "slots",
848
+ "type": {
849
+ "__schema": "InferenceTypeSchema",
850
+ "location": {
851
+ "filePath": "code.ui.runtime.tsx",
852
+ "line": 56,
853
+ "character": 3
854
+ },
855
+ "type": "((registerFn: () => string) => SlotRegistry<string>)[]"
856
+ },
857
+ "isOptional": true,
858
+ "defaultValue": "[Slot.withType<string>()]"
859
+ },
860
+ {
861
+ "__schema": "FunctionLikeSchema",
862
+ "location": {
863
+ "filePath": "code.ui.runtime.tsx",
864
+ "line": 58,
865
+ "character": 3
866
+ },
867
+ "signature": "(method) CodeUI.provider([component, componentCompare]: [ComponentUI, ComponentCompareUI], _: any, [fileIconSlot]: [FileIconSlot], harmony: Harmony): Promise<CodeUI>",
868
+ "name": "provider",
869
+ "params": [
870
+ {
871
+ "__schema": "ParameterSchema",
872
+ "location": {
873
+ "filePath": "code.ui.runtime.tsx",
874
+ "line": 59,
875
+ "character": 5
876
+ },
877
+ "name": "[ component, componentCompare ]",
878
+ "type": {
879
+ "__schema": "TupleTypeSchema",
880
+ "location": {
881
+ "filePath": "code.ui.runtime.tsx",
882
+ "line": 59,
883
+ "character": 36
884
+ },
885
+ "elements": [
886
+ {
887
+ "__schema": "TypeRefSchema",
888
+ "location": {
889
+ "filePath": "code.ui.runtime.tsx",
890
+ "line": 59,
891
+ "character": 37
892
+ },
893
+ "name": "ComponentUI"
894
+ },
895
+ {
896
+ "__schema": "TypeRefSchema",
897
+ "location": {
898
+ "filePath": "code.ui.runtime.tsx",
899
+ "line": 59,
900
+ "character": 50
901
+ },
902
+ "name": "ComponentCompareUI"
903
+ }
904
+ ]
905
+ },
906
+ "isOptional": false,
907
+ "isSpread": false
908
+ },
909
+ {
910
+ "__schema": "ParameterSchema",
911
+ "location": {
912
+ "filePath": "code.ui.runtime.tsx",
913
+ "line": 60,
914
+ "character": 5
915
+ },
916
+ "name": "_",
917
+ "type": {
918
+ "__schema": "InferenceTypeSchema",
919
+ "location": {
920
+ "filePath": "code.ui.runtime.tsx",
921
+ "line": 60,
922
+ "character": 5
923
+ },
924
+ "type": "any"
925
+ },
926
+ "isOptional": false,
927
+ "isSpread": false
928
+ },
929
+ {
930
+ "__schema": "ParameterSchema",
931
+ "location": {
932
+ "filePath": "code.ui.runtime.tsx",
933
+ "line": 61,
934
+ "character": 5
935
+ },
936
+ "name": "[ fileIconSlot ]",
937
+ "type": {
938
+ "__schema": "TupleTypeSchema",
939
+ "location": {
940
+ "filePath": "code.ui.runtime.tsx",
941
+ "line": 61,
942
+ "character": 21
943
+ },
944
+ "elements": [
945
+ {
946
+ "__schema": "TypeRefSchema",
947
+ "location": {
948
+ "filePath": "code.ui.runtime.tsx",
949
+ "line": 61,
950
+ "character": 22
951
+ },
952
+ "name": "FileIconSlot"
953
+ }
954
+ ]
955
+ },
956
+ "isOptional": false,
957
+ "isSpread": false
958
+ },
959
+ {
960
+ "__schema": "ParameterSchema",
961
+ "location": {
962
+ "filePath": "code.ui.runtime.tsx",
963
+ "line": 62,
964
+ "character": 5
965
+ },
966
+ "name": "harmony",
967
+ "type": {
968
+ "__schema": "TypeRefSchema",
969
+ "location": {
970
+ "filePath": "code.ui.runtime.tsx",
971
+ "line": 62,
972
+ "character": 14
973
+ },
974
+ "name": "Harmony"
975
+ },
976
+ "isOptional": false,
977
+ "isSpread": false
978
+ }
979
+ ],
980
+ "returnType": {
981
+ "__schema": "InferenceTypeSchema",
982
+ "location": {
983
+ "filePath": "code.ui.runtime.tsx",
984
+ "line": 58,
985
+ "character": 3
986
+ },
987
+ "type": "Promise<CodeUI>"
988
+ },
989
+ "modifiers": [
990
+ "static",
991
+ "async"
992
+ ]
993
+ }
994
+ ],
995
+ "extendsNodes": [],
996
+ "implementNodes": []
997
+ }
998
+ ],
999
+ "internals": [
1000
+ {
1001
+ "__schema": "ModuleSchema",
1002
+ "location": {
1003
+ "filePath": "code.ui.runtime.tsx",
1004
+ "line": 15,
1005
+ "character": 1
1006
+ },
1007
+ "exports": [
1008
+ {
1009
+ "__schema": "VariableLikeSchema",
1010
+ "location": {
1011
+ "filePath": "code.ui.runtime.tsx",
1012
+ "line": 15,
1013
+ "character": 7
1014
+ },
1015
+ "signature": "const isTsx: RegExp",
1016
+ "name": "isTsx",
1017
+ "type": {
1018
+ "__schema": "InferenceTypeSchema",
1019
+ "location": {
1020
+ "filePath": "code.ui.runtime.tsx",
1021
+ "line": 15,
1022
+ "character": 7
1023
+ },
1024
+ "type": "RegExp"
1025
+ },
1026
+ "isOptional": false,
1027
+ "defaultValue": "/\\.tsx$/"
1028
+ }
1029
+ ],
1030
+ "internals": []
1031
+ },
1032
+ {
1033
+ "__schema": "UnImplementedSchema",
1034
+ "location": {
1035
+ "filePath": "code.ui.runtime.tsx",
1036
+ "line": 82,
1037
+ "character": 1
1038
+ },
1039
+ "name": "CodeAspect.addRuntime(CodeUI);",
1040
+ "type": "ExpressionStatement"
1041
+ }
1042
+ ]
1043
+ },
1044
+ {
1045
+ "__schema": "ModuleSchema",
1046
+ "location": {
1047
+ "filePath": "code.aspect.ts",
1048
+ "line": 1,
1049
+ "character": 1
1050
+ },
1051
+ "exports": [
1052
+ {
1053
+ "__schema": "VariableLikeSchema",
1054
+ "location": {
1055
+ "filePath": "code.aspect.ts",
1056
+ "line": 3,
1057
+ "character": 14
1058
+ },
1059
+ "signature": "const CodeAspect: Aspect",
1060
+ "name": "CodeAspect",
1061
+ "type": {
1062
+ "__schema": "TypeRefSchema",
1063
+ "location": {
1064
+ "filePath": "code.aspect.ts",
1065
+ "line": 3,
1066
+ "character": 14
1067
+ },
1068
+ "name": "Aspect",
1069
+ "componentId": {
1070
+ "scope": "teambit.harmony",
1071
+ "name": "harmony",
1072
+ "version": "0.4.6"
1073
+ }
1074
+ },
1075
+ "isOptional": false,
1076
+ "defaultValue": "Aspect.create({\n id: 'teambit.component/code',\n dependencies: [],\n defaultConfig: {},\n})"
1077
+ },
1078
+ {
1079
+ "__schema": "UnImplementedSchema",
1080
+ "location": {
1081
+ "filePath": "code.aspect.ts",
1082
+ "line": 9,
1083
+ "character": 16
1084
+ },
1085
+ "name": "CodeAspect",
1086
+ "type": "Identifier"
1087
+ }
1088
+ ],
1089
+ "internals": []
1090
+ }
1091
+ ],
1092
+ "componentId": {
1093
+ "scope": "teambit.component",
1094
+ "name": "code",
1095
+ "version": "1.0.159"
1096
+ },
1097
+ "taggedModuleExports": []
1098
+ }
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_code@1.0.157/dist/code.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_code@1.0.157/dist/code.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_code@1.0.159/dist/code.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_code@1.0.159/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.157",
3
+ "version": "1.0.159",
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.157"
9
+ "version": "1.0.159"
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.157",
18
+ "@teambit/component": "1.0.159",
19
19
  "@teambit/code.ui.code-compare": "0.0.290",
20
20
  "@teambit/code.ui.code-tab-page": "0.0.635",
21
- "@teambit/component-compare": "1.0.157",
22
- "@teambit/ui": "1.0.157"
21
+ "@teambit/component-compare": "1.0.159",
22
+ "@teambit/ui": "1.0.159"
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.24"
27
+ "@teambit/harmony.envs.core-aspect-env": "0.0.25"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "react": "^17.0.0 || ^18.0.0",