vzcode 1.30.0 → 1.30.1

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-DjhIoHhX.js"></script>
23
+ <script type="module" crossorigin src="/assets/index-BOiH3_fC.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.30.0",
3
+ "version": "1.30.1",
4
4
  "description": "Multiplayer code editor system",
5
5
  "main": "src/index.ts",
6
6
  "type": "module",
@@ -1,4 +1,3 @@
1
- import * as reactRouterDOM from 'react-router-dom';
2
1
  import { TabState } from '../types';
3
2
  import { VizFileId, VizContent } from '@vizhub/viz-types';
4
3
  import { useEffect, useMemo, useRef } from 'react';
@@ -7,8 +6,7 @@ import {
7
6
  decodeTabs,
8
7
  encodeTabs,
9
8
  } from './tabsSearchParameters';
10
-
11
- const { useSearchParams } = reactRouterDOM;
9
+ import { useSearchParams } from '../reactRouterExports';
12
10
 
13
11
  // Synchronizes the tab state with the URL parameters.
14
12
  export const useURLSync = ({
@@ -0,0 +1,15 @@
1
+ // The React Router exports have been a pain to deal with.
2
+ // After upgrading Node and React Router, there were random errors.
3
+ // And we want to migrate soon from `react-router-dom` to `react-router`,
4
+ // so the exports are centralized here.
5
+ import * as reactRouterDOM from 'react-router-dom';
6
+
7
+ export const {
8
+ useSearchParams,
9
+
10
+ // This actually is the only thing that works.
11
+ // It looks crazy, but it works.
12
+ // - reactRouterDOM.default works for Vite SSR build
13
+ // - reactRouterDOM works for Vite frontend build
14
+ // @ts-ignore
15
+ } = reactRouterDOM.default || reactRouterDOM;