@opensumi/ide-core-browser 3.2.2 → 3.2.3-next-1723110920.0

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.
@@ -3,4 +3,5 @@ export * from './layout-hooks';
3
3
  export * from './layout.interface';
4
4
  export * from './accordion/view-context-key.registry';
5
5
  export * from './accordion/tab-bar-toolbar';
6
+ export * from './render';
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/layout/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,uCAAuC,CAAC;AACtD,cAAc,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/layout/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,uCAAuC,CAAC;AACtD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,UAAU,CAAC"}
@@ -6,4 +6,5 @@ tslib_1.__exportStar(require("./layout-hooks"), exports);
6
6
  tslib_1.__exportStar(require("./layout.interface"), exports);
7
7
  tslib_1.__exportStar(require("./accordion/view-context-key.registry"), exports);
8
8
  tslib_1.__exportStar(require("./accordion/tab-bar-toolbar"), exports);
9
+ tslib_1.__exportStar(require("./render"), exports);
9
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/layout/index.ts"],"names":[],"mappings":";;;AAAA,mDAAyB;AACzB,yDAA+B;AAC/B,6DAAmC;AACnC,gFAAsD;AACtD,sEAA4C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/layout/index.ts"],"names":[],"mappings":";;;AAAA,mDAAyB;AACzB,yDAA+B;AAC/B,6DAAmC;AACnC,gFAAsD;AACtD,sEAA4C;AAC5C,mDAAyB"}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { View } from './layout.interface';
3
+ export declare const renderView: (view?: View) => React.JSX.Element;
4
+ //# sourceMappingURL=render.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../src/layout/render.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,eAAO,MAAM,UAAU,UAAW,IAAI,sBAMnC,CAAC"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.renderView = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const react_1 = tslib_1.__importDefault(require("react"));
6
+ const react_is_1 = tslib_1.__importDefault(require("react-is"));
7
+ const react_providers_1 = require("../react-providers");
8
+ const renderView = (view) => (react_1.default.createElement(react_1.default.Fragment, null, view && react_is_1.default.isValidElementType(view.component) ? (react_1.default.createElement(react_providers_1.ErrorBoundary, null, view.component && react_1.default.createElement(view.component, view.initialProps))) : null));
9
+ exports.renderView = renderView;
10
+ //# sourceMappingURL=render.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render.js","sourceRoot":"","sources":["../../src/layout/render.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,gEAA+B;AAE/B,wDAAmD;AAI5C,MAAM,UAAU,GAAG,CAAC,IAAW,EAAE,EAAE,CAAC,CACvC,8DACG,IAAI,IAAI,kBAAO,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CACpD,8BAAC,+BAAa,QAAE,IAAI,CAAC,SAAS,IAAI,eAAK,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,CAAiB,CAC1G,CAAC,CAAC,CAAC,IAAI,CACP,CACJ,CAAC;AANS,QAAA,UAAU,cAMnB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opensumi/ide-core-browser",
3
- "version": "3.2.2",
3
+ "version": "3.2.3-next-1723110920.0",
4
4
  "description": "@opensumi/ide-core-browser",
5
5
  "files": [
6
6
  "lib",
@@ -18,14 +18,13 @@
18
18
  "build": "tsc --build ../../configs/ts/references/tsconfig.core-browser.json"
19
19
  },
20
20
  "dependencies": {
21
- "@opensumi/ide-components": "3.2.2",
22
- "@opensumi/ide-connection": "3.2.2",
23
- "@opensumi/ide-core-common": "3.2.2",
21
+ "@opensumi/ide-components": "3.2.3-next-1723110920.0",
22
+ "@opensumi/ide-connection": "3.2.3-next-1723110920.0",
23
+ "@opensumi/ide-core-common": "3.2.3-next-1723110920.0",
24
24
  "@opensumi/vscode-debugprotocol": "1.49.0-beta.1",
25
25
  "@vscode/codicons": "0.0.35",
26
26
  "ajv": "^6.10.0",
27
27
  "classnames": "2.5.1",
28
- "font-awesome": "^4.7.0",
29
28
  "fuzzy": "^0.1.3",
30
29
  "jsonc-parser": "^2.1.0",
31
30
  "keycode": "^2.2.0",
@@ -33,9 +32,7 @@
33
32
  "mobx": "^6.12.0",
34
33
  "mobx-react-lite": "^4.0.5",
35
34
  "react": "^18.2.0",
36
- "react-autosize-textarea": "^7.0.0",
37
35
  "react-ctxmenu-trigger": "^1.0.0",
38
- "react-custom-scrollbars": "^4.2.1",
39
36
  "react-dom": "^18.2.0",
40
37
  "react-is": "^18.2.0",
41
38
  "react-window": "^1.8.5",
@@ -47,5 +44,5 @@
47
44
  "react": "^18.2.0",
48
45
  "react-dom": "^18.2.0"
49
46
  },
50
- "gitHead": "dc169e49a4dcbf4403af884d2c70d27e8e825965"
47
+ "gitHead": "7b43084fe58c7bdb577075b71f597637af77bb91"
51
48
  }
@@ -3,3 +3,4 @@ export * from './layout-hooks';
3
3
  export * from './layout.interface';
4
4
  export * from './accordion/view-context-key.registry';
5
5
  export * from './accordion/tab-bar-toolbar';
6
+ export * from './render';
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import ReactIs from 'react-is';
3
+
4
+ import { ErrorBoundary } from '../react-providers';
5
+
6
+ import { View } from './layout.interface';
7
+
8
+ export const renderView = (view?: View) => (
9
+ <>
10
+ {view && ReactIs.isValidElementType(view.component) ? (
11
+ <ErrorBoundary>{view.component && React.createElement(view.component, view.initialProps)}</ErrorBoundary>
12
+ ) : null}
13
+ </>
14
+ );