@satorijs/adapter-kook
Advanced tools
Comparing version 4.6.4 to 4.6.5
import { Context, h, MessageEncoder, Schema } from '@satorijs/core'; | ||
import { KookBot } from './bot'; | ||
import * as Kook from './types'; | ||
declare global { | ||
namespace JSX { | ||
interface IntrinsicElements { | ||
'kook:image-group': {}; | ||
'kook:action-group': {}; | ||
'kook:header': { | ||
type: 'h1' | 'h2' | 'h3'; | ||
content: string; | ||
}; | ||
'kook:countdown': { | ||
startTime: number; | ||
endTime: number; | ||
mode: 'day' | 'hour'; | ||
}; | ||
'kook:invite': { | ||
code: string; | ||
}; | ||
'kook:card': { | ||
theme?: Kook.Card.Theme; | ||
size?: Kook.Card.Size; | ||
}; | ||
} | ||
} | ||
} | ||
export declare function isDirectChannel(channelId: string): boolean; | ||
@@ -5,0 +29,0 @@ export declare class KookMessageEncoder<C extends Context = Context> extends MessageEncoder<C, KookBot<C>> { |
@@ -110,3 +110,3 @@ import { Context, HTTP } from '@satorijs/core'; | ||
theme?: Card.Theme; | ||
size?: 'lg' | 'sm'; | ||
size?: Card.Size; | ||
modules: Card.Module[]; | ||
@@ -117,2 +117,4 @@ } | ||
type Theme = typeof Theme[number]; | ||
const Size: readonly ["lg", "sm"]; | ||
type Size = typeof Size[number]; | ||
type Module = Section | Container | ImageGroup | ActionGroup | Header | Divider | Invite | File | Countdown | Context; | ||
@@ -119,0 +121,0 @@ interface Text { |
{ | ||
"name": "@satorijs/adapter-kook", | ||
"description": "KOOK (开黑啦) Adapter for Satorijs", | ||
"version": "4.6.4", | ||
"version": "4.6.5", | ||
"type": "module", | ||
@@ -33,7 +33,9 @@ "main": "lib/index.cjs", | ||
"devDependencies": { | ||
"@cordisjs/plugin-server": "^0.2.3" | ||
"@cordisjs/plugin-server": "^0.2.5", | ||
"@satorijs/core": "^4.3.3", | ||
"cordis": "^3.18.1" | ||
}, | ||
"peerDependencies": { | ||
"@satorijs/core": "^4.1.1" | ||
"@satorijs/core": "^4.3.3" | ||
} | ||
} |
@@ -22,3 +22,3 @@ import { Bot, Context, Fragment, h, HTTP, Schema, Universal } from '@satorijs/core' | ||
}).extend(config) | ||
this.proxyUrls.push('https://www.kookapp.cn/') | ||
ctx.satori.proxyUrls.add('https://www.kookapp.cn/') | ||
this.internal = new Kook.Internal(this.http) | ||
@@ -25,0 +25,0 @@ |
@@ -5,2 +5,27 @@ import { Context, h, MessageEncoder, Schema } from '@satorijs/core' | ||
declare global { | ||
namespace JSX { | ||
interface IntrinsicElements { | ||
'kook:image-group': {} | ||
'kook:action-group': {} | ||
'kook:header': { | ||
type: 'h1' | 'h2' | 'h3' | ||
content: string | ||
} | ||
'kook:countdown': { | ||
startTime: number | ||
endTime: number | ||
mode: 'day' | 'hour' | ||
} | ||
'kook:invite': { | ||
code: string | ||
} | ||
'kook:card': { | ||
theme?: Kook.Card.Theme | ||
size?: Kook.Card.Size | ||
} | ||
} | ||
} | ||
} | ||
export function isDirectChannel(channelId: string) { | ||
@@ -7,0 +32,0 @@ return channelId.length > 30 |
@@ -142,3 +142,3 @@ /* eslint-disable max-len */ | ||
theme?: Card.Theme | ||
size?: 'lg' | 'sm' | ||
size?: Card.Size | ||
modules: Card.Module[] | ||
@@ -150,2 +150,4 @@ } | ||
export type Theme = typeof Theme[number] | ||
export const Size = ['lg', 'sm'] as const | ||
export type Size = typeof Size[number] | ||
export type Module = Section | Container | ImageGroup | ActionGroup | Header | Divider | Invite | File | Countdown | Context | ||
@@ -152,0 +154,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
221537
4673
3