Update to esm, update deepslate (#244)

This commit is contained in:
Misode
2022-06-16 00:58:14 +02:00
committed by GitHub
parent cbef6ef41b
commit 561cd341a1
98 changed files with 1243 additions and 1104 deletions

View File

@@ -1,10 +1,13 @@
// import { createRequire } from 'module'
import type { ComponentChildren } from 'preact'
import { createContext } from 'preact'
import { useCallback, useContext, useEffect, useState } from 'preact/hooks'
import config from '../../config.json'
import { Analytics } from '../Analytics.js'
import config from '../Config.js'
import { Store } from '../Store.js'
// const require = createRequire(import.meta.url)
// const English = require('../../locales/en.json')
import English from '../../locales/en.json'
import { Analytics } from '../Analytics'
import { Store } from '../Store'
interface Locale {
lang: string,

View File

@@ -2,10 +2,10 @@ import type { ComponentChildren } from 'preact'
import { createContext } from 'preact'
import { route } from 'preact-router'
import { useCallback, useContext, useMemo, useState } from 'preact/hooks'
import config from '../../config.json'
import type { VersionId } from '../services'
import { Store } from '../Store'
import { cleanUrl } from '../Utils'
import config from '../Config.js'
import type { VersionId } from '../services/index.js'
import { Store } from '../Store.js'
import { cleanUrl } from '../Utils.js'
export type Project = {
name: string,

View File

@@ -1,8 +1,8 @@
import type { ComponentChildren } from 'preact'
import { createContext } from 'preact'
import { useCallback, useContext } from 'preact/hooks'
import { useLocalStorage } from '../hooks'
import type { Color } from '../Utils'
import { useLocalStorage } from '../hooks/index.js'
import type { Color } from '../Utils.js'
interface Store {
biomeColors: Record<string, [number, number, number]>

View File

@@ -1,9 +1,9 @@
import type { ComponentChildren } from 'preact'
import { createContext } from 'preact'
import { useCallback, useContext, useEffect, useState } from 'preact/hooks'
import { Analytics } from '../Analytics'
import { useMediaQuery } from '../hooks'
import { Store } from '../Store'
import { Analytics } from '../Analytics.js'
import { useMediaQuery } from '../hooks/index.js'
import { Store } from '../Store.js'
interface Theme {
theme: string,

View File

@@ -1,9 +1,9 @@
import type { ComponentChildren } from 'preact'
import { createContext } from 'preact'
import { useCallback, useContext, useEffect, useState } from 'preact/hooks'
import { useLocale } from '.'
import config from '../../config.json'
import type { VersionId } from '../services'
import config from '../Config.js'
import type { VersionId } from '../services/index.js'
import { useLocale } from './index.js'
const VERSIONS_IN_TITLE = 3

View File

@@ -1,11 +1,11 @@
import type { ComponentChildren } from 'preact'
import { createContext } from 'preact'
import { useCallback, useContext, useEffect, useState } from 'preact/hooks'
import { Analytics } from '../Analytics'
import { useSearchParam } from '../hooks'
import type { VersionId } from '../services'
import { VersionIds } from '../services'
import { Store } from '../Store'
import { Analytics } from '../Analytics.js'
import { useSearchParam } from '../hooks/index.js'
import type { VersionId } from '../services/index.js'
import { VersionIds } from '../services/index.js'
import { Store } from '../Store.js'
const VERSION_PARAM = 'version'

View File

@@ -1,6 +1,6 @@
export * from './Locale'
export * from './Project'
export * from './Store'
export * from './Theme'
export * from './Title'
export * from './Version'
export * from './Locale.js'
export * from './Project.js'
export * from './Store.js'
export * from './Theme.js'
export * from './Title.js'
export * from './Version.js'