mirror of
https://github.com/chrononeko/chronocat.git
synced 2024-11-26 02:10:58 +00:00
feat(shell): inject h & styles
This commit is contained in:
parent
c983cb77ba
commit
e2c201c8c4
@ -1,3 +1,4 @@
|
|||||||
|
import h from '@satorijs/element'
|
||||||
import styles from 'ansi-styles'
|
import styles from 'ansi-styles'
|
||||||
import { mkdirSync, readdirSync } from 'node:fs'
|
import { mkdirSync, readdirSync } from 'node:fs'
|
||||||
import { join } from 'node:path'
|
import { join } from 'node:path'
|
||||||
@ -40,9 +41,11 @@ export const chronocat = async () => {
|
|||||||
getAuthData,
|
getAuthData,
|
||||||
getConfig,
|
getConfig,
|
||||||
getSelfProfile,
|
getSelfProfile,
|
||||||
|
h,
|
||||||
l,
|
l,
|
||||||
platform: PLATFORM,
|
platform: PLATFORM,
|
||||||
sleep,
|
sleep,
|
||||||
|
styles,
|
||||||
timeout,
|
timeout,
|
||||||
uix,
|
uix,
|
||||||
validate,
|
validate,
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
import type { QFace } from '@chronocat/red'
|
import type { QFace } from '@chronocat/red'
|
||||||
|
import type h from '@satorijs/element'
|
||||||
|
import type styles from 'ansi-styles'
|
||||||
import type { O } from 'ts-toolbelt'
|
import type { O } from 'ts-toolbelt'
|
||||||
import type { Event, Message, MessageCreatePayload } from './satori/types'
|
import type { Event, Message, MessageCreatePayload } from './satori/types'
|
||||||
import type { api } from './services/api'
|
import type { api } from './services/api'
|
||||||
@ -26,9 +28,11 @@ export interface ChronocatContext {
|
|||||||
getAuthData: typeof getAuthData
|
getAuthData: typeof getAuthData
|
||||||
getConfig: typeof getConfig
|
getConfig: typeof getConfig
|
||||||
getSelfProfile: typeof getSelfProfile
|
getSelfProfile: typeof getSelfProfile
|
||||||
|
h: typeof h
|
||||||
l: typeof l
|
l: typeof l
|
||||||
platform: typeof PLATFORM
|
platform: typeof PLATFORM
|
||||||
sleep: typeof sleep
|
sleep: typeof sleep
|
||||||
|
styles: typeof styles
|
||||||
timeout: typeof timeout
|
timeout: typeof timeout
|
||||||
uix: typeof uix
|
uix: typeof uix
|
||||||
validate: typeof validate
|
validate: typeof validate
|
||||||
@ -68,7 +72,13 @@ export interface Methods {
|
|||||||
|
|
||||||
// Internal
|
// Internal
|
||||||
|
|
||||||
|
'chronocat.internal.message.create.forward': [
|
||||||
|
[MessageCreatePayload],
|
||||||
|
Message[],
|
||||||
|
]
|
||||||
|
|
||||||
'chronocat.internal.assets.get': [[string], string]
|
'chronocat.internal.assets.get': [[string], string]
|
||||||
|
|
||||||
'chronocat.internal.qface.get': [[string], QFace | undefined]
|
'chronocat.internal.qface.get': [[string], QFace | undefined]
|
||||||
'chronocat.internal.qface.list': [[], QFace[] | undefined]
|
'chronocat.internal.qface.list': [[], QFace[] | undefined]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user