@teambit/code 1.0.228 → 1.0.230

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.228" tests="0" failures="0" errors="0" skipped="0"/>
3
+ <testsuite name="teambit.component/code@1.0.230" 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={57444:(e,t,o)=>{var n={id:"teambit.component/code@1.0.228",homepage:"https://bit.cloud/teambit/component/code",exported:!0};function r(){const e=i(o(41594));return r=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,r.__bit_component=n,i.__bit_component=n;const c=()=>r().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},r().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/code.svg"}));c.__bit_component=n,t.Logo=c},41594:e=>{e.exports=React}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{o.r(n),o.d(n,{compositions:()=>u,compositions_metadata:()=>l,overview:()=>f});var e={};o.r(e),o.d(e,{default:()=>d});var t=o(57444);o(41594);const r=MdxJsReact,i=TeambitMdxUiMdxScopeContext;var c=["components"];function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},p.apply(this,arguments)}var a={},s="wrapper";function d(e){var t=e.components,o=function(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o,n,r={},i=Object.keys(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}(e,c);return(0,r.mdx)(s,p({},a,o,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)(i.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"}))}d.isMDXComponent=!0;const u=[t],f=[e],l={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),n})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.component/code-preview"]=t():e["teambit.component/code-preview"]=t()}(self,(()=>(()=>{"use strict";var e={18932:(e,t,o)=>{var n={id:"teambit.component/code@1.0.230",homepage:"https://bit.cloud/teambit/component/code",exported:!0};function r(){const e=i(o(41594));return r=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,r.__bit_component=n,i.__bit_component=n;const c=()=>r().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},r().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/code.svg"}));c.__bit_component=n,t.Logo=c},41594:e=>{e.exports=React}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{o.r(n),o.d(n,{compositions:()=>u,compositions_metadata:()=>l,overview:()=>f});var e={};o.r(e),o.d(e,{default:()=>d});var t=o(18932);o(41594);const r=MdxJsReact,i=TeambitMdxUiMdxScopeContext;var c=["components"];function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},p.apply(this,arguments)}var a={},s="wrapper";function d(e){var t=e.components,o=function(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o,n,r={},i=Object.keys(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}(e,c);return(0,r.mdx)(s,p({},a,o,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)(i.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"}))}d.isMDXComponent=!0;const u=[t],f=[e],l={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),n})()));
@@ -223,7 +223,12 @@
223
223
  "line": 47,
224
224
  "character": 30
225
225
  },
226
- "name": "FileIconMatch"
226
+ "name": "FileIconMatch",
227
+ "componentId": {
228
+ "scope": "teambit.code",
229
+ "name": "ui/utils/get-file-icon",
230
+ "version": "0.0.495"
231
+ }
227
232
  }
228
233
  },
229
234
  "isOptional": false,
@@ -337,7 +342,11 @@
337
342
  "line": 59,
338
343
  "character": 37
339
344
  },
340
- "name": "ComponentUI"
345
+ "name": "ComponentUI",
346
+ "componentId": {
347
+ "scope": "teambit.component",
348
+ "name": "component"
349
+ }
341
350
  },
342
351
  {
343
352
  "__schema": "TypeRefSchema",
@@ -346,7 +355,11 @@
346
355
  "line": 59,
347
356
  "character": 50
348
357
  },
349
- "name": "ComponentCompareUI"
358
+ "name": "ComponentCompareUI",
359
+ "componentId": {
360
+ "scope": "teambit.component",
361
+ "name": "component-compare"
362
+ }
350
363
  }
351
364
  ]
352
365
  },
@@ -418,7 +431,12 @@
418
431
  "line": 62,
419
432
  "character": 14
420
433
  },
421
- "name": "Harmony"
434
+ "name": "Harmony",
435
+ "componentId": {
436
+ "scope": "teambit.harmony",
437
+ "name": "harmony",
438
+ "version": "0.4.6"
439
+ }
422
440
  },
423
441
  "isOptional": false,
424
442
  "isSpread": false
@@ -459,6 +477,11 @@
459
477
  "character": 28
460
478
  },
461
479
  "name": "SlotRegistry",
480
+ "componentId": {
481
+ "scope": "teambit.harmony",
482
+ "name": "harmony",
483
+ "version": "0.4.6"
484
+ },
462
485
  "typeArgs": [
463
486
  {
464
487
  "__schema": "TypeArraySchema",
@@ -474,7 +497,12 @@
474
497
  "line": 17,
475
498
  "character": 41
476
499
  },
477
- "name": "FileIconMatch"
500
+ "name": "FileIconMatch",
501
+ "componentId": {
502
+ "scope": "teambit.code",
503
+ "name": "ui/utils/get-file-icon",
504
+ "version": "0.0.495"
505
+ }
478
506
  }
479
507
  }
480
508
  ]
@@ -545,6 +573,11 @@
545
573
  "character": 28
546
574
  },
547
575
  "name": "SlotRegistry",
576
+ "componentId": {
577
+ "scope": "teambit.harmony",
578
+ "name": "harmony",
579
+ "version": "0.4.6"
580
+ },
548
581
  "typeArgs": [
549
582
  {
550
583
  "__schema": "TypeArraySchema",
@@ -560,7 +593,12 @@
560
593
  "line": 17,
561
594
  "character": 41
562
595
  },
563
- "name": "FileIconMatch"
596
+ "name": "FileIconMatch",
597
+ "componentId": {
598
+ "scope": "teambit.code",
599
+ "name": "ui/utils/get-file-icon",
600
+ "version": "0.0.495"
601
+ }
564
602
  }
565
603
  }
566
604
  ]
@@ -776,7 +814,12 @@
776
814
  "line": 47,
777
815
  "character": 30
778
816
  },
779
- "name": "FileIconMatch"
817
+ "name": "FileIconMatch",
818
+ "componentId": {
819
+ "scope": "teambit.code",
820
+ "name": "ui/utils/get-file-icon",
821
+ "version": "0.0.495"
822
+ }
780
823
  }
781
824
  },
782
825
  "isOptional": false,
@@ -890,7 +933,11 @@
890
933
  "line": 59,
891
934
  "character": 37
892
935
  },
893
- "name": "ComponentUI"
936
+ "name": "ComponentUI",
937
+ "componentId": {
938
+ "scope": "teambit.component",
939
+ "name": "component"
940
+ }
894
941
  },
895
942
  {
896
943
  "__schema": "TypeRefSchema",
@@ -899,7 +946,11 @@
899
946
  "line": 59,
900
947
  "character": 50
901
948
  },
902
- "name": "ComponentCompareUI"
949
+ "name": "ComponentCompareUI",
950
+ "componentId": {
951
+ "scope": "teambit.component",
952
+ "name": "component-compare"
953
+ }
903
954
  }
904
955
  ]
905
956
  },
@@ -971,7 +1022,12 @@
971
1022
  "line": 62,
972
1023
  "character": 14
973
1024
  },
974
- "name": "Harmony"
1025
+ "name": "Harmony",
1026
+ "componentId": {
1027
+ "scope": "teambit.harmony",
1028
+ "name": "harmony",
1029
+ "version": "0.4.6"
1030
+ }
975
1031
  },
976
1032
  "isOptional": false,
977
1033
  "isSpread": false
@@ -1092,7 +1148,7 @@
1092
1148
  "componentId": {
1093
1149
  "scope": "teambit.component",
1094
1150
  "name": "code",
1095
- "version": "1.0.228"
1151
+ "version": "1.0.230"
1096
1152
  },
1097
1153
  "taggedModuleExports": []
1098
1154
  }
@@ -0,0 +1,3 @@
1
+ import { Aspect } from '@teambit/harmony';
2
+ export declare const CodeAspect: Aspect;
3
+ export default CodeAspect;
@@ -0,0 +1 @@
1
+ export declare const Logo: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { Section } from '@teambit/component';
2
+ import type { CodeUI } from './code.ui.runtime';
3
+ export declare class CodeSection implements Section {
4
+ private codeUI;
5
+ constructor(codeUI: CodeUI);
6
+ route: {
7
+ path: string;
8
+ element: import("react/jsx-runtime").JSX.Element;
9
+ };
10
+ navigationLink: {
11
+ href: string;
12
+ children: import("react/jsx-runtime").JSX.Element;
13
+ displayName: string;
14
+ };
15
+ order: number;
16
+ }
@@ -0,0 +1,37 @@
1
+ import React from 'react';
2
+ import { ComponentUI } from '@teambit/component';
3
+ import { type CodeCompareProps } from '@teambit/code.ui.code-compare';
4
+ import { Harmony, SlotRegistry } from '@teambit/harmony';
5
+ import type { FileIconMatch } from '@teambit/code.ui.utils.get-file-icon';
6
+ import { CodePageProps } from '@teambit/code.ui.code-tab-page';
7
+ import { ComponentCompareUI } from '@teambit/component-compare';
8
+ export type FileIconSlot = SlotRegistry<FileIconMatch[]>;
9
+ /**
10
+ * Component code tab aspect. Presents the code tab page and allows to control the code tab and register specific icons for each file type.
11
+ * @example CodeUI.registerEnvFileIcon([(fileName) => (/your-regexp/.test(fileName) ? 'your.icon.url' : undefined)])
12
+ */
13
+ export declare class CodeUI {
14
+ /**
15
+ * register an icon for a specific file type. pass icon and a match method/regexp
16
+ */
17
+ private host;
18
+ private fileIconSlot?;
19
+ constructor(
20
+ /**
21
+ * register an icon for a specific file type. pass icon and a match method/regexp
22
+ */
23
+ host: string, fileIconSlot?: FileIconSlot | undefined);
24
+ getCodePage: (props?: Partial<CodePageProps>) => import("react/jsx-runtime").JSX.Element;
25
+ getCodeCompare: (props?: Partial<CodeCompareProps>) => import("react/jsx-runtime").JSX.Element;
26
+ getCodeEditorProvider: () => React.FC<{
27
+ children: React.ReactNode;
28
+ }>;
29
+ getCodeDiffEditorProvider: () => React.FC<{
30
+ children: React.ReactNode;
31
+ }>;
32
+ registerEnvFileIcon(icons: FileIconMatch[]): this;
33
+ static dependencies: import("@teambit/harmony").Aspect[];
34
+ static runtime: import("@teambit/harmony").RuntimeDefinition;
35
+ static slots: ((registerFn: () => string) => SlotRegistry<string>)[];
36
+ static provider([component, componentCompare]: [ComponentUI, ComponentCompareUI], _: any, [fileIconSlot]: [FileIconSlot], harmony: Harmony): Promise<CodeUI>;
37
+ }
@@ -0,0 +1,4 @@
1
+ import { CodeAspect } from './code.aspect';
2
+ export type { CodeUI, FileIconSlot } from './code.ui.runtime';
3
+ export { CodeAspect };
4
+ export default CodeAspect;
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_code@1.0.228/dist/code.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_code@1.0.228/dist/code.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_code@1.0.230/dist/code.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_code@1.0.230/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.228",
3
+ "version": "1.0.230",
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.228"
9
+ "version": "1.0.230"
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.228",
18
+ "@teambit/component": "1.0.230",
19
19
  "@teambit/code.ui.code-compare": "0.0.298",
20
20
  "@teambit/code.ui.code-tab-page": "0.0.641",
21
- "@teambit/component-compare": "1.0.228",
22
- "@teambit/ui": "1.0.228"
21
+ "@teambit/component-compare": "1.0.230",
22
+ "@teambit/ui": "1.0.230"
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.30"
27
+ "@teambit/harmony.envs.core-aspect-env": "0.0.33"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "react": "^17.0.0 || ^18.0.0",
package/tsconfig.json CHANGED
@@ -20,8 +20,7 @@
20
20
  "emitDeclarationOnly": true,
21
21
  "strict": true,
22
22
  "strictPropertyInitialization": false,
23
- "noImplicitAny": false,
24
- "composite": true
23
+ "noImplicitAny": false
25
24
  },
26
25
  "exclude": [
27
26
  "artifacts",
@@ -36,16 +35,5 @@
36
35
  "include": [
37
36
  "**/*",
38
37
  "**/*.json"
39
- ],
40
- "references": [
41
- {
42
- "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@1.0.228"
43
- },
44
- {
45
- "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component-compare@1.0.228"
46
- },
47
- {
48
- "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.ui-foundation_ui@1.0.228"
49
- }
50
38
  ]
51
39
  }