-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
unpin react since it is always stable
i hope
- Loading branch information
1 parent
1983171
commit 07c8472
Showing
12 changed files
with
17 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
// define types for HTTP imports | ||
|
||
declare module 'https://esm.sh/v136/[email protected]' { | ||
declare module 'https://esm.sh/[email protected]' { | ||
import React from 'react' | ||
|
||
export = React | ||
} | ||
|
||
declare module 'https://esm.sh/v136/[email protected]/jsx-runtime' { | ||
declare module 'https://esm.sh/[email protected]/jsx-runtime' { | ||
export * from 'react/jsx-runtime' | ||
} | ||
|
||
declare module 'https://esm.sh/v136/[email protected]/jsx-dev-runtime' { | ||
declare module 'https://esm.sh/[email protected]/jsx-dev-runtime' { | ||
export * from 'react/jsx-dev-runtime' | ||
} | ||
|
||
declare module 'https://esm.sh/v136/[email protected]/client' { | ||
declare module 'https://esm.sh/[email protected]/client' { | ||
export * from 'react-dom/client' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import type { Game } from '@dreamlab.gg/core' | ||
import { createContext } from 'https://esm.sh/v136/[email protected]' | ||
import { createContext } from 'https://esm.sh/[email protected]' | ||
|
||
export const GameContext = createContext<Game<false> | null>(null) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import { isSpawnableEntity } from '@dreamlab.gg/core' | ||
import type { Entity, Game, SpawnableEntity } from '@dreamlab.gg/core' | ||
import type { EventHandler } from '@dreamlab.gg/core/events' | ||
import { useCallback, useEffect } from 'https://esm.sh/v136/[email protected]' | ||
import { useCallback, useEffect } from 'https://esm.sh/[email protected]' | ||
import { useForceUpdate } from './useForceUpdate.ts' | ||
import { useGame } from './useGame.ts' | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ import type { | |
EventEmitter, | ||
EventHandler, | ||
} from '@dreamlab.gg/core/events' | ||
import { useEffect } from 'https://esm.sh/v136/[email protected]' | ||
import { useEffect } from 'https://esm.sh/[email protected]' | ||
import { useGame } from './useGame.ts' | ||
|
||
export const useEventListener = < | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import type { InputCode, InputManager } from '@dreamlab.gg/core/input' | ||
import { useCallback, useEffect } from 'https://esm.sh/v136/[email protected]' | ||
import { useCallback, useEffect } from 'https://esm.sh/[email protected]' | ||
import type { LiteralUnion } from 'type-fest' | ||
import { useForceUpdate } from './useForceUpdate.ts' | ||
import { useGame } from './useGame.ts' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ import type { | |
MessageListenerClient, | ||
NetClient, | ||
} from '@dreamlab.gg/core/network' | ||
import { useEffect, useMemo } from 'https://esm.sh/v136/[email protected]' | ||
import { useEffect, useMemo } from 'https://esm.sh/[email protected]' | ||
import { useGame } from './useGame.ts' | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { useCallback, useState } from 'https://esm.sh/v136/[email protected]' | ||
import { useCallback, useState } from 'https://esm.sh/[email protected]' | ||
|
||
/** | ||
* Allows you to force a re-render | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import type { Game } from '@dreamlab.gg/core' | ||
import { useContext } from 'https://esm.sh/v136/[email protected]' | ||
import { useContext } from 'https://esm.sh/[email protected]' | ||
import { GameContext } from '~/react/context.ts' | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/v136/[email protected]' | ||
import { useCallback, useEffect } from 'https://esm.sh/[email protected]' | ||
import { useForceUpdate } from './useForceUpdate.ts' | ||
import { useGame } from './useGame.ts' | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,11 +5,7 @@ import type { | |
Transform, | ||
ZIndexListener, | ||
} from '@dreamlab.gg/core/math' | ||
import { | ||
useCallback, | ||
useEffect, | ||
useState, | ||
} from 'https://esm.sh/v136/[email protected]' | ||
import { useCallback, useEffect, useState } from 'https://esm.sh/[email protected]' | ||
|
||
/** | ||
* Return a reference to a {@link Transform} that will automatically trigger React re-renders | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import type { Game } from '@dreamlab.gg/core' | ||
import { createRoot } from 'https://esm.sh/v136/[email protected]/client' | ||
import { StrictMode } from 'https://esm.sh/v136/[email protected]' | ||
import type { ReactNode } from 'https://esm.sh/v136/[email protected]' | ||
import { createRoot } from 'https://esm.sh/[email protected]/client' | ||
import { StrictMode } from 'https://esm.sh/[email protected]' | ||
import type { ReactNode } from 'https://esm.sh/[email protected]' | ||
import { GameContext } from '~/react/context.ts' | ||
|
||
interface RenderOptions { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,7 +44,7 @@ | |
|
||
// React | ||
"jsx": "react-jsx", | ||
"jsxImportSource": "https://esm.sh/v136/[email protected]", | ||
"jsxImportSource": "https://esm.sh/[email protected]", | ||
|
||
"baseUrl": ".", | ||
"paths": { | ||
|