@ichaingo/monaco 1.5.7 → 1.5.8

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.
Files changed (2) hide show
  1. package/dist/index.js +11 -11
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import { jsx as c } from "react/jsx-runtime";
2
2
  import g, { loader as E, useMonaco as f } from "@monaco-editor/react";
3
- import { createHighlighter as p } from "shiki";
4
- import { shikiToMonaco as T } from "@shikijs/monaco";
5
- import { useRef as d, useMemo as h, useEffect as m } from "react";
6
- const N = async (n) => {
7
- const i = await p({
3
+ import { createHighlighter as T } from "shiki";
4
+ import { shikiToMonaco as p } from "@shikijs/monaco";
5
+ import { useRef as d, useMemo as N, useEffect as m } from "react";
6
+ const h = async (n) => {
7
+ const i = await T({
8
8
  themes: ["catppuccin-latte", "tokyo-night"],
9
9
  langs: ["sql"]
10
10
  });
11
- n.languages.register({ id: "sql" }), T(i, n);
11
+ n.languages.register({ id: "sql" }), p(i, n);
12
12
  };
13
13
  function C(n, i) {
14
14
  const u = [
@@ -88,13 +88,13 @@ ${t.fieldComment ? `Description: ${t.fieldComment}` : ""}`,
88
88
  }
89
89
  E.config({
90
90
  paths: {
91
- vs: "https://cdn.ichatgo.ai/common/monaco/0.52.2/min/vs"
91
+ vs: `${process.env.NEXT_PUBLIC_CDN_URL}/common/monaco/0.52.2/min/vs`
92
92
  }
93
93
  });
94
- function S({ tables: n, theme: i, ...u }) {
95
- const o = f(), s = d(null), r = d(null), a = h(() => i === "dark" ? "tokyo-night" : "catppuccin-latte", [i]);
94
+ function $({ tables: n, theme: i, ...u }) {
95
+ const o = f(), s = d(null), r = d(null), a = N(() => i === "dark" ? "tokyo-night" : "catppuccin-latte", [i]);
96
96
  return m(() => {
97
- o && N(o);
97
+ o && h(o);
98
98
  }, [o]), m(() => {
99
99
  o && n && C(o, n);
100
100
  }, [o, n]), m(() => {
@@ -132,5 +132,5 @@ function S({ tables: n, theme: i, ...u }) {
132
132
  ) });
133
133
  }
134
134
  export {
135
- S as default
135
+ $ as default
136
136
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ichaingo/monaco",
3
- "version": "1.5.7",
3
+ "version": "1.5.8",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",