@milkdown/crepe 7.5.6 → 7.5.8

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.
Files changed (227) hide show
  1. package/lib/cjs/{index-_mXHbJMH.js → index-3mj4YaCA.js} +5 -8
  2. package/lib/cjs/index-3mj4YaCA.js.map +1 -0
  3. package/lib/cjs/{index-wORIFtqa.js → index-A8IrOmzS.js} +33 -12
  4. package/lib/cjs/index-A8IrOmzS.js.map +1 -0
  5. package/lib/cjs/{index-z6pe2alg.js → index-AlHHvSR_.js} +1 -1
  6. package/lib/cjs/index-AlHHvSR_.js.map +1 -0
  7. package/lib/cjs/{index-YoPS8A3_.js → index-BIXWL4Or.js} +2 -2
  8. package/lib/cjs/index-BIXWL4Or.js.map +1 -0
  9. package/lib/cjs/{index-MLK151KV.js → index-BrCpWPcp.js} +2 -2
  10. package/lib/cjs/index-BrCpWPcp.js.map +1 -0
  11. package/lib/cjs/{index-uleaJDBC.js → index-BuSAwj4j.js} +1 -1
  12. package/lib/cjs/index-BuSAwj4j.js.map +1 -0
  13. package/lib/cjs/{index-vNNxr8yy.js → index-By3ewOiO.js} +173 -139
  14. package/lib/cjs/index-By3ewOiO.js.map +1 -0
  15. package/lib/cjs/{index-KeJUBENN.js → index-DmOOfQPi.js} +2 -2
  16. package/lib/cjs/index-DmOOfQPi.js.map +1 -0
  17. package/lib/cjs/index-Dt55rF23.js +35 -0
  18. package/lib/cjs/index-Dt55rF23.js.map +1 -0
  19. package/lib/cjs/{index-rFFAL9YA.js → index-Dub20F3z.js} +15 -17
  20. package/lib/cjs/index-Dub20F3z.js.map +1 -0
  21. package/lib/cjs/index.js +11 -13
  22. package/lib/cjs/index.js.map +1 -1
  23. package/lib/cjs/todoList-V4JWO5-M.js +675 -0
  24. package/lib/cjs/todoList-V4JWO5-M.js.map +1 -0
  25. package/lib/esm/{index-HHuxH8Dm.js → index-6VoEpEnX.js} +2 -2
  26. package/lib/esm/index-6VoEpEnX.js.map +1 -0
  27. package/lib/esm/{index-RJV0C6Af.js → index-BB3Rq6BU.js} +5 -8
  28. package/lib/esm/index-BB3Rq6BU.js.map +1 -0
  29. package/lib/esm/{index-uThMsyF6.js → index-BDGHz9p-.js} +2 -2
  30. package/lib/esm/index-BDGHz9p-.js.map +1 -0
  31. package/lib/esm/{index-X2mjLDJS.js → index-BoTKwL_u.js} +2 -2
  32. package/lib/esm/index-BoTKwL_u.js.map +1 -0
  33. package/lib/esm/{index-6JoGWH2I.js → index-CxJ9fxJm.js} +1 -1
  34. package/lib/esm/index-CxJ9fxJm.js.map +1 -0
  35. package/lib/esm/{index-Jvxff1vU.js → index-D6fLMv29.js} +1 -1
  36. package/lib/esm/index-D6fLMv29.js.map +1 -0
  37. package/lib/esm/{index-CMGDOz11.js → index-DOrkOhki.js} +15 -17
  38. package/lib/esm/index-DOrkOhki.js.map +1 -0
  39. package/lib/esm/index-DlX33Dj0.js +33 -0
  40. package/lib/esm/index-DlX33Dj0.js.map +1 -0
  41. package/lib/esm/{index-eZXAY3yz.js → index-kGl7HgN2.js} +33 -12
  42. package/lib/esm/index-kGl7HgN2.js.map +1 -0
  43. package/lib/esm/{index-sE0tYrbc.js → index-zKiGjwHz.js} +173 -139
  44. package/lib/esm/index-zKiGjwHz.js.map +1 -0
  45. package/lib/esm/index.js +11 -13
  46. package/lib/esm/index.js.map +1 -1
  47. package/lib/esm/todoList-CAbx4396.js +638 -0
  48. package/lib/esm/todoList-CAbx4396.js.map +1 -0
  49. package/lib/theme/_internal/classic-common.css +44 -19
  50. package/lib/theme/common/block-edit.css +12 -3
  51. package/lib/theme/common/code-mirror.css +1 -1
  52. package/lib/theme/common/cursor.css +7 -3
  53. package/lib/theme/common/image-block.css +28 -7
  54. package/lib/theme/common/link-tooltip.css +1 -0
  55. package/lib/theme/common/placeholder.css +5 -1
  56. package/lib/theme/common/prosemirror.css +1 -1
  57. package/lib/theme/common/style.css +10 -10
  58. package/lib/theme/common/table.css +17 -15
  59. package/lib/theme/common/toolbar.css +7 -3
  60. package/lib/theme/crepe/style.css +22 -20
  61. package/lib/theme/crepe-dark/style.css +25 -23
  62. package/lib/theme/frame/style.css +23 -20
  63. package/lib/theme/frame-dark/style.css +23 -20
  64. package/lib/theme/nord/style.css +25 -22
  65. package/lib/theme/nord-dark/style.css +23 -20
  66. package/lib/types/core/crepe.d.ts.map +1 -1
  67. package/lib/types/core/slice.d.ts +1 -1
  68. package/lib/types/core/slice.d.ts.map +1 -1
  69. package/lib/types/feature/block-edit/handle/component.d.ts.map +1 -1
  70. package/lib/types/feature/block-edit/handle/index.d.ts.map +1 -1
  71. package/lib/types/feature/block-edit/index.d.ts.map +1 -1
  72. package/lib/types/feature/block-edit/menu/component.d.ts.map +1 -1
  73. package/lib/types/feature/block-edit/menu/config.d.ts +2 -7
  74. package/lib/types/feature/block-edit/menu/config.d.ts.map +1 -1
  75. package/lib/types/feature/block-edit/menu/group-builder.d.ts +2 -2
  76. package/lib/types/feature/block-edit/menu/group-builder.d.ts.map +1 -1
  77. package/lib/types/feature/block-edit/menu/index.d.ts +2 -2
  78. package/lib/types/feature/block-edit/menu/index.d.ts.map +1 -1
  79. package/lib/types/feature/block-edit/menu/utils.d.ts.map +1 -1
  80. package/lib/types/feature/code-mirror/index.d.ts.map +1 -1
  81. package/lib/types/feature/cursor/index.d.ts.map +1 -1
  82. package/lib/types/feature/image-block/index.d.ts.map +1 -1
  83. package/lib/types/feature/index.d.ts.map +1 -1
  84. package/lib/types/feature/link-tooltip/index.d.ts.map +1 -1
  85. package/lib/types/feature/list-item/index.d.ts.map +1 -1
  86. package/lib/types/feature/placeholder/index.d.ts +2 -2
  87. package/lib/types/feature/placeholder/index.d.ts.map +1 -1
  88. package/lib/types/feature/shared.d.ts.map +1 -1
  89. package/lib/types/feature/table/index.d.ts.map +1 -1
  90. package/lib/types/feature/toolbar/component.d.ts.map +1 -1
  91. package/lib/types/feature/toolbar/index.d.ts.map +1 -1
  92. package/lib/types/icons/alignCenter.d.ts.map +1 -1
  93. package/lib/types/icons/alignLeft.d.ts.map +1 -1
  94. package/lib/types/icons/alignRight.d.ts.map +1 -1
  95. package/lib/types/icons/bold.d.ts.map +1 -1
  96. package/lib/types/icons/bullet.d.ts.map +1 -1
  97. package/lib/types/icons/bulletList.d.ts.map +1 -1
  98. package/lib/types/icons/caption.d.ts.map +1 -1
  99. package/lib/types/icons/checkBoxChecked.d.ts.map +1 -1
  100. package/lib/types/icons/checkBoxUnchecked.d.ts.map +1 -1
  101. package/lib/types/icons/chevronDown.d.ts.map +1 -1
  102. package/lib/types/icons/clear.d.ts.map +1 -1
  103. package/lib/types/icons/code.d.ts.map +1 -1
  104. package/lib/types/icons/confirm.d.ts.map +1 -1
  105. package/lib/types/icons/divider.d.ts.map +1 -1
  106. package/lib/types/icons/dragHandle.d.ts.map +1 -1
  107. package/lib/types/icons/edit.d.ts.map +1 -1
  108. package/lib/types/icons/h1.d.ts.map +1 -1
  109. package/lib/types/icons/h2.d.ts.map +1 -1
  110. package/lib/types/icons/h3.d.ts.map +1 -1
  111. package/lib/types/icons/h4.d.ts.map +1 -1
  112. package/lib/types/icons/h5.d.ts.map +1 -1
  113. package/lib/types/icons/h6.d.ts.map +1 -1
  114. package/lib/types/icons/image.d.ts.map +1 -1
  115. package/lib/types/icons/italic.d.ts.map +1 -1
  116. package/lib/types/icons/link.d.ts.map +1 -1
  117. package/lib/types/icons/menu.d.ts.map +1 -1
  118. package/lib/types/icons/orderedList.d.ts.map +1 -1
  119. package/lib/types/icons/plus.d.ts.map +1 -1
  120. package/lib/types/icons/quote.d.ts.map +1 -1
  121. package/lib/types/icons/remove.d.ts.map +1 -1
  122. package/lib/types/icons/search.d.ts.map +1 -1
  123. package/lib/types/icons/strikethrough.d.ts.map +1 -1
  124. package/lib/types/icons/table.d.ts.map +1 -1
  125. package/lib/types/icons/text.d.ts.map +1 -1
  126. package/lib/types/icons/todoList.d.ts.map +1 -1
  127. package/lib/types/utils/index.d.ts.map +1 -1
  128. package/package.json +3 -3
  129. package/src/core/crepe.ts +18 -12
  130. package/src/feature/block-edit/handle/component.ts +7 -4
  131. package/src/feature/block-edit/handle/index.ts +14 -11
  132. package/src/feature/block-edit/index.ts +6 -3
  133. package/src/feature/block-edit/menu/component.ts +138 -117
  134. package/src/feature/block-edit/menu/config.ts +42 -23
  135. package/src/feature/block-edit/menu/group-builder.ts +2 -3
  136. package/src/feature/block-edit/menu/index.ts +25 -15
  137. package/src/feature/block-edit/menu/utils.ts +45 -25
  138. package/src/feature/code-mirror/index.ts +20 -12
  139. package/src/feature/cursor/index.ts +4 -1
  140. package/src/feature/image-block/index.ts +20 -8
  141. package/src/feature/index.ts +5 -1
  142. package/src/feature/link-tooltip/index.ts +10 -3
  143. package/src/feature/list-item/index.ts +25 -8
  144. package/src/feature/placeholder/index.ts +19 -18
  145. package/src/feature/shared.ts +4 -1
  146. package/src/feature/table/index.ts +37 -29
  147. package/src/feature/toolbar/component.ts +40 -10
  148. package/src/feature/toolbar/index.ts +15 -9
  149. package/src/icons/alignCenter.ts +9 -2
  150. package/src/icons/alignLeft.ts +9 -2
  151. package/src/icons/alignRight.ts +9 -2
  152. package/src/icons/bold.ts +9 -2
  153. package/src/icons/bullet.ts +8 -3
  154. package/src/icons/bulletList.ts +10 -3
  155. package/src/icons/caption.ts +10 -2
  156. package/src/icons/checkBoxChecked.ts +10 -3
  157. package/src/icons/checkBoxUnchecked.ts +10 -3
  158. package/src/icons/chevronDown.ts +13 -2
  159. package/src/icons/clear.ts +10 -3
  160. package/src/icons/code.ts +10 -3
  161. package/src/icons/confirm.ts +11 -2
  162. package/src/icons/divider.ts +12 -3
  163. package/src/icons/dragHandle.ts +9 -2
  164. package/src/icons/edit.ts +10 -3
  165. package/src/icons/h1.ts +10 -3
  166. package/src/icons/h2.ts +10 -3
  167. package/src/icons/h3.ts +10 -3
  168. package/src/icons/h4.ts +10 -3
  169. package/src/icons/h5.ts +10 -3
  170. package/src/icons/h6.ts +10 -3
  171. package/src/icons/image.ts +10 -3
  172. package/src/icons/italic.ts +9 -2
  173. package/src/icons/link.ts +9 -2
  174. package/src/icons/menu.ts +10 -3
  175. package/src/icons/orderedList.ts +10 -3
  176. package/src/icons/plus.ts +10 -3
  177. package/src/icons/quote.ts +10 -3
  178. package/src/icons/remove.ts +9 -2
  179. package/src/icons/search.ts +13 -2
  180. package/src/icons/strikethrough.ts +9 -2
  181. package/src/icons/table.ts +10 -3
  182. package/src/icons/text.ts +10 -3
  183. package/src/icons/todoList.ts +9 -2
  184. package/src/theme/_internal/classic-common.css +39 -14
  185. package/src/theme/common/block-edit.css +12 -3
  186. package/src/theme/common/code-mirror.css +1 -1
  187. package/src/theme/common/cursor.css +7 -3
  188. package/src/theme/common/image-block.css +28 -7
  189. package/src/theme/common/link-tooltip.css +1 -0
  190. package/src/theme/common/placeholder.css +5 -1
  191. package/src/theme/common/prosemirror.css +1 -1
  192. package/src/theme/common/style.css +10 -10
  193. package/src/theme/common/table.css +17 -14
  194. package/src/theme/common/toolbar.css +7 -3
  195. package/src/theme/crepe/style.css +22 -20
  196. package/src/theme/crepe-dark/style.css +25 -23
  197. package/src/theme/frame/style.css +23 -20
  198. package/src/theme/frame-dark/style.css +23 -20
  199. package/src/theme/nord/style.css +25 -22
  200. package/src/theme/nord-dark/style.css +23 -20
  201. package/src/utils/index.ts +4 -1
  202. package/lib/cjs/index-9Lsv_-NW.js +0 -28
  203. package/lib/cjs/index-9Lsv_-NW.js.map +0 -1
  204. package/lib/cjs/index-KeJUBENN.js.map +0 -1
  205. package/lib/cjs/index-MLK151KV.js.map +0 -1
  206. package/lib/cjs/index-YoPS8A3_.js.map +0 -1
  207. package/lib/cjs/index-_mXHbJMH.js.map +0 -1
  208. package/lib/cjs/index-rFFAL9YA.js.map +0 -1
  209. package/lib/cjs/index-uleaJDBC.js.map +0 -1
  210. package/lib/cjs/index-vNNxr8yy.js.map +0 -1
  211. package/lib/cjs/index-wORIFtqa.js.map +0 -1
  212. package/lib/cjs/index-z6pe2alg.js.map +0 -1
  213. package/lib/cjs/todoList-Qb2JsRGC.js +0 -419
  214. package/lib/cjs/todoList-Qb2JsRGC.js.map +0 -1
  215. package/lib/esm/index-6JoGWH2I.js.map +0 -1
  216. package/lib/esm/index-CMGDOz11.js.map +0 -1
  217. package/lib/esm/index-HHuxH8Dm.js.map +0 -1
  218. package/lib/esm/index-J3c6JQEf.js +0 -26
  219. package/lib/esm/index-J3c6JQEf.js.map +0 -1
  220. package/lib/esm/index-Jvxff1vU.js.map +0 -1
  221. package/lib/esm/index-RJV0C6Af.js.map +0 -1
  222. package/lib/esm/index-X2mjLDJS.js.map +0 -1
  223. package/lib/esm/index-eZXAY3yz.js.map +0 -1
  224. package/lib/esm/index-sE0tYrbc.js.map +0 -1
  225. package/lib/esm/index-uThMsyF6.js.map +0 -1
  226. package/lib/esm/todoList-eAxCDaQj.js +0 -382
  227. package/lib/esm/todoList-eAxCDaQj.js.map +0 -1
@@ -1,4 +1,7 @@
1
- import { tableBlock, tableBlockConfig } from '@milkdown/kit/component/table-block'
1
+ import {
2
+ tableBlock,
3
+ tableBlockConfig,
4
+ } from '@milkdown/kit/component/table-block'
2
5
  import type { DefineFeature, Icon } from '../shared'
3
6
  import {
4
7
  alignCenterIcon,
@@ -23,32 +26,37 @@ interface TableConfig {
23
26
 
24
27
  export type TableFeatureConfig = Partial<TableConfig>
25
28
 
26
- export const defineFeature: DefineFeature<TableFeatureConfig> = (editor, config) => {
27
- editor.config((ctx) => {
28
- ctx.update(tableBlockConfig.key, defaultConfig => ({
29
- ...defaultConfig,
30
- renderButton: (renderType) => {
31
- switch (renderType) {
32
- case 'add_row':
33
- return config?.addRowIcon?.() ?? plusIcon
34
- case 'add_col':
35
- return config?.addColIcon?.() ?? plusIcon
36
- case 'delete_row':
37
- return config?.deleteRowIcon?.() ?? removeIcon
38
- case 'delete_col':
39
- return config?.deleteColIcon?.() ?? removeIcon
40
- case 'align_col_left':
41
- return config?.alignLeftIcon?.() ?? alignLeftIcon
42
- case 'align_col_center':
43
- return config?.alignCenterIcon?.() ?? alignCenterIcon
44
- case 'align_col_right':
45
- return config?.alignRightIcon?.() ?? alignRightIcon
46
- case 'col_drag_handle':
47
- return config?.colDragHandleIcon?.() ?? dragHandleIcon
48
- case 'row_drag_handle':
49
- return config?.rowDragHandleIcon?.() ?? dragHandleIcon
50
- }
51
- },
52
- }))
53
- }).use(tableBlock)
29
+ export const defineFeature: DefineFeature<TableFeatureConfig> = (
30
+ editor,
31
+ config
32
+ ) => {
33
+ editor
34
+ .config((ctx) => {
35
+ ctx.update(tableBlockConfig.key, (defaultConfig) => ({
36
+ ...defaultConfig,
37
+ renderButton: (renderType) => {
38
+ switch (renderType) {
39
+ case 'add_row':
40
+ return config?.addRowIcon?.() ?? plusIcon
41
+ case 'add_col':
42
+ return config?.addColIcon?.() ?? plusIcon
43
+ case 'delete_row':
44
+ return config?.deleteRowIcon?.() ?? removeIcon
45
+ case 'delete_col':
46
+ return config?.deleteColIcon?.() ?? removeIcon
47
+ case 'align_col_left':
48
+ return config?.alignLeftIcon?.() ?? alignLeftIcon
49
+ case 'align_col_center':
50
+ return config?.alignCenterIcon?.() ?? alignCenterIcon
51
+ case 'align_col_right':
52
+ return config?.alignRightIcon?.() ?? alignRightIcon
53
+ case 'col_drag_handle':
54
+ return config?.colDragHandleIcon?.() ?? dragHandleIcon
55
+ case 'row_drag_handle':
56
+ return config?.rowDragHandleIcon?.() ?? dragHandleIcon
57
+ }
58
+ },
59
+ }))
60
+ })
61
+ .use(tableBlock)
54
62
  }
@@ -14,8 +14,17 @@ import {
14
14
  import type { MarkType } from '@milkdown/kit/prose/model'
15
15
  import clsx from 'clsx'
16
16
  import { linkTooltipAPI } from '@milkdown/kit/component/link-tooltip'
17
- import { strikethroughSchema, toggleStrikethroughCommand } from '@milkdown/kit/preset/gfm'
18
- import { boldIcon, codeIcon, italicIcon, linkIcon, strikethroughIcon } from '../../icons'
17
+ import {
18
+ strikethroughSchema,
19
+ toggleStrikethroughCommand,
20
+ } from '@milkdown/kit/preset/gfm'
21
+ import {
22
+ boldIcon,
23
+ codeIcon,
24
+ italicIcon,
25
+ linkIcon,
26
+ strikethroughIcon,
27
+ } from '../../icons'
19
28
  import type { ToolbarFeatureConfig } from './index'
20
29
 
21
30
  export interface ToolbarProps {
@@ -43,16 +52,21 @@ export const toolbarComponent: Component<ToolbarProps> = ({
43
52
  }
44
53
 
45
54
  const isActive = (mark: MarkType) => {
46
- if (!ctx)
47
- return false
55
+ if (!ctx) return false
48
56
  const view = ctx.get(editorViewCtx)
49
- const { state: { doc, selection } } = view
57
+ const {
58
+ state: { doc, selection },
59
+ } = view
50
60
  return doc.rangeHasMark(selection.from, selection.to, mark)
51
61
  }
52
62
 
53
63
  return html`<host>
54
64
  <button
55
- class=${clsx('toolbar-item', ctx && isActive(strongSchema.type(ctx)) && 'active')}
65
+ type="button"
66
+ class=${clsx(
67
+ 'toolbar-item',
68
+ ctx && isActive(strongSchema.type(ctx)) && 'active'
69
+ )}
56
70
  onmousedown=${onClick((ctx) => {
57
71
  const commands = ctx.get(commandsCtx)
58
72
  commands.call(toggleStrongCommand.key)
@@ -61,7 +75,11 @@ export const toolbarComponent: Component<ToolbarProps> = ({
61
75
  ${config?.boldIcon?.() ?? boldIcon}
62
76
  </button>
63
77
  <button
64
- class=${clsx('toolbar-item', ctx && isActive(emphasisSchema.type(ctx)) && 'active')}
78
+ type="button"
79
+ class=${clsx(
80
+ 'toolbar-item',
81
+ ctx && isActive(emphasisSchema.type(ctx)) && 'active'
82
+ )}
65
83
  onmousedown=${onClick((ctx) => {
66
84
  const commands = ctx.get(commandsCtx)
67
85
  commands.call(toggleEmphasisCommand.key)
@@ -70,7 +88,11 @@ export const toolbarComponent: Component<ToolbarProps> = ({
70
88
  ${config?.italicIcon?.() ?? italicIcon}
71
89
  </button>
72
90
  <button
73
- class=${clsx('toolbar-item', ctx && isActive(strikethroughSchema.type(ctx)) && 'active')}
91
+ type="button"
92
+ class=${clsx(
93
+ 'toolbar-item',
94
+ ctx && isActive(strikethroughSchema.type(ctx)) && 'active'
95
+ )}
74
96
  onmousedown=${onClick((ctx) => {
75
97
  const commands = ctx.get(commandsCtx)
76
98
  commands.call(toggleStrikethroughCommand.key)
@@ -80,7 +102,11 @@ export const toolbarComponent: Component<ToolbarProps> = ({
80
102
  </button>
81
103
  <div class="divider"></div>
82
104
  <button
83
- class=${clsx('toolbar-item', ctx && isActive(inlineCodeSchema.type(ctx)) && 'active')}
105
+ type="button"
106
+ class=${clsx(
107
+ 'toolbar-item',
108
+ ctx && isActive(inlineCodeSchema.type(ctx)) && 'active'
109
+ )}
84
110
  onmousedown=${onClick((ctx) => {
85
111
  const commands = ctx.get(commandsCtx)
86
112
  commands.call(toggleInlineCodeCommand.key)
@@ -89,7 +115,11 @@ export const toolbarComponent: Component<ToolbarProps> = ({
89
115
  ${config?.codeIcon?.() ?? codeIcon}
90
116
  </button>
91
117
  <button
92
- class=${clsx('toolbar-item', ctx && isActive(linkSchema.type(ctx)) && 'active')}
118
+ type="button"
119
+ class=${clsx(
120
+ 'toolbar-item',
121
+ ctx && isActive(linkSchema.type(ctx)) && 'active'
122
+ )}
93
123
  onmousedown=${onClick((ctx) => {
94
124
  const view = ctx.get(editorViewCtx)
95
125
  const { selection } = view.state
@@ -39,11 +39,14 @@ class ToolbarView implements PluginView {
39
39
  const { doc, selection } = view.state
40
40
  const { empty, from, to } = selection
41
41
 
42
- const isEmptyTextBlock = !doc.textBetween(from, to).length && selection instanceof TextSelection
42
+ const isEmptyTextBlock =
43
+ !doc.textBetween(from, to).length &&
44
+ selection instanceof TextSelection
43
45
 
44
46
  const isNotTextBlock = !(selection instanceof TextSelection)
45
47
 
46
- const activeElement = (view.dom.getRootNode() as ShadowRoot | Document).activeElement
48
+ const activeElement = (view.dom.getRootNode() as ShadowRoot | Document)
49
+ .activeElement
47
50
  const isTooltipChildren = content.contains(activeElement)
48
51
 
49
52
  const notHasFocus = !view.hasFocus() && !isTooltipChildren
@@ -51,11 +54,11 @@ class ToolbarView implements PluginView {
51
54
  const isReadonly = !view.editable
52
55
 
53
56
  if (
54
- notHasFocus
55
- || isNotTextBlock
56
- || empty
57
- || isEmptyTextBlock
58
- || isReadonly
57
+ notHasFocus ||
58
+ isNotTextBlock ||
59
+ empty ||
60
+ isEmptyTextBlock ||
61
+ isReadonly
59
62
  )
60
63
  return false
61
64
 
@@ -86,11 +89,14 @@ class ToolbarView implements PluginView {
86
89
  }
87
90
 
88
91
  defIfNotExists('milkdown-toolbar', ToolbarElement)
89
- export const defineFeature: DefineFeature<ToolbarFeatureConfig> = (editor, config) => {
92
+ export const defineFeature: DefineFeature<ToolbarFeatureConfig> = (
93
+ editor,
94
+ config
95
+ ) => {
90
96
  editor
91
97
  .config((ctx) => {
92
98
  ctx.set(toolbar.key, {
93
- view: view => new ToolbarView(ctx, view, config),
99
+ view: (view) => new ToolbarView(ctx, view, config),
94
100
  })
95
101
  })
96
102
  .use(toolbar)
@@ -1,7 +1,14 @@
1
1
  import { html } from 'atomico'
2
2
 
3
3
  export const alignCenterIcon = html`
4
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
5
- <path d="M4.25 20.5C4.0375 20.5 3.85942 20.4281 3.71575 20.2843C3.57192 20.1404 3.5 19.9622 3.5 19.7498C3.5 19.5371 3.57192 19.359 3.71575 19.2155C3.85942 19.0718 4.0375 19 4.25 19H19.75C19.9625 19 20.1406 19.0719 20.2843 19.2158C20.4281 19.3596 20.5 19.5378 20.5 19.7502C20.5 19.9629 20.4281 20.141 20.2843 20.2845C20.1406 20.4282 19.9625 20.5 19.75 20.5H4.25ZM8.25 16.625C8.0375 16.625 7.85942 16.5531 7.71575 16.4093C7.57192 16.2654 7.5 16.0872 7.5 15.8748C7.5 15.6621 7.57192 15.484 7.71575 15.3405C7.85942 15.1968 8.0375 15.125 8.25 15.125H15.75C15.9625 15.125 16.1406 15.1969 16.2843 15.3408C16.4281 15.4846 16.5 15.6628 16.5 15.8753C16.5 16.0879 16.4281 16.266 16.2843 16.4095C16.1406 16.5532 15.9625 16.625 15.75 16.625H8.25ZM4.25 12.75C4.0375 12.75 3.85942 12.6781 3.71575 12.5343C3.57192 12.3904 3.5 12.2122 3.5 11.9998C3.5 11.7871 3.57192 11.609 3.71575 11.4655C3.85942 11.3218 4.0375 11.25 4.25 11.25H19.75C19.9625 11.25 20.1406 11.3219 20.2843 11.4658C20.4281 11.6096 20.5 11.7878 20.5 12.0003C20.5 12.2129 20.4281 12.391 20.2843 12.5345C20.1406 12.6782 19.9625 12.75 19.75 12.75H4.25ZM8.25 8.875C8.0375 8.875 7.85942 8.80308 7.71575 8.65925C7.57192 8.51542 7.5 8.33725 7.5 8.12475C7.5 7.91208 7.57192 7.734 7.71575 7.5905C7.85942 7.44683 8.0375 7.375 8.25 7.375H15.75C15.9625 7.375 16.1406 7.44692 16.2843 7.59075C16.4281 7.73458 16.5 7.91275 16.5 8.12525C16.5 8.33792 16.4281 8.516 16.2843 8.6595C16.1406 8.80317 15.9625 8.875 15.75 8.875H8.25ZM4.25 5C4.0375 5 3.85942 4.92808 3.71575 4.78425C3.57192 4.64042 3.5 4.46225 3.5 4.24975C3.5 4.03708 3.57192 3.859 3.71575 3.7155C3.85942 3.57183 4.0375 3.5 4.25 3.5H19.75C19.9625 3.5 20.1406 3.57192 20.2843 3.71575C20.4281 3.85958 20.5 4.03775 20.5 4.25025C20.5 4.46292 20.4281 4.641 20.2843 4.7845C20.1406 4.92817 19.9625 5 19.75 5H4.25Z"/>
4
+ <svg
5
+ xmlns="http://www.w3.org/2000/svg"
6
+ width="24"
7
+ height="24"
8
+ viewBox="0 0 24 24"
9
+ >
10
+ <path
11
+ d="M4.25 20.5C4.0375 20.5 3.85942 20.4281 3.71575 20.2843C3.57192 20.1404 3.5 19.9622 3.5 19.7498C3.5 19.5371 3.57192 19.359 3.71575 19.2155C3.85942 19.0718 4.0375 19 4.25 19H19.75C19.9625 19 20.1406 19.0719 20.2843 19.2158C20.4281 19.3596 20.5 19.5378 20.5 19.7502C20.5 19.9629 20.4281 20.141 20.2843 20.2845C20.1406 20.4282 19.9625 20.5 19.75 20.5H4.25ZM8.25 16.625C8.0375 16.625 7.85942 16.5531 7.71575 16.4093C7.57192 16.2654 7.5 16.0872 7.5 15.8748C7.5 15.6621 7.57192 15.484 7.71575 15.3405C7.85942 15.1968 8.0375 15.125 8.25 15.125H15.75C15.9625 15.125 16.1406 15.1969 16.2843 15.3408C16.4281 15.4846 16.5 15.6628 16.5 15.8753C16.5 16.0879 16.4281 16.266 16.2843 16.4095C16.1406 16.5532 15.9625 16.625 15.75 16.625H8.25ZM4.25 12.75C4.0375 12.75 3.85942 12.6781 3.71575 12.5343C3.57192 12.3904 3.5 12.2122 3.5 11.9998C3.5 11.7871 3.57192 11.609 3.71575 11.4655C3.85942 11.3218 4.0375 11.25 4.25 11.25H19.75C19.9625 11.25 20.1406 11.3219 20.2843 11.4658C20.4281 11.6096 20.5 11.7878 20.5 12.0003C20.5 12.2129 20.4281 12.391 20.2843 12.5345C20.1406 12.6782 19.9625 12.75 19.75 12.75H4.25ZM8.25 8.875C8.0375 8.875 7.85942 8.80308 7.71575 8.65925C7.57192 8.51542 7.5 8.33725 7.5 8.12475C7.5 7.91208 7.57192 7.734 7.71575 7.5905C7.85942 7.44683 8.0375 7.375 8.25 7.375H15.75C15.9625 7.375 16.1406 7.44692 16.2843 7.59075C16.4281 7.73458 16.5 7.91275 16.5 8.12525C16.5 8.33792 16.4281 8.516 16.2843 8.6595C16.1406 8.80317 15.9625 8.875 15.75 8.875H8.25ZM4.25 5C4.0375 5 3.85942 4.92808 3.71575 4.78425C3.57192 4.64042 3.5 4.46225 3.5 4.24975C3.5 4.03708 3.57192 3.859 3.71575 3.7155C3.85942 3.57183 4.0375 3.5 4.25 3.5H19.75C19.9625 3.5 20.1406 3.57192 20.2843 3.71575C20.4281 3.85958 20.5 4.03775 20.5 4.25025C20.5 4.46292 20.4281 4.641 20.2843 4.7845C20.1406 4.92817 19.9625 5 19.75 5H4.25Z"
12
+ />
6
13
  </svg>
7
14
  `
@@ -1,7 +1,14 @@
1
1
  import { html } from 'atomico'
2
2
 
3
3
  export const alignLeftIcon = html`
4
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
5
- <path d="M4.25 20.5C4.0375 20.5 3.85942 20.4281 3.71575 20.2843C3.57192 20.1404 3.5 19.9622 3.5 19.7498C3.5 19.5371 3.57192 19.359 3.71575 19.2155C3.85942 19.0718 4.0375 19 4.25 19H19.75C19.9625 19 20.1406 19.0719 20.2843 19.2158C20.4281 19.3596 20.5 19.5378 20.5 19.7502C20.5 19.9629 20.4281 20.141 20.2843 20.2845C20.1406 20.4282 19.9625 20.5 19.75 20.5H4.25ZM4.25 16.625C4.0375 16.625 3.85942 16.5531 3.71575 16.4093C3.57192 16.2654 3.5 16.0872 3.5 15.8748C3.5 15.6621 3.57192 15.484 3.71575 15.3405C3.85942 15.1968 4.0375 15.125 4.25 15.125H13.75C13.9625 15.125 14.1406 15.1969 14.2843 15.3408C14.4281 15.4846 14.5 15.6628 14.5 15.8753C14.5 16.0879 14.4281 16.266 14.2843 16.4095C14.1406 16.5532 13.9625 16.625 13.75 16.625H4.25ZM4.25 12.75C4.0375 12.75 3.85942 12.6781 3.71575 12.5343C3.57192 12.3904 3.5 12.2122 3.5 11.9998C3.5 11.7871 3.57192 11.609 3.71575 11.4655C3.85942 11.3218 4.0375 11.25 4.25 11.25H19.75C19.9625 11.25 20.1406 11.3219 20.2843 11.4658C20.4281 11.6096 20.5 11.7878 20.5 12.0003C20.5 12.2129 20.4281 12.391 20.2843 12.5345C20.1406 12.6782 19.9625 12.75 19.75 12.75H4.25ZM4.25 8.875C4.0375 8.875 3.85942 8.80308 3.71575 8.65925C3.57192 8.51542 3.5 8.33725 3.5 8.12475C3.5 7.91208 3.57192 7.734 3.71575 7.5905C3.85942 7.44683 4.0375 7.375 4.25 7.375H13.75C13.9625 7.375 14.1406 7.44692 14.2843 7.59075C14.4281 7.73458 14.5 7.91275 14.5 8.12525C14.5 8.33792 14.4281 8.516 14.2843 8.6595C14.1406 8.80317 13.9625 8.875 13.75 8.875H4.25ZM4.25 5C4.0375 5 3.85942 4.92808 3.71575 4.78425C3.57192 4.64042 3.5 4.46225 3.5 4.24975C3.5 4.03708 3.57192 3.859 3.71575 3.7155C3.85942 3.57183 4.0375 3.5 4.25 3.5H19.75C19.9625 3.5 20.1406 3.57192 20.2843 3.71575C20.4281 3.85958 20.5 4.03775 20.5 4.25025C20.5 4.46292 20.4281 4.641 20.2843 4.7845C20.1406 4.92817 19.9625 5 19.75 5H4.25Z"/>
4
+ <svg
5
+ xmlns="http://www.w3.org/2000/svg"
6
+ width="24"
7
+ height="24"
8
+ viewBox="0 0 24 24"
9
+ >
10
+ <path
11
+ d="M4.25 20.5C4.0375 20.5 3.85942 20.4281 3.71575 20.2843C3.57192 20.1404 3.5 19.9622 3.5 19.7498C3.5 19.5371 3.57192 19.359 3.71575 19.2155C3.85942 19.0718 4.0375 19 4.25 19H19.75C19.9625 19 20.1406 19.0719 20.2843 19.2158C20.4281 19.3596 20.5 19.5378 20.5 19.7502C20.5 19.9629 20.4281 20.141 20.2843 20.2845C20.1406 20.4282 19.9625 20.5 19.75 20.5H4.25ZM4.25 16.625C4.0375 16.625 3.85942 16.5531 3.71575 16.4093C3.57192 16.2654 3.5 16.0872 3.5 15.8748C3.5 15.6621 3.57192 15.484 3.71575 15.3405C3.85942 15.1968 4.0375 15.125 4.25 15.125H13.75C13.9625 15.125 14.1406 15.1969 14.2843 15.3408C14.4281 15.4846 14.5 15.6628 14.5 15.8753C14.5 16.0879 14.4281 16.266 14.2843 16.4095C14.1406 16.5532 13.9625 16.625 13.75 16.625H4.25ZM4.25 12.75C4.0375 12.75 3.85942 12.6781 3.71575 12.5343C3.57192 12.3904 3.5 12.2122 3.5 11.9998C3.5 11.7871 3.57192 11.609 3.71575 11.4655C3.85942 11.3218 4.0375 11.25 4.25 11.25H19.75C19.9625 11.25 20.1406 11.3219 20.2843 11.4658C20.4281 11.6096 20.5 11.7878 20.5 12.0003C20.5 12.2129 20.4281 12.391 20.2843 12.5345C20.1406 12.6782 19.9625 12.75 19.75 12.75H4.25ZM4.25 8.875C4.0375 8.875 3.85942 8.80308 3.71575 8.65925C3.57192 8.51542 3.5 8.33725 3.5 8.12475C3.5 7.91208 3.57192 7.734 3.71575 7.5905C3.85942 7.44683 4.0375 7.375 4.25 7.375H13.75C13.9625 7.375 14.1406 7.44692 14.2843 7.59075C14.4281 7.73458 14.5 7.91275 14.5 8.12525C14.5 8.33792 14.4281 8.516 14.2843 8.6595C14.1406 8.80317 13.9625 8.875 13.75 8.875H4.25ZM4.25 5C4.0375 5 3.85942 4.92808 3.71575 4.78425C3.57192 4.64042 3.5 4.46225 3.5 4.24975C3.5 4.03708 3.57192 3.859 3.71575 3.7155C3.85942 3.57183 4.0375 3.5 4.25 3.5H19.75C19.9625 3.5 20.1406 3.57192 20.2843 3.71575C20.4281 3.85958 20.5 4.03775 20.5 4.25025C20.5 4.46292 20.4281 4.641 20.2843 4.7845C20.1406 4.92817 19.9625 5 19.75 5H4.25Z"
12
+ />
6
13
  </svg>
7
14
  `
@@ -1,7 +1,14 @@
1
1
  import { html } from 'atomico'
2
2
 
3
3
  export const alignRightIcon = html`
4
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
5
- <path d="M4.25 5C4.0375 5 3.85942 4.92808 3.71575 4.78425C3.57192 4.64042 3.5 4.46225 3.5 4.24975C3.5 4.03708 3.57192 3.859 3.71575 3.7155C3.85942 3.57183 4.0375 3.5 4.25 3.5H19.75C19.9625 3.5 20.1406 3.57192 20.2843 3.71575C20.4281 3.85958 20.5 4.03775 20.5 4.25025C20.5 4.46292 20.4281 4.641 20.2843 4.7845C20.1406 4.92817 19.9625 5 19.75 5H4.25ZM10.25 8.875C10.0375 8.875 9.85942 8.80308 9.71575 8.65925C9.57192 8.51542 9.5 8.33725 9.5 8.12475C9.5 7.91208 9.57192 7.734 9.71575 7.5905C9.85942 7.44683 10.0375 7.375 10.25 7.375H19.75C19.9625 7.375 20.1406 7.44692 20.2843 7.59075C20.4281 7.73458 20.5 7.91275 20.5 8.12525C20.5 8.33792 20.4281 8.516 20.2843 8.6595C20.1406 8.80317 19.9625 8.875 19.75 8.875H10.25ZM4.25 12.75C4.0375 12.75 3.85942 12.6781 3.71575 12.5343C3.57192 12.3904 3.5 12.2122 3.5 11.9998C3.5 11.7871 3.57192 11.609 3.71575 11.4655C3.85942 11.3218 4.0375 11.25 4.25 11.25H19.75C19.9625 11.25 20.1406 11.3219 20.2843 11.4658C20.4281 11.6096 20.5 11.7878 20.5 12.0003C20.5 12.2129 20.4281 12.391 20.2843 12.5345C20.1406 12.6782 19.9625 12.75 19.75 12.75H4.25ZM10.25 16.625C10.0375 16.625 9.85942 16.5531 9.71575 16.4093C9.57192 16.2654 9.5 16.0872 9.5 15.8748C9.5 15.6621 9.57192 15.484 9.71575 15.3405C9.85942 15.1968 10.0375 15.125 10.25 15.125H19.75C19.9625 15.125 20.1406 15.1969 20.2843 15.3408C20.4281 15.4846 20.5 15.6628 20.5 15.8753C20.5 16.0879 20.4281 16.266 20.2843 16.4095C20.1406 16.5532 19.9625 16.625 19.75 16.625H10.25ZM4.25 20.5C4.0375 20.5 3.85942 20.4281 3.71575 20.2843C3.57192 20.1404 3.5 19.9622 3.5 19.7498C3.5 19.5371 3.57192 19.359 3.71575 19.2155C3.85942 19.0718 4.0375 19 4.25 19H19.75C19.9625 19 20.1406 19.0719 20.2843 19.2158C20.4281 19.3596 20.5 19.5378 20.5 19.7502C20.5 19.9629 20.4281 20.141 20.2843 20.2845C20.1406 20.4282 19.9625 20.5 19.75 20.5H4.25Z"/>
4
+ <svg
5
+ xmlns="http://www.w3.org/2000/svg"
6
+ width="24"
7
+ height="24"
8
+ viewBox="0 0 24 24"
9
+ >
10
+ <path
11
+ d="M4.25 5C4.0375 5 3.85942 4.92808 3.71575 4.78425C3.57192 4.64042 3.5 4.46225 3.5 4.24975C3.5 4.03708 3.57192 3.859 3.71575 3.7155C3.85942 3.57183 4.0375 3.5 4.25 3.5H19.75C19.9625 3.5 20.1406 3.57192 20.2843 3.71575C20.4281 3.85958 20.5 4.03775 20.5 4.25025C20.5 4.46292 20.4281 4.641 20.2843 4.7845C20.1406 4.92817 19.9625 5 19.75 5H4.25ZM10.25 8.875C10.0375 8.875 9.85942 8.80308 9.71575 8.65925C9.57192 8.51542 9.5 8.33725 9.5 8.12475C9.5 7.91208 9.57192 7.734 9.71575 7.5905C9.85942 7.44683 10.0375 7.375 10.25 7.375H19.75C19.9625 7.375 20.1406 7.44692 20.2843 7.59075C20.4281 7.73458 20.5 7.91275 20.5 8.12525C20.5 8.33792 20.4281 8.516 20.2843 8.6595C20.1406 8.80317 19.9625 8.875 19.75 8.875H10.25ZM4.25 12.75C4.0375 12.75 3.85942 12.6781 3.71575 12.5343C3.57192 12.3904 3.5 12.2122 3.5 11.9998C3.5 11.7871 3.57192 11.609 3.71575 11.4655C3.85942 11.3218 4.0375 11.25 4.25 11.25H19.75C19.9625 11.25 20.1406 11.3219 20.2843 11.4658C20.4281 11.6096 20.5 11.7878 20.5 12.0003C20.5 12.2129 20.4281 12.391 20.2843 12.5345C20.1406 12.6782 19.9625 12.75 19.75 12.75H4.25ZM10.25 16.625C10.0375 16.625 9.85942 16.5531 9.71575 16.4093C9.57192 16.2654 9.5 16.0872 9.5 15.8748C9.5 15.6621 9.57192 15.484 9.71575 15.3405C9.85942 15.1968 10.0375 15.125 10.25 15.125H19.75C19.9625 15.125 20.1406 15.1969 20.2843 15.3408C20.4281 15.4846 20.5 15.6628 20.5 15.8753C20.5 16.0879 20.4281 16.266 20.2843 16.4095C20.1406 16.5532 19.9625 16.625 19.75 16.625H10.25ZM4.25 20.5C4.0375 20.5 3.85942 20.4281 3.71575 20.2843C3.57192 20.1404 3.5 19.9622 3.5 19.7498C3.5 19.5371 3.57192 19.359 3.71575 19.2155C3.85942 19.0718 4.0375 19 4.25 19H19.75C19.9625 19 20.1406 19.0719 20.2843 19.2158C20.4281 19.3596 20.5 19.5378 20.5 19.7502C20.5 19.9629 20.4281 20.141 20.2843 20.2845C20.1406 20.4282 19.9625 20.5 19.75 20.5H4.25Z"
12
+ />
6
13
  </svg>
7
14
  `
package/src/icons/bold.ts CHANGED
@@ -1,7 +1,14 @@
1
1
  import { html } from 'atomico'
2
2
 
3
3
  export const boldIcon = html`
4
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
5
- <path d="M8.85758 18.625C8.4358 18.625 8.07715 18.4772 7.78163 18.1817C7.48613 17.8862 7.33838 17.5275 7.33838 17.1058V6.8942C7.33838 6.47242 7.48613 6.11377 7.78163 5.81825C8.07715 5.52275 8.4358 5.375 8.85758 5.375H12.1999C13.2191 5.375 14.1406 5.69231 14.9643 6.32693C15.788 6.96154 16.1999 7.81603 16.1999 8.89038C16.1999 9.63779 16.0194 10.2471 15.6585 10.7183C15.2976 11.1894 14.9088 11.5314 14.4922 11.7442C15.005 11.9211 15.4947 12.2708 15.9614 12.7933C16.428 13.3157 16.6614 14.0192 16.6614 14.9038C16.6614 16.182 16.1902 17.1217 15.2479 17.723C14.3056 18.3243 13.3563 18.625 12.3999 18.625H8.85758ZM9.4883 16.6327H12.3191C13.1063 16.6327 13.6627 16.4141 13.9884 15.9769C14.314 15.5397 14.4768 15.1205 14.4768 14.7192C14.4768 14.3179 14.314 13.8987 13.9884 13.4615C13.6627 13.0243 13.0909 12.8057 12.273 12.8057H9.4883V16.6327ZM9.4883 10.875H12.0826C12.6903 10.875 13.172 10.7013 13.5278 10.3539C13.8836 10.0064 14.0615 9.59037 14.0615 9.10575C14.0615 8.59035 13.8733 8.16918 13.497 7.84225C13.1207 7.51533 12.6595 7.35188 12.1133 7.35188H9.4883V10.875Z"/>
4
+ <svg
5
+ xmlns="http://www.w3.org/2000/svg"
6
+ width="24"
7
+ height="24"
8
+ viewBox="0 0 24 24"
9
+ >
10
+ <path
11
+ d="M8.85758 18.625C8.4358 18.625 8.07715 18.4772 7.78163 18.1817C7.48613 17.8862 7.33838 17.5275 7.33838 17.1058V6.8942C7.33838 6.47242 7.48613 6.11377 7.78163 5.81825C8.07715 5.52275 8.4358 5.375 8.85758 5.375H12.1999C13.2191 5.375 14.1406 5.69231 14.9643 6.32693C15.788 6.96154 16.1999 7.81603 16.1999 8.89038C16.1999 9.63779 16.0194 10.2471 15.6585 10.7183C15.2976 11.1894 14.9088 11.5314 14.4922 11.7442C15.005 11.9211 15.4947 12.2708 15.9614 12.7933C16.428 13.3157 16.6614 14.0192 16.6614 14.9038C16.6614 16.182 16.1902 17.1217 15.2479 17.723C14.3056 18.3243 13.3563 18.625 12.3999 18.625H8.85758ZM9.4883 16.6327H12.3191C13.1063 16.6327 13.6627 16.4141 13.9884 15.9769C14.314 15.5397 14.4768 15.1205 14.4768 14.7192C14.4768 14.3179 14.314 13.8987 13.9884 13.4615C13.6627 13.0243 13.0909 12.8057 12.273 12.8057H9.4883V16.6327ZM9.4883 10.875H12.0826C12.6903 10.875 13.172 10.7013 13.5278 10.3539C13.8836 10.0064 14.0615 9.59037 14.0615 9.10575C14.0615 8.59035 13.8733 8.16918 13.497 7.84225C13.1207 7.51533 12.6595 7.35188 12.1133 7.35188H9.4883V10.875Z"
12
+ />
6
13
  </svg>
7
14
  `
@@ -1,13 +1,18 @@
1
1
  import { html } from 'atomico'
2
2
 
3
3
  export const bulletIcon = html`
4
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
4
+ <svg
5
+ xmlns="http://www.w3.org/2000/svg"
6
+ width="24"
7
+ height="24"
8
+ viewBox="0 0 24 24"
9
+ >
5
10
  <g clip-path="url(#clip0_952_6527)">
6
- <circle cx="12" cy="12" r="3"/>
11
+ <circle cx="12" cy="12" r="3" />
7
12
  </g>
8
13
  <defs>
9
14
  <clipPath id="clip0_952_6527">
10
- <rect width="24" height="24"/>
15
+ <rect width="24" height="24" />
11
16
  </clipPath>
12
17
  </defs>
13
18
  </svg>
@@ -1,13 +1,20 @@
1
1
  import { html } from 'atomico'
2
2
 
3
3
  export const bulletListIcon = html`
4
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
4
+ <svg
5
+ xmlns="http://www.w3.org/2000/svg"
6
+ width="24"
7
+ height="24"
8
+ viewBox="0 0 24 24"
9
+ >
5
10
  <g clip-path="url(#clip0_977_8070)">
6
- <path d="M4 10.5C3.17 10.5 2.5 11.17 2.5 12C2.5 12.83 3.17 13.5 4 13.5C4.83 13.5 5.5 12.83 5.5 12C5.5 11.17 4.83 10.5 4 10.5ZM4 4.5C3.17 4.5 2.5 5.17 2.5 6C2.5 6.83 3.17 7.5 4 7.5C4.83 7.5 5.5 6.83 5.5 6C5.5 5.17 4.83 4.5 4 4.5ZM4 16.5C3.17 16.5 2.5 17.18 2.5 18C2.5 18.82 3.18 19.5 4 19.5C4.82 19.5 5.5 18.82 5.5 18C5.5 17.18 4.83 16.5 4 16.5ZM8 19H20C20.55 19 21 18.55 21 18C21 17.45 20.55 17 20 17H8C7.45 17 7 17.45 7 18C7 18.55 7.45 19 8 19ZM8 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H8C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM7 6C7 6.55 7.45 7 8 7H20C20.55 7 21 6.55 21 6C21 5.45 20.55 5 20 5H8C7.45 5 7 5.45 7 6Z"/>
11
+ <path
12
+ d="M4 10.5C3.17 10.5 2.5 11.17 2.5 12C2.5 12.83 3.17 13.5 4 13.5C4.83 13.5 5.5 12.83 5.5 12C5.5 11.17 4.83 10.5 4 10.5ZM4 4.5C3.17 4.5 2.5 5.17 2.5 6C2.5 6.83 3.17 7.5 4 7.5C4.83 7.5 5.5 6.83 5.5 6C5.5 5.17 4.83 4.5 4 4.5ZM4 16.5C3.17 16.5 2.5 17.18 2.5 18C2.5 18.82 3.18 19.5 4 19.5C4.82 19.5 5.5 18.82 5.5 18C5.5 17.18 4.83 16.5 4 16.5ZM8 19H20C20.55 19 21 18.55 21 18C21 17.45 20.55 17 20 17H8C7.45 17 7 17.45 7 18C7 18.55 7.45 19 8 19ZM8 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H8C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM7 6C7 6.55 7.45 7 8 7H20C20.55 7 21 6.55 21 6C21 5.45 20.55 5 20 5H8C7.45 5 7 5.45 7 6Z"
13
+ />
7
14
  </g>
8
15
  <defs>
9
16
  <clipPath id="clip0_977_8070">
10
- <rect width="24" height="24"/>
17
+ <rect width="24" height="24" />
11
18
  </clipPath>
12
19
  </defs>
13
20
  </svg>
@@ -1,7 +1,15 @@
1
1
  import { html } from 'atomico'
2
2
 
3
3
  export const captionIcon = html`
4
- <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
5
- <path fill="currentColor" d="M9 22a1 1 0 0 1-1-1v-3H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6.1l-3.7 3.71c-.2.19-.45.29-.7.29zm1-6v3.08L13.08 16H20V4H4v12z"/>
4
+ <svg
5
+ xmlns="http://www.w3.org/2000/svg"
6
+ width="32"
7
+ height="32"
8
+ viewBox="0 0 24 24"
9
+ >
10
+ <path
11
+ fill="currentColor"
12
+ d="M9 22a1 1 0 0 1-1-1v-3H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6.1l-3.7 3.71c-.2.19-.45.29-.7.29zm1-6v3.08L13.08 16H20V4H4v12z"
13
+ />
6
14
  </svg>
7
15
  `
@@ -1,13 +1,20 @@
1
1
  import { html } from 'atomico'
2
2
 
3
3
  export const checkBoxCheckedIcon = html`
4
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
4
+ <svg
5
+ xmlns="http://www.w3.org/2000/svg"
6
+ width="24"
7
+ height="24"
8
+ viewBox="0 0 24 24"
9
+ >
5
10
  <g clip-path="url(#clip0_1803_1151)">
6
- <path d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM10.71 16.29C10.32 16.68 9.69 16.68 9.3 16.29L5.71 12.7C5.32 12.31 5.32 11.68 5.71 11.29C6.1 10.9 6.73 10.9 7.12 11.29L10 14.17L16.88 7.29C17.27 6.9 17.9 6.9 18.29 7.29C18.68 7.68 18.68 8.31 18.29 8.7L10.71 16.29Z"/>
11
+ <path
12
+ d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM10.71 16.29C10.32 16.68 9.69 16.68 9.3 16.29L5.71 12.7C5.32 12.31 5.32 11.68 5.71 11.29C6.1 10.9 6.73 10.9 7.12 11.29L10 14.17L16.88 7.29C17.27 6.9 17.9 6.9 18.29 7.29C18.68 7.68 18.68 8.31 18.29 8.7L10.71 16.29Z"
13
+ />
7
14
  </g>
8
15
  <defs>
9
16
  <clipPath id="clip0_1803_1151">
10
- <rect width="24" height="24"/>
17
+ <rect width="24" height="24" />
11
18
  </clipPath>
12
19
  </defs>
13
20
  </svg>
@@ -1,13 +1,20 @@
1
1
  import { html } from 'atomico'
2
2
 
3
3
  export const checkBoxUncheckedIcon = html`
4
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
4
+ <svg
5
+ xmlns="http://www.w3.org/2000/svg"
6
+ width="24"
7
+ height="24"
8
+ viewBox="0 0 24 24"
9
+ >
5
10
  <g clip-path="url(#clip0_1803_535)">
6
- <path d="M18 19H6C5.45 19 5 18.55 5 18V6C5 5.45 5.45 5 6 5H18C18.55 5 19 5.45 19 6V18C19 18.55 18.55 19 18 19ZM19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3Z"/>
11
+ <path
12
+ d="M18 19H6C5.45 19 5 18.55 5 18V6C5 5.45 5.45 5 6 5H18C18.55 5 19 5.45 19 6V18C19 18.55 18.55 19 18 19ZM19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3Z"
13
+ />
7
14
  </g>
8
15
  <defs>
9
16
  <clipPath id="clip0_1803_535">
10
- <rect width="24" height="24"/>
17
+ <rect width="24" height="24" />
11
18
  </clipPath>
12
19
  </defs>
13
20
  </svg>
@@ -1,7 +1,18 @@
1
1
  import { html } from 'atomico'
2
2
 
3
3
  export const chevronDownIcon = html`
4
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
5
- <path stroke-linecap="round" stroke-linejoin="round" d="M19.5 8.25l-7.5 7.5-7.5-7.5" />
4
+ <svg
5
+ xmlns="http://www.w3.org/2000/svg"
6
+ fill="none"
7
+ viewBox="0 0 24 24"
8
+ stroke-width="1.5"
9
+ stroke="currentColor"
10
+ class="w-6 h-6"
11
+ >
12
+ <path
13
+ stroke-linecap="round"
14
+ stroke-linejoin="round"
15
+ d="M19.5 8.25l-7.5 7.5-7.5-7.5"
16
+ />
6
17
  </svg>
7
18
  `
@@ -1,13 +1,20 @@
1
1
  import { html } from 'atomico'
2
2
 
3
3
  export const clearIcon = html`
4
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
4
+ <svg
5
+ xmlns="http://www.w3.org/2000/svg"
6
+ width="24"
7
+ height="24"
8
+ viewBox="0 0 24 24"
9
+ >
5
10
  <g clip-path="url(#clip0_1098_15553)">
6
- <path d="M18.3007 5.70973C17.9107 5.31973 17.2807 5.31973 16.8907 5.70973L12.0007 10.5897L7.1107 5.69973C6.7207 5.30973 6.0907 5.30973 5.7007 5.69973C5.3107 6.08973 5.3107 6.71973 5.7007 7.10973L10.5907 11.9997L5.7007 16.8897C5.3107 17.2797 5.3107 17.9097 5.7007 18.2997C6.0907 18.6897 6.7207 18.6897 7.1107 18.2997L12.0007 13.4097L16.8907 18.2997C17.2807 18.6897 17.9107 18.6897 18.3007 18.2997C18.6907 17.9097 18.6907 17.2797 18.3007 16.8897L13.4107 11.9997L18.3007 7.10973C18.6807 6.72973 18.6807 6.08973 18.3007 5.70973Z"/>
11
+ <path
12
+ d="M18.3007 5.70973C17.9107 5.31973 17.2807 5.31973 16.8907 5.70973L12.0007 10.5897L7.1107 5.69973C6.7207 5.30973 6.0907 5.30973 5.7007 5.69973C5.3107 6.08973 5.3107 6.71973 5.7007 7.10973L10.5907 11.9997L5.7007 16.8897C5.3107 17.2797 5.3107 17.9097 5.7007 18.2997C6.0907 18.6897 6.7207 18.6897 7.1107 18.2997L12.0007 13.4097L16.8907 18.2997C17.2807 18.6897 17.9107 18.6897 18.3007 18.2997C18.6907 17.9097 18.6907 17.2797 18.3007 16.8897L13.4107 11.9997L18.3007 7.10973C18.6807 6.72973 18.6807 6.08973 18.3007 5.70973Z"
13
+ />
7
14
  </g>
8
15
  <defs>
9
16
  <clipPath id="clip0_1098_15553">
10
- <rect width="24" height="24"/>
17
+ <rect width="24" height="24" />
11
18
  </clipPath>
12
19
  </defs>
13
20
  </svg>
package/src/icons/code.ts CHANGED
@@ -1,13 +1,20 @@
1
1
  import { html } from 'atomico'
2
2
 
3
3
  export const codeIcon = html`
4
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
4
+ <svg
5
+ xmlns="http://www.w3.org/2000/svg"
6
+ width="24"
7
+ height="24"
8
+ viewBox="0 0 24 24"
9
+ >
5
10
  <g clip-path="url(#clip0_977_8081)">
6
- <path d="M9.4 16.6L4.8 12L9.4 7.4L8 6L2 12L8 18L9.4 16.6ZM14.6 16.6L19.2 12L14.6 7.4L16 6L22 12L16 18L14.6 16.6Z"/>
11
+ <path
12
+ d="M9.4 16.6L4.8 12L9.4 7.4L8 6L2 12L8 18L9.4 16.6ZM14.6 16.6L19.2 12L14.6 7.4L16 6L22 12L16 18L14.6 16.6Z"
13
+ />
7
14
  </g>
8
15
  <defs>
9
16
  <clipPath id="clip0_977_8081">
10
- <rect width="24" height="24"/>
17
+ <rect width="24" height="24" />
11
18
  </clipPath>
12
19
  </defs>
13
20
  </svg>
@@ -1,9 +1,18 @@
1
1
  import { html } from 'atomico'
2
2
 
3
3
  export const confirmIcon = html`
4
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
4
+ <svg
5
+ xmlns="http://www.w3.org/2000/svg"
6
+ width="24"
7
+ height="24"
8
+ viewBox="0 0 24 24"
9
+ fill="none"
10
+ >
5
11
  <g clip-path="url(#clip0_1013_1606)">
6
- <path d="M9.00012 16.1998L5.50012 12.6998C5.11012 12.3098 4.49012 12.3098 4.10012 12.6998C3.71012 13.0898 3.71012 13.7098 4.10012 14.0998L8.29012 18.2898C8.68012 18.6798 9.31012 18.6798 9.70012 18.2898L20.3001 7.69982C20.6901 7.30982 20.6901 6.68982 20.3001 6.29982C19.9101 5.90982 19.2901 5.90982 18.9001 6.29982L9.00012 16.1998Z" fill="#817567"/>
12
+ <path
13
+ d="M9.00012 16.1998L5.50012 12.6998C5.11012 12.3098 4.49012 12.3098 4.10012 12.6998C3.71012 13.0898 3.71012 13.7098 4.10012 14.0998L8.29012 18.2898C8.68012 18.6798 9.31012 18.6798 9.70012 18.2898L20.3001 7.69982C20.6901 7.30982 20.6901 6.68982 20.3001 6.29982C19.9101 5.90982 19.2901 5.90982 18.9001 6.29982L9.00012 16.1998Z"
14
+ fill="#817567"
15
+ />
7
16
  </g>
8
17
  <defs>
9
18
  <clipPath id="clip0_1013_1606">
@@ -1,13 +1,22 @@
1
1
  import { html } from 'atomico'
2
2
 
3
3
  export const dividerIcon = html`
4
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
4
+ <svg
5
+ xmlns="http://www.w3.org/2000/svg"
6
+ width="24"
7
+ height="24"
8
+ viewBox="0 0 24 24"
9
+ >
5
10
  <g clip-path="url(#clip0_977_7900)">
6
- <path fill-rule="evenodd" clip-rule="evenodd" d="M19 13H5C4.45 13 4 12.55 4 12C4 11.45 4.45 11 5 11H19C19.55 11 20 11.45 20 12C20 12.55 19.55 13 19 13Z"/>
11
+ <path
12
+ fill-rule="evenodd"
13
+ clip-rule="evenodd"
14
+ d="M19 13H5C4.45 13 4 12.55 4 12C4 11.45 4.45 11 5 11H19C19.55 11 20 11.45 20 12C20 12.55 19.55 13 19 13Z"
15
+ />
7
16
  </g>
8
17
  <defs>
9
18
  <clipPath id="clip0_977_7900">
10
- <rect width="24" height="24"/>
19
+ <rect width="24" height="24" />
11
20
  </clipPath>
12
21
  </defs>
13
22
  </svg>
@@ -1,7 +1,14 @@
1
1
  import { html } from 'atomico'
2
2
 
3
3
  export const dragHandleIcon = html`
4
- <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
5
- <path d="M3.5 9.83366C3.35833 9.83366 3.23961 9.78571 3.14383 9.68983C3.04794 9.59394 3 9.47516 3 9.33349C3 9.19171 3.04794 9.07299 3.14383 8.97733C3.23961 8.88155 3.35833 8.83366 3.5 8.83366H12.5C12.6417 8.83366 12.7604 8.8816 12.8562 8.97749C12.9521 9.07338 13 9.19216 13 9.33383C13 9.4756 12.9521 9.59433 12.8562 9.68999C12.7604 9.78577 12.6417 9.83366 12.5 9.83366H3.5ZM3.5 7.16699C3.35833 7.16699 3.23961 7.11905 3.14383 7.02316C3.04794 6.92727 3 6.80849 3 6.66683C3 6.52505 3.04794 6.40633 3.14383 6.31066C3.23961 6.21488 3.35833 6.16699 3.5 6.16699H12.5C12.6417 6.16699 12.7604 6.21494 12.8562 6.31083C12.9521 6.40671 13 6.52549 13 6.66716C13 6.80894 12.9521 6.92766 12.8562 7.02333C12.7604 7.1191 12.6417 7.16699 12.5 7.16699H3.5Z"/>
4
+ <svg
5
+ xmlns="http://www.w3.org/2000/svg"
6
+ width="16"
7
+ height="16"
8
+ viewBox="0 0 16 16"
9
+ >
10
+ <path
11
+ d="M3.5 9.83366C3.35833 9.83366 3.23961 9.78571 3.14383 9.68983C3.04794 9.59394 3 9.47516 3 9.33349C3 9.19171 3.04794 9.07299 3.14383 8.97733C3.23961 8.88155 3.35833 8.83366 3.5 8.83366H12.5C12.6417 8.83366 12.7604 8.8816 12.8562 8.97749C12.9521 9.07338 13 9.19216 13 9.33383C13 9.4756 12.9521 9.59433 12.8562 9.68999C12.7604 9.78577 12.6417 9.83366 12.5 9.83366H3.5ZM3.5 7.16699C3.35833 7.16699 3.23961 7.11905 3.14383 7.02316C3.04794 6.92727 3 6.80849 3 6.66683C3 6.52505 3.04794 6.40633 3.14383 6.31066C3.23961 6.21488 3.35833 6.16699 3.5 6.16699H12.5C12.6417 6.16699 12.7604 6.21494 12.8562 6.31083C12.9521 6.40671 13 6.52549 13 6.66716C13 6.80894 12.9521 6.92766 12.8562 7.02333C12.7604 7.1191 12.6417 7.16699 12.5 7.16699H3.5Z"
12
+ />
6
13
  </svg>
7
14
  `
package/src/icons/edit.ts CHANGED
@@ -1,13 +1,20 @@
1
1
  import { html } from 'atomico'
2
2
 
3
3
  export const editIcon = html`
4
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
4
+ <svg
5
+ xmlns="http://www.w3.org/2000/svg"
6
+ width="24"
7
+ height="24"
8
+ viewBox="0 0 24 24"
9
+ >
5
10
  <g clip-path="url(#clip0_1013_1585)">
6
- <path d="M14.06 9.02L14.98 9.94L5.92 19H5V18.08L14.06 9.02ZM17.66 3C17.41 3 17.15 3.1 16.96 3.29L15.13 5.12L18.88 8.87L20.71 7.04C21.1 6.65 21.1 6.02 20.71 5.63L18.37 3.29C18.17 3.09 17.92 3 17.66 3ZM14.06 6.19L3 17.25V21H6.75L17.81 9.94L14.06 6.19Z"/>
11
+ <path
12
+ d="M14.06 9.02L14.98 9.94L5.92 19H5V18.08L14.06 9.02ZM17.66 3C17.41 3 17.15 3.1 16.96 3.29L15.13 5.12L18.88 8.87L20.71 7.04C21.1 6.65 21.1 6.02 20.71 5.63L18.37 3.29C18.17 3.09 17.92 3 17.66 3ZM14.06 6.19L3 17.25V21H6.75L17.81 9.94L14.06 6.19Z"
13
+ />
7
14
  </g>
8
15
  <defs>
9
16
  <clipPath id="clip0_1013_1585">
10
- <rect width="24" height="24"/>
17
+ <rect width="24" height="24" />
11
18
  </clipPath>
12
19
  </defs>
13
20
  </svg>
package/src/icons/h1.ts CHANGED
@@ -1,13 +1,20 @@
1
1
  import { html } from 'atomico'
2
2
 
3
3
  export const h1Icon = html`
4
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
4
+ <svg
5
+ xmlns="http://www.w3.org/2000/svg"
6
+ width="24"
7
+ height="24"
8
+ viewBox="0 0 24 24"
9
+ >
5
10
  <g clip-path="url(#clip0_992_5553)">
6
- <path d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM19 19H5V5H19V19ZM12 17H14V7H10V9H12V17Z"/>
11
+ <path
12
+ d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM19 19H5V5H19V19ZM12 17H14V7H10V9H12V17Z"
13
+ />
7
14
  </g>
8
15
  <defs>
9
16
  <clipPath id="clip0_992_5553">
10
- <rect width="24" height="24"/>
17
+ <rect width="24" height="24" />
11
18
  </clipPath>
12
19
  </defs>
13
20
  </svg>