diff --git a/src/esm.d.ts b/src/esm.d.ts index 53a0578..f8679f7 100644 --- a/src/esm.d.ts +++ b/src/esm.d.ts @@ -1,19 +1,19 @@ // define types for HTTP imports -declare module 'https://esm.sh/react@18.2.0' { +declare module 'https://esm.sh/v136/react@18.2.0' { import React from 'react' export = React } -declare module 'https://esm.sh/react@18.2.0/jsx-runtime' { +declare module 'https://esm.sh/v136/react@18.2.0/jsx-runtime' { export * from 'react/jsx-runtime' } -declare module 'https://esm.sh/react@18.2.0/jsx-dev-runtime' { +declare module 'https://esm.sh/v136/react@18.2.0/jsx-dev-runtime' { export * from 'react/jsx-dev-runtime' } -declare module 'https://esm.sh/react-dom@18.2.0/client' { +declare module 'https://esm.sh/v136/react-dom@18.2.0/client' { export * from 'react-dom/client' } diff --git a/src/react/context.ts b/src/react/context.ts index b6d5ded..a151690 100644 --- a/src/react/context.ts +++ b/src/react/context.ts @@ -1,4 +1,4 @@ import type { Game } from '@dreamlab.gg/core' -import { createContext } from 'https://esm.sh/react@18.2.0' +import { createContext } from 'https://esm.sh/v136/react@18.2.0' export const GameContext = createContext | null>(null) diff --git a/src/react/hooks/entities.ts b/src/react/hooks/entities.ts index 4529b59..7c1bd2f 100644 --- a/src/react/hooks/entities.ts +++ b/src/react/hooks/entities.ts @@ -5,7 +5,7 @@ import type { SpawnableEntity, } from '@dreamlab.gg/core' import type { EventHandler } from '@dreamlab.gg/core/events' -import { useCallback, useEffect } from 'https://esm.sh/react@18.2.0' +import { useCallback, useEffect } from 'https://esm.sh/v136/react@18.2.0' import { useForceUpdate } from './useForceUpdate.ts' import { useGame } from './useGame.ts' diff --git a/src/react/hooks/events.ts b/src/react/hooks/events.ts index 31b94d4..19b4519 100644 --- a/src/react/hooks/events.ts +++ b/src/react/hooks/events.ts @@ -4,7 +4,7 @@ import type { Event, EventHandler, } from '@dreamlab.gg/core/events' -import { useEffect } from 'https://esm.sh/react@18.2.0' +import { useEffect } from 'https://esm.sh/v136/react@18.2.0' import { useGame } from './useGame.ts' export const useClientEventListener = >( diff --git a/src/react/hooks/inputs.ts b/src/react/hooks/inputs.ts index 5a47ef3..9cbce55 100644 --- a/src/react/hooks/inputs.ts +++ b/src/react/hooks/inputs.ts @@ -1,5 +1,5 @@ import type { InputCode, InputManager } from '@dreamlab.gg/core/input' -import { useCallback, useEffect } from 'https://esm.sh/react@18.2.0' +import { useCallback, useEffect } from 'https://esm.sh/v136/react@18.2.0' import type { LiteralUnion } from 'type-fest' import { useForceUpdate } from './useForceUpdate.ts' import { useGame } from './useGame.ts' diff --git a/src/react/hooks/network.ts b/src/react/hooks/network.ts index 272cfcd..6558f4a 100644 --- a/src/react/hooks/network.ts +++ b/src/react/hooks/network.ts @@ -2,7 +2,7 @@ import type { MessageListenerClient, NetClient, } from '@dreamlab.gg/core/network' -import { useEffect, useMemo } from 'https://esm.sh/react@18.2.0' +import { useEffect, useMemo } from 'https://esm.sh/v136/react@18.2.0' import { useGame } from './useGame.ts' /** diff --git a/src/react/hooks/useForceUpdate.ts b/src/react/hooks/useForceUpdate.ts index 53ddb4a..600e7bc 100644 --- a/src/react/hooks/useForceUpdate.ts +++ b/src/react/hooks/useForceUpdate.ts @@ -1,4 +1,4 @@ -import { useCallback, useState } from 'https://esm.sh/react@18.2.0' +import { useCallback, useState } from 'https://esm.sh/v136/react@18.2.0' /** * Allows you to force a re-render diff --git a/src/react/hooks/useGame.ts b/src/react/hooks/useGame.ts index 046ae42..d7285ef 100644 --- a/src/react/hooks/useGame.ts +++ b/src/react/hooks/useGame.ts @@ -1,5 +1,5 @@ import type { Game } from '@dreamlab.gg/core' -import { useContext } from 'https://esm.sh/react@18.2.0' +import { useContext } from 'https://esm.sh/v136/react@18.2.0' import { GameContext } from '~/react/context.ts' /** diff --git a/src/react/hooks/usePlayer.ts b/src/react/hooks/usePlayer.ts index 3e4198a..595ded9 100644 --- a/src/react/hooks/usePlayer.ts +++ b/src/react/hooks/usePlayer.ts @@ -1,7 +1,7 @@ import { isPlayer } from '@dreamlab.gg/core/entities' import type { Player } from '@dreamlab.gg/core/entities' import type { EventHandler } from '@dreamlab.gg/core/events' -import { useCallback, useEffect } from 'https://esm.sh/react@18.2.0' +import { useCallback, useEffect } from 'https://esm.sh/v136/react@18.2.0' import { useForceUpdate } from './useForceUpdate.ts' import { useGame } from './useGame.ts' diff --git a/src/react/render.tsx b/src/react/render.tsx index 63e0d2b..696cc9d 100644 --- a/src/react/render.tsx +++ b/src/react/render.tsx @@ -1,7 +1,7 @@ import type { Game } from '@dreamlab.gg/core' -import { createRoot } from 'https://esm.sh/react-dom@18.2.0/client' -import { StrictMode } from 'https://esm.sh/react@18.2.0' -import type { ReactNode } from 'https://esm.sh/react@18.2.0' +import { createRoot } from 'https://esm.sh/v136/react-dom@18.2.0/client' +import { StrictMode } from 'https://esm.sh/v136/react@18.2.0' +import type { ReactNode } from 'https://esm.sh/v136/react@18.2.0' import { GameContext } from '~/react/context.ts' interface RenderOptions { diff --git a/tsconfig.json b/tsconfig.json index 7f5316b..2ff8f82 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -44,7 +44,7 @@ // React "jsx": "react-jsx", - "jsxImportSource": "https://esm.sh/react@18.2.0", + "jsxImportSource": "https://esm.sh/v136/react@18.2.0", "baseUrl": ".", "paths": {