one-design-next 0.0.113 → 0.0.115
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/dist/_genui-types.d.ts +42 -3
- package/dist/_genui-types.js +19 -3
- package/dist/collapse/primitive.d.ts +1 -1
- package/dist/composer/caret.d.ts +74 -0
- package/dist/composer/caret.js +207 -1
- package/dist/composer/editor.d.ts +17 -3
- package/dist/composer/editor.js +423 -19
- package/dist/composer/hooks/useChipManager.d.ts +14 -2
- package/dist/composer/hooks/useChipManager.js +31 -16
- package/dist/composer/index.d.ts +40 -0
- package/dist/composer/index.js +72 -19
- package/dist/composer/inline-ref.d.ts +6 -1
- package/dist/composer/inline-ref.js +6 -1
- package/dist/composer/insert.d.ts +75 -0
- package/dist/composer/insert.js +130 -0
- package/dist/composer/segments.d.ts +32 -4
- package/dist/composer/segments.js +86 -5
- package/dist/composer/style/index.css +22 -0
- package/dist/composer/utils.d.ts +30 -1
- package/dist/composer/utils.js +65 -3
- package/dist/icon/types.d.ts +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +1 -1
- package/dist/user-bubble/render-segments.d.ts +1 -1
- package/dist/user-bubble/render-segments.js +11 -2
- package/dist/user-bubble/style/index.css +8 -0
- package/package.json +1 -1
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
*
|
|
6
6
|
* - `rawValueToSegments`:库内部用,把含零宽 marker 的 raw value + chip 列表
|
|
7
7
|
* 还原为 `ComposerSegment[]`。
|
|
8
|
+
* - `resolveHintTarget`:结构谓词——「最后一个 chip 之后一个字符都没有
|
|
9
|
+
* (空格 / 换行都算内容)+ 该 chip 带 hint」,渲染与发送都靠它。
|
|
8
10
|
* - `segmentsToReadableText`:业务可选工具,按指定占位符格式把 segments 拼成
|
|
9
11
|
* 一句话(默认 `[Skill: label]` / `[@label]`,与 ComposerMention 兼容)。
|
|
10
12
|
* - `segmentsHasContent`:是否含可见内容;库内 send 校验用,业务可复用。
|
|
@@ -12,9 +14,8 @@
|
|
|
12
14
|
|
|
13
15
|
import { ComposerSegmentType } from "../_genui-types";
|
|
14
16
|
import { chipToInvocationData, chipToMentionData } from "./send-meta";
|
|
15
|
-
import { forEachMarkerSegment } from "./utils";
|
|
17
|
+
import { forEachMarkerSegment, parseMarkers } from "./utils";
|
|
16
18
|
export { ComposerSegmentType };
|
|
17
|
-
|
|
18
19
|
/* ────────────────────────────────────────────────────────────────────
|
|
19
20
|
* Type guards · 给业务方 filter / find 用,避免现场写 Extract<…>。
|
|
20
21
|
*
|
|
@@ -30,8 +31,75 @@ export var isInvocationSegment = function isInvocationSegment(s) {
|
|
|
30
31
|
export var isMentionSegment = function isMentionSegment(s) {
|
|
31
32
|
return s.type === ComposerSegmentType.Mention;
|
|
32
33
|
};
|
|
34
|
+
export var isHintSegment = function isHintSegment(s) {
|
|
35
|
+
return s.type === ComposerSegmentType.Hint;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/* ────────────────────────────────────────────────────────────────────
|
|
39
|
+
* Hint 结构谓词 · 「最后一个 chip + 其后一个字符都没有」
|
|
40
|
+
*
|
|
41
|
+
* hint 不是内容,而是内容结构的投影:只要最后一个 chip 之后的 value 是
|
|
42
|
+
* **空串**,且该 chip 带 hint,就命中。
|
|
43
|
+
*
|
|
44
|
+
* 空格、换行、文字**都算内容**:用户在 chip 后面敲下第一个字符 / 按下
|
|
45
|
+
* Enter(含 Shift+Enter)都说明 skill 块之后已经有东西了,hint 必须让位。
|
|
46
|
+
* 反过来,把这些字符(包括换行)删干净、chip 后面重新变成空串,hint 才回来。
|
|
47
|
+
* 插入 chip 本身不会写空格(见 useChipManager.insertChip):行尾插入后尾串
|
|
48
|
+
* 就是空串,hint 立刻命中,不需要为「自动补的空格」做特殊判断。
|
|
49
|
+
*
|
|
50
|
+
* 谓词与光标位置无关——用户在前面打字不影响。**渲染(Editor)与发送
|
|
51
|
+
* (Composer)都只依赖这一个谓词**,每次内容变化重算一次,两处永远一致。
|
|
52
|
+
* ──────────────────────────────────────────────────────────────────── */
|
|
53
|
+
|
|
54
|
+
/** hint 命中结果。 */
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* 最后一个 marker 的 chip id 与它之后的尾串;没有 chip 时返回 null。
|
|
58
|
+
*
|
|
59
|
+
* 「尾串」是 hint 判定的唯一输入:谓词要求它是**空串**。
|
|
60
|
+
*/
|
|
61
|
+
function getLastMarkerTail(raw) {
|
|
62
|
+
var markers = parseMarkers(raw);
|
|
63
|
+
var last = markers[markers.length - 1];
|
|
64
|
+
if (!last) return null;
|
|
65
|
+
return {
|
|
66
|
+
chipId: last.id,
|
|
67
|
+
tail: raw.slice(last.rawEnd)
|
|
68
|
+
};
|
|
69
|
+
}
|
|
33
70
|
|
|
34
|
-
/**
|
|
71
|
+
/**
|
|
72
|
+
* 判定当前内容是否命中 hint:
|
|
73
|
+
* 1. `value` 里存在 marker(即至少有一个 chip)
|
|
74
|
+
* 2. 最后一个 marker 之后**一个字符都没有**(空格 / 换行都算内容)
|
|
75
|
+
* 3. 该 marker 对应的 chip 带 hint 文本(`@` 触发的 mention chip 不参与)
|
|
76
|
+
*/
|
|
77
|
+
export function resolveHintTarget(raw, chips) {
|
|
78
|
+
var _chip$hint;
|
|
79
|
+
var info = getLastMarkerTail(raw);
|
|
80
|
+
if (!info || info.tail.length > 0) return null;
|
|
81
|
+
var chip = chips.find(function (c) {
|
|
82
|
+
return c.id === info.chipId;
|
|
83
|
+
});
|
|
84
|
+
if (!chip || chip.kind === 'mention') return null;
|
|
85
|
+
var text = (_chip$hint = chip.hint) === null || _chip$hint === void 0 ? void 0 : _chip$hint.trim();
|
|
86
|
+
if (!text) return null;
|
|
87
|
+
return {
|
|
88
|
+
chipId: chip.id,
|
|
89
|
+
text: text
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* 从含零宽 marker 的 raw value + chip 列表构建有序 segments。
|
|
95
|
+
*
|
|
96
|
+
* 这是「编辑器状态 → 发送内容」的**唯一映射**:
|
|
97
|
+
* 1. marker 依次还原为 invocation / mention,与文本段按出现顺序交替
|
|
98
|
+
* 2. 末尾按结构谓词补一段派生的 `hint`(skill 在最后且其后一个字符都没有时)
|
|
99
|
+
*
|
|
100
|
+
* 因此 `rawValueToSegments(value, chips)` 与 `onSend` 收到的 segments 一致,
|
|
101
|
+
* 业务可以放心用它做预览 / 调试。
|
|
102
|
+
*/
|
|
35
103
|
export function rawValueToSegments(raw, chips) {
|
|
36
104
|
var chipById = new Map(chips.map(function (c) {
|
|
37
105
|
return [c.id, c];
|
|
@@ -63,6 +131,15 @@ export function rawValueToSegments(raw, chips) {
|
|
|
63
131
|
});
|
|
64
132
|
}
|
|
65
133
|
});
|
|
134
|
+
var hintTarget = resolveHintTarget(raw, chips);
|
|
135
|
+
if (hintTarget) {
|
|
136
|
+
segments.push({
|
|
137
|
+
type: 'hint',
|
|
138
|
+
data: {
|
|
139
|
+
text: hintTarget.text
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
}
|
|
66
143
|
return segments;
|
|
67
144
|
}
|
|
68
145
|
var defaultFormatInvocation = function defaultFormatInvocation(label) {
|
|
@@ -75,6 +152,8 @@ var defaultFormatMention = function defaultFormatMention(label) {
|
|
|
75
152
|
/**
|
|
76
153
|
* 把 segments 拼成一条字符串,供需要单串 string 的 LLM / 旧后端使用。
|
|
77
154
|
* 库**不内置调用**此函数;由业务在 onSend 内自行选择。
|
|
155
|
+
*
|
|
156
|
+
* `hint` 段直接输出原文(它本身就是给模型的模板文案,不加 `[Skill: …]` 包裹)。
|
|
78
157
|
*/
|
|
79
158
|
export function segmentsToReadableText(segments, options) {
|
|
80
159
|
var _options$formatInvoca, _options$formatMentio;
|
|
@@ -88,15 +167,17 @@ export function segmentsToReadableText(segments, options) {
|
|
|
88
167
|
return fmtInv(seg.data.label);
|
|
89
168
|
case 'mention':
|
|
90
169
|
return fmtMen(seg.data.label);
|
|
170
|
+
case 'hint':
|
|
171
|
+
return seg.data.text;
|
|
91
172
|
default:
|
|
92
173
|
return '';
|
|
93
174
|
}
|
|
94
175
|
}).join('');
|
|
95
176
|
}
|
|
96
177
|
|
|
97
|
-
/** segments
|
|
178
|
+
/** segments 是否含可见内容(文本非空、含内联引用,或含派生 hint)。 */
|
|
98
179
|
export function segmentsHasContent(segments) {
|
|
99
180
|
return segments.some(function (s) {
|
|
100
|
-
return s.type === 'invocation' || s.type === 'mention' || s.type === 'text' && s.data.text.trim().length > 0;
|
|
181
|
+
return s.type === 'invocation' || s.type === 'mention' || s.type === 'hint' || s.type === 'text' && s.data.text.trim().length > 0;
|
|
101
182
|
});
|
|
102
183
|
}
|
|
@@ -169,7 +169,12 @@
|
|
|
169
169
|
width: 100%;
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
+
/* 升格态:box 必须回到正常流。
|
|
173
|
+
* 单行态是 absolute + bottom: 0(贴 inner 底部,inner 只留 52px)。内容一旦
|
|
174
|
+
* 变高(多行文本 / 派生 hint),绝对定位的 box 会向上溢出 inner 的占位、盖住
|
|
175
|
+
* 上方所有内容(demo 里表现为输入框飘到外面的文案上)。 */
|
|
172
176
|
[data-odn-composer][data-odn-composer-variant=lite][data-odn-composer-expanded] [data-odn-composer-box] {
|
|
177
|
+
position: relative;
|
|
173
178
|
padding-bottom: 42px;
|
|
174
179
|
}
|
|
175
180
|
|
|
@@ -287,6 +292,23 @@
|
|
|
287
292
|
line-height: inherit;
|
|
288
293
|
}
|
|
289
294
|
|
|
295
|
+
/* ------------------------------------------------------------------
|
|
296
|
+
* 派生 hint(结构谓词:chip 是最后一个内容且其后无可见内容)
|
|
297
|
+
* 它是 chip host 的**兄弟节点**(不是 host 内部):
|
|
298
|
+
* - 只有兄弟关系才存在「chip 之后、hint 之前」这个 caret 落点;
|
|
299
|
+
* host 是 contentEditable=false 原子块,塞进 host 就只能落在整块之后
|
|
300
|
+
* - hint 之后不允许落 caret(caret.ts · normalizeCollapsedCaretBeforeHint)
|
|
301
|
+
* - 非内容:getPlainText 整棵子树跳过,不进 value / 剪贴板 / segments
|
|
302
|
+
* - pre-wrap:skills 的模板文案可含换行
|
|
303
|
+
* ----------------------------------------------------------------- */
|
|
304
|
+
[data-odn-composer] [data-odn-composer-skill-hint] {
|
|
305
|
+
margin-left: 4px;
|
|
306
|
+
color: var(--odn-color-black-8);
|
|
307
|
+
pointer-events: none;
|
|
308
|
+
user-select: none;
|
|
309
|
+
white-space: pre-wrap;
|
|
310
|
+
}
|
|
311
|
+
|
|
290
312
|
/* ------------------------------------------------------------------
|
|
291
313
|
* Block 行模型(caret-rewrite step 1/5)
|
|
292
314
|
* editor 直接子节点都是 [data-composer-line] div,每行渲染为独立 block。
|
package/dist/composer/utils.d.ts
CHANGED
|
@@ -13,6 +13,15 @@
|
|
|
13
13
|
export declare const LINE_DATASET_KEY = "composerLine";
|
|
14
14
|
/** 行容器 DOM 属性名。 */
|
|
15
15
|
export declare const LINE_ATTR_NAME = "data-composer-line";
|
|
16
|
+
/**
|
|
17
|
+
* 派生 hint 的 DOM 钩子(skill 在最后且其后无内容时,渲染在 chip 之后的只读文本)。
|
|
18
|
+
*
|
|
19
|
+
* **不是正文**:它是 chip host 的兄弟节点,`getPlainText` 整棵子树跳过,
|
|
20
|
+
* 因此不进 value / 剪贴板;caret 也不允许停在它之后(见 `caret.ts`)。
|
|
21
|
+
* 注意别和底部快捷键提示的 `data-odn-composer-hint` 混用。
|
|
22
|
+
*/
|
|
23
|
+
export declare const COMPOSER_HINT_ATTR = "data-odn-composer-skill-hint";
|
|
24
|
+
export declare const COMPOSER_HINT_SELECTOR = "[data-odn-composer-skill-hint]";
|
|
16
25
|
/** 是否是行容器。 */
|
|
17
26
|
export declare function isLineRoot(node: Node | null | undefined): node is HTMLDivElement;
|
|
18
27
|
/** 创建一个新的空行容器。 */
|
|
@@ -70,6 +79,16 @@ export declare function forEachMarkerSegment(raw: string, visit: (segment: {
|
|
|
70
79
|
type: 'marker';
|
|
71
80
|
id: string;
|
|
72
81
|
}) => void): void;
|
|
82
|
+
/**
|
|
83
|
+
* 行容器内的 `<br>` 是否只是浏览器给「空行」补的占位。
|
|
84
|
+
*
|
|
85
|
+
* 行模型下换行由 line div 表达,行内的 `<br>` 不承载用户换行;Chrome 在
|
|
86
|
+
* 用户删空一行后会把该行变成 `<div><br></div>`(占位,撑住行高)。若把它
|
|
87
|
+
* 当成 '\n',`value` 就会凭空多出一行(`marker + '\n'` 变成 `marker + '\n\n'`)。
|
|
88
|
+
*
|
|
89
|
+
* 判定:该 `<br>` 之后只剩不可见文本(ZWSP 等)或更多 `<br>`。
|
|
90
|
+
*/
|
|
91
|
+
export declare const isPlaceholderBr: (node: Node | null | undefined) => boolean;
|
|
73
92
|
/**
|
|
74
93
|
* 从 contenteditable 里把所有 chip 替换成 marker,得到上层 onChange / onSend
|
|
75
94
|
* 关心的 raw string。
|
|
@@ -77,7 +96,8 @@ export declare function forEachMarkerSegment(raw: string, visit: (segment: {
|
|
|
77
96
|
* 原则:
|
|
78
97
|
* - chip host 元素 → 替换为 `createMarker(id)`
|
|
79
98
|
* - 编辑器自塞的 ZWSP 锚点 → 全部剔除(不进入 value)
|
|
80
|
-
* -
|
|
99
|
+
* - 派生 hint 子树 → 整棵跳过(它不是正文)
|
|
100
|
+
* - `<br>` → `\n`;但行容器内的「占位 `<br>`」(空行撑高用)不算换行
|
|
81
101
|
* - 行容器 `<div data-composer-line>` → 行间输出 `\n`(首行除外)
|
|
82
102
|
*
|
|
83
103
|
* @param editor 编辑区根节点(contentEditable=true)
|
|
@@ -93,6 +113,15 @@ export declare function getPlainText(editor: HTMLElement, chipIdAttr?: string):
|
|
|
93
113
|
* 空格 / 全角空格也算"已输入",只要文本非空就该收起 placeholder。
|
|
94
114
|
*/
|
|
95
115
|
export declare function isEditorEmpty(editor: HTMLElement, chipIdAttr?: string): boolean;
|
|
116
|
+
/**
|
|
117
|
+
* 在 host 后面垫一个「不进 value」的 ZWSP 文本锚点并返回它。
|
|
118
|
+
*
|
|
119
|
+
* chip 后面没有正文时(行尾 / 后面只剩派生 hint / 后面紧跟着另一个 chip),
|
|
120
|
+
* caret 若只靠「元素偏移」落位,部分浏览器会把它带到结构块之后;垫一个只含
|
|
121
|
+
* ZWSP 的文本节点,caret 始终有真实文本落点,而 `getPlainText` 会把整段剔掉,
|
|
122
|
+
* 因此不进 value / segments / 剪贴板。已有锚点直接复用,避免越积越多。
|
|
123
|
+
*/
|
|
124
|
+
export declare function ensureCaretAnchorAfter(host: Node): Text;
|
|
96
125
|
/**
|
|
97
126
|
* 清理 contenteditable 删字后的幽灵节点:空 text、仅 chip 时的占位 <br>。
|
|
98
127
|
* 避免「文字 + invocation」删光文字后出现多余换行,以及 caret 卡在 chip 后误删 invocation。
|
package/dist/composer/utils.js
CHANGED
|
@@ -29,6 +29,16 @@ export var LINE_DATASET_KEY = 'composerLine';
|
|
|
29
29
|
/** 行容器 DOM 属性名。 */
|
|
30
30
|
export var LINE_ATTR_NAME = 'data-composer-line';
|
|
31
31
|
|
|
32
|
+
/**
|
|
33
|
+
* 派生 hint 的 DOM 钩子(skill 在最后且其后无内容时,渲染在 chip 之后的只读文本)。
|
|
34
|
+
*
|
|
35
|
+
* **不是正文**:它是 chip host 的兄弟节点,`getPlainText` 整棵子树跳过,
|
|
36
|
+
* 因此不进 value / 剪贴板;caret 也不允许停在它之后(见 `caret.ts`)。
|
|
37
|
+
* 注意别和底部快捷键提示的 `data-odn-composer-hint` 混用。
|
|
38
|
+
*/
|
|
39
|
+
export var COMPOSER_HINT_ATTR = 'data-odn-composer-skill-hint';
|
|
40
|
+
export var COMPOSER_HINT_SELECTOR = "[".concat(COMPOSER_HINT_ATTR, "]");
|
|
41
|
+
|
|
32
42
|
/** 是否是行容器。 */
|
|
33
43
|
export function isLineRoot(node) {
|
|
34
44
|
var _hasAttribute, _ref;
|
|
@@ -233,6 +243,35 @@ export function forEachMarkerSegment(raw, visit) {
|
|
|
233
243
|
* getPlainText · 从 DOM 提取 marker 化的字符串
|
|
234
244
|
* ──────────────────────────────────────────────────────────────────── */
|
|
235
245
|
|
|
246
|
+
/**
|
|
247
|
+
* 行容器内的 `<br>` 是否只是浏览器给「空行」补的占位。
|
|
248
|
+
*
|
|
249
|
+
* 行模型下换行由 line div 表达,行内的 `<br>` 不承载用户换行;Chrome 在
|
|
250
|
+
* 用户删空一行后会把该行变成 `<div><br></div>`(占位,撑住行高)。若把它
|
|
251
|
+
* 当成 '\n',`value` 就会凭空多出一行(`marker + '\n'` 变成 `marker + '\n\n'`)。
|
|
252
|
+
*
|
|
253
|
+
* 判定:该 `<br>` 之后只剩不可见文本(ZWSP 等)或更多 `<br>`。
|
|
254
|
+
*/
|
|
255
|
+
export var isPlaceholderBr = function isPlaceholderBr(node) {
|
|
256
|
+
if (!node || node.nodeType !== Node.ELEMENT_NODE) return false;
|
|
257
|
+
if (node.tagName !== 'BR') return false;
|
|
258
|
+
var cur = node.nextSibling;
|
|
259
|
+
while (cur) {
|
|
260
|
+
if (cur.nodeType === Node.TEXT_NODE) {
|
|
261
|
+
var _cur$textContent;
|
|
262
|
+
if (stripInvisibleChars((_cur$textContent = cur.textContent) !== null && _cur$textContent !== void 0 ? _cur$textContent : '') !== '') return false;
|
|
263
|
+
cur = cur.nextSibling;
|
|
264
|
+
continue;
|
|
265
|
+
}
|
|
266
|
+
if (cur.nodeType === Node.ELEMENT_NODE && cur.tagName === 'BR') {
|
|
267
|
+
cur = cur.nextSibling;
|
|
268
|
+
continue;
|
|
269
|
+
}
|
|
270
|
+
return false;
|
|
271
|
+
}
|
|
272
|
+
return true;
|
|
273
|
+
};
|
|
274
|
+
|
|
236
275
|
/**
|
|
237
276
|
* 从 contenteditable 里把所有 chip 替换成 marker,得到上层 onChange / onSend
|
|
238
277
|
* 关心的 raw string。
|
|
@@ -240,7 +279,8 @@ export function forEachMarkerSegment(raw, visit) {
|
|
|
240
279
|
* 原则:
|
|
241
280
|
* - chip host 元素 → 替换为 `createMarker(id)`
|
|
242
281
|
* - 编辑器自塞的 ZWSP 锚点 → 全部剔除(不进入 value)
|
|
243
|
-
* -
|
|
282
|
+
* - 派生 hint 子树 → 整棵跳过(它不是正文)
|
|
283
|
+
* - `<br>` → `\n`;但行容器内的「占位 `<br>`」(空行撑高用)不算换行
|
|
244
284
|
* - 行容器 `<div data-composer-line>` → 行间输出 `\n`(首行除外)
|
|
245
285
|
*
|
|
246
286
|
* @param editor 编辑区根节点(contentEditable=true)
|
|
@@ -252,6 +292,8 @@ export function getPlainText(editor) {
|
|
|
252
292
|
var out = '';
|
|
253
293
|
var visit = function visit(node) {
|
|
254
294
|
if (node instanceof HTMLElement) {
|
|
295
|
+
// 派生 hint 整棵子树都不是正文,直接跳过(含其内部文本节点)
|
|
296
|
+
if (node.hasAttribute(COMPOSER_HINT_ATTR)) return;
|
|
255
297
|
var id = node.dataset[chipIdAttr];
|
|
256
298
|
if (id) {
|
|
257
299
|
out += createMarker(id);
|
|
@@ -286,6 +328,8 @@ export function getPlainText(editor) {
|
|
|
286
328
|
firstLineSeen = true;
|
|
287
329
|
for (var _i3 = 0, _Array$from3 = Array.from(c.childNodes); _i3 < _Array$from3.length; _i3++) {
|
|
288
330
|
var cc = _Array$from3[_i3];
|
|
331
|
+
/* 行容器内的占位 <br> 不算换行(换行已由行边界表达)。 */
|
|
332
|
+
if (isPlaceholderBr(cc)) continue;
|
|
289
333
|
visit(cc);
|
|
290
334
|
}
|
|
291
335
|
continue;
|
|
@@ -324,6 +368,24 @@ export function isEditorEmpty(editor) {
|
|
|
324
368
|
* chip 前的 leading <br> / 空 text node。
|
|
325
369
|
* ──────────────────────────────────────────────────────────────────── */
|
|
326
370
|
|
|
371
|
+
/**
|
|
372
|
+
* 在 host 后面垫一个「不进 value」的 ZWSP 文本锚点并返回它。
|
|
373
|
+
*
|
|
374
|
+
* chip 后面没有正文时(行尾 / 后面只剩派生 hint / 后面紧跟着另一个 chip),
|
|
375
|
+
* caret 若只靠「元素偏移」落位,部分浏览器会把它带到结构块之后;垫一个只含
|
|
376
|
+
* ZWSP 的文本节点,caret 始终有真实文本落点,而 `getPlainText` 会把整段剔掉,
|
|
377
|
+
* 因此不进 value / segments / 剪贴板。已有锚点直接复用,避免越积越多。
|
|
378
|
+
*/
|
|
379
|
+
export function ensureCaretAnchorAfter(host) {
|
|
380
|
+
var _tail$textContent, _tail$textContent2;
|
|
381
|
+
var parent = host.parentNode;
|
|
382
|
+
var tail = host.nextSibling;
|
|
383
|
+
var reusable = (tail === null || tail === void 0 ? void 0 : tail.nodeType) === Node.TEXT_NODE && ((_tail$textContent = tail.textContent) !== null && _tail$textContent !== void 0 ? _tail$textContent : '') !== '' && stripInvisibleChars((_tail$textContent2 = tail.textContent) !== null && _tail$textContent2 !== void 0 ? _tail$textContent2 : '') === '' ? tail : null;
|
|
384
|
+
var anchor = reusable !== null && reusable !== void 0 ? reusable : document.createTextNode(ZWSP);
|
|
385
|
+
if (!reusable) parent.insertBefore(anchor, tail);
|
|
386
|
+
return anchor;
|
|
387
|
+
}
|
|
388
|
+
|
|
327
389
|
/**
|
|
328
390
|
* 清理 contenteditable 删字后的幽灵节点:空 text、仅 chip 时的占位 <br>。
|
|
329
391
|
* 避免「文字 + invocation」删光文字后出现多余换行,以及 caret 卡在 chip 后误删 invocation。
|
|
@@ -412,8 +474,8 @@ var isInvisibleChar = function isInvisibleChar(ch) {
|
|
|
412
474
|
* 影响触发判定。 */
|
|
413
475
|
var prevSignificantSibling = function prevSignificantSibling(node) {
|
|
414
476
|
var cur = node.previousSibling;
|
|
415
|
-
while (cur && cur.nodeType === Node.TEXT_NODE && ((_cur$
|
|
416
|
-
var _cur$
|
|
477
|
+
while (cur && cur.nodeType === Node.TEXT_NODE && ((_cur$textContent2 = cur.textContent) !== null && _cur$textContent2 !== void 0 ? _cur$textContent2 : '') === '') {
|
|
478
|
+
var _cur$textContent2;
|
|
417
479
|
cur = cur.previousSibling;
|
|
418
480
|
}
|
|
419
481
|
return cur;
|
package/dist/icon/types.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { svgData } from './svg-data';
|
|
2
2
|
export type IconName = keyof typeof svgData;
|
|
3
|
-
export declare const iconNames: ("history" | "code" | "data" | "form" | "link" | "map" | "menu" | "option" | "search" | "section" | "table" | "template" | "time" | "video" | "filter" | "image" | "stop" | "text" | "view" | "sort" | "group" | "replace" | "split" | "repeat" | "anchor" | "bold" | "scroll" | "type" | "key" | "bottom" | "container" | "left" | "right" | "top" | "x" | "radius" | "power" | "draggable" | "custom" | "heading" | "list" | "presentation" | "timer" | "send" | "location" | "copy" | "move" | "baseline" | "ellipsis" | "pointer" | "zoom-in" | "zoom-out" | "italic" | "underline" | "dot" | "sheet" | "toolbox" | "square" | "addressBook" | "AIFile" | "alarmClock" | "alert-circle" | "alert-circle-filled" | "alert-triangle" | "archive" | "arrow-down" | "arrow-up" | "arrow-up-right" | "arrowDown" | "arrowDown-filled" | "arrowLeft" | "arrowLeft-filled" | "arrowRight" | "arrowRight-filled" | "arrowUp" | "arrowUp-filled" | "asset-square" | "assetProtecting" | "autoAD-square-filled" | "bar-chart-3" | "bell" | "bell-filled" | "bidding" | "biz-cancel" | "biz-magic" | "biz-send" | "biz-stop" | "biz-time" | "bottom-filled" | "calendar" | "cancel" | "cancel-circle" | "cancel-circle-filled" | "card-distribute" | "channels" | "channels-square-filled" | "chart" | "chatBubble-filled" | "check" | "check-circle" | "check-circle-filled" | "checkBadge" | "chevron-down" | "chevron-left" | "chevron-right" | "clock" | "clock-4" | "comments" | "compare" | "copy-new" | "custom-filled" | "customColumn" | "dataAuth" | "dataBoard" | "dataBox" | "dataFolder" | "dataReport" | "dataReport-filled" | "dataRising" | "delete" | "deleteAD-filled" | "detect" | "doubleLeft" | "doubleLeft-filled" | "doubleRight" | "doubleRight-filled" | "down" | "down-bold" | "down-filled" | "download" | "download-1" | "download-2" | "download-filled" | "edit" | "exchange" | "exposure-filled" | "extendedConfig" | "fall-filled" | "file" | "file-code" | "file-filled" | "file-text" | "filter-filled" | "flag" | "flame" | "fold" | "folderZip" | "folderzip-bold" | "fullScreen" | "globe" | "guideBook" | "help-circle" | "help-circle-filled" | "histogram" | "hosting" | "hot" | "hot-filled" | "icon-outlined" | "idea" | "idea-bold" | "image-bold" | "image-filled" | "images" | "import" | "info" | "info-circle" | "info-circle-filled" | "keyword" | "LandingPage" | "languages" | "layers" | "left-bold" | "left-filled" | "leftFirst" | "leftFirst-filled" | "linkSquare" | "loader" | "lock" | "logout" | "magic" | "magic-filled" | "maxSize" | "menuLeft" | "menuLeft-bold" | "menuRight" | "menuRight-bold" | "message-circle-plus" | "messages-square" | "minigame-filled" | "miniProgram" | "minus" | "minus-circle" | "minus-circle-filled" | "mobile" | "mobile-filled" | "mobilePage" | "modify" | "modify-bold" | "moments-filled" | "more" | "more-vertical" | "mouse-pointer-click" | "multiCreate" | "mute" | "mutiImage" | "mutiImage-filled" | "mutiSelect" | "mutiSelect-filled" | "notepad" | "notepad-bold" | "offiaccount-filled" | "panel-left" | "panel-left-close" | "panel-right" | "paperclip" | "pause-filled" | "play-filled" | "playing" | "plus" | "plus-circle" | "plus-circle-filled" | "pointerLeft-filled" | "pointerRight-filled" | "puzzle" | "QRcode" | "qualification" | "quickFile" | "refresh" | "report" | "reportBook" | "right-bold" | "right-filled" | "rightLast" | "rightLast-filled" | "ringStruckture" | "rise-filled" | "rotate-ccw" | "save" | "search-bold" | "search-filled" | "searchAD" | "searchAD-filled" | "setting" | "share" | "shield" | "shield-filled" | "shop" | "shopping" | "sound" | "sparkle" | "sparkles" | "square-filled" | "star" | "star-filled" | "sticker" | "sticker-filled" | "subdivide" | "support-bold" | "tag" | "tag-filled" | "target" | "targeting" | "task" | "task-filled" | "templateBag" | "thumbDown" | "thumbDown-filled" | "thumbs-down" | "thumbs-up" | "thumbUp" | "thumbUp-filled" | "time-bold" | "top-filled" | "treeStructure" | "unfold" | "unfold-filled" | "up" | "up-bold" | "up-filled" | "user-add" | "user-circle" | "user-edit" | "user-pack" | "userList" | "userPack" | "users" | "users-bold" | "verify" | "videoBag-filled" | "videoScreenshot" | "viewMask" | "wallet" | "wand-sparkles" | "warning" | "warning-filled" | "wechatBubble" | "wechatBubble-filled" | "wechatSearch" | "writing" | "x-circle" | "zap" | "zoomIn" | "zoomOut" | "accessibility" | "baby" | "badge-info" | "badge-question-mark" | "circle-question-mark" | "closed-caption" | "contrast" | "ear" | "ear-off" | "eclipse" | "eye" | "eye-closed" | "eye-off" | "glasses" | "hand" | "life-buoy" | "moon" | "moon-star" | "person-standing" | "scan-eye" | "scan-search" | "speech" | "sun" | "sun-dim" | "sun-medium" | "sun-moon" | "activity" | "at-sign" | "award" | "badge" | "badge-alert" | "ban" | "bell-check" | "bell-dot" | "book-user" | "bookmark" | "bookmark-check" | "bookmark-minus" | "bookmark-off" | "bookmark-plus" | "bookmark-x" | "circle-user" | "circle-user-round" | "cog" | "contact" | "contact-round" | "cookie" | "credit-card" | "file-user" | "fingerprint-pattern" | "flag-off" | "frown" | "gift" | "hand-coins" | "handshake" | "heart-handshake" | "heart-minus" | "heart-plus" | "id-card" | "id-card-lanyard" | "inbox" | "key-round" | "key-square" | "link-2" | "log-in" | "log-out" | "mail" | "map-pin" | "map-pin-check" | "map-pin-check-inside" | "map-pin-house" | "map-pin-minus" | "map-pin-minus-inside" | "map-pin-pen" | "map-pin-plus" | "map-pin-plus-inside" | "map-pin-search" | "map-pin-x" | "map-pin-x-inside" | "map-pinned" | "message-circle-check" | "message-circle-x" | "message-square-check" | "notebook-tabs" | "pin" | "rotate-ccw-key" | "scan-face" | "scan-qr-code" | "settings" | "settings-2" | "share-2" | "shield-alert" | "shield-ban" | "shield-check" | "shield-cog" | "shield-cog-corner" | "shield-ellipsis" | "shield-half" | "shield-minus" | "shield-off" | "shield-plus" | "shield-question-mark" | "shield-user" | "shield-x" | "sliders-horizontal" | "sliders-vertical" | "smile" | "square-user" | "square-user-round" | "tags" | "ticket" | "tickets" | "toggle-left" | "toggle-right" | "user" | "user-check" | "user-cog" | "user-key" | "user-lock" | "user-minus" | "user-pen" | "user-plus" | "user-round" | "user-round-check" | "user-round-cog" | "user-round-key" | "user-round-minus" | "user-round-pen" | "user-round-plus" | "user-round-search" | "user-round-x" | "user-search" | "user-star" | "user-x" | "users-round" | "venetian-mask" | "vibrate" | "vibrate-off" | "wallet-cards" | "wallet-minimal" | "wallpaper" | "waypoints" | "wrench" | "arrow-big-down" | "arrow-big-down-dash" | "arrow-big-left" | "arrow-big-left-dash" | "arrow-big-right" | "arrow-big-right-dash" | "arrow-big-up" | "arrow-big-up-dash" | "arrow-down-0-1" | "arrow-down-1-0" | "arrow-down-a-z" | "arrow-down-from-line" | "arrow-down-left" | "arrow-down-narrow-wide" | "arrow-down-right" | "arrow-down-to-dot" | "arrow-down-to-line" | "arrow-down-up" | "arrow-down-wide-narrow" | "arrow-down-z-a" | "arrow-left" | "arrow-left-from-line" | "arrow-left-right" | "arrow-left-to-line" | "arrow-right" | "arrow-right-from-line" | "arrow-right-left" | "arrow-right-to-line" | "arrow-up-0-1" | "arrow-up-1-0" | "arrow-up-a-z" | "arrow-up-down" | "arrow-up-from-dot" | "arrow-up-from-line" | "arrow-up-left" | "arrow-up-narrow-wide" | "arrow-up-to-line" | "arrow-up-wide-narrow" | "arrow-up-z-a" | "arrows-up-from-line" | "calendar-sync" | "chevron-first" | "chevron-last" | "chevron-up" | "chevrons-down" | "chevrons-down-up" | "chevrons-left" | "chevrons-left-right" | "chevrons-right" | "chevrons-right-left" | "chevrons-up" | "chevrons-up-down" | "circle-arrow-down" | "circle-arrow-left" | "circle-arrow-out-down-left" | "circle-arrow-out-down-right" | "circle-arrow-out-up-left" | "circle-arrow-out-up-right" | "circle-arrow-right" | "circle-arrow-up" | "circle-chevron-down" | "circle-chevron-left" | "circle-chevron-right" | "circle-chevron-up" | "circle-fading-arrow-up" | "clipboard-copy" | "clipboard-paste" | "cloud-backup" | "cloud-download" | "cloud-sync" | "cloud-upload" | "corner-down-left" | "corner-down-right" | "corner-left-down" | "corner-left-up" | "corner-right-down" | "corner-right-up" | "corner-up-left" | "corner-up-right" | "database-backup" | "decimals-arrow-left" | "decimals-arrow-right" | "expand" | "external-link" | "fast-forward" | "file-down" | "file-input" | "file-output" | "file-up" | "fold-horizontal" | "fold-vertical" | "folder-down" | "folder-input" | "folder-output" | "folder-sync" | "folder-up" | "git-compare-arrows" | "git-pull-request-arrow" | "git-pull-request-create-arrow" | "hard-drive-download" | "hard-drive-upload" | "iteration-ccw" | "iteration-cw" | "lasso-select" | "list-chevrons-down-up" | "list-chevrons-up-down" | "maximize-2" | "merge" | "milestone" | "minimize-2" | "mouse-pointer" | "mouse-pointer-2" | "mouse-pointer-2-off" | "mouse-pointer-ban" | "move-diagonal" | "move-diagonal-2" | "move-down" | "move-down-left" | "move-down-right" | "move-horizontal" | "move-left" | "move-right" | "move-up" | "move-up-left" | "move-up-right" | "move-vertical" | "panel-bottom-close" | "panel-bottom-open" | "panel-left-open" | "panel-right-close" | "panel-right-open" | "panel-top-close" | "panel-top-open" | "phone-forwarded" | "phone-incoming" | "phone-outgoing" | "play" | "redo" | "redo-2" | "redo-dot" | "refresh-ccw" | "refresh-ccw-dot" | "refresh-cw" | "refresh-cw-off" | "repeat-2" | "repeat-off" | "rewind" | "rotate-ccw-square" | "rotate-cw" | "rotate-cw-square" | "separator-horizontal" | "separator-vertical" | "shrink" | "shuffle" | "signpost" | "signpost-big" | "skip-back" | "skip-forward" | "spline-pointer" | "square-arrow-down" | "square-arrow-down-left" | "square-arrow-down-right" | "square-arrow-left" | "square-arrow-out-down-left" | "square-arrow-out-down-right" | "square-arrow-out-up-left" | "square-arrow-out-up-right" | "square-arrow-right" | "square-arrow-right-enter" | "square-arrow-right-exit" | "square-arrow-up" | "square-arrow-up-left" | "square-arrow-up-right" | "square-chevron-down" | "square-chevron-left" | "square-chevron-right" | "square-chevron-up" | "square-dashed-mouse-pointer" | "square-mouse-pointer" | "square-play" | "step-back" | "step-forward" | "sunrise" | "sunset" | "text-wrap" | "trending-down" | "trending-up" | "trending-up-down" | "undo" | "undo-2" | "undo-dot" | "unfold-horizontal" | "unfold-vertical" | "upload" | "chart-area" | "chart-bar" | "chart-bar-big" | "chart-bar-decreasing" | "chart-bar-increasing" | "chart-bar-stacked" | "chart-candlestick" | "chart-column" | "chart-column-big" | "chart-column-decreasing" | "chart-column-increasing" | "chart-column-stacked" | "chart-gantt" | "chart-line" | "chart-network" | "chart-no-axes-column" | "chart-no-axes-column-decreasing" | "chart-no-axes-column-increasing" | "chart-no-axes-combined" | "chart-no-axes-gantt" | "chart-pie" | "chart-scatter" | "chart-spline" | "folder-kanban" | "kanban" | "square-chart-gantt" | "square-dashed-kanban" | "square-kanban" | "antenna" | "audio-lines" | "audio-waveform" | "camera" | "camera-off" | "chevrons-left-right-ellipsis" | "circle-fading-plus" | "ethernet-port" | "hand-fist" | "headphone-off" | "mic" | "mic-off" | "newspaper" | "nfc" | "notebook" | "phone" | "phone-call" | "phone-missed" | "phone-off" | "projector" | "radar" | "screen-share" | "screen-share-off" | "send-horizontal" | "smartphone-nfc" | "smile-plus" | "spotlight" | "switch-camera" | "tv" | "video-off" | "volume" | "volume-1" | "volume-2" | "volume-off" | "volume-x" | "webcam" | "airplay" | "battery" | "battery-charging" | "battery-full" | "battery-low" | "battery-medium" | "battery-warning" | "bluetooth" | "bluetooth-connected" | "bluetooth-off" | "bluetooth-searching" | "cable" | "cast" | "circle-power" | "cloud-off" | "globe-off" | "globe-x" | "headphones" | "headset" | "house-wifi" | "monitor" | "monitor-check" | "monitor-cloud" | "monitor-cog" | "monitor-dot" | "monitor-down" | "monitor-off" | "monitor-pause" | "monitor-play" | "monitor-smartphone" | "monitor-speaker" | "monitor-stop" | "monitor-up" | "monitor-x" | "power-off" | "router" | "signal" | "signal-high" | "signal-low" | "signal-medium" | "signal-zero" | "smartphone" | "smartphone-charging" | "square-power" | "voicemail" | "wifi" | "wifi-cog" | "wifi-high" | "wifi-low" | "wifi-off" | "wifi-pen" | "wifi-sync" | "wifi-zero" | "zap-off" | "circle-plus" | "hand-grab" | "lasso" | "loader-circle" | "loader-pinwheel" | "pen-tool" | "pencil" | "pencil-off" | "pointer-off" | "square-dashed-text" | "stamp" | "text-cursor" | "a-arrow-down" | "a-arrow-up" | "a-large-small" | "app-window" | "app-window-mac" | "between-horizontal-end" | "between-horizontal-start" | "between-vertical-end" | "between-vertical-start" | "blend" | "book-type" | "bring-to-front" | "brush" | "brush-cleaning" | "columns-2" | "columns-3" | "columns-3-cog" | "columns-4" | "component" | "crop" | "dock" | "drafting-compass" | "flip-horizontal-2" | "flip-vertical-2" | "frame" | "fullscreen" | "gallery-horizontal" | "gallery-horizontal-end" | "gallery-thumbnails" | "gallery-vertical" | "gallery-vertical-end" | "grid-2x2" | "grid-3x2" | "grid-3x3" | "heart-x" | "highlighter" | "layers-2" | "layers-minus" | "layers-plus" | "layout-dashboard" | "layout-grid" | "layout-list" | "layout-panel-left" | "line-style" | "magnet" | "maximize" | "minimize" | "paint-bucket" | "paint-roller" | "paintbrush" | "paintbrush-vertical" | "palette" | "panel-top" | "panels-top-left" | "pen" | "pen-line" | "pen-off" | "pencil-line" | "pencil-ruler" | "pipette" | "proportions" | "ratio" | "rectangle-horizontal" | "rectangle-vertical" | "rows-2" | "rows-3" | "rows-4" | "ruler" | "scaling" | "scissors" | "scissors-line-dashed" | "send-to-back" | "spray-can" | "square-dashed" | "square-scissors" | "squares-exclude" | "squares-intersect" | "squares-subtract" | "squares-unite" | "swatch-book" | "tablet-smartphone" | "vector-square" | "asterisk" | "astroid" | "binary" | "blocks" | "book" | "book-alert" | "book-check" | "book-copy" | "book-dashed" | "book-down" | "book-key" | "book-lock" | "book-marked" | "book-minus" | "book-open" | "book-open-check" | "book-open-text" | "book-plus" | "book-search" | "book-up" | "book-up-2" | "bot" | "bot-message-square" | "bot-off" | "box" | "boxes" | "braces" | "brackets" | "brain-circuit" | "brain-cog" | "bug" | "bug-off" | "bug-play" | "case-lower" | "case-upper" | "circle-dashed" | "circle-dot" | "circle-ellipsis" | "circle-slash" | "circle-slash-2" | "circle-x" | "circuit-board" | "cloud-alert" | "cloud-check" | "cloud-cog" | "code-xml" | "combine" | "command" | "computer" | "construction" | "database" | "database-search" | "database-zap" | "diff" | "divide" | "earth-lock" | "equal" | "equal-not" | "file-braces" | "file-diff" | "file-digit" | "file-sliders" | "file-stack" | "file-terminal" | "folder-code" | "folder-dot" | "folder-open-dot" | "folder-root" | "gem" | "git-branch" | "git-branch-minus" | "git-branch-plus" | "git-commit-horizontal" | "git-commit-vertical" | "git-compare" | "git-fork" | "git-graph" | "git-merge" | "git-merge-conflict" | "git-pull-request" | "git-pull-request-closed" | "git-pull-request-create" | "git-pull-request-draft" | "globe-lock" | "hard-drive" | "hexagon" | "keyboard" | "keyboard-off" | "library" | "library-big" | "list-indent-decrease" | "list-indent-increase" | "message-circle-code" | "message-square-code" | "message-square-diff" | "network" | "package" | "package-2" | "package-check" | "package-minus" | "package-open" | "package-plus" | "package-search" | "package-x" | "parentheses" | "percent" | "plug" | "plug-2" | "qr-code" | "regex" | "rocket" | "rss" | "scroll-text" | "search-code" | "server" | "server-cog" | "server-crash" | "server-off" | "shell" | "slash" | "spell-check" | "spell-check-2" | "square-code" | "square-dot" | "square-function" | "square-library" | "square-minus" | "square-plus" | "square-slash" | "square-stack" | "square-terminal" | "table-properties" | "terminal" | "tool-case" | "triangle-alert" | "unplug" | "variable" | "webhook" | "webhook-off" | "workflow" | "archive-restore" | "archive-x" | "book-image" | "calendar-fold" | "file-archive" | "file-badge" | "file-box" | "file-chart-column" | "file-chart-column-increasing" | "file-chart-line" | "file-chart-pie" | "file-check" | "file-clock" | "file-cog" | "file-headphone" | "file-image" | "file-key" | "file-lock" | "file-minus" | "file-pen" | "file-pen-line" | "file-play" | "file-plus" | "file-scan" | "file-search" | "file-spreadsheet" | "file-symlink" | "file-type" | "file-x" | "files" | "folder" | "folder-archive" | "folder-bookmark" | "folder-check" | "folder-clock" | "folder-closed" | "folder-cog" | "folder-key" | "folder-lock" | "folder-minus" | "folder-open" | "folder-pen" | "folder-plus" | "folder-search" | "folder-search-2" | "folder-tree" | "folder-x" | "folders" | "image-down" | "image-minus" | "image-off" | "image-play" | "image-plus" | "image-up" | "list-tree" | "music" | "save-all" | "save-off" | "table-cells-merge" | "table-cells-split" | "table-columns-split" | "table-rows-split" | "trash" | "trash-2" | "ungroup" | "align-center-horizontal" | "align-center-vertical" | "align-end-horizontal" | "align-end-vertical" | "align-horizontal-distribute-center" | "align-horizontal-distribute-end" | "align-horizontal-distribute-start" | "align-horizontal-justify-center" | "align-horizontal-justify-end" | "align-horizontal-justify-start" | "align-horizontal-space-around" | "align-horizontal-space-between" | "align-start-horizontal" | "align-start-vertical" | "align-vertical-distribute-center" | "align-vertical-distribute-end" | "align-vertical-distribute-start" | "align-vertical-justify-center" | "align-vertical-justify-end" | "align-vertical-justify-start" | "align-vertical-space-around" | "align-vertical-space-between" | "ellipsis-vertical" | "funnel" | "funnel-plus" | "funnel-x" | "grid-2x2-check" | "grid-2x2-plus" | "grid-2x2-x" | "grip" | "grip-horizontal" | "grip-vertical" | "layout-panel-top" | "layout-template" | "list-filter-plus" | "panel-bottom" | "panels-left-bottom" | "panels-right-bottom" | "square-menu" | "square-split-horizontal" | "square-split-vertical" | "stretch-horizontal" | "stretch-vertical" | "text-cursor-input" | "forward" | "mail-check" | "mail-minus" | "mail-open" | "mail-plus" | "mail-question-mark" | "mail-search" | "mail-warning" | "mail-x" | "mailbox" | "mails" | "reply" | "reply-all" | "alarm-clock" | "alarm-clock-check" | "alarm-clock-minus" | "alarm-clock-off" | "alarm-clock-plus" | "bell-electric" | "bell-minus" | "bell-off" | "bell-plus" | "bell-ring" | "check-check" | "check-line" | "circle-alert" | "circle-check" | "circle-check-big" | "copy-check" | "copy-x" | "laptop-minimal-check" | "megaphone" | "megaphone-off" | "message-circle-warning" | "message-square-dot" | "message-square-warning" | "octagon-alert" | "octagon-x" | "square-check" | "square-check-big" | "square-x" | "badge-check" | "badge-minus" | "badge-percent" | "badge-plus" | "badge-x" | "book-heart" | "circle-percent" | "hand-heart" | "hash" | "heart" | "heart-off" | "message-circle" | "message-circle-dashed" | "message-circle-heart" | "message-circle-more" | "message-circle-off" | "message-circle-question-mark" | "message-circle-reply" | "message-square" | "message-square-dashed" | "message-square-heart" | "message-square-lock" | "message-square-more" | "message-square-off" | "message-square-plus" | "message-square-quote" | "message-square-reply" | "message-square-share" | "message-square-text" | "message-square-x" | "notebook-pen" | "notebook-text" | "notepad-text" | "notepad-text-dashed" | "podcast" | "scan" | "menu-line" | "search-line" | "search-alert" | "search-check" | "search-slash" | "search-x" | "square-activity" | "square-percent" | "star-half" | "star-off" | "sticky-note" | "store" | "shopping-bag" | "vote" | "book-text" | "book-x" | "case-sensitive" | "clipboard" | "clipboard-check" | "clipboard-clock" | "clipboard-list" | "clipboard-minus" | "clipboard-pen" | "clipboard-pen-line" | "clipboard-plus" | "clipboard-type" | "clipboard-x" | "copy-minus" | "copy-plus" | "copyright" | "eraser" | "heading-1" | "heading-2" | "heading-3" | "heading-4" | "heading-5" | "heading-6" | "link-2-off" | "list-check" | "list-checks" | "list-collapse" | "list-end" | "list-filter" | "list-minus" | "list-ordered" | "list-plus" | "list-restart" | "list-start" | "list-todo" | "list-x" | "logs" | "quote" | "remove-formatting" | "replace-all" | "scan-text" | "sigma" | "signature" | "square-pen" | "strikethrough" | "subscript" | "superscript" | "table-of-contents" | "text-align-center" | "text-align-end" | "text-align-justify" | "text-align-start" | "text-quote" | "text-search" | "unlink" | "unlink-2" | "whole-word" | "calendar-1" | "calendar-arrow-down" | "calendar-arrow-up" | "calendar-check" | "calendar-check-2" | "calendar-clock" | "calendar-cog" | "calendar-days" | "calendar-minus" | "calendar-off" | "calendar-plus" | "calendar-range" | "calendar-search" | "calendar-x" | "calendars" | "clock-alert" | "clock-arrow-down" | "clock-arrow-up" | "clock-check" | "clock-plus" | "hourglass" | "timeline" | "timer-off" | "timer-reset" | "watch" | "bolt" | "diamond-minus" | "diamond-plus" | "hammer" | "telescope")[];
|
|
3
|
+
export declare const iconNames: ("code" | "data" | "form" | "link" | "map" | "menu" | "option" | "search" | "section" | "table" | "template" | "time" | "video" | "filter" | "image" | "stop" | "text" | "view" | "key" | "draggable" | "target" | "type" | "radius" | "x" | "download" | "list" | "frame" | "replace" | "split" | "repeat" | "anchor" | "bold" | "send" | "group" | "heading" | "presentation" | "timer" | "location" | "copy" | "move" | "baseline" | "bottom" | "left" | "right" | "top" | "scroll" | "history" | "sort" | "container" | "power" | "custom" | "ellipsis" | "pointer" | "zoom-in" | "zoom-out" | "italic" | "underline" | "dot" | "sheet" | "toolbox" | "square" | "addressBook" | "AIFile" | "alarmClock" | "alert-circle" | "alert-circle-filled" | "alert-triangle" | "archive" | "arrow-down" | "arrow-up" | "arrow-up-right" | "arrowDown" | "arrowDown-filled" | "arrowLeft" | "arrowLeft-filled" | "arrowRight" | "arrowRight-filled" | "arrowUp" | "arrowUp-filled" | "asset-square" | "assetProtecting" | "autoAD-square-filled" | "bar-chart-3" | "bell" | "bell-filled" | "bidding" | "biz-cancel" | "biz-magic" | "biz-send" | "biz-stop" | "biz-time" | "bottom-filled" | "calendar" | "cancel" | "cancel-circle" | "cancel-circle-filled" | "card-distribute" | "channels" | "channels-square-filled" | "chart" | "chatBubble-filled" | "check" | "check-circle" | "check-circle-filled" | "checkBadge" | "chevron-down" | "chevron-left" | "chevron-right" | "clock" | "clock-4" | "comments" | "compare" | "copy-new" | "custom-filled" | "customColumn" | "dataAuth" | "dataBoard" | "dataBox" | "dataFolder" | "dataReport" | "dataReport-filled" | "dataRising" | "delete" | "deleteAD-filled" | "detect" | "doubleLeft" | "doubleLeft-filled" | "doubleRight" | "doubleRight-filled" | "down" | "down-bold" | "down-filled" | "download-1" | "download-2" | "download-filled" | "edit" | "exchange" | "exposure-filled" | "extendedConfig" | "fall-filled" | "file" | "file-code" | "file-filled" | "file-text" | "filter-filled" | "flag" | "flame" | "fold" | "folderZip" | "folderzip-bold" | "fullScreen" | "globe" | "guideBook" | "help-circle" | "help-circle-filled" | "histogram" | "hosting" | "hot" | "hot-filled" | "icon-outlined" | "idea" | "idea-bold" | "image-bold" | "image-filled" | "images" | "import" | "info" | "info-circle" | "info-circle-filled" | "keyword" | "LandingPage" | "languages" | "layers" | "left-bold" | "left-filled" | "leftFirst" | "leftFirst-filled" | "linkSquare" | "loader" | "lock" | "logout" | "magic" | "magic-filled" | "maxSize" | "menuLeft" | "menuLeft-bold" | "menuRight" | "menuRight-bold" | "message-circle-plus" | "messages-square" | "minigame-filled" | "miniProgram" | "minus" | "minus-circle" | "minus-circle-filled" | "mobile" | "mobile-filled" | "mobilePage" | "modify" | "modify-bold" | "moments-filled" | "more" | "more-vertical" | "mouse-pointer-click" | "multiCreate" | "mute" | "mutiImage" | "mutiImage-filled" | "mutiSelect" | "mutiSelect-filled" | "notepad" | "notepad-bold" | "offiaccount-filled" | "panel-left" | "panel-left-close" | "panel-right" | "paperclip" | "pause-filled" | "play-filled" | "playing" | "plus" | "plus-circle" | "plus-circle-filled" | "pointerLeft-filled" | "pointerRight-filled" | "puzzle" | "QRcode" | "qualification" | "quickFile" | "refresh" | "report" | "reportBook" | "right-bold" | "right-filled" | "rightLast" | "rightLast-filled" | "ringStruckture" | "rise-filled" | "rotate-ccw" | "save" | "search-bold" | "search-filled" | "searchAD" | "searchAD-filled" | "setting" | "share" | "shield" | "shield-filled" | "shop" | "shopping" | "sound" | "sparkle" | "sparkles" | "square-filled" | "star" | "star-filled" | "sticker" | "sticker-filled" | "subdivide" | "support-bold" | "tag" | "tag-filled" | "targeting" | "task" | "task-filled" | "templateBag" | "thumbDown" | "thumbDown-filled" | "thumbs-down" | "thumbs-up" | "thumbUp" | "thumbUp-filled" | "time-bold" | "top-filled" | "treeStructure" | "unfold" | "unfold-filled" | "up" | "up-bold" | "up-filled" | "user-add" | "user-circle" | "user-edit" | "user-pack" | "userList" | "userPack" | "users" | "users-bold" | "verify" | "videoBag-filled" | "videoScreenshot" | "viewMask" | "wallet" | "wand-sparkles" | "warning" | "warning-filled" | "wechatBubble" | "wechatBubble-filled" | "wechatSearch" | "writing" | "x-circle" | "zap" | "zoomIn" | "zoomOut" | "accessibility" | "baby" | "badge-info" | "badge-question-mark" | "circle-question-mark" | "closed-caption" | "contrast" | "ear" | "ear-off" | "eclipse" | "eye" | "eye-closed" | "eye-off" | "glasses" | "hand" | "life-buoy" | "moon" | "moon-star" | "person-standing" | "scan-eye" | "scan-search" | "speech" | "sun" | "sun-dim" | "sun-medium" | "sun-moon" | "activity" | "at-sign" | "award" | "badge" | "badge-alert" | "ban" | "bell-check" | "bell-dot" | "book-user" | "bookmark" | "bookmark-check" | "bookmark-minus" | "bookmark-off" | "bookmark-plus" | "bookmark-x" | "circle-user" | "circle-user-round" | "cog" | "contact" | "contact-round" | "cookie" | "credit-card" | "file-user" | "fingerprint-pattern" | "flag-off" | "frown" | "gift" | "hand-coins" | "handshake" | "heart-handshake" | "heart-minus" | "heart-plus" | "id-card" | "id-card-lanyard" | "inbox" | "key-round" | "key-square" | "link-2" | "log-in" | "log-out" | "mail" | "map-pin" | "map-pin-check" | "map-pin-check-inside" | "map-pin-house" | "map-pin-minus" | "map-pin-minus-inside" | "map-pin-pen" | "map-pin-plus" | "map-pin-plus-inside" | "map-pin-search" | "map-pin-x" | "map-pin-x-inside" | "map-pinned" | "message-circle-check" | "message-circle-x" | "message-square-check" | "notebook-tabs" | "pin" | "rotate-ccw-key" | "scan-face" | "scan-qr-code" | "settings" | "settings-2" | "share-2" | "shield-alert" | "shield-ban" | "shield-check" | "shield-cog" | "shield-cog-corner" | "shield-ellipsis" | "shield-half" | "shield-minus" | "shield-off" | "shield-plus" | "shield-question-mark" | "shield-user" | "shield-x" | "sliders-horizontal" | "sliders-vertical" | "smile" | "square-user" | "square-user-round" | "tags" | "ticket" | "tickets" | "toggle-left" | "toggle-right" | "user" | "user-check" | "user-cog" | "user-key" | "user-lock" | "user-minus" | "user-pen" | "user-plus" | "user-round" | "user-round-check" | "user-round-cog" | "user-round-key" | "user-round-minus" | "user-round-pen" | "user-round-plus" | "user-round-search" | "user-round-x" | "user-search" | "user-star" | "user-x" | "users-round" | "venetian-mask" | "vibrate" | "vibrate-off" | "wallet-cards" | "wallet-minimal" | "wallpaper" | "waypoints" | "wrench" | "arrow-big-down" | "arrow-big-down-dash" | "arrow-big-left" | "arrow-big-left-dash" | "arrow-big-right" | "arrow-big-right-dash" | "arrow-big-up" | "arrow-big-up-dash" | "arrow-down-0-1" | "arrow-down-1-0" | "arrow-down-a-z" | "arrow-down-from-line" | "arrow-down-left" | "arrow-down-narrow-wide" | "arrow-down-right" | "arrow-down-to-dot" | "arrow-down-to-line" | "arrow-down-up" | "arrow-down-wide-narrow" | "arrow-down-z-a" | "arrow-left" | "arrow-left-from-line" | "arrow-left-right" | "arrow-left-to-line" | "arrow-right" | "arrow-right-from-line" | "arrow-right-left" | "arrow-right-to-line" | "arrow-up-0-1" | "arrow-up-1-0" | "arrow-up-a-z" | "arrow-up-down" | "arrow-up-from-dot" | "arrow-up-from-line" | "arrow-up-left" | "arrow-up-narrow-wide" | "arrow-up-to-line" | "arrow-up-wide-narrow" | "arrow-up-z-a" | "arrows-up-from-line" | "calendar-sync" | "chevron-first" | "chevron-last" | "chevron-up" | "chevrons-down" | "chevrons-down-up" | "chevrons-left" | "chevrons-left-right" | "chevrons-right" | "chevrons-right-left" | "chevrons-up" | "chevrons-up-down" | "circle-arrow-down" | "circle-arrow-left" | "circle-arrow-out-down-left" | "circle-arrow-out-down-right" | "circle-arrow-out-up-left" | "circle-arrow-out-up-right" | "circle-arrow-right" | "circle-arrow-up" | "circle-chevron-down" | "circle-chevron-left" | "circle-chevron-right" | "circle-chevron-up" | "circle-fading-arrow-up" | "clipboard-copy" | "clipboard-paste" | "cloud-backup" | "cloud-download" | "cloud-sync" | "cloud-upload" | "corner-down-left" | "corner-down-right" | "corner-left-down" | "corner-left-up" | "corner-right-down" | "corner-right-up" | "corner-up-left" | "corner-up-right" | "database-backup" | "decimals-arrow-left" | "decimals-arrow-right" | "expand" | "external-link" | "fast-forward" | "file-down" | "file-input" | "file-output" | "file-up" | "fold-horizontal" | "fold-vertical" | "folder-down" | "folder-input" | "folder-output" | "folder-sync" | "folder-up" | "git-compare-arrows" | "git-pull-request-arrow" | "git-pull-request-create-arrow" | "hard-drive-download" | "hard-drive-upload" | "iteration-ccw" | "iteration-cw" | "lasso-select" | "list-chevrons-down-up" | "list-chevrons-up-down" | "maximize-2" | "merge" | "milestone" | "minimize-2" | "mouse-pointer" | "mouse-pointer-2" | "mouse-pointer-2-off" | "mouse-pointer-ban" | "move-diagonal" | "move-diagonal-2" | "move-down" | "move-down-left" | "move-down-right" | "move-horizontal" | "move-left" | "move-right" | "move-up" | "move-up-left" | "move-up-right" | "move-vertical" | "panel-bottom-close" | "panel-bottom-open" | "panel-left-open" | "panel-right-close" | "panel-right-open" | "panel-top-close" | "panel-top-open" | "phone-forwarded" | "phone-incoming" | "phone-outgoing" | "play" | "redo" | "redo-2" | "redo-dot" | "refresh-ccw" | "refresh-ccw-dot" | "refresh-cw" | "refresh-cw-off" | "repeat-2" | "repeat-off" | "rewind" | "rotate-ccw-square" | "rotate-cw" | "rotate-cw-square" | "separator-horizontal" | "separator-vertical" | "shrink" | "shuffle" | "signpost" | "signpost-big" | "skip-back" | "skip-forward" | "spline-pointer" | "square-arrow-down" | "square-arrow-down-left" | "square-arrow-down-right" | "square-arrow-left" | "square-arrow-out-down-left" | "square-arrow-out-down-right" | "square-arrow-out-up-left" | "square-arrow-out-up-right" | "square-arrow-right" | "square-arrow-right-enter" | "square-arrow-right-exit" | "square-arrow-up" | "square-arrow-up-left" | "square-arrow-up-right" | "square-chevron-down" | "square-chevron-left" | "square-chevron-right" | "square-chevron-up" | "square-dashed-mouse-pointer" | "square-mouse-pointer" | "square-play" | "step-back" | "step-forward" | "sunrise" | "sunset" | "text-wrap" | "trending-down" | "trending-up" | "trending-up-down" | "undo" | "undo-2" | "undo-dot" | "unfold-horizontal" | "unfold-vertical" | "upload" | "chart-area" | "chart-bar" | "chart-bar-big" | "chart-bar-decreasing" | "chart-bar-increasing" | "chart-bar-stacked" | "chart-candlestick" | "chart-column" | "chart-column-big" | "chart-column-decreasing" | "chart-column-increasing" | "chart-column-stacked" | "chart-gantt" | "chart-line" | "chart-network" | "chart-no-axes-column" | "chart-no-axes-column-decreasing" | "chart-no-axes-column-increasing" | "chart-no-axes-combined" | "chart-no-axes-gantt" | "chart-pie" | "chart-scatter" | "chart-spline" | "folder-kanban" | "kanban" | "square-chart-gantt" | "square-dashed-kanban" | "square-kanban" | "antenna" | "audio-lines" | "audio-waveform" | "camera" | "camera-off" | "chevrons-left-right-ellipsis" | "circle-fading-plus" | "ethernet-port" | "hand-fist" | "headphone-off" | "mic" | "mic-off" | "newspaper" | "nfc" | "notebook" | "phone" | "phone-call" | "phone-missed" | "phone-off" | "projector" | "radar" | "screen-share" | "screen-share-off" | "send-horizontal" | "smartphone-nfc" | "smile-plus" | "spotlight" | "switch-camera" | "tv" | "video-off" | "volume" | "volume-1" | "volume-2" | "volume-off" | "volume-x" | "webcam" | "airplay" | "battery" | "battery-charging" | "battery-full" | "battery-low" | "battery-medium" | "battery-warning" | "bluetooth" | "bluetooth-connected" | "bluetooth-off" | "bluetooth-searching" | "cable" | "cast" | "circle-power" | "cloud-off" | "globe-off" | "globe-x" | "headphones" | "headset" | "house-wifi" | "monitor" | "monitor-check" | "monitor-cloud" | "monitor-cog" | "monitor-dot" | "monitor-down" | "monitor-off" | "monitor-pause" | "monitor-play" | "monitor-smartphone" | "monitor-speaker" | "monitor-stop" | "monitor-up" | "monitor-x" | "power-off" | "router" | "signal" | "signal-high" | "signal-low" | "signal-medium" | "signal-zero" | "smartphone" | "smartphone-charging" | "square-power" | "voicemail" | "wifi" | "wifi-cog" | "wifi-high" | "wifi-low" | "wifi-off" | "wifi-pen" | "wifi-sync" | "wifi-zero" | "zap-off" | "circle-plus" | "hand-grab" | "lasso" | "loader-circle" | "loader-pinwheel" | "pen-tool" | "pencil" | "pencil-off" | "pointer-off" | "square-dashed-text" | "stamp" | "text-cursor" | "a-arrow-down" | "a-arrow-up" | "a-large-small" | "app-window" | "app-window-mac" | "between-horizontal-end" | "between-horizontal-start" | "between-vertical-end" | "between-vertical-start" | "blend" | "book-type" | "bring-to-front" | "brush" | "brush-cleaning" | "columns-2" | "columns-3" | "columns-3-cog" | "columns-4" | "component" | "crop" | "dock" | "drafting-compass" | "flip-horizontal-2" | "flip-vertical-2" | "fullscreen" | "gallery-horizontal" | "gallery-horizontal-end" | "gallery-thumbnails" | "gallery-vertical" | "gallery-vertical-end" | "grid-2x2" | "grid-3x2" | "grid-3x3" | "heart-x" | "highlighter" | "layers-2" | "layers-minus" | "layers-plus" | "layout-dashboard" | "layout-grid" | "layout-list" | "layout-panel-left" | "line-style" | "magnet" | "maximize" | "minimize" | "paint-bucket" | "paint-roller" | "paintbrush" | "paintbrush-vertical" | "palette" | "panel-top" | "panels-top-left" | "pen" | "pen-line" | "pen-off" | "pencil-line" | "pencil-ruler" | "pipette" | "proportions" | "ratio" | "rectangle-horizontal" | "rectangle-vertical" | "rows-2" | "rows-3" | "rows-4" | "ruler" | "scaling" | "scissors" | "scissors-line-dashed" | "send-to-back" | "spray-can" | "square-dashed" | "square-scissors" | "squares-exclude" | "squares-intersect" | "squares-subtract" | "squares-unite" | "swatch-book" | "tablet-smartphone" | "vector-square" | "asterisk" | "astroid" | "binary" | "blocks" | "book" | "book-alert" | "book-check" | "book-copy" | "book-dashed" | "book-down" | "book-key" | "book-lock" | "book-marked" | "book-minus" | "book-open" | "book-open-check" | "book-open-text" | "book-plus" | "book-search" | "book-up" | "book-up-2" | "bot" | "bot-message-square" | "bot-off" | "box" | "boxes" | "braces" | "brackets" | "brain-circuit" | "brain-cog" | "bug" | "bug-off" | "bug-play" | "case-lower" | "case-upper" | "circle-dashed" | "circle-dot" | "circle-ellipsis" | "circle-slash" | "circle-slash-2" | "circle-x" | "circuit-board" | "cloud-alert" | "cloud-check" | "cloud-cog" | "code-xml" | "combine" | "command" | "computer" | "construction" | "database" | "database-search" | "database-zap" | "diff" | "divide" | "earth-lock" | "equal" | "equal-not" | "file-braces" | "file-diff" | "file-digit" | "file-sliders" | "file-stack" | "file-terminal" | "folder-code" | "folder-dot" | "folder-open-dot" | "folder-root" | "gem" | "git-branch" | "git-branch-minus" | "git-branch-plus" | "git-commit-horizontal" | "git-commit-vertical" | "git-compare" | "git-fork" | "git-graph" | "git-merge" | "git-merge-conflict" | "git-pull-request" | "git-pull-request-closed" | "git-pull-request-create" | "git-pull-request-draft" | "globe-lock" | "hard-drive" | "hexagon" | "keyboard" | "keyboard-off" | "library" | "library-big" | "list-indent-decrease" | "list-indent-increase" | "message-circle-code" | "message-square-code" | "message-square-diff" | "network" | "package" | "package-2" | "package-check" | "package-minus" | "package-open" | "package-plus" | "package-search" | "package-x" | "parentheses" | "percent" | "plug" | "plug-2" | "qr-code" | "regex" | "rocket" | "rss" | "scroll-text" | "search-code" | "server" | "server-cog" | "server-crash" | "server-off" | "shell" | "slash" | "spell-check" | "spell-check-2" | "square-code" | "square-dot" | "square-function" | "square-library" | "square-minus" | "square-plus" | "square-slash" | "square-stack" | "square-terminal" | "table-properties" | "terminal" | "tool-case" | "triangle-alert" | "unplug" | "variable" | "webhook" | "webhook-off" | "workflow" | "archive-restore" | "archive-x" | "book-image" | "calendar-fold" | "file-archive" | "file-badge" | "file-box" | "file-chart-column" | "file-chart-column-increasing" | "file-chart-line" | "file-chart-pie" | "file-check" | "file-clock" | "file-cog" | "file-headphone" | "file-image" | "file-key" | "file-lock" | "file-minus" | "file-pen" | "file-pen-line" | "file-play" | "file-plus" | "file-scan" | "file-search" | "file-spreadsheet" | "file-symlink" | "file-type" | "file-x" | "files" | "folder" | "folder-archive" | "folder-bookmark" | "folder-check" | "folder-clock" | "folder-closed" | "folder-cog" | "folder-key" | "folder-lock" | "folder-minus" | "folder-open" | "folder-pen" | "folder-plus" | "folder-search" | "folder-search-2" | "folder-tree" | "folder-x" | "folders" | "image-down" | "image-minus" | "image-off" | "image-play" | "image-plus" | "image-up" | "list-tree" | "music" | "save-all" | "save-off" | "table-cells-merge" | "table-cells-split" | "table-columns-split" | "table-rows-split" | "trash" | "trash-2" | "ungroup" | "align-center-horizontal" | "align-center-vertical" | "align-end-horizontal" | "align-end-vertical" | "align-horizontal-distribute-center" | "align-horizontal-distribute-end" | "align-horizontal-distribute-start" | "align-horizontal-justify-center" | "align-horizontal-justify-end" | "align-horizontal-justify-start" | "align-horizontal-space-around" | "align-horizontal-space-between" | "align-start-horizontal" | "align-start-vertical" | "align-vertical-distribute-center" | "align-vertical-distribute-end" | "align-vertical-distribute-start" | "align-vertical-justify-center" | "align-vertical-justify-end" | "align-vertical-justify-start" | "align-vertical-space-around" | "align-vertical-space-between" | "ellipsis-vertical" | "funnel" | "funnel-plus" | "funnel-x" | "grid-2x2-check" | "grid-2x2-plus" | "grid-2x2-x" | "grip" | "grip-horizontal" | "grip-vertical" | "layout-panel-top" | "layout-template" | "list-filter-plus" | "panel-bottom" | "panels-left-bottom" | "panels-right-bottom" | "square-menu" | "square-split-horizontal" | "square-split-vertical" | "stretch-horizontal" | "stretch-vertical" | "text-cursor-input" | "forward" | "mail-check" | "mail-minus" | "mail-open" | "mail-plus" | "mail-question-mark" | "mail-search" | "mail-warning" | "mail-x" | "mailbox" | "mails" | "reply" | "reply-all" | "alarm-clock" | "alarm-clock-check" | "alarm-clock-minus" | "alarm-clock-off" | "alarm-clock-plus" | "bell-electric" | "bell-minus" | "bell-off" | "bell-plus" | "bell-ring" | "check-check" | "check-line" | "circle-alert" | "circle-check" | "circle-check-big" | "copy-check" | "copy-x" | "laptop-minimal-check" | "megaphone" | "megaphone-off" | "message-circle-warning" | "message-square-dot" | "message-square-warning" | "octagon-alert" | "octagon-x" | "square-check" | "square-check-big" | "square-x" | "badge-check" | "badge-minus" | "badge-percent" | "badge-plus" | "badge-x" | "book-heart" | "circle-percent" | "hand-heart" | "hash" | "heart" | "heart-off" | "message-circle" | "message-circle-dashed" | "message-circle-heart" | "message-circle-more" | "message-circle-off" | "message-circle-question-mark" | "message-circle-reply" | "message-square" | "message-square-dashed" | "message-square-heart" | "message-square-lock" | "message-square-more" | "message-square-off" | "message-square-plus" | "message-square-quote" | "message-square-reply" | "message-square-share" | "message-square-text" | "message-square-x" | "notebook-pen" | "notebook-text" | "notepad-text" | "notepad-text-dashed" | "podcast" | "scan" | "menu-line" | "search-line" | "search-alert" | "search-check" | "search-slash" | "search-x" | "square-activity" | "square-percent" | "star-half" | "star-off" | "sticky-note" | "store" | "shopping-bag" | "vote" | "book-text" | "book-x" | "case-sensitive" | "clipboard" | "clipboard-check" | "clipboard-clock" | "clipboard-list" | "clipboard-minus" | "clipboard-pen" | "clipboard-pen-line" | "clipboard-plus" | "clipboard-type" | "clipboard-x" | "copy-minus" | "copy-plus" | "copyright" | "eraser" | "heading-1" | "heading-2" | "heading-3" | "heading-4" | "heading-5" | "heading-6" | "link-2-off" | "list-check" | "list-checks" | "list-collapse" | "list-end" | "list-filter" | "list-minus" | "list-ordered" | "list-plus" | "list-restart" | "list-start" | "list-todo" | "list-x" | "logs" | "quote" | "remove-formatting" | "replace-all" | "scan-text" | "sigma" | "signature" | "square-pen" | "strikethrough" | "subscript" | "superscript" | "table-of-contents" | "text-align-center" | "text-align-end" | "text-align-justify" | "text-align-start" | "text-quote" | "text-search" | "unlink" | "unlink-2" | "whole-word" | "calendar-1" | "calendar-arrow-down" | "calendar-arrow-up" | "calendar-check" | "calendar-check-2" | "calendar-clock" | "calendar-cog" | "calendar-days" | "calendar-minus" | "calendar-off" | "calendar-plus" | "calendar-range" | "calendar-search" | "calendar-x" | "calendars" | "clock-alert" | "clock-arrow-down" | "clock-arrow-up" | "clock-check" | "clock-plus" | "hourglass" | "timeline" | "timer-off" | "timer-reset" | "watch" | "bolt" | "diamond-minus" | "diamond-plus" | "hammer" | "telescope")[];
|
package/dist/index.d.ts
CHANGED
|
@@ -63,6 +63,7 @@ export { CHAT_LIST_PINNED_ID, CHAT_LIST_UNGROUPED_ID, default as ChatList, match
|
|
|
63
63
|
export { CLARIFY_DOCK_MAX_OPTIONS, CLARIFY_DOCK_SKIPPED_LABEL, CLARIFY_DOCK_SKIPPED_VALUE, ClarifyDockPanel, ClarifyDockTrigger, clarifyDockLayoutId, parseClarifyBoundDate, toISODate, useClarifyDockState, type ClarifyDockAnswerItem, type ClarifyDockHostMessage, type ClarifyDockMessageState, type ClarifyDockPanelProps, type ClarifyDockQuestion, type ClarifyDockResolvePayload, type ClarifyDockSpec, type ClarifyDockState, type ClarifyDockTriggerProps, type ClarifyInput, type ClarifyOption, } from './clarify-dock';
|
|
64
64
|
export { default as CodeBlock, type CodeBlockProps } from './code-block';
|
|
65
65
|
export { default as Composer, type ComposerProps, type ComposerRef, type ComposerSkillSlotProps, type ComposerTool, type ComposerToolConfig, } from './composer';
|
|
66
|
+
export type { ComposerInsertOptions, ComposerInsertPart, ComposerInsertResult, } from './composer/insert';
|
|
66
67
|
export { type ComposerParamPanelContext } from './composer/param-panel';
|
|
67
68
|
export { default as ErrorBlock, type ErrorBlockProps } from './error-block';
|
|
68
69
|
export { default as Fab, type FabProps } from './fab';
|
|
@@ -80,6 +81,6 @@ export { default as Suggestions, type SuggestionsProps } from './suggestions';
|
|
|
80
81
|
export { default as UserBubble, type UserBubbleProps } from './user-bubble';
|
|
81
82
|
export { default as Welcome, type WelcomeProps } from './welcome';
|
|
82
83
|
export { ComposerSegmentType } from './_genui-types';
|
|
83
|
-
export type { AgentEvent, Attachment, ChatMessage, ChipData, ComposerInvocationSegment, ComposerMentionSegment, ComposerSegment, ComposerTextSegment, Conversation, InlineRefState, InvocationData, MentionData, MessageSnapshot, PreviewTab, PreviewTarget, SendMeta, SkillItem, Source, TextData, ToolCall, ToolStatus, } from './_genui-types';
|
|
84
|
+
export type { AgentEvent, Attachment, ChatMessage, ChipData, ComposerHintSegment, ComposerInvocationSegment, ComposerMentionSegment, ComposerSegment, ComposerTextSegment, Conversation, HintData, InlineRefState, InvocationData, MentionData, MessageSnapshot, PreviewTab, PreviewTarget, SendMeta, SkillItem, Source, TextData, ToolCall, ToolStatus, } from './_genui-types';
|
|
84
85
|
export type { InterruptBase, InterruptIntent, InterruptStatus, } from './_interrupt-types';
|
|
85
|
-
export { isInvocationSegment, isMentionSegment, isTextSegment, rawValueToSegments, segmentsHasContent, segmentsToReadableText, type SegmentsToReadableTextOptions, } from './composer/segments';
|
|
86
|
+
export { isHintSegment, isInvocationSegment, isMentionSegment, isTextSegment, rawValueToSegments, resolveHintTarget, segmentsHasContent, segmentsToReadableText, type ComposerHintTarget, type SegmentsToReadableTextOptions, } from './composer/segments';
|
package/dist/index.js
CHANGED
|
@@ -87,4 +87,4 @@ export { default as Welcome } from "./welcome";
|
|
|
87
87
|
|
|
88
88
|
// GenUI shared modules
|
|
89
89
|
export { ComposerSegmentType } from "./_genui-types";
|
|
90
|
-
export { isInvocationSegment, isMentionSegment, isTextSegment, rawValueToSegments, segmentsHasContent, segmentsToReadableText } from "./composer/segments";
|
|
90
|
+
export { isHintSegment, isInvocationSegment, isMentionSegment, isTextSegment, rawValueToSegments, resolveHintTarget, segmentsHasContent, segmentsToReadableText } from "./composer/segments";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ComposerSegment } from '../_genui-types';
|
|
3
|
-
/** segments
|
|
3
|
+
/** segments 是否含可见正文(文本非空、含内联引用,或含派生 hint)。 */
|
|
4
4
|
export declare function segmentsHaveVisibleContent(segments: ComposerSegment[]): boolean;
|
|
5
5
|
/**
|
|
6
6
|
* 将 `ComposerSegment[]` 渲染为 UserBubble 正文(只读 Invocation / Mention + 文本)。
|
|
@@ -3,10 +3,10 @@ import { Invocation } from "../invocation";
|
|
|
3
3
|
import { Mention } from "../mention";
|
|
4
4
|
import { highlightQueryText } from "../stream-text/highlight-query-text";
|
|
5
5
|
|
|
6
|
-
/** segments
|
|
6
|
+
/** segments 是否含可见正文(文本非空、含内联引用,或含派生 hint)。 */
|
|
7
7
|
export function segmentsHaveVisibleContent(segments) {
|
|
8
8
|
return segments.some(function (s) {
|
|
9
|
-
return s.type === 'invocation' || s.type === 'mention' || s.type === 'text' && s.data.text.trim().length > 0;
|
|
9
|
+
return s.type === 'invocation' || s.type === 'mention' || s.type === 'hint' || s.type === 'text' && s.data.text.trim().length > 0;
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
|
|
@@ -38,6 +38,15 @@ export function renderSegmentsContent(segments, highlightQuery) {
|
|
|
38
38
|
key: key,
|
|
39
39
|
data: seg.data
|
|
40
40
|
}));
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (seg.type === 'hint') {
|
|
44
|
+
/* 派生 hint:与 Composer 内一致用次级色,读起来仍是 prompt 正文的一部分,
|
|
45
|
+
* 但用户能一眼看出这段是 skill 自带的模板文案而非自己敲的。 */
|
|
46
|
+
nodes.push( /*#__PURE__*/React.createElement("span", {
|
|
47
|
+
key: key,
|
|
48
|
+
"data-odn-segment-hint": true
|
|
49
|
+
}, highlightQueryText(seg.data.text, highlightQuery)));
|
|
41
50
|
}
|
|
42
51
|
});
|
|
43
52
|
if (nodes.length === 0) return null;
|
|
@@ -34,6 +34,14 @@
|
|
|
34
34
|
font-size: inherit;
|
|
35
35
|
line-height: inherit;
|
|
36
36
|
}
|
|
37
|
+
[data-odn-user-bubble-text] {
|
|
38
|
+
/* 派生 hint 段:与 Composer 内保持同一套「skill 模板文案」视觉 */
|
|
39
|
+
}
|
|
40
|
+
[data-odn-user-bubble-text] [data-odn-segment-hint] {
|
|
41
|
+
font-size: inherit;
|
|
42
|
+
line-height: inherit;
|
|
43
|
+
color: var(--odn-color-black-8);
|
|
44
|
+
}
|
|
37
45
|
|
|
38
46
|
[data-odn-user-bubble-images] {
|
|
39
47
|
display: flex;
|