superleap-code-editor 1.0.28 → 1.0.29
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.
- package/LICENSE.md +5 -0
- package/dist/{base-80a1f760-8cUWWPNm.mjs → base-80a1f760-3uSC86qP.mjs} +1 -1
- package/dist/{base-80a1f760-DvuNn8dj.js → base-80a1f760-baIqvEGs.js} +1 -1
- package/dist/components/codeEditorWrapper.d.ts +5 -2
- package/dist/components/codeEditorWrapper.d.ts.map +1 -1
- package/dist/components/editor/codeEditor.d.ts.map +1 -1
- package/dist/components/panels/fileExplorer/fileExplorer.d.ts.map +1 -1
- package/dist/components/panels/fileExplorer/fileTreeItem.d.ts.map +1 -1
- package/dist/components/panels/previewPanel.d.ts.map +1 -1
- package/dist/{consoleHook-59e792cb-B2mDKKX0.mjs → consoleHook-59e792cb-DTyfNc9e.mjs} +1 -1
- package/dist/{consoleHook-59e792cb-CHjpVIPM.js → consoleHook-59e792cb-DltSGpoO.js} +1 -1
- package/dist/hooks/useFileManager.d.ts.map +1 -1
- package/dist/{index-599aeaf7-D17dllIv.mjs → index-599aeaf7-CixW-Kvp.mjs} +3 -3
- package/dist/{index-599aeaf7-CMsCrme3.js → index-599aeaf7-dJk4uwhD.js} +1 -1
- package/dist/{index-_EyNvzPV.mjs → index-CP0XfNPR.mjs} +3 -3
- package/dist/{index-BhmxQgl2.mjs → index-CoErhMxr.mjs} +2 -2
- package/dist/{index-DLPrZKll.js → index-DJ9c7MCf.js} +1 -1
- package/dist/{index-8ukDJ4gJ.js → index-Dc0BCw-p.js} +1 -1
- package/dist/{index-XUF80T81.mjs → index-DjvBZfLw.mjs} +3610 -3603
- package/dist/{index-5_oIqttU.js → index-rug-uwoB.js} +73 -73
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/providers/fileProviders.d.ts +3 -0
- package/dist/providers/fileProviders.d.ts.map +1 -1
- package/dist/utils/fileIcons.d.ts +1 -1
- package/dist/utils/fileIcons.d.ts.map +1 -1
- package/package.json +2 -10
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as a, C as o, D as s, E as t, F as l, B as i, r as p, m as d, H as E, p as n, P as F, T, G as x, U as m, V as c, o as v, I as u, W as y, s as P, A as C, t as D, v as L, q as f, w as g, z as w, x as R, y as W, u as A } from "./index-
|
|
1
|
+
import { l as a, C as o, D as s, E as t, F as l, B as i, r as p, m as d, H as E, p as n, P as F, T, G as x, U as m, V as c, o as v, I as u, W as y, s as P, A as C, t as D, v as L, q as f, w as g, z as w, x as R, y as W, u as A } from "./index-DjvBZfLw.mjs";
|
|
2
2
|
import { Alert as I, Button as S, Splitter as U, Tooltip as V, Tree as b } from "antd";
|
|
3
3
|
export {
|
|
4
4
|
I as Alert,
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-rug-uwoB.js"),r=require("antd");exports.CodeEditor=e.CodeEditor;exports.CodeEditorWrapper=e.CodeEditorWrapper;exports.DataExplorer=e.DataExplorer;exports.EditorLayout=e.EditorLayout;exports.FileExplorer=e.FileExplorer;exports.FormCodeEditor=e.FormCodeEditor;exports.FormFileProvider=e.FormFileProvider;exports.FunctionLibrary=e.FunctionLibrary;exports.Header=e.Header;exports.Panels=e.Panels;exports.PreviewPanel=e.PreviewPanel;exports.TestRunner=e.TestRunner;exports.URLCodeEditor=e.URLCodeEditor;exports.URLFileProvider=e.URLFileProvider;exports.VERSION=e.VERSION;exports.VersionHistory=e.VersionHistory;exports.WorkflowCodeEditor=e.WorkflowCodeEditor;exports.WorkflowFileProvider=e.WorkflowFileProvider;exports.autoConvertToExplorerData=e.autoConvertToExplorerData;exports.collectAllFiles=e.collectAllFiles;exports.convertGenericDataToExplorerItem=e.convertGenericDataToExplorerItem;exports.convertObjectsToExplorerData=e.convertObjectsToExplorerData;exports.createFileProvider=e.createFileProvider;exports.createSampleExplorerData=e.createSampleExplorerData;exports.getLanguageFromExtension=e.getLanguageFromExtension;exports.mapDataTypeToExplorerType=e.mapDataTypeToExplorerType;exports.mapFieldTypeToExplorerType=e.mapFieldTypeToExplorerType;exports.useFileManager=e.useFileManager;Object.defineProperty(exports,"Alert",{enumerable:!0,get:()=>r.Alert});Object.defineProperty(exports,"Button",{enumerable:!0,get:()=>r.Button});Object.defineProperty(exports,"Splitter",{enumerable:!0,get:()=>r.Splitter});Object.defineProperty(exports,"Tooltip",{enumerable:!0,get:()=>r.Tooltip});Object.defineProperty(exports,"Tree",{enumerable:!0,get:()=>r.Tree});
|
|
@@ -50,6 +50,8 @@ export declare class ExternalFilesFileProvider implements FileProvider {
|
|
|
50
50
|
private changeJournal;
|
|
51
51
|
private contentCache;
|
|
52
52
|
private readonly PROVIDER_VERSION;
|
|
53
|
+
private readonly MAX_CACHE_SIZE;
|
|
54
|
+
private readonly MAX_CACHE_MEMORY;
|
|
53
55
|
constructor(config: CodeEditorConfig["externalFilesConfig"]);
|
|
54
56
|
getFiles(): Promise<FileNode[]>;
|
|
55
57
|
private filterDeletedFiles;
|
|
@@ -73,6 +75,7 @@ export declare class ExternalFilesFileProvider implements FileProvider {
|
|
|
73
75
|
private findFileByPath;
|
|
74
76
|
private getLanguageFromPath;
|
|
75
77
|
private getMimeTypeFromPath;
|
|
78
|
+
private manageCacheSize;
|
|
76
79
|
}
|
|
77
80
|
export declare function createFileProvider(config: CodeEditorConfig): FileProvider;
|
|
78
81
|
//# sourceMappingURL=fileProviders.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileProviders.d.ts","sourceRoot":"","sources":["../../src/providers/fileProviders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,UAAU,EACV,QAAQ,EACR,YAAY,EACb,MAAM,oBAAoB,CAAC;AA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CAAC;IAI7C,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAkB1D,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAmBxD,cAAc,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;IAkF3C,aAAa,IAAI,UAAU;IAuBrB,cAAc,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;YAwBvC,UAAU;IAuCxB,OAAO,CAAC,YAAY;IAiBpB,OAAO,CAAC,WAAW;IA6BnB,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,YAAY;IAKpB,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,mBAAmB;IAmB3B,OAAO,CAAC,mBAAmB;IAoB3B,OAAO,CAAC,eAAe;CAqBxB;AAGD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,gBAAgB,GAAG,YAAY,CAYzE"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Get the appropriate icon path for a given file name
|
|
6
6
|
* @param fileName - The name of the file
|
|
7
|
-
* @returns The
|
|
7
|
+
* @returns The data URI of the icon SVG, or null if no specific icon is available
|
|
8
8
|
*/
|
|
9
9
|
export declare const getFileIcon: (fileName: string) => string | null;
|
|
10
10
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileIcons.d.ts","sourceRoot":"","sources":["../../src/utils/fileIcons.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"fileIcons.d.ts","sourceRoot":"","sources":["../../src/utils/fileIcons.ts"],"names":[],"mappings":"AAAA;;GAEG;AAYH;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,UAAU,MAAM,KAAG,MAAM,GAAG,IAiBvD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,UAAU,MAAM,KAAG,MAGnD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,UAAU,MAAM,KAAG,OAE9C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "superleap-code-editor",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.29",
|
|
4
4
|
"description": "A flexible, reusable code editor component with multiple file handling modes",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -43,15 +43,7 @@
|
|
|
43
43
|
"url"
|
|
44
44
|
],
|
|
45
45
|
"author": "SuperLeap",
|
|
46
|
-
"license": "
|
|
47
|
-
"repository": {
|
|
48
|
-
"type": "git",
|
|
49
|
-
"url": "https://github.com/superleap/code-editor.git"
|
|
50
|
-
},
|
|
51
|
-
"bugs": {
|
|
52
|
-
"url": "https://github.com/superleap/code-editor/issues"
|
|
53
|
-
},
|
|
54
|
-
"homepage": "https://github.com/superleap/code-editor#readme",
|
|
46
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
55
47
|
"peerDependencies": {
|
|
56
48
|
"react": "^18.0.0",
|
|
57
49
|
"react-dom": "^18.0.0"
|