online-compiler-widget 1.0.9 → 1.0.11

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/dist/index.d.ts CHANGED
@@ -49,34 +49,34 @@ declare interface CompilationError {
49
49
  export declare class CompilerApi extends BaseAPI {
50
50
  /**
51
51
  *
52
- * @param {string} projectId
52
+ * @param {number} projectId
53
53
  * @param {CompileRequest} [compileRequest]
54
54
  * @param {*} [options] Override http request option.
55
55
  * @throws {RequiredError}
56
56
  */
57
- apiCompileProjectProjectIdCompilePost(projectId: string, compileRequest?: CompileRequest, options?: RawAxiosRequestConfig): Promise<AxiosResponse<CompileResult, any, {}>>;
57
+ apiCompileProjectProjectIdCompilePost(projectId: number, compileRequest?: CompileRequest, options?: RawAxiosRequestConfig): Promise<AxiosResponse<CompileResult, any, {}>>;
58
58
  /**
59
59
  *
60
- * @param {string} projectId
60
+ * @param {number} projectId
61
61
  * @param {RunRequest} [runRequest]
62
62
  * @param {*} [options] Override http request option.
63
63
  * @throws {RequiredError}
64
64
  */
65
- apiCompileProjectProjectIdRunPost(projectId: string, runRequest?: RunRequest, options?: RawAxiosRequestConfig): Promise<AxiosResponse<RunResult, any, {}>>;
65
+ apiCompileProjectProjectIdRunPost(projectId: number, runRequest?: RunRequest, options?: RawAxiosRequestConfig): Promise<AxiosResponse<RunResult, any, {}>>;
66
66
  /**
67
67
  *
68
- * @param {string} projectId
68
+ * @param {number} projectId
69
69
  * @param {*} [options] Override http request option.
70
70
  * @throws {RequiredError}
71
71
  */
72
- apiCompileProjectProjectIdStatusGet(projectId: string, options?: RawAxiosRequestConfig): Promise<AxiosResponse<ProcessStatus, any, {}>>;
72
+ apiCompileProjectProjectIdStatusGet(projectId: number, options?: RawAxiosRequestConfig): Promise<AxiosResponse<ProcessStatus, any, {}>>;
73
73
  /**
74
74
  *
75
- * @param {string} projectId
75
+ * @param {number} projectId
76
76
  * @param {*} [options] Override http request option.
77
77
  * @throws {RequiredError}
78
78
  */
79
- apiCompileProjectProjectIdStopPost(projectId: string, options?: RawAxiosRequestConfig): Promise<AxiosResponse<void, any, {}>>;
79
+ apiCompileProjectProjectIdStopPost(projectId: number, options?: RawAxiosRequestConfig): Promise<AxiosResponse<void, any, {}>>;
80
80
  /**
81
81
  *
82
82
  * @param {*} [options] Override http request option.
@@ -94,7 +94,7 @@ declare interface CompileResult {
94
94
  'success'?: boolean;
95
95
  'output'?: string | null;
96
96
  'errors'?: Array<CompilationError> | null;
97
- 'projectId'?: string;
97
+ 'projectId'?: number;
98
98
  'compiledAt'?: string;
99
99
  }
100
100
 
@@ -103,13 +103,13 @@ export declare const CompilerWidget: default_2.NamedExoticComponent<CompilerWidg
103
103
  export declare const CompilerWidgetNode: (props: any) => JSX.Element;
104
104
 
105
105
  declare interface CompilerWidgetProps {
106
- id: string;
106
+ id: number;
107
107
  isNew: boolean;
108
108
  data?: {
109
109
  initialFiles?: Record<string, string>;
110
110
  language?: 'csharp' | 'js';
111
111
  };
112
- setNodeHeight?: (id: string, height: number) => void;
112
+ setNodeHeight?: (id: number, height: number) => void;
113
113
  getInfo?: (info: GetInfoModel_2) => void;
114
114
  }
115
115
 
@@ -218,12 +218,11 @@ export declare class FileApi extends BaseAPI {
218
218
  /**
219
219
  *
220
220
  * @param {string} fileId
221
- * @param {string} [file]
222
221
  * @param {string} [body]
223
222
  * @param {*} [options] Override http request option.
224
223
  * @throws {RequiredError}
225
224
  */
226
- apiFilesFileIdMovePost(fileId: string, file?: string, body?: string, options?: RawAxiosRequestConfig): Promise<AxiosResponse<void, any, {}>>;
225
+ apiFilesFileIdMovePost(fileId: string, body?: string, options?: RawAxiosRequestConfig): Promise<AxiosResponse<void, any, {}>>;
227
226
  /**
228
227
  *
229
228
  * @param {string} fileId
@@ -242,27 +241,27 @@ export declare class FileApi extends BaseAPI {
242
241
  apiFilesFileIdSavePost(fileId: string, updateFileDto?: UpdateFileDto, options?: RawAxiosRequestConfig): Promise<AxiosResponse<string, any, {}>>;
243
242
  /**
244
243
  *
245
- * @param {string} projectId
244
+ * @param {number} projectId
246
245
  * @param {*} [options] Override http request option.
247
246
  * @throws {RequiredError}
248
247
  */
249
- apiFilesProjectIdGet(projectId: string, options?: RawAxiosRequestConfig): Promise<AxiosResponse<FileMetadata[], any, {}>>;
248
+ apiFilesProjectIdGet(projectId: number, options?: RawAxiosRequestConfig): Promise<AxiosResponse<FileMetadata[], any, {}>>;
250
249
  /**
251
250
  *
252
- * @param {string} projectId
251
+ * @param {number} projectId
253
252
  * @param {PathChangeRequest} [pathChangeRequest]
254
253
  * @param {*} [options] Override http request option.
255
254
  * @throws {RequiredError}
256
255
  */
257
- apiFilesProjectProjectIdChangeAllPathsPost(projectId: string, pathChangeRequest?: PathChangeRequest, options?: RawAxiosRequestConfig): Promise<AxiosResponse<void, any, {}>>;
256
+ apiFilesProjectProjectIdChangeAllPathsPost(projectId: number, pathChangeRequest?: PathChangeRequest, options?: RawAxiosRequestConfig): Promise<AxiosResponse<void, any, {}>>;
258
257
  /**
259
258
  *
260
- * @param {string} projectId
259
+ * @param {number} projectId
261
260
  * @param {CreateFileDto} [createFileDto]
262
261
  * @param {*} [options] Override http request option.
263
262
  * @throws {RequiredError}
264
263
  */
265
- apiFilesProjectProjectIdPost(projectId: string, createFileDto?: CreateFileDto, options?: RawAxiosRequestConfig): Promise<AxiosResponse<string, any, {}>>;
264
+ apiFilesProjectProjectIdPost(projectId: number, createFileDto?: CreateFileDto, options?: RawAxiosRequestConfig): Promise<AxiosResponse<string, any, {}>>;
266
265
  /**
267
266
  *
268
267
  * @param {string} fileId
@@ -289,7 +288,7 @@ declare interface FileExplorerProps {
289
288
  declare interface FileMetadata {
290
289
  'fileId'?: string;
291
290
  'fileName'?: string | null;
292
- 'projectId'?: string;
291
+ 'projectId'?: number;
293
292
  'path'?: string | null;
294
293
  'physicalPath'?: string | null;
295
294
  'existsOnDisk'?: boolean;
@@ -343,7 +342,7 @@ declare interface PathChangeRequest {
343
342
  }
344
343
 
345
344
  declare interface ProcessStatus {
346
- 'projectId'?: string;
345
+ 'projectId'?: number;
347
346
  'isRunning'?: boolean;
348
347
  'processId'?: string | null;
349
348
  'startedAt'?: string | null;
@@ -363,7 +362,7 @@ declare interface RunContainerProps {
363
362
  }
364
363
 
365
364
  declare interface RunningProjectInfo {
366
- 'projectId'?: string;
365
+ 'projectId'?: number;
367
366
  'processId'?: string | null;
368
367
  'startedAt'?: string;
369
368
  'uptime'?: string;
@@ -382,7 +381,7 @@ declare interface RunResult {
382
381
  'output'?: string | null;
383
382
  'errors'?: Array<CompilationError> | null;
384
383
  'processId'?: string | null;
385
- 'projectId'?: string;
384
+ 'projectId'?: number;
386
385
  'startedAt'?: string;
387
386
  }
388
387
 
@@ -390,14 +389,14 @@ declare interface UpdateFileDto {
390
389
  'content'?: string | null;
391
390
  }
392
391
 
393
- export declare function useCompiler(id: string, isNew: boolean, initialFiles?: Record<string, string>): {
392
+ export declare function useCompiler(id: number, isNew: boolean, initialFiles?: Record<string, string>): {
394
393
  documents: EditorDocument[];
395
394
  selectedDocument: EditorDocument | null;
396
395
  selectedId: string | null;
397
396
  setSelectedId: Dispatch<SetStateAction<string | null>>;
398
397
  setDocumentContent: (id: string, newContent: string) => void;
399
398
  addDocument: (fileName?: string, path?: string) => void;
400
- updatePath: (id: string, oldPath: string, newPath: string) => void;
399
+ updatePath: (id: number, oldPath: string, newPath: string) => void;
401
400
  updateDocPath: (fileId: string, newPath: string) => void;
402
401
  updateDocument: (id: string, patch: Partial<EditorDocument>) => void;
403
402
  deleteDocument: (id: string) => void;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { h as o, b as r, C as p, i as s, g as t, F as l, d as n, O as C, f as m, j as u, u as d } from "./index-BzPDIpqi.js";
1
+ import { h as o, b as r, C as p, i as s, g as t, F as l, d as n, O as C, f as m, j as u, u as d } from "./index-TBxGcLDr.js";
2
2
  import "@xyflow/react";
3
3
  export {
4
4
  o as CompilerApi,
@@ -1,4 +1,4 @@
1
- import { conf as t, language as e } from "./typescript-C0nuZtwN.js";
1
+ import { conf as t, language as e } from "./typescript-BcNkHkCK.js";
2
2
  const i = t, o = {
3
3
  // Set defaultToken to invalid to see what you do not tokenize yet
4
4
  defaultToken: "invalid",
@@ -1,6 +1,6 @@
1
- import { c as P, l as _, e as B } from "./index-BzPDIpqi.js";
2
- import { f as y, g as J, C as Q, H as Y, b as G, d as X, F as Z, S as $, e as K } from "./lspLanguageFeatures-cT6O1lEr.js";
3
- import { a as Ae, D as Oe, h as Ie, R as Ne, c as Le, i as Ee, j as Ue, t as De, k as Be } from "./lspLanguageFeatures-cT6O1lEr.js";
1
+ import { c as P, l as _, e as B } from "./index-TBxGcLDr.js";
2
+ import { f as y, g as J, C as Q, H as Y, b as G, d as X, F as Z, S as $, e as K } from "./lspLanguageFeatures-Rt7Ry-Qs.js";
3
+ import { a as Ae, D as Oe, h as Ie, R as Ne, c as Le, i as Ee, j as Ue, t as De, k as Be } from "./lspLanguageFeatures-Rt7Ry-Qs.js";
4
4
  const x = 2 * 60 * 1e3;
5
5
  class C {
6
6
  constructor(i) {
@@ -1,4 +1,4 @@
1
- import { l as e } from "./index-BzPDIpqi.js";
1
+ import { l as e } from "./index-TBxGcLDr.js";
2
2
  const t = [
3
3
  "area",
4
4
  "base",
@@ -1,4 +1,4 @@
1
- import { R as Ge, l as x, e as w, U as Je, M as R } from "./index-BzPDIpqi.js";
1
+ import { R as Ge, l as x, e as w, U as Je, M as R } from "./index-TBxGcLDr.js";
2
2
  var T;
3
3
  (function(e) {
4
4
  function n(i) {
@@ -1,4 +1,4 @@
1
- import { l as e } from "./index-BzPDIpqi.js";
1
+ import { l as e } from "./index-TBxGcLDr.js";
2
2
  const i = {
3
3
  comments: {
4
4
  blockComment: ["{/*", "*/}"]
@@ -1,4 +1,4 @@
1
- import { l as e } from "./index-BzPDIpqi.js";
1
+ import { l as e } from "./index-TBxGcLDr.js";
2
2
  const t = {
3
3
  comments: {
4
4
  lineComment: "#",
@@ -1,4 +1,4 @@
1
- import { l as t } from "./index-BzPDIpqi.js";
1
+ import { l as t } from "./index-TBxGcLDr.js";
2
2
  const e = [
3
3
  "area",
4
4
  "base",
@@ -1,4 +1,4 @@
1
- import { c as M, e as w, U as F, a as P, M as v, l as f, t as K, R as O } from "./index-BzPDIpqi.js";
1
+ import { c as M, e as w, U as F, a as P, M as v, l as f, t as K, R as O } from "./index-TBxGcLDr.js";
2
2
  class E {
3
3
  constructor(e, t) {
4
4
  this._modeId = e, this._defaults = t, this._worker = null, this._client = null, this._configChangeListener = this._defaults.onDidChange(() => this._stopWorker()), this._updateExtraLibsToken = 0, this._extraLibsChangeListener = this._defaults.onDidExtraLibsChange(
@@ -1,4 +1,4 @@
1
- import { l as e } from "./index-BzPDIpqi.js";
1
+ import { l as e } from "./index-TBxGcLDr.js";
2
2
  const n = {
3
3
  wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
4
4
  comments: {
@@ -1,4 +1,4 @@
1
- import { l as e } from "./index-BzPDIpqi.js";
1
+ import { l as e } from "./index-TBxGcLDr.js";
2
2
  const n = {
3
3
  comments: {
4
4
  blockComment: ["<!--", "-->"]
@@ -1,4 +1,4 @@
1
- import { l as e } from "./index-BzPDIpqi.js";
1
+ import { l as e } from "./index-TBxGcLDr.js";
2
2
  const t = {
3
3
  comments: {
4
4
  lineComment: "#"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "online-compiler-widget",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -27,6 +27,7 @@
27
27
  "dependencies": {
28
28
  "@monaco-editor/react": "^4.7.0",
29
29
  "axios": "^1.13.2",
30
+ "lucide-react": "^0.562.0",
30
31
  "monaco-editor": "^0.55.0",
31
32
  "react-icons": "^5.5.0",
32
33
  "uuid": "^13.0.0"