@opensumi/ide-file-scheme 3.7.1 → 3.7.2-next-1739848467.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preview.view.d.ts","sourceRoot":"","sources":["../../src/browser/preview.view.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAcnF,eAAO,MAAM,YAAY,EAAE,oBAAoB,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"preview.view.d.ts","sourceRoot":"","sources":["../../src/browser/preview.view.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAcnF,eAAO,MAAM,YAAY,EAAE,oBAAoB,CAAC,IAAI,CAOlD,CAAC;AAEH,eAAO,MAAM,YAAY,EAAE,oBAAoB,CAAC,IAAI,CAsBnD,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ImagePreview = exports.VideoPreview = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 = tslib_1.
|
|
5
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
6
|
const ide_core_browser_1 = require("@opensumi/ide-core-browser");
|
|
7
7
|
const static_resource_1 = require("@opensumi/ide-core-browser/lib/static-resource");
|
|
8
8
|
const style_module_less_1 = tslib_1.__importDefault(require("./style.module.less"));
|
|
@@ -13,12 +13,11 @@ const useResource = (resource) => {
|
|
|
13
13
|
src,
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
exports.VideoPreview = (0, react_1.memo)((props) => {
|
|
17
17
|
const { src } = useResource(props.resource);
|
|
18
18
|
return (react_1.default.createElement("div", { className: style_module_less_1.default.kt_video_preview },
|
|
19
|
-
react_1.default.createElement("video", {
|
|
20
|
-
};
|
|
21
|
-
exports.VideoPreview = VideoPreview;
|
|
19
|
+
react_1.default.createElement("video", { playsInline: true, controls: true, className: style_module_less_1.default.kt_video, src: src })));
|
|
20
|
+
});
|
|
22
21
|
const ImagePreview = (props) => {
|
|
23
22
|
const imgRef = react_1.default.useRef();
|
|
24
23
|
const imgContainerRef = react_1.default.useRef();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preview.view.js","sourceRoot":"","sources":["../../src/browser/preview.view.tsx"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"preview.view.js","sourceRoot":"","sources":["../../src/browser/preview.view.tsx"],"names":[],"mappings":";;;;AAAA,uDAAoC;AAEpC,iEAAuE;AACvE,oFAAuF;AAGvF,oFAAyC;AAEzC,MAAM,WAAW,GAAG,CAAC,QAAmB,EAAE,EAAE;IAC1C,MAAM,aAAa,GAAG,IAAA,gCAAa,EAAwB,uCAAqB,CAAC,CAAC;IAElF,MAAM,GAAG,GAAG,eAAK,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,qBAAqB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAE1G,OAAO;QACL,GAAG;KACJ,CAAC;AACJ,CAAC,CAAC;AAEW,QAAA,YAAY,GAA+B,IAAA,YAAI,EAAC,CAAC,KAAK,EAAE,EAAE;IACrE,MAAM,EAAE,GAAG,EAAE,GAAG,WAAW,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC5C,OAAO,CACL,uCAAK,SAAS,EAAE,2BAAM,CAAC,gBAAgB;QACrC,yCAAO,WAAW,QAAC,QAAQ,QAAC,SAAS,EAAE,2BAAM,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,GAAI,CAChE,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEI,MAAM,YAAY,GAA+B,CAAC,KAAK,EAAE,EAAE;IAChE,MAAM,MAAM,GAAG,eAAK,CAAC,MAAM,EAAoB,CAAC;IAChD,MAAM,eAAe,GAAG,eAAK,CAAC,MAAM,EAAkB,CAAC;IACvD,MAAM,EAAE,GAAG,EAAE,GAAG,WAAW,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAE5C,eAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,QAAQ,GAAG,IAAI,6BAAU,EAAE,CAAC;QAClC,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACnB,MAAM,CAAC,OAAO,CAAC,GAAG,GAAG,GAAG,CAAC;QAC3B,CAAC;QACD,OAAO,GAAG,EAAE;YACV,QAAQ,CAAC,OAAO,EAAE,CAAC;QACrB,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;IAErB,OAAO,CACL,uCAAK,SAAS,EAAE,2BAAM,CAAC,gBAAgB;QACrC,uCAAK,GAAG,EAAE,eAAsB;YAC9B,uCAAK,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,GAAG,EAAE,CAAC,GAAI,CAC7C,CACF,CACP,CAAC;AACJ,CAAC,CAAC;AAtBW,QAAA,YAAY,gBAsBvB"}
|
|
@@ -43,11 +43,15 @@
|
|
|
43
43
|
|
|
44
44
|
.kt_video_preview {
|
|
45
45
|
height: 100%;
|
|
46
|
+
display: flex;
|
|
47
|
+
justify-content: center;
|
|
48
|
+
align-items: center;
|
|
49
|
+
padding: 40px;
|
|
46
50
|
}
|
|
47
51
|
|
|
48
52
|
.kt_video {
|
|
49
|
-
width: 100%;
|
|
50
|
-
height: 100%;
|
|
53
|
+
max-width: 100%;
|
|
54
|
+
max-height: 100%;
|
|
51
55
|
}
|
|
52
56
|
|
|
53
57
|
.error-page {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opensumi/ide-file-scheme",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.2-next-1739848467.0",
|
|
4
4
|
"files": [
|
|
5
5
|
"lib",
|
|
6
6
|
"src"
|
|
@@ -17,16 +17,16 @@
|
|
|
17
17
|
"url": "git@github.com:opensumi/core.git"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@opensumi/ide-core-common": "3.7.
|
|
21
|
-
"@opensumi/ide-core-node": "3.7.
|
|
22
|
-
"@opensumi/ide-file-service": "3.7.
|
|
20
|
+
"@opensumi/ide-core-common": "3.7.2-next-1739848467.0",
|
|
21
|
+
"@opensumi/ide-core-node": "3.7.2-next-1739848467.0",
|
|
22
|
+
"@opensumi/ide-file-service": "3.7.2-next-1739848467.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@opensumi/ide-core-browser": "3.7.
|
|
26
|
-
"@opensumi/ide-dev-tool": "3.7.
|
|
27
|
-
"@opensumi/ide-editor": "3.7.
|
|
28
|
-
"@opensumi/ide-monaco": "3.7.
|
|
29
|
-
"@opensumi/ide-overlay": "3.7.
|
|
25
|
+
"@opensumi/ide-core-browser": "3.7.2-next-1739848467.0",
|
|
26
|
+
"@opensumi/ide-dev-tool": "3.7.2-next-1739848467.0",
|
|
27
|
+
"@opensumi/ide-editor": "3.7.2-next-1739848467.0",
|
|
28
|
+
"@opensumi/ide-monaco": "3.7.2-next-1739848467.0",
|
|
29
|
+
"@opensumi/ide-overlay": "3.7.2-next-1739848467.0"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "305bfb1bdf3000e2296de450972eb24f5ebbba89"
|
|
32
32
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { memo } from 'react';
|
|
2
2
|
|
|
3
3
|
import { Disposable, useInjectable } from '@opensumi/ide-core-browser';
|
|
4
4
|
import { StaticResourceService } from '@opensumi/ide-core-browser/lib/static-resource';
|
|
@@ -16,15 +16,14 @@ const useResource = (resource: IResource) => {
|
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
export const VideoPreview: ReactEditorComponent<null> = (props) => {
|
|
19
|
+
export const VideoPreview: ReactEditorComponent<null> = memo((props) => {
|
|
20
20
|
const { src } = useResource(props.resource);
|
|
21
|
-
|
|
22
21
|
return (
|
|
23
22
|
<div className={styles.kt_video_preview}>
|
|
24
|
-
<video
|
|
23
|
+
<video playsInline controls className={styles.kt_video} src={src} />
|
|
25
24
|
</div>
|
|
26
25
|
);
|
|
27
|
-
};
|
|
26
|
+
});
|
|
28
27
|
|
|
29
28
|
export const ImagePreview: ReactEditorComponent<null> = (props) => {
|
|
30
29
|
const imgRef = React.useRef<HTMLImageElement>();
|
|
@@ -43,11 +43,15 @@
|
|
|
43
43
|
|
|
44
44
|
.kt_video_preview {
|
|
45
45
|
height: 100%;
|
|
46
|
+
display: flex;
|
|
47
|
+
justify-content: center;
|
|
48
|
+
align-items: center;
|
|
49
|
+
padding: 40px;
|
|
46
50
|
}
|
|
47
51
|
|
|
48
52
|
.kt_video {
|
|
49
|
-
width: 100%;
|
|
50
|
-
height: 100%;
|
|
53
|
+
max-width: 100%;
|
|
54
|
+
max-height: 100%;
|
|
51
55
|
}
|
|
52
56
|
|
|
53
57
|
.error-page {
|