@teambit/code 1.0.1079 → 1.0.1081

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.
@@ -13,6 +13,10 @@ import type { ComponentCompareUI } from '@teambit/component-compare';
13
13
  import { ComponentCompareAspect } from '@teambit/component-compare';
14
14
  import { CodeEditorProvider } from '@teambit/code.ui.code-editor';
15
15
  import { CodeCompareSection } from '@teambit/code.ui.code-compare-section';
16
+ import { InlineCodeCompare } from '@teambit/code.ui.inline-code-compare';
17
+ import { InlineDepsCompare } from '@teambit/code.ui.inline-deps-compare';
18
+ import { InlineTestsCompare } from '@teambit/code.ui.inline-tests-compare';
19
+ import { InlineConfigCompare } from '@teambit/code.ui.inline-config-compare';
16
20
  import { CodeAspect } from './code.aspect';
17
21
  import { CodeSection } from './code.section';
18
22
 
@@ -80,6 +84,21 @@ export class CodeUI {
80
84
  const codeCompare = new CodeCompareSection(ui);
81
85
  componentCompare.registerNavigation(codeCompare);
82
86
  componentCompare.registerRoutes([codeCompare.route]);
87
+ // Inline-compare tabs for the redesigned ComponentComparePage / lane-compare. Owned here by the
88
+ // code aspect (canonical owner of the `@teambit/code.ui.*` compare panels) instead of being
89
+ // hardcoded in component-compare — that keeps component-compare decoupled from code UI, and
90
+ // pulls these panels into a bundle only via aspects that actually use them.
91
+ componentCompare.registerCompareTab([
92
+ { id: 'inline-code', order: 1, displayName: 'Code', element: <InlineCodeCompare /> },
93
+ { id: 'inline-deps', order: 4, displayName: 'Dependencies', element: <InlineDepsCompare /> },
94
+ // lazy: the tests view isn't even enabled in the lane-compare toolbar today — mounting it per
95
+ // component only fires its data queries for a panel nobody can see.
96
+ { id: 'inline-tests', order: 5, displayName: 'Tests', element: <InlineTestsCompare />, lazy: true },
97
+ // lazy: the config panel fires two `no-cache` aspect queries per component the moment it mounts —
98
+ // defer that network work until the Configuration view is actually opened. The config sidebar
99
+ // tree is unaffected: it's fed centrally from the bulk compare data, not by this panel.
100
+ { id: 'inline-config', order: 6, displayName: 'Configuration', element: <InlineConfigCompare />, lazy: true },
101
+ ]);
83
102
  return ui;
84
103
  }
85
104
  }
@@ -74,6 +74,34 @@ function _codeUi4() {
74
74
  };
75
75
  return data;
76
76
  }
77
+ function _codeUi5() {
78
+ const data = require("@teambit/code.ui.inline-code-compare");
79
+ _codeUi5 = function () {
80
+ return data;
81
+ };
82
+ return data;
83
+ }
84
+ function _codeUi6() {
85
+ const data = require("@teambit/code.ui.inline-deps-compare");
86
+ _codeUi6 = function () {
87
+ return data;
88
+ };
89
+ return data;
90
+ }
91
+ function _codeUi7() {
92
+ const data = require("@teambit/code.ui.inline-tests-compare");
93
+ _codeUi7 = function () {
94
+ return data;
95
+ };
96
+ return data;
97
+ }
98
+ function _codeUi8() {
99
+ const data = require("@teambit/code.ui.inline-config-compare");
100
+ _codeUi8 = function () {
101
+ return data;
102
+ };
103
+ return data;
104
+ }
77
105
  function _code() {
78
106
  const data = require("./code.aspect");
79
107
  _code = function () {
@@ -140,6 +168,40 @@ class CodeUI {
140
168
  const codeCompare = new (_codeUi4().CodeCompareSection)(ui);
141
169
  componentCompare.registerNavigation(codeCompare);
142
170
  componentCompare.registerRoutes([codeCompare.route]);
171
+ // Inline-compare tabs for the redesigned ComponentComparePage / lane-compare. Owned here by the
172
+ // code aspect (canonical owner of the `@teambit/code.ui.*` compare panels) instead of being
173
+ // hardcoded in component-compare — that keeps component-compare decoupled from code UI, and
174
+ // pulls these panels into a bundle only via aspects that actually use them.
175
+ componentCompare.registerCompareTab([{
176
+ id: 'inline-code',
177
+ order: 1,
178
+ displayName: 'Code',
179
+ element: /*#__PURE__*/_react().default.createElement(_codeUi5().InlineCodeCompare, null)
180
+ }, {
181
+ id: 'inline-deps',
182
+ order: 4,
183
+ displayName: 'Dependencies',
184
+ element: /*#__PURE__*/_react().default.createElement(_codeUi6().InlineDepsCompare, null)
185
+ },
186
+ // lazy: the tests view isn't even enabled in the lane-compare toolbar today — mounting it per
187
+ // component only fires its data queries for a panel nobody can see.
188
+ {
189
+ id: 'inline-tests',
190
+ order: 5,
191
+ displayName: 'Tests',
192
+ element: /*#__PURE__*/_react().default.createElement(_codeUi7().InlineTestsCompare, null),
193
+ lazy: true
194
+ },
195
+ // lazy: the config panel fires two `no-cache` aspect queries per component the moment it mounts —
196
+ // defer that network work until the Configuration view is actually opened. The config sidebar
197
+ // tree is unaffected: it's fed centrally from the bulk compare data, not by this panel.
198
+ {
199
+ id: 'inline-config',
200
+ order: 6,
201
+ displayName: 'Configuration',
202
+ element: /*#__PURE__*/_react().default.createElement(_codeUi8().InlineConfigCompare, null),
203
+ lazy: true
204
+ }]);
143
205
  return ui;
144
206
  }
145
207
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_react","data","_interopRequireDefault","require","_component","_ui","_codeUi","_harmony","_baseUiConstants","_codeUi2","_componentCompare","_codeUi3","_codeUi4","_code","_code2","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","_defineProperty","_toPropertyKey","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","isTsx","CodeUI","constructor","host","fileIconSlot","props","createElement","CodePage","CodeCompareEditorProvider","CodeCompare","CodeEditorProvider","registerEnvFileIcon","icons","register","provider","component","componentCompare","_","harmony","config","get","ui","section","CodeSection","pinnedSection","fileName","test","staticStorageUrl","undefined","registerRoute","route","registerWidget","navigationLink","order","registerPinnedWidget","codeCompare","CodeCompareSection","registerNavigation","registerRoutes","exports","ComponentAspect","ComponentCompareAspect","UIRuntime","Slot","withType","CodeAspect","addRuntime"],"sources":["code.ui.runtime.tsx"],"sourcesContent":["import React from 'react';\nimport type { ComponentUI } from '@teambit/component';\nimport { ComponentAspect } from '@teambit/component';\nimport { UIRuntime } from '@teambit/ui';\nimport { CodeCompare, CodeCompareEditorProvider, type CodeCompareProps } from '@teambit/code.ui.code-compare';\nimport type { Harmony, SlotRegistry } from '@teambit/harmony';\nimport { Slot } from '@teambit/harmony';\nimport type { FileIconMatch } from '@teambit/code.ui.utils.get-file-icon';\nimport { staticStorageUrl } from '@teambit/base-ui.constants.storage';\nimport type { CodePageProps } from '@teambit/code.ui.code-tab-page';\nimport { CodePage } from '@teambit/code.ui.code-tab-page';\nimport type { ComponentCompareUI } from '@teambit/component-compare';\nimport { ComponentCompareAspect } from '@teambit/component-compare';\nimport { CodeEditorProvider } from '@teambit/code.ui.code-editor';\nimport { CodeCompareSection } from '@teambit/code.ui.code-compare-section';\nimport { CodeAspect } from './code.aspect';\nimport { CodeSection } from './code.section';\n\nconst isTsx = /\\.tsx$/;\n\nexport type FileIconSlot = SlotRegistry<FileIconMatch[]>;\n\n/**\n * Component code tab aspect. Presents the code tab page and allows to control the code tab and register specific icons for each file type.\n * @example CodeUI.registerEnvFileIcon([(fileName) => (/your-regexp/.test(fileName) ? 'your.icon.url' : undefined)])\n */\nexport class CodeUI {\n constructor(\n /**\n * register an icon for a specific file type. pass icon and a match method/regexp\n */\n private host: string,\n private fileIconSlot?: FileIconSlot\n ) {}\n\n getCodePage = (props?: Partial<CodePageProps>) => {\n return <CodePage {...(props || {})} fileIconSlot={this.fileIconSlot} host={this.host} />;\n };\n\n getCodeCompare = (props?: Partial<CodeCompareProps>) => {\n return (\n <CodeCompareEditorProvider>\n <CodeCompare {...(props || {})} fileIconSlot={this.fileIconSlot} />\n </CodeCompareEditorProvider>\n );\n };\n\n getCodeEditorProvider = () => CodeEditorProvider;\n getCodeDiffEditorProvider = () => CodeCompareEditorProvider;\n\n registerEnvFileIcon(icons: FileIconMatch[]) {\n this.fileIconSlot?.register(icons);\n return this;\n }\n\n static dependencies = [ComponentAspect, ComponentCompareAspect];\n\n static runtime = UIRuntime;\n\n static slots = [Slot.withType<string>()];\n\n static async provider(\n [component, componentCompare]: [ComponentUI, ComponentCompareUI],\n _,\n [fileIconSlot]: [FileIconSlot],\n harmony: Harmony\n ) {\n const { config } = harmony;\n const host = String(config.get('teambit.harmony/bit'));\n const ui = new CodeUI(host, fileIconSlot);\n const section = new CodeSection(ui, false);\n const pinnedSection = new CodeSection(ui, true);\n // overrides the default tsx react icon with the typescript icon\n ui.registerEnvFileIcon([\n (fileName) => (isTsx.test(fileName) ? `${staticStorageUrl}/file-icons/file_type_typescript.svg` : undefined),\n ]);\n component.registerRoute([section.route]);\n component.registerWidget(section.navigationLink, section.order);\n component.registerPinnedWidget(pinnedSection.navigationLink, pinnedSection.order);\n const codeCompare = new CodeCompareSection(ui);\n componentCompare.registerNavigation(codeCompare);\n componentCompare.registerRoutes([codeCompare.route]);\n return ui;\n }\n}\n\nCodeAspect.addRuntime(CodeUI);\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,IAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,GAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,QAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,OAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAM,SAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,QAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAO,iBAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,gBAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAQ,SAAA;EAAA,MAAAR,IAAA,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AAK,CAAC;IAC/DlB,SAAS,CAACmB,oBAAoB,CAACV,aAAa,CAACQ,cAAc,EAAER,aAAa,CAACS,KAAK,CAAC;IACjF,MAAME,WAAW,GAAG,KAAIC,6BAAkB,EAACf,EAAE,CAAC;IAC9CL,gBAAgB,CAACqB,kBAAkB,CAACF,WAAW,CAAC;IAChDnB,gBAAgB,CAACsB,cAAc,CAAC,CAACH,WAAW,CAACL,KAAK,CAAC,CAAC;IACpD,OAAOT,EAAE;EACX;AACF;AAACkB,OAAA,CAAAtC,MAAA,GAAAA,MAAA;AAAAf,eAAA,CA1DYe,MAAM,kBA6BK,CAACuC,4BAAe,EAAEC,0CAAsB,CAAC;AAAAvD,eAAA,CA7BpDe,MAAM,aA+BAyC,eAAS;AAAAxD,eAAA,CA/Bfe,MAAM,WAiCF,CAAC0C,eAAI,CAACC,QAAQ,CAAS,CAAC,CAAC;AA2B1CC,kBAAU,CAACC,UAAU,CAAC7C,MAAM,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","data","_interopRequireDefault","require","_component","_ui","_codeUi","_harmony","_baseUiConstants","_codeUi2","_componentCompare","_codeUi3","_codeUi4","_codeUi5","_codeUi6","_codeUi7","_codeUi8","_code","_code2","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","_defineProperty","_toPropertyKey","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","isTsx","CodeUI","constructor","host","fileIconSlot","props","createElement","CodePage","CodeCompareEditorProvider","CodeCompare","CodeEditorProvider","registerEnvFileIcon","icons","register","provider","component","componentCompare","_","harmony","config","get","ui","section","CodeSection","pinnedSection","fileName","test","staticStorageUrl","undefined","registerRoute","route","registerWidget","navigationLink","order","registerPinnedWidget","codeCompare","CodeCompareSection","registerNavigation","registerRoutes","registerCompareTab","id","displayName","element","InlineCodeCompare","InlineDepsCompare","InlineTestsCompare","lazy","InlineConfigCompare","exports","ComponentAspect","ComponentCompareAspect","UIRuntime","Slot","withType","CodeAspect","addRuntime"],"sources":["code.ui.runtime.tsx"],"sourcesContent":["import React from 'react';\nimport type { ComponentUI } from '@teambit/component';\nimport { ComponentAspect } from '@teambit/component';\nimport { UIRuntime } from '@teambit/ui';\nimport { CodeCompare, CodeCompareEditorProvider, type CodeCompareProps } from '@teambit/code.ui.code-compare';\nimport type { Harmony, SlotRegistry } from '@teambit/harmony';\nimport { Slot } from '@teambit/harmony';\nimport type { FileIconMatch } from '@teambit/code.ui.utils.get-file-icon';\nimport { staticStorageUrl } from '@teambit/base-ui.constants.storage';\nimport type { CodePageProps } from '@teambit/code.ui.code-tab-page';\nimport { CodePage } from '@teambit/code.ui.code-tab-page';\nimport type { ComponentCompareUI } from '@teambit/component-compare';\nimport { ComponentCompareAspect } from '@teambit/component-compare';\nimport { CodeEditorProvider } from '@teambit/code.ui.code-editor';\nimport { CodeCompareSection } from '@teambit/code.ui.code-compare-section';\nimport { InlineCodeCompare } from '@teambit/code.ui.inline-code-compare';\nimport { InlineDepsCompare } from '@teambit/code.ui.inline-deps-compare';\nimport { InlineTestsCompare } from '@teambit/code.ui.inline-tests-compare';\nimport { InlineConfigCompare } from '@teambit/code.ui.inline-config-compare';\nimport { CodeAspect } from './code.aspect';\nimport { CodeSection } from './code.section';\n\nconst isTsx = /\\.tsx$/;\n\nexport type FileIconSlot = SlotRegistry<FileIconMatch[]>;\n\n/**\n * Component code tab aspect. Presents the code tab page and allows to control the code tab and register specific icons for each file type.\n * @example CodeUI.registerEnvFileIcon([(fileName) => (/your-regexp/.test(fileName) ? 'your.icon.url' : undefined)])\n */\nexport class CodeUI {\n constructor(\n /**\n * register an icon for a specific file type. pass icon and a match method/regexp\n */\n private host: string,\n private fileIconSlot?: FileIconSlot\n ) {}\n\n getCodePage = (props?: Partial<CodePageProps>) => {\n return <CodePage {...(props || {})} fileIconSlot={this.fileIconSlot} host={this.host} />;\n };\n\n getCodeCompare = (props?: Partial<CodeCompareProps>) => {\n return (\n <CodeCompareEditorProvider>\n <CodeCompare {...(props || {})} fileIconSlot={this.fileIconSlot} />\n </CodeCompareEditorProvider>\n );\n };\n\n getCodeEditorProvider = () => CodeEditorProvider;\n getCodeDiffEditorProvider = () => CodeCompareEditorProvider;\n\n registerEnvFileIcon(icons: FileIconMatch[]) {\n this.fileIconSlot?.register(icons);\n return this;\n }\n\n static dependencies = [ComponentAspect, ComponentCompareAspect];\n\n static runtime = UIRuntime;\n\n static slots = [Slot.withType<string>()];\n\n static async provider(\n [component, componentCompare]: [ComponentUI, ComponentCompareUI],\n _,\n [fileIconSlot]: [FileIconSlot],\n harmony: Harmony\n ) {\n const { config } = harmony;\n const host = String(config.get('teambit.harmony/bit'));\n const ui = new CodeUI(host, fileIconSlot);\n const section = new CodeSection(ui, false);\n const pinnedSection = new CodeSection(ui, true);\n // overrides the default tsx react icon with the typescript icon\n ui.registerEnvFileIcon([\n (fileName) => (isTsx.test(fileName) ? `${staticStorageUrl}/file-icons/file_type_typescript.svg` : undefined),\n ]);\n component.registerRoute([section.route]);\n component.registerWidget(section.navigationLink, section.order);\n component.registerPinnedWidget(pinnedSection.navigationLink, pinnedSection.order);\n const codeCompare = new CodeCompareSection(ui);\n componentCompare.registerNavigation(codeCompare);\n componentCompare.registerRoutes([codeCompare.route]);\n // Inline-compare tabs for the redesigned ComponentComparePage / lane-compare. Owned here by the\n // code aspect (canonical owner of the `@teambit/code.ui.*` compare panels) instead of being\n // hardcoded in component-compare — that keeps component-compare decoupled from code UI, and\n // pulls these panels into a bundle only via aspects that actually use them.\n componentCompare.registerCompareTab([\n { id: 'inline-code', order: 1, displayName: 'Code', element: <InlineCodeCompare /> },\n { id: 'inline-deps', order: 4, displayName: 'Dependencies', element: <InlineDepsCompare /> },\n // lazy: the tests view isn't even enabled in the lane-compare toolbar today — mounting it per\n // component only fires its data queries for a panel nobody can see.\n { id: 'inline-tests', order: 5, displayName: 'Tests', element: <InlineTestsCompare />, lazy: true },\n // lazy: the config panel fires two `no-cache` aspect queries per component the moment it mounts —\n // defer that network work until the Configuration view is actually opened. The config sidebar\n // tree is unaffected: it's fed centrally from the bulk compare data, not by this panel.\n { id: 'inline-config', order: 6, displayName: 'Configuration', element: <InlineConfigCompare />, lazy: true },\n ]);\n return ui;\n }\n}\n\nCodeAspect.addRuntime(CodeUI);\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,IAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,GAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,QAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,OAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAM,SAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,QAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAO,iBAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,gBAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAQ,SAAA;EAAA,MAAAR,IAAA,GAAAE,OAAA;EAAAM,QAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAS,kBAAA;EAAA,MAAAT,IAAA,GAAAE,OAAA;EAAAO,iBAAA,YAAAA,CAAA;IAAA,OAAAT,IAAA;EAAA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IAAI,EAAE;IAAK,CAAC;IACnG;IACA;IACA;IACA;MAAEN,EAAE,EAAE,eAAe;MAAEP,KAAK,EAAE,CAAC;MAAEQ,WAAW,EAAE,eAAe;MAAEC,OAAO,eAAE1F,MAAA,GAAAqB,OAAA,CAAAiC,aAAA,CAACtC,QAAA,GAAA+E,mBAAmB,MAAE,CAAC;MAAED,IAAI,EAAE;IAAK,CAAC,CAC9G,CAAC;IACF,OAAOzB,EAAE;EACX;AACF;AAAC2B,OAAA,CAAA/C,MAAA,GAAAA,MAAA;AAAAf,eAAA,CAzEYe,MAAM,kBA6BK,CAACgD,4BAAe,EAAEC,0CAAsB,CAAC;AAAAhE,eAAA,CA7BpDe,MAAM,aA+BAkD,eAAS;AAAAjE,eAAA,CA/Bfe,MAAM,WAiCF,CAACmD,eAAI,CAACC,QAAQ,CAAS,CAAC,CAAC;AA0C1CC,kBAAU,CAACC,UAAU,CAACtD,MAAM,CAAC","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_code@1.0.1079/dist/code.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_code@1.0.1079/dist/code.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_code@1.0.1081/dist/code.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_code@1.0.1081/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,29 +1,33 @@
1
1
  {
2
2
  "name": "@teambit/code",
3
- "version": "1.0.1079",
3
+ "version": "1.0.1081",
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.1079"
9
+ "version": "1.0.1081"
10
10
  },
11
11
  "dependencies": {
12
12
  "@teambit/harmony": "0.4.12",
13
13
  "@teambit/ui-foundation.ui.menu-widget-icon": "0.0.502",
14
14
  "@teambit/base-ui.constants.storage": "1.0.0",
15
15
  "@teambit/code.ui.code-compare-section": "0.0.8",
16
- "@teambit/code.ui.code-compare": "0.0.349",
17
16
  "@teambit/code.ui.code-editor": "0.0.16",
18
17
  "@teambit/code.ui.utils.get-file-icon": "0.0.496",
19
- "@teambit/component": "1.0.1079",
20
- "@teambit/code.ui.code-tab-page": "0.0.707",
21
- "@teambit/component-compare": "1.0.1079",
22
- "@teambit/ui": "1.0.1079"
18
+ "@teambit/component": "1.0.1081",
19
+ "@teambit/code.ui.code-compare": "0.0.350",
20
+ "@teambit/code.ui.code-tab-page": "0.0.708",
21
+ "@teambit/code.ui.inline-code-compare": "0.0.2",
22
+ "@teambit/code.ui.inline-config-compare": "0.0.1",
23
+ "@teambit/code.ui.inline-deps-compare": "0.0.1",
24
+ "@teambit/code.ui.inline-tests-compare": "0.0.1",
25
+ "@teambit/component-compare": "1.0.1081",
26
+ "@teambit/ui": "1.0.1081"
23
27
  },
24
28
  "devDependencies": {
25
29
  "@types/mocha": "9.1.0",
26
- "@teambit/harmony.envs.core-aspect-env": "2.0.4"
30
+ "@teambit/harmony.envs.core-aspect-env": "2.0.3"
27
31
  },
28
32
  "peerDependencies": {
29
33
  "react": "^17.0.0 || ^18.0.0 || ^19.0.0"