@hkyhy/marsun-components-core 0.1.89 → 0.1.98

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 (278) hide show
  1. package/dist/components/Audit/AuditLogList.d.ts +27 -0
  2. package/dist/components/Audit/AuditLogList.js +272 -0
  3. package/dist/components/Audit/AuditLogList.js.map +1 -0
  4. package/dist/components/Audit/formatAuditCurl.d.ts +27 -0
  5. package/dist/components/Audit/formatAuditCurl.js +115 -0
  6. package/dist/components/Audit/formatAuditCurl.js.map +1 -0
  7. package/dist/components/Audit/formatAuditJson.d.ts +15 -0
  8. package/dist/components/Audit/formatAuditJson.js +135 -0
  9. package/dist/components/Audit/formatAuditJson.js.map +1 -0
  10. package/dist/components/Audit/index.d.ts +3 -0
  11. package/dist/components/Audit/style.module.scss.js +30 -0
  12. package/dist/components/Audit/style.module.scss.js.map +1 -0
  13. package/dist/components/Audit/types.d.ts +39 -0
  14. package/dist/components/Editor/RichTextEditor/RichTextEditor.d.ts +24 -0
  15. package/dist/components/Editor/RichTextEditor/RichTextEditor.js +93 -0
  16. package/dist/components/Editor/RichTextEditor/RichTextEditor.js.map +1 -0
  17. package/dist/components/Editor/RichTextEditor/index.d.ts +2 -0
  18. package/dist/components/Editor/RichTextEditor/style.module.scss.js +11 -0
  19. package/dist/components/Editor/RichTextEditor/style.module.scss.js.map +1 -0
  20. package/dist/components/Editor/VariablePicker.d.ts +19 -0
  21. package/dist/components/Editor/VariablePicker.js +55 -0
  22. package/dist/components/Editor/VariablePicker.js.map +1 -0
  23. package/dist/components/Editor/index.d.ts +7 -0
  24. package/dist/components/Editor/index.js +21 -0
  25. package/dist/components/Editor/index.js.map +1 -0
  26. package/dist/components/Editor/msgVarTokenPlugin.d.ts +13 -0
  27. package/dist/components/Editor/msgVarTokenPlugin.js +94 -0
  28. package/dist/components/Editor/msgVarTokenPlugin.js.map +1 -0
  29. package/dist/components/Editor/variableMention.d.ts +37 -0
  30. package/dist/components/Editor/variableMention.js +64 -0
  31. package/dist/components/Editor/variableMention.js.map +1 -0
  32. package/dist/components/FormInfo/RichTextField/index.d.ts +21 -0
  33. package/dist/components/FormInfo/RichTextField/index.js +82 -0
  34. package/dist/components/FormInfo/RichTextField/index.js.map +1 -0
  35. package/dist/components/FormInfo/RichTextField/style.module.scss.js +9 -0
  36. package/dist/components/FormInfo/RichTextField/style.module.scss.js.map +1 -0
  37. package/dist/components/FormInfo/VariableMentionInput/index.d.ts +17 -0
  38. package/dist/components/FormInfo/VariableMentionInput/index.js +73 -0
  39. package/dist/components/FormInfo/VariableMentionInput/index.js.map +1 -0
  40. package/dist/components/FormInfo/VariableMentionInput/style.module.scss.js +11 -0
  41. package/dist/components/FormInfo/VariableMentionInput/style.module.scss.js.map +1 -0
  42. package/dist/components/FormInfo/fields.d.ts +5 -0
  43. package/dist/components/FormInfo/fields.js +32 -23
  44. package/dist/components/FormInfo/fields.js.map +1 -1
  45. package/dist/components/FormInfo/index.d.ts +4 -0
  46. package/dist/components/StateBar/StateBar.d.ts +19 -6
  47. package/dist/components/StateBar/StateBar.js +87 -50
  48. package/dist/components/StateBar/StateBar.js.map +1 -1
  49. package/dist/components/StateBar/style.module.scss.js +13 -10
  50. package/dist/components/StateBar/style.module.scss.js.map +1 -1
  51. package/dist/components/Tools/Inbox/InboxBell/InboxBell.d.ts +45 -0
  52. package/dist/components/Tools/Inbox/InboxBell/InboxBell.js +156 -0
  53. package/dist/components/Tools/Inbox/InboxBell/InboxBell.js.map +1 -0
  54. package/dist/components/Tools/Inbox/InboxBell/index.d.ts +2 -0
  55. package/dist/components/Tools/Inbox/InboxBell/style.module.scss.js +30 -0
  56. package/dist/components/Tools/Inbox/InboxBell/style.module.scss.js.map +1 -0
  57. package/dist/components/Tools/Inbox/index.d.ts +2 -0
  58. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/List/columns.d.ts +8 -0
  59. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/List/columns.js +56 -0
  60. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/List/columns.js.map +1 -0
  61. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/MessageTemplateAdmin.d.ts +8 -0
  62. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/MessageTemplateAdmin.js +216 -0
  63. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/MessageTemplateAdmin.js.map +1 -0
  64. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/Modal/TemplateFormModal.d.ts +26 -0
  65. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/Modal/TemplateFormModal.js +190 -0
  66. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/Modal/TemplateFormModal.js.map +1 -0
  67. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/index.d.ts +3 -0
  68. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/style.module.scss.js +12 -0
  69. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/style.module.scss.js.map +1 -0
  70. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/types.d.ts +76 -0
  71. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/types.js +26 -0
  72. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/types.js.map +1 -0
  73. package/dist/components/Tools/MessageCenter/index.d.ts +3 -0
  74. package/dist/components/Tools/MessageCenter/utils/templateCode.d.ts +8 -0
  75. package/dist/components/Tools/MessageCenter/utils/templateCode.js +25 -0
  76. package/dist/components/Tools/MessageCenter/utils/templateCode.js.map +1 -0
  77. package/dist/components/Tools/index.d.ts +5 -0
  78. package/dist/components/index.d.ts +3 -0
  79. package/dist/editor.d.ts +5 -0
  80. package/dist/editor.js +21 -0
  81. package/dist/editor.js.map +1 -0
  82. package/dist/form-info.js +33 -29
  83. package/dist/form-info.js.map +1 -1
  84. package/dist/index.d.ts +5 -0
  85. package/dist/index.js +805 -773
  86. package/dist/index.js.map +1 -1
  87. package/dist/marsun-components-core.css +4 -1
  88. package/dist/node_modules/@ckeditor/ckeditor5-basic-styles/dist/index.js +301 -0
  89. package/dist/node_modules/@ckeditor/ckeditor5-basic-styles/dist/index.js.map +1 -0
  90. package/dist/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js +1256 -0
  91. package/dist/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js.map +1 -0
  92. package/dist/node_modules/@ckeditor/ckeditor5-core/dist/index.js +2107 -0
  93. package/dist/node_modules/@ckeditor/ckeditor5-core/dist/index.js.map +1 -0
  94. package/dist/node_modules/@ckeditor/ckeditor5-editor-classic/dist/index.js +259 -0
  95. package/dist/node_modules/@ckeditor/ckeditor5-editor-classic/dist/index.js.map +1 -0
  96. package/dist/node_modules/@ckeditor/ckeditor5-engine/dist/index.js +23990 -0
  97. package/dist/node_modules/@ckeditor/ckeditor5-engine/dist/index.js.map +1 -0
  98. package/dist/node_modules/@ckeditor/ckeditor5-enter/dist/index.js +249 -0
  99. package/dist/node_modules/@ckeditor/ckeditor5-enter/dist/index.js.map +1 -0
  100. package/dist/node_modules/@ckeditor/ckeditor5-essentials/dist/index.js +47 -0
  101. package/dist/node_modules/@ckeditor/ckeditor5-essentials/dist/index.js.map +1 -0
  102. package/dist/node_modules/@ckeditor/ckeditor5-font/dist/index.js +100 -0
  103. package/dist/node_modules/@ckeditor/ckeditor5-font/dist/index.js.map +1 -0
  104. package/dist/node_modules/@ckeditor/ckeditor5-icons/dist/index.js +31 -0
  105. package/dist/node_modules/@ckeditor/ckeditor5-icons/dist/index.js.map +1 -0
  106. package/dist/node_modules/@ckeditor/ckeditor5-integrations-common/dist/index.js +194 -0
  107. package/dist/node_modules/@ckeditor/ckeditor5-integrations-common/dist/index.js.map +1 -0
  108. package/dist/node_modules/@ckeditor/ckeditor5-list/dist/index.js +2042 -0
  109. package/dist/node_modules/@ckeditor/ckeditor5-list/dist/index.js.map +1 -0
  110. package/dist/node_modules/@ckeditor/ckeditor5-mention/dist/index.js +9 -0
  111. package/dist/node_modules/@ckeditor/ckeditor5-mention/dist/index.js.map +1 -0
  112. package/dist/node_modules/@ckeditor/ckeditor5-paragraph/dist/index.js +167 -0
  113. package/dist/node_modules/@ckeditor/ckeditor5-paragraph/dist/index.js.map +1 -0
  114. package/dist/node_modules/@ckeditor/ckeditor5-react/dist/index.js +471 -0
  115. package/dist/node_modules/@ckeditor/ckeditor5-react/dist/index.js.map +1 -0
  116. package/dist/node_modules/@ckeditor/ckeditor5-select-all/dist/index.js +139 -0
  117. package/dist/node_modules/@ckeditor/ckeditor5-select-all/dist/index.js.map +1 -0
  118. package/dist/node_modules/@ckeditor/ckeditor5-typing/dist/index.js +755 -0
  119. package/dist/node_modules/@ckeditor/ckeditor5-typing/dist/index.js.map +1 -0
  120. package/dist/node_modules/@ckeditor/ckeditor5-ui/dist/index.js +7838 -0
  121. package/dist/node_modules/@ckeditor/ckeditor5-ui/dist/index.js.map +1 -0
  122. package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-convert/conversions.js +422 -0
  123. package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-convert/conversions.js.map +1 -0
  124. package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-convert/index.js +33 -0
  125. package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-convert/index.js.map +1 -0
  126. package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-convert/route.js +47 -0
  127. package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-convert/route.js.map +1 -0
  128. package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-name/index.js +156 -0
  129. package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-name/index.js.map +1 -0
  130. package/dist/node_modules/@ckeditor/ckeditor5-undo/dist/index.js +313 -0
  131. package/dist/node_modules/@ckeditor/ckeditor5-undo/dist/index.js.map +1 -0
  132. package/dist/node_modules/@ckeditor/ckeditor5-utils/dist/index.js +2942 -0
  133. package/dist/node_modules/@ckeditor/ckeditor5-utils/dist/index.js.map +1 -0
  134. package/dist/node_modules/@ckeditor/ckeditor5-watchdog/dist/index.js +892 -0
  135. package/dist/node_modules/@ckeditor/ckeditor5-watchdog/dist/index.js.map +1 -0
  136. package/dist/node_modules/@ckeditor/ckeditor5-widget/dist/index.js +1047 -0
  137. package/dist/node_modules/@ckeditor/ckeditor5-widget/dist/index.js.map +1 -0
  138. package/dist/node_modules/color-parse/node_modules/color-name/index.js +153 -0
  139. package/dist/node_modules/color-parse/node_modules/color-name/index.js.map +1 -0
  140. package/dist/node_modules/es-toolkit/dist/_internal/globalThis.js +7 -0
  141. package/dist/node_modules/es-toolkit/dist/_internal/globalThis.js.map +1 -0
  142. package/dist/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.js +7 -0
  143. package/dist/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.js.map +1 -0
  144. package/dist/node_modules/es-toolkit/dist/_internal/isUnsafeToWriteProperty.js +7 -0
  145. package/dist/node_modules/es-toolkit/dist/_internal/isUnsafeToWriteProperty.js.map +1 -0
  146. package/dist/node_modules/es-toolkit/dist/compat/_internal/assignValue.js +9 -0
  147. package/dist/node_modules/es-toolkit/dist/compat/_internal/assignValue.js.map +1 -0
  148. package/dist/node_modules/es-toolkit/dist/compat/_internal/getSymbols.js +7 -0
  149. package/dist/node_modules/es-toolkit/dist/compat/_internal/getSymbols.js.map +1 -0
  150. package/dist/node_modules/es-toolkit/dist/compat/_internal/getTag.js +7 -0
  151. package/dist/node_modules/es-toolkit/dist/compat/_internal/getTag.js.map +1 -0
  152. package/dist/node_modules/es-toolkit/dist/compat/_internal/isDeepKey.js +16 -0
  153. package/dist/node_modules/es-toolkit/dist/compat/_internal/isDeepKey.js.map +1 -0
  154. package/dist/node_modules/es-toolkit/dist/compat/_internal/isIndex.js +15 -0
  155. package/dist/node_modules/es-toolkit/dist/compat/_internal/isIndex.js.map +1 -0
  156. package/dist/node_modules/es-toolkit/dist/compat/_internal/isKey.js +9 -0
  157. package/dist/node_modules/es-toolkit/dist/compat/_internal/isKey.js.map +1 -0
  158. package/dist/node_modules/es-toolkit/dist/compat/_internal/isPrototype.js +8 -0
  159. package/dist/node_modules/es-toolkit/dist/compat/_internal/isPrototype.js.map +1 -0
  160. package/dist/node_modules/es-toolkit/dist/compat/_internal/tags.js +30 -0
  161. package/dist/node_modules/es-toolkit/dist/compat/_internal/tags.js.map +1 -0
  162. package/dist/node_modules/es-toolkit/dist/compat/_internal/toKey.js +8 -0
  163. package/dist/node_modules/es-toolkit/dist/compat/_internal/toKey.js.map +1 -0
  164. package/dist/node_modules/es-toolkit/dist/compat/function/debounce.js +17 -0
  165. package/dist/node_modules/es-toolkit/dist/compat/function/debounce.js.map +1 -0
  166. package/dist/node_modules/es-toolkit/dist/compat/function/throttle.js +13 -0
  167. package/dist/node_modules/es-toolkit/dist/compat/function/throttle.js.map +1 -0
  168. package/dist/node_modules/es-toolkit/dist/compat/object/assignIn.js +17 -0
  169. package/dist/node_modules/es-toolkit/dist/compat/object/assignIn.js.map +1 -0
  170. package/dist/node_modules/es-toolkit/dist/compat/object/clone.js +102 -0
  171. package/dist/node_modules/es-toolkit/dist/compat/object/clone.js.map +1 -0
  172. package/dist/node_modules/es-toolkit/dist/compat/object/cloneDeep.js +8 -0
  173. package/dist/node_modules/es-toolkit/dist/compat/object/cloneDeep.js.map +1 -0
  174. package/dist/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.js +33 -0
  175. package/dist/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.js.map +1 -0
  176. package/dist/node_modules/es-toolkit/dist/compat/object/get.js +39 -0
  177. package/dist/node_modules/es-toolkit/dist/compat/object/get.js.map +1 -0
  178. package/dist/node_modules/es-toolkit/dist/compat/object/has.js +21 -0
  179. package/dist/node_modules/es-toolkit/dist/compat/object/has.js.map +1 -0
  180. package/dist/node_modules/es-toolkit/dist/compat/object/keysIn.js +33 -0
  181. package/dist/node_modules/es-toolkit/dist/compat/object/keysIn.js.map +1 -0
  182. package/dist/node_modules/es-toolkit/dist/compat/object/mapValues.js +10 -0
  183. package/dist/node_modules/es-toolkit/dist/compat/object/mapValues.js.map +1 -0
  184. package/dist/node_modules/es-toolkit/dist/compat/object/merge.js +9 -0
  185. package/dist/node_modules/es-toolkit/dist/compat/object/merge.js.map +1 -0
  186. package/dist/node_modules/es-toolkit/dist/compat/object/mergeWith.js +53 -0
  187. package/dist/node_modules/es-toolkit/dist/compat/object/mergeWith.js.map +1 -0
  188. package/dist/node_modules/es-toolkit/dist/compat/object/property.js +10 -0
  189. package/dist/node_modules/es-toolkit/dist/compat/object/property.js.map +1 -0
  190. package/dist/node_modules/es-toolkit/dist/compat/object/set.js +9 -0
  191. package/dist/node_modules/es-toolkit/dist/compat/object/set.js.map +1 -0
  192. package/dist/node_modules/es-toolkit/dist/compat/object/updateWith.js +31 -0
  193. package/dist/node_modules/es-toolkit/dist/compat/object/updateWith.js.map +1 -0
  194. package/dist/node_modules/es-toolkit/dist/compat/predicate/isArguments.js +8 -0
  195. package/dist/node_modules/es-toolkit/dist/compat/predicate/isArguments.js.map +1 -0
  196. package/dist/node_modules/es-toolkit/dist/compat/predicate/isArray.js +7 -0
  197. package/dist/node_modules/es-toolkit/dist/compat/predicate/isArray.js.map +1 -0
  198. package/dist/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.js +8 -0
  199. package/dist/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.js.map +1 -0
  200. package/dist/node_modules/es-toolkit/dist/compat/predicate/isArrayLikeObject.js +9 -0
  201. package/dist/node_modules/es-toolkit/dist/compat/predicate/isArrayLikeObject.js.map +1 -0
  202. package/dist/node_modules/es-toolkit/dist/compat/predicate/isElement.js +9 -0
  203. package/dist/node_modules/es-toolkit/dist/compat/predicate/isElement.js.map +1 -0
  204. package/dist/node_modules/es-toolkit/dist/compat/predicate/isEqualWith.js +15 -0
  205. package/dist/node_modules/es-toolkit/dist/compat/predicate/isEqualWith.js.map +1 -0
  206. package/dist/node_modules/es-toolkit/dist/compat/predicate/isFunction.js +7 -0
  207. package/dist/node_modules/es-toolkit/dist/compat/predicate/isFunction.js.map +1 -0
  208. package/dist/node_modules/es-toolkit/dist/compat/predicate/isMatch.js +9 -0
  209. package/dist/node_modules/es-toolkit/dist/compat/predicate/isMatch.js.map +1 -0
  210. package/dist/node_modules/es-toolkit/dist/compat/predicate/isMatchWith.js +81 -0
  211. package/dist/node_modules/es-toolkit/dist/compat/predicate/isMatchWith.js.map +1 -0
  212. package/dist/node_modules/es-toolkit/dist/compat/predicate/isObject.js +7 -0
  213. package/dist/node_modules/es-toolkit/dist/compat/predicate/isObject.js.map +1 -0
  214. package/dist/node_modules/es-toolkit/dist/compat/predicate/isObjectLike.js +7 -0
  215. package/dist/node_modules/es-toolkit/dist/compat/predicate/isObjectLike.js.map +1 -0
  216. package/dist/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.js +16 -0
  217. package/dist/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.js.map +1 -0
  218. package/dist/node_modules/es-toolkit/dist/compat/predicate/isString.js +7 -0
  219. package/dist/node_modules/es-toolkit/dist/compat/predicate/isString.js.map +1 -0
  220. package/dist/node_modules/es-toolkit/dist/compat/predicate/isSymbol.js +7 -0
  221. package/dist/node_modules/es-toolkit/dist/compat/predicate/isSymbol.js.map +1 -0
  222. package/dist/node_modules/es-toolkit/dist/compat/predicate/isTypedArray.js +8 -0
  223. package/dist/node_modules/es-toolkit/dist/compat/predicate/isTypedArray.js.map +1 -0
  224. package/dist/node_modules/es-toolkit/dist/compat/predicate/matches.js +9 -0
  225. package/dist/node_modules/es-toolkit/dist/compat/predicate/matches.js.map +1 -0
  226. package/dist/node_modules/es-toolkit/dist/compat/predicate/matchesProperty.js +23 -0
  227. package/dist/node_modules/es-toolkit/dist/compat/predicate/matchesProperty.js.map +1 -0
  228. package/dist/node_modules/es-toolkit/dist/compat/util/eq.js +7 -0
  229. package/dist/node_modules/es-toolkit/dist/compat/util/eq.js.map +1 -0
  230. package/dist/node_modules/es-toolkit/dist/compat/util/iteratee.js +19 -0
  231. package/dist/node_modules/es-toolkit/dist/compat/util/iteratee.js.map +1 -0
  232. package/dist/node_modules/es-toolkit/dist/compat/util/times.js +11 -0
  233. package/dist/node_modules/es-toolkit/dist/compat/util/times.js.map +1 -0
  234. package/dist/node_modules/es-toolkit/dist/compat/util/toFinite.js +8 -0
  235. package/dist/node_modules/es-toolkit/dist/compat/util/toFinite.js.map +1 -0
  236. package/dist/node_modules/es-toolkit/dist/compat/util/toInteger.js +9 -0
  237. package/dist/node_modules/es-toolkit/dist/compat/util/toInteger.js.map +1 -0
  238. package/dist/node_modules/es-toolkit/dist/compat/util/toNumber.js +8 -0
  239. package/dist/node_modules/es-toolkit/dist/compat/util/toNumber.js.map +1 -0
  240. package/dist/node_modules/es-toolkit/dist/compat/util/toPath.js +37 -0
  241. package/dist/node_modules/es-toolkit/dist/compat/util/toPath.js.map +1 -0
  242. package/dist/node_modules/es-toolkit/dist/compat/util/toString.js +15 -0
  243. package/dist/node_modules/es-toolkit/dist/compat/util/toString.js.map +1 -0
  244. package/dist/node_modules/es-toolkit/dist/function/after.js +11 -0
  245. package/dist/node_modules/es-toolkit/dist/function/after.js.map +1 -0
  246. package/dist/node_modules/es-toolkit/dist/function/debounce.js +30 -0
  247. package/dist/node_modules/es-toolkit/dist/function/debounce.js.map +1 -0
  248. package/dist/node_modules/es-toolkit/dist/function/identity.js +7 -0
  249. package/dist/node_modules/es-toolkit/dist/function/identity.js.map +1 -0
  250. package/dist/node_modules/es-toolkit/dist/function/noop.js +6 -0
  251. package/dist/node_modules/es-toolkit/dist/function/noop.js.map +1 -0
  252. package/dist/node_modules/es-toolkit/dist/object/clone.js +27 -0
  253. package/dist/node_modules/es-toolkit/dist/object/clone.js.map +1 -0
  254. package/dist/node_modules/es-toolkit/dist/object/cloneDeep.js +8 -0
  255. package/dist/node_modules/es-toolkit/dist/object/cloneDeep.js.map +1 -0
  256. package/dist/node_modules/es-toolkit/dist/object/cloneDeepWith.js +121 -0
  257. package/dist/node_modules/es-toolkit/dist/object/cloneDeepWith.js.map +1 -0
  258. package/dist/node_modules/es-toolkit/dist/object/mapValues.js +12 -0
  259. package/dist/node_modules/es-toolkit/dist/object/mapValues.js.map +1 -0
  260. package/dist/node_modules/es-toolkit/dist/predicate/isBuffer.js +8 -0
  261. package/dist/node_modules/es-toolkit/dist/predicate/isBuffer.js.map +1 -0
  262. package/dist/node_modules/es-toolkit/dist/predicate/isEqual.js +9 -0
  263. package/dist/node_modules/es-toolkit/dist/predicate/isEqual.js.map +1 -0
  264. package/dist/node_modules/es-toolkit/dist/predicate/isEqualWith.js +110 -0
  265. package/dist/node_modules/es-toolkit/dist/predicate/isEqualWith.js.map +1 -0
  266. package/dist/node_modules/es-toolkit/dist/predicate/isLength.js +7 -0
  267. package/dist/node_modules/es-toolkit/dist/predicate/isLength.js.map +1 -0
  268. package/dist/node_modules/es-toolkit/dist/predicate/isPlainObject.js +9 -0
  269. package/dist/node_modules/es-toolkit/dist/predicate/isPlainObject.js.map +1 -0
  270. package/dist/node_modules/es-toolkit/dist/predicate/isPrimitive.js +7 -0
  271. package/dist/node_modules/es-toolkit/dist/predicate/isPrimitive.js.map +1 -0
  272. package/dist/node_modules/es-toolkit/dist/predicate/isTypedArray.js +7 -0
  273. package/dist/node_modules/es-toolkit/dist/predicate/isTypedArray.js.map +1 -0
  274. package/dist/styles/global.css +4 -1
  275. package/dist/utils/copyText.d.ts +4 -0
  276. package/dist/utils/copyText.js +21 -0
  277. package/dist/utils/copyText.js.map +1 -0
  278. package/package.json +9 -2
@@ -0,0 +1,2042 @@
1
+ var dt = Object.defineProperty;
2
+ var ft = (e, t, i) => t in e ? dt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
3
+ var h = (e, t, i) => ft(e, typeof t != "symbol" ? t + "" : t, i);
4
+ import { Plugin as _, Command as D } from "../../ckeditor5-core/dist/index.js";
5
+ import { Delete as gt } from "../../ckeditor5-typing/dist/index.js";
6
+ import { Enter as pt } from "../../ckeditor5-enter/dist/index.js";
7
+ import { CKEditorError as It, toArray as B, first as ht, env as q, uid as bt } from "../../ckeditor5-utils/dist/index.js";
8
+ import { _normalizeFontSizeOptions as U } from "../../ckeditor5-font/dist/index.js";
9
+ import { ClipboardPipeline as kt } from "../../ckeditor5-clipboard/dist/index.js";
10
+ import { ButtonView as At, MenuBarMenuListItemButtonView as yt } from "../../ckeditor5-ui/dist/index.js";
11
+ import { IconNumberedList as Lt, IconBulletedList as _t } from "../../ckeditor5-icons/dist/index.js";
12
+ import "../../ckeditor5-engine/dist/index.js";
13
+ /**
14
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
15
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
16
+ */
17
+ /**
18
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
19
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
20
+ */
21
+ var A = class {
22
+ /**
23
+ * Creates a document list iterator.
24
+ *
25
+ * @param startElement The start list item block element.
26
+ * @param options.direction The iterating direction.
27
+ * @param options.includeSelf Whether start block should be included in the result (if it's matching other criteria).
28
+ * @param options.sameAttributes Additional attributes that must be the same for each block.
29
+ * @param options.sameIndent Whether blocks with the same indent level as the start block should be included
30
+ * in the result.
31
+ * @param options.lowerIndent Whether blocks with a lower indent level than the start block should be included
32
+ * in the result.
33
+ * @param options.higherIndent Whether blocks with a higher indent level than the start block should be included
34
+ * in the result.
35
+ */
36
+ constructor(e, t) {
37
+ /**
38
+ * The start list item block element.
39
+ */
40
+ h(this, "_startElement");
41
+ /**
42
+ * The reference indent. Initialized by the indent of the start block.
43
+ */
44
+ h(this, "_referenceIndent");
45
+ /**
46
+ * The iterating direction.
47
+ */
48
+ h(this, "_isForward");
49
+ /**
50
+ * Whether start block should be included in the result (if it's matching other criteria).
51
+ */
52
+ h(this, "_includeSelf");
53
+ /**
54
+ * Additional attributes that must be the same for each block.
55
+ */
56
+ h(this, "_sameAttributes");
57
+ /**
58
+ * Whether blocks with the same indent level as the start block should be included in the result.
59
+ */
60
+ h(this, "_sameIndent");
61
+ /**
62
+ * Whether blocks with a lower indent level than the start block should be included in the result.
63
+ */
64
+ h(this, "_lowerIndent");
65
+ /**
66
+ * Whether blocks with a higher indent level than the start block should be included in the result.
67
+ */
68
+ h(this, "_higherIndent");
69
+ this._startElement = e, this._referenceIndent = e.getAttribute("listIndent"), this._isForward = t.direction == "forward", this._includeSelf = !!t.includeSelf, this._sameAttributes = B(t.sameAttributes || []), this._sameIndent = !!t.sameIndent, this._lowerIndent = !!t.lowerIndent, this._higherIndent = !!t.higherIndent;
70
+ }
71
+ /**
72
+ * Performs only first step of iteration and returns the result.
73
+ *
74
+ * @param startElement The start list item block element.
75
+ * @param options.direction The iterating direction.
76
+ * @param options.includeSelf Whether start block should be included in the result (if it's matching other criteria).
77
+ * @param options.sameAttributes Additional attributes that must be the same for each block.
78
+ * @param options.sameIndent Whether blocks with the same indent level as the start block should be included
79
+ * in the result.
80
+ * @param options.lowerIndent Whether blocks with a lower indent level than the start block should be included
81
+ * in the result.
82
+ * @param options.higherIndent Whether blocks with a higher indent level than the start block should be included
83
+ * in the result.
84
+ */
85
+ static first(e, t) {
86
+ const i = new this(e, t)[Symbol.iterator]();
87
+ return ht(i);
88
+ }
89
+ /**
90
+ * Iterable interface.
91
+ */
92
+ *[Symbol.iterator]() {
93
+ const e = [];
94
+ for (const { node: t } of new P(this._getStartNode(), this._isForward ? "forward" : "backward")) {
95
+ const i = t.getAttribute("listIndent");
96
+ if (i < this._referenceIndent) {
97
+ if (!this._lowerIndent) break;
98
+ this._referenceIndent = i;
99
+ } else if (i > this._referenceIndent) {
100
+ if (!this._higherIndent) continue;
101
+ if (!this._isForward) {
102
+ e.push(t);
103
+ continue;
104
+ }
105
+ } else {
106
+ if (!this._sameIndent) {
107
+ if (this._higherIndent) {
108
+ e.length && (yield* e, e.length = 0);
109
+ break;
110
+ }
111
+ continue;
112
+ }
113
+ if (this._sameAttributes.some((s) => t.getAttribute(s) !== this._startElement.getAttribute(s))) break;
114
+ }
115
+ e.length && (yield* e, e.length = 0), yield t;
116
+ }
117
+ }
118
+ /**
119
+ * Returns the model element to start iterating.
120
+ */
121
+ _getStartNode() {
122
+ return this._includeSelf ? this._startElement : this._isForward ? this._startElement.nextSibling : this._startElement.previousSibling;
123
+ }
124
+ }, P = class {
125
+ /**
126
+ * @param node The model node.
127
+ * @param direction Iteration direction.
128
+ */
129
+ constructor(e, t = "forward") {
130
+ h(this, "_node");
131
+ h(this, "_isForward");
132
+ h(this, "_previousNodesByIndent", []);
133
+ h(this, "_previous", null);
134
+ h(this, "_previousNodeIndent", null);
135
+ this._node = e, this._isForward = t === "forward";
136
+ }
137
+ [Symbol.iterator]() {
138
+ return this;
139
+ }
140
+ next() {
141
+ if (!I(this._node)) return {
142
+ done: !0,
143
+ value: void 0
144
+ };
145
+ const e = this._node.getAttribute("listIndent");
146
+ let t = null;
147
+ if (this._previous) {
148
+ const s = this._previousNodeIndent;
149
+ e > s ? this._previousNodesByIndent[s] = this._previous : e < s ? (t = this._previousNodesByIndent[e] || null, this._previousNodesByIndent.length = e) : t = this._previous;
150
+ }
151
+ const i = {
152
+ node: this._node,
153
+ previous: this._previous,
154
+ previousNodeInList: t
155
+ };
156
+ return this._previous = this._node, this._previousNodeIndent = e, this._node = this._isForward ? this._node.nextSibling : this._node.previousSibling, {
157
+ value: i,
158
+ done: !1
159
+ };
160
+ }
161
+ }, St = class {
162
+ /**
163
+ * @param listHead The head element of a list.
164
+ */
165
+ constructor(e) {
166
+ h(this, "_listHead");
167
+ this._listHead = e;
168
+ }
169
+ /**
170
+ * List blocks iterator.
171
+ *
172
+ * Iterates over all blocks of a list.
173
+ */
174
+ [Symbol.iterator]() {
175
+ return new P(this._listHead);
176
+ }
177
+ };
178
+ /**
179
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
180
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
181
+ */
182
+ var F = class {
183
+ /**
184
+ * Returns the next ID.
185
+ *
186
+ * @internal
187
+ */
188
+ /* istanbul ignore next: static function definition -- @preserve */
189
+ static next() {
190
+ return bt();
191
+ }
192
+ };
193
+ function I(e) {
194
+ return !!e && e.is("element") && e.hasAttribute("listItemId");
195
+ }
196
+ function E(e, t = {}) {
197
+ return [...S(e, {
198
+ ...t,
199
+ direction: "backward"
200
+ }), ...S(e, {
201
+ ...t,
202
+ direction: "forward"
203
+ })];
204
+ }
205
+ function S(e, t = {}) {
206
+ const i = t.direction == "forward", s = Array.from(new A(e, {
207
+ ...t,
208
+ includeSelf: i,
209
+ sameIndent: !0,
210
+ sameAttributes: "listItemId"
211
+ }));
212
+ return i ? s : s.reverse();
213
+ }
214
+ function vt(e) {
215
+ return Array.from(new A(e, {
216
+ direction: "forward",
217
+ higherIndent: !0
218
+ }));
219
+ }
220
+ function ot(e, t) {
221
+ const i = new A(e, {
222
+ sameIndent: !0,
223
+ sameAttributes: "listType",
224
+ ...t
225
+ }), s = new A(e, {
226
+ sameIndent: !0,
227
+ sameAttributes: "listType",
228
+ includeSelf: !0,
229
+ direction: "forward",
230
+ ...t
231
+ });
232
+ return [...Array.from(i).reverse(), ...s];
233
+ }
234
+ function v(e) {
235
+ return !A.first(e, {
236
+ sameIndent: !0,
237
+ sameAttributes: "listItemId"
238
+ });
239
+ }
240
+ function H(e) {
241
+ return !A.first(e, {
242
+ direction: "forward",
243
+ sameIndent: !0,
244
+ sameAttributes: "listItemId"
245
+ });
246
+ }
247
+ function N(e, t = {}) {
248
+ e = B(e);
249
+ const i = t.withNested !== !1, s = /* @__PURE__ */ new Set();
250
+ for (const n of e) for (const r of E(n, { higherIndent: i })) s.add(r);
251
+ return w(s);
252
+ }
253
+ function wt(e) {
254
+ e = B(e);
255
+ const t = /* @__PURE__ */ new Set();
256
+ for (const i of e) for (const s of ot(i)) t.add(s);
257
+ return w(t);
258
+ }
259
+ function K(e, t) {
260
+ const i = S(e, { direction: "forward" }), s = F.next();
261
+ for (const n of i) t.setAttribute("listItemId", s, n);
262
+ return i;
263
+ }
264
+ function $(e, t, i) {
265
+ const s = {};
266
+ for (const [r, o] of t.getAttributes()) r.startsWith("list") && (s[r] = o);
267
+ const n = S(e, { direction: "forward" });
268
+ for (const r of n) i.setAttributes(s, r);
269
+ return n;
270
+ }
271
+ function j(e, t, { expand: i, indentBy: s = 1, attributeNames: n }) {
272
+ e = B(e);
273
+ const r = i ? N(e) : e;
274
+ for (const o of r) {
275
+ const l = o.getAttribute("listIndent") + s;
276
+ l < 0 ? z(o, t, n) : t.setAttribute("listIndent", l, o);
277
+ }
278
+ return r;
279
+ }
280
+ function Ft(e, t, { attributeNames: i }) {
281
+ e = B(e);
282
+ const s = N(e), n = /* @__PURE__ */ new Set(), r = Math.min(...s.map((l) => l.getAttribute("listIndent"))), o = /* @__PURE__ */ new Map();
283
+ for (const l of s) o.set(l, A.first(l, { lowerIndent: !0 }));
284
+ for (const l of s) {
285
+ if (n.has(l)) continue;
286
+ n.add(l);
287
+ const a = l.getAttribute("listIndent") - 1;
288
+ if (a < 0) {
289
+ z(l, t, i);
290
+ continue;
291
+ }
292
+ if (l.getAttribute("listIndent") == r && o.get(l)) {
293
+ const u = Tt(l, o.get(l), t);
294
+ for (const c of u) n.add(c);
295
+ if (u.length) continue;
296
+ }
297
+ t.setAttribute("listIndent", a, l);
298
+ }
299
+ return w(n);
300
+ }
301
+ function z(e, t, i) {
302
+ e = B(e);
303
+ for (const s of e) s.is("element", "listItem") && t.rename(s, "paragraph");
304
+ for (const s of e) for (const n of s.getAttributeKeys()) i.includes(n) && t.removeAttribute(n, s);
305
+ return e;
306
+ }
307
+ function T(e) {
308
+ if (!e.length) return !1;
309
+ const t = e[0].getAttribute("listItemId");
310
+ return t ? !e.some((i) => i.getAttribute("listItemId") != t) : !1;
311
+ }
312
+ function Bt(e, t) {
313
+ const i = [];
314
+ let s = Number.POSITIVE_INFINITY;
315
+ for (const { node: n } of new P(e.nextSibling)) {
316
+ const r = n.getAttribute("listIndent");
317
+ if (r == 0) break;
318
+ r < s && (s = r);
319
+ const o = r - s;
320
+ t.setAttribute("listIndent", o, n), i.push(n);
321
+ }
322
+ return i;
323
+ }
324
+ function w(e) {
325
+ return Array.from(e).filter((t) => t.root.rootName !== "$graveyard").sort((t, i) => t.index - i.index);
326
+ }
327
+ function x(e) {
328
+ const t = e.document.selection.getSelectedElement();
329
+ return t && e.schema.isObject(t) && e.schema.isBlock(t) ? t : null;
330
+ }
331
+ function R(e, t) {
332
+ return t.checkChild(e.parent, "listItem") && t.checkChild(e, "$text") && !t.isObject(e);
333
+ }
334
+ function Et(e) {
335
+ return e == "numbered" || e == "customNumbered";
336
+ }
337
+ function Ct(e) {
338
+ const t = e.getAttribute("listIndent"), i = e.getAttribute("listType"), s = e.getAttribute("listItemId");
339
+ let n = e.previousSibling, r = !1;
340
+ for (; I(n); ) {
341
+ const o = n.getAttribute("listIndent");
342
+ if (o < t) return !0;
343
+ if (o === t)
344
+ return n.getAttribute("listItemId") === s ? !1 : n.getAttribute("listType") !== i;
345
+ r = !0, n = n.previousSibling;
346
+ }
347
+ return !r;
348
+ }
349
+ function Tt(e, t, i) {
350
+ return S(t, { direction: "forward" }).pop().index > e.index ? $(e, t, i) : [];
351
+ }
352
+ /**
353
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
354
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
355
+ */
356
+ var Y = class extends D {
357
+ /**
358
+ * Creates an instance of the command.
359
+ *
360
+ * @param editor The editor instance.
361
+ * @param indentDirection The direction of indent. If it is equal to `backward`, the command
362
+ * will outdent a list item.
363
+ */
364
+ constructor(t, i) {
365
+ super(t);
366
+ /**
367
+ * Determines by how much the command will change the list item's indent attribute.
368
+ */
369
+ h(this, "_direction");
370
+ this._direction = i;
371
+ }
372
+ /**
373
+ * @inheritDoc
374
+ */
375
+ refresh() {
376
+ this.isEnabled = this._checkEnabled();
377
+ }
378
+ /**
379
+ * Indents or outdents (depending on the {@link #constructor}'s `indentDirection` parameter) selected list items.
380
+ *
381
+ * @fires execute
382
+ * @fires afterExecute
383
+ */
384
+ execute() {
385
+ const t = this.editor, i = t.model, s = G(i.document.selection), n = t.plugins.get("ListEditing").getListAttributeNames();
386
+ i.change((r) => {
387
+ const o = [];
388
+ T(s) && !v(s[0]) ? (this._direction == "forward" && o.push(...j(s, r, { attributeNames: n })), o.push(...K(s[0], r))) : this._direction == "forward" ? o.push(...j(s, r, {
389
+ expand: !0,
390
+ attributeNames: n
391
+ })) : o.push(...Ft(s, r, { attributeNames: n }));
392
+ for (const l of o) {
393
+ if (!l.hasAttribute("listType")) continue;
394
+ const a = A.first(l, { sameIndent: !0 });
395
+ a && r.setAttribute("listType", a.getAttribute("listType"), l);
396
+ }
397
+ this._fireAfterExecute(o);
398
+ });
399
+ }
400
+ /**
401
+ * Fires the `afterExecute` event.
402
+ *
403
+ * @param changedBlocks The changed list elements.
404
+ */
405
+ _fireAfterExecute(t) {
406
+ this.fire("afterExecute", w(new Set(t)));
407
+ }
408
+ /**
409
+ * Checks whether the command can be enabled in the current context.
410
+ *
411
+ * @returns Whether the command should be enabled.
412
+ */
413
+ _checkEnabled() {
414
+ let t = G(this.editor.model.document.selection), i = t[0];
415
+ if (!i) return !1;
416
+ if (this._direction == "backward" || T(t) && !v(t[0]) || this.editor.config.get("list.enableSkipLevelLists")) return !0;
417
+ t = N(t), i = t[0];
418
+ const s = A.first(i, { sameIndent: !0 });
419
+ return s ? s.getAttribute("listType") == i.getAttribute("listType") : !1;
420
+ }
421
+ };
422
+ function G(e) {
423
+ const t = Array.from(e.getSelectedBlocks()), i = t.findIndex((s) => !I(s));
424
+ return i != -1 && (t.length = i), t;
425
+ }
426
+ /**
427
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
428
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
429
+ */
430
+ var M = class extends D {
431
+ /**
432
+ * Creates an instance of the command.
433
+ *
434
+ * @param editor The editor instance.
435
+ * @param type List type that will be handled by this command.
436
+ */
437
+ constructor(t, i, s = {}) {
438
+ super(t);
439
+ /**
440
+ * The type of the list created by the command.
441
+ */
442
+ h(this, "type");
443
+ /**
444
+ * List Walker options that change the range of the list items to be changed when the selection is collapsed within a list item.
445
+ *
446
+ * In a multi-level list, when the selection is collapsed within a list item, instead of changing only the list items of the same list
447
+ * type and current indent level, the entire list structure is changed (all list items at all indent levels of any list type).
448
+ */
449
+ h(this, "_listWalkerOptions");
450
+ this.type = i, this._listWalkerOptions = s.multiLevel ? {
451
+ higherIndent: !0,
452
+ lowerIndent: !0,
453
+ sameAttributes: []
454
+ } : void 0;
455
+ }
456
+ /**
457
+ * @inheritDoc
458
+ */
459
+ refresh() {
460
+ this.value = this._getValue(), this.isEnabled = this._checkEnabled();
461
+ }
462
+ /**
463
+ * Executes the list command.
464
+ *
465
+ * @fires execute
466
+ * @fires afterExecute
467
+ * @param options Command options.
468
+ * @param options.forceValue If set, it will force the command behavior. If `true`, the command will try to convert the
469
+ * selected items and potentially the neighbor elements to the proper list items. If set to `false` it will convert selected elements
470
+ * to paragraphs. If not set, the command will toggle selected elements to list items or paragraphs, depending on the selection.
471
+ * @param options.additionalAttributes Additional attributes that are set for list items when the command is executed.
472
+ */
473
+ execute(t = {}) {
474
+ const i = this.editor.model, s = i.document, n = x(i), r = Array.from(s.selection.getSelectedBlocks()).filter((l) => i.schema.checkAttribute(l, "listType") || R(l, i.schema)), o = t.forceValue !== void 0 ? !t.forceValue : this.value;
475
+ i.change((l) => {
476
+ if (o) {
477
+ const a = r[r.length - 1], u = this.editor.plugins.get("ListEditing").getListAttributeNames(), c = S(a, { direction: "forward" }), d = [];
478
+ c.length > 1 && d.push(...K(c[1], l)), d.push(...z(r, l, u)), d.push(...Bt(a, l)), this._fireAfterExecute(d);
479
+ } else if ((n || s.selection.isCollapsed) && I(r[0])) {
480
+ const a = ot(n || r[0], this._listWalkerOptions);
481
+ for (const u of a) l.setAttributes({
482
+ ...t.additionalAttributes,
483
+ listType: this.type
484
+ }, u);
485
+ this._fireAfterExecute(a);
486
+ } else {
487
+ const a = [];
488
+ for (const u of r) if (!u.hasAttribute("listType"))
489
+ !u.is("element", "listItem") && R(u, i.schema) && l.rename(u, "listItem"), l.setAttributes({
490
+ ...t.additionalAttributes,
491
+ listIndent: 0,
492
+ listItemId: F.next(),
493
+ listType: this.type
494
+ }, u), a.push(u);
495
+ else for (const c of N(u, { withNested: !1 })) c.getAttribute("listType") != this.type && (l.setAttributes({
496
+ ...t.additionalAttributes,
497
+ listType: this.type
498
+ }, c), a.push(c));
499
+ this._fireAfterExecute(a);
500
+ }
501
+ });
502
+ }
503
+ /**
504
+ * Fires the `afterExecute` event.
505
+ *
506
+ * @param changedBlocks The changed list elements.
507
+ */
508
+ _fireAfterExecute(t) {
509
+ this.fire("afterExecute", w(new Set(t)));
510
+ }
511
+ /**
512
+ * Checks the command's {@link #value}.
513
+ *
514
+ * @returns The current value.
515
+ */
516
+ _getValue() {
517
+ const t = this.editor.model.document.selection, i = Array.from(t.getSelectedBlocks());
518
+ if (!i.length) return !1;
519
+ for (const s of i) if (s.getAttribute("listType") != this.type) return !1;
520
+ return !0;
521
+ }
522
+ /**
523
+ * Checks whether the command can be enabled in the current context.
524
+ *
525
+ * @returns Whether the command should be enabled.
526
+ */
527
+ _checkEnabled() {
528
+ const t = this.editor.model, i = t.schema, s = t.document.selection, n = Array.from(s.getSelectedBlocks());
529
+ if (!n.length) return !1;
530
+ if (this.value) return !0;
531
+ for (const r of n) if (i.checkAttribute(r, "listType") || R(r, i)) return !0;
532
+ return !1;
533
+ }
534
+ };
535
+ /**
536
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
537
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
538
+ */
539
+ var J = class extends D {
540
+ /**
541
+ * Creates an instance of the command.
542
+ *
543
+ * @param editor The editor instance.
544
+ * @param direction Whether list item should be merged before or after the selected block.
545
+ */
546
+ constructor(t, i) {
547
+ super(t);
548
+ /**
549
+ * Whether list item should be merged before or after the selected block.
550
+ */
551
+ h(this, "_direction");
552
+ this._direction = i;
553
+ }
554
+ /**
555
+ * @inheritDoc
556
+ */
557
+ refresh() {
558
+ this.isEnabled = this._checkEnabled();
559
+ }
560
+ /**
561
+ * Merges list blocks together (depending on the {@link #constructor}'s `direction` parameter).
562
+ *
563
+ * @fires execute
564
+ * @fires afterExecute
565
+ * @param options Command options.
566
+ * @param options.shouldMergeOnBlocksContentLevel When set `true`, merging will be performed together
567
+ * with {@link module:engine/model/model~Model#deleteContent} to get rid of the inline content in the selection or take advantage
568
+ * of the heuristics in `deleteContent()` that helps convert lists into paragraphs in certain cases.
569
+ */
570
+ execute({ shouldMergeOnBlocksContentLevel: t = !1 } = {}) {
571
+ const i = this.editor, s = i.model, n = s.document.selection, r = [], o = i.plugins.get("ListEditing").getListAttributeNames();
572
+ s.change((l) => {
573
+ const { firstElement: a, lastElement: u } = this._getMergeSubjectElements(n, t);
574
+ if (!a || !u) return;
575
+ const c = a.getAttribute("listIndent") || 0, d = u.getAttribute("listIndent"), m = u.getAttribute("listItemId");
576
+ if (c != d) {
577
+ const g = vt(u);
578
+ r.push(...j([u, ...g], l, {
579
+ indentBy: c - d,
580
+ expand: c < d,
581
+ attributeNames: o
582
+ }));
583
+ }
584
+ if (t) {
585
+ let g = n;
586
+ n.isCollapsed && (g = l.createSelection(l.createRange(l.createPositionAt(a, "end"), l.createPositionAt(u, 0)))), s.deleteContent(g, { doNotResetEntireContent: n.isCollapsed });
587
+ const p = g.getLastPosition().parent, f = p.nextSibling;
588
+ r.push(p), f && f !== u && f.getAttribute("listItemId") == m && r.push(...$(f, p, l));
589
+ } else r.push(...$(u, a, l));
590
+ this._fireAfterExecute(r);
591
+ });
592
+ }
593
+ /**
594
+ * Fires the `afterExecute` event.
595
+ *
596
+ * @param changedBlocks The changed list elements.
597
+ */
598
+ _fireAfterExecute(t) {
599
+ this.fire("afterExecute", w(new Set(t)));
600
+ }
601
+ /**
602
+ * Checks whether the command can be enabled in the current context.
603
+ *
604
+ * @returns Whether the command should be enabled.
605
+ */
606
+ _checkEnabled() {
607
+ const t = this.editor.model, i = t.document.selection, s = x(t);
608
+ if (i.isCollapsed || s) {
609
+ const n = s || i.getFirstPosition().parent;
610
+ if (!I(n)) return !1;
611
+ const r = this._direction == "backward" ? n.previousSibling : n.nextSibling;
612
+ if (!r || T([n, r])) return !1;
613
+ } else {
614
+ const n = i.getLastPosition(), r = i.getFirstPosition();
615
+ if (n.parent === r.parent || !I(n.parent)) return !1;
616
+ }
617
+ return !0;
618
+ }
619
+ /**
620
+ * Returns the boundary elements the merge should be executed for. These are not necessarily selection's first
621
+ * and last position parents but sometimes sibling or even further blocks depending on the context.
622
+ *
623
+ * @param selection The selection the merge is executed for.
624
+ * @param shouldMergeOnBlocksContentLevel When `true`, merge is performed together with
625
+ * {@link module:engine/model/model~Model#deleteContent} to remove the inline content within the selection.
626
+ */
627
+ _getMergeSubjectElements(t, i) {
628
+ const s = this.editor.model, n = x(s);
629
+ let r, o;
630
+ if (t.isCollapsed || n) {
631
+ const l = n || t.getFirstPosition().parent, a = v(l);
632
+ this._direction == "backward" ? (o = l, a && !i ? (r = A.first(l, {
633
+ sameIndent: !0,
634
+ lowerIndent: !0
635
+ }), !r && I(l.previousSibling) && (r = l.previousSibling)) : r = l.previousSibling) : (r = l, o = l.nextSibling);
636
+ } else
637
+ r = t.getFirstPosition().parent, o = t.getLastPosition().parent;
638
+ return {
639
+ firstElement: r,
640
+ lastElement: o
641
+ };
642
+ }
643
+ };
644
+ /**
645
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
646
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
647
+ */
648
+ var Q = class extends D {
649
+ /**
650
+ * Creates an instance of the command.
651
+ *
652
+ * @param editor The editor instance.
653
+ * @param direction Whether list item should be split before or after the selected block.
654
+ */
655
+ constructor(t, i) {
656
+ super(t);
657
+ /**
658
+ * Whether list item should be split before or after the selected block.
659
+ */
660
+ h(this, "_direction");
661
+ this._direction = i;
662
+ }
663
+ /**
664
+ * @inheritDoc
665
+ */
666
+ refresh() {
667
+ this.isEnabled = this._checkEnabled();
668
+ }
669
+ /**
670
+ * Splits the list item at the selection.
671
+ *
672
+ * @fires execute
673
+ * @fires afterExecute
674
+ */
675
+ execute() {
676
+ this.editor.model.change((t) => {
677
+ const i = K(this._getStartBlock(), t);
678
+ this._fireAfterExecute(i);
679
+ });
680
+ }
681
+ /**
682
+ * Fires the `afterExecute` event.
683
+ *
684
+ * @param changedBlocks The changed list elements.
685
+ */
686
+ _fireAfterExecute(t) {
687
+ this.fire("afterExecute", w(new Set(t)));
688
+ }
689
+ /**
690
+ * Checks whether the command can be enabled in the current context.
691
+ *
692
+ * @returns Whether the command should be enabled.
693
+ */
694
+ _checkEnabled() {
695
+ const t = this.editor.model.document.selection, i = this._getStartBlock();
696
+ return t.isCollapsed && I(i) && !v(i);
697
+ }
698
+ /**
699
+ * Returns the model element that is the main focus of the command (according to the current selection and command direction).
700
+ */
701
+ _getStartBlock() {
702
+ const t = this.editor.model.document.selection.getFirstPosition().parent;
703
+ return this._direction == "before" ? t : t.nextSibling;
704
+ }
705
+ };
706
+ /**
707
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
708
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
709
+ */
710
+ var xt = class extends _ {
711
+ /**
712
+ * @inheritDoc
713
+ */
714
+ static get pluginName() {
715
+ return "ListItemBoldIntegration";
716
+ }
717
+ /**
718
+ * @inheritDoc
719
+ */
720
+ static get isOfficialPlugin() {
721
+ return !0;
722
+ }
723
+ /**
724
+ * @inheritDoc
725
+ */
726
+ static get requires() {
727
+ return [L];
728
+ }
729
+ /**
730
+ * @inheritDoc
731
+ */
732
+ init() {
733
+ const e = this.editor, t = e.plugins.get("ListFormatting"), i = e.plugins.get(L);
734
+ !e.plugins.has("BoldEditing") || !this.editor.config.get("list.enableListItemMarkerFormatting") || (t.registerFormatAttribute("bold", "listItemBold"), i.registerDowncastStrategy({
735
+ scope: "item",
736
+ attributeName: "listItemBold",
737
+ setAttributeOnDowncast(s, n, r, o) {
738
+ n && (s.addClass("ck-list-marker-bold", r), q.isSafari && !(o && o.dataPipeline) && s.setStyle("--ck-content-list-marker-dummy-bold", "0", r));
739
+ }
740
+ }));
741
+ }
742
+ /**
743
+ * @inheritDoc
744
+ */
745
+ afterInit() {
746
+ const e = this.editor, t = e.model;
747
+ !e.plugins.has("BoldEditing") || !this.editor.config.get("list.enableListItemMarkerFormatting") || (t.schema.extend("$listItem", { allowAttributes: "listItemBold" }), t.schema.setAttributeProperties("listItemBold", { isFormatting: !0 }), t.schema.addAttributeCheck((i) => {
748
+ if (!i.last.getAttribute("listItemId")) return !1;
749
+ }, "listItemBold"), e.conversion.for("upcast").attributeToAttribute({
750
+ model: "listItemBold",
751
+ view: {
752
+ name: "li",
753
+ classes: "ck-list-marker-bold"
754
+ }
755
+ }));
756
+ }
757
+ };
758
+ /**
759
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
760
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
761
+ */
762
+ var Pt = class extends _ {
763
+ /**
764
+ * @inheritDoc
765
+ */
766
+ static get pluginName() {
767
+ return "ListItemItalicIntegration";
768
+ }
769
+ /**
770
+ * @inheritDoc
771
+ */
772
+ static get isOfficialPlugin() {
773
+ return !0;
774
+ }
775
+ /**
776
+ * @inheritDoc
777
+ */
778
+ static get requires() {
779
+ return [L];
780
+ }
781
+ /**
782
+ * @inheritDoc
783
+ */
784
+ init() {
785
+ const e = this.editor, t = e.plugins.get("ListFormatting"), i = e.plugins.get(L);
786
+ !e.plugins.has("ItalicEditing") || !this.editor.config.get("list.enableListItemMarkerFormatting") || (t.registerFormatAttribute("italic", "listItemItalic"), i.registerDowncastStrategy({
787
+ scope: "item",
788
+ attributeName: "listItemItalic",
789
+ setAttributeOnDowncast(s, n, r, o) {
790
+ n && (s.addClass("ck-list-marker-italic", r), q.isSafari && !(o && o.dataPipeline) && s.setStyle("--ck-content-list-marker-dummy-italic", "0", r));
791
+ }
792
+ }));
793
+ }
794
+ /**
795
+ * @inheritDoc
796
+ */
797
+ afterInit() {
798
+ const e = this.editor, t = e.model;
799
+ !e.plugins.has("ItalicEditing") || !this.editor.config.get("list.enableListItemMarkerFormatting") || (t.schema.extend("$listItem", { allowAttributes: "listItemItalic" }), t.schema.setAttributeProperties("listItemItalic", { isFormatting: !0 }), t.schema.addAttributeCheck((i) => {
800
+ if (!i.last.getAttribute("listItemId")) return !1;
801
+ }, "listItemItalic"), e.conversion.for("upcast").attributeToAttribute({
802
+ model: "listItemItalic",
803
+ view: {
804
+ name: "li",
805
+ classes: "ck-list-marker-italic"
806
+ }
807
+ }));
808
+ }
809
+ };
810
+ /**
811
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
812
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
813
+ */
814
+ var Nt = class extends _ {
815
+ /**
816
+ * @inheritDoc
817
+ */
818
+ static get pluginName() {
819
+ return "ListItemFontSizeIntegration";
820
+ }
821
+ /**
822
+ * @inheritDoc
823
+ */
824
+ static get isOfficialPlugin() {
825
+ return !0;
826
+ }
827
+ /**
828
+ * @inheritDoc
829
+ */
830
+ static get requires() {
831
+ return [L];
832
+ }
833
+ /**
834
+ * @inheritDoc
835
+ */
836
+ init() {
837
+ const e = this.editor, t = e.plugins.get("ListFormatting"), i = e.plugins.get(L);
838
+ if (!e.plugins.has("FontSizeEditing") || !this.editor.config.get("list.enableListItemMarkerFormatting")) return;
839
+ const s = U(e.config.get("fontSize.options"));
840
+ t.registerFormatAttribute("fontSize", "listItemFontSize"), i.registerDowncastStrategy({
841
+ scope: "item",
842
+ attributeName: "listItemFontSize",
843
+ setAttributeOnDowncast(n, r, o, l) {
844
+ if (r) {
845
+ const a = s.find((u) => u.model == r);
846
+ a && a.view && typeof a.view != "string" ? a.view.styles ? (n.addClass("ck-list-marker-font-size", o), n.setStyle("--ck-content-list-marker-font-size", a.view.styles["font-size"], o)) : a.view.classes && (n.addClass(`ck-list-marker-font-size-${r}`, o), q.isSafari && !(l && l.dataPipeline) && n.setStyle("--ck-content-list-marker-dummy-font-size", "0", o)) : (n.addClass("ck-list-marker-font-size", o), n.setStyle("--ck-content-list-marker-font-size", r, o));
847
+ }
848
+ }
849
+ });
850
+ }
851
+ /**
852
+ * @inheritDoc
853
+ */
854
+ afterInit() {
855
+ const e = this.editor, t = e.model;
856
+ if (!e.plugins.has("FontSizeEditing") || !this.editor.config.get("list.enableListItemMarkerFormatting")) return;
857
+ t.schema.extend("$listItem", { allowAttributes: "listItemFontSize" }), t.schema.setAttributeProperties("listItemFontSize", { isFormatting: !0 }), t.schema.addAttributeCheck((s) => {
858
+ if (!s.last.getAttribute("listItemId")) return !1;
859
+ }, "listItemFontSize"), e.conversion.for("upcast").elementToAttribute({
860
+ model: {
861
+ key: "listItemFontSize",
862
+ value: (s) => s.getStyle("--ck-content-list-marker-font-size")
863
+ },
864
+ view: {
865
+ name: "li",
866
+ classes: "ck-list-marker-font-size",
867
+ styles: { "--ck-content-list-marker-font-size": /.*/ }
868
+ }
869
+ });
870
+ const i = U(e.config.get("fontSize.options"));
871
+ for (const s of i)
872
+ s.model && s.view && e.conversion.for("upcast").elementToAttribute({
873
+ model: {
874
+ key: "listItemFontSize",
875
+ value: s.model
876
+ },
877
+ view: {
878
+ name: "li",
879
+ classes: `ck-list-marker-font-size-${s.model}`
880
+ }
881
+ });
882
+ }
883
+ };
884
+ /**
885
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
886
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
887
+ */
888
+ var Ot = class extends _ {
889
+ /**
890
+ * @inheritDoc
891
+ */
892
+ static get pluginName() {
893
+ return "ListItemFontColorIntegration";
894
+ }
895
+ /**
896
+ * @inheritDoc
897
+ */
898
+ static get isOfficialPlugin() {
899
+ return !0;
900
+ }
901
+ /**
902
+ * @inheritDoc
903
+ */
904
+ static get requires() {
905
+ return [L];
906
+ }
907
+ /**
908
+ * @inheritDoc
909
+ */
910
+ init() {
911
+ const e = this.editor, t = e.plugins.get("ListFormatting"), i = e.plugins.get(L);
912
+ !e.plugins.has("FontColorEditing") || !this.editor.config.get("list.enableListItemMarkerFormatting") || (t.registerFormatAttribute("fontColor", "listItemFontColor"), i.registerDowncastStrategy({
913
+ scope: "item",
914
+ attributeName: "listItemFontColor",
915
+ setAttributeOnDowncast(s, n, r) {
916
+ n && (s.addClass("ck-list-marker-color", r), s.setStyle("--ck-content-list-marker-color", n, r));
917
+ }
918
+ }));
919
+ }
920
+ /**
921
+ * @inheritDoc
922
+ */
923
+ afterInit() {
924
+ const e = this.editor, t = e.model;
925
+ !e.plugins.has("FontColorEditing") || !this.editor.config.get("list.enableListItemMarkerFormatting") || (t.schema.extend("$listItem", { allowAttributes: "listItemFontColor" }), t.schema.setAttributeProperties("listItemFontColor", { isFormatting: !0 }), t.schema.addAttributeCheck((i) => {
926
+ if (!i.last.getAttribute("listItemId")) return !1;
927
+ }, "listItemFontColor"), e.conversion.for("upcast").attributeToAttribute({
928
+ model: {
929
+ key: "listItemFontColor",
930
+ value: (i) => i.getStyle("--ck-content-list-marker-color")
931
+ },
932
+ view: {
933
+ name: "li",
934
+ classes: "ck-list-marker-color",
935
+ styles: { "--ck-content-list-marker-color": /.*/ }
936
+ }
937
+ }));
938
+ }
939
+ };
940
+ /**
941
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
942
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
943
+ */
944
+ var Mt = class extends _ {
945
+ /**
946
+ * @inheritDoc
947
+ */
948
+ static get pluginName() {
949
+ return "ListItemFontFamilyIntegration";
950
+ }
951
+ /**
952
+ * @inheritDoc
953
+ */
954
+ static get isOfficialPlugin() {
955
+ return !0;
956
+ }
957
+ /**
958
+ * @inheritDoc
959
+ */
960
+ static get requires() {
961
+ return [L];
962
+ }
963
+ /**
964
+ * @inheritDoc
965
+ */
966
+ init() {
967
+ const e = this.editor, t = e.plugins.get("ListFormatting"), i = e.plugins.get(L);
968
+ !e.plugins.has("FontFamilyEditing") || !this.editor.config.get("list.enableListItemMarkerFormatting") || (t.registerFormatAttribute("fontFamily", "listItemFontFamily"), i.registerDowncastStrategy({
969
+ scope: "item",
970
+ attributeName: "listItemFontFamily",
971
+ setAttributeOnDowncast(s, n, r) {
972
+ n && (s.addClass("ck-list-marker-font-family", r), s.setStyle("--ck-content-list-marker-font-family", n, r));
973
+ }
974
+ }));
975
+ }
976
+ /**
977
+ * @inheritDoc
978
+ */
979
+ afterInit() {
980
+ const e = this.editor, t = e.model;
981
+ !e.plugins.has("FontFamilyEditing") || !this.editor.config.get("list.enableListItemMarkerFormatting") || (t.schema.extend("$listItem", { allowAttributes: "listItemFontFamily" }), t.schema.setAttributeProperties("listItemFontFamily", { isFormatting: !0 }), t.schema.addAttributeCheck((i) => {
982
+ if (!i.last.getAttribute("listItemId")) return !1;
983
+ }, "listItemFontFamily"), e.conversion.for("upcast").attributeToAttribute({
984
+ model: {
985
+ key: "listItemFontFamily",
986
+ value: (i) => i.getStyle("--ck-content-list-marker-font-family")
987
+ },
988
+ view: {
989
+ name: "li",
990
+ classes: "ck-list-marker-font-family",
991
+ styles: { "--ck-content-list-marker-font-family": /.*/ }
992
+ }
993
+ }));
994
+ }
995
+ };
996
+ /**
997
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
998
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
999
+ */
1000
+ var Vt = class extends _ {
1001
+ /**
1002
+ * @inheritDoc
1003
+ */
1004
+ constructor(t) {
1005
+ super(t);
1006
+ /**
1007
+ * The list of loaded formatting.
1008
+ */
1009
+ h(this, "_loadedFormatting", {});
1010
+ t.config.define("list.enableListItemMarkerFormatting", !0);
1011
+ }
1012
+ /**
1013
+ * @inheritDoc
1014
+ */
1015
+ static get pluginName() {
1016
+ return "ListFormatting";
1017
+ }
1018
+ /**
1019
+ * @inheritDoc
1020
+ */
1021
+ static get isOfficialPlugin() {
1022
+ return !0;
1023
+ }
1024
+ /**
1025
+ * @inheritDoc
1026
+ */
1027
+ static get requires() {
1028
+ return [
1029
+ xt,
1030
+ Pt,
1031
+ Nt,
1032
+ Ot,
1033
+ Mt
1034
+ ];
1035
+ }
1036
+ /**
1037
+ * @inheritDoc
1038
+ */
1039
+ afterInit() {
1040
+ this.editor.config.get("list.enableListItemMarkerFormatting") && this._registerPostfixerForListItemFormatting();
1041
+ }
1042
+ /**
1043
+ * Registers a postfixer that ensures that the list item formatting attribute is consistent with the formatting
1044
+ * applied to the content of the list item.
1045
+ */
1046
+ _registerPostfixerForListItemFormatting() {
1047
+ const t = this.editor.model;
1048
+ t.document.registerPostFixer((i) => {
1049
+ const s = t.document.differ.getChanges(), n = /* @__PURE__ */ new Set();
1050
+ let r = !1;
1051
+ for (const o of s) if (o.type === "attribute")
1052
+ (o.attributeKey == "listItemId" || o.attributeKey == "listType" || this._isInlineOrSelectionFormatting(o.attributeKey) || Object.values(this._loadedFormatting).includes(o.attributeKey)) && (I(o.range.start.nodeAfter) ? n.add(o.range.start.nodeAfter) : I(o.range.start.parent) && n.add(o.range.start.parent));
1053
+ else if (I(o.position.nodeAfter) && n.add(o.position.nodeAfter), I(o.position.nodeBefore) && n.add(o.position.nodeBefore), I(o.position.parent) && n.add(o.position.parent), o.type == "insert" && o.name != "$text") {
1054
+ const l = i.createRangeIn(o.position.nodeAfter);
1055
+ for (const a of l.getItems()) I(a) && n.add(a);
1056
+ }
1057
+ for (const o of n) {
1058
+ const l = Dt(t, o, Object.keys(this._loadedFormatting));
1059
+ for (const [a, u] of Object.entries(l)) {
1060
+ const c = this._loadedFormatting[a];
1061
+ (u && zt(i, o, c, u) || !u && Rt(i, o, c)) && (r = !0);
1062
+ }
1063
+ }
1064
+ return r;
1065
+ });
1066
+ }
1067
+ /**
1068
+ * Registers an integration between a default attribute (e.g., `fontFamily`) and a new attribute
1069
+ * intended specifically for list item elements (e.g., `listItemFontFamily`).
1070
+ *
1071
+ * These attributes are later used by the postfixer logic to determine whether to add the new attribute
1072
+ * to the list item element, based on whether there is a consistent default formatting attribute
1073
+ * applied within its content.
1074
+ */
1075
+ registerFormatAttribute(t, i) {
1076
+ this._loadedFormatting[t] = i;
1077
+ }
1078
+ /**
1079
+ * Returns true if the given model attribute name is a supported inline formatting attribute.
1080
+ */
1081
+ _isInlineOrSelectionFormatting(t) {
1082
+ return t.replace(/^selection:/, "") in this._loadedFormatting;
1083
+ }
1084
+ };
1085
+ function Dt(e, t, i) {
1086
+ return v(t) ? X(e, t, i) : X(e, E(t)[0], i);
1087
+ }
1088
+ function X(e, t, i) {
1089
+ if (!$t(t) || e.schema.isLimit(t)) return Object.fromEntries(i.map((o) => [o]));
1090
+ if (t.isEmpty) return Object.fromEntries(i.map((o) => [o, t.getAttribute(`selection:${o}`)]));
1091
+ const s = new Set(i), n = {}, r = e.createRangeIn(t).getWalker({ ignoreElementEnd: !0 });
1092
+ for (const { item: o } of r) {
1093
+ for (const l of s) if (e.schema.checkAttribute(o, l)) {
1094
+ const a = o.getAttribute(l);
1095
+ a === void 0 ? (s.delete(l), n[l] = void 0) : n[l] === void 0 ? n[l] = a : n[l] !== a && (s.delete(l), n[l] = void 0);
1096
+ } else l in n || (n[l] = void 0);
1097
+ if (!s.size) break;
1098
+ e.schema.isLimit(o) && r.jumpTo(e.createPositionAfter(o));
1099
+ }
1100
+ return n;
1101
+ }
1102
+ function zt(e, t, i, s) {
1103
+ const n = E(t);
1104
+ let r = !1;
1105
+ for (const o of n) (!o.hasAttribute(i) || o.getAttribute(i) !== s) && (e.setAttribute(i, s, o), r = !0);
1106
+ return r;
1107
+ }
1108
+ function Rt(e, t, i) {
1109
+ const s = E(t);
1110
+ let n = !1;
1111
+ for (const r of s) r.hasAttribute(i) && (e.removeAttribute(i, r), n = !0);
1112
+ return n;
1113
+ }
1114
+ function $t(e) {
1115
+ return [
1116
+ "numbered",
1117
+ "bulleted",
1118
+ "customNumbered",
1119
+ "customBulleted"
1120
+ ].includes(e.getAttribute("listType"));
1121
+ }
1122
+ /**
1123
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
1124
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
1125
+ */
1126
+ var jt = class extends _ {
1127
+ /**
1128
+ * @inheritDoc
1129
+ */
1130
+ static get pluginName() {
1131
+ return "ListUtils";
1132
+ }
1133
+ /**
1134
+ * @inheritDoc
1135
+ */
1136
+ static get isOfficialPlugin() {
1137
+ return !0;
1138
+ }
1139
+ /**
1140
+ * Expands the given list of selected blocks to include all the items of the lists they're in.
1141
+ *
1142
+ * @param blocks The list of selected blocks.
1143
+ */
1144
+ expandListBlocksToCompleteList(e) {
1145
+ return wt(e);
1146
+ }
1147
+ /**
1148
+ * Check if the given block is the first in the list item.
1149
+ *
1150
+ * @param listBlock The list block element.
1151
+ */
1152
+ isFirstBlockOfListItem(e) {
1153
+ return v(e);
1154
+ }
1155
+ /**
1156
+ * Returns true if the given model node is a list item block.
1157
+ *
1158
+ * @param node A model node.
1159
+ */
1160
+ isListItemBlock(e) {
1161
+ return I(e);
1162
+ }
1163
+ /**
1164
+ * Expands the given list of selected blocks to include the leading and tailing blocks of partially selected list items.
1165
+ *
1166
+ * @param blocks The list of selected blocks.
1167
+ * @param options.withNested Whether should include nested list items.
1168
+ */
1169
+ expandListBlocksToCompleteItems(e, t = {}) {
1170
+ return N(e, t);
1171
+ }
1172
+ /**
1173
+ * Returns true if listType is of type `numbered` or `customNumbered`.
1174
+ */
1175
+ isNumberedListType(e) {
1176
+ return Et(e);
1177
+ }
1178
+ /**
1179
+ * Returns true if the given list item is the first item in the list.
1180
+ */
1181
+ isFirstListItemInList(e) {
1182
+ return Ct(e);
1183
+ }
1184
+ };
1185
+ /**
1186
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
1187
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
1188
+ */
1189
+ function Wt(e) {
1190
+ return e.is("element", "ol") || e.is("element", "ul");
1191
+ }
1192
+ function W(e) {
1193
+ return e.is("element", "li");
1194
+ }
1195
+ function qt(e) {
1196
+ let t = 0, i = e.parent;
1197
+ for (; i; ) {
1198
+ if (W(i)) t++;
1199
+ else {
1200
+ const s = i.previousSibling;
1201
+ s && W(s) && t++;
1202
+ }
1203
+ i = i.parent;
1204
+ }
1205
+ return t;
1206
+ }
1207
+ function Z(e, t, i, s = at(i, t)) {
1208
+ return e.createAttributeElement(lt(i), null, {
1209
+ priority: 2 * t / 100 - 100,
1210
+ id: s
1211
+ });
1212
+ }
1213
+ function tt(e, t, i) {
1214
+ return e.createAttributeElement("li", null, {
1215
+ priority: (2 * t + 1) / 100 - 100,
1216
+ id: i
1217
+ });
1218
+ }
1219
+ function lt(e) {
1220
+ return e == "numbered" || e == "customNumbered" ? "ol" : "ul";
1221
+ }
1222
+ function at(e, t) {
1223
+ return `list-${e}-${t}`;
1224
+ }
1225
+ /**
1226
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
1227
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
1228
+ */
1229
+ function y(e, t, i) {
1230
+ const s = e.nodeBefore;
1231
+ if (I(s)) {
1232
+ let n = s;
1233
+ for (const { node: r } of new P(n, "backward"))
1234
+ if (n = r, i.has(n) || (i.add(n), t.has(s))) return;
1235
+ t.add(n);
1236
+ } else {
1237
+ const n = e.nodeAfter;
1238
+ I(n) && t.add(n);
1239
+ }
1240
+ }
1241
+ function Kt(e, t) {
1242
+ let i = 0, s = -1, n = null, r = !1;
1243
+ for (const { node: o } of e) {
1244
+ const l = o.getAttribute("listIndent");
1245
+ if (l > i) {
1246
+ let a;
1247
+ n === null ? (n = l - i, a = i) : (n > l && (n = l), a = l - n), a > s + 1 && (a = s + 1), t.setAttribute("listIndent", a, o), r = !0, s = a;
1248
+ } else
1249
+ n = null, i = l + 1, s = l;
1250
+ }
1251
+ return r;
1252
+ }
1253
+ function Ut(e, t, i) {
1254
+ const s = /* @__PURE__ */ new Set();
1255
+ let n = !1;
1256
+ for (const { node: r } of e) {
1257
+ if (s.has(r)) continue;
1258
+ let o = r.getAttribute("listType"), l = r.getAttribute("listItemId");
1259
+ if (t.has(l) && (l = F.next()), t.add(l), r.is("element", "listItem")) {
1260
+ r.getAttribute("listItemId") != l && (i.setAttribute("listItemId", l, r), n = !0);
1261
+ continue;
1262
+ }
1263
+ for (const a of S(r, { direction: "forward" }))
1264
+ s.add(a), a.getAttribute("listType") != o && (l = F.next(), o = a.getAttribute("listType")), a.getAttribute("listItemId") != l && (i.setAttribute("listItemId", l, a), n = !0);
1265
+ }
1266
+ return n;
1267
+ }
1268
+ /**
1269
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
1270
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
1271
+ */
1272
+ function Ht() {
1273
+ return (e, t, i) => {
1274
+ const s = t.viewItem;
1275
+ if (s.getStyle("list-style-type") !== "none" || !Yt(s) || !i.consumable.consume(s, { name: !0 })) return;
1276
+ const { modelRange: n, modelCursor: r } = i.convertChildren(s, t.modelCursor);
1277
+ t.modelRange = n, t.modelCursor = r;
1278
+ };
1279
+ }
1280
+ function Yt(e) {
1281
+ let t = !1;
1282
+ for (const i of e.getChildren()) {
1283
+ if (i.is("element", "ul") || i.is("element", "ol")) {
1284
+ t = !0;
1285
+ continue;
1286
+ }
1287
+ return !1;
1288
+ }
1289
+ return t;
1290
+ }
1291
+ function Gt() {
1292
+ return (e, t, i) => {
1293
+ const { writer: s, schema: n } = i;
1294
+ if (!t.modelRange) return;
1295
+ const r = Array.from(t.modelRange.getItems({ shallow: !0 })).filter((d) => n.checkAttribute(d, "listItemId"));
1296
+ if (!r.length || r.every((d) => d.hasAttribute("listItemId"))) return;
1297
+ const o = t.viewItem.getAttribute("data-list-item-id") || F.next();
1298
+ i.consumable.consume(t.viewItem, { attributes: "data-list-item-id" });
1299
+ const l = qt(t.viewItem);
1300
+ let a = t.viewItem.parent && t.viewItem.parent.is("element", "ol") ? "numbered" : "bulleted";
1301
+ const u = r[0].getAttribute("listType");
1302
+ u && (a = u);
1303
+ const c = {
1304
+ listItemId: o,
1305
+ listIndent: l,
1306
+ listType: a
1307
+ };
1308
+ for (const d of r) d.hasAttribute("listItemId") || s.setAttributes(c, d);
1309
+ r.length > 1 && r[1].getAttribute("listItemId") != c.listItemId && i.keepEmptyElement(r[0]);
1310
+ };
1311
+ }
1312
+ function Jt(e, t, i, s) {
1313
+ return () => {
1314
+ const c = e.document.differ.getChanges(), d = [], m = /* @__PURE__ */ new Set(), g = /* @__PURE__ */ new Set(), p = /* @__PURE__ */ new Set();
1315
+ for (const f of c) if (f.type == "insert" && f.name != "$text")
1316
+ y(f.position, m, p), f.attributes.has("listItemId") ? g.add(f.position.nodeAfter) : y(f.position.getShiftedBy(f.length), m, p);
1317
+ else if (f.type == "remove" && f.attributes.has("listItemId")) y(f.position, m, p);
1318
+ else if (f.type == "attribute") {
1319
+ const b = f.range.start.nodeAfter;
1320
+ i.includes(f.attributeKey) ? (y(f.range.start, m, p), f.attributeNewValue === null ? (y(f.range.start.getShiftedBy(1), m, p), l(b) && d.push(b)) : g.add(b)) : I(b) && l(b) && d.push(b);
1321
+ }
1322
+ for (const f of m.values()) d.push(...n(f, g));
1323
+ for (const f of new Set(d)) t.reconvertItem(f);
1324
+ };
1325
+ function n(c, d) {
1326
+ const m = [], g = /* @__PURE__ */ new Set(), p = [];
1327
+ for (const { node: f, previous: b } of new P(c)) {
1328
+ if (g.has(f)) continue;
1329
+ const k = f.getAttribute("listIndent");
1330
+ b && k < b.getAttribute("listIndent") && (p.length = k + 1), p[k] = {
1331
+ modelAttributes: r(f),
1332
+ modelElement: f
1333
+ }, o(f, k, p);
1334
+ const O = S(f, { direction: "forward" });
1335
+ for (const C of O)
1336
+ g.add(C), (l(C, O) || u(C, p, d)) && m.push(C);
1337
+ }
1338
+ return m;
1339
+ }
1340
+ function r(c) {
1341
+ return Object.fromEntries(Array.from(c.getAttributes()).filter(([d]) => i.includes(d)));
1342
+ }
1343
+ function o(c, d, m) {
1344
+ for (let g = d - 1; g >= 0 && !m[g]; g--) {
1345
+ const p = ut(c, g);
1346
+ let f = null;
1347
+ if (!p) {
1348
+ for (let k = g - 1; k >= 0; k--) if (m[k]) {
1349
+ f = m[k].modelElement;
1350
+ break;
1351
+ }
1352
+ }
1353
+ const b = p || f || c;
1354
+ m[g] = {
1355
+ modelAttributes: {
1356
+ ...r(b),
1357
+ listItemId: `list-item-skip-${g}`,
1358
+ listIndent: g
1359
+ },
1360
+ modelElement: b
1361
+ };
1362
+ }
1363
+ }
1364
+ function l(c, d) {
1365
+ const m = t.mapper.toViewElement(c);
1366
+ if (!m) return !1;
1367
+ if (a(m) || s.fire("checkElement", {
1368
+ modelElement: c,
1369
+ viewElement: m
1370
+ })) return !0;
1371
+ if (!c.is("element", "paragraph") && !c.is("element", "listItem")) return !1;
1372
+ const g = mt(c, i, d);
1373
+ return g && m.is("element", "p") ? !0 : !!(!g && m.is("element", "span"));
1374
+ }
1375
+ function a(c) {
1376
+ for (c = c.parent; c.is("attributeElement") && [
1377
+ "ol",
1378
+ "ul",
1379
+ "li"
1380
+ ].includes(c.name); ) c = c.parent;
1381
+ return !!(c.getCustomProperty("$structureSlotParent") && !t.mapper.toModelElement(c));
1382
+ }
1383
+ function u(c, d, m) {
1384
+ if (m.has(c)) return !1;
1385
+ const g = t.mapper.toViewElement(c);
1386
+ let p = d.length - 1;
1387
+ for (let f = g.parent; !f.is("editableElement"); f = f.parent) {
1388
+ const b = W(f), k = Wt(f);
1389
+ if (!(!k && !b)) {
1390
+ if (d[p]) {
1391
+ const O = `checkAttributes:${b ? "item" : "list"}`;
1392
+ if (s.fire(O, {
1393
+ viewElement: f,
1394
+ modelAttributes: d[p].modelAttributes,
1395
+ modelReferenceElement: d[p].modelElement
1396
+ })) break;
1397
+ }
1398
+ if (k && (p--, p < 0))
1399
+ return !1;
1400
+ }
1401
+ }
1402
+ return !0;
1403
+ }
1404
+ }
1405
+ function et(e, t, i, { dataPipeline: s, enableSkipLevelLists: n }) {
1406
+ const r = se(e, t);
1407
+ return (o, l, a) => {
1408
+ const { writer: u, mapper: c, consumable: d } = a, m = l.item;
1409
+ if (!e.includes(l.attributeKey) || !r(m, d)) return;
1410
+ const g = {
1411
+ ...a.options,
1412
+ dataPipeline: s,
1413
+ enableSkipLevelLists: n
1414
+ }, p = Xt(m, c, i, u);
1415
+ ct(p, u, c), ee(p, u), ie(m, te(m, p, t, u, g), t, u, g);
1416
+ };
1417
+ }
1418
+ function Qt(e) {
1419
+ return (t, i, s) => {
1420
+ const { writer: n, mapper: r } = s, o = t.name.split(":")[1];
1421
+ if (!e.checkAttribute(o, "listItemId")) return;
1422
+ const l = r.toViewPosition(i.position), a = i.position.getShiftedBy(i.length), u = r.toViewPosition(a, { isPhantom: !0 }), c = n.createRange(l, u).getTrimmed().end.nodeBefore;
1423
+ /* istanbul ignore next -- @preserve */
1424
+ c && ct(c, n, r);
1425
+ };
1426
+ }
1427
+ function it(e, { dataPipeline: t } = {}) {
1428
+ return (i, { writer: s }) => {
1429
+ if (!mt(i, e)) return null;
1430
+ if (!t) return s.createContainerElement("span", { class: "ck-list-bogus-paragraph" });
1431
+ const n = s.createContainerElement("p");
1432
+ return s.setCustomProperty("dataPipeline:transparentRendering", !0, n), n;
1433
+ };
1434
+ }
1435
+ function Xt(e, t, i, s) {
1436
+ const n = i.createRangeOn(e), r = t.toViewRange(n).getTrimmed().getWalker();
1437
+ for (const { item: o } of r) if (o.is("element") && o.getCustomProperty("listItemMarker")) r.jumpTo(s.createPositionAfter(o));
1438
+ else if (o.is("element") && !o.getCustomProperty("listItemWrapper")) return o;
1439
+ }
1440
+ function Zt(e, t) {
1441
+ return (i, s) => {
1442
+ if (s.modelPosition.offset > 0) return;
1443
+ const n = s.modelPosition.parent;
1444
+ if (!I(n) || !e.some((u) => u.scope == "itemMarker" && u.canInjectMarkerIntoElement && u.canInjectMarkerIntoElement(n))) return;
1445
+ const r = s.mapper.toViewElement(n), o = t.createRangeIn(r), l = o.getWalker();
1446
+ let a = o.start;
1447
+ for (const { item: u } of l) {
1448
+ if (u.is("element") && s.mapper.toModelElement(u) || u.is("$textProxy")) break;
1449
+ u.is("element") && u.getCustomProperty("listItemMarker") && (a = t.createPositionAfter(u), l.skip(({ previousPosition: c }) => !c.isEqual(a)));
1450
+ }
1451
+ s.viewPosition = a;
1452
+ };
1453
+ }
1454
+ function ct(e, t, i) {
1455
+ for (; e.parent.is("attributeElement") && e.parent.getCustomProperty("listItemWrapper"); ) t.unwrap(t.createRangeOn(e), e.parent);
1456
+ const s = [];
1457
+ n(t.createPositionBefore(e).getWalker({ direction: "backward" })), n(t.createRangeIn(e).getWalker());
1458
+ for (const r of s) t.remove(r);
1459
+ function n(r) {
1460
+ for (const { item: o } of r) {
1461
+ if (o.is("element") && i.toModelElement(o)) break;
1462
+ o.is("element") && o.getCustomProperty("listItemMarker") && s.push(o);
1463
+ }
1464
+ }
1465
+ }
1466
+ function te(e, t, i, s, { dataPipeline: n }) {
1467
+ let r = s.createRangeOn(t);
1468
+ if (!v(e)) return r;
1469
+ for (const o of i) {
1470
+ if (o.scope != "itemMarker") continue;
1471
+ const l = o.createElement(s, e, { dataPipeline: n });
1472
+ if (!l || (s.setCustomProperty("listItemMarker", !0, l), o.canInjectMarkerIntoElement && o.canInjectMarkerIntoElement(e) ? s.insert(s.createPositionAt(t, 0), l) : (s.insert(r.start, l), r = s.createRange(s.createPositionBefore(l), s.createPositionAfter(t))), !o.createWrapperElement || !o.canWrapElement)) continue;
1473
+ const a = o.createWrapperElement(s, e, { dataPipeline: n });
1474
+ s.setCustomProperty("listItemWrapper", !0, a), o.canWrapElement(e) ? r = s.wrap(r, a) : (r = s.wrap(s.createRangeOn(l), a), r = s.createRange(r.start, s.createPositionAfter(t)));
1475
+ }
1476
+ return r;
1477
+ }
1478
+ function ee(e, t) {
1479
+ let i = e.parent;
1480
+ for (; i.is("attributeElement") && [
1481
+ "ul",
1482
+ "ol",
1483
+ "li"
1484
+ ].includes(i.name); ) {
1485
+ const s = i.parent;
1486
+ t.unwrap(t.createRangeOn(e), i), i = s;
1487
+ }
1488
+ }
1489
+ function ie(e, t, i, s, n) {
1490
+ if (!e.hasAttribute("listIndent")) return;
1491
+ const r = e.getAttribute("listIndent"), o = n.enableSkipLevelLists;
1492
+ let l = e;
1493
+ for (let a = r; a >= 0; a--) {
1494
+ const u = l.getAttribute("listIndent") !== a;
1495
+ if (u) {
1496
+ const c = ut(e, a) || l, d = c.getAttribute("listType"), m = tt(s, a, `list-item-skip-${a}`), g = Z(s, a, d);
1497
+ s.setStyle("list-style-type", "none", m);
1498
+ for (const p of i) p.scope == "list" && c.hasAttribute(p.attributeName) && p.setAttributeOnDowncast(s, c.getAttribute(p.attributeName), g, n, c);
1499
+ t = s.wrap(t, m), t = s.wrap(t, g);
1500
+ } else {
1501
+ const c = tt(s, a, l.getAttribute("listItemId")), d = Z(s, a, l.getAttribute("listType"));
1502
+ for (const m of i) (m.scope == "list" || m.scope == "item") && l.hasAttribute(m.attributeName) && m.setAttributeOnDowncast(s, l.getAttribute(m.attributeName), m.scope == "list" ? d : c, n, l);
1503
+ t = s.wrap(t, c), t = s.wrap(t, d);
1504
+ }
1505
+ if (a == 0) break;
1506
+ if (!u) {
1507
+ const c = A.first(l, { lowerIndent: !0 });
1508
+ if (c) l = c;
1509
+ else if (!o) break;
1510
+ }
1511
+ }
1512
+ }
1513
+ function ut(e, t) {
1514
+ let i = e.nextSibling;
1515
+ for (; i && I(i); ) {
1516
+ const s = i.getAttribute("listIndent");
1517
+ if (s < t) return null;
1518
+ if (s === t) return i;
1519
+ i = i.nextSibling;
1520
+ }
1521
+ return null;
1522
+ }
1523
+ function se(e, t) {
1524
+ const i = t.filter((s) => s.consume === !1).map((s) => s.attributeName);
1525
+ return (s, n) => {
1526
+ const r = [];
1527
+ for (const o of e) s.hasAttribute(o) && !i.includes(o) && r.push(`attribute:${o}`);
1528
+ return r.every((o) => n.test(s, o) !== !1) ? (r.forEach((o) => n.consume(s, o)), !0) : !1;
1529
+ };
1530
+ }
1531
+ function mt(e, t, i = E(e)) {
1532
+ if (!I(e)) return !1;
1533
+ for (const s of e.getAttributeKeys())
1534
+ if (!(s.startsWith("selection:") || s == "htmlEmptyBlock") && !t.includes(s))
1535
+ return !1;
1536
+ return i.length < 2;
1537
+ }
1538
+ /**
1539
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
1540
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
1541
+ */
1542
+ const V = [
1543
+ "listType",
1544
+ "listIndent",
1545
+ "listItemId"
1546
+ ];
1547
+ var L = class extends _ {
1548
+ /**
1549
+ * @inheritDoc
1550
+ */
1551
+ constructor(t) {
1552
+ super(t);
1553
+ /**
1554
+ * The list of registered downcast strategies.
1555
+ */
1556
+ h(this, "_downcastStrategies", []);
1557
+ t.config.define("list.multiBlock", !0);
1558
+ }
1559
+ /**
1560
+ * @inheritDoc
1561
+ */
1562
+ static get pluginName() {
1563
+ return "ListEditing";
1564
+ }
1565
+ /**
1566
+ * @inheritDoc
1567
+ */
1568
+ static get isOfficialPlugin() {
1569
+ return !0;
1570
+ }
1571
+ /**
1572
+ * @inheritDoc
1573
+ */
1574
+ static get requires() {
1575
+ return [
1576
+ pt,
1577
+ gt,
1578
+ jt,
1579
+ kt,
1580
+ Vt
1581
+ ];
1582
+ }
1583
+ /**
1584
+ * @inheritDoc
1585
+ */
1586
+ init() {
1587
+ const t = this.editor, i = t.model, s = t.config.get("list.multiBlock");
1588
+ if (t.plugins.has("LegacyListEditing"))
1589
+ throw new It("list-feature-conflict", this, { conflictPlugin: "LegacyListEditing" });
1590
+ i.schema.register("$listItem", { allowAttributes: V }), s ? (i.schema.extend("$container", { allowAttributesOf: "$listItem" }), i.schema.extend("$block", { allowAttributesOf: "$listItem" }), i.schema.extend("$blockObject", { allowAttributesOf: "$listItem" })) : i.schema.register("listItem", {
1591
+ inheritAllFrom: "$block",
1592
+ allowAttributesOf: "$listItem"
1593
+ });
1594
+ for (const n of V) i.schema.setAttributeProperties(n, { copyOnReplace: !0 });
1595
+ t.commands.add("numberedList", new M(t, "numbered")), t.commands.add("bulletedList", new M(t, "bulleted")), t.commands.add("customNumberedList", new M(t, "customNumbered", { multiLevel: !0 })), t.commands.add("customBulletedList", new M(t, "customBulleted", { multiLevel: !0 })), t.commands.add("indentList", new Y(t, "forward")), t.commands.add("outdentList", new Y(t, "backward")), t.commands.add("splitListItemBefore", new Q(t, "before")), t.commands.add("splitListItemAfter", new Q(t, "after")), s && (t.commands.add("mergeListItemBackward", new J(t, "backward")), t.commands.add("mergeListItemForward", new J(t, "forward"))), this._setupDeleteIntegration(), this._setupEnterIntegration(), this._setupTabIntegration(), this._setupClipboardIntegration(), this._setupAccessibilityIntegration(), this._setupListItemIdConversionStrategy();
1596
+ }
1597
+ /**
1598
+ * @inheritDoc
1599
+ */
1600
+ afterInit() {
1601
+ const t = this.editor.commands, i = t.get("indent"), s = t.get("outdent");
1602
+ i && i.registerChildCommand(t.get("indentList"), { priority: "high" }), s && s.registerChildCommand(t.get("outdentList"), { priority: "lowest" }), this._setupModelPostFixing(), this._setupConversion();
1603
+ }
1604
+ /**
1605
+ * Registers a downcast strategy.
1606
+ *
1607
+ * **Note**: Strategies must be registered in the `Plugin#init()` phase so that it can be applied
1608
+ * in the `ListEditing#afterInit()`.
1609
+ *
1610
+ * @param strategy The downcast strategy to register.
1611
+ */
1612
+ registerDowncastStrategy(t) {
1613
+ this._downcastStrategies.push(t);
1614
+ }
1615
+ /**
1616
+ * Returns list of model attribute names that should affect downcast conversion.
1617
+ */
1618
+ getListAttributeNames() {
1619
+ return [...V, ...this._downcastStrategies.map((t) => t.attributeName)];
1620
+ }
1621
+ /**
1622
+ * Attaches the listener to the {@link module:engine/view/document~ViewDocument#event:delete} event and handles backspace/delete
1623
+ * keys in and around document lists.
1624
+ */
1625
+ _setupDeleteIntegration() {
1626
+ const t = this.editor, i = t.commands.get("mergeListItemBackward"), s = t.commands.get("mergeListItemForward");
1627
+ this.listenTo(t.editing.view.document, "delete", (n, r) => {
1628
+ const o = t.model.document.selection;
1629
+ x(t.model) || t.model.change(() => {
1630
+ const l = o.getFirstPosition();
1631
+ if (o.isCollapsed && r.direction == "backward") {
1632
+ if (!l.isAtStart) return;
1633
+ const a = l.parent;
1634
+ if (!I(a)) return;
1635
+ const u = A.first(a, {
1636
+ sameAttributes: "listType",
1637
+ sameIndent: !0
1638
+ }), c = a.getAttribute("listIndent") === 0 || !I(a.previousSibling);
1639
+ if (!u && c)
1640
+ H(a) || t.execute("splitListItemAfter"), t.execute("outdentList");
1641
+ else {
1642
+ if (!i || !i.isEnabled) return;
1643
+ i.execute({ shouldMergeOnBlocksContentLevel: st(t.model, "backward") });
1644
+ }
1645
+ r.preventDefault(), n.stop();
1646
+ } else {
1647
+ if (o.isCollapsed && !o.getLastPosition().isAtEnd || !s || !s.isEnabled) return;
1648
+ s.execute({ shouldMergeOnBlocksContentLevel: st(t.model, "forward") }), r.preventDefault(), n.stop();
1649
+ }
1650
+ });
1651
+ }, { context: "li" });
1652
+ }
1653
+ /**
1654
+ * Attaches a listener to the {@link module:engine/view/document~ViewDocument#event:enter} event and handles enter key press
1655
+ * in document lists.
1656
+ */
1657
+ _setupEnterIntegration() {
1658
+ const t = this.editor, i = t.model, s = t.commands, n = s.get("enter");
1659
+ this.listenTo(t.editing.view.document, "enter", (r, o) => {
1660
+ const l = i.document, a = l.selection.getFirstPosition().parent;
1661
+ if (l.selection.isCollapsed && I(a) && a.isEmpty && !o.isSoft) {
1662
+ const u = v(a), c = H(a);
1663
+ u && c ? (t.execute("outdentList"), o.preventDefault(), r.stop()) : u && !c ? (t.execute("splitListItemAfter"), o.preventDefault(), r.stop()) : c && (t.execute("splitListItemBefore"), o.preventDefault(), r.stop());
1664
+ }
1665
+ }, { context: "li" }), this.listenTo(n, "afterExecute", () => {
1666
+ const r = s.get("splitListItemBefore");
1667
+ if (r.refresh(), !r.isEnabled) return;
1668
+ const o = t.model.document.selection.getLastPosition().parent;
1669
+ E(o).length === 2 && r.execute();
1670
+ });
1671
+ }
1672
+ /**
1673
+ * Attaches a listener to the {@link module:engine/view/document~ViewDocument#event:tab} event and handles tab key and tab+shift keys
1674
+ * presses in document lists.
1675
+ */
1676
+ _setupTabIntegration() {
1677
+ const t = this.editor;
1678
+ this.listenTo(t.editing.view.document, "tab", (i, s) => {
1679
+ const n = s.shiftKey ? "outdentList" : "indentList";
1680
+ this.editor.commands.get(n).isEnabled && (t.execute(n), s.stopPropagation(), s.preventDefault(), i.stop());
1681
+ }, { context: "li" });
1682
+ }
1683
+ /**
1684
+ * Registers the conversion helpers for the document-list feature.
1685
+ */
1686
+ _setupConversion() {
1687
+ const t = this.editor, i = t.model, s = this.getListAttributeNames(), n = t.config.get("list.multiBlock"), r = n ? "paragraph" : "listItem", o = !!t.config.get("list.enableSkipLevelLists");
1688
+ t.conversion.for("upcast").elementToElement({
1689
+ view: "li",
1690
+ model: (a, { writer: u }) => u.createElement(r, { listType: "" })
1691
+ }).elementToElement({
1692
+ view: "p",
1693
+ model: (a, { writer: u }) => a.parent && a.parent.is("element", "li") ? u.createElement(r, { listType: "" }) : null,
1694
+ converterPriority: "high"
1695
+ }).add((a) => {
1696
+ a.on("element:p", (u, c, d) => {
1697
+ const m = c.viewItem;
1698
+ if (!m.parent || !m.parent.is("element", "li") || m.isEmpty || !m.getAttributeKeys().next().done) return;
1699
+ for (const f of m.parent.getChildren())
1700
+ if (f !== m && !(f.is("element", "ol") || f.is("element", "ul")))
1701
+ return;
1702
+ d.consumable.consume(m, { name: !0 });
1703
+ const { modelRange: g, modelCursor: p } = d.convertChildren(m, c.modelCursor);
1704
+ c.modelRange = g, c.modelCursor = p;
1705
+ }, { priority: "highest" }), o && a.on("element:li", Ht(), { priority: "high" }), a.on("element:li", Gt());
1706
+ }), n || t.conversion.for("downcast").elementToElement({
1707
+ model: "listItem",
1708
+ view: "p"
1709
+ }), t.conversion.for("editingDowncast").elementToElement({
1710
+ model: r,
1711
+ view: it(s),
1712
+ converterPriority: "high"
1713
+ }).add((a) => {
1714
+ a.on("attribute", et(s, this._downcastStrategies, i, { enableSkipLevelLists: o })), a.on("remove", Qt(i.schema));
1715
+ }), t.conversion.for("dataDowncast").elementToElement({
1716
+ model: r,
1717
+ view: it(s, { dataPipeline: !0 }),
1718
+ converterPriority: "high"
1719
+ }).add((a) => {
1720
+ a.on("attribute", et(s, this._downcastStrategies, i, {
1721
+ dataPipeline: !0,
1722
+ enableSkipLevelLists: o
1723
+ }));
1724
+ });
1725
+ const l = Zt(this._downcastStrategies, t.editing.view);
1726
+ t.editing.mapper.on("modelToViewPosition", l), t.data.mapper.on("modelToViewPosition", l), this.listenTo(i.document, "change:data", Jt(i, t.editing, s, this), { priority: "high" }), this.on("checkAttributes:item", (a, { viewElement: u, modelAttributes: c }) => {
1727
+ u.id != c.listItemId && (a.return = !0, a.stop());
1728
+ }), this.on("checkAttributes:list", (a, { viewElement: u, modelAttributes: c }) => {
1729
+ (u.name != lt(c.listType) || u.id != at(c.listType, c.listIndent)) && (a.return = !0, a.stop());
1730
+ });
1731
+ }
1732
+ /**
1733
+ * Registers model post-fixers.
1734
+ */
1735
+ _setupModelPostFixing() {
1736
+ const t = this.editor.model, i = this.getListAttributeNames();
1737
+ t.document.registerPostFixer((s) => ne(t, s, i, this)), this.editor.config.get("list.enableSkipLevelLists") || this.on("postFixer", (s, { listNodes: n, writer: r }) => {
1738
+ s.return = Kt(n, r) || s.return;
1739
+ }, { priority: "high" }), this.on("postFixer", (s, { listNodes: n, writer: r, seenIds: o }) => {
1740
+ s.return = Ut(n, o, r) || s.return;
1741
+ }, { priority: "high" });
1742
+ }
1743
+ /**
1744
+ * Integrates the feature with the clipboard via {@link module:engine/model/model~Model#insertContent} and
1745
+ * {@link module:engine/model/model~Model#getSelectedContent}.
1746
+ */
1747
+ _setupClipboardIntegration() {
1748
+ const t = this.editor.model, i = this.editor.plugins.get("ClipboardPipeline");
1749
+ this.listenTo(t, "insertContent", re(t), { priority: "high" }), this.listenTo(i, "outputTransformation", (s, n) => {
1750
+ t.change((r) => {
1751
+ const o = Array.from(n.content.getChildren()), l = o[o.length - 1];
1752
+ if (o.length > 1 && l.is("element") && l.isEmpty && o.slice(0, -1).every(I) && r.remove(l), n.method == "copy" || n.method == "cut") {
1753
+ const a = Array.from(n.content.getChildren());
1754
+ T(a) && z(a, r, this.getListAttributeNames());
1755
+ }
1756
+ });
1757
+ });
1758
+ }
1759
+ /**
1760
+ * Informs editor accessibility features about keystrokes brought by the plugin.
1761
+ */
1762
+ _setupAccessibilityIntegration() {
1763
+ const t = this.editor, i = t.t;
1764
+ t.accessibility.addKeystrokeInfoGroup({
1765
+ id: "list",
1766
+ label: i("Keystrokes that can be used in a list"),
1767
+ keystrokes: [{
1768
+ label: i("Increase list item indent"),
1769
+ keystroke: "Tab"
1770
+ }, {
1771
+ label: i("Decrease list item indent"),
1772
+ keystroke: "Shift+Tab"
1773
+ }]
1774
+ });
1775
+ }
1776
+ /**
1777
+ * Convert `listItemId` attribute to `data-list-item-id` attribute on the view element in both downcast pipelines.
1778
+ */
1779
+ _setupListItemIdConversionStrategy() {
1780
+ this.registerDowncastStrategy({
1781
+ scope: "item",
1782
+ attributeName: "listItemId",
1783
+ setAttributeOnDowncast(t, i, s, n) {
1784
+ n && (n.skipListItemIds || n.isClipboardPipeline) || t.setAttribute("data-list-item-id", i, s);
1785
+ }
1786
+ });
1787
+ }
1788
+ };
1789
+ function ne(e, t, i, s) {
1790
+ const n = e.document.differ.getChanges(), r = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), l = s.editor.config.get("list.multiBlock");
1791
+ let a = !1;
1792
+ for (const c of n) {
1793
+ if (c.type == "insert" && c.name != "$text") {
1794
+ const d = c.position.nodeAfter;
1795
+ if (!e.schema.checkAttribute(d, "listItemId"))
1796
+ for (const m of Array.from(d.getAttributeKeys())) i.includes(m) && (t.removeAttribute(m, d), a = !0);
1797
+ y(c.position, o, r), c.attributes.has("listItemId") || y(c.position.getShiftedBy(c.length), o, r);
1798
+ for (const { item: m, previousPosition: g } of e.createRangeIn(d)) I(m) && y(g, o, r);
1799
+ } else c.type == "remove" ? y(c.position, o, r) : c.type == "attribute" && i.includes(c.attributeKey) && (y(c.range.start, o, r), c.attributeNewValue === null && y(c.range.start.getShiftedBy(1), o, r));
1800
+ if (!l && c.type == "attribute" && V.includes(c.attributeKey)) {
1801
+ const d = c.range.start.nodeAfter;
1802
+ c.attributeNewValue === null && d && d.is("element", "listItem") ? (t.rename(d, "paragraph"), a = !0) : c.attributeOldValue === null && d && d.is("element") && d.name != "listItem" && (t.rename(d, "listItem"), a = !0);
1803
+ }
1804
+ }
1805
+ const u = /* @__PURE__ */ new Set();
1806
+ for (const c of o.values()) a = s.fire("postFixer", {
1807
+ listNodes: new St(c),
1808
+ listHead: c,
1809
+ writer: t,
1810
+ seenIds: u
1811
+ }) || a;
1812
+ return a;
1813
+ }
1814
+ function re(e) {
1815
+ return (t, [i, s]) => {
1816
+ const n = (i.is("documentFragment") ? Array.from(i.getChildren()) : [i]).filter((l) => !e.schema.isInline(l));
1817
+ if (!n.length) return;
1818
+ const r = (s ? e.createSelection(s) : e.document.selection).getFirstPosition();
1819
+ let o;
1820
+ if (I(r.parent)) o = r.parent;
1821
+ else if (I(r.nodeBefore) && I(r.nodeAfter)) o = r.nodeBefore;
1822
+ else return;
1823
+ e.change((l) => {
1824
+ const a = o.getAttribute("listType"), u = o.getAttribute("listIndent"), c = n[0].getAttribute("listIndent") || 0, d = Math.max(u - c, 0);
1825
+ for (const m of n) {
1826
+ const g = I(m);
1827
+ o.is("element", "listItem") && m.is("element", "paragraph") && l.rename(m, "listItem"), l.setAttributes({
1828
+ listIndent: (g ? m.getAttribute("listIndent") : 0) + d,
1829
+ listItemId: g ? m.getAttribute("listItemId") : F.next(),
1830
+ listType: a
1831
+ }, m);
1832
+ }
1833
+ });
1834
+ };
1835
+ }
1836
+ function st(e, t) {
1837
+ const i = e.document.selection;
1838
+ if (!i.isCollapsed) return !x(e);
1839
+ if (t === "forward") return !0;
1840
+ const s = i.getFirstPosition().parent, n = s.previousSibling;
1841
+ return e.schema.isObject(n) ? !1 : n.isEmpty ? !0 : T([s, n]);
1842
+ }
1843
+ /**
1844
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
1845
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
1846
+ */
1847
+ function nt(e, t, i, s) {
1848
+ e.ui.componentFactory.add(t, () => {
1849
+ const n = rt(At, e, t, i, s);
1850
+ return n.set({
1851
+ tooltip: !0,
1852
+ isToggleable: !0
1853
+ }), n;
1854
+ }), e.ui.componentFactory.add(`menuBar:${t}`, () => {
1855
+ const n = rt(yt, e, t, i, s);
1856
+ return n.set({
1857
+ role: "menuitemcheckbox",
1858
+ isToggleable: !0
1859
+ }), n;
1860
+ });
1861
+ }
1862
+ function rt(e, t, i, s, n) {
1863
+ const r = t.commands.get(i), o = new e(t.locale);
1864
+ return o.set({
1865
+ label: s,
1866
+ icon: n
1867
+ }), o.bind("isOn", "isEnabled").to(r, "value", "isEnabled"), o.on("execute", () => {
1868
+ t.execute(i), t.editing.view.focus();
1869
+ }), o;
1870
+ }
1871
+ /**
1872
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
1873
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
1874
+ */
1875
+ var oe = class extends _ {
1876
+ /**
1877
+ * @inheritDoc
1878
+ */
1879
+ static get pluginName() {
1880
+ return "ListUI";
1881
+ }
1882
+ /**
1883
+ * @inheritDoc
1884
+ */
1885
+ static get isOfficialPlugin() {
1886
+ return !0;
1887
+ }
1888
+ /**
1889
+ * @inheritDoc
1890
+ */
1891
+ init() {
1892
+ const e = this.editor.t;
1893
+ this.editor.ui.componentFactory.has("numberedList") || nt(this.editor, "numberedList", e("Numbered List"), Lt), this.editor.ui.componentFactory.has("bulletedList") || nt(this.editor, "bulletedList", e("Bulleted List"), _t);
1894
+ }
1895
+ };
1896
+ /**
1897
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
1898
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
1899
+ */
1900
+ var be = class extends _ {
1901
+ /**
1902
+ * @inheritDoc
1903
+ */
1904
+ static get requires() {
1905
+ return [L, oe];
1906
+ }
1907
+ /**
1908
+ * @inheritDoc
1909
+ */
1910
+ static get pluginName() {
1911
+ return "List";
1912
+ }
1913
+ /**
1914
+ * @inheritDoc
1915
+ */
1916
+ static get isOfficialPlugin() {
1917
+ return !0;
1918
+ }
1919
+ };
1920
+ const le = [
1921
+ {
1922
+ listStyle: "disc",
1923
+ typeAttribute: "disc",
1924
+ listType: "bulleted"
1925
+ },
1926
+ {
1927
+ listStyle: "circle",
1928
+ typeAttribute: "circle",
1929
+ listType: "bulleted"
1930
+ },
1931
+ {
1932
+ listStyle: "square",
1933
+ typeAttribute: "square",
1934
+ listType: "bulleted"
1935
+ },
1936
+ {
1937
+ listStyle: "decimal",
1938
+ typeAttribute: "1",
1939
+ listType: "numbered"
1940
+ },
1941
+ {
1942
+ listStyle: "decimal-leading-zero",
1943
+ typeAttribute: null,
1944
+ listType: "numbered"
1945
+ },
1946
+ {
1947
+ listStyle: "lower-roman",
1948
+ typeAttribute: "i",
1949
+ listType: "numbered"
1950
+ },
1951
+ {
1952
+ listStyle: "upper-roman",
1953
+ typeAttribute: "I",
1954
+ listType: "numbered"
1955
+ },
1956
+ {
1957
+ listStyle: "lower-alpha",
1958
+ typeAttribute: "a",
1959
+ listType: "numbered"
1960
+ },
1961
+ {
1962
+ listStyle: "upper-alpha",
1963
+ typeAttribute: "A",
1964
+ listType: "numbered"
1965
+ },
1966
+ {
1967
+ listStyle: "lower-latin",
1968
+ typeAttribute: "a",
1969
+ listType: "numbered"
1970
+ },
1971
+ {
1972
+ listStyle: "upper-latin",
1973
+ typeAttribute: "A",
1974
+ listType: "numbered"
1975
+ },
1976
+ {
1977
+ listStyle: "arabic-indic",
1978
+ typeAttribute: null,
1979
+ listType: "numbered"
1980
+ }
1981
+ ];
1982
+ for (const { listStyle: e, typeAttribute: t, listType: i } of le)
1983
+ ;
1984
+ export {
1985
+ be as List,
1986
+ M as ListCommand,
1987
+ L as ListEditing,
1988
+ Vt as ListFormatting,
1989
+ Y as ListIndentCommand,
1990
+ xt as ListItemBoldIntegration,
1991
+ Ot as ListItemFontColorIntegration,
1992
+ Mt as ListItemFontFamilyIntegration,
1993
+ Nt as ListItemFontSizeIntegration,
1994
+ Pt as ListItemItalicIntegration,
1995
+ J as ListMergeCommand,
1996
+ Q as ListSplitCommand,
1997
+ oe as ListUI,
1998
+ jt as ListUtils,
1999
+ St as _ListBlocksIterable,
2000
+ F as _ListItemUid,
2001
+ A as _ListWalker,
2002
+ P as _SiblingListBlocksIterator,
2003
+ R as _canBecomeSimpleListItem,
2004
+ Z as _createListElement,
2005
+ tt as _createListItemElement,
2006
+ nt as _createListUIComponents,
2007
+ Zt as _createModelToViewListPositionMapper,
2008
+ N as _expandListBlocksToCompleteItems,
2009
+ wt as _expandListBlocksToCompleteList,
2010
+ y as _findAndAddListHeadToMap,
2011
+ Xt as _findMappedListItemViewElement,
2012
+ Kt as _fixListIndents,
2013
+ Ut as _fixListItemIds,
2014
+ E as _getAllListItemBlocks,
2015
+ qt as _getListIndent,
2016
+ S as _getListItemBlocks,
2017
+ ot as _getListItems,
2018
+ vt as _getNestedListBlocks,
2019
+ x as _getSelectedBlockObject,
2020
+ at as _getViewElementIdForListType,
2021
+ lt as _getViewElementNameForListType,
2022
+ j as _indentListBlocks,
2023
+ v as _isFirstBlockOfListItem,
2024
+ H as _isLastBlockOfListItem,
2025
+ I as _isListItemBlock,
2026
+ W as _isListItemView,
2027
+ Wt as _isListView,
2028
+ Et as _isNumberedListType,
2029
+ T as _isSingleListItem,
2030
+ it as _listItemBogusParagraphCreator,
2031
+ et as _listItemDowncastConverter,
2032
+ Qt as _listItemDowncastRemoveConverter,
2033
+ Gt as _listItemUpcastConverter,
2034
+ $ as _mergeListItemBefore,
2035
+ Bt as _outdentFollowingListItems,
2036
+ Ft as _outdentListBlocksWithMerge,
2037
+ Jt as _reconvertListItemsOnDataChange,
2038
+ z as _removeListAttributes,
2039
+ w as _sortListBlocks,
2040
+ K as _splitListItemBefore
2041
+ };
2042
+ //# sourceMappingURL=index.js.map