online-compiler-widget 1.0.11 → 1.0.12

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,6 +1,6 @@
1
- import { c as h, l as s } from "./index-TBxGcLDr.js";
2
- import { C as c, H as u, D as p, a as m, R as f, b as _, c as w, d as k, F as v, e as D, S as P, f as R, g as I } from "./lspLanguageFeatures-Rt7Ry-Qs.js";
3
- import { h as b, i as H, j as y, t as U, k as T } from "./lspLanguageFeatures-Rt7Ry-Qs.js";
1
+ import { c as h, l as s } from "./index-BPcZxg8h.js";
2
+ import { C as c, H as u, D as p, a as m, R as f, b as _, c as w, d as k, F as v, e as D, S as P, f as R, g as I } from "./lspLanguageFeatures-BuEpM3Np.js";
3
+ import { h as b, i as H, j as y, t as U, k as T } from "./lspLanguageFeatures-BuEpM3Np.js";
4
4
  const C = 2 * 60 * 1e3;
5
5
  class A {
6
6
  constructor(o) {
@@ -1,4 +1,4 @@
1
- import { l as c } from "./index-TBxGcLDr.js";
1
+ import { l as c } from "./index-BPcZxg8h.js";
2
2
  const s = [
3
3
  "assign",
4
4
  "flush",
@@ -1,4 +1,4 @@
1
- import { l as e } from "./index-TBxGcLDr.js";
1
+ import { l as e } from "./index-BPcZxg8h.js";
2
2
  const t = [
3
3
  "area",
4
4
  "base",
@@ -1,4 +1,4 @@
1
- import { l as e } from "./index-TBxGcLDr.js";
1
+ import { l as e } from "./index-BPcZxg8h.js";
2
2
  const t = [
3
3
  "area",
4
4
  "base",
@@ -1,6 +1,6 @@
1
- import { c as D, l as t } from "./index-TBxGcLDr.js";
2
- import { H as d, D as l, h as c, F as u, b as h, S as m, c as p, f as w, g as _, C as R } from "./lspLanguageFeatures-Rt7Ry-Qs.js";
3
- import { a as E, e as H, d as b, R as y, i as T, j as U, t as x, k as M } from "./lspLanguageFeatures-Rt7Ry-Qs.js";
1
+ import { c as D, l as t } from "./index-BPcZxg8h.js";
2
+ import { H as d, D as l, h as c, F as u, b as h, S as m, c as p, f as w, g as _, C as R } from "./lspLanguageFeatures-BuEpM3Np.js";
3
+ import { a as E, e as H, d as b, R as y, i as T, j as U, t as x, k as M } from "./lspLanguageFeatures-BuEpM3Np.js";
4
4
  const I = 2 * 60 * 1e3;
5
5
  class f {
6
6
  constructor(n) {
@@ -126456,7 +126456,7 @@ const aH = {
126456
126456
  lH
126457
126457
  );
126458
126458
  function cH() {
126459
- return import("./cssMode-C6z30QST.js");
126459
+ return import("./cssMode-B-O9uMfN.js");
126460
126460
  }
126461
126461
  Pe.onLanguage("less", () => {
126462
126462
  cH().then((o) => o.setupMode(ese));
@@ -126547,7 +126547,7 @@ const t0 = "html", pK = "handlebars", mK = "razor", tse = cM(
126547
126547
  lM(mK)
126548
126548
  ), dWe = nse.defaults;
126549
126549
  function hWe() {
126550
- return import("./htmlMode-CzkKS6AH.js");
126550
+ return import("./htmlMode-CvY-pj8i.js");
126551
126551
  }
126552
126552
  function cM(o, e = aM, t = lM(o)) {
126553
126553
  const i = new rWe(o, e, t);
@@ -126621,7 +126621,7 @@ const fWe = {
126621
126621
  pWe
126622
126622
  ), mWe = () => ose().then((o) => o.getWorker());
126623
126623
  function ose() {
126624
- return import("./jsonMode-BOEyVRO3.js");
126624
+ return import("./jsonMode-C70-uBhp.js");
126625
126625
  }
126626
126626
  Pe.register({
126627
126627
  id: "json",
@@ -126767,7 +126767,7 @@ const CWe = bWe, use = {
126767
126767
  use
126768
126768
  ), vWe = () => dM().then((o) => o.getTypeScriptWorker()), wWe = () => dM().then((o) => o.getJavaScriptWorker());
126769
126769
  function dM() {
126770
- return import("./tsMode-B5nLXDIj.js");
126770
+ return import("./tsMode-Bf9sGa58.js");
126771
126771
  }
126772
126772
  Pe.onLanguage("typescript", () => dM().then((o) => o.setupTypeScript(gse)));
126773
126773
  Pe.onLanguage("javascript", () => dM().then((o) => o.setupJavaScript(fse)));
@@ -126940,37 +126940,37 @@ De({
126940
126940
  id: "freemarker2",
126941
126941
  extensions: [".ftl", ".ftlh", ".ftlx"],
126942
126942
  aliases: ["FreeMarker2", "Apache FreeMarker2"],
126943
- loader: () => import("./freemarker2-DKa_Zv1U.js").then((o) => o.TagAutoInterpolationDollar)
126943
+ loader: () => import("./freemarker2-CaILaXtK.js").then((o) => o.TagAutoInterpolationDollar)
126944
126944
  });
126945
126945
  De({
126946
126946
  id: "freemarker2.tag-angle.interpolation-dollar",
126947
126947
  aliases: ["FreeMarker2 (Angle/Dollar)", "Apache FreeMarker2 (Angle/Dollar)"],
126948
- loader: () => import("./freemarker2-DKa_Zv1U.js").then((o) => o.TagAngleInterpolationDollar)
126948
+ loader: () => import("./freemarker2-CaILaXtK.js").then((o) => o.TagAngleInterpolationDollar)
126949
126949
  });
126950
126950
  De({
126951
126951
  id: "freemarker2.tag-bracket.interpolation-dollar",
126952
126952
  aliases: ["FreeMarker2 (Bracket/Dollar)", "Apache FreeMarker2 (Bracket/Dollar)"],
126953
- loader: () => import("./freemarker2-DKa_Zv1U.js").then((o) => o.TagBracketInterpolationDollar)
126953
+ loader: () => import("./freemarker2-CaILaXtK.js").then((o) => o.TagBracketInterpolationDollar)
126954
126954
  });
126955
126955
  De({
126956
126956
  id: "freemarker2.tag-angle.interpolation-bracket",
126957
126957
  aliases: ["FreeMarker2 (Angle/Bracket)", "Apache FreeMarker2 (Angle/Bracket)"],
126958
- loader: () => import("./freemarker2-DKa_Zv1U.js").then((o) => o.TagAngleInterpolationBracket)
126958
+ loader: () => import("./freemarker2-CaILaXtK.js").then((o) => o.TagAngleInterpolationBracket)
126959
126959
  });
126960
126960
  De({
126961
126961
  id: "freemarker2.tag-bracket.interpolation-bracket",
126962
126962
  aliases: ["FreeMarker2 (Bracket/Bracket)", "Apache FreeMarker2 (Bracket/Bracket)"],
126963
- loader: () => import("./freemarker2-DKa_Zv1U.js").then((o) => o.TagBracketInterpolationBracket)
126963
+ loader: () => import("./freemarker2-CaILaXtK.js").then((o) => o.TagBracketInterpolationBracket)
126964
126964
  });
126965
126965
  De({
126966
126966
  id: "freemarker2.tag-auto.interpolation-dollar",
126967
126967
  aliases: ["FreeMarker2 (Auto/Dollar)", "Apache FreeMarker2 (Auto/Dollar)"],
126968
- loader: () => import("./freemarker2-DKa_Zv1U.js").then((o) => o.TagAutoInterpolationDollar)
126968
+ loader: () => import("./freemarker2-CaILaXtK.js").then((o) => o.TagAutoInterpolationDollar)
126969
126969
  });
126970
126970
  De({
126971
126971
  id: "freemarker2.tag-auto.interpolation-bracket",
126972
126972
  aliases: ["FreeMarker2 (Auto/Bracket)", "Apache FreeMarker2 (Auto/Bracket)"],
126973
- loader: () => import("./freemarker2-DKa_Zv1U.js").then((o) => o.TagAutoInterpolationBracket)
126973
+ loader: () => import("./freemarker2-CaILaXtK.js").then((o) => o.TagAutoInterpolationBracket)
126974
126974
  });
126975
126975
  De({
126976
126976
  id: "go",
@@ -126990,7 +126990,7 @@ De({
126990
126990
  extensions: [".handlebars", ".hbs"],
126991
126991
  aliases: ["Handlebars", "handlebars", "hbs"],
126992
126992
  mimetypes: ["text/x-handlebars-template"],
126993
- loader: () => import("./handlebars-BCVtM77c.js")
126993
+ loader: () => import("./handlebars--cE9M3ST.js")
126994
126994
  });
126995
126995
  De({
126996
126996
  id: "hcl",
@@ -127003,7 +127003,7 @@ De({
127003
127003
  extensions: [".html", ".htm", ".shtml", ".xhtml", ".mdoc", ".jsp", ".asp", ".aspx", ".jshtm"],
127004
127004
  aliases: ["HTML", "htm", "html", "xhtml"],
127005
127005
  mimetypes: ["text/html", "text/x-jshtm", "text/template", "text/ng-template"],
127006
- loader: () => import("./html-BW183-uX.js")
127006
+ loader: () => import("./html-DgQA0t7L.js")
127007
127007
  });
127008
127008
  De({
127009
127009
  id: "ini",
@@ -127026,7 +127026,7 @@ De({
127026
127026
  filenames: ["jakefile"],
127027
127027
  aliases: ["JavaScript", "javascript", "js"],
127028
127028
  mimetypes: ["text/javascript"],
127029
- loader: () => import("./javascript-ChIuHybO.js")
127029
+ loader: () => import("./javascript-CSuVDS6-.js")
127030
127030
  });
127031
127031
  De({
127032
127032
  id: "julia",
@@ -127065,7 +127065,7 @@ De({
127065
127065
  extensions: [".liquid", ".html.liquid"],
127066
127066
  aliases: ["Liquid", "liquid"],
127067
127067
  mimetypes: ["application/liquid"],
127068
- loader: () => import("./liquid-DernPXSN.js")
127068
+ loader: () => import("./liquid-CQ5WulCz.js")
127069
127069
  });
127070
127070
  De({
127071
127071
  id: "m3",
@@ -127083,7 +127083,7 @@ De({
127083
127083
  id: "mdx",
127084
127084
  extensions: [".mdx"],
127085
127085
  aliases: ["MDX", "mdx"],
127086
- loader: () => import("./mdx-Bp88Nhb7.js")
127086
+ loader: () => import("./mdx-Blbs4Z61.js")
127087
127087
  });
127088
127088
  De({
127089
127089
  id: "mips",
@@ -127182,7 +127182,7 @@ De({
127182
127182
  extensions: [".py", ".rpy", ".pyw", ".cpy", ".gyp", ".gypi"],
127183
127183
  aliases: ["Python", "py"],
127184
127184
  firstLine: "^#!/.*\\bpython[0-9.-]*\\b",
127185
- loader: () => import("./python-C27YS0DX.js")
127185
+ loader: () => import("./python-Cn6McWY0.js")
127186
127186
  });
127187
127187
  De({
127188
127188
  id: "qsharp",
@@ -127201,7 +127201,7 @@ De({
127201
127201
  extensions: [".cshtml"],
127202
127202
  aliases: ["Razor", "razor"],
127203
127203
  mimetypes: ["text/x-cshtml"],
127204
- loader: () => import("./razor-s_IrYBoj.js")
127204
+ loader: () => import("./razor-CAheCe28.js")
127205
127205
  });
127206
127206
  De({
127207
127207
  id: "redis",
@@ -127333,7 +127333,7 @@ De({
127333
127333
  extensions: [".ts", ".tsx", ".cts", ".mts"],
127334
127334
  aliases: ["TypeScript", "ts", "typescript"],
127335
127335
  mimetypes: ["text/typescript"],
127336
- loader: () => import("./typescript-BcNkHkCK.js")
127336
+ loader: () => import("./typescript-CVD1rfpg.js")
127337
127337
  });
127338
127338
  De({
127339
127339
  id: "typespec",
@@ -127377,14 +127377,14 @@ De({
127377
127377
  firstLine: "(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",
127378
127378
  aliases: ["XML", "xml"],
127379
127379
  mimetypes: ["text/xml", "application/xml", "application/xaml+xml", "application/xml-dtd"],
127380
- loader: () => import("./xml-CL5jdyRa.js")
127380
+ loader: () => import("./xml-D9u1dgzn.js")
127381
127381
  });
127382
127382
  De({
127383
127383
  id: "yaml",
127384
127384
  extensions: [".yaml", ".yml"],
127385
127385
  aliases: ["YAML", "yaml", "YML", "yml"],
127386
127386
  mimetypes: ["application/x-yaml", "text/x-yaml"],
127387
- loader: () => import("./yaml-D63jmIvy.js")
127387
+ loader: () => import("./yaml-B2NZy6cE.js")
127388
127388
  });
127389
127389
  var yWe = Object.defineProperty, xWe = (o, e, t) => e in o ? yWe(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t, it = (o, e, t) => xWe(o, typeof e != "symbol" ? e + "" : e, t), EL, _K, NL, zP, TL;
127390
127390
  function LWe(o) {
@@ -128384,28 +128384,29 @@ const GWe = "MonacoEditorWrapper-module__editorContainer___cSQ9x", KWe = "Monaco
128384
128384
  code: o,
128385
128385
  language: e,
128386
128386
  onChange: t,
128387
- theme: i = "vs-light"
128387
+ theme: i = "vs-light",
128388
+ filename: n
128388
128389
  }) => {
128389
- const n = Sg(null), s = Sg(null), r = (a) => {
128390
- n.current = a;
128390
+ const s = Sg(null), r = Sg(null), a = (l) => {
128391
+ s.current = l;
128391
128392
  };
128392
128393
  return Gu(() => {
128393
- var l, c;
128394
- if (!n.current) return;
128395
- s.current && ((l = s.current) == null || l.dispose());
128396
- const a = oH.createModel(o, "csharp");
128397
- s.current = a, (c = n.current) == null || c.focus();
128394
+ var c, d;
128395
+ if (!s.current) return;
128396
+ r.current && ((c = r.current) == null || c.dispose());
128397
+ const l = oH.createModel(o, "csharp");
128398
+ r.current = l, (d = s.current) == null || d.focus();
128398
128399
  }, [o, "csharp"]), /* @__PURE__ */ be.jsxs("div", { className: kK.editorContainer, children: [
128399
- /* @__PURE__ */ be.jsx("div", { className: kK.editorHeader, children: /* @__PURE__ */ be.jsx("span", { children: e === "csharp" ? "C#" : "JS" }) }),
128400
+ /* @__PURE__ */ be.jsx("div", { className: kK.editorHeader, children: /* @__PURE__ */ be.jsx("span", { children: n }) }),
128400
128401
  /* @__PURE__ */ be.jsx(
128401
128402
  Bse,
128402
128403
  {
128403
128404
  height: "100%",
128404
128405
  language: "csharp",
128405
128406
  theme: i,
128406
- onMount: r,
128407
+ onMount: a,
128407
128408
  value: o,
128408
- onChange: (a) => t(a || ""),
128409
+ onChange: (l) => t(l || ""),
128409
128410
  options: {
128410
128411
  minimap: { enabled: !1 },
128411
128412
  fontSize: 12,
@@ -129411,23 +129412,22 @@ class jVe {
129411
129412
  function LBe(o, e, t) {
129412
129413
  const [i, n] = an(!1), [s, r] = an(e), [a, l] = an(o), [c, d] = an(""), h = new SBe(), u = new vBe(), [g, f] = an([]);
129413
129414
  Gu(() => {
129414
- a && t && !i && s && (f([]), Object.keys(t).forEach((M) => {
129415
+ a && t && !i && s && (f([]), console.log("работаем с файлами"), Object.keys(t).forEach((M) => {
129415
129416
  h.apiFilesProjectProjectIdPost(a, {
129416
129417
  name: M,
129417
129418
  path: M
129418
129419
  }).then((P) => {
129420
+ console.log(P);
129419
129421
  const B = {
129420
129422
  id: P.data,
129421
- content: t[M],
129422
- language: "csharp",
129423
- modified: !1,
129424
- name: M,
129425
- path: M
129423
+ content: t[M]
129426
129424
  };
129427
- f((H) => [...H, B]), h.apiFilesFileIdSavePost(B.id, {
129425
+ h.apiFilesFileIdSavePost(B.id, {
129428
129426
  content: t[M]
129427
+ }).then((H) => {
129428
+ r(!1);
129429
129429
  });
129430
- }).finally(() => n(!0));
129430
+ });
129431
129431
  }));
129432
129432
  }, [a, t, s]), Gu(() => {
129433
129433
  a && !i && !s && (f([]), h.apiFilesProjectIdGet(a).then((M) => {
@@ -129442,7 +129442,9 @@ function LBe(o, e, t) {
129442
129442
  path: P.path
129443
129443
  };
129444
129444
  f((j) => [...j, H]);
129445
- }).finally(() => n(!0));
129445
+ }).finally(() => {
129446
+ n(!0);
129447
+ });
129446
129448
  });
129447
129449
  }));
129448
129450
  }, [a, t, s]);
@@ -129565,6 +129567,7 @@ function LBe(o, e, t) {
129565
129567
  },
129566
129568
  output: c,
129567
129569
  saveAll: D,
129570
+ isInitialized: i,
129568
129571
  history: []
129569
129572
  };
129570
129573
  }
@@ -129701,7 +129704,8 @@ Console.WriteLine("Hello, World!");`
129701
129704
  onMove: fe,
129702
129705
  onFolderRename: ae,
129703
129706
  changeAllDocPath: ee
129704
- }
129707
+ },
129708
+ n.length
129705
129709
  ),
129706
129710
  /* @__PURE__ */ be.jsx(
129707
129711
  "div",
package/dist/index.d.ts CHANGED
@@ -327,6 +327,7 @@ declare interface MonacoEditorWrapperProps {
327
327
  language: string;
328
328
  onChange: (value: string) => void;
329
329
  theme?: string;
330
+ filename?: string;
330
331
  }
331
332
 
332
333
  export declare const OutputPanel: default_2.FC<OutputPanelProps>;
@@ -405,6 +406,7 @@ export declare function useCompiler(id: number, isNew: boolean, initialFiles?: R
405
406
  stop: () => void;
406
407
  output: string;
407
408
  saveAll: () => void;
409
+ isInitialized: boolean;
408
410
  history: never[];
409
411
  };
410
412
 
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-TBxGcLDr.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-BPcZxg8h.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-BcNkHkCK.js";
1
+ import { conf as t, language as e } from "./typescript-CVD1rfpg.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-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";
1
+ import { c as P, l as _, e as B } from "./index-BPcZxg8h.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-BuEpM3Np.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-BuEpM3Np.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-TBxGcLDr.js";
1
+ import { l as e } from "./index-BPcZxg8h.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-TBxGcLDr.js";
1
+ import { R as Ge, l as x, e as w, U as Je, M as R } from "./index-BPcZxg8h.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-TBxGcLDr.js";
1
+ import { l as e } from "./index-BPcZxg8h.js";
2
2
  const i = {
3
3
  comments: {
4
4
  blockComment: ["{/*", "*/}"]
@@ -1,4 +1,4 @@
1
- import { l as e } from "./index-TBxGcLDr.js";
1
+ import { l as e } from "./index-BPcZxg8h.js";
2
2
  const t = {
3
3
  comments: {
4
4
  lineComment: "#",
@@ -1,4 +1,4 @@
1
- import { l as t } from "./index-TBxGcLDr.js";
1
+ import { l as t } from "./index-BPcZxg8h.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-TBxGcLDr.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-BPcZxg8h.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-TBxGcLDr.js";
1
+ import { l as e } from "./index-BPcZxg8h.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-TBxGcLDr.js";
1
+ import { l as e } from "./index-BPcZxg8h.js";
2
2
  const n = {
3
3
  comments: {
4
4
  blockComment: ["<!--", "-->"]
@@ -1,4 +1,4 @@
1
- import { l as e } from "./index-TBxGcLDr.js";
1
+ import { l as e } from "./index-BPcZxg8h.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.11",
3
+ "version": "1.0.12",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",