karin-plugin-kkk 2.36.2 → 2.37.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +49 -0
- package/config/default_config/app.yaml +1 -1
- package/lib/build-metadata.json +5 -5
- package/lib/core_chunk/amagi.d.mts +1087 -473
- package/lib/core_chunk/{index-B2QgJ0_6.d.mts → index-CZWy-8Jl.d.mts} +1 -76
- package/lib/core_chunk/main.js +2325 -2344
- package/lib/core_chunk/richtext.d.mts +75 -1
- package/lib/core_chunk/template.d.mts +719 -713
- package/lib/core_chunk/vendor.js +7611 -6980
- package/lib/karin-plugin-kkk.css +461 -295
- package/lib/web/assets/CronEditor-WXijzmDW.js +1 -0
- package/lib/web/assets/DesktopLayout--iy5sAfQ.js +1 -0
- package/lib/web/assets/MobileLayout-f8WFKU7S.js +1 -0
- package/lib/web/assets/ThemeSwitch-BHSl6vlV.js +1 -0
- package/lib/web/assets/index-CDqOqICt.css +2 -0
- package/lib/web/assets/index-CEplgYEW.js +47 -0
- package/lib/web/assets/separator-Bm0SRDXt.js +1 -0
- package/lib/web/index.html +2 -2
- package/package.json +4 -4
- package/lib/core_chunk/index-_og592jD.d.mts +0 -172
- package/lib/web/assets/CronEditor-BrSMQ7Wt.js +0 -1
- package/lib/web/assets/DesktopLayout-D42mvBB3.js +0 -1
- package/lib/web/assets/MobileLayout-CsGZCHOX.js +0 -1
- package/lib/web/assets/ThemeSwitch-CehenZXq.js +0 -1
- package/lib/web/assets/index-hQel6cUs.css +0 -2
- package/lib/web/assets/index-xT9tCQxI.js +0 -47
- package/lib/web/assets/separator-0i510i92.js +0 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
|
|
3
2
|
//#region ../richtext/src/types.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* 富文本节点联合类型。
|
|
@@ -255,80 +254,6 @@ interface RichTextRenderOptions {
|
|
|
255
254
|
iconScale?: number;
|
|
256
255
|
}
|
|
257
256
|
//#endregion
|
|
258
|
-
//#region ../richtext/src/parse/index.d.ts
|
|
259
|
-
/** 创建普通文本节点。 */
|
|
260
|
-
declare const createTextNode: (text: string, style?: RichTextInlineStyle) => RichTextTextNode;
|
|
261
|
-
/** 创建行内表情节点。 */
|
|
262
|
-
declare const createEmojiNode: (name: string, src: string, options?: {
|
|
263
|
-
scale?: number;
|
|
264
|
-
}) => RichTextEmojiNode;
|
|
265
|
-
/** 创建 @ 用户节点。 */
|
|
266
|
-
declare const createMentionNode: (text: string, userId?: string) => RichTextMentionNode;
|
|
267
|
-
/** 创建搜索词高亮节点。 */
|
|
268
|
-
declare const createSearchKeywordNode: (text: string, queryId?: string) => RichTextSearchKeywordNode;
|
|
269
|
-
/** 创建换行节点。 */
|
|
270
|
-
declare const createLineBreakNode: () => RichTextLineBreakNode;
|
|
271
|
-
/** 创建话题节点。 */
|
|
272
|
-
declare const createTopicNode: (text: string) => RichTextTopicNode;
|
|
273
|
-
/** 创建 @ 用户节点。 */
|
|
274
|
-
declare const createAtNode: (text: string, userId?: string) => RichTextAtNode;
|
|
275
|
-
/** 创建抽奖节点。 */
|
|
276
|
-
declare const createLotteryNode: (text: string) => RichTextLotteryNode;
|
|
277
|
-
/** 创建网页链接节点。 */
|
|
278
|
-
declare const createWebLinkNode: (text: string, jumpUrl: string) => RichTextWebLinkNode;
|
|
279
|
-
/** 创建投票节点。 */
|
|
280
|
-
declare const createVoteNode: (text: string) => RichTextVoteNode;
|
|
281
|
-
/** 创建查看图片节点。 */
|
|
282
|
-
declare const createViewPictureNode: (text: string) => RichTextViewPictureNode;
|
|
283
|
-
/** 创建标题节点。 */
|
|
284
|
-
declare const createHeadingNode: (level: 1 | 2 | 3 | 4 | 5 | 6, nodes: RichTextNode[]) => RichTextHeadingNode;
|
|
285
|
-
/** 创建段落节点。 */
|
|
286
|
-
declare const createParagraphNode: (nodes: RichTextNode[]) => RichTextParagraphNode;
|
|
287
|
-
/** 创建图片节点。 */
|
|
288
|
-
declare const createImageNode: (src: string, alt?: string, caption?: string) => RichTextImageNode;
|
|
289
|
-
/** 创建水平分隔线节点。 */
|
|
290
|
-
declare const createHorizontalRuleNode: () => RichTextHorizontalRuleNode;
|
|
291
|
-
/** 创建引用块节点。 */
|
|
292
|
-
declare const createBlockquoteNode: (nodes: RichTextNode[]) => RichTextBlockquoteNode;
|
|
293
|
-
/** 创建列表节点。 */
|
|
294
|
-
declare const createListNode: (ordered: boolean, items: RichTextListItemNode[]) => RichTextListNode;
|
|
295
|
-
/** 创建列表项节点。 */
|
|
296
|
-
declare const createListItemNode: (nodes: RichTextNode[]) => RichTextListItemNode;
|
|
297
|
-
/** 创建代码块节点。 */
|
|
298
|
-
declare const createCodeBlockNode: (content: string, language?: string) => RichTextCodeBlockNode;
|
|
299
|
-
/** 创建链接卡片节点。 */
|
|
300
|
-
declare const createLinkCardNode: (title: string, url: string, options?: {
|
|
301
|
-
cardType?: string;
|
|
302
|
-
meta?: Record<string, any>;
|
|
303
|
-
}) => RichTextLinkCardNode;
|
|
304
|
-
/**
|
|
305
|
-
* 创建 hashtag 节点。
|
|
306
|
-
*
|
|
307
|
-
* 纯文本高亮,不带任何图标。适用于抖音等平台的 #话题# 展示。
|
|
308
|
-
*/
|
|
309
|
-
declare const createHashtagNode: (text: string) => RichTextHashtagNode;
|
|
310
|
-
/**
|
|
311
|
-
* 合并相邻文本节点并丢弃空文本节点。
|
|
312
|
-
*
|
|
313
|
-
* 这样 core 可以按匹配过程简单 push 节点,最后统一整理,避免前端拿到碎片过多的数据。
|
|
314
|
-
*/
|
|
315
|
-
declare const normalizeRichTextNodes: (nodes: RichTextNode[]) => RichTextNode[];
|
|
316
|
-
/**
|
|
317
|
-
* 从富文本文档中提取纯文本内容。
|
|
318
|
-
*
|
|
319
|
-
* 遍历所有节点,收集包含 text 字段的文本内容。
|
|
320
|
-
* lineBreak 节点映射为空格(不参与长度计数),图片节点被忽略。
|
|
321
|
-
*/
|
|
322
|
-
declare const extractRichTextPlainText: (document: RichTextDocument) => string;
|
|
323
|
-
/**
|
|
324
|
-
* 创建富文本文档。
|
|
325
|
-
*
|
|
326
|
-
* 这里不会生成任何 HTML,只返回可序列化 JSON,适合作为 core 到 template 的数据边界。
|
|
327
|
-
*/
|
|
328
|
-
declare const createRichTextDocument: (nodes: RichTextNode[], options?: {
|
|
329
|
-
platform?: string;
|
|
330
|
-
}) => RichTextDocument;
|
|
331
|
-
//#endregion
|
|
332
257
|
//#region ../richtext/src/react/index.d.ts
|
|
333
258
|
/**
|
|
334
259
|
* 将富文本文档渲染成 React 节点。
|
|
@@ -340,4 +265,4 @@ declare const createRichTextDocument: (nodes: RichTextNode[], options?: {
|
|
|
340
265
|
*/
|
|
341
266
|
declare const renderRichTextToReact: (document: RichTextDocument, options?: RichTextRenderOptions) => ReactNode;
|
|
342
267
|
//#endregion
|
|
343
|
-
export {
|
|
268
|
+
export { RichTextVoteNode as A, RichTextParagraphNode as C, RichTextTextNode as D, RichTextSearchKeywordStyleConfig as E, RichTextTopicNode as O, RichTextNodeStyleConfig as S, RichTextSearchKeywordNode as T, RichTextListItemNode as _, RichTextCodeBlockNode as a, RichTextMentionNode as b, RichTextEmojiNode as c, RichTextHorizontalRuleNode as d, RichTextImageNode as f, RichTextLinkCardNode as g, RichTextLineBreakNode as h, RichTextBlockquoteNode as i, RichTextWebLinkNode as j, RichTextViewPictureNode as k, RichTextHashtagNode as l, RichTextInlineStyle as m, RichTextAtNode as n, RichTextDocument as o, RichTextInlineNode as p, RichTextBlockNode as r, RichTextEmojiDefinition as s, renderRichTextToReact as t, RichTextHeadingNode as u, RichTextListNode as v, RichTextRenderOptions as w, RichTextNode as x, RichTextLotteryNode as y };
|