@aquera/nile-elements 1.9.8 → 1.9.10

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 (285) hide show
  1. package/README.md +7 -0
  2. package/dist/{index-df196058.cjs.js → index-50880eb7.cjs.js} +2 -2
  3. package/dist/index-50880eb7.cjs.js.map +1 -0
  4. package/dist/index-6832c52b.cjs.js +2 -0
  5. package/dist/index-6832c52b.cjs.js.map +1 -0
  6. package/dist/index-747d1880.cjs.js +2 -0
  7. package/dist/index-747d1880.cjs.js.map +1 -0
  8. package/dist/{index-249de90a.esm.js → index-7b1c9857.esm.js} +1 -1
  9. package/dist/index-a487d8b4.esm.js +1 -0
  10. package/dist/index-ba47645d.esm.js +1 -0
  11. package/dist/index.cjs.js +1 -1
  12. package/dist/index.esm.js +1 -1
  13. package/dist/index.js +1589 -1277
  14. package/dist/katex-44476ab4.esm.js +1 -0
  15. package/dist/katex-f4186f87.cjs.js +2 -0
  16. package/dist/katex-f4186f87.cjs.js.map +1 -0
  17. package/dist/nile-checkbox/nile-checkbox.cjs.js +1 -1
  18. package/dist/nile-checkbox/nile-checkbox.cjs.js.map +1 -1
  19. package/dist/nile-checkbox/nile-checkbox.esm.js +1 -1
  20. package/dist/nile-color-picker/index.cjs.js +1 -1
  21. package/dist/nile-color-picker/index.esm.js +1 -1
  22. package/dist/nile-color-picker/nile-color-picker.cjs.js +1 -1
  23. package/dist/nile-color-picker/nile-color-picker.cjs.js.map +1 -1
  24. package/dist/nile-color-picker/nile-color-picker.esm.js +1 -1
  25. package/dist/nile-combobox/index.cjs.js +1 -1
  26. package/dist/nile-combobox/index.esm.js +1 -1
  27. package/dist/nile-combobox/nile-combobox.cjs.js +1 -1
  28. package/dist/nile-combobox/nile-combobox.esm.js +1 -1
  29. package/dist/nile-detail/index.cjs.js +1 -1
  30. package/dist/nile-detail/index.esm.js +1 -1
  31. package/dist/nile-detail/nile-detail.cjs.js +1 -1
  32. package/dist/nile-detail/nile-detail.esm.js +1 -1
  33. package/dist/nile-nav-tab/nile-nav-tab.cjs.js +1 -1
  34. package/dist/nile-nav-tab/nile-nav-tab.cjs.js.map +1 -1
  35. package/dist/nile-nav-tab/nile-nav-tab.css.cjs.js +1 -1
  36. package/dist/nile-nav-tab/nile-nav-tab.css.cjs.js.map +1 -1
  37. package/dist/nile-nav-tab/nile-nav-tab.css.esm.js +11 -0
  38. package/dist/nile-nav-tab/nile-nav-tab.esm.js +1 -1
  39. package/dist/nile-nav-tab-group/nile-nav-tab-group.css.cjs.js +1 -1
  40. package/dist/nile-nav-tab-group/nile-nav-tab-group.css.cjs.js.map +1 -1
  41. package/dist/nile-nav-tab-group/nile-nav-tab-group.css.esm.js +1 -2
  42. package/dist/nile-wysiwyg-editor/engine/commands.cjs.js +1 -1
  43. package/dist/nile-wysiwyg-editor/engine/commands.cjs.js.map +1 -1
  44. package/dist/nile-wysiwyg-editor/engine/commands.esm.js +1 -1
  45. package/dist/nile-wysiwyg-editor/engine/create-state.cjs.js +1 -1
  46. package/dist/nile-wysiwyg-editor/engine/create-state.cjs.js.map +1 -1
  47. package/dist/nile-wysiwyg-editor/engine/create-state.esm.js +1 -1
  48. package/dist/nile-wysiwyg-editor/engine/index.cjs.js +1 -1
  49. package/dist/nile-wysiwyg-editor/engine/index.esm.js +1 -1
  50. package/dist/nile-wysiwyg-editor/engine/inputrules.cjs.js +1 -1
  51. package/dist/nile-wysiwyg-editor/engine/keymap.cjs.js +1 -1
  52. package/dist/nile-wysiwyg-editor/engine/keymap.esm.js +1 -1
  53. package/dist/nile-wysiwyg-editor/engine/plugins/code-highlight.cjs.js +1 -1
  54. package/dist/nile-wysiwyg-editor/engine/plugins/code-highlight.cjs.js.map +1 -1
  55. package/dist/nile-wysiwyg-editor/engine/plugins/code-highlight.esm.js +1 -1
  56. package/dist/nile-wysiwyg-editor/engine/plugins/embed-view.cjs.js +1 -1
  57. package/dist/nile-wysiwyg-editor/engine/plugins/embed-view.cjs.js.map +1 -1
  58. package/dist/nile-wysiwyg-editor/engine/plugins/embed-view.esm.js +1 -1
  59. package/dist/nile-wysiwyg-editor/engine/plugins/embeds.cjs.js +1 -1
  60. package/dist/nile-wysiwyg-editor/engine/plugins/embeds.cjs.js.map +1 -1
  61. package/dist/nile-wysiwyg-editor/engine/plugins/embeds.esm.js +1 -1
  62. package/dist/nile-wysiwyg-editor/engine/plugins/find-replace.cjs.js +1 -1
  63. package/dist/nile-wysiwyg-editor/engine/plugins/find-replace.esm.js +1 -1
  64. package/dist/nile-wysiwyg-editor/engine/plugins/image.cjs.js +1 -1
  65. package/dist/nile-wysiwyg-editor/engine/plugins/image.esm.js +1 -1
  66. package/dist/nile-wysiwyg-editor/engine/plugins/math-view.cjs.js +1 -1
  67. package/dist/nile-wysiwyg-editor/engine/plugins/math-view.cjs.js.map +1 -1
  68. package/dist/nile-wysiwyg-editor/engine/plugins/math-view.esm.js +1 -1
  69. package/dist/nile-wysiwyg-editor/engine/plugins/placeholder.cjs.js +1 -1
  70. package/dist/nile-wysiwyg-editor/engine/plugins/placeholder.esm.js +1 -1
  71. package/dist/nile-wysiwyg-editor/engine/plugins/style-block-view.cjs.js +2 -0
  72. package/dist/nile-wysiwyg-editor/engine/plugins/style-block-view.cjs.js.map +1 -0
  73. package/dist/nile-wysiwyg-editor/engine/plugins/style-block-view.esm.js +1 -0
  74. package/dist/nile-wysiwyg-editor/engine/plugins/suggestions.cjs.js +1 -1
  75. package/dist/nile-wysiwyg-editor/engine/plugins/suggestions.esm.js +1 -1
  76. package/dist/nile-wysiwyg-editor/engine/plugins/tables.cjs.js +1 -1
  77. package/dist/nile-wysiwyg-editor/engine/plugins/tables.cjs.js.map +1 -1
  78. package/dist/nile-wysiwyg-editor/engine/plugins/tables.esm.js +1 -1
  79. package/dist/nile-wysiwyg-editor/engine/sanitize.cjs.js +1 -1
  80. package/dist/nile-wysiwyg-editor/engine/sanitize.cjs.js.map +1 -1
  81. package/dist/nile-wysiwyg-editor/engine/sanitize.esm.js +1 -1
  82. package/dist/nile-wysiwyg-editor/engine/schema.cjs.js +1 -1
  83. package/dist/nile-wysiwyg-editor/engine/schema.cjs.js.map +1 -1
  84. package/dist/nile-wysiwyg-editor/engine/schema.esm.js +1 -1
  85. package/dist/nile-wysiwyg-editor/engine/selection-state.cjs.js +1 -1
  86. package/dist/nile-wysiwyg-editor/engine/selection-state.cjs.js.map +1 -1
  87. package/dist/nile-wysiwyg-editor/engine/selection-state.esm.js +1 -1
  88. package/dist/nile-wysiwyg-editor/index.cjs.js +1 -1
  89. package/dist/nile-wysiwyg-editor/index.esm.js +1 -1
  90. package/dist/nile-wysiwyg-editor/math/katex-renderer.cjs.js +2 -0
  91. package/dist/nile-wysiwyg-editor/math/katex-renderer.cjs.js.map +1 -0
  92. package/dist/nile-wysiwyg-editor/math/katex-renderer.esm.js +1 -0
  93. package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.cjs.js +1 -1
  94. package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.cjs.js.map +1 -1
  95. package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.css.cjs.js +1 -1
  96. package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.css.cjs.js.map +1 -1
  97. package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.css.esm.js +22 -3
  98. package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.esm.js +7 -6
  99. package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.cjs.js +1 -1
  100. package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.esm.js +1 -1
  101. package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar-item.cjs.js +2 -0
  102. package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar-item.cjs.js.map +1 -0
  103. package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar-item.esm.js +1 -0
  104. package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.cjs.js +1 -1
  105. package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.cjs.js.map +1 -1
  106. package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.cjs.js +1 -1
  107. package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.cjs.js.map +1 -1
  108. package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.esm.js +33 -54
  109. package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.esm.js +83 -95
  110. package/dist/nile-wysiwyg-editor/types.cjs.js +1 -1
  111. package/dist/nile-wysiwyg-editor/types.cjs.js.map +1 -1
  112. package/dist/nile-wysiwyg-editor/types.esm.js +1 -1
  113. package/dist/nile-wysiwyg-editor/ui/bubble-item.cjs.js +2 -0
  114. package/dist/nile-wysiwyg-editor/ui/bubble-item.cjs.js.map +1 -0
  115. package/dist/nile-wysiwyg-editor/ui/bubble-item.esm.js +1 -0
  116. package/dist/nile-wysiwyg-editor/ui/bubble-menu.cjs.js +1 -1
  117. package/dist/nile-wysiwyg-editor/ui/bubble-menu.cjs.js.map +1 -1
  118. package/dist/nile-wysiwyg-editor/ui/bubble-menu.esm.js +23 -15
  119. package/dist/nile-wysiwyg-editor/ui/code-block-menu.cjs.js +1 -1
  120. package/dist/nile-wysiwyg-editor/ui/code-block-menu.cjs.js.map +1 -1
  121. package/dist/nile-wysiwyg-editor/ui/code-block-menu.esm.js +3 -3
  122. package/dist/nile-wysiwyg-editor/ui/embed-panel.cjs.js +1 -1
  123. package/dist/nile-wysiwyg-editor/ui/embed-panel.cjs.js.map +1 -1
  124. package/dist/nile-wysiwyg-editor/ui/embed-panel.esm.js +2 -2
  125. package/dist/nile-wysiwyg-editor/ui/math-panel.cjs.js +1 -1
  126. package/dist/nile-wysiwyg-editor/ui/math-panel.cjs.js.map +1 -1
  127. package/dist/nile-wysiwyg-editor/ui/math-panel.esm.js +0 -3
  128. package/dist/nile-wysiwyg-editor/ui/preview.cjs.js +2 -0
  129. package/dist/nile-wysiwyg-editor/ui/preview.cjs.js.map +1 -0
  130. package/dist/nile-wysiwyg-editor/ui/preview.esm.js +8 -0
  131. package/dist/nile-wysiwyg-editor/ui/source-view.cjs.js +1 -1
  132. package/dist/nile-wysiwyg-editor/ui/source-view.cjs.js.map +1 -1
  133. package/dist/nile-wysiwyg-editor/ui/source-view.esm.js +225 -24
  134. package/dist/nile-wysiwyg-editor/ui/suggest-list.cjs.js +1 -1
  135. package/dist/nile-wysiwyg-editor/ui/suggest-list.cjs.js.map +1 -1
  136. package/dist/nile-wysiwyg-editor/ui/suggest-list.esm.js +9 -9
  137. package/dist/nile-wysiwyg-editor/ui/table-grid-picker.cjs.js +1 -1
  138. package/dist/nile-wysiwyg-editor/ui/table-grid-picker.cjs.js.map +1 -1
  139. package/dist/nile-wysiwyg-editor/ui/table-grid-picker.esm.js +115 -13
  140. package/dist/nile-wysiwyg-editor/ui/table-menu.cjs.js +1 -1
  141. package/dist/nile-wysiwyg-editor/ui/table-menu.cjs.js.map +1 -1
  142. package/dist/nile-wysiwyg-editor/ui/table-menu.esm.js +13 -12
  143. package/dist/src/index.d.ts +5 -0
  144. package/dist/src/index.js +3 -0
  145. package/dist/src/index.js.map +1 -1
  146. package/dist/src/nile-checkbox/nile-checkbox.js +1 -0
  147. package/dist/src/nile-checkbox/nile-checkbox.js.map +1 -1
  148. package/dist/src/nile-color-picker/nile-color-picker.d.ts +1 -0
  149. package/dist/src/nile-color-picker/nile-color-picker.js +1 -0
  150. package/dist/src/nile-color-picker/nile-color-picker.js.map +1 -1
  151. package/dist/src/nile-nav-tab/nile-nav-tab.css.js +11 -0
  152. package/dist/src/nile-nav-tab/nile-nav-tab.css.js.map +1 -1
  153. package/dist/src/nile-nav-tab/nile-nav-tab.d.ts +2 -0
  154. package/dist/src/nile-nav-tab/nile-nav-tab.js +13 -0
  155. package/dist/src/nile-nav-tab/nile-nav-tab.js.map +1 -1
  156. package/dist/src/nile-nav-tab-group/nile-nav-tab-group.css.js +1 -2
  157. package/dist/src/nile-nav-tab-group/nile-nav-tab-group.css.js.map +1 -1
  158. package/dist/src/nile-wysiwyg-editor/engine/index.d.ts +1 -0
  159. package/dist/src/nile-wysiwyg-editor/engine/index.js +1 -0
  160. package/dist/src/nile-wysiwyg-editor/engine/index.js.map +1 -1
  161. package/dist/src/nile-wysiwyg-editor/engine/plugins/embed-view.js +3 -0
  162. package/dist/src/nile-wysiwyg-editor/engine/plugins/embed-view.js.map +1 -1
  163. package/dist/src/nile-wysiwyg-editor/engine/plugins/embeds.d.ts +19 -4
  164. package/dist/src/nile-wysiwyg-editor/engine/plugins/embeds.js +23 -18
  165. package/dist/src/nile-wysiwyg-editor/engine/plugins/embeds.js.map +1 -1
  166. package/dist/src/nile-wysiwyg-editor/engine/plugins/math-view.d.ts +8 -3
  167. package/dist/src/nile-wysiwyg-editor/engine/plugins/math-view.js +41 -4
  168. package/dist/src/nile-wysiwyg-editor/engine/plugins/math-view.js.map +1 -1
  169. package/dist/src/nile-wysiwyg-editor/engine/plugins/style-block-view.d.ts +17 -0
  170. package/dist/src/nile-wysiwyg-editor/engine/plugins/style-block-view.js +174 -0
  171. package/dist/src/nile-wysiwyg-editor/engine/plugins/style-block-view.js.map +1 -0
  172. package/dist/src/nile-wysiwyg-editor/engine/plugins/tables.js +33 -2
  173. package/dist/src/nile-wysiwyg-editor/engine/plugins/tables.js.map +1 -1
  174. package/dist/src/nile-wysiwyg-editor/engine/pm.test.js +49 -8
  175. package/dist/src/nile-wysiwyg-editor/engine/pm.test.js.map +1 -1
  176. package/dist/src/nile-wysiwyg-editor/engine/sanitize.d.ts +12 -0
  177. package/dist/src/nile-wysiwyg-editor/engine/sanitize.js +76 -8
  178. package/dist/src/nile-wysiwyg-editor/engine/sanitize.js.map +1 -1
  179. package/dist/src/nile-wysiwyg-editor/engine/schema.d.ts +2 -0
  180. package/dist/src/nile-wysiwyg-editor/engine/schema.js +154 -2
  181. package/dist/src/nile-wysiwyg-editor/engine/schema.js.map +1 -1
  182. package/dist/src/nile-wysiwyg-editor/index.d.ts +5 -0
  183. package/dist/src/nile-wysiwyg-editor/index.js +3 -0
  184. package/dist/src/nile-wysiwyg-editor/index.js.map +1 -1
  185. package/dist/src/nile-wysiwyg-editor/math/katex-renderer.d.ts +38 -0
  186. package/dist/src/nile-wysiwyg-editor/math/katex-renderer.js +40 -0
  187. package/dist/src/nile-wysiwyg-editor/math/katex-renderer.js.map +1 -0
  188. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.js +22 -3
  189. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.js.map +1 -1
  190. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.d.ts +36 -0
  191. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.js +125 -8
  192. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.js.map +1 -1
  193. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.test.js +5 -2
  194. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.test.js.map +1 -1
  195. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.d.ts +2 -0
  196. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.js +1 -0
  197. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.js.map +1 -1
  198. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar-item.d.ts +55 -0
  199. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar-item.js +79 -0
  200. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar-item.js.map +1 -0
  201. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.js +33 -54
  202. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.js.map +1 -1
  203. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.d.ts +50 -2
  204. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.js +158 -102
  205. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.js.map +1 -1
  206. package/dist/src/nile-wysiwyg-editor/types.d.ts +4 -2
  207. package/dist/src/nile-wysiwyg-editor/types.js +2 -2
  208. package/dist/src/nile-wysiwyg-editor/types.js.map +1 -1
  209. package/dist/src/nile-wysiwyg-editor/ui/bubble-item.d.ts +48 -0
  210. package/dist/src/nile-wysiwyg-editor/ui/bubble-item.js +69 -0
  211. package/dist/src/nile-wysiwyg-editor/ui/bubble-item.js.map +1 -0
  212. package/dist/src/nile-wysiwyg-editor/ui/bubble-menu.d.ts +17 -2
  213. package/dist/src/nile-wysiwyg-editor/ui/bubble-menu.js +128 -35
  214. package/dist/src/nile-wysiwyg-editor/ui/bubble-menu.js.map +1 -1
  215. package/dist/src/nile-wysiwyg-editor/ui/embed-panel.d.ts +2 -1
  216. package/dist/src/nile-wysiwyg-editor/ui/embed-panel.js +4 -3
  217. package/dist/src/nile-wysiwyg-editor/ui/embed-panel.js.map +1 -1
  218. package/dist/src/nile-wysiwyg-editor/ui/math-panel.js +0 -3
  219. package/dist/src/nile-wysiwyg-editor/ui/math-panel.js.map +1 -1
  220. package/dist/src/nile-wysiwyg-editor/ui/preview.d.ts +20 -0
  221. package/dist/src/nile-wysiwyg-editor/ui/preview.js +44 -0
  222. package/dist/src/nile-wysiwyg-editor/ui/preview.js.map +1 -0
  223. package/dist/src/nile-wysiwyg-editor/ui/source-view.d.ts +35 -3
  224. package/dist/src/nile-wysiwyg-editor/ui/source-view.js +337 -24
  225. package/dist/src/nile-wysiwyg-editor/ui/source-view.js.map +1 -1
  226. package/dist/src/nile-wysiwyg-editor/ui/suggest-list.d.ts +1 -0
  227. package/dist/src/nile-wysiwyg-editor/ui/suggest-list.js +9 -0
  228. package/dist/src/nile-wysiwyg-editor/ui/suggest-list.js.map +1 -1
  229. package/dist/src/nile-wysiwyg-editor/ui/table-grid-picker.d.ts +13 -2
  230. package/dist/src/nile-wysiwyg-editor/ui/table-grid-picker.js +166 -10
  231. package/dist/src/nile-wysiwyg-editor/ui/table-grid-picker.js.map +1 -1
  232. package/dist/src/nile-wysiwyg-editor/ui/table-menu.d.ts +1 -0
  233. package/dist/src/nile-wysiwyg-editor/ui/table-menu.js +10 -8
  234. package/dist/src/nile-wysiwyg-editor/ui/table-menu.js.map +1 -1
  235. package/dist/src/version.js +1 -1
  236. package/dist/src/version.js.map +1 -1
  237. package/dist/tsconfig.tsbuildinfo +1 -1
  238. package/dist/xml-25c4108a.esm.js +1 -0
  239. package/dist/xml-90fd974e.cjs.js +2 -0
  240. package/dist/xml-90fd974e.cjs.js.map +1 -0
  241. package/package.json +2 -1
  242. package/rollup.config.js +1 -0
  243. package/src/index.ts +8 -0
  244. package/src/nile-checkbox/nile-checkbox.ts +1 -0
  245. package/src/nile-color-picker/nile-color-picker.ts +1 -0
  246. package/src/nile-nav-tab/nile-nav-tab.css.ts +11 -0
  247. package/src/nile-nav-tab/nile-nav-tab.ts +17 -0
  248. package/src/nile-nav-tab-group/nile-nav-tab-group.css.ts +1 -2
  249. package/src/nile-wysiwyg-editor/engine/index.ts +1 -0
  250. package/src/nile-wysiwyg-editor/engine/plugins/embed-view.ts +3 -0
  251. package/src/nile-wysiwyg-editor/engine/plugins/embeds.ts +26 -20
  252. package/src/nile-wysiwyg-editor/engine/plugins/math-view.ts +45 -4
  253. package/src/nile-wysiwyg-editor/engine/plugins/style-block-view.ts +178 -0
  254. package/src/nile-wysiwyg-editor/engine/plugins/tables.ts +34 -2
  255. package/src/nile-wysiwyg-editor/engine/pm.test.ts +58 -8
  256. package/src/nile-wysiwyg-editor/engine/sanitize.ts +71 -8
  257. package/src/nile-wysiwyg-editor/engine/schema.ts +158 -7
  258. package/src/nile-wysiwyg-editor/index.ts +5 -0
  259. package/src/nile-wysiwyg-editor/math/katex-renderer.ts +59 -0
  260. package/src/nile-wysiwyg-editor/math/katex.d.ts +17 -0
  261. package/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.ts +22 -3
  262. package/src/nile-wysiwyg-editor/nile-wysiwyg-editor.test.ts +5 -2
  263. package/src/nile-wysiwyg-editor/nile-wysiwyg-editor.ts +142 -7
  264. package/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.ts +2 -0
  265. package/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar-item.ts +68 -0
  266. package/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.ts +33 -54
  267. package/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.ts +202 -108
  268. package/src/nile-wysiwyg-editor/types.ts +6 -4
  269. package/src/nile-wysiwyg-editor/ui/bubble-item.ts +60 -0
  270. package/src/nile-wysiwyg-editor/ui/bubble-menu.ts +147 -40
  271. package/src/nile-wysiwyg-editor/ui/embed-panel.ts +4 -3
  272. package/src/nile-wysiwyg-editor/ui/math-panel.ts +0 -3
  273. package/src/nile-wysiwyg-editor/ui/preview.ts +42 -0
  274. package/src/nile-wysiwyg-editor/ui/source-view.ts +339 -31
  275. package/src/nile-wysiwyg-editor/ui/suggest-list.ts +10 -0
  276. package/src/nile-wysiwyg-editor/ui/table-grid-picker.ts +160 -10
  277. package/src/nile-wysiwyg-editor/ui/table-menu.ts +10 -8
  278. package/vscode-html-custom-data.json +75 -6
  279. package/dist/index-353172ed.esm.js +0 -1
  280. package/dist/index-b387a9f4.cjs.js +0 -2
  281. package/dist/index-b387a9f4.cjs.js.map +0 -1
  282. package/dist/index-cc1385e0.cjs.js +0 -2
  283. package/dist/index-cc1385e0.cjs.js.map +0 -1
  284. package/dist/index-dedc38a6.esm.js +0 -1
  285. package/dist/index-df196058.cjs.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import{__decorate as e}from"tslib";import{css as i,html as r}from"lit";import{property as t,state as s,customElement as o}from"lit/decorators.js";import{N as l}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 a=class extends l{constructor(){super(...arguments),this.disabled=!1,this.open=!1,this.hoverRows=0,this.hoverCols=0,this.handleOutside=e=>{this.open&&!e.composedPath().includes(this)&&(this.open=!1)}}static get styles(){return[i`
1
+ import{__decorate as t}from"tslib";import{css as e,html as i}from"lit";import{property as r,state as o,customElement as s}from"lit/decorators.js";import{N as n}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 a=class extends n{constructor(){super(...arguments),this.disabled=!1,this.maxRows=20,this.maxCols=20,this.open=!1,this.hoverRows=0,this.hoverCols=0,this.customRows="",this.customCols="",this.handleOutside=t=>{this.open&&!t.composedPath().includes(this)&&(this.open=!1)}}static get styles(){return[e`
2
2
  :host {
3
3
  font-family: var(
4
4
  --nile-font-family-sans-serif,
@@ -46,7 +46,6 @@ import{__decorate as e}from"tslib";import{css as i,html as r}from"lit";import{pr
46
46
 
47
47
  .grid {
48
48
  display: grid;
49
- grid-template-columns: repeat(${10}, 14px);
50
49
  gap: 2px;
51
50
  }
52
51
 
@@ -70,13 +69,78 @@ import{__decorate as e}from"tslib";import{css as i,html as r}from"lit";import{pr
70
69
  font-size: 12px;
71
70
  color: var(--nile-colors-neutral-600, #475467);
72
71
  }
73
- `]}connectedCallback(){super.connectedCallback(),document.addEventListener("mousedown",this.handleOutside)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this.handleOutside)}pick(e,i){this.open=!1,this.emit("wysiwyg-command",{name:"insertTable",attrs:{rows:e,cols:i,withHeaderRow:!0}})}render(){const e=[];for(let i=1;i<=8;i+=1)for(let t=1;t<=10;t+=1)e.push(r`
72
+
73
+ .custom {
74
+ display: flex;
75
+ align-items: center;
76
+ gap: 6px;
77
+ margin-top: 8px;
78
+ padding-top: 8px;
79
+ border-top: 1px solid var(--nile-colors-neutral-300, #e4e7ec);
80
+ }
81
+
82
+ .custom input {
83
+ width: 44px;
84
+ height: 26px;
85
+ padding: 0 6px;
86
+ border: 1px solid var(--nile-colors-neutral-400, #d0d5dd);
87
+ border-radius: 6px;
88
+ font-size: 12px;
89
+ box-sizing: border-box;
90
+ text-align: center;
91
+ color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900, #101828));
92
+ font-family: inherit;
93
+ /* Hide native number spinners: they overlap the centered text in this
94
+ narrow field and a stray click on the arrows mutates the value. */
95
+ -moz-appearance: textfield;
96
+ appearance: textfield;
97
+ }
98
+
99
+ .custom input::-webkit-outer-spin-button,
100
+ .custom input::-webkit-inner-spin-button {
101
+ -webkit-appearance: none;
102
+ margin: 0;
103
+ }
104
+
105
+ .custom input:focus {
106
+ outline: none;
107
+ border-color: var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600, #2563eb));
108
+ }
109
+
110
+ .custom .times {
111
+ font-size: 12px;
112
+ color: var(--nile-colors-neutral-600, #475467);
113
+ }
114
+
115
+ .custom button.insert {
116
+ margin-left: auto;
117
+ height: 26px;
118
+ padding: 0 12px;
119
+ border: none;
120
+ border-radius: 6px;
121
+ background: var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600, #2563eb));
122
+ color: #ffffff;
123
+ font-size: 12px;
124
+ font-weight: 600;
125
+ font-family: inherit;
126
+ cursor: pointer;
127
+ }
128
+
129
+ .custom button.insert:hover:not(:disabled) {
130
+ background: var(--nile-colors-primary-700, #1d4ed8);
131
+ }
132
+
133
+ .custom button.insert:disabled {
134
+ opacity: 0.4;
135
+ cursor: default;
136
+ }
137
+ `]}connectedCallback(){super.connectedCallback(),document.addEventListener("mousedown",this.handleOutside)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this.handleOutside)}pick(t,e){this.open=!1,this.customRows="",this.customCols="",this.emit("wysiwyg-command",{name:"insertTable",attrs:{rows:t,cols:e,withHeaderRow:!0}})}clamp(t,e){const i=parseInt(t,10);return!Number.isFinite(i)||i<1?0:Math.min(i,e)}insertCustom(){const t=this.clamp(this.customRows,this.maxRows),e=this.clamp(this.customCols,this.maxCols);t>=1&&e>=1&&this.pick(t,e)}render(){const t=Math.min(Math.max(5,this.hoverRows+1),this.maxRows),e=Math.min(Math.max(5,this.hoverCols+1),this.maxCols),r=[];for(let o=1;o<=t;o+=1)for(let t=1;t<=e;t+=1)r.push(i`
74
138
  <span
75
- class="cell ${i<=this.hoverRows&&t<=this.hoverCols?"hot":""}"
76
- @mouseenter=${()=>{this.hoverRows=i,this.hoverCols=t}}
77
- @click=${()=>this.pick(i,t)}
139
+ class="cell ${o<=this.hoverRows&&t<=this.hoverCols?"hot":""}"
140
+ @mouseenter=${()=>{this.hoverRows=o,this.hoverCols=t}}
141
+ @click=${()=>this.pick(o,t)}
78
142
  ></span>
79
- `);return r`
143
+ `);const o=this.clamp(this.customRows,this.maxRows)>=1&&this.clamp(this.customCols,this.maxCols)>=1;return i`
80
144
  <button
81
145
  type="button"
82
146
  class="trigger"
@@ -84,17 +148,55 @@ import{__decorate as e}from"tslib";import{css as i,html as r}from"lit";import{pr
84
148
  aria-label="Insert table"
85
149
  aria-expanded=${this.open?"true":"false"}
86
150
  ?disabled=${this.disabled}
87
- @mousedown=${e=>e.preventDefault()}
151
+ @mousedown=${t=>t.preventDefault()}
88
152
  @click=${()=>{this.open=!this.open,this.hoverRows=0,this.hoverCols=0}}
89
153
  >
90
154
  <nile-glyph name="grid-01" size="18" method="stroke"></nile-glyph>
91
155
  </button>
92
- ${this.open?r`
93
- <div class="panel" @mousedown=${e=>e.preventDefault()}>
94
- <div class="grid">${e}</div>
95
- <div class="label">
156
+ ${this.open?i`
157
+ <div class="panel">
158
+ <div
159
+ class="grid"
160
+ style="grid-template-columns: repeat(${e}, 14px)"
161
+ @mousedown=${t=>t.preventDefault()}
162
+ @mouseleave=${()=>{this.hoverRows=0,this.hoverCols=0}}
163
+ >
164
+ ${r}
165
+ </div>
166
+ <div class="label" @mousedown=${t=>t.preventDefault()}>
96
167
  ${this.hoverRows>0?`${this.hoverRows} × ${this.hoverCols}`:"Pick a size"}
97
168
  </div>
169
+ <div class="custom">
170
+ <input
171
+ type="number"
172
+ min="1"
173
+ max=${this.maxRows}
174
+ aria-label="Rows"
175
+ placeholder="Rows"
176
+ .value=${this.customRows}
177
+ @input=${t=>{this.customRows=t.target.value}}
178
+ @keydown=${t=>{"Enter"===t.key&&this.insertCustom()}}
179
+ />
180
+ <span class="times">×</span>
181
+ <input
182
+ type="number"
183
+ min="1"
184
+ max=${this.maxCols}
185
+ aria-label="Columns"
186
+ placeholder="Cols"
187
+ .value=${this.customCols}
188
+ @input=${t=>{this.customCols=t.target.value}}
189
+ @keydown=${t=>{"Enter"===t.key&&this.insertCustom()}}
190
+ />
191
+ <button
192
+ type="button"
193
+ class="insert"
194
+ ?disabled=${!o}
195
+ @click=${()=>this.insertCustom()}
196
+ >
197
+ Insert
198
+ </button>
199
+ </div>
98
200
  </div>
99
201
  `:""}
100
- `}};e([t({type:Boolean,reflect:!0})],a.prototype,"disabled",void 0),e([s()],a.prototype,"open",void 0),e([s()],a.prototype,"hoverRows",void 0),e([s()],a.prototype,"hoverCols",void 0),a=e([o("nile-wysiwyg-table-picker")],a);
202
+ `}};t([r({type:Boolean,reflect:!0})],a.prototype,"disabled",void 0),t([r({type:Number,attribute:"max-rows",reflect:!0})],a.prototype,"maxRows",void 0),t([r({type:Number,attribute:"max-cols",reflect:!0})],a.prototype,"maxCols",void 0),t([o()],a.prototype,"open",void 0),t([o()],a.prototype,"hoverRows",void 0),t([o()],a.prototype,"hoverCols",void 0),t([o()],a.prototype,"customRows",void 0),t([o()],a.prototype,"customCols",void 0),a=t([s("nile-wysiwyg-table-picker")],a);
@@ -1,2 +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,l,n,o,t,a,r,_templateObject,_templateObject2,_templateObject3,i,s;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){l=_lit.css;n=_lit.html;},function(_litDecoratorsJs){o=_litDecoratorsJs.property;t=_litDecoratorsJs.customElement;},function(_internalNileElementCjsJs){a=_internalNileElementCjsJs.N;},function(_internalGlyphCjsJs){r=_internalGlyphCjsJs.r;},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){}],execute:function execute(){i=[{name:"addRowBefore",label:"Add row above",icon:"ng-between-vertical-start"},{name:"addRowAfter",label:"Add row below",icon:"ng-between-vertical-end"},{name:"addColumnBefore",label:"Add column left",icon:"ng-between-horizontal-start"},{name:"addColumnAfter",label:"Add column right",icon:"ng-between-horizontal-end"},{name:"deleteRow",label:"Delete row",icon:"ng-rows-2"},{name:"deleteColumn",label:"Delete column",icon:"ng-columns-2"},{name:"mergeCells",label:"Merge cells",icon:"ng-table-cells-merge"},{name:"splitCell",label:"Split cell",icon:"ng-table-cells-split"},{name:"toggleHeaderRow",label:"Toggle header row",icon:"ng-panel-top"},{name:"toggleLayoutTable",label:"Toggle layout table (borderless)",icon:"ng-grid-2x2"},{name:"deleteTable",label:"Delete table",icon:"ng-trash-2"}];s=/*#__PURE__*/function(_a){function s(){var _this;_classCallCheck(this,s);_this=_callSuper(this,s,arguments),_this.open=!1;return _this;}_inherits(s,_a);return _createClass(s,[{key:"render",value:function render(){var _this2=this;return n(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div class=\"menu\" part=\"table-menu\" @mousedown=",">\n ","\n </div>\n "])),function(e){return e.preventDefault();},i.map(function(e){return n(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <button\n type=\"button\"\n title=","\n aria-label=","\n @click=","\n >\n ","\n </button>\n "])),e.label,e.label,function(){return _this2.emit("wysiwyg-command",{name:e.name});},r(e.icon,16));}));}}],[{key:"styles",get:function get(){return[l(_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 .menu {\n display: flex;\n gap: 2px;\n padding: 4px;\n background: var(--nile-wysiwyg-popover-bg, #ffffff);\n border: 1px solid var(--nile-colors-neutral-400, #d0d5dd);\n border-radius: 8px;\n box-shadow: var(--nile-wysiwyg-popover-shadow, 0 4px 12px rgba(16, 24, 40, 0.12));\n }\n\n button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 26px;\n height: 26px;\n padding: 0 4px;\n border: none;\n border-radius: 5px;\n background: transparent;\n cursor: pointer;\n font-size: 12px;\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 "])))];}}]);}(a);e([o({type:Boolean,reflect:!0})],s.prototype,"open",void 0),s=e([t("nile-wysiwyg-table-menu")],s);}};});
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","../../nile-lite-tooltip/nile-lite-tooltip.cjs.js","../../internal/accessibility/a11y.state.enum.cjs.js","../../internal/accessibility/a11y.property.enum.cjs.js","../../internal/accessibility/role.enum.cjs.js","../../nile-lite-tooltip/nile-lite-tooltip.css.cjs.js","../../tippy.esm-78baa8f2.cjs.js","../../nile-lite-tooltip/utils.cjs.js","../../utilities/visibility-manager.cjs.js"],function(_export,_context){"use strict";var e,l,t,o,n,i,a,_templateObject,_templateObject2,_templateObject3,r,s;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){l=_lit.css;t=_lit.html;},function(_litDecoratorsJs){o=_litDecoratorsJs.property;n=_litDecoratorsJs.customElement;},function(_internalNileElementCjsJs){i=_internalNileElementCjsJs.N;},function(_internalGlyphCjsJs){a=_internalGlyphCjsJs.r;},function(_nileLiteTooltipNileLiteTooltipCjsJs){},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){},function(_nileLiteTooltipNileLiteTooltipCssCjsJs){},function(_tippyEsm008CjsJs){},function(_nileLiteTooltipUtilsCjsJs){},function(_utilitiesVisibilityManagerCjsJs){}],execute:function execute(){r=[{name:"addRowBefore",label:"Add row above",icon:"ng-between-vertical-start"},{name:"addRowAfter",label:"Add row below",icon:"ng-between-vertical-end"},{name:"addColumnBefore",label:"Add column left",icon:"ng-between-horizontal-start"},{name:"addColumnAfter",label:"Add column right",icon:"ng-between-horizontal-end"},{name:"deleteRow",label:"Delete row",icon:"ng-rows-2"},{name:"deleteColumn",label:"Delete column",icon:"ng-columns-2"},{name:"mergeCells",label:"Merge cells",icon:"ng-table-cells-merge"},{name:"splitCell",label:"Split cell",icon:"ng-table-cells-split"},{name:"toggleHeaderRow",label:"Toggle header row",icon:"ng-panel-top"},{name:"toggleLayoutTable",label:"Toggle layout table (borderless)",icon:"ng-grid-2x2"},{name:"deleteTable",label:"Delete table",icon:"ng-trash-2"}];s=/*#__PURE__*/function(_i){function s(){var _this;_classCallCheck(this,s);_this=_callSuper(this,s,arguments),_this.open=!1;return _this;}_inherits(s,_i);return _createClass(s,[{key:"render",value:function render(){var _this2=this;return t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div class=\"menu\" part=\"table-menu\" @mousedown=",">\n ","\n </div>\n "])),function(e){return e.preventDefault();},r.map(function(e){return t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-lite-tooltip content="," placement=\"top\">\n <button\n type=\"button\"\n aria-label=","\n @click=","\n >\n ","\n </button>\n </nile-lite-tooltip>\n "])),e.label,e.label,function(){return _this2.emit("wysiwyg-command",{name:e.name});},a(e.icon,16));}));}}],[{key:"styles",get:function get(){return[l(_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 .menu {\n display: flex;\n gap: 2px;\n padding: 4px;\n background: var(--nile-wysiwyg-popover-bg, #ffffff);\n border: 1px solid var(--nile-colors-neutral-400, #d0d5dd);\n border-radius: 8px;\n box-shadow: var(--nile-wysiwyg-popover-shadow, 0 4px 12px rgba(16, 24, 40, 0.12));\n }\n\n button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 26px;\n height: 26px;\n padding: 0 4px;\n border: none;\n border-radius: 5px;\n background: transparent;\n cursor: pointer;\n font-size: 12px;\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 "])))];}}]);}(i);e([o({type:Boolean,reflect:!0})],s.prototype,"open",void 0),s=e([n("nile-wysiwyg-table-menu")],s);}};});
2
2
  //# sourceMappingURL=table-menu.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"table-menu.cjs.js","sources":["../../../../src/nile-wysiwyg-editor/ui/table-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 { CommandName } from '../engine/commands';\n\ninterface TableOp {\n name: CommandName;\n label: string;\n icon: string;\n}\n\nconst OPS: TableOp[] = [\n { name: 'addRowBefore', label: 'Add row above', icon: 'ng-between-vertical-start' },\n { name: 'addRowAfter', label: 'Add row below', icon: 'ng-between-vertical-end' },\n { name: 'addColumnBefore', label: 'Add column left', icon: 'ng-between-horizontal-start' },\n { name: 'addColumnAfter', label: 'Add column right', icon: 'ng-between-horizontal-end' },\n { name: 'deleteRow', label: 'Delete row', icon: 'ng-rows-2' },\n { name: 'deleteColumn', label: 'Delete column', icon: 'ng-columns-2' },\n { name: 'mergeCells', label: 'Merge cells', icon: 'ng-table-cells-merge' },\n { name: 'splitCell', label: 'Split cell', icon: 'ng-table-cells-split' },\n { name: 'toggleHeaderRow', label: 'Toggle header row', icon: 'ng-panel-top' },\n { name: 'toggleLayoutTable', label: 'Toggle layout table (borderless)', icon: 'ng-grid-2x2' },\n { name: 'deleteTable', label: 'Delete table', icon: 'ng-trash-2' },\n];\n\n/**\n * Compact floating bar shown while the cursor is inside a table. The host\n * positions it; operations bubble up as `wysiwyg-command` events.\n */\n@customElement('nile-wysiwyg-table-menu')\nexport class NileWysiwygTableMenu extends NileElement {\n @property({ type: Boolean, reflect: true }) open = false;\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 .menu {\n display: flex;\n gap: 2px;\n padding: 4px;\n background: var(--nile-wysiwyg-popover-bg, #ffffff);\n border: 1px solid var(--nile-colors-neutral-400, #d0d5dd);\n border-radius: 8px;\n box-shadow: var(--nile-wysiwyg-popover-shadow, 0 4px 12px rgba(16, 24, 40, 0.12));\n }\n\n button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 26px;\n height: 26px;\n padding: 0 4px;\n border: none;\n border-radius: 5px;\n background: transparent;\n cursor: pointer;\n font-size: 12px;\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 ];\n }\n\n public render(): TemplateResult {\n return html`\n <div class=\"menu\" part=\"table-menu\" @mousedown=${(e: Event) => e.preventDefault()}>\n ${OPS.map(\n op => html`\n <button\n type=\"button\"\n title=${op.label}\n aria-label=${op.label}\n @click=${() => this.emit('wysiwyg-command', { name: op.name })}\n >\n ${renderGlyph(op.icon, 16)}\n </button>\n `\n )}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-wysiwyg-table-menu': NileWysiwygTableMenu;\n }\n}\n"],"names":["OPS","name","label","icon","NileWysiwygTableMenu","_a","s","constructor","this","open","_this","_inherits","_createClass","key","value","render","_this2","html","_templateObject","_taggedTemplateLiteral","e","preventDefault","map","op","_templateObject2","emit","renderGlyph","get","styles","css","_templateObject3","NileElement","__decorate","property","type","Boolean","reflect","prototype","customElement"],"mappings":"k+GAYMA,CAAiB,CAAA,CACrB,CAAEC,IAAAA,CAAM,eAAgBC,KAAO,CAAA,eAAA,CAAiBC,IAAM,CA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AAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,wGACyCC,SAAAA,CAAAA,QAAaA,CAAAA,CAAEC,CAAAA,cAAAA,CAAAA,CAAAA,GAC7DrB,CAAIsB,CAAAA,GAAAA,CACJC,SAAAA,SAAMN,CAAAA,CAAI,CAAAO,gBAAA,GAAAA,gBAAA,CAAAL,sBAAA,kNAGEI,CAAGrB,CAAAA,KAAAA,CACEqB,CAAGrB,CAAAA,KAAAA,CACP,iBAAMM,CAAAA,MAAKiB,CAAAA,IAAAA,CAAK,iBAAmB,CAAA,CAAExB,KAAMsB,CAAGtB,CAAAA,IAAAA,CAAAA,CAAAA,GAErDyB,CAAAA,CAAYH,EAAGpB,IAAM,CAAA,EAAA,CAAA,MAMlC,CAAA,KAAAU,GAAA,UAAAc,GAAA,CAnEM,SAAAA,IAAA,CAAWC,CAChB,MAAO,CACLC,CAAG,CAAAC,gBAAA,GAAAA,gBAAA,CAAAX,sBAAA,kvCA8CN,EAEM,MArDiCY,GACIC,EAAA,CAA3CC,CAAAA,CAAS,CAAEC,IAAAA,CAAMC,QAASC,OAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAqBhC,CAAAiC,CAAAA,SAAAA,CAAA,WAAA,EAD9CjC,CAAAA,CAAAA,CAAAA,CAAoB4B,CAAA,CAAA,CADhCM,EAAc,yBACFlC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA"}
1
+ {"version":3,"file":"table-menu.cjs.js","sources":["../../../../src/nile-wysiwyg-editor/ui/table-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 { CommandName } from '../engine/commands';\nimport '../../nile-lite-tooltip/nile-lite-tooltip';\n\ninterface TableOp {\n name: CommandName;\n label: string;\n icon: string;\n}\n\nconst OPS: TableOp[] = [\n { name: 'addRowBefore', label: 'Add row above', icon: 'ng-between-vertical-start' },\n { name: 'addRowAfter', label: 'Add row below', icon: 'ng-between-vertical-end' },\n { name: 'addColumnBefore', label: 'Add column left', icon: 'ng-between-horizontal-start' },\n { name: 'addColumnAfter', label: 'Add column right', icon: 'ng-between-horizontal-end' },\n { name: 'deleteRow', label: 'Delete row', icon: 'ng-rows-2' },\n { name: 'deleteColumn', label: 'Delete column', icon: 'ng-columns-2' },\n { name: 'mergeCells', label: 'Merge cells', icon: 'ng-table-cells-merge' },\n { name: 'splitCell', label: 'Split cell', icon: 'ng-table-cells-split' },\n { name: 'toggleHeaderRow', label: 'Toggle header row', icon: 'ng-panel-top' },\n { name: 'toggleLayoutTable', label: 'Toggle layout table (borderless)', icon: 'ng-grid-2x2' },\n { name: 'deleteTable', label: 'Delete table', icon: 'ng-trash-2' },\n];\n\n/**\n * Compact floating bar shown while the cursor is inside a table. The host\n * positions it; operations bubble up as `wysiwyg-command` events.\n */\n@customElement('nile-wysiwyg-table-menu')\nexport class NileWysiwygTableMenu extends NileElement {\n @property({ type: Boolean, reflect: true }) open = false;\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 .menu {\n display: flex;\n gap: 2px;\n padding: 4px;\n background: var(--nile-wysiwyg-popover-bg, #ffffff);\n border: 1px solid var(--nile-colors-neutral-400, #d0d5dd);\n border-radius: 8px;\n box-shadow: var(--nile-wysiwyg-popover-shadow, 0 4px 12px rgba(16, 24, 40, 0.12));\n }\n\n button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 26px;\n height: 26px;\n padding: 0 4px;\n border: none;\n border-radius: 5px;\n background: transparent;\n cursor: pointer;\n font-size: 12px;\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 ];\n }\n\n public render(): TemplateResult {\n return html`\n <div class=\"menu\" part=\"table-menu\" @mousedown=${(e: Event) => e.preventDefault()}>\n ${OPS.map(\n op => html`\n <nile-lite-tooltip content=${op.label} placement=\"top\">\n <button\n type=\"button\"\n aria-label=${op.label}\n @click=${() => this.emit('wysiwyg-command', { name: op.name })}\n >\n ${renderGlyph(op.icon, 16)}\n </button>\n </nile-lite-tooltip>\n `\n )}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-wysiwyg-table-menu': NileWysiwygTableMenu;\n }\n}\n"],"names":["OPS","name","label","icon","NileWysiwygTableMenu","_i","s","constructor","this","open","_this","_inherits","_createClass","key","value","render","_this2","html","_templateObject","_taggedTemplateLiteral","e","preventDefault","map","op","_templateObject2","emit","renderGlyph","get","styles","css","_templateObject3","NileElement","__decorate","property","type","Boolean","reflect","prototype","customElement"],"mappings":"w5HAaMA,CAAAA,CAAiB,CACrB,CAAEC,IAAM,CAAA,cAAA,CAAgBC,KAAO,CAAA,eAAA,CAAiBC,KAAM,2BACtD,CAAA,CAAA,CAAEF,IAAM,CAAA,aAAA,CAAeC,KAAO,CAAA,eAAA,CAAiBC,IAAM,CAAA,yBAAA,CAAA,CACrD,CAAEF,IAAAA,CAAM,iBAAmBC,CAAAA,KAAAA,CAAO,iBAAmBC,CAAAA,IAAAA,CAAM,+BAC3D,CAAEF,IAAAA,CAAM,gBAAkBC,CAAAA,KAAAA,CAAO,kBAAoBC,CAAAA,IAAAA,CAAM,2BAC3D,CAAA,CAAA,CAAEF,IAAM,CAAA,WAAA,CAAaC,KAAO,CAAA,YAAA,CAAcC,IAAM,CAAA,WAAA,CAAA,CAChD,CAAEF,IAAM,CAAA,cAAA,CAAgBC,KAAO,CAAA,eAAA,CAAiBC,IAAM,CAAA,cAAA,CAAA,CACtD,CAAEF,IAAAA,CAAM,YAAcC,CAAAA,KAAAA,CAAO,aAAeC,CAAAA,IAAAA,CAA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AA,CAAWC,CAChB,MAAO,CACLC,CAAG,CAAAC,gBAAA,GAAAA,gBAAA,CAAAX,sBAAA,kvCA8CN,EAEM,MArDiCY,GACIC,EAAA,CAA3CC,CAAAA,CAAS,CAAEC,IAAAA,CAAMC,QAASC,OAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAqBhC,CAAAiC,CAAAA,SAAAA,CAAA,WAAA,EAD9CjC,CAAAA,CAAAA,CAAAA,CAAoB4B,CAAA,CAAA,CADhCM,EAAc,yBACFlC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA"}
@@ -1,4 +1,4 @@
1
- import{__decorate as e}from"tslib";import{css as l,html as n}from"lit";import{property as o,customElement as t}from"lit/decorators.js";import{N as a}from"../../internal/nile-element.esm.js";import{r}from"../../internal/glyph.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 i=[{name:"addRowBefore",label:"Add row above",icon:"ng-between-vertical-start"},{name:"addRowAfter",label:"Add row below",icon:"ng-between-vertical-end"},{name:"addColumnBefore",label:"Add column left",icon:"ng-between-horizontal-start"},{name:"addColumnAfter",label:"Add column right",icon:"ng-between-horizontal-end"},{name:"deleteRow",label:"Delete row",icon:"ng-rows-2"},{name:"deleteColumn",label:"Delete column",icon:"ng-columns-2"},{name:"mergeCells",label:"Merge cells",icon:"ng-table-cells-merge"},{name:"splitCell",label:"Split cell",icon:"ng-table-cells-split"},{name:"toggleHeaderRow",label:"Toggle header row",icon:"ng-panel-top"},{name:"toggleLayoutTable",label:"Toggle layout table (borderless)",icon:"ng-grid-2x2"},{name:"deleteTable",label:"Delete table",icon:"ng-trash-2"}];let s=class extends a{constructor(){super(...arguments),this.open=!1}static get styles(){return[l`
1
+ import{__decorate as e}from"tslib";import{css as l,html as t}from"lit";import{property as o,customElement as n}from"lit/decorators.js";import{N as i}from"../../internal/nile-element.esm.js";import{r as a}from"../../internal/glyph.esm.js";import"../../nile-lite-tooltip/nile-lite-tooltip.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";import"../../nile-lite-tooltip/nile-lite-tooltip.css.esm.js";import"../../tippy.esm-57628c2b.esm.js";import"../../nile-lite-tooltip/utils.esm.js";import"../../utilities/visibility-manager.esm.js";const r=[{name:"addRowBefore",label:"Add row above",icon:"ng-between-vertical-start"},{name:"addRowAfter",label:"Add row below",icon:"ng-between-vertical-end"},{name:"addColumnBefore",label:"Add column left",icon:"ng-between-horizontal-start"},{name:"addColumnAfter",label:"Add column right",icon:"ng-between-horizontal-end"},{name:"deleteRow",label:"Delete row",icon:"ng-rows-2"},{name:"deleteColumn",label:"Delete column",icon:"ng-columns-2"},{name:"mergeCells",label:"Merge cells",icon:"ng-table-cells-merge"},{name:"splitCell",label:"Split cell",icon:"ng-table-cells-split"},{name:"toggleHeaderRow",label:"Toggle header row",icon:"ng-panel-top"},{name:"toggleLayoutTable",label:"Toggle layout table (borderless)",icon:"ng-grid-2x2"},{name:"deleteTable",label:"Delete table",icon:"ng-trash-2"}];let s=class extends i{constructor(){super(...arguments),this.open=!1}static get styles(){return[l`
2
2
  :host {
3
3
  font-family: var(
4
4
  --nile-font-family-sans-serif,
@@ -42,17 +42,18 @@ import{__decorate as e}from"tslib";import{css as l,html as n}from"lit";import{pr
42
42
  button:hover {
43
43
  background: var(--nile-colors-neutral-100, #f2f4f7);
44
44
  }
45
- `]}render(){return n`
45
+ `]}render(){return t`
46
46
  <div class="menu" part="table-menu" @mousedown=${e=>e.preventDefault()}>
47
- ${i.map((e=>n`
48
- <button
49
- type="button"
50
- title=${e.label}
51
- aria-label=${e.label}
52
- @click=${()=>this.emit("wysiwyg-command",{name:e.name})}
53
- >
54
- ${r(e.icon,16)}
55
- </button>
47
+ ${r.map((e=>t`
48
+ <nile-lite-tooltip content=${e.label} placement="top">
49
+ <button
50
+ type="button"
51
+ aria-label=${e.label}
52
+ @click=${()=>this.emit("wysiwyg-command",{name:e.name})}
53
+ >
54
+ ${a(e.icon,16)}
55
+ </button>
56
+ </nile-lite-tooltip>
56
57
  `))}
57
58
  </div>
58
- `}};e([o({type:Boolean,reflect:!0})],s.prototype,"open",void 0),s=e([t("nile-wysiwyg-table-menu")],s);
59
+ `}};e([o({type:Boolean,reflect:!0})],s.prototype,"open",void 0),s=e([n("nile-wysiwyg-table-menu")],s);
@@ -138,8 +138,11 @@ export { NileMarkdownEditor } from './nile-markdown-editor';
138
138
  export { NileWysiwygEditor, DEFAULT_TOOLBAR } from './nile-wysiwyg-editor/index';
139
139
  export type { WysiwygChangeDetail, WysiwygCommandDetail, ToolbarConfig, } from './nile-wysiwyg-editor/index';
140
140
  export { NileWysiwygToolbar } from './nile-wysiwyg-editor/nile-wysiwyg-toolbar/index';
141
+ export { NileWysiwygToolbarItem } from './nile-wysiwyg-editor/nile-wysiwyg-toolbar/index';
142
+ export type { AuthoredToolbarItem } from './nile-wysiwyg-editor/nile-wysiwyg-toolbar/index';
141
143
  export { NileWysiwygLinkEditor } from './nile-wysiwyg-editor/ui/link-editor';
142
144
  export { NileWysiwygBubbleMenu } from './nile-wysiwyg-editor/ui/bubble-menu';
145
+ export { NileWysiwygBubbleItem } from './nile-wysiwyg-editor/ui/bubble-item';
143
146
  export { NileWysiwygImagePanel } from './nile-wysiwyg-editor/ui/image-panel';
144
147
  export { NileWysiwygTableMenu } from './nile-wysiwyg-editor/ui/table-menu';
145
148
  export { NileWysiwygTablePicker } from './nile-wysiwyg-editor/ui/table-grid-picker';
@@ -157,5 +160,7 @@ export { NileWysiwygMathPanel } from './nile-wysiwyg-editor/ui/math-panel';
157
160
  export type { SuggestItem } from './nile-wysiwyg-editor/ui/suggest-list';
158
161
  export type { MentionsConfig, MergeFieldConfig, TemplateConfig, } from './nile-wysiwyg-editor/types';
159
162
  export type { MathRenderer } from './nile-wysiwyg-editor/engine/plugins/math-view';
163
+ export { createKatexRenderer } from './nile-wysiwyg-editor/math/katex-renderer';
164
+ export type { KatexLike, KatexRendererOptions, } from './nile-wysiwyg-editor/math/katex-renderer';
160
165
  export { createSchema, defaultSchema, sanitizeHtml, htmlToDoc, docToHtml, docToMarkdown, markdownToHtml, looksLikeMarkdown, docToJson, jsonToDoc, computeToolbarState, createEditorState, toInlineStyledHtml, buildWordDocument, buildPrintDocument, } from './nile-wysiwyg-editor/engine';
161
166
  export type { ToolbarState, CommandName, CommandAttrs, Alignment, PrintOptions, } from './nile-wysiwyg-editor/engine';
package/dist/src/index.js CHANGED
@@ -138,8 +138,10 @@ export { NileMarkdownEditor } from './nile-markdown-editor';
138
138
  // nile-wysiwyg-editor — ProseMirror-powered rich text editor
139
139
  export { NileWysiwygEditor, DEFAULT_TOOLBAR } from './nile-wysiwyg-editor/index';
140
140
  export { NileWysiwygToolbar } from './nile-wysiwyg-editor/nile-wysiwyg-toolbar/index';
141
+ export { NileWysiwygToolbarItem } from './nile-wysiwyg-editor/nile-wysiwyg-toolbar/index';
141
142
  export { NileWysiwygLinkEditor } from './nile-wysiwyg-editor/ui/link-editor';
142
143
  export { NileWysiwygBubbleMenu } from './nile-wysiwyg-editor/ui/bubble-menu';
144
+ export { NileWysiwygBubbleItem } from './nile-wysiwyg-editor/ui/bubble-item';
143
145
  export { NileWysiwygImagePanel } from './nile-wysiwyg-editor/ui/image-panel';
144
146
  export { NileWysiwygTableMenu } from './nile-wysiwyg-editor/ui/table-menu';
145
147
  export { NileWysiwygTablePicker } from './nile-wysiwyg-editor/ui/table-grid-picker';
@@ -153,5 +155,6 @@ export { NileWysiwygImageMenu } from './nile-wysiwyg-editor/ui/image-menu';
153
155
  export { NileWysiwygSpecialChars } from './nile-wysiwyg-editor/ui/special-chars';
154
156
  export { NileWysiwygInsertMenu } from './nile-wysiwyg-editor/ui/insert-menu';
155
157
  export { NileWysiwygMathPanel } from './nile-wysiwyg-editor/ui/math-panel';
158
+ export { createKatexRenderer } from './nile-wysiwyg-editor/math/katex-renderer';
156
159
  export { createSchema, defaultSchema, sanitizeHtml, htmlToDoc, docToHtml, docToMarkdown, markdownToHtml, looksLikeMarkdown, docToJson, jsonToDoc, computeToolbarState, createEditorState, toInlineStyledHtml, buildWordDocument, buildPrintDocument, } from './nile-wysiwyg-editor/engine';
157
160
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,C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,kDAAkD,CAAC;AACtF,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AACpF,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAE7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAQ3E,OAAO,EACL,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,SAAS,EACT,SAAS,EACT,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,SAAS,EACT,SAAS,EACT,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,8BAA8B,CAAC","sourcesContent":["export { NileButton } from './nile-button';\nexport { NileHeading } from './nile-heading';\nexport { NileIcon } from './nile-icon';\nexport { NileInput } from './nile-input';\nexport { NileOtpInput } from './nile-otp-input';\nexport { NileMenu } from './nile-menu';\nexport { NileBadge } from './nile-badge';\nexport { NileStatusLight } from './nile-status-light';\nexport { NileDrawer } from './nile-drawer';\nexport { NileCheckbox } from './nile-checkbox';\nexport { NileCheckboxGroup } from './nile-checkbox-group';\nexport { NileRadio } from './nile-radio';\nexport { NileRadioGroup } from './nile-radio-group';\nexport { NilePopup } from './nile-popup';\nexport { NileTooltip } from './nile-tooltip';\nexport { NileSlideToggle } from './nile-slide-toggle';\nexport { NileLoader } from './nile-loader';\nexport { NileProgressBar } from './nile-progress-bar';\nexport { NileSpinner } from './nile-spinner';\nexport { NileSkeletonLoader } from './nile-skeleton-loader';\nexport { NileSelect } from './nile-select';\nexport { NileVirtualSelect } from './nile-virtual-select';\nexport { NileOption } from './nile-option';\nexport { NileTag } from './nile-tag';\nexport { NileIconButton } from './nile-icon-button';\nexport { NileMenuItem } from './nile-menu-item';\nexport { NileDropdown } from './nile-dropdown';\nexport { NileAutoComplete } from './nile-auto-complete';\nexport { NileCombobox } from './nile-combobox';\nexport { NileChip } from './nile-chip';\nexport { NileTextarea } from './nile-textarea';\nexport { NileDatePicker } from './nile-date-picker';\nexport { NileErrorMessage } from './nile-error-message';\nexport { NileFormErrorMessage } from './nile-form-error-message';\nexport { NileFormHelpText } from './nile-form-help-text';\nexport { NileCalendar } from './nile-calendar';\nexport { NileLink } from './nile-link';\nexport { NileButtonToggleGroup } from './nile-button-toggle-group';\nexport { NileButtonToggle } from './nile-button-toggle';\nexport { NileSwitcher } from './nile-switcher';\nexport { NileContentEditor } from './nile-content-editor';\nexport { NileDialog } from './nile-dialog';\nexport { NileErrorNotification } from './nile-error-notification';\nexport { NileTabGroup } from './nile-tab-group';\nexport { NileTab } from './nile-tab';\nexport { NileTabPanel } from './nile-tab-panel';\nexport { NileCodeEditor } from './nile-code-editor';\nexport { NileToast } from './nile-toast';\nexport { NileBreadcrumb } from './nile-breadcrumb';\nexport { NileBreadcrumbItem } from './nile-breadcrumb-item';\nexport { NileFormGroup } from './nile-form-group';\nexport { NileCard } from './nile-card';\nexport { NileCarousel } from './nile-carousel';\nexport { NileCarouselItem } from './nile-carousel/nile-carousel-item';\nexport { NilePopover } from './nile-popover';\nexport { NileButtonFilter } from './nile-button-filter';\nexport { NileCircularProgressbar } from './nile-circular-progressbar';\nexport { NileTableCellItem } from './nile-table-cell-item';\nexport { NileTableRow } from './nile-table-row';\nexport { NileTableBody } from './nile-table-body';\nexport { NileTableHeaderItem } from './nile-table-header-item';\nexport { NileAvatar } from './nile-avatar';\nexport { NilePageHeader } from './nile-page-header';\nexport { NileEmptyState } from './nile-empty-state';\nexport { NileHero } from './nile-hero';\nexport { NileStepperItem } from './nile-stepper-item';\nexport { NileStepper } from './nile-stepper';\nexport { NileDotStepper } from './nile-dot-stepper';\nexport { NileHeroHeader } from './nile-hero-header';\nexport { NileVerticalStepperItem } from './nile-vertical-stepper-item';\nexport { NileFormatDate } from './nile-format-date';\nexport { NileSplitPanel } from './nile-split-panel';\nexport { NileTree } from './nile-tree';\nexport { NileTreeItem } from './nile-tree-item';\nexport { NileListItem } from './nile-list-item';\nexport { NileList } from './nile-list';\nexport { NileAccordion } from './nile-accordion';\nexport { NileDivider } from './nile-divider';\nexport { NileTitle } from './nile-title';\nexport { NileSectionMessage } from './nile-section-message';\nexport { NileToolbar } from './nile-toolbar';\nexport { NileInlineEdit } from './nile-inline-edit';\nexport { NileTable } from './nile-table';\nexport { NileFilterChip } from './nile-filter-chip';\nexport {NilePagination } from './nile-pagination';\nexport { NileSlider } from './nile-slider';\nexport { NileFileUpload } from './nile-file-upload';\nexport { NileFilePreview } from './nile-file-preview';\nexport { NileOptionGroup } from './nile-option-group';\nexport { NileGrid } from './nile-grid';\nexport { NileGridBody } from './nile-grid/nile-grid-body';\nexport { NileGridRow } from './nile-grid/nile-grid-row';\nexport { NileGridHeadItem } from './nile-grid/nile-grid-head-item';\nexport { NileGridCellItem } from './nile-grid/nile-grid-cell-item';\nexport { NileGridHead } from './nile-grid/nile-grid-head';\nexport { NileRichTextEditor } from './nile-rich-text-editor';\nexport { NileColorPicker } from './nile-color-picker';\nexport type { ColorPickerType, SwatchTooltip, PaletteEntry } from './nile-color-picker';\nexport { NileColorSwatch } from './nile-color-swatch';\n\n// Import version utility to set nile version in window object\nimport './version';\n\nexport { NileSideBar } from './nile-side-bar';\nexport { NileSideBarHeader } from './nile-side-bar-header';\nexport { NileSideBarLogo } from './nile-side-bar-logo';\nexport { NileSideBarExpand } from './nile-side-bar-expand';\nexport { NileSideBarGroup } from './nile-side-bar-group';\nexport { NileSideBarGroupItem } from './nile-side-bar-group-item';\nexport { NileSideBarGroupItemIcon } from './nile-side-bar-group-item-icon';\nexport { NileSideBarGroupItemText } from './nile-side-bar-group-item-text';\nexport { NileSideBarFooter } from './nile-side-bar-footer';\nexport { NileSideBarFooterItem } from './nile-side-bar-footer-item';\nexport { NileSideBarAction } from './nile-side-bar-action';\nexport { NileSideBarFooterText } from './nile-side-bar-footer-text';\nexport { NileSideBarActionMenuItem } from './nile-side-bar-action-menu-item';\nexport { NileSideBarActionMenu } from './nile-side-bar-action-menu';\nexport { NileInlineSidebarGroup } from './nile-inline-sidebar-group';\nexport { NileInlineSidebar } from './nile-inline-sidebar';\nexport { NileInlineSidebarItem } from './nile-inline-sidebar-item';\nexport { NileInlineSidebarPanel } from './nile-inline-sidebar-panel';\nexport { NileInlineSidebarPanelGroup } from './nile-inline-sidebar-panel-group';\nexport { NileliteTooltip } from './nile-lite-tooltip';\nexport { NileSideBarPanel } from './nile-side-bar-panel';\nexport { NileDetail } from './nile-detail';\nexport { NileQrCode } from './nile-qr-code';\nexport { NileNavTab } from './nile-nav-tab';\nexport { NileNavTabGroup } from './nile-nav-tab-group';\nexport { NileNavTabPanel } from './nile-nav-tab-panel';\nexport { NileFloatingPanel } from './nile-floating-panel';\nexport { NileContextMenu } from './nile-context-menu';\nexport { NileContextMenuGroup } from './nile-context-menu-group';\nexport { NileContextMenuItem } from './nile-context-menu-item';\nexport { NileCommandMenu } from './nile-command-menu';\nexport { NileCommandMenuGroup } from './nile-command-menu-group';\nexport { NileCommandMenuItem } from './nile-command-menu-item';\nexport { NileInlineSidebarItemHeader } from './nile-inline-sidebar-item-header';\nexport { NileInlineSidebarItemBody } from './nile-inline-sidebar-item-body';\nexport { NileMarkdown } from './nile-markdown';\nexport { NileMarkdownEditor } from './nile-markdown-editor';\n\n// nile-wysiwyg-editor — ProseMirror-powered rich text editor\nexport { NileWysiwygEditor, DEFAULT_TOOLBAR } from './nile-wysiwyg-editor/index';\nexport type {\n WysiwygChangeDetail,\n WysiwygCommandDetail,\n ToolbarConfig,\n} from './nile-wysiwyg-editor/index';\nexport { NileWysiwygToolbar } from './nile-wysiwyg-editor/nile-wysiwyg-toolbar/index';\nexport { NileWysiwygLinkEditor } from './nile-wysiwyg-editor/ui/link-editor';\nexport { NileWysiwygBubbleMenu } from './nile-wysiwyg-editor/ui/bubble-menu';\nexport { NileWysiwygImagePanel } from './nile-wysiwyg-editor/ui/image-panel';\nexport { NileWysiwygTableMenu } from './nile-wysiwyg-editor/ui/table-menu';\nexport { NileWysiwygTablePicker } from './nile-wysiwyg-editor/ui/table-grid-picker';\nexport { NileWysiwygSuggestList } from './nile-wysiwyg-editor/ui/suggest-list';\nexport { NileWysiwygFindBar } from './nile-wysiwyg-editor/ui/find-replace';\nexport { NileWysiwygSourceView } from './nile-wysiwyg-editor/ui/source-view';\nexport { NileWysiwygEmbedPanel } from './nile-wysiwyg-editor/ui/embed-panel';\nexport { NileWysiwygCodeMenu } from './nile-wysiwyg-editor/ui/code-block-menu';\nexport { NileWysiwygShortcutHelp } from './nile-wysiwyg-editor/ui/shortcut-help';\nexport { NileWysiwygImageMenu } from './nile-wysiwyg-editor/ui/image-menu';\nexport { NileWysiwygSpecialChars } from './nile-wysiwyg-editor/ui/special-chars';\nexport { NileWysiwygInsertMenu } from './nile-wysiwyg-editor/ui/insert-menu';\nexport type { InsertMenuItem } from './nile-wysiwyg-editor/ui/insert-menu';\nexport { NileWysiwygMathPanel } from './nile-wysiwyg-editor/ui/math-panel';\nexport type { SuggestItem } from './nile-wysiwyg-editor/ui/suggest-list';\nexport type {\n MentionsConfig,\n MergeFieldConfig,\n TemplateConfig,\n} from './nile-wysiwyg-editor/types';\nexport type { MathRenderer } from './nile-wysiwyg-editor/engine/plugins/math-view';\nexport {\n createSchema,\n defaultSchema,\n sanitizeHtml,\n htmlToDoc,\n docToHtml,\n docToMarkdown,\n markdownToHtml,\n looksLikeMarkdown,\n docToJson,\n jsonToDoc,\n computeToolbarState,\n createEditorState,\n toInlineStyledHtml,\n buildWordDocument,\n buildPrintDocument,\n} from './nile-wysiwyg-editor/engine';\nexport type {\n ToolbarState,\n CommandName,\n CommandAttrs,\n Alignment,\n PrintOptions,\n} from './nile-wysiwyg-editor/engine';"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,g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,EACb,YAAY,EACZ,SAAS,EACT,SAAS,EACT,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,SAAS,EACT,SAAS,EACT,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,8BAA8B,CAAC","sourcesContent":["export { NileButton } from './nile-button';\nexport { NileHeading } from './nile-heading';\nexport { NileIcon } from './nile-icon';\nexport { NileInput } from './nile-input';\nexport { NileOtpInput } from './nile-otp-input';\nexport { NileMenu } from './nile-menu';\nexport { NileBadge } from './nile-badge';\nexport { NileStatusLight } from './nile-status-light';\nexport { NileDrawer } from './nile-drawer';\nexport { NileCheckbox } from './nile-checkbox';\nexport { NileCheckboxGroup } from './nile-checkbox-group';\nexport { NileRadio } from './nile-radio';\nexport { NileRadioGroup } from './nile-radio-group';\nexport { NilePopup } from './nile-popup';\nexport { NileTooltip } from './nile-tooltip';\nexport { NileSlideToggle } from './nile-slide-toggle';\nexport { NileLoader } from './nile-loader';\nexport { NileProgressBar } from './nile-progress-bar';\nexport { NileSpinner } from './nile-spinner';\nexport { NileSkeletonLoader } from './nile-skeleton-loader';\nexport { NileSelect } from './nile-select';\nexport { NileVirtualSelect } from './nile-virtual-select';\nexport { NileOption } from './nile-option';\nexport { NileTag } from './nile-tag';\nexport { NileIconButton } from './nile-icon-button';\nexport { NileMenuItem } from './nile-menu-item';\nexport { NileDropdown } from './nile-dropdown';\nexport { NileAutoComplete } from './nile-auto-complete';\nexport { NileCombobox } from './nile-combobox';\nexport { NileChip } from './nile-chip';\nexport { NileTextarea } from './nile-textarea';\nexport { NileDatePicker } from './nile-date-picker';\nexport { NileErrorMessage } from './nile-error-message';\nexport { NileFormErrorMessage } from './nile-form-error-message';\nexport { NileFormHelpText } from './nile-form-help-text';\nexport { NileCalendar } from './nile-calendar';\nexport { NileLink } from './nile-link';\nexport { NileButtonToggleGroup } from './nile-button-toggle-group';\nexport { NileButtonToggle } from './nile-button-toggle';\nexport { NileSwitcher } from './nile-switcher';\nexport { NileContentEditor } from './nile-content-editor';\nexport { NileDialog } from './nile-dialog';\nexport { NileErrorNotification } from './nile-error-notification';\nexport { NileTabGroup } from './nile-tab-group';\nexport { NileTab } from './nile-tab';\nexport { NileTabPanel } from './nile-tab-panel';\nexport { NileCodeEditor } from './nile-code-editor';\nexport { NileToast } from './nile-toast';\nexport { NileBreadcrumb } from './nile-breadcrumb';\nexport { NileBreadcrumbItem } from './nile-breadcrumb-item';\nexport { NileFormGroup } from './nile-form-group';\nexport { NileCard } from './nile-card';\nexport { NileCarousel } from './nile-carousel';\nexport { NileCarouselItem } from './nile-carousel/nile-carousel-item';\nexport { NilePopover } from './nile-popover';\nexport { NileButtonFilter } from './nile-button-filter';\nexport { NileCircularProgressbar } from './nile-circular-progressbar';\nexport { NileTableCellItem } from './nile-table-cell-item';\nexport { NileTableRow } from './nile-table-row';\nexport { NileTableBody } from './nile-table-body';\nexport { NileTableHeaderItem } from './nile-table-header-item';\nexport { NileAvatar } from './nile-avatar';\nexport { NilePageHeader } from './nile-page-header';\nexport { NileEmptyState } from './nile-empty-state';\nexport { NileHero } from './nile-hero';\nexport { NileStepperItem } from './nile-stepper-item';\nexport { NileStepper } from './nile-stepper';\nexport { NileDotStepper } from './nile-dot-stepper';\nexport { NileHeroHeader } from './nile-hero-header';\nexport { NileVerticalStepperItem } from './nile-vertical-stepper-item';\nexport { NileFormatDate } from './nile-format-date';\nexport { NileSplitPanel } from './nile-split-panel';\nexport { NileTree } from './nile-tree';\nexport { NileTreeItem } from './nile-tree-item';\nexport { NileListItem } from './nile-list-item';\nexport { NileList } from './nile-list';\nexport { NileAccordion } from './nile-accordion';\nexport { NileDivider } from './nile-divider';\nexport { NileTitle } from './nile-title';\nexport { NileSectionMessage } from './nile-section-message';\nexport { NileToolbar } from './nile-toolbar';\nexport { NileInlineEdit } from './nile-inline-edit';\nexport { NileTable } from './nile-table';\nexport { NileFilterChip } from './nile-filter-chip';\nexport {NilePagination } from './nile-pagination';\nexport { NileSlider } from './nile-slider';\nexport { NileFileUpload } from './nile-file-upload';\nexport { NileFilePreview } from './nile-file-preview';\nexport { NileOptionGroup } from './nile-option-group';\nexport { NileGrid } from './nile-grid';\nexport { NileGridBody } from './nile-grid/nile-grid-body';\nexport { NileGridRow } from './nile-grid/nile-grid-row';\nexport { NileGridHeadItem } from './nile-grid/nile-grid-head-item';\nexport { NileGridCellItem } from './nile-grid/nile-grid-cell-item';\nexport { NileGridHead } from './nile-grid/nile-grid-head';\nexport { NileRichTextEditor } from './nile-rich-text-editor';\nexport { NileColorPicker } from './nile-color-picker';\nexport type { ColorPickerType, SwatchTooltip, PaletteEntry } from './nile-color-picker';\nexport { NileColorSwatch } from './nile-color-swatch';\n\n// Import version utility to set nile version in window object\nimport './version';\n\nexport { NileSideBar } from './nile-side-bar';\nexport { NileSideBarHeader } from './nile-side-bar-header';\nexport { NileSideBarLogo } from './nile-side-bar-logo';\nexport { NileSideBarExpand } from './nile-side-bar-expand';\nexport { NileSideBarGroup } from './nile-side-bar-group';\nexport { NileSideBarGroupItem } from './nile-side-bar-group-item';\nexport { NileSideBarGroupItemIcon } from './nile-side-bar-group-item-icon';\nexport { NileSideBarGroupItemText } from './nile-side-bar-group-item-text';\nexport { NileSideBarFooter } from './nile-side-bar-footer';\nexport { NileSideBarFooterItem } from './nile-side-bar-footer-item';\nexport { NileSideBarAction } from './nile-side-bar-action';\nexport { NileSideBarFooterText } from './nile-side-bar-footer-text';\nexport { NileSideBarActionMenuItem } from './nile-side-bar-action-menu-item';\nexport { NileSideBarActionMenu } from './nile-side-bar-action-menu';\nexport { NileInlineSidebarGroup } from './nile-inline-sidebar-group';\nexport { NileInlineSidebar } from './nile-inline-sidebar';\nexport { NileInlineSidebarItem } from './nile-inline-sidebar-item';\nexport { NileInlineSidebarPanel } from './nile-inline-sidebar-panel';\nexport { NileInlineSidebarPanelGroup } from './nile-inline-sidebar-panel-group';\nexport { NileliteTooltip } from './nile-lite-tooltip';\nexport { NileSideBarPanel } from './nile-side-bar-panel';\nexport { NileDetail } from './nile-detail';\nexport { NileQrCode } from './nile-qr-code';\nexport { NileNavTab } from './nile-nav-tab';\nexport { NileNavTabGroup } from './nile-nav-tab-group';\nexport { NileNavTabPanel } from './nile-nav-tab-panel';\nexport { NileFloatingPanel } from './nile-floating-panel';\nexport { NileContextMenu } from './nile-context-menu';\nexport { NileContextMenuGroup } from './nile-context-menu-group';\nexport { NileContextMenuItem } from './nile-context-menu-item';\nexport { NileCommandMenu } from './nile-command-menu';\nexport { NileCommandMenuGroup } from './nile-command-menu-group';\nexport { NileCommandMenuItem } from './nile-command-menu-item';\nexport { NileInlineSidebarItemHeader } from './nile-inline-sidebar-item-header';\nexport { NileInlineSidebarItemBody } from './nile-inline-sidebar-item-body';\nexport { NileMarkdown } from './nile-markdown';\nexport { NileMarkdownEditor } from './nile-markdown-editor';\n\n// nile-wysiwyg-editor — ProseMirror-powered rich text editor\nexport { NileWysiwygEditor, DEFAULT_TOOLBAR } from './nile-wysiwyg-editor/index';\nexport type {\n WysiwygChangeDetail,\n WysiwygCommandDetail,\n ToolbarConfig,\n} from './nile-wysiwyg-editor/index';\nexport { NileWysiwygToolbar } from './nile-wysiwyg-editor/nile-wysiwyg-toolbar/index';\nexport { NileWysiwygToolbarItem } from './nile-wysiwyg-editor/nile-wysiwyg-toolbar/index';\nexport type { AuthoredToolbarItem } from './nile-wysiwyg-editor/nile-wysiwyg-toolbar/index';\nexport { NileWysiwygLinkEditor } from './nile-wysiwyg-editor/ui/link-editor';\nexport { NileWysiwygBubbleMenu } from './nile-wysiwyg-editor/ui/bubble-menu';\nexport { NileWysiwygBubbleItem } from './nile-wysiwyg-editor/ui/bubble-item';\nexport { NileWysiwygImagePanel } from './nile-wysiwyg-editor/ui/image-panel';\nexport { NileWysiwygTableMenu } from './nile-wysiwyg-editor/ui/table-menu';\nexport { NileWysiwygTablePicker } from './nile-wysiwyg-editor/ui/table-grid-picker';\nexport { NileWysiwygSuggestList } from './nile-wysiwyg-editor/ui/suggest-list';\nexport { NileWysiwygFindBar } from './nile-wysiwyg-editor/ui/find-replace';\nexport { NileWysiwygSourceView } from './nile-wysiwyg-editor/ui/source-view';\nexport { NileWysiwygEmbedPanel } from './nile-wysiwyg-editor/ui/embed-panel';\nexport { NileWysiwygCodeMenu } from './nile-wysiwyg-editor/ui/code-block-menu';\nexport { NileWysiwygShortcutHelp } from './nile-wysiwyg-editor/ui/shortcut-help';\nexport { NileWysiwygImageMenu } from './nile-wysiwyg-editor/ui/image-menu';\nexport { NileWysiwygSpecialChars } from './nile-wysiwyg-editor/ui/special-chars';\nexport { NileWysiwygInsertMenu } from './nile-wysiwyg-editor/ui/insert-menu';\nexport type { InsertMenuItem } from './nile-wysiwyg-editor/ui/insert-menu';\nexport { NileWysiwygMathPanel } from './nile-wysiwyg-editor/ui/math-panel';\nexport type { SuggestItem } from './nile-wysiwyg-editor/ui/suggest-list';\nexport type {\n MentionsConfig,\n MergeFieldConfig,\n TemplateConfig,\n} from './nile-wysiwyg-editor/types';\nexport type { MathRenderer } from './nile-wysiwyg-editor/engine/plugins/math-view';\nexport { createKatexRenderer } from './nile-wysiwyg-editor/math/katex-renderer';\nexport type {\n KatexLike,\n KatexRendererOptions,\n} from './nile-wysiwyg-editor/math/katex-renderer';\nexport {\n createSchema,\n defaultSchema,\n sanitizeHtml,\n htmlToDoc,\n docToHtml,\n docToMarkdown,\n markdownToHtml,\n looksLikeMarkdown,\n docToJson,\n jsonToDoc,\n computeToolbarState,\n createEditorState,\n toInlineStyledHtml,\n buildWordDocument,\n buildPrintDocument,\n} from './nile-wysiwyg-editor/engine';\nexport type {\n ToolbarState,\n CommandName,\n CommandAttrs,\n Alignment,\n PrintOptions,\n} from './nile-wysiwyg-editor/engine';"]}
@@ -84,6 +84,7 @@ let NileCheckbox = class NileCheckbox extends NileElement {
84
84
  handleClick() {
85
85
  this.checked = !this.checked;
86
86
  this.indeterminate = false;
87
+ this.input.focus();
87
88
  this.emit('nile-change', { checked: this.checked });
88
89
  this.emit('valueChange', { checked: this.checked });
89
90
  }
@@ -1 +1 @@
1
- {"version":3,"file":"nile-checkbox.js","sourceRoot":"","sources":["../../../src/nile-checkbox/nile-checkbox.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAEL,IAAI,GAGL,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAGnD;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;;GAKG;AAEI,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,WAAW;IAC3C;QACE,KAAK,EAAE,CAAC;QAOO,aAAQ,GAAG,KAAK,CAAC;QAEtB,UAAK,GAAG,EAAE,CAAC,CAAC,gCAAgC;QAExD,+EAA+E;QACnE,SAAI,GAAG,EAAE,CAAC;QAKtB,2BAA2B;QACE,SAAI,GAAiC,QAAQ,CAAC;QAE3E,6BAA6B;QACe,aAAQ,GAAG,KAAK,CAAC;QAE7D,6CAA6C;QACD,YAAO,GAAG,KAAK,CAAC;QAE5D,iFAAiF;QACtC,UAAK,GAAG,EAAE,CAAC;QAEtD;;;WAGG;QACyC,kBAAa,GAAG,KAAK,CAAC;QAElE,4FAA4F;QACnE,mBAAc,GAAG,KAAK,CAAC;QAEK,aAAQ,GAA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OAAO,EAAE,CAAC;kDAAsB;AAQrB;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CAAW;AAGV;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CAAY;AAGI;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAkB;AA4B7D;IADC,KAAK,CAAC,CAAC,SAAS,EAAE,eAAe,CAAC,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;qDAInE;AAzFU,YAAY;IADxB,aAAa,CAAC,eAAe,CAAC;GAClB,YAAY,CAwPxB;;AAED,eAAe,YAAY,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n \nimport {\n LitElement,\n html,\n CSSResultArray,\n TemplateResult,\n} from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { styles } from './nile-checkbox.css';\n \nimport { classMap } from 'lit/directives/class-map.js';\nimport { query, state } from 'lit/decorators.js';\nimport { defaultValue } from '../internal/default-value';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { watch } from '../internal/watch';\nimport NileElement from '../internal/nile-element';\nimport type { CSSResultGroup } from 'lit';\n \n/**\n * @summary Checkboxes allow the user to toggle an option on or off.\n *\n * @dependency nile-icon\n *\n * @slot - The checkbox's label.\n *\n * @event nile-blur - Emitted when the checkbox loses focus.\n * @event nile-change - Emitted when the checked state changes.\n * @event nile-focus - Emitted when the checkbox gains focus.\n * @event nile-input - Emitted when the checkbox receives input.\n * @event nile-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n *\n * @csspart base - The component's base wrapper.\n * @csspart control - The square container that wraps the checkbox's checked state.\n * @csspart control--checked - Matches the control part when the checkbox is checked.\n * @csspart control--indeterminate - Matches the control part when the checkbox is indeterminate.\n * @csspart checked-icon - The checked icon, an `<nile-icon>` element.\n * @csspart indeterminate-icon - The indeterminate icon, an `<nile-icon>` element.\n * @csspart label - The container that wraps the checkbox's label.\n */\n \n/**\n * Nile icon component.\n *\n * @tag nile-checkbox\n *\n */\n@customElement('nile-checkbox')\nexport class NileCheckbox extends NileElement {\n constructor() {\n super();\n }\n \n static styles: CSSResultGroup = styles;\n \n @query('input[type=\"checkbox\"]') input: HTMLInputElement;\n \n @state() private hasFocus = false;\n \n @property() title = ''; // make reactive to pass through\n \n /** The name of the checkbox, submitted as a name/value pair with form data. */\n @property() name = '';\n \n /** The current value of the checkbox, submitted as a name/value pair with form data. */\n @property() value: boolean;\n \n /** The checkbox's size. */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n \n /** Disables the checkbox. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n \n /** Draws the checkbox in a checked state. */\n @property({ type: Boolean, reflect: true }) checked = false;\n \n /** Label, declared this property for backward compatibility of old component */\n @property({ type: String, reflect: true }) label = '';\n \n /**\n * Draws the checkbox in an indeterminate state. This is usually applied to checkboxes that represents a \"select\n * all/none\" behavior when associated checkboxes have a mix of checked and unchecked states.\n */\n @property({ type: Boolean, reflect: true }) indeterminate = false;\n \n /** The default value of the form control. Primarily used for resetting the form control. */\n @defaultValue('checked') defaultChecked = false;\n \n @property({ attribute: 'help-text', reflect: true }) helpText = '';\n \n @property({ attribute: 'error-message', reflect: true }) errorMessage = '';\n \n @property({ type: Boolean }) showHelpText = false;\n \n \n /**\n * By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\n * to place the form control outside of a form and associate it with the form that has this `id`. The form must be in\n * the same document or shadow root for this to work.\n */\n @property({ reflect: true }) form = '';\n \n /** Associates this checkbox with a nile-checkbox-group via a shared group name. */\n @property({ reflect: true }) group = '';\n\n /** Makes the checkbox a required field. */\n @property({ type: Boolean, reflect: true }) required = false;\n \n private toggleHelpText() {\n this.showHelpText = !this.showHelpText;\n }\n \n private handleClick() {\n this.checked = !this.checked;\n this.indeterminate = false;\n this.emit('nile-change',{checked: this.checked})\n this.emit('valueChange',{checked: this.checked})\n }\n \n private handleBlur() {\n this.hasFocus = false;\n this.emit('blur');\n }\n \n private handleInput() {\n this.emit('input');\n }\n \n private handleFocus() {\n this.hasFocus = true;\n this.emit('focus');\n }\n \n @watch(['checked', 'indeterminate'], { waitUntilFirstUpdate: true })\n handleStateChange() {\n this.input.checked = this.checked; // force a sync update\n this.input.indeterminate = this.indeterminate; // force a sync update\n }\n \n /** Simulates a click on the checkbox. */\n click() {\n this.input.click();\n }\n \n /** Sets focus on the checkbox. */\n focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n \n /** Removes focus from the checkbox. */\n blur() {\n this.input.blur();\n }\n \n connectedCallback() {\n super.connectedCallback();\n this.updateHostClass();\n this.emit('nile-init');\n }\n \n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n \n updated(changedProperties: Map<string | number | symbol, unknown>) {\n super.updated(changedProperties);\n if (changedProperties.has('helpText')) {\n this.updateHostClass();\n }\n }\n \n private updateHostClass() {\n if (this.helpText) {\n this.classList.add('full-width');\n } else {\n this.classList.remove('full-width');\n }\n }\n \n render() {\n const hasHelpText = this.helpText ? true : false;\n const hasErrorMessage = this.errorMessage ? true : false;\n \n return html`\n <label\n part=\"base\"\n class=${classMap({\n checkbox: true,\n 'checkbox--checked': this.checked,\n 'checkbox--disabled': this.disabled,\n 'checkbox--focused': this.hasFocus,\n 'checkbox--indeterminate': this.indeterminate,\n 'checkbox--medium': this.size === 'medium',\n })}\n >\n <input\n class=\"checkbox__input\"\n type=\"checkbox\"\n title=${\n this\n .title /* An empty title prevents browser validation tooltips from appearing on hover */\n }\n name=${this.name}\n value=${ifDefined(this.value)}\n .indeterminate=${live(this.indeterminate)}\n .checked=${live(this.checked)}\n .disabled=${this.disabled}\n .required=${this.required}\n aria-checked=${this.checked ? 'true' : 'false'}\n @click=${this.handleClick}\n @input=${this.handleInput}\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n />\n\n <span\n part=\"control${this.checked ? ' control--checked' : ''}${this\n .indeterminate\n ? ' control--indeterminate'\n : ''}\"\n class=\"checkbox__control\"\n >\n ${this.checked && this.disabled\n ? html`\n <nile-icon\n part=\"checked-icon\"\n class=\"checkbox__checked-icon\"\n color=\"var(--nile-colors-white-base, var(--ng-colors-fg-disabled-subtle))\"\n opacity=\"0.6\"\n library=\"system\"\n name=\"var(--nile-icon-tick, var(--ng-icon-check))\"\n size=\"12\"\n method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\"\n ></nile-icon>\n `\n : this.checked\n ? html`\n <nile-icon\n part=\"checked-icon\"\n class=\"checkbox__checked-icon\"\n color=\"var(--nile-colors-white-base, var(--ng-colors-fg-white))\"\n library=\"system\"\n name=\"var(--nile-icon-tick, var(--ng-icon-check))\"\n size=\"12\"\n method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\"\n ></nile-icon>\n `\n : ''}\n ${!this.checked && this.indeterminate && this.disabled\n ? html`\n <nile-icon\n part=\"indeterminate-icon\"\n class=\"checkbox__indeterminate-icon\"\n library=\"system\"\n color=\"var(--nile-colors-white-base, var(--ng-colors-fg-disabled-subtle))\"\n name=\"var(--nile-icon-minus, var(--ng-icon-minus))\"\n size=\"12\"\n method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\"\n ></nile-icon>\n `\n : !this.checked && this.indeterminate\n ? html`\n <nile-icon\n part=\"indeterminate-icon\"\n class=\"checkbox__indeterminate-icon\"\n library=\"system\"\n color=\"var(--nile-colors-white-base, var(--ng-colors-fg-white))\"\n name=\"var(--nile-icon-minus, var(--ng-icon-minus))\"\n size=\"12\"\n method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\"\n ></nile-icon>\n `\n : ''}\n\n </span>\n\n <div part=\"label\" class=\"checkbox__label\">\n ${typeof this.label === 'boolean' ? '' : this.label}\n <slot></slot>\n </div>\n </label>\n\n ${hasHelpText\n ? html` <nile-form-help-text>${this.helpText}</nile-form-help-text> `\n : ``}\n \n ${hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``}\n `;\n }\n}\n \nexport default NileCheckbox;\n \ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-checkbox': NileCheckbox;\n }\n}"]}
1
+ {"version":3,"file":"nile-checkbox.js","sourceRoot":"","sources":["../../../src/nile-checkbox/nile-checkbox.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAEL,IAAI,GAGL,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAGnD;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;;GAKG;AAEI,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,WAAW;IAC3C;QACE,KAAK,EAAE,CAAC;QAOO,aAAQ,GAAG,KAAK,CAAC;QAEtB,UAAK,GAAG,EAAE,CAAC,CAAC,gCAAgC;QAExD,+EAA+E;QACnE,SAAI,GAAG,EAAE,CAAC;QAKtB,2BAA2B;QACE,SAAI,GAAiC,QAAQ,CAAC;QAE3E,6BAA6B;QACe,aAAQ,GAAG,KAAK,CAAC;QAE7D,6CA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wB;AAEK;IAApD,QAAQ,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAe;AAEV;IAAxD,QAAQ,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;kDAAmB;AAE9C;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;kDAAsB;AAQrB;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CAAW;AAGV;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CAAY;AAGI;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAkB;AA6B7D;IADC,KAAK,CAAC,CAAC,SAAS,EAAE,eAAe,CAAC,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;qDAInE;AA1FU,YAAY;IADxB,aAAa,CAAC,eAAe,CAAC;GAClB,YAAY,CAyPxB;;AAED,eAAe,YAAY,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n \nimport {\n LitElement,\n html,\n CSSResultArray,\n TemplateResult,\n} from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { styles } from './nile-checkbox.css';\n \nimport { classMap } from 'lit/directives/class-map.js';\nimport { query, state } from 'lit/decorators.js';\nimport { defaultValue } from '../internal/default-value';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { watch } from '../internal/watch';\nimport NileElement from '../internal/nile-element';\nimport type { CSSResultGroup } from 'lit';\n \n/**\n * @summary Checkboxes allow the user to toggle an option on or off.\n *\n * @dependency nile-icon\n *\n * @slot - The checkbox's label.\n *\n * @event nile-blur - Emitted when the checkbox loses focus.\n * @event nile-change - Emitted when the checked state changes.\n * @event nile-focus - Emitted when the checkbox gains focus.\n * @event nile-input - Emitted when the checkbox receives input.\n * @event nile-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n *\n * @csspart base - The component's base wrapper.\n * @csspart control - The square container that wraps the checkbox's checked state.\n * @csspart control--checked - Matches the control part when the checkbox is checked.\n * @csspart control--indeterminate - Matches the control part when the checkbox is indeterminate.\n * @csspart checked-icon - The checked icon, an `<nile-icon>` element.\n * @csspart indeterminate-icon - The indeterminate icon, an `<nile-icon>` element.\n * @csspart label - The container that wraps the checkbox's label.\n */\n \n/**\n * Nile icon component.\n *\n * @tag nile-checkbox\n *\n */\n@customElement('nile-checkbox')\nexport class NileCheckbox extends NileElement {\n constructor() {\n super();\n }\n \n static styles: CSSResultGroup = styles;\n \n @query('input[type=\"checkbox\"]') input: HTMLInputElement;\n \n @state() private hasFocus = false;\n \n @property() title = ''; // make reactive to pass through\n \n /** The name of the checkbox, submitted as a name/value pair with form data. */\n @property() name = '';\n \n /** The current value of the checkbox, submitted as a name/value pair with form data. */\n @property() value: boolean;\n \n /** The checkbox's size. */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n \n /** Disables the checkbox. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n \n /** Draws the checkbox in a checked state. */\n @property({ type: Boolean, reflect: true }) checked = false;\n \n /** Label, declared this property for backward compatibility of old component */\n @property({ type: String, reflect: true }) label = '';\n \n /**\n * Draws the checkbox in an indeterminate state. This is usually applied to checkboxes that represents a \"select\n * all/none\" behavior when associated checkboxes have a mix of checked and unchecked states.\n */\n @property({ type: Boolean, reflect: true }) indeterminate = false;\n \n /** The default value of the form control. Primarily used for resetting the form control. */\n @defaultValue('checked') defaultChecked = false;\n \n @property({ attribute: 'help-text', reflect: true }) helpText = '';\n \n @property({ attribute: 'error-message', reflect: true }) errorMessage = '';\n \n @property({ type: Boolean }) showHelpText = false;\n \n \n /**\n * By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\n * to place the form control outside of a form and associate it with the form that has this `id`. The form must be in\n * the same document or shadow root for this to work.\n */\n @property({ reflect: true }) form = '';\n \n /** Associates this checkbox with a nile-checkbox-group via a shared group name. */\n @property({ reflect: true }) group = '';\n\n /** Makes the checkbox a required field. */\n @property({ type: Boolean, reflect: true }) required = false;\n \n private toggleHelpText() {\n this.showHelpText = !this.showHelpText;\n }\n \n private handleClick() {\n this.checked = !this.checked;\n this.indeterminate = false;\n this.input.focus();\n this.emit('nile-change',{checked: this.checked})\n this.emit('valueChange',{checked: this.checked})\n }\n \n private handleBlur() {\n this.hasFocus = false;\n this.emit('blur');\n }\n \n private handleInput() {\n this.emit('input');\n }\n \n private handleFocus() {\n this.hasFocus = true;\n this.emit('focus');\n }\n \n @watch(['checked', 'indeterminate'], { waitUntilFirstUpdate: true })\n handleStateChange() {\n this.input.checked = this.checked; // force a sync update\n this.input.indeterminate = this.indeterminate; // force a sync update\n }\n \n /** Simulates a click on the checkbox. */\n click() {\n this.input.click();\n }\n \n /** Sets focus on the checkbox. */\n focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n \n /** Removes focus from the checkbox. */\n blur() {\n this.input.blur();\n }\n \n connectedCallback() {\n super.connectedCallback();\n this.updateHostClass();\n this.emit('nile-init');\n }\n \n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n \n updated(changedProperties: Map<string | number | symbol, unknown>) {\n super.updated(changedProperties);\n if (changedProperties.has('helpText')) {\n this.updateHostClass();\n }\n }\n \n private updateHostClass() {\n if (this.helpText) {\n this.classList.add('full-width');\n } else {\n this.classList.remove('full-width');\n }\n }\n \n render() {\n const hasHelpText = this.helpText ? true : false;\n const hasErrorMessage = this.errorMessage ? true : false;\n \n return html`\n <label\n part=\"base\"\n class=${classMap({\n checkbox: true,\n 'checkbox--checked': this.checked,\n 'checkbox--disabled': this.disabled,\n 'checkbox--focused': this.hasFocus,\n 'checkbox--indeterminate': this.indeterminate,\n 'checkbox--medium': this.size === 'medium',\n })}\n >\n <input\n class=\"checkbox__input\"\n type=\"checkbox\"\n title=${\n this\n .title /* An empty title prevents browser validation tooltips from appearing on hover */\n }\n name=${this.name}\n value=${ifDefined(this.value)}\n .indeterminate=${live(this.indeterminate)}\n .checked=${live(this.checked)}\n .disabled=${this.disabled}\n .required=${this.required}\n aria-checked=${this.checked ? 'true' : 'false'}\n @click=${this.handleClick}\n @input=${this.handleInput}\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n />\n\n <span\n part=\"control${this.checked ? ' control--checked' : ''}${this\n .indeterminate\n ? ' control--indeterminate'\n : ''}\"\n class=\"checkbox__control\"\n >\n ${this.checked && this.disabled\n ? html`\n <nile-icon\n part=\"checked-icon\"\n class=\"checkbox__checked-icon\"\n color=\"var(--nile-colors-white-base, var(--ng-colors-fg-disabled-subtle))\"\n opacity=\"0.6\"\n library=\"system\"\n name=\"var(--nile-icon-tick, var(--ng-icon-check))\"\n size=\"12\"\n method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\"\n ></nile-icon>\n `\n : this.checked\n ? html`\n <nile-icon\n part=\"checked-icon\"\n class=\"checkbox__checked-icon\"\n color=\"var(--nile-colors-white-base, var(--ng-colors-fg-white))\"\n library=\"system\"\n name=\"var(--nile-icon-tick, var(--ng-icon-check))\"\n size=\"12\"\n method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\"\n ></nile-icon>\n `\n : ''}\n ${!this.checked && this.indeterminate && this.disabled\n ? html`\n <nile-icon\n part=\"indeterminate-icon\"\n class=\"checkbox__indeterminate-icon\"\n library=\"system\"\n color=\"var(--nile-colors-white-base, var(--ng-colors-fg-disabled-subtle))\"\n name=\"var(--nile-icon-minus, var(--ng-icon-minus))\"\n size=\"12\"\n method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\"\n ></nile-icon>\n `\n : !this.checked && this.indeterminate\n ? html`\n <nile-icon\n part=\"indeterminate-icon\"\n class=\"checkbox__indeterminate-icon\"\n library=\"system\"\n color=\"var(--nile-colors-white-base, var(--ng-colors-fg-white))\"\n name=\"var(--nile-icon-minus, var(--ng-icon-minus))\"\n size=\"12\"\n method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\"\n ></nile-icon>\n `\n : ''}\n\n </span>\n\n <div part=\"label\" class=\"checkbox__label\">\n ${typeof this.label === 'boolean' ? '' : this.label}\n <slot></slot>\n </div>\n </label>\n\n ${hasHelpText\n ? html` <nile-form-help-text>${this.helpText}</nile-form-help-text> `\n : ``}\n \n ${hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``}\n `;\n }\n}\n \nexport default NileCheckbox;\n \ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-checkbox': NileCheckbox;\n }\n}"]}
@@ -2,6 +2,7 @@ import { LitElement } from 'lit';
2
2
  import '../nile-dropdown/nile-dropdown';
3
3
  import '../nile-menu/nile-menu';
4
4
  import '../nile-menu-item/nile-menu-item';
5
+ import '../nile-color-swatch/nile-color-swatch';
5
6
  export type ColorPickerType = 'swatches' | 'picker';
6
7
  export type ColorPickerMode = 'inline' | 'popover';
7
8
  export type SwatchTooltip = 'name' | 'value' | 'both';
@@ -5,6 +5,7 @@ import { getCssText } from './nile-color-picker.css';
5
5
  import '../nile-dropdown/nile-dropdown';
6
6
  import '../nile-menu/nile-menu';
7
7
  import '../nile-menu-item/nile-menu-item';
8
+ import '../nile-color-swatch/nile-color-swatch';
8
9
  export const DEFAULT_PALETTE = [
9
10
  { color: '#131316', name: 'Black' },
10
11
  { color: '#26272B', name: 'Dark Gray' },