@teambit/code 1.0.512 → 1.0.514

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