mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-30 17:49:34 +00:00
Update to esm, update deepslate (#244)
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
export * from './useActiveTimout'
|
||||
export * from './useAsync'
|
||||
export * from './useAsyncFn'
|
||||
export * from './useCanvas'
|
||||
export * from './useFocus'
|
||||
export * from './useHash'
|
||||
export * from './useLocalStorage'
|
||||
export * from './useMediaQuery'
|
||||
export * from './useModel'
|
||||
export * from './useSearchParam'
|
||||
export * from './useActiveTimout.js'
|
||||
export * from './useAsync.js'
|
||||
export * from './useAsyncFn.js'
|
||||
export * from './useCanvas.js'
|
||||
export * from './useFocus.js'
|
||||
export * from './useHash.js'
|
||||
export * from './useLocalStorage.js'
|
||||
export * from './useMediaQuery.js'
|
||||
export * from './useModel.js'
|
||||
export * from './useSearchParam.js'
|
||||
export * from './useTags.js'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { Inputs } from 'preact/hooks'
|
||||
import { useEffect } from 'preact/hooks'
|
||||
import type { AsyncCancel, AsyncState } from './useAsyncFn'
|
||||
import { useAsyncFn } from './useAsyncFn'
|
||||
import type { AsyncCancel, AsyncState } from './index.js'
|
||||
import { useAsyncFn } from './index.js'
|
||||
|
||||
export function useAsync<R>(
|
||||
fn: () => Promise<R | typeof AsyncCancel>,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useCallback, useEffect, useState } from 'preact/hooks'
|
||||
import { changeUrl } from '../Utils'
|
||||
import { changeUrl } from '../Utils.js'
|
||||
|
||||
export function useHash(): [string, (hash: string) => unknown] {
|
||||
const [hash, setHash] = useState(window.location.hash)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useCallback, useEffect, useState } from 'preact/hooks'
|
||||
import { changeUrl } from '../Utils'
|
||||
import { changeUrl } from '../Utils.js'
|
||||
|
||||
const getValue = (search: string, param: string) => new URLSearchParams(search).get(param) ?? undefined
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useMemo } from 'preact/hooks'
|
||||
import { useSearchParam } from './useSearchParam'
|
||||
import { useSearchParam } from './index.js'
|
||||
|
||||
const TAG_KEY = 'tags'
|
||||
const TAG_SEP = '|'
|
||||
|
||||
Reference in New Issue
Block a user