@aquera/nile-elements 1.9.5 → 1.9.7

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 (565) hide show
  1. package/README.md +9 -0
  2. package/dist/index-178e1e57.cjs.js +2 -0
  3. package/dist/index-178e1e57.cjs.js.map +1 -0
  4. package/dist/index-1faa963c.esm.js +1 -0
  5. package/dist/index-249de90a.esm.js +1 -0
  6. package/dist/index-353172ed.esm.js +1 -0
  7. package/dist/index-6f3fa4ab.esm.js +1 -0
  8. package/dist/index-89c520e9.cjs.js +5 -0
  9. package/dist/index-89c520e9.cjs.js.map +1 -0
  10. package/dist/index-920675c4.esm.js +1 -0
  11. package/dist/index-b387a9f4.cjs.js +2 -0
  12. package/dist/index-b387a9f4.cjs.js.map +1 -0
  13. package/dist/index-cc1385e0.cjs.js +2 -0
  14. package/dist/index-cc1385e0.cjs.js.map +1 -0
  15. package/dist/index-dedc38a6.esm.js +1 -0
  16. package/dist/index-df196058.cjs.js +2 -0
  17. package/dist/index-df196058.cjs.js.map +1 -0
  18. package/dist/index-f956f56d.cjs.js +7 -0
  19. package/dist/index-f956f56d.cjs.js.map +1 -0
  20. package/dist/index.cjs.js +1 -1
  21. package/dist/index.esm.js +1 -1
  22. package/dist/index.js +3802 -664
  23. package/dist/internal/glyph.cjs.js +2 -0
  24. package/dist/internal/glyph.cjs.js.map +1 -0
  25. package/dist/internal/glyph.esm.js +5 -0
  26. package/dist/nile-auto-complete/index.cjs.js +1 -1
  27. package/dist/nile-auto-complete/nile-auto-complete.cjs.js +1 -1
  28. package/dist/nile-auto-complete/portal-manager.cjs.js +1 -1
  29. package/dist/nile-auto-complete/portal-utils.cjs.js +1 -1
  30. package/dist/nile-chip/nile-chip.css.cjs.js +1 -1
  31. package/dist/nile-chip/nile-chip.css.cjs.js.map +1 -1
  32. package/dist/nile-chip/nile-chip.css.esm.js +8 -1
  33. package/dist/nile-code-editor/extensionSetup.cjs.js +7 -7
  34. package/dist/nile-code-editor/extensionSetup.cjs.js.map +1 -1
  35. package/dist/nile-code-editor/extensionSetup.esm.js +1 -1
  36. package/dist/nile-code-editor/index.cjs.js +1 -1
  37. package/dist/nile-code-editor/index.esm.js +1 -1
  38. package/dist/nile-code-editor/nile-code-editor.cjs.js +2 -2
  39. package/dist/nile-code-editor/nile-code-editor.cjs.js.map +1 -1
  40. package/dist/nile-code-editor/nile-code-editor.esm.js +4 -4
  41. package/dist/nile-color-picker/index.cjs.js +1 -1
  42. package/dist/nile-color-picker/nile-color-picker.cjs.js +1 -1
  43. package/dist/nile-combobox/index.cjs.js +1 -1
  44. package/dist/nile-combobox/index.esm.js +1 -1
  45. package/dist/nile-combobox/nile-combobox.cjs.js +1 -1
  46. package/dist/nile-combobox/nile-combobox.esm.js +1 -1
  47. package/dist/nile-combobox/portal-manager.cjs.js +1 -1
  48. package/dist/nile-context-menu/index.cjs.js +1 -1
  49. package/dist/nile-context-menu/nile-context-menu.cjs.js +1 -1
  50. package/dist/nile-context-submenu/index.cjs.js +1 -1
  51. package/dist/nile-context-submenu/nile-context-submenu.cjs.js +1 -1
  52. package/dist/nile-detail/index.cjs.js +1 -1
  53. package/dist/nile-detail/index.esm.js +1 -1
  54. package/dist/nile-detail/nile-detail.cjs.js +1 -1
  55. package/dist/nile-detail/nile-detail.esm.js +1 -1
  56. package/dist/nile-dropdown/index.cjs.js +1 -1
  57. package/dist/nile-dropdown/nile-dropdown.cjs.js +1 -1
  58. package/dist/nile-dropdown/portal-manager.cjs.js +1 -1
  59. package/dist/nile-file-upload/index.cjs.js +1 -1
  60. package/dist/nile-file-upload/nile-file-upload.cjs.js +1 -1
  61. package/dist/nile-file-upload/nile-file-upload.template.cjs.js +1 -1
  62. package/dist/nile-floating-panel/index.cjs.js +1 -1
  63. package/dist/nile-floating-panel/nile-floating-panel.cjs.js +1 -1
  64. package/dist/nile-hero/nile-hero.cjs.js +1 -1
  65. package/dist/nile-hero/nile-hero.cjs.js.map +1 -1
  66. package/dist/nile-hero/nile-hero.css.cjs.js +1 -1
  67. package/dist/nile-hero/nile-hero.css.cjs.js.map +1 -1
  68. package/dist/nile-hero/nile-hero.css.esm.js +14 -14
  69. package/dist/nile-hero/nile-hero.esm.js +1 -1
  70. package/dist/nile-hero-header/nile-hero-header.cjs.js +1 -1
  71. package/dist/nile-hero-header/nile-hero-header.cjs.js.map +1 -1
  72. package/dist/nile-hero-header/nile-hero-header.css.cjs.js +1 -1
  73. package/dist/nile-hero-header/nile-hero-header.css.cjs.js.map +1 -1
  74. package/dist/nile-hero-header/nile-hero-header.css.esm.js +11 -11
  75. package/dist/nile-hero-header/nile-hero-header.esm.js +3 -3
  76. package/dist/nile-lite-tooltip/index.cjs.js +1 -1
  77. package/dist/nile-lite-tooltip/nile-lite-tooltip.cjs.js +1 -1
  78. package/dist/nile-markdown-editor/index.cjs.js +1 -1
  79. package/dist/nile-markdown-editor/nile-markdown-editor.cjs.js +1 -1
  80. package/dist/nile-popover/index.cjs.js +1 -1
  81. package/dist/nile-popover/nile-popover.cjs.js +1 -1
  82. package/dist/nile-popover/portal-manager.cjs.js +1 -1
  83. package/dist/nile-popup/index.cjs.js +1 -1
  84. package/dist/nile-popup/nile-popup.cjs.js +1 -1
  85. package/dist/nile-rich-text-editor/index.cjs.js +1 -1
  86. package/dist/nile-rich-text-editor/index.esm.js +1 -1
  87. package/dist/nile-rich-text-editor/nile-rich-text-editor.cjs.js +1 -1
  88. package/dist/nile-rich-text-editor/nile-rich-text-editor.cjs.js.map +1 -1
  89. package/dist/nile-rich-text-editor/nile-rich-text-editor.css.cjs.js +1 -1
  90. package/dist/nile-rich-text-editor/nile-rich-text-editor.css.cjs.js.map +1 -1
  91. package/dist/nile-rich-text-editor/nile-rich-text-editor.css.esm.js +70 -0
  92. package/dist/nile-rich-text-editor/nile-rich-text-editor.esm.js +1 -1
  93. package/dist/nile-rich-text-editor/nile-rte-image.cjs.js +3 -0
  94. package/dist/nile-rich-text-editor/nile-rte-image.cjs.js.map +1 -0
  95. package/dist/nile-rich-text-editor/nile-rte-image.esm.js +96 -0
  96. package/dist/nile-select/index.cjs.js +1 -1
  97. package/dist/nile-select/nile-select.cjs.js +1 -1
  98. package/dist/nile-select/portal-manager.cjs.js +1 -1
  99. package/dist/nile-side-bar-action/index.cjs.js +1 -1
  100. package/dist/nile-side-bar-action/nile-side-bar-action.cjs.js +1 -1
  101. package/dist/nile-side-bar-action/portal-manager.cjs.js +1 -1
  102. package/dist/nile-tooltip/index.cjs.js +1 -1
  103. package/dist/nile-tooltip/nile-tooltip.cjs.js +1 -1
  104. package/dist/nile-virtual-select/index.cjs.js +1 -1
  105. package/dist/nile-virtual-select/nile-virtual-select.cjs.js +1 -1
  106. package/dist/nile-virtual-select/portal-manager.cjs.js +1 -1
  107. package/dist/nile-virtual-select/renderer.cjs.js +1 -1
  108. package/dist/nile-wysiwyg-editor/emoji.cjs.js +2 -0
  109. package/dist/nile-wysiwyg-editor/emoji.cjs.js.map +1 -0
  110. package/dist/nile-wysiwyg-editor/emoji.esm.js +1 -0
  111. package/dist/nile-wysiwyg-editor/engine/commands.cjs.js +2 -0
  112. package/dist/nile-wysiwyg-editor/engine/commands.cjs.js.map +1 -0
  113. package/dist/nile-wysiwyg-editor/engine/commands.esm.js +1 -0
  114. package/dist/nile-wysiwyg-editor/engine/create-state.cjs.js +2 -0
  115. package/dist/nile-wysiwyg-editor/engine/create-state.cjs.js.map +1 -0
  116. package/dist/nile-wysiwyg-editor/engine/create-state.esm.js +1 -0
  117. package/dist/nile-wysiwyg-editor/engine/export.cjs.js +2 -0
  118. package/dist/nile-wysiwyg-editor/engine/export.cjs.js.map +1 -0
  119. package/dist/nile-wysiwyg-editor/engine/export.esm.js +1 -0
  120. package/dist/nile-wysiwyg-editor/engine/index.cjs.js +2 -0
  121. package/dist/nile-wysiwyg-editor/engine/index.cjs.js.map +1 -0
  122. package/dist/nile-wysiwyg-editor/engine/index.esm.js +1 -0
  123. package/dist/nile-wysiwyg-editor/engine/inputrules.cjs.js +2 -0
  124. package/dist/nile-wysiwyg-editor/engine/inputrules.cjs.js.map +1 -0
  125. package/dist/nile-wysiwyg-editor/engine/inputrules.esm.js +1 -0
  126. package/dist/nile-wysiwyg-editor/engine/keymap.cjs.js +2 -0
  127. package/dist/nile-wysiwyg-editor/engine/keymap.cjs.js.map +1 -0
  128. package/dist/nile-wysiwyg-editor/engine/keymap.esm.js +1 -0
  129. package/dist/nile-wysiwyg-editor/engine/markdown-parse.cjs.js +2 -0
  130. package/dist/nile-wysiwyg-editor/engine/markdown-parse.cjs.js.map +1 -0
  131. package/dist/nile-wysiwyg-editor/engine/markdown-parse.esm.js +1 -0
  132. package/dist/nile-wysiwyg-editor/engine/markdown.cjs.js +2 -0
  133. package/dist/nile-wysiwyg-editor/engine/markdown.cjs.js.map +1 -0
  134. package/dist/nile-wysiwyg-editor/engine/markdown.esm.js +1 -0
  135. package/dist/nile-wysiwyg-editor/engine/office-paste.cjs.js +2 -0
  136. package/dist/nile-wysiwyg-editor/engine/office-paste.cjs.js.map +1 -0
  137. package/dist/nile-wysiwyg-editor/engine/office-paste.esm.js +1 -0
  138. package/dist/nile-wysiwyg-editor/engine/plugins/code-highlight.cjs.js +2 -0
  139. package/dist/nile-wysiwyg-editor/engine/plugins/code-highlight.cjs.js.map +1 -0
  140. package/dist/nile-wysiwyg-editor/engine/plugins/code-highlight.esm.js +1 -0
  141. package/dist/nile-wysiwyg-editor/engine/plugins/embed-view.cjs.js +2 -0
  142. package/dist/nile-wysiwyg-editor/engine/plugins/embed-view.cjs.js.map +1 -0
  143. package/dist/nile-wysiwyg-editor/engine/plugins/embed-view.esm.js +1 -0
  144. package/dist/nile-wysiwyg-editor/engine/plugins/embeds.cjs.js +2 -0
  145. package/dist/nile-wysiwyg-editor/engine/plugins/embeds.cjs.js.map +1 -0
  146. package/dist/nile-wysiwyg-editor/engine/plugins/embeds.esm.js +1 -0
  147. package/dist/nile-wysiwyg-editor/engine/plugins/find-replace.cjs.js +2 -0
  148. package/dist/nile-wysiwyg-editor/engine/plugins/find-replace.cjs.js.map +1 -0
  149. package/dist/nile-wysiwyg-editor/engine/plugins/find-replace.esm.js +1 -0
  150. package/dist/nile-wysiwyg-editor/engine/plugins/format-painter.cjs.js +2 -0
  151. package/dist/nile-wysiwyg-editor/engine/plugins/format-painter.cjs.js.map +1 -0
  152. package/dist/nile-wysiwyg-editor/engine/plugins/format-painter.esm.js +1 -0
  153. package/dist/nile-wysiwyg-editor/engine/plugins/image-view.cjs.js +2 -0
  154. package/dist/nile-wysiwyg-editor/engine/plugins/image-view.cjs.js.map +1 -0
  155. package/dist/nile-wysiwyg-editor/engine/plugins/image-view.esm.js +1 -0
  156. package/dist/nile-wysiwyg-editor/engine/plugins/image.cjs.js +2 -0
  157. package/dist/nile-wysiwyg-editor/engine/plugins/image.cjs.js.map +1 -0
  158. package/dist/nile-wysiwyg-editor/engine/plugins/image.esm.js +1 -0
  159. package/dist/nile-wysiwyg-editor/engine/plugins/link.cjs.js +2 -0
  160. package/dist/nile-wysiwyg-editor/engine/plugins/link.cjs.js.map +1 -0
  161. package/dist/nile-wysiwyg-editor/engine/plugins/link.esm.js +1 -0
  162. package/dist/nile-wysiwyg-editor/engine/plugins/math-view.cjs.js +2 -0
  163. package/dist/nile-wysiwyg-editor/engine/plugins/math-view.cjs.js.map +1 -0
  164. package/dist/nile-wysiwyg-editor/engine/plugins/math-view.esm.js +1 -0
  165. package/dist/nile-wysiwyg-editor/engine/plugins/max-length.cjs.js +2 -0
  166. package/dist/nile-wysiwyg-editor/engine/plugins/max-length.cjs.js.map +1 -0
  167. package/dist/nile-wysiwyg-editor/engine/plugins/max-length.esm.js +1 -0
  168. package/dist/nile-wysiwyg-editor/engine/plugins/paste.cjs.js +2 -0
  169. package/dist/nile-wysiwyg-editor/engine/plugins/paste.cjs.js.map +1 -0
  170. package/dist/nile-wysiwyg-editor/engine/plugins/paste.esm.js +1 -0
  171. package/dist/nile-wysiwyg-editor/engine/plugins/placeholder.cjs.js +2 -0
  172. package/dist/nile-wysiwyg-editor/engine/plugins/placeholder.cjs.js.map +1 -0
  173. package/dist/nile-wysiwyg-editor/engine/plugins/placeholder.esm.js +1 -0
  174. package/dist/nile-wysiwyg-editor/engine/plugins/single-line.cjs.js +2 -0
  175. package/dist/nile-wysiwyg-editor/engine/plugins/single-line.cjs.js.map +1 -0
  176. package/dist/nile-wysiwyg-editor/engine/plugins/single-line.esm.js +1 -0
  177. package/dist/nile-wysiwyg-editor/engine/plugins/suggestions.cjs.js +2 -0
  178. package/dist/nile-wysiwyg-editor/engine/plugins/suggestions.cjs.js.map +1 -0
  179. package/dist/nile-wysiwyg-editor/engine/plugins/suggestions.esm.js +1 -0
  180. package/dist/nile-wysiwyg-editor/engine/plugins/tables.cjs.js +2 -0
  181. package/dist/nile-wysiwyg-editor/engine/plugins/tables.cjs.js.map +1 -0
  182. package/dist/nile-wysiwyg-editor/engine/plugins/tables.esm.js +1 -0
  183. package/dist/nile-wysiwyg-editor/engine/plugins/task-list.cjs.js +2 -0
  184. package/dist/nile-wysiwyg-editor/engine/plugins/task-list.cjs.js.map +1 -0
  185. package/dist/nile-wysiwyg-editor/engine/plugins/task-list.esm.js +1 -0
  186. package/dist/nile-wysiwyg-editor/engine/sanitize.cjs.js +2 -0
  187. package/dist/nile-wysiwyg-editor/engine/sanitize.cjs.js.map +1 -0
  188. package/dist/nile-wysiwyg-editor/engine/sanitize.esm.js +1 -0
  189. package/dist/nile-wysiwyg-editor/engine/schema.cjs.js +2 -0
  190. package/dist/nile-wysiwyg-editor/engine/schema.cjs.js.map +1 -0
  191. package/dist/nile-wysiwyg-editor/engine/schema.esm.js +1 -0
  192. package/dist/nile-wysiwyg-editor/engine/selection-state.cjs.js +2 -0
  193. package/dist/nile-wysiwyg-editor/engine/selection-state.cjs.js.map +1 -0
  194. package/dist/nile-wysiwyg-editor/engine/selection-state.esm.js +1 -0
  195. package/dist/nile-wysiwyg-editor/engine/serializer.cjs.js +2 -0
  196. package/dist/nile-wysiwyg-editor/engine/serializer.cjs.js.map +1 -0
  197. package/dist/nile-wysiwyg-editor/engine/serializer.esm.js +1 -0
  198. package/dist/nile-wysiwyg-editor/index.cjs.js +2 -0
  199. package/dist/nile-wysiwyg-editor/index.cjs.js.map +1 -0
  200. package/dist/nile-wysiwyg-editor/index.esm.js +1 -0
  201. package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.cjs.js +2 -0
  202. package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.cjs.js.map +1 -0
  203. package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.css.cjs.js +2 -0
  204. package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.css.cjs.js.map +1 -0
  205. package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.css.esm.js +780 -0
  206. package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.esm.js +97 -0
  207. package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.cjs.js +2 -0
  208. package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.cjs.js.map +1 -0
  209. package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.esm.js +1 -0
  210. package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.cjs.js +2 -0
  211. package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.cjs.js.map +1 -0
  212. package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.cjs.js +2 -0
  213. package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.cjs.js.map +1 -0
  214. package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.esm.js +244 -0
  215. package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.esm.js +137 -0
  216. package/dist/nile-wysiwyg-editor/types.cjs.js +2 -0
  217. package/dist/nile-wysiwyg-editor/types.cjs.js.map +1 -0
  218. package/dist/nile-wysiwyg-editor/types.esm.js +1 -0
  219. package/dist/nile-wysiwyg-editor/ui/bookmark-panel.cjs.js +2 -0
  220. package/dist/nile-wysiwyg-editor/ui/bookmark-panel.cjs.js.map +1 -0
  221. package/dist/nile-wysiwyg-editor/ui/bookmark-panel.esm.js +97 -0
  222. package/dist/nile-wysiwyg-editor/ui/bubble-menu.cjs.js +2 -0
  223. package/dist/nile-wysiwyg-editor/ui/bubble-menu.cjs.js.map +1 -0
  224. package/dist/nile-wysiwyg-editor/ui/bubble-menu.esm.js +67 -0
  225. package/dist/nile-wysiwyg-editor/ui/code-block-menu.cjs.js +2 -0
  226. package/dist/nile-wysiwyg-editor/ui/code-block-menu.cjs.js.map +1 -0
  227. package/dist/nile-wysiwyg-editor/ui/code-block-menu.esm.js +65 -0
  228. package/dist/nile-wysiwyg-editor/ui/embed-menu.cjs.js +2 -0
  229. package/dist/nile-wysiwyg-editor/ui/embed-menu.cjs.js.map +1 -0
  230. package/dist/nile-wysiwyg-editor/ui/embed-menu.esm.js +64 -0
  231. package/dist/nile-wysiwyg-editor/ui/embed-panel.cjs.js +2 -0
  232. package/dist/nile-wysiwyg-editor/ui/embed-panel.cjs.js.map +1 -0
  233. package/dist/nile-wysiwyg-editor/ui/embed-panel.esm.js +68 -0
  234. package/dist/nile-wysiwyg-editor/ui/emoji-picker.cjs.js +2 -0
  235. package/dist/nile-wysiwyg-editor/ui/emoji-picker.cjs.js.map +1 -0
  236. package/dist/nile-wysiwyg-editor/ui/emoji-picker.esm.js +96 -0
  237. package/dist/nile-wysiwyg-editor/ui/find-replace.cjs.js +2 -0
  238. package/dist/nile-wysiwyg-editor/ui/find-replace.cjs.js.map +1 -0
  239. package/dist/nile-wysiwyg-editor/ui/find-replace.esm.js +112 -0
  240. package/dist/nile-wysiwyg-editor/ui/image-menu.cjs.js +2 -0
  241. package/dist/nile-wysiwyg-editor/ui/image-menu.cjs.js.map +1 -0
  242. package/dist/nile-wysiwyg-editor/ui/image-menu.esm.js +64 -0
  243. package/dist/nile-wysiwyg-editor/ui/image-panel.cjs.js +2 -0
  244. package/dist/nile-wysiwyg-editor/ui/image-panel.cjs.js.map +1 -0
  245. package/dist/nile-wysiwyg-editor/ui/image-panel.esm.js +171 -0
  246. package/dist/nile-wysiwyg-editor/ui/insert-menu.cjs.js +2 -0
  247. package/dist/nile-wysiwyg-editor/ui/insert-menu.cjs.js.map +1 -0
  248. package/dist/nile-wysiwyg-editor/ui/insert-menu.esm.js +90 -0
  249. package/dist/nile-wysiwyg-editor/ui/link-editor.cjs.js +2 -0
  250. package/dist/nile-wysiwyg-editor/ui/link-editor.cjs.js.map +1 -0
  251. package/dist/nile-wysiwyg-editor/ui/link-editor.esm.js +114 -0
  252. package/dist/nile-wysiwyg-editor/ui/markdown-panel.cjs.js +2 -0
  253. package/dist/nile-wysiwyg-editor/ui/markdown-panel.cjs.js.map +1 -0
  254. package/dist/nile-wysiwyg-editor/ui/markdown-panel.esm.js +80 -0
  255. package/dist/nile-wysiwyg-editor/ui/math-panel.cjs.js +2 -0
  256. package/dist/nile-wysiwyg-editor/ui/math-panel.cjs.js.map +1 -0
  257. package/dist/nile-wysiwyg-editor/ui/math-panel.esm.js +92 -0
  258. package/dist/nile-wysiwyg-editor/ui/shortcut-help.cjs.js +2 -0
  259. package/dist/nile-wysiwyg-editor/ui/shortcut-help.cjs.js.map +1 -0
  260. package/dist/nile-wysiwyg-editor/ui/shortcut-help.esm.js +147 -0
  261. package/dist/nile-wysiwyg-editor/ui/source-view.cjs.js +2 -0
  262. package/dist/nile-wysiwyg-editor/ui/source-view.cjs.js.map +1 -0
  263. package/dist/nile-wysiwyg-editor/ui/source-view.esm.js +79 -0
  264. package/dist/nile-wysiwyg-editor/ui/special-chars.cjs.js +2 -0
  265. package/dist/nile-wysiwyg-editor/ui/special-chars.cjs.js.map +1 -0
  266. package/dist/nile-wysiwyg-editor/ui/special-chars.esm.js +96 -0
  267. package/dist/nile-wysiwyg-editor/ui/suggest-list.cjs.js +2 -0
  268. package/dist/nile-wysiwyg-editor/ui/suggest-list.cjs.js.map +1 -0
  269. package/dist/nile-wysiwyg-editor/ui/suggest-list.esm.js +67 -0
  270. package/dist/nile-wysiwyg-editor/ui/table-grid-picker.cjs.js +2 -0
  271. package/dist/nile-wysiwyg-editor/ui/table-grid-picker.cjs.js.map +1 -0
  272. package/dist/nile-wysiwyg-editor/ui/table-grid-picker.esm.js +100 -0
  273. package/dist/nile-wysiwyg-editor/ui/table-menu.cjs.js +2 -0
  274. package/dist/nile-wysiwyg-editor/ui/table-menu.cjs.js.map +1 -0
  275. package/dist/nile-wysiwyg-editor/ui/table-menu.esm.js +58 -0
  276. package/dist/src/index.d.ts +24 -0
  277. package/dist/src/index.js +19 -0
  278. package/dist/src/index.js.map +1 -1
  279. package/dist/src/internal/glyph.d.ts +6 -0
  280. package/dist/src/internal/glyph.js +13 -0
  281. package/dist/src/internal/glyph.js.map +1 -0
  282. package/dist/src/nile-chip/nile-chip.css.js +8 -1
  283. package/dist/src/nile-chip/nile-chip.css.js.map +1 -1
  284. package/dist/src/nile-code-editor/nile-code-editor.js +3 -3
  285. package/dist/src/nile-code-editor/nile-code-editor.js.map +1 -1
  286. package/dist/src/nile-hero/nile-hero.css.js +12 -12
  287. package/dist/src/nile-hero/nile-hero.css.js.map +1 -1
  288. package/dist/src/nile-hero/nile-hero.js +1 -1
  289. package/dist/src/nile-hero/nile-hero.js.map +1 -1
  290. package/dist/src/nile-hero-header/nile-hero-header.css.js +9 -9
  291. package/dist/src/nile-hero-header/nile-hero-header.css.js.map +1 -1
  292. package/dist/src/nile-hero-header/nile-hero-header.js +1 -1
  293. package/dist/src/nile-hero-header/nile-hero-header.js.map +1 -1
  294. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.css.js +70 -0
  295. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.css.js.map +1 -1
  296. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.d.ts +3 -0
  297. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.js +81 -3
  298. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.js.map +1 -1
  299. package/dist/src/nile-rich-text-editor/nile-rte-image.d.ts +87 -0
  300. package/dist/src/nile-rich-text-editor/nile-rte-image.js +1073 -0
  301. package/dist/src/nile-rich-text-editor/nile-rte-image.js.map +1 -0
  302. package/dist/src/nile-wysiwyg-editor/emoji.d.ts +5 -0
  303. package/dist/src/nile-wysiwyg-editor/emoji.js +138 -0
  304. package/dist/src/nile-wysiwyg-editor/emoji.js.map +1 -0
  305. package/dist/src/nile-wysiwyg-editor/engine/commands.d.ts +69 -0
  306. package/dist/src/nile-wysiwyg-editor/engine/commands.js +863 -0
  307. package/dist/src/nile-wysiwyg-editor/engine/commands.js.map +1 -0
  308. package/dist/src/nile-wysiwyg-editor/engine/create-state.d.ts +35 -0
  309. package/dist/src/nile-wysiwyg-editor/engine/create-state.js +67 -0
  310. package/dist/src/nile-wysiwyg-editor/engine/create-state.js.map +1 -0
  311. package/dist/src/nile-wysiwyg-editor/engine/export.d.ts +38 -0
  312. package/dist/src/nile-wysiwyg-editor/engine/export.js +208 -0
  313. package/dist/src/nile-wysiwyg-editor/engine/export.js.map +1 -0
  314. package/dist/src/nile-wysiwyg-editor/engine/export.test.d.ts +1 -0
  315. package/dist/src/nile-wysiwyg-editor/engine/export.test.js +96 -0
  316. package/dist/src/nile-wysiwyg-editor/engine/export.test.js.map +1 -0
  317. package/dist/src/nile-wysiwyg-editor/engine/index.d.ts +37 -0
  318. package/dist/src/nile-wysiwyg-editor/engine/index.js +29 -0
  319. package/dist/src/nile-wysiwyg-editor/engine/index.js.map +1 -0
  320. package/dist/src/nile-wysiwyg-editor/engine/inputrules.d.ts +12 -0
  321. package/dist/src/nile-wysiwyg-editor/engine/inputrules.js +144 -0
  322. package/dist/src/nile-wysiwyg-editor/engine/inputrules.js.map +1 -0
  323. package/dist/src/nile-wysiwyg-editor/engine/keymap.d.ts +15 -0
  324. package/dist/src/nile-wysiwyg-editor/engine/keymap.js +94 -0
  325. package/dist/src/nile-wysiwyg-editor/engine/keymap.js.map +1 -0
  326. package/dist/src/nile-wysiwyg-editor/engine/markdown-parse.d.ts +22 -0
  327. package/dist/src/nile-wysiwyg-editor/engine/markdown-parse.js +287 -0
  328. package/dist/src/nile-wysiwyg-editor/engine/markdown-parse.js.map +1 -0
  329. package/dist/src/nile-wysiwyg-editor/engine/markdown-parse.test.d.ts +1 -0
  330. package/dist/src/nile-wysiwyg-editor/engine/markdown-parse.test.js +106 -0
  331. package/dist/src/nile-wysiwyg-editor/engine/markdown-parse.test.js.map +1 -0
  332. package/dist/src/nile-wysiwyg-editor/engine/markdown.d.ts +10 -0
  333. package/dist/src/nile-wysiwyg-editor/engine/markdown.js +162 -0
  334. package/dist/src/nile-wysiwyg-editor/engine/markdown.js.map +1 -0
  335. package/dist/src/nile-wysiwyg-editor/engine/office-paste.d.ts +13 -0
  336. package/dist/src/nile-wysiwyg-editor/engine/office-paste.js +182 -0
  337. package/dist/src/nile-wysiwyg-editor/engine/office-paste.js.map +1 -0
  338. package/dist/src/nile-wysiwyg-editor/engine/plugins/code-highlight.d.ts +10 -0
  339. package/dist/src/nile-wysiwyg-editor/engine/plugins/code-highlight.js +165 -0
  340. package/dist/src/nile-wysiwyg-editor/engine/plugins/code-highlight.js.map +1 -0
  341. package/dist/src/nile-wysiwyg-editor/engine/plugins/embed-view.d.ts +17 -0
  342. package/dist/src/nile-wysiwyg-editor/engine/plugins/embed-view.js +69 -0
  343. package/dist/src/nile-wysiwyg-editor/engine/plugins/embed-view.js.map +1 -0
  344. package/dist/src/nile-wysiwyg-editor/engine/plugins/embeds.d.ts +17 -0
  345. package/dist/src/nile-wysiwyg-editor/engine/plugins/embeds.js +96 -0
  346. package/dist/src/nile-wysiwyg-editor/engine/plugins/embeds.js.map +1 -0
  347. package/dist/src/nile-wysiwyg-editor/engine/plugins/find-replace.d.ts +26 -0
  348. package/dist/src/nile-wysiwyg-editor/engine/plugins/find-replace.js +123 -0
  349. package/dist/src/nile-wysiwyg-editor/engine/plugins/find-replace.js.map +1 -0
  350. package/dist/src/nile-wysiwyg-editor/engine/plugins/format-painter.d.ts +28 -0
  351. package/dist/src/nile-wysiwyg-editor/engine/plugins/format-painter.js +72 -0
  352. package/dist/src/nile-wysiwyg-editor/engine/plugins/format-painter.js.map +1 -0
  353. package/dist/src/nile-wysiwyg-editor/engine/plugins/image-view.d.ts +41 -0
  354. package/dist/src/nile-wysiwyg-editor/engine/plugins/image-view.js +176 -0
  355. package/dist/src/nile-wysiwyg-editor/engine/plugins/image-view.js.map +1 -0
  356. package/dist/src/nile-wysiwyg-editor/engine/plugins/image.d.ts +15 -0
  357. package/dist/src/nile-wysiwyg-editor/engine/plugins/image.js +64 -0
  358. package/dist/src/nile-wysiwyg-editor/engine/plugins/image.js.map +1 -0
  359. package/dist/src/nile-wysiwyg-editor/engine/plugins/link.d.ts +11 -0
  360. package/dist/src/nile-wysiwyg-editor/engine/plugins/link.js +42 -0
  361. package/dist/src/nile-wysiwyg-editor/engine/plugins/link.js.map +1 -0
  362. package/dist/src/nile-wysiwyg-editor/engine/plugins/math-view.d.ts +18 -0
  363. package/dist/src/nile-wysiwyg-editor/engine/plugins/math-view.js +46 -0
  364. package/dist/src/nile-wysiwyg-editor/engine/plugins/math-view.js.map +1 -0
  365. package/dist/src/nile-wysiwyg-editor/engine/plugins/max-length.d.ts +7 -0
  366. package/dist/src/nile-wysiwyg-editor/engine/plugins/max-length.js +26 -0
  367. package/dist/src/nile-wysiwyg-editor/engine/plugins/max-length.js.map +1 -0
  368. package/dist/src/nile-wysiwyg-editor/engine/plugins/paste.d.ts +31 -0
  369. package/dist/src/nile-wysiwyg-editor/engine/plugins/paste.js +55 -0
  370. package/dist/src/nile-wysiwyg-editor/engine/plugins/paste.js.map +1 -0
  371. package/dist/src/nile-wysiwyg-editor/engine/plugins/placeholder.d.ts +7 -0
  372. package/dist/src/nile-wysiwyg-editor/engine/plugins/placeholder.js +25 -0
  373. package/dist/src/nile-wysiwyg-editor/engine/plugins/placeholder.js.map +1 -0
  374. package/dist/src/nile-wysiwyg-editor/engine/plugins/single-line.d.ts +10 -0
  375. package/dist/src/nile-wysiwyg-editor/engine/plugins/single-line.js +48 -0
  376. package/dist/src/nile-wysiwyg-editor/engine/plugins/single-line.js.map +1 -0
  377. package/dist/src/nile-wysiwyg-editor/engine/plugins/suggestions.d.ts +29 -0
  378. package/dist/src/nile-wysiwyg-editor/engine/plugins/suggestions.js +87 -0
  379. package/dist/src/nile-wysiwyg-editor/engine/plugins/suggestions.js.map +1 -0
  380. package/dist/src/nile-wysiwyg-editor/engine/plugins/tables.d.ts +8 -0
  381. package/dist/src/nile-wysiwyg-editor/engine/plugins/tables.js +11 -0
  382. package/dist/src/nile-wysiwyg-editor/engine/plugins/tables.js.map +1 -0
  383. package/dist/src/nile-wysiwyg-editor/engine/plugins/task-list.d.ts +16 -0
  384. package/dist/src/nile-wysiwyg-editor/engine/plugins/task-list.js +49 -0
  385. package/dist/src/nile-wysiwyg-editor/engine/plugins/task-list.js.map +1 -0
  386. package/dist/src/nile-wysiwyg-editor/engine/pm.test.d.ts +1 -0
  387. package/dist/src/nile-wysiwyg-editor/engine/pm.test.js +883 -0
  388. package/dist/src/nile-wysiwyg-editor/engine/pm.test.js.map +1 -0
  389. package/dist/src/nile-wysiwyg-editor/engine/productivity.test.d.ts +1 -0
  390. package/dist/src/nile-wysiwyg-editor/engine/productivity.test.js +129 -0
  391. package/dist/src/nile-wysiwyg-editor/engine/productivity.test.js.map +1 -0
  392. package/dist/src/nile-wysiwyg-editor/engine/sanitize.d.ts +13 -0
  393. package/dist/src/nile-wysiwyg-editor/engine/sanitize.js +155 -0
  394. package/dist/src/nile-wysiwyg-editor/engine/sanitize.js.map +1 -0
  395. package/dist/src/nile-wysiwyg-editor/engine/schema.d.ts +20 -0
  396. package/dist/src/nile-wysiwyg-editor/engine/schema.js +823 -0
  397. package/dist/src/nile-wysiwyg-editor/engine/schema.js.map +1 -0
  398. package/dist/src/nile-wysiwyg-editor/engine/selection-state.d.ts +70 -0
  399. package/dist/src/nile-wysiwyg-editor/engine/selection-state.js +138 -0
  400. package/dist/src/nile-wysiwyg-editor/engine/selection-state.js.map +1 -0
  401. package/dist/src/nile-wysiwyg-editor/engine/serializer.d.ts +18 -0
  402. package/dist/src/nile-wysiwyg-editor/engine/serializer.js +63 -0
  403. package/dist/src/nile-wysiwyg-editor/engine/serializer.js.map +1 -0
  404. package/dist/src/nile-wysiwyg-editor/index.d.ts +3 -0
  405. package/dist/src/nile-wysiwyg-editor/index.js +3 -0
  406. package/dist/src/nile-wysiwyg-editor/index.js.map +1 -0
  407. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.d.ts +1 -0
  408. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.js +782 -0
  409. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.js.map +1 -0
  410. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.d.ts +364 -0
  411. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.js +2038 -0
  412. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.js.map +1 -0
  413. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.test.d.ts +1 -0
  414. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.test.js +636 -0
  415. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.test.js.map +1 -0
  416. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.d.ts +1 -0
  417. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.js +2 -0
  418. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.js.map +1 -0
  419. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.d.ts +6 -0
  420. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.js +251 -0
  421. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.js.map +1 -0
  422. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.d.ts +41 -0
  423. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.js +700 -0
  424. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.js.map +1 -0
  425. package/dist/src/nile-wysiwyg-editor/types.d.ts +49 -0
  426. package/dist/src/nile-wysiwyg-editor/types.js +8 -0
  427. package/dist/src/nile-wysiwyg-editor/types.js.map +1 -0
  428. package/dist/src/nile-wysiwyg-editor/ui/bookmark-panel.d.ts +20 -0
  429. package/dist/src/nile-wysiwyg-editor/ui/bookmark-panel.js +159 -0
  430. package/dist/src/nile-wysiwyg-editor/ui/bookmark-panel.js.map +1 -0
  431. package/dist/src/nile-wysiwyg-editor/ui/bubble-menu.d.ts +21 -0
  432. package/dist/src/nile-wysiwyg-editor/ui/bubble-menu.js +125 -0
  433. package/dist/src/nile-wysiwyg-editor/ui/bubble-menu.js.map +1 -0
  434. package/dist/src/nile-wysiwyg-editor/ui/code-block-menu.d.ts +18 -0
  435. package/dist/src/nile-wysiwyg-editor/ui/code-block-menu.js +107 -0
  436. package/dist/src/nile-wysiwyg-editor/ui/code-block-menu.js.map +1 -0
  437. package/dist/src/nile-wysiwyg-editor/ui/embed-menu.d.ts +19 -0
  438. package/dist/src/nile-wysiwyg-editor/ui/embed-menu.js +123 -0
  439. package/dist/src/nile-wysiwyg-editor/ui/embed-menu.js.map +1 -0
  440. package/dist/src/nile-wysiwyg-editor/ui/embed-panel.d.ts +27 -0
  441. package/dist/src/nile-wysiwyg-editor/ui/embed-panel.js +146 -0
  442. package/dist/src/nile-wysiwyg-editor/ui/embed-panel.js.map +1 -0
  443. package/dist/src/nile-wysiwyg-editor/ui/emoji-picker.d.ts +21 -0
  444. package/dist/src/nile-wysiwyg-editor/ui/emoji-picker.js +154 -0
  445. package/dist/src/nile-wysiwyg-editor/ui/emoji-picker.js.map +1 -0
  446. package/dist/src/nile-wysiwyg-editor/ui/find-replace.d.ts +26 -0
  447. package/dist/src/nile-wysiwyg-editor/ui/find-replace.js +178 -0
  448. package/dist/src/nile-wysiwyg-editor/ui/find-replace.js.map +1 -0
  449. package/dist/src/nile-wysiwyg-editor/ui/image-menu.d.ts +18 -0
  450. package/dist/src/nile-wysiwyg-editor/ui/image-menu.js +129 -0
  451. package/dist/src/nile-wysiwyg-editor/ui/image-menu.js.map +1 -0
  452. package/dist/src/nile-wysiwyg-editor/ui/image-panel.d.ts +56 -0
  453. package/dist/src/nile-wysiwyg-editor/ui/image-panel.js +349 -0
  454. package/dist/src/nile-wysiwyg-editor/ui/image-panel.js.map +1 -0
  455. package/dist/src/nile-wysiwyg-editor/ui/insert-menu.d.ts +25 -0
  456. package/dist/src/nile-wysiwyg-editor/ui/insert-menu.js +142 -0
  457. package/dist/src/nile-wysiwyg-editor/ui/insert-menu.js.map +1 -0
  458. package/dist/src/nile-wysiwyg-editor/ui/link-editor.d.ts +30 -0
  459. package/dist/src/nile-wysiwyg-editor/ui/link-editor.js +189 -0
  460. package/dist/src/nile-wysiwyg-editor/ui/link-editor.js.map +1 -0
  461. package/dist/src/nile-wysiwyg-editor/ui/markdown-panel.d.ts +24 -0
  462. package/dist/src/nile-wysiwyg-editor/ui/markdown-panel.js +144 -0
  463. package/dist/src/nile-wysiwyg-editor/ui/markdown-panel.js.map +1 -0
  464. package/dist/src/nile-wysiwyg-editor/ui/math-panel.d.ts +31 -0
  465. package/dist/src/nile-wysiwyg-editor/ui/math-panel.js +172 -0
  466. package/dist/src/nile-wysiwyg-editor/ui/math-panel.js.map +1 -0
  467. package/dist/src/nile-wysiwyg-editor/ui/shortcut-help.d.ts +30 -0
  468. package/dist/src/nile-wysiwyg-editor/ui/shortcut-help.js +296 -0
  469. package/dist/src/nile-wysiwyg-editor/ui/shortcut-help.js.map +1 -0
  470. package/dist/src/nile-wysiwyg-editor/ui/source-view.d.ts +19 -0
  471. package/dist/src/nile-wysiwyg-editor/ui/source-view.js +120 -0
  472. package/dist/src/nile-wysiwyg-editor/ui/source-view.js.map +1 -0
  473. package/dist/src/nile-wysiwyg-editor/ui/special-chars.d.ts +20 -0
  474. package/dist/src/nile-wysiwyg-editor/ui/special-chars.js +199 -0
  475. package/dist/src/nile-wysiwyg-editor/ui/special-chars.js.map +1 -0
  476. package/dist/src/nile-wysiwyg-editor/ui/suggest-list.d.ts +31 -0
  477. package/dist/src/nile-wysiwyg-editor/ui/suggest-list.js +133 -0
  478. package/dist/src/nile-wysiwyg-editor/ui/suggest-list.js.map +1 -0
  479. package/dist/src/nile-wysiwyg-editor/ui/table-grid-picker.d.ts +23 -0
  480. package/dist/src/nile-wysiwyg-editor/ui/table-grid-picker.js +177 -0
  481. package/dist/src/nile-wysiwyg-editor/ui/table-grid-picker.js.map +1 -0
  482. package/dist/src/nile-wysiwyg-editor/ui/table-menu.d.ts +16 -0
  483. package/dist/src/nile-wysiwyg-editor/ui/table-menu.js +101 -0
  484. package/dist/src/nile-wysiwyg-editor/ui/table-menu.js.map +1 -0
  485. package/dist/src/version.js +1 -1
  486. package/dist/src/version.js.map +1 -1
  487. package/dist/tsconfig.tsbuildinfo +1 -1
  488. package/package.json +18 -2
  489. package/src/index.ts +57 -1
  490. package/src/internal/glyph.ts +13 -0
  491. package/src/nile-chip/nile-chip.css.ts +8 -1
  492. package/src/nile-code-editor/nile-code-editor.ts +3 -3
  493. package/src/nile-hero/nile-hero.css.ts +12 -12
  494. package/src/nile-hero/nile-hero.ts +1 -1
  495. package/src/nile-hero-header/nile-hero-header.css.ts +9 -9
  496. package/src/nile-hero-header/nile-hero-header.ts +1 -1
  497. package/src/nile-rich-text-editor/nile-rich-text-editor.css.ts +70 -0
  498. package/src/nile-rich-text-editor/nile-rich-text-editor.ts +89 -3
  499. package/src/nile-rich-text-editor/nile-rte-image.ts +1132 -0
  500. package/src/nile-wysiwyg-editor/emoji.ts +137 -0
  501. package/src/nile-wysiwyg-editor/engine/commands.ts +1035 -0
  502. package/src/nile-wysiwyg-editor/engine/create-state.ts +117 -0
  503. package/src/nile-wysiwyg-editor/engine/export.test.ts +113 -0
  504. package/src/nile-wysiwyg-editor/engine/export.ts +242 -0
  505. package/src/nile-wysiwyg-editor/engine/index.ts +69 -0
  506. package/src/nile-wysiwyg-editor/engine/inputrules.ts +169 -0
  507. package/src/nile-wysiwyg-editor/engine/keymap.ts +146 -0
  508. package/src/nile-wysiwyg-editor/engine/markdown-parse.test.ts +148 -0
  509. package/src/nile-wysiwyg-editor/engine/markdown-parse.ts +337 -0
  510. package/src/nile-wysiwyg-editor/engine/markdown.ts +165 -0
  511. package/src/nile-wysiwyg-editor/engine/office-paste.ts +199 -0
  512. package/src/nile-wysiwyg-editor/engine/plugins/code-highlight.ts +173 -0
  513. package/src/nile-wysiwyg-editor/engine/plugins/embed-view.ts +85 -0
  514. package/src/nile-wysiwyg-editor/engine/plugins/embeds.ts +99 -0
  515. package/src/nile-wysiwyg-editor/engine/plugins/find-replace.ts +155 -0
  516. package/src/nile-wysiwyg-editor/engine/plugins/format-painter.ts +80 -0
  517. package/src/nile-wysiwyg-editor/engine/plugins/image-view.ts +220 -0
  518. package/src/nile-wysiwyg-editor/engine/plugins/image.ts +80 -0
  519. package/src/nile-wysiwyg-editor/engine/plugins/link.ts +42 -0
  520. package/src/nile-wysiwyg-editor/engine/plugins/math-view.ts +56 -0
  521. package/src/nile-wysiwyg-editor/engine/plugins/max-length.ts +24 -0
  522. package/src/nile-wysiwyg-editor/engine/plugins/paste.ts +74 -0
  523. package/src/nile-wysiwyg-editor/engine/plugins/placeholder.ts +24 -0
  524. package/src/nile-wysiwyg-editor/engine/plugins/single-line.ts +47 -0
  525. package/src/nile-wysiwyg-editor/engine/plugins/suggestions.ts +110 -0
  526. package/src/nile-wysiwyg-editor/engine/plugins/tables.ts +12 -0
  527. package/src/nile-wysiwyg-editor/engine/plugins/task-list.ts +65 -0
  528. package/src/nile-wysiwyg-editor/engine/pm.test.ts +1088 -0
  529. package/src/nile-wysiwyg-editor/engine/productivity.test.ts +163 -0
  530. package/src/nile-wysiwyg-editor/engine/sanitize.ts +156 -0
  531. package/src/nile-wysiwyg-editor/engine/schema.ts +859 -0
  532. package/src/nile-wysiwyg-editor/engine/selection-state.ts +210 -0
  533. package/src/nile-wysiwyg-editor/engine/serializer.ts +78 -0
  534. package/src/nile-wysiwyg-editor/index.ts +3 -0
  535. package/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.ts +782 -0
  536. package/src/nile-wysiwyg-editor/nile-wysiwyg-editor.test.ts +750 -0
  537. package/src/nile-wysiwyg-editor/nile-wysiwyg-editor.ts +2155 -0
  538. package/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.ts +1 -0
  539. package/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.ts +251 -0
  540. package/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.ts +772 -0
  541. package/src/nile-wysiwyg-editor/types.ts +83 -0
  542. package/src/nile-wysiwyg-editor/ui/bookmark-panel.ts +155 -0
  543. package/src/nile-wysiwyg-editor/ui/bubble-menu.ts +135 -0
  544. package/src/nile-wysiwyg-editor/ui/code-block-menu.ts +105 -0
  545. package/src/nile-wysiwyg-editor/ui/embed-menu.ts +133 -0
  546. package/src/nile-wysiwyg-editor/ui/embed-panel.ts +143 -0
  547. package/src/nile-wysiwyg-editor/ui/emoji-picker.ts +152 -0
  548. package/src/nile-wysiwyg-editor/ui/find-replace.ts +174 -0
  549. package/src/nile-wysiwyg-editor/ui/image-menu.ts +140 -0
  550. package/src/nile-wysiwyg-editor/ui/image-panel.ts +337 -0
  551. package/src/nile-wysiwyg-editor/ui/insert-menu.ts +142 -0
  552. package/src/nile-wysiwyg-editor/ui/link-editor.ts +180 -0
  553. package/src/nile-wysiwyg-editor/ui/markdown-panel.ts +143 -0
  554. package/src/nile-wysiwyg-editor/ui/math-panel.ts +169 -0
  555. package/src/nile-wysiwyg-editor/ui/shortcut-help.ts +311 -0
  556. package/src/nile-wysiwyg-editor/ui/source-view.ts +119 -0
  557. package/src/nile-wysiwyg-editor/ui/special-chars.ts +209 -0
  558. package/src/nile-wysiwyg-editor/ui/suggest-list.ts +138 -0
  559. package/src/nile-wysiwyg-editor/ui/table-grid-picker.ts +173 -0
  560. package/src/nile-wysiwyg-editor/ui/table-menu.ts +109 -0
  561. package/vscode-html-custom-data.json +491 -1
  562. package/web-dev-server.config.mjs +6 -2
  563. package/dist/index-5fef1a0d.esm.js +0 -1
  564. package/dist/index-8f38fae3.cjs.js +0 -2
  565. package/dist/index-8f38fae3.cjs.js.map +0 -1
@@ -0,0 +1,244 @@
1
+ import{css as o}from"lit";const r=o`
2
+ :host {
3
+ display: block;
4
+ font-family: var(
5
+ --nile-font-family-sans-serif,
6
+ var(--ng-font-family-body, system-ui, -apple-system, sans-serif)
7
+ );
8
+ }
9
+
10
+ .toolbar {
11
+ display: flex;
12
+ flex-wrap: wrap;
13
+ align-items: center;
14
+ gap: 6px;
15
+ padding: 8px;
16
+ border-bottom: 1px solid
17
+ var(--nile-colors-neutral-400, var(--ng-colors-border-neutral, #d0d5dd));
18
+ background: var(--nile-colors-white-base, var(--ng-colors-bg-primary, #ffffff));
19
+ border-radius: 8px 8px 0 0;
20
+ box-sizing: border-box;
21
+ }
22
+
23
+ .toolbar__divider {
24
+ width: 1px;
25
+ height: 24px;
26
+ margin: 0 4px;
27
+ background: var(--nile-colors-neutral-400, var(--ng-colors-border-neutral, #d0d5dd));
28
+ }
29
+
30
+ button.toolbar__button {
31
+ display: inline-flex;
32
+ align-items: center;
33
+ justify-content: center;
34
+ width: 32px;
35
+ height: 32px;
36
+ padding: 0 6px;
37
+ box-sizing: border-box;
38
+ border: none;
39
+ background: transparent;
40
+ border-radius: var(--nile-radius-radius-lg, var(--ng-radius-md, 8px));
41
+ cursor: pointer;
42
+ color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900, #101828));
43
+ font-family: inherit;
44
+ font-size: 14px;
45
+ font-weight: 600;
46
+ }
47
+
48
+ button.toolbar__button:hover:not(:disabled) {
49
+ background: var(--nile-colors-neutral-100, var(--ng-colors-bg-secondary, #f2f4f7));
50
+ }
51
+
52
+ button.toolbar__button[data-active] {
53
+ background: var(--nile-colors-primary-50, var(--ng-componentcolors-utility-blue-50, #eff4ff));
54
+ }
55
+
56
+ button.toolbar__button:disabled {
57
+ opacity: 0.4;
58
+ cursor: not-allowed;
59
+ }
60
+
61
+ /* --- Dropdown selects (heading / font / size), nile-rte-select style --- */
62
+ .toolbar__dropdown {
63
+ position: relative;
64
+ display: inline-flex;
65
+ }
66
+
67
+ button.toolbar__dd-trigger {
68
+ display: inline-flex;
69
+ align-items: center;
70
+ gap: 4px;
71
+ min-width: 32px;
72
+ height: 32px;
73
+ padding: 0 6px 0 10px;
74
+ box-sizing: border-box;
75
+ border: none;
76
+ background: transparent;
77
+ border-radius: var(--nile-radius-radius-lg, var(--ng-radius-md, 8px));
78
+ cursor: pointer;
79
+ color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900, #101828));
80
+ font-family: inherit;
81
+ font-size: 13px;
82
+ white-space: nowrap;
83
+ }
84
+
85
+ button.toolbar__dd-trigger:hover:not(:disabled) {
86
+ background: var(--nile-colors-neutral-100, var(--ng-colors-bg-secondary, #f2f4f7));
87
+ }
88
+
89
+ button.toolbar__dd-trigger:disabled {
90
+ opacity: 0.4;
91
+ cursor: not-allowed;
92
+ }
93
+
94
+ .toolbar__dd-menu {
95
+ position: absolute;
96
+ top: calc(100% + 4px);
97
+ left: 0;
98
+ z-index: 30;
99
+ min-width: 140px;
100
+ max-height: 260px;
101
+ overflow-y: auto;
102
+ padding: 4px;
103
+ background: var(--nile-colors-white-base, var(--ng-colors-bg-primary, #ffffff));
104
+ border: 1px solid
105
+ var(--nile-colors-neutral-300, var(--ng-colors-border-secondary, #e4e7ec));
106
+ border-radius: 8px;
107
+ box-shadow: 0 4px 12px rgba(16, 24, 40, 0.12);
108
+ box-sizing: border-box;
109
+ }
110
+
111
+ .toolbar__dd-item {
112
+ display: flex;
113
+ align-items: center;
114
+ padding: 6px 10px;
115
+ border-radius: 6px;
116
+ cursor: pointer;
117
+ font-size: 13px;
118
+ color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900, #101828));
119
+ white-space: nowrap;
120
+ }
121
+
122
+ .toolbar__dd-item:hover {
123
+ background: var(--nile-colors-neutral-100, var(--ng-colors-bg-secondary, #f2f4f7));
124
+ }
125
+
126
+ .toolbar__dd-item[data-active] {
127
+ background: var(
128
+ --nile-colors-primary-50,
129
+ var(--ng-componentcolors-utility-blue-50, #eff4ff)
130
+ );
131
+ color: var(--nile-colors-primary-700, #1d4ed8);
132
+ }
133
+
134
+ /* --- Color pickers, nile-rte-color style --- */
135
+ .toolbar__color {
136
+ position: relative;
137
+ display: inline-flex;
138
+ }
139
+
140
+ .toolbar__color .glyph-stack {
141
+ display: grid;
142
+ align-items: center;
143
+ justify-items: center;
144
+ line-height: 1;
145
+ pointer-events: none;
146
+ }
147
+
148
+ .toolbar__color .glyph {
149
+ font-size: 14px;
150
+ margin-bottom: 2px;
151
+ font-weight: 400;
152
+ }
153
+
154
+ .toolbar__color .underline {
155
+ width: 18px;
156
+ height: 3px;
157
+ border-radius: 2px;
158
+ }
159
+
160
+ .toolbar__color .swatch-box {
161
+ width: 18px;
162
+ height: 16px;
163
+ border-radius: 4px;
164
+ border: 1px solid rgba(0, 0, 0, 0.35);
165
+ pointer-events: none;
166
+ box-sizing: border-box;
167
+ }
168
+
169
+ .toolbar__swatch-panel {
170
+ position: absolute;
171
+ top: calc(100% + 6px);
172
+ left: 0;
173
+ z-index: 30;
174
+ width: 235px;
175
+ padding: 12px;
176
+ background: var(--nile-colors-white-base, #ffffff);
177
+ border: 1px solid
178
+ var(--nile-colors-neutral-300, var(--ng-colors-border-secondary, #e4e7ec));
179
+ border-radius: 8px;
180
+ box-shadow: 0 4px 12px rgba(16, 24, 40, 0.12);
181
+ box-sizing: border-box;
182
+ }
183
+
184
+ .toolbar__swatch-panel .title {
185
+ font-size: 13px;
186
+ font-weight: 600;
187
+ margin-bottom: 8px;
188
+ color: var(--nile-colors-dark-900, #111);
189
+ }
190
+
191
+ .toolbar__swatch-panel .section {
192
+ margin-bottom: 12px;
193
+ }
194
+
195
+ .toolbar__swatch-panel .section:last-child {
196
+ margin-bottom: 0;
197
+ }
198
+
199
+ .toolbar__swatch-panel .swatches {
200
+ display: grid;
201
+ grid-template-columns: repeat(auto-fill, 24px);
202
+ gap: 8px;
203
+ }
204
+
205
+ .toolbar__swatch-panel .swatch {
206
+ width: 24px;
207
+ height: 24px;
208
+ border-radius: 50%;
209
+ border: 1px solid rgba(0, 0, 0, 0.25);
210
+ cursor: pointer;
211
+ position: relative;
212
+ padding: 0;
213
+ background-clip: content-box;
214
+ }
215
+
216
+ .toolbar__swatch-panel .swatch .checkmark {
217
+ position: absolute;
218
+ top: 50%;
219
+ left: 50%;
220
+ transform: translate(-50%, -50%);
221
+ font-size: 13px;
222
+ color: white;
223
+ text-shadow: 0 0 2px rgba(0, 0, 0, 0.6);
224
+ }
225
+
226
+ .toolbar__swatch-panel .swatch.add {
227
+ display: flex;
228
+ align-items: center;
229
+ justify-content: center;
230
+ font-weight: bold;
231
+ font-size: 16px;
232
+ background: #fff;
233
+ }
234
+
235
+ .toolbar__color input[type='color'] {
236
+ position: absolute;
237
+ opacity: 0;
238
+ pointer-events: none;
239
+ width: 0;
240
+ height: 0;
241
+ border: 0;
242
+ padding: 0;
243
+ }
244
+ `;export{r as s};
@@ -0,0 +1,137 @@
1
+ import{__decorate as e}from"tslib";import{html as t,nothing as l}from"lit";import{property as a,state as n,customElement as i}from"lit/decorators.js";import{N as o}from"../../internal/nile-element.esm.js";import{r as s}from"../../internal/glyph.esm.js";import{s as c}from"./nile-wysiwyg-toolbar.css.esm.js";import{D as r}from"../types.esm.js";import"../ui/table-grid-picker.esm.js";import"../../internal/accessibility/a11y.state.enum.esm.js";import"../../internal/accessibility/a11y.property.enum.esm.js";import"../../internal/accessibility/role.enum.esm.js";const d=["#000000","#444444","#666666","#999999","#cccccc","#eeeeee","#ffffff","#d32f2f","#f44336","#ff9800","#ffeb3b","#4caf50","#2196f3","#3f51b5","#9c27b0","#03a9f4","#00bcd4","#009688","#8bc34a","#cddc39","#ffc107","#ff5722"],b={undo:{kind:"button",command:"undo",label:"Undo (Ctrl+Z)",icon:"undo",disabled:e=>!e.canUndo},redo:{kind:"button",command:"redo",label:"Redo (Ctrl+Y)",icon:"redo",disabled:e=>!e.canRedo},findReplace:{kind:"button",command:"openFind",label:"Find & replace (Ctrl+F)",icon:"ng-text-search"},bold:{kind:"button",command:"bold",label:"Bold (Ctrl+B)",icon:"format_bold",active:e=>e.bold},italic:{kind:"button",command:"italic",label:"Italic (Ctrl+I)",icon:"format_italic",active:e=>e.italic},underline:{kind:"button",command:"underline",label:"Underline (Ctrl+U)",icon:"format_underline",active:e=>e.underline},strike:{kind:"button",command:"strike",label:"Strikethrough",icon:"ng-strikethrough",active:e=>e.strike},subscript:{kind:"button",command:"subscript",label:"Subscript (Ctrl+,)",icon:"ng-subscript",active:e=>e.subscript},superscript:{kind:"button",command:"superscript",label:"Superscript (Ctrl+.)",icon:"ng-superscript",active:e=>e.superscript},code:{kind:"button",command:"code",label:"Inline code",text:"</>",active:e=>e.code},alignLeft:{kind:"button",command:"align",attrs:{align:"left"},label:"Align left",icon:"format_align_left",active:e=>"left"===e.align},alignCenter:{kind:"button",command:"align",attrs:{align:"center"},label:"Align center",icon:"format_align_middle",active:e=>"center"===e.align},alignRight:{kind:"button",command:"align",attrs:{align:"right"},label:"Align right",icon:"format_align_right",active:e=>"right"===e.align},alignJustify:{kind:"button",command:"align",attrs:{align:"justify"},label:"Justify",icon:"format_align_justify",active:e=>"justify"===e.align},bulletList:{kind:"button",command:"bulletList",label:"Bulleted list",icon:"format_list_bulleted",active:e=>e.inBulletList},orderedList:{kind:"button",command:"orderedList",label:"Numbered list",icon:"format_list_numbered",active:e=>e.inOrderedList},taskList:{kind:"button",command:"taskList",label:"Checklist",icon:"ng-list-checks",active:e=>e.inTaskList},indent:{kind:"button",command:"indent",label:"Increase indent (Ctrl+])",icon:"ng-list-indent-increase",disabled:e=>e.inCodeBlock},outdent:{kind:"button",command:"outdent",label:"Decrease indent (Ctrl+[)",icon:"ng-list-indent-decrease",disabled:e=>!(e.inBulletList||e.inOrderedList||e.inTaskList||e.inBlockquote||0!==e.blockIndent)},listStyle:{kind:"select",label:"List style",options:e=>e?.inOrderedList?[{value:"",label:"1, 2, 3"},{value:"lower-alpha",label:"a, b, c"},{value:"upper-alpha",label:"A, B, C"},{value:"lower-roman",label:"i, ii, iii"},{value:"upper-roman",label:"I, II, III"},{value:"multilevel",label:"1.1, 1.1.1"}]:[{value:"",label:"• Disc"},{value:"circle",label:"○ Circle"},{value:"square",label:"▪ Square"}],value:e=>e.listStyle??"",command:e=>({name:"setListStyle",attrs:{style:e||null}}),disabled:e=>!e.inBulletList&&!e.inOrderedList},blockquote:{kind:"button",command:"blockquote",label:"Blockquote",text:"❝",active:e=>e.inBlockquote},link:{kind:"button",command:"openLink",label:"Link (Ctrl+K)",icon:"link_2",active:e=>e.linkActive},bookmark:{kind:"button",command:"openBookmark",label:"Insert bookmark (in-text anchor)",icon:"ng-bookmark"},horizontalRule:{kind:"button",command:"horizontalRule",label:"Horizontal rule",icon:"minus"},specialChars:{kind:"button",command:"openSpecialChars",label:"Special characters",text:"Ω"},emoji:{kind:"button",command:"openEmoji",label:"Emoji",icon:"ng-smile"},codeBlock:{kind:"button",command:"codeBlock",label:"Code block (Ctrl+Alt+C)",icon:"ng-code",active:e=>e.inCodeBlock},image:{kind:"button",command:"openImage",label:"Insert image",icon:"image_2"},embed:{kind:"button",command:"openEmbed",label:"Embed video (YouTube, Vimeo, Loom)",icon:"ng-video"},sourceView:{kind:"button",command:"toggleSource",label:"HTML source",icon:"ng-code-xml"},showBlocks:{kind:"button",command:"toggleShowBlocks",label:"Show blocks",icon:"ng-square-pilcrow",active:e=>!!e.showBlocks},clearFormatting:{kind:"button",command:"clearFormatting",label:"Clear formatting",icon:"format_clear"},pastePlainText:{kind:"button",command:"togglePastePlainText",label:"Paste as plain text",icon:"ng-clipboard-paste",active:e=>!!e.pasteAsPlainText},fullscreen:{kind:"button",command:"toggleFullscreen",label:"Fullscreen (Esc to exit)",icon:"ng-maximize-2",iconActive:"ng-minimize-2",active:e=>!!e.fullscreen},shortcutHelp:{kind:"button",command:"openShortcutHelp",label:"Keyboard shortcuts (Ctrl+/)",icon:"ng-keyboard"},exportPdf:{kind:"button",command:"exportPdf",label:"Export to PDF",icon:"ng-printer"},exportWord:{kind:"button",command:"exportWord",label:"Export to Word",icon:"ng-file-text"},exportInlineHtml:{kind:"button",command:"exportInlineHtml",label:"Export HTML with inline styles (email)",icon:"ng-file-code"},importMarkdown:{kind:"button",command:"openMarkdown",label:"Insert from Markdown",icon:"ng-clipboard-paste"},importWord:{kind:"button",command:"importWord",label:"Import from Word",icon:"ng-file-input"},formatPainter:{kind:"button",command:"toggleFormatPainter",label:"Format painter (copy formatting)",icon:"ng-paintbrush",active:e=>!!e.formatPainter},caseChange:{kind:"select",label:"Change case",options:[{value:"",label:"Case"},{value:"upper",label:"UPPERCASE"},{value:"lower",label:"lowercase"},{value:"title",label:"Title Case"},{value:"sentence",label:"Sentence case"}],value:()=>"",command:e=>({name:"changeCase",attrs:{textCase:e||"upper"}}),disabled:e=>e.selectionEmpty},mergeField:{kind:"button",command:"openMergeField",label:"Insert merge field",icon:"ng-braces"},template:{kind:"button",command:"openTemplate",label:"Insert template",icon:"ng-layout-template"},math:{kind:"button",command:"openMath",label:"Insert math (LaTeX)",icon:"ng-sigma"},heading:{kind:"select",label:"Paragraph style",options:[{value:"",label:"Paragraph"},{value:"1",label:"Heading 1"},{value:"2",label:"Heading 2"},{value:"3",label:"Heading 3"},{value:"4",label:"Heading 4"},{value:"5",label:"Heading 5"},{value:"6",label:"Heading 6"}],value:e=>e.headingLevel?String(e.headingLevel):"",command:e=>""===e?{name:"paragraph"}:{name:"heading",attrs:{level:Number(e)}}},fontFamily:{kind:"select",label:"Font family",options:[{value:"",label:"Font"},...["Arial","Georgia","Tahoma","Times New Roman","Trebuchet MS","Verdana","Courier New"].map((e=>({value:e,label:e})))],value:e=>e.fontFamily??"",command:e=>({name:"fontFamily",attrs:{family:e||null}})},fontSize:{kind:"select",label:"Font size",options:[{value:"",label:"Size"},...["10px","12px","14px","16px","18px","20px","24px","28px","32px","48px"].map((e=>({value:e,label:e.replace("px","")})))],value:e=>e.fontSize??"",command:e=>({name:"fontSize",attrs:{size:e||null}})},lineHeight:{kind:"select",label:"Line height",options:[{value:"",label:"Spacing"},{value:"1",label:"1"},{value:"1.15",label:"1.15"},{value:"1.5",label:"1.5"},{value:"2",label:"2"},{value:"2.5",label:"2.5"},{value:"3",label:"3"}],value:e=>e.lineHeight??"",command:e=>({name:"lineHeight",attrs:{lineHeight:e||null}}),disabled:e=>e.inCodeBlock},textColor:{kind:"color",label:"Text color",glyph:"A",command:"textColor",value:e=>e.textColor},bgColor:{kind:"color",label:"Highlight color",glyph:"✎",command:"bgColor",value:e=>e.bgColor}};let m=class extends o{constructor(){super(...arguments),this.config=r,this.disabled=!1,this.openMenu=null,this.recentColors={},this.handleOutsideClick=e=>{this.openMenu&&!e.composedPath().includes(this)&&(this.openMenu=null)}}static get styles(){return[c]}connectedCallback(){super.connectedCallback(),document.addEventListener("mousedown",this.handleOutsideClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this.handleOutsideClick)}toggleMenu(e){this.openMenu=this.openMenu===e?null:e}dispatchCommand(e,t){this.emit("wysiwyg-command",{name:e,attrs:t})}withTooltip(e,l){return t`
2
+ <nile-lite-tooltip content=${e} placement="bottom">${l}</nile-lite-tooltip>
3
+ `}renderButton(e){const l=this.toolbarState,a=!(!l||!e.active)&&e.active(l),n=this.disabled||!(!l||!e.disabled)&&e.disabled(l),i=a&&e.iconActive?e.iconActive:e.icon;return this.withTooltip(e.label,t`
4
+ <button
5
+ type="button"
6
+ class="toolbar__button"
7
+ part="button"
8
+ aria-label=${e.label}
9
+ aria-pressed=${a?"true":"false"}
10
+ ?data-active=${a}
11
+ ?disabled=${n}
12
+ @mousedown=${e=>e.preventDefault()}
13
+ @click=${()=>this.dispatchCommand(e.command,e.attrs)}
14
+ >
15
+ ${i?s(i,18):e.text}
16
+ </button>
17
+ `)}renderSelect(e,a){const n=this.toolbarState?a.value(this.toolbarState):"",i="function"==typeof a.options?a.options(this.toolbarState):a.options,o=i.find((e=>e.value===n))??i[0],s=this.disabled||!(!this.toolbarState||!a.disabled)&&a.disabled(this.toolbarState),c="fontFamily"===e;return t`
18
+ <span class="toolbar__dropdown" part="select">
19
+ ${this.withTooltip(a.label,t`
20
+ <button
21
+ type="button"
22
+ class="toolbar__dd-trigger"
23
+ aria-label=${a.label}
24
+ aria-expanded=${this.openMenu===e?"true":"false"}
25
+ ?disabled=${s}
26
+ style=${c&&n?`font-family: ${n}`:""}
27
+ @mousedown=${e=>e.preventDefault()}
28
+ @click=${()=>this.toggleMenu(e)}
29
+ >
30
+ ${o.label}
31
+ <nile-glyph name="arrowdown" size="16"></nile-glyph>
32
+ </button>
33
+ `)}
34
+ ${this.openMenu===e?t`
35
+ <div class="toolbar__dd-menu" @mousedown=${e=>e.preventDefault()}>
36
+ ${i.map((e=>t`
37
+ <div
38
+ class="toolbar__dd-item"
39
+ ?data-active=${e.value===n}
40
+ style=${c&&e.value?`font-family: ${e.value}`:""}
41
+ @click=${()=>{this.openMenu=null;const{name:t,attrs:l}=a.command(e.value);this.dispatchCommand(t,l)}}
42
+ >
43
+ ${e.label}
44
+ </div>
45
+ `))}
46
+ </div>
47
+ `:l}
48
+ </span>
49
+ `}setColor(e,t,l){this.openMenu=null;const a=this.recentColors[e]??[];this.recentColors={...this.recentColors,[e]:[l,...a.filter((e=>e!==l))].slice(0,8)},this.dispatchCommand(t.command,{color:l})}renderColor(e,a){const n=this.toolbarState?a.value(this.toolbarState):null,i=n??"#000000",o=this.recentColors[e]??[],s="bgColor"===a.command;return t`
50
+ <span class="toolbar__color" part="color">
51
+ ${this.withTooltip(a.label,t`
52
+ <button
53
+ type="button"
54
+ class="toolbar__button"
55
+ aria-label=${a.label}
56
+ aria-expanded=${this.openMenu===e?"true":"false"}
57
+ ?disabled=${this.disabled}
58
+ @mousedown=${e=>e.preventDefault()}
59
+ @click=${()=>this.toggleMenu(e)}
60
+ >
61
+ ${s?t`<span class="swatch-box" style="background: ${i}"></span>`:t`
62
+ <span class="glyph-stack">
63
+ <span class="glyph">A</span>
64
+ <span class="underline" style="background: ${i}"></span>
65
+ </span>
66
+ `}
67
+ </button>
68
+ `)}
69
+ ${this.openMenu===e?t`
70
+ <div class="toolbar__swatch-panel" @mousedown=${e=>e.preventDefault()}>
71
+ <div class="section">
72
+ <div class="title">Default</div>
73
+ <div class="swatches">
74
+ ${d.map((i=>t`
75
+ <button
76
+ type="button"
77
+ class="swatch"
78
+ style="background: ${i}"
79
+ title=${i}
80
+ @click=${()=>this.setColor(e,a,i)}
81
+ >
82
+ ${n===i?t`<span class="checkmark">✓</span>`:l}
83
+ </button>
84
+ `))}
85
+ </div>
86
+ </div>
87
+ ${o.length?t`
88
+ <div class="section">
89
+ <div class="title">Recently Used</div>
90
+ <div class="swatches">
91
+ ${o.map((l=>t`
92
+ <button
93
+ type="button"
94
+ class="swatch"
95
+ style="background: ${l}"
96
+ title=${l}
97
+ @click=${()=>this.setColor(e,a,l)}
98
+ ></button>
99
+ `))}
100
+ </div>
101
+ </div>
102
+ `:l}
103
+ <div class="section">
104
+ <div class="title">Custom</div>
105
+ <div class="swatches">
106
+ <button
107
+ type="button"
108
+ class="swatch add"
109
+ @click=${e=>{const t=e.currentTarget.closest(".toolbar__color").querySelector('input[type="color"]');t?.click()}}
110
+ >
111
+ +
112
+ </button>
113
+ </div>
114
+ </div>
115
+ </div>
116
+ `:l}
117
+ <input
118
+ type="color"
119
+ tabindex="-1"
120
+ aria-hidden="true"
121
+ .value=${i}
122
+ @input=${t=>this.setColor(e,a,t.target.value)}
123
+ />
124
+ </span>
125
+ `}renderItem(e){if("table"===e)return this.withTooltip("Insert table",t`
126
+ <nile-wysiwyg-table-picker
127
+ part="button"
128
+ ?disabled=${this.disabled}
129
+ ></nile-wysiwyg-table-picker>
130
+ `);const a=b[e];if(!a)return l;switch(a.kind){case"button":return this.renderButton(a);case"select":return this.renderSelect(e,a);case"color":return this.renderColor(e,a);default:return l}}render(){const e=this.config.split("|").map((e=>e.trim().split(/\s+/).filter(Boolean))).filter((e=>e.length>0));return t`
131
+ <div class="toolbar" part="toolbar" role="toolbar" aria-label="Text formatting">
132
+ ${e.map(((e,a)=>t`
133
+ ${a>0?t`<span class="toolbar__divider"></span>`:l}
134
+ ${e.map((e=>this.renderItem(e)))}
135
+ `))}
136
+ </div>
137
+ `}};e([a({type:String})],m.prototype,"config",void 0),e([a({type:Boolean,reflect:!0})],m.prototype,"disabled",void 0),e([a({attribute:!1})],m.prototype,"toolbarState",void 0),e([n()],m.prototype,"openMenu",void 0),e([n()],m.prototype,"recentColors",void 0),m=e([i("nile-wysiwyg-toolbar")],m);export{m as N};
@@ -0,0 +1,2 @@
1
+ System.register([],function(_export,_context){"use strict";var e;return{setters:[],execute:function execute(){_export("D",e="undo redo findReplace | heading | bold italic underline strike subscript superscript | fontFamily fontSize lineHeight | textColor bgColor | alignLeft alignCenter alignRight alignJustify | bulletList orderedList taskList listStyle indent outdent blockquote | link bookmark table image embed codeBlock math horizontalRule specialChars emoji | mergeField template | formatPainter caseChange clearFormatting pastePlainText showBlocks sourceView | importMarkdown importWord exportInlineHtml exportWord exportPdf | shortcutHelp fullscreen");}};});
2
+ //# sourceMappingURL=types.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.cjs.js","sources":["../../../src/nile-wysiwyg-editor/types.ts"],"sourcesContent":["import type { CommandAttrs, CommandName } from './engine/commands';\n\n/**\n * Toolbar configuration. The string form uses space-separated item names with\n * `|` as a group divider, e.g. `\"bold italic | heading | link\"`. `\"none\"`\n * hides the toolbar entirely.\n */\nexport type ToolbarConfig = string;\n\n/** Pseudo-commands handled by the host chrome rather than the registry. */\nexport type UiCommandName =\n | 'openLink'\n | 'openImage'\n | 'openEmbed'\n | 'openBookmark'\n | 'toggleSource'\n | 'togglePastePlainText'\n | 'toggleFullscreen'\n | 'toggleShowBlocks'\n | 'openShortcutHelp'\n | 'openSpecialChars'\n | 'openEmoji'\n | 'openFind'\n | 'exportPdf'\n | 'exportWord'\n | 'exportInlineHtml'\n | 'importWord'\n | 'toggleFormatPainter'\n | 'openMergeField'\n | 'openTemplate'\n | 'openMath'\n | 'openMarkdown';\n\n/** Detail payload of the internal `wysiwyg-command` event (toolbar → host). */\nexport interface WysiwygCommandDetail {\n name: CommandName | UiCommandName;\n attrs?: CommandAttrs;\n}\n\n/** Mention configuration: trigger character → items. Same shape as the\n * legacy nile-rich-text-editor. */\nexport type MentionsConfig = Record<string, { key: string; label: string }[]>;\n\n/** Reusable content snippet, offered through the \"/\" menu. */\nexport interface SnippetConfig {\n key: string;\n label: string;\n html: string;\n}\n\n/** A mail-merge / personalization placeholder offered in the merge-field picker. */\nexport interface MergeFieldConfig {\n /** Stable identifier substituted at render time (e.g. `first_name`). */\n id: string;\n /** Human-readable label shown in the chip and picker. */\n label: string;\n}\n\n/** A predefined content structure offered in the template picker. */\nexport interface TemplateConfig {\n label: string;\n /** Optional secondary line shown under the label in the picker. */\n description?: string;\n /** HTML inserted at the cursor when chosen. */\n html: string;\n}\n\n/** Detail payload of `nile-change` / `nile-input`. */\nexport interface WysiwygChangeDetail {\n value: string;\n json: Record<string, unknown>;\n /** Alias of `value` for drop-in parity with nile-rich-text-editor. */\n content: string;\n}\n\nexport const DEFAULT_TOOLBAR =\n 'undo redo findReplace | heading | bold italic underline strike subscript superscript | fontFamily fontSize lineHeight | ' +\n 'textColor bgColor | alignLeft alignCenter alignRight alignJustify | ' +\n 'bulletList orderedList taskList listStyle indent outdent blockquote | ' +\n 'link bookmark table image embed codeBlock math horizontalRule specialChars emoji | ' +\n 'mergeField template | ' +\n 'formatPainter caseChange clearFormatting pastePlainText showBlocks sourceView | ' +\n 'importMarkdown importWord exportInlineHtml exportWord exportPdf | shortcutHelp fullscreen';\n"],"names":["DEFAULT_TOOLBAR"],"mappings":"0HA2EaA,EACX"}
@@ -0,0 +1 @@
1
+ const e="undo redo findReplace | heading | bold italic underline strike subscript superscript | fontFamily fontSize lineHeight | textColor bgColor | alignLeft alignCenter alignRight alignJustify | bulletList orderedList taskList listStyle indent outdent blockquote | link bookmark table image embed codeBlock math horizontalRule specialChars emoji | mergeField template | formatPainter caseChange clearFormatting pastePlainText showBlocks sourceView | importMarkdown importWord exportInlineHtml exportWord exportPdf | shortcutHelp fullscreen";export{e as D};
@@ -0,0 +1,2 @@
1
+ function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","../../internal/nile-element.cjs.js","../../internal/accessibility/a11y.state.enum.cjs.js","../../internal/accessibility/a11y.property.enum.cjs.js","../../internal/accessibility/role.enum.cjs.js"],function(_export,_context){"use strict";var o,r,i,e,t,n,s,a,_templateObject,_templateObject2,_templateObject3,_templateObject4,l;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){o=_tslib.__decorate;},function(_lit){r=_lit.css;i=_lit.html;},function(_litDecoratorsJs){e=_litDecoratorsJs.property;t=_litDecoratorsJs.state;n=_litDecoratorsJs.query;s=_litDecoratorsJs.customElement;},function(_internalNileElementCjsJs){a=_internalNileElementCjsJs.N;},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){}],execute:function execute(){l=/*#__PURE__*/function(_a){function l(){var _this;_classCallCheck(this,l);_this=_callSuper(this,l,arguments),_this.open=!1,_this.error="";return _this;}_inherits(l,_a);return _createClass(l,[{key:"focusInput",value:function focusInput(){var _this2=this;this.error="",this.updateComplete.then(function(){var _this2$nameInput;_this2.nameInput&&(_this2.nameInput.value=""),(_this2$nameInput=_this2.nameInput)===null||_this2$nameInput===void 0?void 0:_this2$nameInput.focus();});}},{key:"handleSubmit",value:function handleSubmit(o){var _this$nameInput$value,_this$nameInput;o.preventDefault();var r=((_this$nameInput$value=(_this$nameInput=this.nameInput)===null||_this$nameInput===void 0?void 0:_this$nameInput.value)!==null&&_this$nameInput$value!==void 0?_this$nameInput$value:"").trim().replace(/\s+/g,"-");r?(this.error="",this.emit("wysiwyg-bookmark-apply",{id:r})):this.error="Enter a bookmark name.";}},{key:"render",value:function render(){var _this3=this;return i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <form\n class=\"bookmark-panel\"\n part=\"bookmark-panel\"\n @submit=","\n @keydown=","\n >\n <label>\n Bookmark name\n <input class=\"bookmark-panel__name\" type=\"text\" placeholder=\"section-intro\" />\n </label>\n ","\n <div class=\"actions\">\n <button type=\"button\" @click=",">\n Cancel\n </button>\n <button type=\"submit\" class=\"primary\">Insert</button>\n </div>\n </form>\n "])),this.handleSubmit,function(o){"Escape"===o.key&&(o.stopPropagation(),_this3.emit("wysiwyg-bookmark-cancel"));},this.error?i(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<div class=\"error\">","</div>"])),this.error):i(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<div class=\"hint\">An invisible anchor you can link to with #name</div>"]))),function(){return _this3.emit("wysiwyg-bookmark-cancel");});}}],[{key:"styles",get:function get(){return[r(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n :host {\n font-family: var(\n --nile-font-family-sans-serif,\n var(--ng-font-family-body, system-ui, -apple-system, sans-serif)\n );\n position: absolute;\n z-index: 20;\n display: none;\n }\n\n :host([open]) {\n display: block;\n }\n\n .bookmark-panel {\n display: flex;\n flex-direction: column;\n gap: 8px;\n min-width: 280px;\n padding: 12px;\n background: var(--nile-wysiwyg-popover-bg, #ffffff);\n border: 1px solid var(--nile-colors-neutral-400, #d0d5dd);\n border-radius: var(--nile-wysiwyg-radius, 8px);\n box-shadow: var(--nile-wysiwyg-popover-shadow, 0 4px 12px rgba(16, 24, 40, 0.12));\n font-size: 13px;\n }\n\n label {\n display: flex;\n flex-direction: column;\n gap: 4px;\n color: var(--nile-colors-neutral-700, #344054);\n }\n\n input {\n font: inherit;\n padding: 6px 8px;\n border: 1px solid var(--nile-colors-neutral-400, #d0d5dd);\n border-radius: 6px;\n outline: none;\n }\n\n input:focus {\n border-color: var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600, #2563eb));\n }\n\n .hint {\n font-size: 12px;\n color: var(--nile-colors-neutral-500, #98a2b3);\n }\n\n .error {\n font-size: 12px;\n color: var(--nile-colors-error-600, #d92d20);\n }\n\n .actions {\n display: flex;\n gap: 8px;\n justify-content: flex-end;\n }\n\n button {\n font: inherit;\n padding: 6px 12px;\n border-radius: 6px;\n border: 1px solid transparent;\n cursor: pointer;\n background: transparent;\n color: var(--nile-colors-neutral-700, #344054);\n }\n\n button.primary {\n background: var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600, #2563eb));\n color: #ffffff;\n }\n "])))];}}]);}(a);o([e({type:Boolean,reflect:!0})],l.prototype,"open",void 0),o([t()],l.prototype,"error",void 0),o([n(".bookmark-panel__name")],l.prototype,"nameInput",void 0),l=o([s("nile-wysiwyg-bookmark-panel")],l);}};});
2
+ //# sourceMappingURL=bookmark-panel.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bookmark-panel.cjs.js","sources":["../../../../src/nile-wysiwyg-editor/ui/bookmark-panel.ts"],"sourcesContent":["import { html, css, TemplateResult, CSSResultArray } from 'lit';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport NileElement from '../../internal/nile-element';\n\n/**\n * Floating bookmark-insert panel: name an in-text anchor. Emits\n * `wysiwyg-bookmark-apply` detail: { id } and `wysiwyg-bookmark-cancel`.\n */\n@customElement('nile-wysiwyg-bookmark-panel')\nexport class NileWysiwygBookmarkPanel extends NileElement {\n @property({ type: Boolean, reflect: true }) open = false;\n\n @state() private error = '';\n\n @query('.bookmark-panel__name') nameInput?: HTMLInputElement;\n\n public static get styles(): CSSResultArray {\n return [\n css`\n :host {\n font-family: var(\n --nile-font-family-sans-serif,\n var(--ng-font-family-body, system-ui, -apple-system, sans-serif)\n );\n position: absolute;\n z-index: 20;\n display: none;\n }\n\n :host([open]) {\n display: block;\n }\n\n .bookmark-panel {\n display: flex;\n flex-direction: column;\n gap: 8px;\n min-width: 280px;\n padding: 12px;\n background: var(--nile-wysiwyg-popover-bg, #ffffff);\n border: 1px solid var(--nile-colors-neutral-400, #d0d5dd);\n border-radius: var(--nile-wysiwyg-radius, 8px);\n box-shadow: var(--nile-wysiwyg-popover-shadow, 0 4px 12px rgba(16, 24, 40, 0.12));\n font-size: 13px;\n }\n\n label {\n display: flex;\n flex-direction: column;\n gap: 4px;\n color: var(--nile-colors-neutral-700, #344054);\n }\n\n input {\n font: inherit;\n padding: 6px 8px;\n border: 1px solid var(--nile-colors-neutral-400, #d0d5dd);\n border-radius: 6px;\n outline: none;\n }\n\n input:focus {\n border-color: var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600, #2563eb));\n }\n\n .hint {\n font-size: 12px;\n color: var(--nile-colors-neutral-500, #98a2b3);\n }\n\n .error {\n font-size: 12px;\n color: var(--nile-colors-error-600, #d92d20);\n }\n\n .actions {\n display: flex;\n gap: 8px;\n justify-content: flex-end;\n }\n\n button {\n font: inherit;\n padding: 6px 12px;\n border-radius: 6px;\n border: 1px solid transparent;\n cursor: pointer;\n background: transparent;\n color: var(--nile-colors-neutral-700, #344054);\n }\n\n button.primary {\n background: var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600, #2563eb));\n color: #ffffff;\n }\n `,\n ];\n }\n\n public focusInput(): void {\n this.error = '';\n this.updateComplete.then(() => {\n if (this.nameInput) this.nameInput.value = '';\n this.nameInput?.focus();\n });\n }\n\n private handleSubmit(event: Event): void {\n event.preventDefault();\n // Anchor ids can't contain whitespace; collapse runs to a single dash.\n const id = (this.nameInput?.value ?? '').trim().replace(/\\s+/g, '-');\n if (!id) {\n this.error = 'Enter a bookmark name.';\n return;\n }\n this.error = '';\n this.emit('wysiwyg-bookmark-apply', { id });\n }\n\n public render(): TemplateResult {\n return html`\n <form\n class=\"bookmark-panel\"\n part=\"bookmark-panel\"\n @submit=${this.handleSubmit}\n @keydown=${(e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n e.stopPropagation();\n this.emit('wysiwyg-bookmark-cancel');\n }\n }}\n >\n <label>\n Bookmark name\n <input class=\"bookmark-panel__name\" type=\"text\" placeholder=\"section-intro\" />\n </label>\n ${this.error\n ? html`<div class=\"error\">${this.error}</div>`\n : html`<div class=\"hint\">An invisible anchor you can link to with #name</div>`}\n <div class=\"actions\">\n <button type=\"button\" @click=${() => this.emit('wysiwyg-bookmark-cancel')}>\n Cancel\n </button>\n <button type=\"submit\" class=\"primary\">Insert</button>\n </div>\n </form>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-wysiwyg-bookmark-panel': NileWysiwygBookmarkPanel;\n }\n}\n"],"names":["NileWysiwygBookmarkPanel","l","constructor","this","open","error","_this","_inherits","_a","_createClass","key","value","focusInput","updateComplete","then","_this2$nameInput","nameInput","focus","handleSubmit","event","preventDefault","id","trim","replace","emit","render","_this3","html","_templateObject","_taggedTemplateLiteral","e","stopPropagation","_templateObject2","_templateObject3","get","css","_templateObject4","NileElement","__decorate","property","type","Boolean","reflect","prototype","state","query","customElement"],"mappings":"+8GASaA,CAAAA,uBAAAA,EAAAA,EAAN,SAAAC,EAAA,CAAAC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,qCACuCC,KAAAA,CAAIC,IAAG,CAAA,CAAA,CAAA,CAElCD,KAAAA,CAAKE,KAAAA,CAAG,EAwI1B,QAAAC,KAAA,EApIQC,SAAA,CAAAN,CAAA,CAAAO,EAAA,SAAAC,YAAA,CAAAR,CAAA,GAAAS,GAAA,cAAAC,KAAA,CAmFA,SAAAC,UAAAA,CAAAA,kBACLT,IAAKE,CAAAA,KAAAA,CAAQ,GACbF,IAAKU,CAAAA,cAAAA,CAAeC,IAAK,CAAA,UAAA,KAAAC,gBAAA,CACnBZ,MAAKa,CAAAA,SAAAA,GAAWb,OAAKa,SAAUL,CAAAA,KAAAA,CAAQ,EAC3CR,CAAAA,EAAAA,gBAAAA,CAAAA,MAAAA,CAAKa,SAAWC,UAAAA,gBAAAA,iBAAhBd,gBAAAA,CAAgBc,KAAAA,CAAAA,CAAO,GAE1B,EAEO,GAAAP,GAAA,gBAAAC,KAAA,UAAAO,YAAAA,CAAaC,CAAAA,CAAAA,KAAAA,qBAAAA,CAAAA,eAAAA,CACnBA,CAAMC,CAAAA,cAAAA,CAAAA,CAAAA,CAEN,GAAMC,CAAAA,CAAMlB,CAAAA,EAAAA,qBAAAA,EAAAA,eAAAA,CAAAA,IAAAA,CAAKa,SAAWL,UAAAA,eAAAA,iBAAhBR,eAAAA,CAAgBQ,KAAAA,UAAAA,qBAAAA,UAAAA,qBAAAA,CAAS,EAAIW,EAAAA,IAAAA,CAAAA,CAAAA,CAAOC,QAAQ,MAAQ,CAAA,GAAA,CAAA,CAC3DF,CAILlB,EAAAA,IAAAA,CAAKE,KAAQ,CAAA,EAAA,CACbF,KAAKqB,IAAK,CAAA,wBAAA,CAA0B,CAAEH,EAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAJpClB,IAAKE,CAAAA,KAAAA,CAAQ,wBAKhB,EAEM,GAAAK,GAAA,UAAAC,KAAA,UAAAc,MAAAA,CAAAA,CACL,KAAAC,MAAA,MAAA,MAAOC,CAAAA,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,whBAIG1B,IAAKe,CAAAA,YAAAA,CACHY,SAAAA,CAAAA,CAAAA,CACI,WAAVA,CAAEpB,CAAAA,GAAAA,GACJoB,EAAEC,eACF5B,CAAAA,CAAAA,CAAAA,MAAAA,CAAKqB,KAAK,yBACX,CAAA,CAAA,EAAA,CAODrB,IAAAA,CAAKE,KACHsB,CAAAA,CAAI,CAAAK,gBAAA,GAAAA,gBAAA,CAAAH,sBAAA,sCAAsB1B,IAAAA,CAAKE,OAC/BsB,CAAI,CAAAM,gBAAA,GAAAA,gBAAA,CAAAJ,sBAAA,gFAAA,CAEyB,iBAAM1B,CAAAA,OAAKqB,IAAK,CAAA,yBAAA,CAAA,IAOtD,CAAA,KAAAd,GAAA,UAAAwB,GAAA,CAnIM,SAAAA,IAAA,CACL,CAAA,MAAO,CACLC,CAAG,CAAAC,gBAAA,GAAAA,gBAAA,CAAAP,sBAAA,yoEA+EN,EAEM,MA1FqCQ,CAAAA,EACAC,CAAA,CAAA,CAA3CC,CAAS,CAAA,CAAEC,IAAMC,CAAAA,OAAAA,CAASC,OAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAqB1C,CAAA2C,CAAAA,SAAAA,CAAA,MAAA,CAAA,IAAA,EAAA,CAAA,CAExCL,EAAA,CAAhBM,CAAAA,CAAAA,CAAAA,CAAAA,CAA2B5C,CAAA2C,CAAAA,SAAAA,CAAA,OAAA,CAAA,IAAA,EAAA,CAAA,CAEIL,CAAA,CAAA,CAA/BO,EAAM,uBAAsD7C,CAAAA,CAAAA,CAAAA,CAAAA,CAAA2C,SAAA,CAAA,WAAA,CAAA,IAAA,EALlD3C,CAAAA,CAAAA,CAAAA,CAAwBsC,CAAA,CAAA,CADpCQ,EAAc,6BACF9C,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA"}
@@ -0,0 +1,97 @@
1
+ import{__decorate as o}from"tslib";import{css as r,html as i}from"lit";import{property as e,state as t,query as n,customElement as s}from"lit/decorators.js";import{N as a}from"../../internal/nile-element.esm.js";import"../../internal/accessibility/a11y.state.enum.esm.js";import"../../internal/accessibility/a11y.property.enum.esm.js";import"../../internal/accessibility/role.enum.esm.js";let l=class extends a{constructor(){super(...arguments),this.open=!1,this.error=""}static get styles(){return[r`
2
+ :host {
3
+ font-family: var(
4
+ --nile-font-family-sans-serif,
5
+ var(--ng-font-family-body, system-ui, -apple-system, sans-serif)
6
+ );
7
+ position: absolute;
8
+ z-index: 20;
9
+ display: none;
10
+ }
11
+
12
+ :host([open]) {
13
+ display: block;
14
+ }
15
+
16
+ .bookmark-panel {
17
+ display: flex;
18
+ flex-direction: column;
19
+ gap: 8px;
20
+ min-width: 280px;
21
+ padding: 12px;
22
+ background: var(--nile-wysiwyg-popover-bg, #ffffff);
23
+ border: 1px solid var(--nile-colors-neutral-400, #d0d5dd);
24
+ border-radius: var(--nile-wysiwyg-radius, 8px);
25
+ box-shadow: var(--nile-wysiwyg-popover-shadow, 0 4px 12px rgba(16, 24, 40, 0.12));
26
+ font-size: 13px;
27
+ }
28
+
29
+ label {
30
+ display: flex;
31
+ flex-direction: column;
32
+ gap: 4px;
33
+ color: var(--nile-colors-neutral-700, #344054);
34
+ }
35
+
36
+ input {
37
+ font: inherit;
38
+ padding: 6px 8px;
39
+ border: 1px solid var(--nile-colors-neutral-400, #d0d5dd);
40
+ border-radius: 6px;
41
+ outline: none;
42
+ }
43
+
44
+ input:focus {
45
+ border-color: var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600, #2563eb));
46
+ }
47
+
48
+ .hint {
49
+ font-size: 12px;
50
+ color: var(--nile-colors-neutral-500, #98a2b3);
51
+ }
52
+
53
+ .error {
54
+ font-size: 12px;
55
+ color: var(--nile-colors-error-600, #d92d20);
56
+ }
57
+
58
+ .actions {
59
+ display: flex;
60
+ gap: 8px;
61
+ justify-content: flex-end;
62
+ }
63
+
64
+ button {
65
+ font: inherit;
66
+ padding: 6px 12px;
67
+ border-radius: 6px;
68
+ border: 1px solid transparent;
69
+ cursor: pointer;
70
+ background: transparent;
71
+ color: var(--nile-colors-neutral-700, #344054);
72
+ }
73
+
74
+ button.primary {
75
+ background: var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600, #2563eb));
76
+ color: #ffffff;
77
+ }
78
+ `]}focusInput(){this.error="",this.updateComplete.then((()=>{this.nameInput&&(this.nameInput.value=""),this.nameInput?.focus()}))}handleSubmit(o){o.preventDefault();const r=(this.nameInput?.value??"").trim().replace(/\s+/g,"-");r?(this.error="",this.emit("wysiwyg-bookmark-apply",{id:r})):this.error="Enter a bookmark name."}render(){return i`
79
+ <form
80
+ class="bookmark-panel"
81
+ part="bookmark-panel"
82
+ @submit=${this.handleSubmit}
83
+ @keydown=${o=>{"Escape"===o.key&&(o.stopPropagation(),this.emit("wysiwyg-bookmark-cancel"))}}
84
+ >
85
+ <label>
86
+ Bookmark name
87
+ <input class="bookmark-panel__name" type="text" placeholder="section-intro" />
88
+ </label>
89
+ ${this.error?i`<div class="error">${this.error}</div>`:i`<div class="hint">An invisible anchor you can link to with #name</div>`}
90
+ <div class="actions">
91
+ <button type="button" @click=${()=>this.emit("wysiwyg-bookmark-cancel")}>
92
+ Cancel
93
+ </button>
94
+ <button type="submit" class="primary">Insert</button>
95
+ </div>
96
+ </form>
97
+ `}};o([e({type:Boolean,reflect:!0})],l.prototype,"open",void 0),o([t()],l.prototype,"error",void 0),o([n(".bookmark-panel__name")],l.prototype,"nameInput",void 0),l=o([s("nile-wysiwyg-bookmark-panel")],l);
@@ -0,0 +1,2 @@
1
+ function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","../../internal/nile-element.cjs.js","../../internal/glyph.cjs.js","../../internal/accessibility/a11y.state.enum.cjs.js","../../internal/accessibility/a11y.property.enum.cjs.js","../../internal/accessibility/role.enum.cjs.js"],function(_export,_context){"use strict";var e,i,t,o,r,n,a,_templateObject,_templateObject2,_templateObject3,l;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){e=_tslib.__decorate;},function(_lit){i=_lit.css;t=_lit.html;},function(_litDecoratorsJs){o=_litDecoratorsJs.property;r=_litDecoratorsJs.customElement;},function(_internalNileElementCjsJs){n=_internalNileElementCjsJs.N;},function(_internalGlyphCjsJs){a=_internalGlyphCjsJs.r;},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){}],execute:function execute(){l=/*#__PURE__*/function(_n){function l(){var _this;_classCallCheck(this,l);_this=_callSuper(this,l,arguments),_this.open=!1,_this.items=[{name:"bold",label:"Bold",icon:"format_bold",active:function active(e){return e.bold;}},{name:"italic",label:"Italic",icon:"format_italic",active:function active(e){return e.italic;}},{name:"underline",label:"Underline",icon:"format_underline",active:function active(e){return e.underline;}},{name:"strike",label:"Strikethrough",icon:"ng-strikethrough",active:function active(e){return e.strike;}},{name:"openLink",label:"Link",icon:"link_2",active:function active(e){return e.linkActive;}}];return _this;}_inherits(l,_n);return _createClass(l,[{key:"render",value:function render(){var _this2=this;var e=this.toolbarState;return t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div class=\"bubble\" part=\"bubble-menu\" @mousedown=",">\n ","\n </div>\n "])),function(e){return e.preventDefault();},this.items.map(function(i){return t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <button\n type=\"button\"\n title=","\n aria-label=","\n ?data-active=","\n @click=","\n >\n ","\n </button>\n "])),i.label,i.label,!!e&&i.active(e),function(){return _this2.emit("wysiwyg-command",{name:i.name});},a(i.icon,16));}));}}],[{key:"styles",get:function get(){return[i(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n :host {\n font-family: var(\n --nile-font-family-sans-serif,\n var(--ng-font-family-body, system-ui, -apple-system, sans-serif)\n );\n position: absolute;\n z-index: 15;\n display: none;\n }\n\n :host([open]) {\n display: block;\n }\n\n .bubble {\n display: flex;\n gap: 2px;\n padding: 4px;\n background: var(--nile-wysiwyg-popover-bg, #ffffff);\n border: 1px solid\n var(--nile-wysiwyg-border-color, var(--nile-colors-neutral-400, #d0d5dd));\n border-radius: var(--nile-wysiwyg-radius, 8px);\n box-shadow: var(\n --nile-wysiwyg-popover-shadow,\n 0 4px 12px rgba(16, 24, 40, 0.12)\n );\n }\n\n button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 26px;\n height: 26px;\n border: none;\n border-radius: 5px;\n background: transparent;\n cursor: pointer;\n font-size: 13px;\n font-weight: 600;\n color: var(--nile-colors-neutral-700, #344054);\n }\n\n button:hover {\n background: var(--nile-colors-neutral-100, #f2f4f7);\n }\n\n button[data-active] {\n background: var(--nile-colors-primary-50, var(--ng-componentcolors-utility-blue-50, #eff4ff));\n color: var(--nile-colors-primary-700, var(--ng-componentcolors-utility-blue-700, #1d4ed8));\n }\n "])))];}}]);}(n);e([o({type:Boolean,reflect:!0})],l.prototype,"open",void 0),e([o({attribute:!1})],l.prototype,"toolbarState",void 0),l=e([r("nile-wysiwyg-bubble-menu")],l);}};});
2
+ //# sourceMappingURL=bubble-menu.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bubble-menu.cjs.js","sources":["../../../../src/nile-wysiwyg-editor/ui/bubble-menu.ts"],"sourcesContent":["import { html, css, TemplateResult, CSSResultArray } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport NileElement from '../../internal/nile-element';\nimport { renderGlyph } from '../../internal/glyph';\nimport type { ToolbarState } from '../engine/selection-state';\nimport type { WysiwygCommandDetail } from '../types';\n\ninterface BubbleItem {\n name: WysiwygCommandDetail['name'];\n label: string;\n /** nile-glyph icon name (ng-* names are stroke-drawn). */\n icon: string;\n active: (state: ToolbarState) => boolean;\n}\n\n/**\n * Balloon toolbar shown over non-empty selections. The host owns positioning\n * (absolute left/top) and visibility; commands bubble up as\n * `wysiwyg-command` events, same contract as the main toolbar.\n */\n@customElement('nile-wysiwyg-bubble-menu')\nexport class NileWysiwygBubbleMenu extends NileElement {\n @property({ type: Boolean, reflect: true }) open = false;\n\n @property({ attribute: false }) toolbarState?: ToolbarState;\n\n public static get styles(): CSSResultArray {\n return [\n css`\n :host {\n font-family: var(\n --nile-font-family-sans-serif,\n var(--ng-font-family-body, system-ui, -apple-system, sans-serif)\n );\n position: absolute;\n z-index: 15;\n display: none;\n }\n\n :host([open]) {\n display: block;\n }\n\n .bubble {\n display: flex;\n gap: 2px;\n padding: 4px;\n background: var(--nile-wysiwyg-popover-bg, #ffffff);\n border: 1px solid\n var(--nile-wysiwyg-border-color, var(--nile-colors-neutral-400, #d0d5dd));\n border-radius: var(--nile-wysiwyg-radius, 8px);\n box-shadow: var(\n --nile-wysiwyg-popover-shadow,\n 0 4px 12px rgba(16, 24, 40, 0.12)\n );\n }\n\n button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 26px;\n height: 26px;\n border: none;\n border-radius: 5px;\n background: transparent;\n cursor: pointer;\n font-size: 13px;\n font-weight: 600;\n color: var(--nile-colors-neutral-700, #344054);\n }\n\n button:hover {\n background: var(--nile-colors-neutral-100, #f2f4f7);\n }\n\n button[data-active] {\n background: var(--nile-colors-primary-50, var(--ng-componentcolors-utility-blue-50, #eff4ff));\n color: var(--nile-colors-primary-700, var(--ng-componentcolors-utility-blue-700, #1d4ed8));\n }\n `,\n ];\n }\n\n /** Same icon set as the main toolbar, so both surfaces look identical. */\n private items: BubbleItem[] = [\n { name: 'bold', label: 'Bold', icon: 'format_bold', active: s => s.bold },\n { name: 'italic', label: 'Italic', icon: 'format_italic', active: s => s.italic },\n {\n name: 'underline',\n label: 'Underline',\n icon: 'format_underline',\n active: s => s.underline,\n },\n {\n name: 'strike',\n label: 'Strikethrough',\n icon: 'ng-strikethrough',\n active: s => s.strike,\n },\n {\n name: 'openLink',\n label: 'Link',\n icon: 'link_2',\n active: s => s.linkActive,\n },\n ];\n\n public render(): TemplateResult {\n const state = this.toolbarState;\n return html`\n <div class=\"bubble\" part=\"bubble-menu\" @mousedown=${(e: Event) => e.preventDefault()}>\n ${this.items.map(\n item => html`\n <button\n type=\"button\"\n title=${item.label}\n aria-label=${item.label}\n ?data-active=${state ? item.active(state) : false}\n @click=${() => this.emit('wysiwyg-command', { name: item.name })}\n >\n ${renderGlyph(item.icon, 16)}\n </button>\n `\n )}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-wysiwyg-bubble-menu': NileWysiwygBubbleMenu;\n }\n}\n"],"names":["NileWysiwygBubbleMenu","l","this","open","items","name","label","icon","active","s","bold","italic","underline","strike","linkActive","_this","_inherits","_n","_createClass","key","value","render","_this2","state","toolbarState","html","_templateObject","_taggedTemplateLiteral","e","preventDefault","map","item","_templateObject2","emit","renderGlyph","__decorate","get","css","_templateObject3","NileElement","property","type","Boolean","reflect","prototype","attribute","customElement"],"mappings":"g+GAqBaA,4BAAN,SAAAC,EAAA,qEACuCC,EAAAA,KAAAA,CAAIC,MAAG,CA+D3CD,CAAAA,KAAAA,CAAAE,MAAsB,CAC5B,CAAEC,KAAM,MAAQC,CAAAA,KAAAA,CAAO,OAAQC,IAAM,CAAA,aAAA,CAAeC,OAAQC,QAARD,CAAAA,OAAQC,CAAKA,QAAAA,CAAAA,CAAAA,CAAEC,QACnE,CAAEL,IAAAA,CAAM,SAAUC,KAAO,CAAA,QAAA,CAAUC,IAAM,CAAA,eAAA,CAAiBC,OAAQC,QAARD,CAAAA,OAAQC,CAAKA,QAAAA,CAAAA,CAAAA,CAAEE,UACzE,CACEN,IAAAA,CAAM,YACNC,KAAO,CAAA,WAAA,CACPC,KAAM,kBACNC,CAAAA,MAAAA,CAAQC,QAARD,CAAAA,MAAAA,CAAQC,SAAKA,CAAAA,CAAEG,CAAAA,SAAAA,GAAAA,CAEjB,CACEP,IAAM,CAAA,QAAA,CACNC,MAAO,eACPC,CAAAA,IAAAA,CAAM,kBACNC,CAAAA,MAAAA,CAAQC,QAARD,CAAAA,MAAAA,CAAQC,SAAKA,CAAAA,CAAEI,CAAAA,MAAAA,GAAAA,CAEjB,CACER,IAAM,CAAA,UAAA,CACNC,MAAO,MACPC,CAAAA,IAAAA,CAAM,SACNC,MAAQC,CAAAA,QAARD,CAAAA,MAAQC,CAAAA,CAAAA,QAAKA,CAAAA,EAAEK,UAwBpB,GAAA,CAAA,QAAAC,KAAA,EAtGQC,SAAA,CAAAf,CAAA,CAAAgB,EAAA,SAAAC,YAAA,CAAAjB,CAAA,GAAAkB,GAAA,UAAAC,KAAA,CAkFA,SAAAC,MAAAA,CAAAA,CACL,KAAAC,MAAA,MAAA,GAAMC,CAAAA,EAAQrB,IAAKsB,CAAAA,YAAAA,CACnB,MAAOC,CAAAA,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,2GAC4CC,SAAAA,CAAAA,QAAaA,CAAAA,CAAEC,CAAAA,cAAAA,CAAAA,CAAAA,GAChE3B,IAAKE,CAAAA,KAAAA,CAAM0B,GACXC,CAAAA,SAAAA,CAAAA,QAAQN,CAAAA,CAAI,CAAAO,gBAAA,GAAAA,gBAAA,CAAAL,sBAAA,kPAGAI,CAAKzB,CAAAA,KAAAA,CACAyB,CAAKzB,CAAAA,KAAAA,CACHiB,CAAAA,CAAAA,CAAAA,EAAQQ,EAAKvB,MAAOe,CAAAA,CAAAA,CAAAA,CAC1B,iBAAMrB,CAAAA,MAAK+B,CAAAA,IAAAA,CAAK,iBAAmB,CAAA,CAAE5B,KAAM0B,CAAK1B,CAAAA,IAAAA,CAAAA,CAAAA,GAEvD6B,CAAAA,CAAYH,EAAKxB,IAAM,CAAA,EAAA,CAAA,MAMpC,CAzG2C4B,KAAAA,GAAAA,UAAAA,GAAAA,CAIrC,SAAAC,IAAA,CACL,CAAA,MAAO,CACLC,CAAG,CAAAC,gBAAA,GAAAA,gBAAA,CAAAX,sBAAA,okDAsDN,EA0BM,MAvFkCY,CAAAA,EACGJ,CAAAA,CAAA,CAA3CK,CAAAA,CAAS,CAAEC,IAAAA,CAAMC,OAASC,CAAAA,OAAAA,CAAAA,CAAS,CAAqB3C,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA4C,SAAA,CAAA,MAAA,CAAA,IAAA,EAEzBT,CAAAA,CAAAA,CAAAA,CAAA,CAA/BK,CAAS,CAAA,CAAEK,SAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAqC7C,CAAA4C,CAAAA,SAAAA,CAAA,cAAA,CAAA,IAAA,EAAA,CAAA,CAHjD5C,CAAqBmC,CAAAA,CAAAA,CAAA,CADjCW,CAAAA,CAAc,0BACF9C,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA"}