mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-26 00:16:51 +00:00
Update to esm, update deepslate (#244)
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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]>
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user