@gravitee/graphene-core 2.55.0-monaco-modules.df6bd29 → 2.55.0-monaco-modules.1444cdd

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.
@@ -1753,31 +1753,34 @@ function Le({ className: e, ...n }) {
1753
1753
  }
1754
1754
  //#endregion
1755
1755
  //#region src/composed/CodeEditor/setupCodeEditor.ts
1756
- var $ = !1, Re = null;
1757
- function ze() {
1758
- return Re ??= import("./contributions-BKYZe_-J.js"), Re;
1756
+ var $ = !1, Re = !1, ze = null;
1757
+ function Be() {
1758
+ return ze ??= import("./contributions-BKYZe_-J.js").then((e) => (Re = !0, e)), ze;
1759
1759
  }
1760
- function Be({ baseUrl: e, monaco: t } = {}) {
1760
+ function Ve({ baseUrl: e, monaco: t } = {}) {
1761
1761
  if (!$) {
1762
1762
  if (t !== void 0) {
1763
- r.config({ monaco: t }), $ = !0, ze();
1763
+ r.config({ monaco: t }), $ = !0, Be();
1764
1764
  return;
1765
1765
  }
1766
- e !== void 0 && (r.config({ paths: { vs: e.replace(/\/+$/, "") } }), $ = !0, ze());
1766
+ e !== void 0 && (r.config({ paths: { vs: e.replace(/\/+$/, "") } }), $ = !0, Be());
1767
1767
  }
1768
1768
  }
1769
- async function Ve() {
1770
- if ($) return;
1771
- let [e] = await Promise.all([import("monaco-editor"), ze()]);
1772
- $ ||= (r.config({ monaco: e }), !0);
1769
+ async function He() {
1770
+ if (!$) {
1771
+ let [e] = await Promise.all([import("monaco-editor"), Be()]);
1772
+ $ ||= (r.config({ monaco: e }), !0);
1773
+ return;
1774
+ }
1775
+ await Be();
1773
1776
  }
1774
- function He() {
1775
- return $;
1777
+ function Ue() {
1778
+ return $ && Re;
1776
1779
  }
1777
1780
  //#endregion
1778
1781
  //#region src/composed/CodeEditor/theme/buildTheme.ts
1779
- var Ue = "graphene";
1780
- function We(e) {
1782
+ var We = "graphene";
1783
+ function Ge(e) {
1781
1784
  let t = {}, n = [], r = document.createElement("div");
1782
1785
  document.body.appendChild(r);
1783
1786
  let i = getComputedStyle(r), a = document.createElement("canvas");
@@ -1800,8 +1803,8 @@ function We(e) {
1800
1803
  }
1801
1804
  return document.body.removeChild(r), t;
1802
1805
  }
1803
- function Ge() {
1804
- let e = document.documentElement.classList.contains("dark"), t = We([
1806
+ function Ke() {
1807
+ let e = document.documentElement.classList.contains("dark"), t = Ge([
1805
1808
  "--background",
1806
1809
  "--foreground",
1807
1810
  "--border",
@@ -1920,13 +1923,13 @@ function Ge() {
1920
1923
  }
1921
1924
  //#endregion
1922
1925
  //#region src/composed/CodeEditor/CodeEditor.tsx
1923
- function Ke(e) {
1924
- e.editor.defineTheme(Ue, Ge()), e.editor.setTheme(Ue);
1926
+ function qe(e) {
1927
+ e.editor.defineTheme(We, Ke()), e.editor.setTheme(We);
1925
1928
  }
1926
- var qe = (e) => {
1927
- Ke(e);
1929
+ var Je = (e) => {
1930
+ qe(e);
1928
1931
  };
1929
- function Je() {
1932
+ function Ye() {
1930
1933
  let [t, n] = e.useState(typeof document < "u" && document.documentElement.classList.contains("dark"));
1931
1934
  return e.useEffect(() => {
1932
1935
  let e = new MutationObserver(() => {
@@ -1938,12 +1941,12 @@ function Je() {
1938
1941
  }), () => e.disconnect();
1939
1942
  }, []), t;
1940
1943
  }
1941
- function Ye({ value: r, defaultValue: i, onChange: a, language: o = "plaintext", readOnly: s = !1, disabled: c = !1, height: l, className: u, options: d, onMount: f }) {
1942
- let [p, m] = e.useState(() => He() ? { status: "ready" } : { status: "loading" });
1944
+ function Xe({ value: r, defaultValue: i, onChange: a, language: o = "plaintext", readOnly: s = !1, disabled: c = !1, height: l, className: u, options: d, onMount: f }) {
1945
+ let [p, m] = e.useState(() => Ue() ? { status: "ready" } : { status: "loading" });
1943
1946
  e.useEffect(() => {
1944
1947
  if (p.status !== "loading") return;
1945
1948
  let e = !1;
1946
- return Ve().then(() => {
1949
+ return He().then(() => {
1947
1950
  e || m({ status: "ready" });
1948
1951
  }, (t) => {
1949
1952
  if (e) return;
@@ -1956,9 +1959,9 @@ function Ye({ value: r, defaultValue: i, onChange: a, language: o = "plaintext",
1956
1959
  e = !0;
1957
1960
  };
1958
1961
  }, [p.status]);
1959
- let h = Je(), g = e.useRef(null), _ = e.useRef(null);
1962
+ let h = Ye(), g = e.useRef(null), _ = e.useRef(null);
1960
1963
  e.useEffect(() => {
1961
- g.current && Ke(g.current);
1964
+ g.current && qe(g.current);
1962
1965
  }, [h]);
1963
1966
  let v = e.useCallback((e, t) => {
1964
1967
  g.current = t, _.current = e, f?.(e, t);
@@ -1980,10 +1983,10 @@ function Ye({ value: r, defaultValue: i, onChange: a, language: o = "plaintext",
1980
1983
  language: o,
1981
1984
  value: r,
1982
1985
  defaultValue: i,
1983
- theme: Ue,
1986
+ theme: We,
1984
1987
  onChange: a,
1985
1988
  onMount: v,
1986
- beforeMount: qe,
1989
+ beforeMount: Je,
1987
1990
  loading: b,
1988
1991
  options: {
1989
1992
  readOnly: s || c,
@@ -2010,4 +2013,4 @@ function Ye({ value: r, defaultValue: i, onChange: a, language: o = "plaintext",
2010
2013
  });
2011
2014
  }
2012
2015
  //#endregion
2013
- export { Fe as a, Ie as i, Be as n, a as o, Le as r, Ye as t };
2016
+ export { Fe as a, Ie as i, Ve as n, a as o, Le as r, Xe as t };
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "../CodeEditor-Dzc3g71Y.js";
1
+ import { n as e, t } from "../CodeEditor-CAOb0CFS.js";
2
2
  export { t as CodeEditor, e as setupCodeEditor };
@@ -52,8 +52,11 @@ export declare function setupCodeEditor({ baseUrl, monaco }?: SetupCodeEditorOpt
52
52
  */
53
53
  export declare function ensureCodeEditorConfigured(): Promise<void>;
54
54
  /**
55
- * Whether the loader has been configured by an explicit {@link setupCodeEditor} call or by
56
- * {@link ensureCodeEditorConfigured} (which `<CodeEditor>` calls on first render).
55
+ * Whether `<CodeEditor>` can mount an editor without an extra await i.e. the loader is
56
+ * configured **and** the suggest / find / hover / parameter-hints contributions have finished
57
+ * registering. Returning `true` before contributions resolve would let a federated remote
58
+ * mount an editor whose autocomplete silently no-ops; gating on both flags is the fix for
59
+ * that race.
57
60
  */
58
61
  export declare function isCodeEditorConfigured(): boolean;
59
62
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"setupCodeEditor.d.ts","sourceRoot":"","sources":["../../../src/composed/CodeEditor/setupCodeEditor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,KAAK,kBAAkB,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAE9D,MAAM,WAAW,sBAAsB;IACrC;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAC;CACvC;AAqBD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,GAAE,sBAA2B,GAAG,IAAI,CA2BtF;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,0BAA0B,IAAI,OAAO,CAAC,IAAI,CAAC,CAMhE;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAEhD"}
1
+ {"version":3,"file":"setupCodeEditor.d.ts","sourceRoot":"","sources":["../../../src/composed/CodeEditor/setupCodeEditor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,KAAK,kBAAkB,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAE9D,MAAM,WAAW,sBAAsB;IACrC;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAC;CACvC;AAuBD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,GAAE,sBAA2B,GAAG,IAAI,CA2BtF;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,0BAA0B,IAAI,OAAO,CAAC,IAAI,CAAC,CAUhE;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAEhD"}
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as e, i as t, o as n, r, t as i } from "./CodeEditor-Dzc3g71Y.js";
1
+ import { a as e, i as t, o as n, r, t as i } from "./CodeEditor-CAOb0CFS.js";
2
2
  import { $ as a, A as o, At as s, D as c, Kt as l, M as u, Nt as d, O as f, P as p, Pt as m, Q as h, Qt as g, T as _, W as v, Z as y, bn as b, c as x, f as S, j as C, k as w, ln as T, p as E, pt as D, sn as O, tt as k, xt as A, zt as j } from "./icons-YplRdF9A.js";
3
3
  import { n as M, t as N } from "./ThemeProvider-D0l3ICGl.js";
4
4
  import * as P from "react";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravitee/graphene-core",
3
- "version": "2.55.0-monaco-modules.df6bd29",
3
+ "version": "2.55.0-monaco-modules.1444cdd",
4
4
  "type": "module",
5
5
  "description": "Gravitee's Graphene design system: accessible React components, design tokens, icons, and shared ESLint/TypeScript configs. Built on shadcn/ui and Tailwind.",
6
6
  "keywords": [
@@ -95,7 +95,7 @@
95
95
  },
96
96
  "peerDependencies": {
97
97
  "@fontsource/dm-sans": ">=5.0.0",
98
- "@gravitee/graphene-core": "2.55.0-monaco-modules.df6bd29",
98
+ "@gravitee/graphene-core": "2.55.0-monaco-modules.1444cdd",
99
99
  "@monaco-editor/react": "^4.7.0",
100
100
  "@tanstack/react-table": "^8.0.0",
101
101
  "@testing-library/dom": ">=10.0.0",