vzcode 1.23.0 → 1.25.0

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.html CHANGED
@@ -20,7 +20,7 @@
20
20
  href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap"
21
21
  rel="stylesheet"
22
22
  />
23
- <script type="module" crossorigin src="/assets/index-kb-h8kAY.js"></script>
23
+ <script type="module" crossorigin src="/assets/index-C8aUgAEA.js"></script>
24
24
  <link rel="stylesheet" crossorigin href="/assets/index-zzK6rRiK.css">
25
25
  </head>
26
26
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vzcode",
3
- "version": "1.23.0",
3
+ "version": "1.25.0",
4
4
  "description": "Multiplayer code editor system",
5
5
  "main": "src/index.ts",
6
6
  "type": "module",
@@ -1,22 +1,16 @@
1
1
  import { oneDark } from '@codemirror/theme-one-dark';
2
- import * as okaidiaModule from '@uiw/codemirror-theme-okaidia';
3
- import * as abcdefModule from '@uiw/codemirror-theme-abcdef';
4
- import * as draculaModule from '@uiw/codemirror-theme-dracula';
5
- import * as eclipseModule from '@uiw/codemirror-theme-eclipse';
6
- import * as githubDarkModule from '@uiw/codemirror-theme-github';
7
- import * as materialModule from '@uiw/codemirror-theme-material';
8
- import * as nordModule from '@uiw/codemirror-theme-nord';
9
- import * as xcodeLightModule from '@uiw/codemirror-theme-xcode';
10
- import { vizhubTheme } from './vizhubTheme';
11
2
 
12
- const { okaidia } = okaidiaModule;
13
- const { abcdef } = abcdefModule;
14
- const { dracula } = draculaModule;
15
- const { eclipse } = eclipseModule;
16
- const { githubDark } = githubDarkModule;
17
- const { material } = materialModule;
18
- const { nord } = nordModule;
19
- const { xcodeLight } = xcodeLightModule;
3
+ import { vizhubTheme } from './vizhubTheme';
4
+ import {
5
+ okaidia,
6
+ abcdef,
7
+ dracula,
8
+ eclipse,
9
+ githubDark,
10
+ material,
11
+ nord,
12
+ xcodeLight,
13
+ } from './uiwImports';
20
14
 
21
15
  // CodeMirror themes
22
16
  export type ThemeLabel =
@@ -0,0 +1,32 @@
1
+ // These import are wreaking havoc with the build process
2
+ // and causing app deployments to fail.
3
+ // The upstream library is not configured properly in NPM.
4
+ // See:
5
+ // https://github.com/uiwjs/react-codemirror/issues/680
6
+ // https://github.com/scalar/scalar/issues/4222
7
+ // As a workaround, we need to explicitly target the ESM
8
+ // distribution of the library, which is not used by default
9
+ // because there is no "type": "module" field in the package.json
10
+ // of any of these `@uiw/codemirror-theme-*` packages.
11
+
12
+ import { okaidia } from '@uiw/codemirror-theme-okaidia';
13
+ import { abcdef } from '@uiw/codemirror-theme-abcdef';
14
+ import { dracula } from '@uiw/codemirror-theme-dracula';
15
+ import { eclipse } from '@uiw/codemirror-theme-eclipse';
16
+ import { githubDark } from '@uiw/codemirror-theme-github';
17
+ import { material } from '@uiw/codemirror-theme-material';
18
+ import { nord } from '@uiw/codemirror-theme-nord';
19
+ import { xcodeLight } from '@uiw/codemirror-theme-xcode';
20
+ import { createTheme } from '@uiw/codemirror-themes';
21
+
22
+ export {
23
+ okaidia,
24
+ abcdef,
25
+ dracula,
26
+ eclipse,
27
+ githubDark,
28
+ material,
29
+ nord,
30
+ xcodeLight,
31
+ createTheme,
32
+ };
@@ -3,9 +3,7 @@
3
3
  // Inspired by https://github.com/uiwjs/react-codemirror/blob/master/themes/vscode/src/index.ts
4
4
 
5
5
  import { tags as t } from '@lezer/highlight';
6
- import * as codemirrorThemes from '@uiw/codemirror-themes';
7
-
8
- const { createTheme } = codemirrorThemes;
6
+ import { createTheme } from '../uiwImports';
9
7
 
10
8
  import {
11
9
  // Colors for various things outside the code itself