@block-kit/plugin 1.0.0 → 1.0.3
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/es/bullet-list/index.js +6 -10
- package/dist/es/{is-2b264ec8.js → bullet-list/utils/is.js} +2 -2
- package/dist/es/bullet-list/view/list.js +9 -0
- package/dist/es/divider/index.js +4 -4
- package/dist/es/emoji/index.js +1 -1
- package/dist/es/image/index.js +11 -121
- package/dist/es/image/view/image.js +39 -0
- package/dist/es/image/view/wrapper.js +91 -0
- package/dist/es/indent/index.js +2 -2
- package/dist/es/index.css +1 -1
- package/dist/es/index.d.ts +1 -1
- package/dist/es/index.js +10 -24
- package/dist/es/inline-code/index.js +1 -1
- package/dist/es/link/index.js +5 -17
- package/dist/es/link/view/a.js +18 -0
- package/dist/es/mention/index.js +28 -13
- package/dist/es/mention/modules/suggest.js +98 -0
- package/dist/es/mention/utils/constant.js +24 -0
- package/dist/es/mention/view/suggest.js +72 -0
- package/dist/es/order-list/index.js +9 -148
- package/dist/es/order-list/utils/format.js +75 -0
- package/dist/es/order-list/utils/is.js +12 -0
- package/dist/es/order-list/utils/serial.js +68 -0
- package/dist/es/order-list/view/list.js +10 -0
- package/dist/es/quote/index.js +3 -3
- package/dist/es/{selection-badfb0bc.js → shared/components/selection.js} +3 -31
- package/dist/es/shared/icons/divider.js +5 -0
- package/dist/es/shared/icons/emoji.js +5 -0
- package/dist/es/shared/icons/font-color.js +5 -0
- package/dist/es/shared/icons/font-size.js +5 -0
- package/dist/es/shared/icons/justify.js +5 -0
- package/dist/es/shared/icons/line-height.js +5 -0
- package/dist/es/shared/icons/text.js +5 -0
- package/dist/es/shared/modules/selection.js +32 -0
- package/dist/es/{dom-71a99400.js → shared/utils/dom.js} +1 -1
- package/dist/es/shared/utils/event.js +5 -0
- package/dist/es/{is-3de778e2.js → shared/utils/is.js} +1 -1
- package/dist/es/shortcut/index.js +8 -27
- package/dist/es/shortcut/modules/preset.js +23 -0
- package/dist/es/toolbar/context/basic.js +69 -0
- package/dist/es/toolbar/context/float.js +67 -0
- package/dist/es/toolbar/context/provider.js +12 -0
- package/dist/es/toolbar/index.d.ts +1 -1
- package/dist/es/toolbar/index.js +45 -34
- package/dist/es/toolbar/modules/align.js +24 -0
- package/dist/es/toolbar/modules/bold.js +16 -0
- package/dist/es/toolbar/modules/bullet-list.js +17 -0
- package/dist/es/toolbar/modules/cut.js +7 -0
- package/dist/es/toolbar/modules/divider.js +15 -0
- package/dist/es/toolbar/modules/emoji.js +26 -0
- package/dist/es/toolbar/modules/font-color.js +50 -0
- package/dist/es/toolbar/modules/font-size.js +21 -0
- package/dist/es/toolbar/modules/heading.js +23 -0
- package/dist/es/toolbar/modules/history.js +35 -0
- package/dist/es/toolbar/modules/image.js +15 -0
- package/dist/es/toolbar/modules/inline-code.js +15 -0
- package/dist/es/toolbar/modules/italic.js +16 -0
- package/dist/es/toolbar/modules/line-height.js +17 -0
- package/dist/es/toolbar/modules/link.js +99 -0
- package/dist/es/toolbar/modules/order-list.js +17 -0
- package/dist/es/toolbar/modules/quote.js +15 -0
- package/dist/es/toolbar/modules/strike.js +15 -0
- package/dist/es/toolbar/modules/underline.js +15 -0
- package/dist/es/{marks-ac0ec630.js → toolbar/utils/marks.js} +1 -5
- package/dist/lib/bullet-list/index.js +21 -25
- package/dist/lib/{is-fa1755d0.js → bullet-list/utils/is.js} +3 -1
- package/dist/lib/bullet-list/view/list.js +13 -0
- package/dist/lib/divider/index.js +7 -7
- package/dist/lib/emoji/index.js +1 -1
- package/dist/lib/image/index.js +10 -120
- package/dist/lib/image/view/image.js +47 -0
- package/dist/lib/image/view/wrapper.js +99 -0
- package/dist/lib/indent/index.js +3 -3
- package/dist/lib/index.css +1 -1
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.js +24 -38
- package/dist/lib/inline-code/index.js +1 -1
- package/dist/lib/link/index.js +3 -15
- package/dist/lib/link/view/a.js +22 -0
- package/dist/lib/mention/index.js +26 -15
- package/dist/lib/mention/modules/suggest.js +106 -0
- package/dist/lib/mention/utils/constant.js +29 -0
- package/dist/lib/mention/view/suggest.js +76 -0
- package/dist/lib/order-list/index.js +34 -173
- package/dist/lib/order-list/utils/format.js +79 -0
- package/dist/lib/{is-18806678.js → order-list/utils/is.js} +4 -2
- package/dist/lib/order-list/utils/serial.js +72 -0
- package/dist/lib/order-list/view/list.js +14 -0
- package/dist/lib/quote/index.js +12 -12
- package/dist/lib/{selection-868f15c1.js → shared/components/selection.js} +2 -29
- package/dist/lib/shared/icons/divider.js +9 -0
- package/dist/lib/shared/icons/emoji.js +9 -0
- package/dist/lib/shared/icons/font-color.js +9 -0
- package/dist/lib/shared/icons/font-size.js +9 -0
- package/dist/lib/shared/icons/justify.js +9 -0
- package/dist/lib/shared/icons/line-height.js +9 -0
- package/dist/lib/shared/icons/text.js +9 -0
- package/dist/lib/shared/modules/selection.js +36 -0
- package/dist/lib/{dom-cb8b8e40.js → shared/utils/dom.js} +2 -0
- package/dist/lib/shared/utils/event.js +9 -0
- package/dist/lib/{is-473d664a.js → shared/utils/is.js} +2 -0
- package/dist/lib/shortcut/index.js +11 -30
- package/dist/lib/shortcut/modules/preset.js +27 -0
- package/dist/lib/toolbar/context/basic.js +73 -0
- package/dist/lib/toolbar/context/float.js +75 -0
- package/dist/lib/toolbar/context/provider.js +21 -0
- package/dist/lib/toolbar/index.d.ts +1 -1
- package/dist/lib/toolbar/index.js +45 -38
- package/dist/lib/toolbar/modules/align.js +36 -0
- package/dist/lib/toolbar/modules/bold.js +24 -0
- package/dist/lib/toolbar/modules/bullet-list.js +25 -0
- package/dist/lib/toolbar/modules/cut.js +11 -0
- package/dist/lib/toolbar/modules/divider.js +19 -0
- package/dist/lib/toolbar/modules/emoji.js +35 -0
- package/dist/lib/toolbar/modules/font-color.js +59 -0
- package/dist/lib/toolbar/modules/font-size.js +31 -0
- package/dist/lib/toolbar/modules/heading.js +35 -0
- package/dist/lib/toolbar/modules/history.js +44 -0
- package/dist/lib/toolbar/modules/image.js +23 -0
- package/dist/lib/toolbar/modules/inline-code.js +23 -0
- package/dist/lib/toolbar/modules/italic.js +24 -0
- package/dist/lib/toolbar/modules/line-height.js +27 -0
- package/dist/lib/toolbar/modules/link.js +114 -0
- package/dist/lib/toolbar/modules/order-list.js +25 -0
- package/dist/lib/toolbar/modules/quote.js +23 -0
- package/dist/lib/toolbar/modules/strike.js +23 -0
- package/dist/lib/toolbar/modules/underline.js +23 -0
- package/dist/lib/{marks-a30b8a0f.js → toolbar/utils/marks.js} +1 -4
- package/dist/styles/index.css +1 -0
- package/package.json +7 -6
- package/dist/es/index-1e46887d.js +0 -205
- package/dist/es/index-ddc2e5ac.js +0 -493
- package/dist/es/is-7f3ae820.js +0 -12
- package/dist/lib/index-f50053bf.js +0 -506
- package/dist/lib/index-ffc4bb34.js +0 -212
- /package/dist/es/{tslib.es6-83956cc1.js → tslib.es6-910e0469.js} +0 -0
- /package/dist/lib/{tslib.es6-d44c9a95.js → tslib.es6-9953fd0d.js} +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var tslib_es6 = require('../tslib.es6-
|
|
5
|
+
var tslib_es6 = require('../tslib.es6-9953fd0d.js');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
var core = require('@block-kit/core');
|
|
8
8
|
var delta = require('@block-kit/delta');
|
|
@@ -10,151 +10,12 @@ var react = require('@block-kit/react');
|
|
|
10
10
|
var utils = require('@block-kit/utils');
|
|
11
11
|
var bulletList_types_index = require('../bullet-list/types/index.js');
|
|
12
12
|
var indent_types_index = require('../indent/types/index.js');
|
|
13
|
-
var
|
|
14
|
-
var
|
|
13
|
+
var shared_utils_dom = require('../shared/utils/dom.js');
|
|
14
|
+
var shared_utils_is = require('../shared/utils/is.js');
|
|
15
15
|
var orderList_types_index = require('./types/index.js');
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
* 批量刷新选区的列表序号 [批量刷新简单方便]
|
|
20
|
-
* - 从选区开始的第一个列表项开始,逐个刷新序号
|
|
21
|
-
* - 全量刷新序号数据, 最后需要在渲染时批量刷新
|
|
22
|
-
* @param editor
|
|
23
|
-
* @param sel
|
|
24
|
-
*/
|
|
25
|
-
const applyNewOrderList = (editor, range) => {
|
|
26
|
-
const sel = range || editor.selection.get();
|
|
27
|
-
if (!sel)
|
|
28
|
-
return void 0;
|
|
29
|
-
const startPoint = sel.start;
|
|
30
|
-
const block = editor.state.block;
|
|
31
|
-
let start = startPoint.line;
|
|
32
|
-
const selStartLine = block.getLine(sel.start.line);
|
|
33
|
-
const selEndLine = block.getLine(sel.end.line);
|
|
34
|
-
const selEndNextLine = selEndLine && selEndLine.next();
|
|
35
|
-
// 如果当前行不是列表项,且选区结尾下一行是列表项,则从下一行开始探查
|
|
36
|
-
if (selStartLine &&
|
|
37
|
-
!is.isOrderList(selStartLine.attributes) &&
|
|
38
|
-
selEndNextLine &&
|
|
39
|
-
is.isOrderList(selEndNextLine.attributes)) {
|
|
40
|
-
start++;
|
|
41
|
-
}
|
|
42
|
-
// 如果 start 的行属性不存在列表项, 则无需刷新
|
|
43
|
-
const currentLine = block.getLine(start);
|
|
44
|
-
if (!currentLine || !is.isOrderList(currentLine.attributes)) {
|
|
45
|
-
return void 0;
|
|
46
|
-
}
|
|
47
|
-
// 向前查找到第一个列表项
|
|
48
|
-
while (--start >= 0) {
|
|
49
|
-
const line = block.getLine(start);
|
|
50
|
-
if (!line || !is.isOrderList(line.attributes)) {
|
|
51
|
-
start++;
|
|
52
|
-
break;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
const delta$1 = new delta.Delta();
|
|
56
|
-
const startLine = block.getLine(start);
|
|
57
|
-
if (!startLine)
|
|
58
|
-
return void 0;
|
|
59
|
-
delta$1.retain(startLine.start);
|
|
60
|
-
// 逐行刷新序号
|
|
61
|
-
const levelToIndex = {};
|
|
62
|
-
for (let i = start; i < block.size; i++) {
|
|
63
|
-
const line = block.getLine(i);
|
|
64
|
-
const attrs = line && line.attributes;
|
|
65
|
-
if (!line || !attrs || !is.isOrderList(attrs))
|
|
66
|
-
break;
|
|
67
|
-
const level = attrs[indent_types_index.INDENT_LEVEL_KEY];
|
|
68
|
-
// 重置序号
|
|
69
|
-
if (attrs[orderList_types_index.LIST_RESTART_KEY]) {
|
|
70
|
-
levelToIndex[level] = 1;
|
|
71
|
-
}
|
|
72
|
-
const index = levelToIndex[level] || 1;
|
|
73
|
-
levelToIndex[level] = index + 1;
|
|
74
|
-
delta$1.retain(line.length - 1);
|
|
75
|
-
delta$1.retain(1, { [orderList_types_index.LIST_START_KEY]: String(index) });
|
|
76
|
-
}
|
|
77
|
-
editor.state.apply(delta$1, { autoCaret: false });
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
const latinCache = {};
|
|
81
|
-
const romanCache = {};
|
|
82
|
-
const startToLatin = (start) => {
|
|
83
|
-
if (start < 1)
|
|
84
|
-
return "";
|
|
85
|
-
const cache = latinCache[start];
|
|
86
|
-
if (cache)
|
|
87
|
-
return cache;
|
|
88
|
-
// 1 -> a, 27 -> aa
|
|
89
|
-
let res = "";
|
|
90
|
-
let n = start - 1;
|
|
91
|
-
while (n >= 0) {
|
|
92
|
-
res = String.fromCharCode((n % 26) + 97) + res;
|
|
93
|
-
n = Math.floor(n / 26) - 1;
|
|
94
|
-
}
|
|
95
|
-
latinCache[start] = res;
|
|
96
|
-
return res;
|
|
97
|
-
};
|
|
98
|
-
const startToRoman = (start) => {
|
|
99
|
-
if (start < 1 || start > 5000)
|
|
100
|
-
return "";
|
|
101
|
-
const cache = romanCache[start];
|
|
102
|
-
if (cache)
|
|
103
|
-
return cache;
|
|
104
|
-
// https://github.com/bpampuch/pdfmake/blob/7af85/src/DocMeasure.js#L315
|
|
105
|
-
const lookup = {
|
|
106
|
-
m: 1000,
|
|
107
|
-
cm: 900,
|
|
108
|
-
d: 500,
|
|
109
|
-
cd: 400,
|
|
110
|
-
c: 100,
|
|
111
|
-
xc: 90,
|
|
112
|
-
l: 50,
|
|
113
|
-
xl: 40,
|
|
114
|
-
x: 10,
|
|
115
|
-
ix: 9,
|
|
116
|
-
v: 5,
|
|
117
|
-
iv: 4,
|
|
118
|
-
i: 1,
|
|
119
|
-
};
|
|
120
|
-
let res = "";
|
|
121
|
-
let n = start;
|
|
122
|
-
for (const i of Object.keys(lookup)) {
|
|
123
|
-
while (n >= lookup[i]) {
|
|
124
|
-
res = res + i;
|
|
125
|
-
n = n - lookup[i];
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
romanCache[start] = res;
|
|
129
|
-
return res;
|
|
130
|
-
};
|
|
131
|
-
/**
|
|
132
|
-
* 序列化有序列表前缀值
|
|
133
|
-
* @param start
|
|
134
|
-
* @param level
|
|
135
|
-
*/
|
|
136
|
-
const formatListLevel = (start, level) => {
|
|
137
|
-
let serial = "";
|
|
138
|
-
const value = level % 3;
|
|
139
|
-
if (value === 0) {
|
|
140
|
-
// 1 -> 1
|
|
141
|
-
serial = start.toString();
|
|
142
|
-
}
|
|
143
|
-
else if (value === 1) {
|
|
144
|
-
// 1 -> a
|
|
145
|
-
serial = startToLatin(start);
|
|
146
|
-
}
|
|
147
|
-
else if (value === 2) {
|
|
148
|
-
// 1 -> i
|
|
149
|
-
serial = startToRoman(start);
|
|
150
|
-
}
|
|
151
|
-
return serial + ".";
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
const OrderListView = props => {
|
|
155
|
-
const { level, start, children } = props;
|
|
156
|
-
return (jsxRuntime.jsxs("ol", { className: "block-kit-order-list", children: [jsxRuntime.jsx("div", { contentEditable: false, className: "block-kit-order-indicator", onMouseDown: utils.preventNativeEvent, children: formatListLevel(start, level) }), jsxRuntime.jsx("li", { value: start, className: utils.cs("block-kit-order-item", `block-kit-li-level-${level % 3}`), children: children })] }));
|
|
157
|
-
};
|
|
16
|
+
var orderList_utils_is = require('./utils/is.js');
|
|
17
|
+
var orderList_utils_serial = require('./utils/serial.js');
|
|
18
|
+
var orderList_view_list = require('./view/list.js');
|
|
158
19
|
|
|
159
20
|
class OrderListPlugin extends react.EditorPlugin {
|
|
160
21
|
constructor(editor) {
|
|
@@ -168,12 +29,12 @@ class OrderListPlugin extends react.EditorPlugin {
|
|
|
168
29
|
this.editor.event.off(core.EDITOR_EVENT.KEY_DOWN, this.onKeyDown);
|
|
169
30
|
}
|
|
170
31
|
match(attrs) {
|
|
171
|
-
return
|
|
32
|
+
return orderList_utils_is.isOrderList(attrs);
|
|
172
33
|
}
|
|
173
34
|
renderLine(context) {
|
|
174
35
|
const level = Number(context.attributes[indent_types_index.INDENT_LEVEL_KEY]) || 0;
|
|
175
36
|
const start = Number(context.attributes[orderList_types_index.LIST_START_KEY]) || 1;
|
|
176
|
-
return (jsxRuntime.jsx(OrderListView, { level: level, start: start, editor: this.editor, context: context, children: context.children }));
|
|
37
|
+
return (jsxRuntime.jsx(orderList_view_list.OrderListView, { level: level, start: start, editor: this.editor, context: context, children: context.children }));
|
|
177
38
|
}
|
|
178
39
|
onExec(payload) {
|
|
179
40
|
const editor = this.editor;
|
|
@@ -183,7 +44,7 @@ class OrderListPlugin extends react.EditorPlugin {
|
|
|
183
44
|
const { start, end } = sel;
|
|
184
45
|
// 先检查当前需要设置/解除列表状态
|
|
185
46
|
const lines = editor.state.block.getLines().slice(start.line, end.line + 1);
|
|
186
|
-
const isList = lines.every(line =>
|
|
47
|
+
const isList = lines.every(line => orderList_utils_is.isOrderList(line.attributes));
|
|
187
48
|
// 计算需要操作的范围
|
|
188
49
|
const rawPoint = core.RawPoint.fromPoint(this.editor, core.Point.from(start.line, 0));
|
|
189
50
|
if (!rawPoint)
|
|
@@ -210,7 +71,7 @@ class OrderListPlugin extends react.EditorPlugin {
|
|
|
210
71
|
delta$1.retain(1, attrs);
|
|
211
72
|
}
|
|
212
73
|
this.editor.state.apply(delta$1, { autoCaret: false });
|
|
213
|
-
applyNewOrderList(this.editor, sel);
|
|
74
|
+
orderList_utils_serial.applyNewOrderList(this.editor, sel);
|
|
214
75
|
}
|
|
215
76
|
onKeyDown(event, context) {
|
|
216
77
|
const sel = this.editor.selection.get();
|
|
@@ -224,10 +85,10 @@ class OrderListPlugin extends react.EditorPlugin {
|
|
|
224
85
|
const attrs = startLine.attributes;
|
|
225
86
|
// 当前行是列表行, 且按下回车键, 且选区折叠, 且当前行是空内容行
|
|
226
87
|
// => 处理列表的缩进等级
|
|
227
|
-
if (
|
|
228
|
-
|
|
88
|
+
if (shared_utils_is.isKeyCode(event, utils.KEY_CODE.ENTER) &&
|
|
89
|
+
orderList_utils_is.isOrderList(attrs) &&
|
|
229
90
|
sel.isCollapsed &&
|
|
230
|
-
|
|
91
|
+
shared_utils_is.isEmptyLine(startLine)) {
|
|
231
92
|
const level = Number(attrs[indent_types_index.INDENT_LEVEL_KEY]);
|
|
232
93
|
const nextAttrs = {};
|
|
233
94
|
if (level > 0) {
|
|
@@ -243,18 +104,18 @@ class OrderListPlugin extends react.EditorPlugin {
|
|
|
243
104
|
}
|
|
244
105
|
const delta$1 = new delta.Delta().retain(startLine.start + startLine.length - 1).retain(1, nextAttrs);
|
|
245
106
|
this.editor.state.apply(delta$1, { autoCaret: false });
|
|
246
|
-
applyNewOrderList(this.editor, sel);
|
|
247
|
-
|
|
107
|
+
orderList_utils_serial.applyNewOrderList(this.editor, sel);
|
|
108
|
+
shared_utils_dom.preventContextEvent(event, context);
|
|
248
109
|
return void 0;
|
|
249
110
|
}
|
|
250
111
|
// 当前行是列表行, 且按下回车键, 且选区折叠, 且位于行首, 且上一行是列表行
|
|
251
112
|
// => 继续编号, 避免默认的处理, 保持列表的连续性
|
|
252
|
-
if (
|
|
253
|
-
|
|
113
|
+
if (shared_utils_is.isKeyCode(event, utils.KEY_CODE.ENTER) &&
|
|
114
|
+
orderList_utils_is.isOrderList(attrs) &&
|
|
254
115
|
sel.isCollapsed &&
|
|
255
116
|
!sel.start.offset &&
|
|
256
117
|
prevLine &&
|
|
257
|
-
|
|
118
|
+
orderList_utils_is.isOrderList(prevLine.attributes)) {
|
|
258
119
|
const nextAttrs = Object.assign({}, prevLine.attributes);
|
|
259
120
|
if (attrs[indent_types_index.INDENT_LEVEL_KEY]) {
|
|
260
121
|
// 缩进层级优先取当前行的缩进层级
|
|
@@ -262,23 +123,23 @@ class OrderListPlugin extends react.EditorPlugin {
|
|
|
262
123
|
}
|
|
263
124
|
const delta$1 = new delta.Delta().retain(startLine.start).insertEOL(nextAttrs);
|
|
264
125
|
this.editor.state.apply(delta$1);
|
|
265
|
-
applyNewOrderList(this.editor, sel);
|
|
266
|
-
|
|
126
|
+
orderList_utils_serial.applyNewOrderList(this.editor, sel);
|
|
127
|
+
shared_utils_dom.preventContextEvent(event, context);
|
|
267
128
|
return void 0;
|
|
268
129
|
}
|
|
269
130
|
// 当前行是列表行, 且按下回车键
|
|
270
131
|
// => 在列表行内部插入换行符, 且携带列表状态
|
|
271
|
-
if (
|
|
132
|
+
if (shared_utils_is.isKeyCode(event, utils.KEY_CODE.ENTER) && orderList_utils_is.isOrderList(attrs)) {
|
|
272
133
|
this.editor.perform.insertBreak(sel, attrs);
|
|
273
|
-
applyNewOrderList(this.editor, sel);
|
|
274
|
-
|
|
134
|
+
orderList_utils_serial.applyNewOrderList(this.editor, sel);
|
|
135
|
+
shared_utils_dom.preventContextEvent(event, context);
|
|
275
136
|
return void 0;
|
|
276
137
|
}
|
|
277
138
|
// 当前行是列表行, 且折叠选区, 且在行首, 且按下退格键
|
|
278
139
|
// => 将当前行的列表状态移除, 保留缩进的等级
|
|
279
|
-
if (
|
|
140
|
+
if (shared_utils_is.isKeyCode(event, utils.KEY_CODE.BACKSPACE) &&
|
|
280
141
|
sel.isCollapsed &&
|
|
281
|
-
|
|
142
|
+
orderList_utils_is.isOrderList(attrs) &&
|
|
282
143
|
!sel.start.offset) {
|
|
283
144
|
const delta$1 = new delta.Delta().retain(startLine.start + startLine.length - 1).retain(1, {
|
|
284
145
|
[bulletList_types_index.LIST_TYPE_KEY]: utils.NIL,
|
|
@@ -286,24 +147,24 @@ class OrderListPlugin extends react.EditorPlugin {
|
|
|
286
147
|
[orderList_types_index.LIST_RESTART_KEY]: utils.NIL,
|
|
287
148
|
});
|
|
288
149
|
this.editor.state.apply(delta$1, { autoCaret: false });
|
|
289
|
-
applyNewOrderList(this.editor, sel);
|
|
290
|
-
|
|
150
|
+
orderList_utils_serial.applyNewOrderList(this.editor, sel);
|
|
151
|
+
shared_utils_dom.preventContextEvent(event, context);
|
|
291
152
|
return void 0;
|
|
292
153
|
}
|
|
293
154
|
// 当前行是列表行, 按下 Tab 键
|
|
294
155
|
// => 由列表的缩进状态调整列表的序号
|
|
295
|
-
if (
|
|
296
|
-
applyNewOrderList(this.editor, sel);
|
|
297
|
-
|
|
156
|
+
if (shared_utils_is.isKeyCode(event, utils.KEY_CODE.TAB) && orderList_utils_is.isOrderList(attrs)) {
|
|
157
|
+
orderList_utils_serial.applyNewOrderList(this.editor, sel);
|
|
158
|
+
shared_utils_dom.preventContextEvent(event, context);
|
|
298
159
|
return void 0;
|
|
299
160
|
}
|
|
300
161
|
// 处于当前行的行首, 且不存在其他行属性, 且前一行是列表行
|
|
301
162
|
// => 将当前上一行属性移到当前行, 且刷新列表值
|
|
302
|
-
if (
|
|
163
|
+
if (shared_utils_is.isKeyCode(event, utils.KEY_CODE.BACKSPACE) &&
|
|
303
164
|
!sel.start.offset &&
|
|
304
165
|
!Object.keys(attrs).length &&
|
|
305
166
|
prevLine &&
|
|
306
|
-
|
|
167
|
+
orderList_utils_is.isOrderList(prevLine.attributes)) {
|
|
307
168
|
const prevAttrs = Object.assign({}, prevLine.attributes);
|
|
308
169
|
const delta$1 = new delta.Delta()
|
|
309
170
|
.retain(startLine.start - 1)
|
|
@@ -311,8 +172,8 @@ class OrderListPlugin extends react.EditorPlugin {
|
|
|
311
172
|
.retain(startLine.length - 1)
|
|
312
173
|
.retain(1, prevAttrs);
|
|
313
174
|
this.editor.state.apply(delta$1);
|
|
314
|
-
applyNewOrderList(this.editor, sel);
|
|
315
|
-
|
|
175
|
+
orderList_utils_serial.applyNewOrderList(this.editor, sel);
|
|
176
|
+
shared_utils_dom.preventContextEvent(event, context);
|
|
316
177
|
return void 0;
|
|
317
178
|
}
|
|
318
179
|
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const latinCache = {};
|
|
6
|
+
const romanCache = {};
|
|
7
|
+
const startToLatin = (start) => {
|
|
8
|
+
if (start < 1)
|
|
9
|
+
return "";
|
|
10
|
+
const cache = latinCache[start];
|
|
11
|
+
if (cache)
|
|
12
|
+
return cache;
|
|
13
|
+
// 1 -> a, 27 -> aa
|
|
14
|
+
let res = "";
|
|
15
|
+
let n = start - 1;
|
|
16
|
+
while (n >= 0) {
|
|
17
|
+
res = String.fromCharCode((n % 26) + 97) + res;
|
|
18
|
+
n = Math.floor(n / 26) - 1;
|
|
19
|
+
}
|
|
20
|
+
latinCache[start] = res;
|
|
21
|
+
return res;
|
|
22
|
+
};
|
|
23
|
+
const startToRoman = (start) => {
|
|
24
|
+
if (start < 1 || start > 5000)
|
|
25
|
+
return "";
|
|
26
|
+
const cache = romanCache[start];
|
|
27
|
+
if (cache)
|
|
28
|
+
return cache;
|
|
29
|
+
// https://github.com/bpampuch/pdfmake/blob/7af85/src/DocMeasure.js#L315
|
|
30
|
+
const lookup = {
|
|
31
|
+
m: 1000,
|
|
32
|
+
cm: 900,
|
|
33
|
+
d: 500,
|
|
34
|
+
cd: 400,
|
|
35
|
+
c: 100,
|
|
36
|
+
xc: 90,
|
|
37
|
+
l: 50,
|
|
38
|
+
xl: 40,
|
|
39
|
+
x: 10,
|
|
40
|
+
ix: 9,
|
|
41
|
+
v: 5,
|
|
42
|
+
iv: 4,
|
|
43
|
+
i: 1,
|
|
44
|
+
};
|
|
45
|
+
let res = "";
|
|
46
|
+
let n = start;
|
|
47
|
+
for (const i of Object.keys(lookup)) {
|
|
48
|
+
while (n >= lookup[i]) {
|
|
49
|
+
res = res + i;
|
|
50
|
+
n = n - lookup[i];
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
romanCache[start] = res;
|
|
54
|
+
return res;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* 序列化有序列表前缀值
|
|
58
|
+
* @param start
|
|
59
|
+
* @param level
|
|
60
|
+
*/
|
|
61
|
+
const formatListLevel = (start, level) => {
|
|
62
|
+
let serial = "";
|
|
63
|
+
const value = level % 3;
|
|
64
|
+
if (value === 0) {
|
|
65
|
+
// 1 -> 1
|
|
66
|
+
serial = start.toString();
|
|
67
|
+
}
|
|
68
|
+
else if (value === 1) {
|
|
69
|
+
// 1 -> a
|
|
70
|
+
serial = startToLatin(start);
|
|
71
|
+
}
|
|
72
|
+
else if (value === 2) {
|
|
73
|
+
// 1 -> i
|
|
74
|
+
serial = startToRoman(start);
|
|
75
|
+
}
|
|
76
|
+
return serial + ".";
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
exports.formatListLevel = formatListLevel;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var bulletList_types_index = require('../../bullet-list/types/index.js');
|
|
6
|
+
var orderList_types_index = require('../types/index.js');
|
|
5
7
|
|
|
6
8
|
/**
|
|
7
9
|
* 检查有序列表
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var delta = require('@block-kit/delta');
|
|
6
|
+
var indent_types_index = require('../../indent/types/index.js');
|
|
7
|
+
var orderList_types_index = require('../types/index.js');
|
|
8
|
+
var orderList_utils_is = require('./is.js');
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 批量刷新选区的列表序号 [批量刷新简单方便]
|
|
12
|
+
* - 从选区开始的第一个列表项开始,逐个刷新序号
|
|
13
|
+
* - 全量刷新序号数据, 最后需要在渲染时批量刷新
|
|
14
|
+
* @param editor
|
|
15
|
+
* @param sel
|
|
16
|
+
*/
|
|
17
|
+
const applyNewOrderList = (editor, range) => {
|
|
18
|
+
const sel = range || editor.selection.get();
|
|
19
|
+
if (!sel)
|
|
20
|
+
return void 0;
|
|
21
|
+
const startPoint = sel.start;
|
|
22
|
+
const block = editor.state.block;
|
|
23
|
+
let start = startPoint.line;
|
|
24
|
+
const selStartLine = block.getLine(sel.start.line);
|
|
25
|
+
const selEndLine = block.getLine(sel.end.line);
|
|
26
|
+
const selEndNextLine = selEndLine && selEndLine.next();
|
|
27
|
+
// 如果当前行不是列表项,且选区结尾下一行是列表项,则从下一行开始探查
|
|
28
|
+
if (selStartLine &&
|
|
29
|
+
!orderList_utils_is.isOrderList(selStartLine.attributes) &&
|
|
30
|
+
selEndNextLine &&
|
|
31
|
+
orderList_utils_is.isOrderList(selEndNextLine.attributes)) {
|
|
32
|
+
start++;
|
|
33
|
+
}
|
|
34
|
+
// 如果 start 的行属性不存在列表项, 则无需刷新
|
|
35
|
+
const currentLine = block.getLine(start);
|
|
36
|
+
if (!currentLine || !orderList_utils_is.isOrderList(currentLine.attributes)) {
|
|
37
|
+
return void 0;
|
|
38
|
+
}
|
|
39
|
+
// 向前查找到第一个列表项
|
|
40
|
+
while (--start >= 0) {
|
|
41
|
+
const line = block.getLine(start);
|
|
42
|
+
if (!line || !orderList_utils_is.isOrderList(line.attributes)) {
|
|
43
|
+
start++;
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
const delta$1 = new delta.Delta();
|
|
48
|
+
const startLine = block.getLine(start);
|
|
49
|
+
if (!startLine)
|
|
50
|
+
return void 0;
|
|
51
|
+
delta$1.retain(startLine.start);
|
|
52
|
+
// 逐行刷新序号
|
|
53
|
+
const levelToIndex = {};
|
|
54
|
+
for (let i = start; i < block.size; i++) {
|
|
55
|
+
const line = block.getLine(i);
|
|
56
|
+
const attrs = line && line.attributes;
|
|
57
|
+
if (!line || !attrs || !orderList_utils_is.isOrderList(attrs))
|
|
58
|
+
break;
|
|
59
|
+
const level = attrs[indent_types_index.INDENT_LEVEL_KEY];
|
|
60
|
+
// 重置序号
|
|
61
|
+
if (attrs[orderList_types_index.LIST_RESTART_KEY]) {
|
|
62
|
+
levelToIndex[level] = 1;
|
|
63
|
+
}
|
|
64
|
+
const index = levelToIndex[level] || 1;
|
|
65
|
+
levelToIndex[level] = index + 1;
|
|
66
|
+
delta$1.retain(line.length - 1);
|
|
67
|
+
delta$1.retain(1, { [orderList_types_index.LIST_START_KEY]: String(index) });
|
|
68
|
+
}
|
|
69
|
+
editor.state.apply(delta$1, { autoCaret: false });
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
exports.applyNewOrderList = applyNewOrderList;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var utils = require('@block-kit/utils');
|
|
7
|
+
var orderList_utils_format = require('../utils/format.js');
|
|
8
|
+
|
|
9
|
+
const OrderListView = props => {
|
|
10
|
+
const { level, start, children } = props;
|
|
11
|
+
return (jsxRuntime.jsxs("ol", { className: "block-kit-order-list", children: [jsxRuntime.jsx("div", { contentEditable: false, className: "block-kit-order-indicator", onMouseDown: utils.preventNativeEvent, children: orderList_utils_format.formatListLevel(start, level) }), jsxRuntime.jsx("li", { value: start, className: utils.cs("block-kit-order-item", `block-kit-li-level-${level % 3}`), children: children })] }));
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
exports.OrderListView = OrderListView;
|
package/dist/lib/quote/index.js
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var tslib_es6 = require('../tslib.es6-
|
|
5
|
+
var tslib_es6 = require('../tslib.es6-9953fd0d.js');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
var core = require('@block-kit/core');
|
|
8
8
|
var delta = require('@block-kit/delta');
|
|
9
9
|
var react = require('@block-kit/react');
|
|
10
10
|
var utils = require('@block-kit/utils');
|
|
11
|
-
var
|
|
12
|
-
var
|
|
11
|
+
var shared_utils_dom = require('../shared/utils/dom.js');
|
|
12
|
+
var shared_utils_is = require('../shared/utils/is.js');
|
|
13
13
|
var quote_types_index = require('./types/index.js');
|
|
14
14
|
|
|
15
15
|
class QuotePlugin extends react.EditorPlugin {
|
|
@@ -73,21 +73,21 @@ class QuotePlugin extends react.EditorPlugin {
|
|
|
73
73
|
const attrs = startLine.attributes;
|
|
74
74
|
// 当前行是引用行, 且按下回车键, 且选区折叠, 且当前行是空行
|
|
75
75
|
// => 删除当前的引用行格式
|
|
76
|
-
if (
|
|
76
|
+
if (shared_utils_is.isKeyCode(event, utils.KEY_CODE.ENTER) &&
|
|
77
77
|
attrs[quote_types_index.QUOTE_KEY] &&
|
|
78
78
|
sel.isCollapsed &&
|
|
79
|
-
|
|
79
|
+
shared_utils_is.isEmptyLine(startLine)) {
|
|
80
80
|
const nextAttrs = {
|
|
81
81
|
[quote_types_index.QUOTE_KEY]: utils.NIL,
|
|
82
82
|
};
|
|
83
83
|
const delta$1 = new delta.Delta().retain(startLine.start + startLine.length - 1).retain(1, nextAttrs);
|
|
84
84
|
this.editor.state.apply(delta$1, { autoCaret: false });
|
|
85
|
-
|
|
85
|
+
shared_utils_dom.preventContextEvent(event, context);
|
|
86
86
|
return void 0;
|
|
87
87
|
}
|
|
88
88
|
// 当前行是引用行, 且按下回车键, 且选区折叠, 且位于行首, 且上一行是引用行
|
|
89
89
|
// => 继续引用格式, 避免默认的处理, 保持引用的连续性
|
|
90
|
-
if (
|
|
90
|
+
if (shared_utils_is.isKeyCode(event, utils.KEY_CODE.ENTER) &&
|
|
91
91
|
attrs[quote_types_index.QUOTE_KEY] &&
|
|
92
92
|
sel.isCollapsed &&
|
|
93
93
|
sel.start.offset === 0 &&
|
|
@@ -96,19 +96,19 @@ class QuotePlugin extends react.EditorPlugin {
|
|
|
96
96
|
const nextAttrs = Object.assign({}, prevLine.attributes);
|
|
97
97
|
const delta$1 = new delta.Delta().retain(startLine.start).insertEOL(nextAttrs);
|
|
98
98
|
this.editor.state.apply(delta$1);
|
|
99
|
-
|
|
99
|
+
shared_utils_dom.preventContextEvent(event, context);
|
|
100
100
|
return void 0;
|
|
101
101
|
}
|
|
102
102
|
// 当前行是引用行, 且按下回车键, 且非行首
|
|
103
103
|
// => 在引用行内部插入换行符, 且携带引用状态
|
|
104
|
-
if (
|
|
104
|
+
if (shared_utils_is.isKeyCode(event, utils.KEY_CODE.ENTER) && attrs[quote_types_index.QUOTE_KEY] && sel.start.offset) {
|
|
105
105
|
this.editor.perform.insertBreak(sel, attrs);
|
|
106
|
-
|
|
106
|
+
shared_utils_dom.preventContextEvent(event, context);
|
|
107
107
|
return void 0;
|
|
108
108
|
}
|
|
109
109
|
// 当前行是引用行, 且折叠选区, 且在行首, 且按下退格键
|
|
110
110
|
// => 将当前行的引用状态移除
|
|
111
|
-
if (
|
|
111
|
+
if (shared_utils_is.isKeyCode(event, utils.KEY_CODE.BACKSPACE) &&
|
|
112
112
|
sel.isCollapsed &&
|
|
113
113
|
attrs[quote_types_index.QUOTE_KEY] &&
|
|
114
114
|
!sel.start.offset) {
|
|
@@ -116,7 +116,7 @@ class QuotePlugin extends react.EditorPlugin {
|
|
|
116
116
|
.retain(startLine.start + startLine.length - 1)
|
|
117
117
|
.retain(1, { [quote_types_index.QUOTE_KEY]: utils.NIL });
|
|
118
118
|
this.editor.state.apply(delta$1, { autoCaret: false });
|
|
119
|
-
|
|
119
|
+
shared_utils_dom.preventContextEvent(event, context);
|
|
120
120
|
return void 0;
|
|
121
121
|
}
|
|
122
122
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
3
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
6
|
var core = require('@block-kit/core');
|
|
5
7
|
var react = require('@block-kit/react');
|
|
6
8
|
var utils = require('@block-kit/utils');
|
|
7
9
|
var React = require('react');
|
|
8
|
-
var tslib_es6 = require('./tslib.es6-d44c9a95.js');
|
|
9
10
|
|
|
10
11
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
12
|
|
|
@@ -57,32 +58,4 @@ class SelectionHOC extends React__default["default"].PureComponent {
|
|
|
57
58
|
}
|
|
58
59
|
SelectionHOC.contextType = react.ReadonlyContext;
|
|
59
60
|
|
|
60
|
-
class SelectionPlugin {
|
|
61
|
-
constructor(editor) {
|
|
62
|
-
this.editor = editor;
|
|
63
|
-
this.idToView = new Map();
|
|
64
|
-
editor.event.on(core.EDITOR_EVENT.SELECTION_CHANGE, this.onSelectionChange);
|
|
65
|
-
}
|
|
66
|
-
destroy() {
|
|
67
|
-
this.idToView.clear();
|
|
68
|
-
this.editor.event.off(core.EDITOR_EVENT.SELECTION_CHANGE, this.onSelectionChange);
|
|
69
|
-
}
|
|
70
|
-
mountView(id, view) {
|
|
71
|
-
this.idToView.set(id, view);
|
|
72
|
-
}
|
|
73
|
-
unmountView(id) {
|
|
74
|
-
this.idToView.delete(id);
|
|
75
|
-
}
|
|
76
|
-
onSelectionChange(e) {
|
|
77
|
-
const current = e.current;
|
|
78
|
-
this.idToView.forEach(view => {
|
|
79
|
-
view.onSelectionChange(current);
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
tslib_es6.__decorate([
|
|
84
|
-
utils.Bind
|
|
85
|
-
], SelectionPlugin.prototype, "onSelectionChange", null);
|
|
86
|
-
|
|
87
61
|
exports.SelectionHOC = SelectionHOC;
|
|
88
|
-
exports.SelectionPlugin = SelectionPlugin;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
const DividerIcon = () => (jsxRuntime.jsx("svg", { className: "arco-icon", viewBox: "0 0 1024 1024", xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "currentColor", children: jsxRuntime.jsx("path", { d: "M64.128 810.666667h128a21.333333 21.333333 0 0 1 21.333333 21.333333v42.666667a21.333333 21.333333 0 0 1-21.333333 21.333333h-128a21.333333 21.333333 0 0 1-21.333333-21.333333v-42.666667a21.333333 21.333333 0 0 1 21.333333-21.333333z m384 0h128a21.333333 21.333333 0 0 1 21.333333 21.333333v42.666667a21.333333 21.333333 0 0 1-21.333333 21.333333h-128a21.333333 21.333333 0 0 1-21.333333-21.333333v-42.666667a21.333333 21.333333 0 0 1 21.333333-21.333333z m384 0h128a21.333333 21.333333 0 0 1 21.333333 21.333333v42.666667a21.333333 21.333333 0 0 1-21.333333 21.333333h-128a21.333333 21.333333 0 0 1-21.333333-21.333333v-42.666667a21.333333 21.333333 0 0 1 21.333333-21.333333z m-768-682.666667h128a21.333333 21.333333 0 0 1 21.333333 21.333333v42.666667a21.333333 21.333333 0 0 1-21.333333 21.333333h-128a21.333333 21.333333 0 0 1-21.333333-21.333333V149.333333a21.333333 21.333333 0 0 1 21.333333-21.333333z m384 0h128a21.333333 21.333333 0 0 1 21.333333 21.333333v42.666667a21.333333 21.333333 0 0 1-21.333333 21.333333h-128a21.333333 21.333333 0 0 1-21.333333-21.333333V149.333333a21.333333 21.333333 0 0 1 21.333333-21.333333z m384 0h128a21.333333 21.333333 0 0 1 21.333333 21.333333v42.666667a21.333333 21.333333 0 0 1-21.333333 21.333333h-128a21.333333 21.333333 0 0 1-21.333333-21.333333V149.333333a21.333333 21.333333 0 0 1 21.333333-21.333333zM64 469.333333h896a21.333333 21.333333 0 0 1 21.333333 21.333334v42.666666a21.333333 21.333333 0 0 1-21.333333 21.333334H64a21.333333 21.333333 0 0 1-21.333333-21.333334v-42.666666a21.333333 21.333333 0 0 1 21.333333-21.333334z" }) }));
|
|
8
|
+
|
|
9
|
+
exports.DividerIcon = DividerIcon;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
const EmojiIcon = () => (jsxRuntime.jsxs("svg", { className: "arco-icon", viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", "p-id": "5996", width: "1em", height: "1em", fill: "currentColor", children: [jsxRuntime.jsx("path", { d: "M512 128a384 384 0 1 0 0 768 384 384 0 0 0 0-768zM42.666667 512C42.666667 252.8 252.8 42.666667 512 42.666667s469.333333 210.133333 469.333333 469.333333-210.133333 469.333333-469.333333 469.333333S42.666667 771.2 42.666667 512z m533.333333-64a42.666667 42.666667 0 0 1 42.666667-42.666667h85.333333a42.666667 42.666667 0 1 1 0 85.333334h-85.333333a42.666667 42.666667 0 0 1-42.666667-42.666667z m-254.165333 193.834667a42.666667 42.666667 0 0 1 60.330666 0 183.594667 183.594667 0 0 0 259.669334 0 42.666667 42.666667 0 0 1 60.330666 60.330666 268.928 268.928 0 0 1-380.330666 0 42.666667 42.666667 0 0 1 0-60.330666z" }), jsxRuntime.jsx("path", { d: "M362.666667 362.666667a42.666667 42.666667 0 0 1 42.666666 42.666666v80a42.666667 42.666667 0 0 1-85.333333 0V405.333333a42.666667 42.666667 0 0 1 42.666667-42.666666z" })] }));
|
|
8
|
+
|
|
9
|
+
exports.EmojiIcon = EmojiIcon;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
const FontColorIcon = () => (jsxRuntime.jsx("svg", { className: "arco-icon", viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "currentColor", children: jsxRuntime.jsx("path", { d: "M594.9 842.3h-94.3l-67.4-180.9H158L94.4 842.3H0.1l251.7-660.9h91.3l251.8 660.9zM406.7 586.7l-99.8-274.8c-3.1-8.8-6.5-24.2-10.2-46.1h-2.1c-3.1 19.9-6.7 35.3-10.7 46.1l-99 274.8h221.8z m284.2-183.4c46.9-29.3 101.1-43.9 162.6-43.9 113.8 0 170.7 59.7 170.7 179.2v303.8h-82.8v-73h-2.1c-32.7 56-80.9 84.1-144.6 84.1-45.8 0-82.2-12.4-109.2-37.1-27-24.7-40.5-58.2-40.5-100.3 0-88.2 52.2-139.5 156.6-154l139.9-19.6c0-77.1-31.9-115.6-95.6-115.6-56.6 0-108.2 19.1-154.9 57.2v-80.8z m139.9 217.1c-38.7 5.1-65.4 14.8-80 29-14.7 14.2-22 34.1-22 59.7 0 22.5 8 40.8 23.9 55 15.9 14.2 37 21.3 63.1 21.3 36.4 0 66.4-12.8 90-38.4 23.6-25.6 35.4-57.7 35.4-96.4v-45.2l-110.4 15z" }) }));
|
|
8
|
+
|
|
9
|
+
exports.FontColorIcon = FontColorIcon;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
const FontSizeIcon = () => (jsxRuntime.jsxs("svg", { className: "arco-icon", viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "currentColor", children: [jsxRuntime.jsx("path", { d: "M597.333333 853.333333h85.333334L426.666667 170.666667H341.333333L85.333333 853.333333h85.333334l80-213.333333h266.666666z m-314.666666-298.666666L384 284.458667 485.333333 554.666667z" }), jsxRuntime.jsx("path", { d: "M918.784 331.178667V257.450667L832 170.666667l-86.784 86.784v73.728L810.666667 265.685333v492.629334l-65.450667-65.493334v73.728L832 853.333333l86.784-86.784v-73.728L853.333333 758.314667V265.685333l65.450667 65.493334z" })] }));
|
|
8
|
+
|
|
9
|
+
exports.FontSizeIcon = FontSizeIcon;
|