Skip to content

Commit

Permalink
unpin react since it is always stable
Browse files Browse the repository at this point in the history
i hope
  • Loading branch information
luludotdev committed Feb 26, 2024
1 parent 1983171 commit 07c8472
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 21 deletions.
8 changes: 4 additions & 4 deletions src/esm.d.ts
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'
}
2 changes: 1 addition & 1 deletion src/react/context.ts
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)
2 changes: 1 addition & 1 deletion src/react/hooks/entities.ts
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'

Expand Down
2 changes: 1 addition & 1 deletion src/react/hooks/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = <
Expand Down
2 changes: 1 addition & 1 deletion src/react/hooks/inputs.ts
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'
Expand Down
2 changes: 1 addition & 1 deletion src/react/hooks/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'

/**
Expand Down
2 changes: 1 addition & 1 deletion src/react/hooks/useForceUpdate.ts
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
Expand Down
2 changes: 1 addition & 1 deletion src/react/hooks/useGame.ts
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'

/**
Expand Down
2 changes: 1 addition & 1 deletion src/react/hooks/usePlayer.ts
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'

Expand Down
6 changes: 1 addition & 5 deletions src/react/hooks/useTransform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/react/render.tsx
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 {
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

// React
"jsx": "react-jsx",
"jsxImportSource": "https://esm.sh/v136/[email protected]",
"jsxImportSource": "https://esm.sh/[email protected]",

"baseUrl": ".",
"paths": {
Expand Down

0 comments on commit 07c8472

Please sign in to comment.