@aquera/nile-elements 0.1.75-beta-1.1 → 0.1.75-beta-2.0

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 (491) hide show
  1. package/README.md +3 -0
  2. package/demo/index.html +121 -181
  3. package/dist/index.cjs.js +1 -1
  4. package/dist/index.esm.js +1 -1
  5. package/dist/index.js +724 -271
  6. package/dist/nile-avatar/nile-avatar.test.cjs.js +1 -1
  7. package/dist/nile-avatar/nile-avatar.test.cjs.js.map +1 -1
  8. package/dist/nile-avatar/nile-avatar.test.esm.js +1 -1
  9. package/dist/nile-badge/index.cjs.js +1 -1
  10. package/dist/nile-badge/index.esm.js +1 -1
  11. package/dist/nile-badge/nile-badge.cjs.js +1 -1
  12. package/dist/nile-badge/nile-badge.cjs.js.map +1 -1
  13. package/dist/nile-badge/nile-badge.esm.js +1 -1
  14. package/dist/nile-badge/nile-badge.test.cjs.js +1 -1
  15. package/dist/nile-badge/nile-badge.test.cjs.js.map +1 -1
  16. package/dist/nile-badge/nile-badge.test.esm.js +1 -1
  17. package/dist/nile-button/index.cjs.js +1 -1
  18. package/dist/nile-button/index.esm.js +1 -1
  19. package/dist/nile-button/nile-button.cjs.js +1 -1
  20. package/dist/nile-button/nile-button.cjs.js.map +1 -1
  21. package/dist/nile-button/nile-button.esm.js +1 -1
  22. package/dist/nile-button/nile-button.test.cjs.js +1 -1
  23. package/dist/nile-button/nile-button.test.cjs.js.map +1 -1
  24. package/dist/nile-button/nile-button.test.esm.js +1 -1
  25. package/dist/nile-calendar/nile-calendar.test.cjs.js +1 -1
  26. package/dist/nile-calendar/nile-calendar.test.cjs.js.map +1 -1
  27. package/dist/nile-calendar/nile-calendar.test.esm.js +1 -1
  28. package/dist/nile-chip/nile-chip.test.cjs.js +1 -1
  29. package/dist/nile-chip/nile-chip.test.cjs.js.map +1 -1
  30. package/dist/nile-chip/nile-chip.test.esm.js +1 -1
  31. package/dist/nile-code-editor/backup_nile-code-editor copy.cjs.js +2 -0
  32. package/dist/nile-code-editor/backup_nile-code-editor copy.cjs.js.map +1 -0
  33. package/dist/nile-code-editor/backup_nile-code-editor copy.esm.js +1 -0
  34. package/dist/nile-code-editor/extensionSetup.cjs.js +6 -6
  35. package/dist/nile-code-editor/extensionSetup.cjs.js.map +1 -1
  36. package/dist/nile-code-editor/extensionSetup.esm.js +1 -1
  37. package/dist/nile-code-editor/nile-code-editor.cjs.js +2 -2
  38. package/dist/nile-code-editor/nile-code-editor.cjs.js.map +1 -1
  39. package/dist/nile-code-editor/nile-code-editor.esm.js +3 -3
  40. package/dist/nile-dialog/index.cjs.js +1 -1
  41. package/dist/nile-dialog/index.esm.js +1 -1
  42. package/dist/nile-dialog/nile-dialog.cjs.js +1 -1
  43. package/dist/nile-dialog/nile-dialog.cjs.js.map +1 -1
  44. package/dist/nile-dialog/nile-dialog.esm.js +2 -2
  45. package/dist/nile-dialog/nile-dialog.test.cjs.js +1 -1
  46. package/dist/nile-dialog/nile-dialog.test.cjs.js.map +1 -1
  47. package/dist/nile-dialog/nile-dialog.test.esm.js +1 -1
  48. package/dist/nile-drawer/index.cjs.js +1 -1
  49. package/dist/nile-drawer/index.esm.js +1 -1
  50. package/dist/nile-drawer/nile-drawer.cjs.js +1 -1
  51. package/dist/nile-drawer/nile-drawer.cjs.js.map +1 -1
  52. package/dist/nile-drawer/nile-drawer.esm.js +2 -2
  53. package/dist/nile-drawer/nile-drawer.test.cjs.js +1 -1
  54. package/dist/nile-drawer/nile-drawer.test.cjs.js.map +1 -1
  55. package/dist/nile-drawer/nile-drawer.test.esm.js +1 -1
  56. package/dist/nile-grid/index.cjs.js +2 -0
  57. package/dist/nile-grid/index.cjs.js.map +1 -0
  58. package/dist/nile-grid/index.esm.js +1 -0
  59. package/dist/nile-grid/nile-grid.cjs.js +2 -0
  60. package/dist/nile-grid/nile-grid.cjs.js.map +1 -0
  61. package/dist/nile-grid/nile-grid.css.cjs.js +2 -0
  62. package/dist/nile-grid/nile-grid.css.cjs.js.map +1 -0
  63. package/dist/nile-grid/nile-grid.css.esm.js +32 -0
  64. package/dist/nile-grid/nile-grid.esm.js +7 -0
  65. package/dist/nile-grid/nile-grid.utils.cjs.js +2 -0
  66. package/dist/nile-grid/nile-grid.utils.cjs.js.map +1 -0
  67. package/dist/nile-grid/nile-grid.utils.esm.js +1 -0
  68. package/dist/nile-grid-body/index.cjs.js +2 -0
  69. package/dist/nile-grid-body/index.cjs.js.map +1 -0
  70. package/dist/nile-grid-body/index.esm.js +1 -0
  71. package/dist/nile-grid-body/nile-grid-body.cjs.js +2 -0
  72. package/dist/nile-grid-body/nile-grid-body.cjs.js.map +1 -0
  73. package/dist/nile-grid-body/nile-grid-body.css.cjs.js +2 -0
  74. package/dist/nile-grid-body/nile-grid-body.css.cjs.js.map +1 -0
  75. package/dist/nile-grid-body/nile-grid-body.css.esm.js +10 -0
  76. package/dist/nile-grid-body/nile-grid-body.esm.js +5 -0
  77. package/dist/nile-grid-cell-item/index.cjs.js +2 -0
  78. package/dist/nile-grid-cell-item/index.cjs.js.map +1 -0
  79. package/dist/nile-grid-cell-item/index.esm.js +1 -0
  80. package/dist/nile-grid-cell-item/nile-grid-cell-item.cjs.js +2 -0
  81. package/dist/nile-grid-cell-item/nile-grid-cell-item.cjs.js.map +1 -0
  82. package/dist/nile-grid-cell-item/nile-grid-cell-item.css.cjs.js +2 -0
  83. package/dist/nile-grid-cell-item/nile-grid-cell-item.css.cjs.js.map +1 -0
  84. package/dist/nile-grid-cell-item/nile-grid-cell-item.css.esm.js +35 -0
  85. package/dist/nile-grid-cell-item/nile-grid-cell-item.esm.js +12 -0
  86. package/dist/nile-grid-cell-item/nile-grid-cell-item.utils.cjs.js +2 -0
  87. package/dist/nile-grid-cell-item/nile-grid-cell-item.utils.cjs.js.map +1 -0
  88. package/dist/nile-grid-cell-item/nile-grid-cell-item.utils.esm.js +1 -0
  89. package/dist/nile-grid-head/index.cjs.js +2 -0
  90. package/dist/nile-grid-head/index.cjs.js.map +1 -0
  91. package/dist/nile-grid-head/index.esm.js +1 -0
  92. package/dist/nile-grid-head/nile-grid-head.cjs.js +2 -0
  93. package/dist/nile-grid-head/nile-grid-head.cjs.js.map +1 -0
  94. package/dist/nile-grid-head/nile-grid-head.css.cjs.js +2 -0
  95. package/dist/nile-grid-head/nile-grid-head.css.cjs.js.map +1 -0
  96. package/dist/nile-grid-head/nile-grid-head.css.esm.js +7 -0
  97. package/dist/nile-grid-head/nile-grid-head.esm.js +5 -0
  98. package/dist/nile-grid-head-item/index.cjs.js +2 -0
  99. package/dist/nile-grid-head-item/index.cjs.js.map +1 -0
  100. package/dist/nile-grid-head-item/index.esm.js +1 -0
  101. package/dist/nile-grid-head-item/nile-grid-head-item.cjs.js +2 -0
  102. package/dist/nile-grid-head-item/nile-grid-head-item.cjs.js.map +1 -0
  103. package/dist/nile-grid-head-item/nile-grid-head-item.css.cjs.js +2 -0
  104. package/dist/nile-grid-head-item/nile-grid-head-item.css.cjs.js.map +1 -0
  105. package/dist/nile-grid-head-item/nile-grid-head-item.css.esm.js +34 -0
  106. package/dist/nile-grid-head-item/nile-grid-head-item.esm.js +12 -0
  107. package/dist/nile-grid-head-item/nile-grid-head-item.utils.cjs.js +2 -0
  108. package/dist/nile-grid-head-item/nile-grid-head-item.utils.cjs.js.map +1 -0
  109. package/dist/nile-grid-head-item/nile-grid-head-item.utils.esm.js +1 -0
  110. package/dist/nile-grid-row/index.cjs.js +2 -0
  111. package/dist/nile-grid-row/index.cjs.js.map +1 -0
  112. package/dist/nile-grid-row/index.esm.js +1 -0
  113. package/dist/nile-grid-row/nile-grid-row.cjs.js +2 -0
  114. package/dist/nile-grid-row/nile-grid-row.cjs.js.map +1 -0
  115. package/dist/nile-grid-row/nile-grid-row.css.cjs.js +2 -0
  116. package/dist/nile-grid-row/nile-grid-row.css.cjs.js.map +1 -0
  117. package/dist/nile-grid-row/nile-grid-row.css.esm.js +15 -0
  118. package/dist/nile-grid-row/nile-grid-row.esm.js +7 -0
  119. package/dist/nile-icon/icons/svg/format_align_justify.cjs.js +2 -0
  120. package/dist/nile-icon/icons/svg/format_align_justify.cjs.js.map +1 -0
  121. package/dist/nile-icon/icons/svg/format_align_justify.esm.js +1 -0
  122. package/dist/nile-icon/icons/svg/format_align_left.cjs.js +2 -0
  123. package/dist/nile-icon/icons/svg/format_align_left.cjs.js.map +1 -0
  124. package/dist/nile-icon/icons/svg/format_align_left.esm.js +1 -0
  125. package/dist/nile-icon/icons/svg/format_align_middle.cjs.js +2 -0
  126. package/dist/nile-icon/icons/svg/format_align_middle.cjs.js.map +1 -0
  127. package/dist/nile-icon/icons/svg/format_align_middle.esm.js +1 -0
  128. package/dist/nile-icon/icons/svg/format_align_right.cjs.js +2 -0
  129. package/dist/nile-icon/icons/svg/format_align_right.cjs.js.map +1 -0
  130. package/dist/nile-icon/icons/svg/format_align_right.esm.js +1 -0
  131. package/dist/nile-icon/icons/svg/format_bold.cjs.js +2 -0
  132. package/dist/nile-icon/icons/svg/format_bold.cjs.js.map +1 -0
  133. package/dist/nile-icon/icons/svg/format_bold.esm.js +1 -0
  134. package/dist/nile-icon/icons/svg/format_clear.cjs.js +2 -0
  135. package/dist/nile-icon/icons/svg/format_clear.cjs.js.map +1 -0
  136. package/dist/nile-icon/icons/svg/format_clear.esm.js +1 -0
  137. package/dist/nile-icon/icons/svg/format_italic.cjs.js +2 -0
  138. package/dist/nile-icon/icons/svg/format_italic.cjs.js.map +1 -0
  139. package/dist/nile-icon/icons/svg/format_italic.esm.js +1 -0
  140. package/dist/nile-icon/icons/svg/format_list_bulleted.cjs.js +2 -0
  141. package/dist/nile-icon/icons/svg/format_list_bulleted.cjs.js.map +1 -0
  142. package/dist/nile-icon/icons/svg/format_list_bulleted.esm.js +1 -0
  143. package/dist/nile-icon/icons/svg/format_list_numbered.cjs.js +2 -0
  144. package/dist/nile-icon/icons/svg/format_list_numbered.cjs.js.map +1 -0
  145. package/dist/nile-icon/icons/svg/format_list_numbered.esm.js +1 -0
  146. package/dist/nile-icon/icons/svg/format_underline.cjs.js +2 -0
  147. package/dist/nile-icon/icons/svg/format_underline.cjs.js.map +1 -0
  148. package/dist/nile-icon/icons/svg/format_underline.esm.js +1 -0
  149. package/dist/nile-icon/icons/svg/image_2.cjs.js +2 -0
  150. package/dist/nile-icon/icons/svg/image_2.cjs.js.map +1 -0
  151. package/dist/nile-icon/icons/svg/image_2.esm.js +1 -0
  152. package/dist/nile-icon/icons/svg/index.cjs.js +1 -1
  153. package/dist/nile-icon/icons/svg/index.esm.js +1 -1
  154. package/dist/nile-icon/icons/svg/link_2.cjs.js +2 -0
  155. package/dist/nile-icon/icons/svg/link_2.cjs.js.map +1 -0
  156. package/dist/nile-icon/icons/svg/link_2.esm.js +1 -0
  157. package/dist/nile-icon/index.cjs.js +1 -1
  158. package/dist/nile-icon/index.cjs.js.map +1 -1
  159. package/dist/nile-icon/index.esm.js +2 -2
  160. package/dist/nile-icon/nile-icon.test.cjs.js +1 -1
  161. package/dist/nile-icon/nile-icon.test.cjs.js.map +1 -1
  162. package/dist/nile-icon/nile-icon.test.esm.js +1 -1
  163. package/dist/nile-icon-button/index.cjs.js +1 -1
  164. package/dist/nile-icon-button/index.esm.js +1 -1
  165. package/dist/nile-icon-button/nile-icon-button.cjs.js +1 -1
  166. package/dist/nile-icon-button/nile-icon-button.cjs.js.map +1 -1
  167. package/dist/nile-icon-button/nile-icon-button.esm.js +1 -1
  168. package/dist/nile-input/index.cjs.js +1 -1
  169. package/dist/nile-input/index.esm.js +1 -1
  170. package/dist/nile-input/nile-input.cjs.js +1 -1
  171. package/dist/nile-input/nile-input.cjs.js.map +1 -1
  172. package/dist/nile-input/nile-input.esm.js +1 -1
  173. package/dist/nile-input/nile-input.test.cjs.js +1 -1
  174. package/dist/nile-input/nile-input.test.cjs.js.map +1 -1
  175. package/dist/nile-input/nile-input.test.esm.js +1 -1
  176. package/dist/nile-link/nile-link.css.cjs.js +1 -1
  177. package/dist/nile-link/nile-link.css.cjs.js.map +1 -1
  178. package/dist/nile-link/nile-link.css.esm.js +1 -0
  179. package/dist/nile-menu-item/index.cjs.js +1 -1
  180. package/dist/nile-menu-item/index.esm.js +1 -1
  181. package/dist/nile-menu-item/nile-menu-item.cjs.js +1 -1
  182. package/dist/nile-menu-item/nile-menu-item.cjs.js.map +1 -1
  183. package/dist/nile-menu-item/nile-menu-item.esm.js +1 -1
  184. package/dist/nile-option/index.cjs.js +1 -1
  185. package/dist/nile-option/index.esm.js +1 -1
  186. package/dist/nile-option/nile-option.cjs.js +1 -1
  187. package/dist/nile-option/nile-option.cjs.js.map +1 -1
  188. package/dist/nile-option/nile-option.esm.js +2 -2
  189. package/dist/nile-rich-text-editor/index.cjs.js +2 -0
  190. package/dist/nile-rich-text-editor/index.cjs.js.map +1 -0
  191. package/dist/nile-rich-text-editor/index.esm.js +1 -0
  192. package/dist/nile-rich-text-editor/nile-rich-text-editor.cjs.js +2 -0
  193. package/dist/nile-rich-text-editor/nile-rich-text-editor.cjs.js.map +1 -0
  194. package/dist/nile-rich-text-editor/nile-rich-text-editor.css.cjs.js +2 -0
  195. package/dist/nile-rich-text-editor/nile-rich-text-editor.css.cjs.js.map +1 -0
  196. package/dist/nile-rich-text-editor/nile-rich-text-editor.css.esm.js +149 -0
  197. package/dist/nile-rich-text-editor/nile-rich-text-editor.esm.js +1 -0
  198. package/dist/nile-rich-text-editor/nile-rte-color.cjs.js +2 -0
  199. package/dist/nile-rich-text-editor/nile-rte-color.cjs.js.map +1 -0
  200. package/dist/nile-rich-text-editor/nile-rte-color.esm.js +53 -0
  201. package/dist/nile-rich-text-editor/nile-rte-divider.cjs.js +2 -0
  202. package/dist/nile-rich-text-editor/nile-rte-divider.cjs.js.map +1 -0
  203. package/dist/nile-rich-text-editor/nile-rte-divider.esm.js +1 -0
  204. package/dist/nile-rich-text-editor/nile-rte-link.cjs.js +2 -0
  205. package/dist/nile-rich-text-editor/nile-rte-link.cjs.js.map +1 -0
  206. package/dist/nile-rich-text-editor/nile-rte-link.esm.js +19 -0
  207. package/dist/nile-rich-text-editor/nile-rte-mentions-item.cjs.js +2 -0
  208. package/dist/nile-rich-text-editor/nile-rte-mentions-item.cjs.js.map +1 -0
  209. package/dist/nile-rich-text-editor/nile-rte-mentions-item.esm.js +1 -0
  210. package/dist/nile-rich-text-editor/nile-rte-mentions.cjs.js +3 -0
  211. package/dist/nile-rich-text-editor/nile-rte-mentions.cjs.js.map +1 -0
  212. package/dist/nile-rich-text-editor/nile-rte-mentions.esm.js +1 -0
  213. package/dist/nile-rich-text-editor/nile-rte-preview.cjs.js +2 -0
  214. package/dist/nile-rich-text-editor/nile-rte-preview.cjs.js.map +1 -0
  215. package/dist/nile-rich-text-editor/nile-rte-preview.esm.js +1 -0
  216. package/dist/nile-rich-text-editor/nile-rte-select.cjs.js +2 -0
  217. package/dist/nile-rich-text-editor/nile-rte-select.cjs.js.map +1 -0
  218. package/dist/nile-rich-text-editor/nile-rte-select.esm.js +66 -0
  219. package/dist/nile-rich-text-editor/nile-rte-toolbar-item.cjs.js +2 -0
  220. package/dist/nile-rich-text-editor/nile-rte-toolbar-item.cjs.js.map +1 -0
  221. package/dist/nile-rich-text-editor/nile-rte-toolbar-item.esm.js +1 -0
  222. package/dist/nile-rich-text-editor/nile-rte-toolbar.cjs.js +2 -0
  223. package/dist/nile-rich-text-editor/nile-rte-toolbar.cjs.js.map +1 -0
  224. package/dist/nile-rich-text-editor/nile-rte-toolbar.esm.js +1 -0
  225. package/dist/nile-rich-text-editor/utils.cjs.js +2 -0
  226. package/dist/nile-rich-text-editor/utils.cjs.js.map +1 -0
  227. package/dist/nile-rich-text-editor/utils.esm.js +1 -0
  228. package/dist/nile-select/index.cjs.js +1 -1
  229. package/dist/nile-select/index.esm.js +1 -1
  230. package/dist/nile-select/nile-select.cjs.js +1 -1
  231. package/dist/nile-select/nile-select.cjs.js.map +1 -1
  232. package/dist/nile-select/nile-select.esm.js +1 -1
  233. package/dist/nile-select/nile-select.test.cjs.js +1 -1
  234. package/dist/nile-select/nile-select.test.cjs.js.map +1 -1
  235. package/dist/nile-select/nile-select.test.esm.js +1 -1
  236. package/dist/nile-tab/index.cjs.js +1 -1
  237. package/dist/nile-tab/index.esm.js +1 -1
  238. package/dist/nile-tab/nile-tab.cjs.js +1 -1
  239. package/dist/nile-tab/nile-tab.cjs.js.map +1 -1
  240. package/dist/nile-tab/nile-tab.esm.js +1 -1
  241. package/dist/nile-tab-group/index.cjs.js +1 -1
  242. package/dist/nile-tab-group/index.esm.js +1 -1
  243. package/dist/nile-tab-group/nile-tab-group.cjs.js +1 -1
  244. package/dist/nile-tab-group/nile-tab-group.cjs.js.map +1 -1
  245. package/dist/nile-tab-group/nile-tab-group.esm.js +1 -1
  246. package/dist/nile-tab-group/nile-tab-group.test.cjs.js +1 -1
  247. package/dist/nile-tab-group/nile-tab-group.test.cjs.js.map +1 -1
  248. package/dist/nile-tab-group/nile-tab-group.test.esm.js +1 -1
  249. package/dist/nile-tag/index.cjs.js +1 -1
  250. package/dist/nile-tag/index.esm.js +1 -1
  251. package/dist/nile-tag/nile-tag.cjs.js +1 -1
  252. package/dist/nile-tag/nile-tag.cjs.js.map +1 -1
  253. package/dist/nile-tag/nile-tag.esm.js +1 -1
  254. package/dist/nile-toast/index.cjs.js +1 -1
  255. package/dist/nile-toast/index.esm.js +1 -1
  256. package/dist/nile-toast/nile-toast.cjs.js +1 -1
  257. package/dist/nile-toast/nile-toast.cjs.js.map +1 -1
  258. package/dist/nile-toast/nile-toast.esm.js +1 -1
  259. package/dist/nile-tree/index.cjs.js +1 -1
  260. package/dist/nile-tree/index.esm.js +1 -1
  261. package/dist/nile-tree/nile-tree.cjs.js +1 -1
  262. package/dist/nile-tree/nile-tree.cjs.js.map +1 -1
  263. package/dist/nile-tree/nile-tree.esm.js +1 -1
  264. package/dist/nile-tree-item/index.cjs.js +1 -1
  265. package/dist/nile-tree-item/index.esm.js +1 -1
  266. package/dist/nile-tree-item/nile-tree-item.cjs.js +1 -1
  267. package/dist/nile-tree-item/nile-tree-item.cjs.js.map +1 -1
  268. package/dist/nile-tree-item/nile-tree-item.esm.js +1 -1
  269. package/dist/nile-virtual-select/index.cjs.js +1 -1
  270. package/dist/nile-virtual-select/index.esm.js +1 -1
  271. package/dist/nile-virtual-select/nile-virtual-select.cjs.js +2 -2
  272. package/dist/nile-virtual-select/nile-virtual-select.cjs.js.map +1 -1
  273. package/dist/nile-virtual-select/nile-virtual-select.esm.js +3 -3
  274. package/dist/src/index.d.ts +7 -0
  275. package/dist/src/index.js +8 -1
  276. package/dist/src/index.js.map +1 -1
  277. package/dist/src/nile-code-editor/Old_theme copy.d.ts +191 -0
  278. package/dist/src/nile-code-editor/Old_theme copy.js +193 -0
  279. package/dist/src/nile-code-editor/Old_theme copy.js.map +1 -0
  280. package/dist/src/nile-code-editor/backup_nile-code-editor copy.d.ts +0 -0
  281. package/dist/src/nile-code-editor/backup_nile-code-editor copy.js +675 -0
  282. package/dist/src/nile-code-editor/backup_nile-code-editor copy.js.map +1 -0
  283. package/dist/src/nile-code-editor/nile-code-editor.d.ts +6 -3
  284. package/dist/src/nile-code-editor/nile-code-editor.js +44 -22
  285. package/dist/src/nile-code-editor/nile-code-editor.js.map +1 -1
  286. package/dist/src/nile-code-editor/theme copy.d.ts +191 -0
  287. package/dist/src/nile-code-editor/theme copy.js +193 -0
  288. package/dist/src/nile-code-editor/theme copy.js.map +1 -0
  289. package/dist/src/nile-grid/index.d.ts +0 -4
  290. package/dist/src/nile-grid/index.js +0 -4
  291. package/dist/src/nile-grid/index.js.map +1 -1
  292. package/dist/src/nile-grid/nile-grid.css.d.ts +8 -0
  293. package/dist/src/nile-grid/nile-grid.css.js +27 -106
  294. package/dist/src/nile-grid/nile-grid.css.js.map +1 -1
  295. package/dist/src/nile-grid/nile-grid.d.ts +37 -26
  296. package/dist/src/nile-grid/nile-grid.js +96 -148
  297. package/dist/src/nile-grid/nile-grid.js.map +1 -1
  298. package/dist/src/nile-grid/nile-grid.utils.d.ts +9 -0
  299. package/dist/src/nile-grid/nile-grid.utils.js +170 -0
  300. package/dist/src/nile-grid/nile-grid.utils.js.map +1 -0
  301. package/dist/src/nile-grid-body/index.d.ts +1 -0
  302. package/dist/src/nile-grid-body/index.js +2 -0
  303. package/dist/src/nile-grid-body/index.js.map +1 -0
  304. package/dist/src/nile-grid-body/nile-grid-body.css.d.ts +12 -0
  305. package/dist/src/nile-grid-body/nile-grid-body.css.js +22 -0
  306. package/dist/src/nile-grid-body/nile-grid-body.css.js.map +1 -0
  307. package/dist/src/nile-grid-body/nile-grid-body.d.ts +29 -0
  308. package/dist/src/nile-grid-body/nile-grid-body.js +43 -0
  309. package/dist/src/nile-grid-body/nile-grid-body.js.map +1 -0
  310. package/dist/src/nile-grid-cell-item/index.d.ts +1 -0
  311. package/dist/src/nile-grid-cell-item/index.js +2 -0
  312. package/dist/src/nile-grid-cell-item/index.js.map +1 -0
  313. package/dist/src/nile-grid-cell-item/nile-grid-cell-item.css.d.ts +12 -0
  314. package/dist/src/nile-grid-cell-item/nile-grid-cell-item.css.js +47 -0
  315. package/dist/src/nile-grid-cell-item/nile-grid-cell-item.css.js.map +1 -0
  316. package/dist/src/nile-grid-cell-item/nile-grid-cell-item.d.ts +36 -0
  317. package/dist/src/nile-grid-cell-item/nile-grid-cell-item.js +93 -0
  318. package/dist/src/nile-grid-cell-item/nile-grid-cell-item.js.map +1 -0
  319. package/dist/src/nile-grid-cell-item/nile-grid-cell-item.utils.d.ts +10 -0
  320. package/dist/src/nile-grid-cell-item/nile-grid-cell-item.utils.js +34 -0
  321. package/dist/src/nile-grid-cell-item/nile-grid-cell-item.utils.js.map +1 -0
  322. package/dist/src/nile-grid-head/index.d.ts +1 -0
  323. package/dist/src/nile-grid-head/index.js +2 -0
  324. package/dist/src/nile-grid-head/index.js.map +1 -0
  325. package/dist/src/nile-grid-head/nile-grid-head.css.d.ts +12 -0
  326. package/dist/src/nile-grid-head/nile-grid-head.css.js +19 -0
  327. package/dist/src/nile-grid-head/nile-grid-head.css.js.map +1 -0
  328. package/dist/src/nile-grid-head/nile-grid-head.d.ts +28 -0
  329. package/dist/src/nile-grid-head/nile-grid-head.js +41 -0
  330. package/dist/src/nile-grid-head/nile-grid-head.js.map +1 -0
  331. package/dist/src/nile-grid-head-item/index.d.ts +1 -0
  332. package/dist/src/nile-grid-head-item/index.js +2 -0
  333. package/dist/src/nile-grid-head-item/index.js.map +1 -0
  334. package/dist/src/nile-grid-head-item/nile-grid-head-item.css.d.ts +12 -0
  335. package/dist/src/nile-grid-head-item/nile-grid-head-item.css.js +46 -0
  336. package/dist/src/nile-grid-head-item/nile-grid-head-item.css.js.map +1 -0
  337. package/dist/src/nile-grid-head-item/nile-grid-head-item.d.ts +37 -0
  338. package/dist/src/nile-grid-head-item/nile-grid-head-item.js +100 -0
  339. package/dist/src/nile-grid-head-item/nile-grid-head-item.js.map +1 -0
  340. package/dist/src/nile-grid-head-item/nile-grid-head-item.utils.d.ts +10 -0
  341. package/dist/src/nile-grid-head-item/nile-grid-head-item.utils.js +34 -0
  342. package/dist/src/nile-grid-head-item/nile-grid-head-item.utils.js.map +1 -0
  343. package/dist/src/nile-grid-row/index.d.ts +1 -0
  344. package/dist/src/nile-grid-row/index.js +2 -0
  345. package/dist/src/nile-grid-row/index.js.map +1 -0
  346. package/dist/src/nile-grid-row/nile-grid-row.css.d.ts +12 -0
  347. package/dist/src/nile-grid-row/nile-grid-row.css.js +27 -0
  348. package/dist/src/nile-grid-row/nile-grid-row.css.js.map +1 -0
  349. package/dist/src/nile-grid-row/nile-grid-row.d.ts +29 -0
  350. package/dist/src/nile-grid-row/nile-grid-row.js +45 -0
  351. package/dist/src/nile-grid-row/nile-grid-row.js.map +1 -0
  352. package/dist/src/nile-icon/icons/svg/format_align_justify.d.ts +5 -0
  353. package/dist/src/nile-icon/icons/svg/format_align_justify.js +5 -0
  354. package/dist/src/nile-icon/icons/svg/format_align_justify.js.map +1 -0
  355. package/dist/src/nile-icon/icons/svg/format_align_left.d.ts +5 -0
  356. package/dist/src/nile-icon/icons/svg/format_align_left.js +5 -0
  357. package/dist/src/nile-icon/icons/svg/format_align_left.js.map +1 -0
  358. package/dist/src/nile-icon/icons/svg/format_align_middle.d.ts +5 -0
  359. package/dist/src/nile-icon/icons/svg/format_align_middle.js +5 -0
  360. package/dist/src/nile-icon/icons/svg/format_align_middle.js.map +1 -0
  361. package/dist/src/nile-icon/icons/svg/format_align_right.d.ts +5 -0
  362. package/dist/src/nile-icon/icons/svg/format_align_right.js +5 -0
  363. package/dist/src/nile-icon/icons/svg/format_align_right.js.map +1 -0
  364. package/dist/src/nile-icon/icons/svg/format_bold.d.ts +5 -0
  365. package/dist/src/nile-icon/icons/svg/format_bold.js +5 -0
  366. package/dist/src/nile-icon/icons/svg/format_bold.js.map +1 -0
  367. package/dist/src/nile-icon/icons/svg/format_clear.d.ts +5 -0
  368. package/dist/src/nile-icon/icons/svg/format_clear.js +5 -0
  369. package/dist/src/nile-icon/icons/svg/format_clear.js.map +1 -0
  370. package/dist/src/nile-icon/icons/svg/format_italic.d.ts +5 -0
  371. package/dist/src/nile-icon/icons/svg/format_italic.js +5 -0
  372. package/dist/src/nile-icon/icons/svg/format_italic.js.map +1 -0
  373. package/dist/src/nile-icon/icons/svg/format_list_bulleted.d.ts +5 -0
  374. package/dist/src/nile-icon/icons/svg/format_list_bulleted.js +5 -0
  375. package/dist/src/nile-icon/icons/svg/format_list_bulleted.js.map +1 -0
  376. package/dist/src/nile-icon/icons/svg/format_list_numbered.d.ts +5 -0
  377. package/dist/src/nile-icon/icons/svg/format_list_numbered.js +5 -0
  378. package/dist/src/nile-icon/icons/svg/format_list_numbered.js.map +1 -0
  379. package/dist/src/nile-icon/icons/svg/format_underline.d.ts +5 -0
  380. package/dist/src/nile-icon/icons/svg/format_underline.js +5 -0
  381. package/dist/src/nile-icon/icons/svg/format_underline.js.map +1 -0
  382. package/dist/src/nile-icon/icons/svg/image_2.d.ts +5 -0
  383. package/dist/src/nile-icon/icons/svg/image_2.js +5 -0
  384. package/dist/src/nile-icon/icons/svg/image_2.js.map +1 -0
  385. package/dist/src/nile-icon/icons/svg/index.d.ts +12 -0
  386. package/dist/src/nile-icon/icons/svg/index.js +12 -0
  387. package/dist/src/nile-icon/icons/svg/index.js.map +1 -1
  388. package/dist/src/nile-icon/icons/svg/link_2.d.ts +5 -0
  389. package/dist/src/nile-icon/icons/svg/link_2.js +5 -0
  390. package/dist/src/nile-icon/icons/svg/link_2.js.map +1 -0
  391. package/dist/src/nile-link/nile-link.css.js +1 -0
  392. package/dist/src/nile-link/nile-link.css.js.map +1 -1
  393. package/dist/src/nile-option/nile-option.js +1 -1
  394. package/dist/src/nile-option/nile-option.js.map +1 -1
  395. package/dist/src/nile-rich-text-editor/index.d.ts +1 -0
  396. package/dist/src/nile-rich-text-editor/index.js +2 -0
  397. package/dist/src/nile-rich-text-editor/index.js.map +1 -0
  398. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.css.d.ts +3 -0
  399. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.css.js +152 -0
  400. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.css.js.map +1 -0
  401. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.d.ts +63 -0
  402. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.js +735 -0
  403. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.js.map +1 -0
  404. package/dist/src/nile-rich-text-editor/nile-rte-color.d.ts +20 -0
  405. package/dist/src/nile-rich-text-editor/nile-rte-color.js +188 -0
  406. package/dist/src/nile-rich-text-editor/nile-rte-color.js.map +1 -0
  407. package/dist/src/nile-rich-text-editor/nile-rte-divider.d.ts +10 -0
  408. package/dist/src/nile-rich-text-editor/nile-rte-divider.js +12 -0
  409. package/dist/src/nile-rich-text-editor/nile-rte-divider.js.map +1 -0
  410. package/dist/src/nile-rich-text-editor/nile-rte-link.d.ts +19 -0
  411. package/dist/src/nile-rich-text-editor/nile-rte-link.js +169 -0
  412. package/dist/src/nile-rich-text-editor/nile-rte-link.js.map +1 -0
  413. package/dist/src/nile-rich-text-editor/nile-rte-mentions-item.d.ts +18 -0
  414. package/dist/src/nile-rich-text-editor/nile-rte-mentions-item.js +53 -0
  415. package/dist/src/nile-rich-text-editor/nile-rte-mentions-item.js.map +1 -0
  416. package/dist/src/nile-rich-text-editor/nile-rte-mentions.d.ts +64 -0
  417. package/dist/src/nile-rich-text-editor/nile-rte-mentions.js +544 -0
  418. package/dist/src/nile-rich-text-editor/nile-rte-mentions.js.map +1 -0
  419. package/dist/src/nile-rich-text-editor/nile-rte-preview.d.ts +10 -0
  420. package/dist/src/nile-rich-text-editor/nile-rte-preview.js +12 -0
  421. package/dist/src/nile-rich-text-editor/nile-rte-preview.js.map +1 -0
  422. package/dist/src/nile-rich-text-editor/nile-rte-select.d.ts +33 -0
  423. package/dist/src/nile-rich-text-editor/nile-rte-select.js +228 -0
  424. package/dist/src/nile-rich-text-editor/nile-rte-select.js.map +1 -0
  425. package/dist/src/nile-rich-text-editor/nile-rte-toolbar-item.d.ts +12 -0
  426. package/dist/src/nile-rich-text-editor/nile-rte-toolbar-item.js +23 -0
  427. package/dist/src/nile-rich-text-editor/nile-rte-toolbar-item.js.map +1 -0
  428. package/dist/src/nile-rich-text-editor/nile-rte-toolbar.d.ts +10 -0
  429. package/dist/src/nile-rich-text-editor/nile-rte-toolbar.js +12 -0
  430. package/dist/src/nile-rich-text-editor/nile-rte-toolbar.js.map +1 -0
  431. package/dist/src/nile-rich-text-editor/utils.d.ts +13 -0
  432. package/dist/src/nile-rich-text-editor/utils.js +538 -0
  433. package/dist/src/nile-rich-text-editor/utils.js.map +1 -0
  434. package/dist/src/version.js +1 -1
  435. package/dist/src/version.js.map +1 -1
  436. package/dist/tsconfig.tsbuildinfo +1 -1
  437. package/package.json +9 -3
  438. package/rollup.config.js +1 -3
  439. package/src/index.ts +8 -1
  440. package/src/nile-code-editor/backup_nile-code-editor copy.ts +763 -0
  441. package/src/nile-code-editor/nile-code-editor.ts +44 -20
  442. package/src/nile-grid/index.ts +1 -0
  443. package/src/nile-grid/nile-grid.css.ts +43 -0
  444. package/src/nile-grid/nile-grid.ts +185 -0
  445. package/src/nile-grid/nile-grid.utils.ts +252 -0
  446. package/src/nile-grid-body/index.ts +1 -0
  447. package/src/nile-grid-body/nile-grid-body.css.ts +24 -0
  448. package/src/nile-grid-body/nile-grid-body.ts +51 -0
  449. package/src/nile-grid-cell-item/index.ts +1 -0
  450. package/src/nile-grid-cell-item/nile-grid-cell-item.css.ts +49 -0
  451. package/src/nile-grid-cell-item/nile-grid-cell-item.ts +98 -0
  452. package/src/nile-grid-cell-item/nile-grid-cell-item.utils.ts +65 -0
  453. package/src/nile-grid-head/index.ts +1 -0
  454. package/src/nile-grid-head/nile-grid-head.css.ts +21 -0
  455. package/src/nile-grid-head/nile-grid-head.ts +50 -0
  456. package/src/nile-grid-head-item/index.ts +1 -0
  457. package/src/nile-grid-head-item/nile-grid-head-item.css.ts +48 -0
  458. package/src/nile-grid-head-item/nile-grid-head-item.ts +111 -0
  459. package/src/nile-grid-head-item/nile-grid-head-item.utils.ts +66 -0
  460. package/src/nile-grid-row/index.ts +1 -0
  461. package/src/nile-grid-row/nile-grid-row.css.ts +29 -0
  462. package/src/nile-grid-row/nile-grid-row.ts +53 -0
  463. package/src/nile-icon/icons/svg/format_align_justify.ts +5 -0
  464. package/src/nile-icon/icons/svg/format_align_left.ts +5 -0
  465. package/src/nile-icon/icons/svg/format_align_middle.ts +5 -0
  466. package/src/nile-icon/icons/svg/format_align_right.ts +5 -0
  467. package/src/nile-icon/icons/svg/format_bold.ts +5 -0
  468. package/src/nile-icon/icons/svg/format_clear.ts +5 -0
  469. package/src/nile-icon/icons/svg/format_italic.ts +5 -0
  470. package/src/nile-icon/icons/svg/format_list_bulleted.ts +5 -0
  471. package/src/nile-icon/icons/svg/format_list_numbered.ts +5 -0
  472. package/src/nile-icon/icons/svg/format_underline.ts +5 -0
  473. package/src/nile-icon/icons/svg/image_2.ts +5 -0
  474. package/src/nile-icon/icons/svg/index.ts +12 -0
  475. package/src/nile-icon/icons/svg/link_2.ts +5 -0
  476. package/src/nile-link/nile-link.css.ts +1 -0
  477. package/src/nile-option/nile-option.ts +1 -1
  478. package/src/nile-rich-text-editor/index.ts +1 -0
  479. package/src/nile-rich-text-editor/nile-rich-text-editor.css.ts +154 -0
  480. package/src/nile-rich-text-editor/nile-rich-text-editor.ts +836 -0
  481. package/src/nile-rich-text-editor/nile-rte-color.ts +189 -0
  482. package/src/nile-rich-text-editor/nile-rte-divider.ts +9 -0
  483. package/src/nile-rich-text-editor/nile-rte-link.ts +161 -0
  484. package/src/nile-rich-text-editor/nile-rte-mentions-item.ts +46 -0
  485. package/src/nile-rich-text-editor/nile-rte-mentions.ts +618 -0
  486. package/src/nile-rich-text-editor/nile-rte-preview.ts +9 -0
  487. package/src/nile-rich-text-editor/nile-rte-select.ts +249 -0
  488. package/src/nile-rich-text-editor/nile-rte-toolbar-item.ts +13 -0
  489. package/src/nile-rich-text-editor/nile-rte-toolbar.ts +9 -0
  490. package/src/nile-rich-text-editor/utils.ts +643 -0
  491. package/vscode-html-custom-data.json +309 -7
@@ -0,0 +1,763 @@
1
+ // /**
2
+ // * Copyright Aquera Inc 2023
3
+ // *
4
+ // * This source code is licensed under the BSD-3-Clause license found in the
5
+ // * LICENSE file in the root directory of this source tree.
6
+ // */
7
+
8
+ // import {
9
+ // html,
10
+ // CSSResultArray,
11
+ // TemplateResult,
12
+ // PropertyValueMap,
13
+ // } from 'lit';
14
+
15
+ // import { customElement, query, property } from 'lit/decorators.js';
16
+ // import { styles } from './nile-code-editor.css';
17
+ // import { EditorView } from 'codemirror';
18
+ // import { ViewUpdate, placeholder, tooltips } from '@codemirror/view';
19
+ // import {
20
+ // Compartment,
21
+ // EditorState,
22
+ // Extension
23
+ // } from '@codemirror/state';
24
+ // import { StyleSpec } from 'style-mod';
25
+ // import {
26
+ // syntaxHighlighting,
27
+ // defaultHighlightStyle,
28
+ // } from '@codemirror/language';
29
+
30
+ // import { lineNumbers } from '@codemirror/view';
31
+ // import {
32
+ // javascript,
33
+ // javascriptLanguage,
34
+ // } from '@codemirror/lang-javascript';
35
+ // import { sql } from '@codemirror/lang-sql';
36
+ // import { json } from '@codemirror/lang-json';
37
+ // import { html as htmlLang } from '@codemirror/lang-html';
38
+ // import { autocompletion,acceptCompletion, closeCompletion,CompletionContext,CompletionResult, completionStatus } from '@codemirror/autocomplete';
39
+ // import NileElement from '../internal/nile-element';
40
+ // import { basicSetup } from './extensionSetup';
41
+ // import { classMap } from 'lit/directives/class-map.js';
42
+ // import { Theme as DefaultTheme, customisedThemeCss, fontFamily } from './theme';
43
+ // import { keymap } from '@codemirror/view';
44
+
45
+ // // Choose the appropriate mode for your use case
46
+
47
+ // /**
48
+ // * Nile icon component.
49
+ // *
50
+ // * @tag nile-code-editor
51
+ // *
52
+ // */
53
+ // @customElement('nile-code-editor')
54
+ // export class NileCodeEditor extends NileElement {
55
+
56
+ // @query('.code__editor__container') codeEditor: HTMLInputElement;
57
+
58
+ // @property({ type: String, reflect: true , attribute: true }) value = '';
59
+
60
+ // @property({ type: String, reflect: true , attribute: true }) expandIcon = "expand-2";
61
+
62
+ // @property({ type: String, reflect: true , attribute: true }) placeholder = "";
63
+
64
+ // @property({ type: Object, reflect: true , attribute: true }) customAutoCompletions: object | any = {};
65
+
66
+ // @property({ type: Array, reflect: true , attribute: true }) customCompletionsPaths: string[] = [];
67
+
68
+ // @property({ type: String, reflect: true , attribute: true}) language: 'javascript' | 'sql' | 'json' | 'html' = 'javascript';
69
+
70
+ // @property({ type: String, reflect: true , attribute: 'error-message' }) errorMessage: string = '';
71
+
72
+ // @property({ type: Boolean, reflect: true , attribute: true }) error: boolean = false;
73
+
74
+ // @property({ type: Boolean, reflect: true , attribute: true }) enableSearch: boolean = false;
75
+
76
+ // @property({ type: Boolean, reflect: true , attribute: true }) noborder: boolean = false;
77
+
78
+ // @property({ type: Boolean, reflect: true , attribute: true }) multiline: boolean = false;
79
+
80
+ // @property({ type: Boolean, reflect: true , attribute: true }) enableFoldGutters: boolean = false;
81
+
82
+ // @property({ type: Boolean, reflect: true , attribute: true }) allowVariableInCustomSuggestion: boolean = false;
83
+
84
+ // @property({ type: Boolean, reflect: true , attribute: true }) lineNumbers: boolean = false;
85
+
86
+ // @property({ type: Boolean, reflect: true , attribute: false }) disableSyntaxHighlighting: boolean = false;
87
+
88
+ // @property({ type: Object, attribute: false }) customThemeCSS: object | null = customisedThemeCss;
89
+
90
+ // @property({ type: Boolean, reflect: true , attribute: true }) lineNumbersMultiline: boolean = true;
91
+
92
+ // @property({ type: Boolean, reflect: true , attribute: true }) hasScroller: boolean = true;
93
+
94
+ // @property({ type: Boolean, reflect: true , attribute: true }) expandable: boolean = true;
95
+
96
+ // @property({ type: Boolean, reflect: true , attribute: true}) readonly: boolean = false;
97
+
98
+ // @property({ type: Boolean, reflect: true , attribute: true}) debounce: boolean = false;
99
+
100
+ // @property({ type: Number, reflect: true , attribute: true}) debounceTimeout: number = 200;
101
+
102
+ // @property({ type: Boolean, reflect: true , attribute: true}) aboveCursor: boolean = false;
103
+
104
+ // @property({ type: Boolean, reflect: true, attribute: true }) tabCompletion: boolean = true;
105
+
106
+ // @property({ type: Boolean, reflect: true, attribute: true }) defaultFont: boolean = false;
107
+
108
+ // @property({ type: Object, attribute: false }) autoCompleteStyle: { width?: string; multiline?: boolean } | undefined = undefined;
109
+
110
+ // public view: EditorView;
111
+ // public viewState:EditorState;
112
+ // private timeOut: any = null;
113
+ // private resizeObserver?: ResizeObserver;
114
+
115
+ // // Compartments for initialiazing and switching extensions
116
+ // private lineNumbersComp = new Compartment();
117
+ // private restrictSingleLineComp = new Compartment();
118
+ // private readOnlyComp = new Compartment();
119
+ // private customCompletionComp = new Compartment();
120
+ // private placeholderComp = new Compartment();
121
+ // private defaultSyntaxHighlightingComp = new Compartment();
122
+ // private themeComp = new Compartment();
123
+ // private autoCompletionComp = new Compartment();
124
+ // private autoCompleteStyleComp = new Compartment();
125
+
126
+ // private isSpacePressed:boolean = false;
127
+ // /**
128
+ // * The styles for CodeEditor
129
+ // * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
130
+ // */
131
+ // public static get styles(): CSSResultArray {
132
+ // return [styles];
133
+ // }
134
+
135
+ // connectedCallback(): void {
136
+ // super.connectedCallback();
137
+ // this.emit('nile-init',undefined,false);
138
+ // }
139
+
140
+ // disconnectedCallback(): void {
141
+ // super.disconnectedCallback();
142
+ // this.resizeObserver?.disconnect();
143
+ // this.view.destroy()
144
+ // this.emit('nile-destroy',undefined,false);
145
+ // }
146
+
147
+ // firstUpdated() {
148
+ // this.createNewView()
149
+
150
+ // // Initialize ResizeObserver to watch for container resize
151
+ // if (this.autoCompleteStyle?.width) {
152
+ // this.resizeObserver = new ResizeObserver(entries => {
153
+ // for (const entry of entries) {
154
+ // const width = entry.contentRect.width;
155
+ // this.updateAutocompleteWidth(width);
156
+ // }
157
+ // });
158
+ // this.resizeObserver.observe(this.codeEditor);
159
+ // }
160
+
161
+ // this.emit('nile-after-init',{
162
+ // codeMirrorInstance: this.view,
163
+ // createNewView: this.createNewView,
164
+ // insertAtCursor: this.insertBetweenCode
165
+ // }, false )
166
+ // }
167
+
168
+ // getTabCompletionKeymap() {
169
+ // return this.tabCompletion
170
+ // ? keymap.of([
171
+ // {
172
+ // key: 'Tab',
173
+ // run: acceptCompletion,
174
+ // }
175
+ // ])
176
+ // : [];
177
+ // }
178
+
179
+ // protected updated(changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void{
180
+ // super.updated(changedProperties);
181
+ // if (changedProperties.has('value') && this.view.state.doc.toString()!=this.value) {
182
+ // // Editor has already been initialized, update its state
183
+ // this.singleLineMultiLineToggle();
184
+ // }
185
+ // if (changedProperties.has('multiline')) {
186
+ // this.view.dispatch({
187
+ // effects: [
188
+ // this.lineNumbersComp.reconfigure(this.getLineNumbersExension()),
189
+ // this.restrictSingleLineComp.reconfigure(this.getSingleLineExtension())
190
+ // ],
191
+ // })
192
+ // this.singleLineMultiLineToggle();
193
+ // }
194
+ // if (changedProperties.has('readonly')) {
195
+ // this.view.dispatch({
196
+ // effects: [
197
+ // this.readOnlyComp.reconfigure(this.getReadOnlyExtension()),
198
+ // ]
199
+ // })
200
+ // }
201
+ // if (changedProperties.has('aboveCursor')) {
202
+ // this.view.dispatch({
203
+ // effects: [
204
+ // this.autoCompletionComp.reconfigure(
205
+ // autocompletion({ aboveCursor: this.aboveCursor })
206
+ // )
207
+ // ]
208
+ // });
209
+ // }
210
+ // if (changedProperties.has('placeholder')) {
211
+ // this.view.dispatch({
212
+ // effects: [
213
+ // this.placeholderComp.reconfigure(this.getPlaceholderExtension()),
214
+ // ]
215
+ // })
216
+ // }
217
+ // if (changedProperties.has('lineNumbers') || changedProperties.has('lineNumbersMultiline')) {
218
+ // this.view.dispatch({
219
+ // effects: [
220
+ // this.lineNumbersComp.reconfigure(this.getLineNumbersExension()),
221
+ // ]
222
+ // })
223
+ // }
224
+ // if(changedProperties.has('customAutoCompletions') || changedProperties.has('customCompletionsPaths')){
225
+ // this.view.dispatch({
226
+ // effects: [
227
+ // this.customCompletionComp.reconfigure(javascriptLanguage.data.of({
228
+ // autocomplete: this.customAutocomplete
229
+ // }))
230
+ // ]
231
+ // })
232
+ // }
233
+ // if(changedProperties.has('disableSyntaxHighlighting')){
234
+ // this.view.dispatch({
235
+ // effects: [
236
+ // this.defaultSyntaxHighlightingComp.reconfigure(this.getDefaultSyntaxHighlightingExtension())
237
+ // ]
238
+ // })
239
+ // }
240
+ // if(changedProperties.has('customThemeCSS')){
241
+ // this.view.dispatch({
242
+ // effects: [
243
+ // this.themeComp.reconfigure(this.getCustomThemeExtension())
244
+ // ]
245
+ // })
246
+ // }
247
+ // if(changedProperties.has('autoCompleteStyle') && this.view){
248
+ // if (this.autoCompleteStyle?.width) {
249
+ // // Initialize ResizeObserver if autoCompleteStyle width is enabled
250
+ // if (!this.resizeObserver) {
251
+ // this.resizeObserver = new ResizeObserver(entries => {
252
+ // for (const entry of entries) {
253
+ // const width = entry.contentRect.width;
254
+ // this.updateAutocompleteWidth(width);
255
+ // }
256
+ // });
257
+ // this.resizeObserver.observe(this.codeEditor);
258
+ // }
259
+ // } else {
260
+ // // Disconnect ResizeObserver if autoCompleteStyle width is disabled
261
+ // this.resizeObserver?.disconnect();
262
+ // this.resizeObserver = undefined;
263
+ // }
264
+
265
+ // this.view.dispatch({
266
+ // effects: [
267
+ // this.autoCompleteStyleComp.reconfigure(this.getAutoCompleteStyleExtension())
268
+ // ]
269
+ // })
270
+ // }
271
+ // }
272
+
273
+ // public render(): TemplateResult {
274
+ // const hasErrorMessage = !!this.errorMessage;
275
+ // const hasError = !!this.error;
276
+ // const noborder = !!this.noborder;
277
+ // const noScrollbar = !this.hasScroller
278
+ // return html`<div
279
+ // part="code-editor-base"
280
+ // class=${classMap({
281
+ // 'code__editor__container': true,
282
+ // 'noborder': noborder,
283
+ // 'error': hasError || hasErrorMessage,
284
+ // 'code__editor__singleline': !this.multiline,
285
+ // 'no-scroller': noScrollbar
286
+ // })}
287
+ // >
288
+ // ${this.expandable
289
+ // ? html`
290
+ // <div @click="${(e: CustomEvent) => this.emit('nile-expand')}" class="expand__icon__container">
291
+ // <nile-icon
292
+ // name="${this.expandIcon}"
293
+ // size="16"
294
+ // color="black"
295
+ // ></nile-icon>
296
+ // </div>`
297
+ // : ''}
298
+ // </div>
299
+ // ${hasErrorMessage
300
+ // ? html`
301
+ // <nile-form-error-message
302
+ // >${this.errorMessage}</nile-form-error-message
303
+ // >
304
+ // `
305
+ // : ``}`;
306
+ // }
307
+
308
+ // createNewView(emitEvent=true){
309
+ // if(this.view) this.view.destroy();
310
+ // this.createState()
311
+ // this.view = new EditorView({
312
+ // state: this.viewState,
313
+ // parent: this.codeEditor
314
+ // });
315
+
316
+ // this.view.dom.addEventListener('keydown', (e: KeyboardEvent) => {
317
+ // this.checkForSpaceKey(e);
318
+ // this.handleEscapeKey(e);
319
+ // }, true);
320
+ // if (emitEvent) this.emit('nile-after-update', { createNewView: this.createNewView, codeMirrorInstance: this.view, }, false );
321
+ // }
322
+
323
+ // checkForSpaceKey(e: KeyboardEvent) {
324
+ // if (e.code === 'Space' && !e.ctrlKey) {
325
+ // this.isSpacePressed = true;
326
+ // } else {
327
+ // this.isSpacePressed = false;
328
+ // }
329
+ // }
330
+
331
+ // public closeCompletion() {
332
+ // if (this.view) {
333
+ // closeCompletion(this.view);
334
+ // }
335
+ // }
336
+
337
+ // handleEscapeKey(e: KeyboardEvent) {
338
+ // if (e.key === 'Escape' && this.view && completionStatus(this.view.state) !== null) {
339
+ // e.stopPropagation();
340
+ // e.preventDefault();
341
+ // closeCompletion(this.view);
342
+ // }
343
+ // }
344
+
345
+ // createState(){
346
+ // const lineNumbersExtension = this.lineNumbersComp.of(this.getLineNumbersExension());
347
+ // const readOnlyExtension = this.readOnlyComp.of(this.getReadOnlyExtension());
348
+ // const restrictSingleLineExtension = this.restrictSingleLineComp.of(this.getSingleLineExtension())
349
+ // const placeholderExtension = this.placeholderComp.of(this.getPlaceholderExtension())
350
+ // const customThemeExtension=this.themeComp.of(this.getCustomThemeExtension());
351
+ // const defaultSyntaxHighlightingExtension = this.defaultSyntaxHighlightingComp.of(this.getDefaultSyntaxHighlightingExtension());
352
+ // const autoCompleteStyleExtension = this.autoCompleteStyleComp.of(this.getAutoCompleteStyleExtension());
353
+ // const language = this.getLanguageExtension()
354
+ // const customAutoCompletions = this.customCompletionComp.of(javascriptLanguage.data.of({
355
+ // autocomplete: this.customAutocomplete
356
+ // }));
357
+
358
+ // this.viewState = EditorState.create({
359
+ // doc: !this.multiline ? convertToSingleLine(this.value) : this.value,
360
+ // extensions: [
361
+ // basicSetup({
362
+ // highlightActiveLine: false,
363
+ // foldGutter: this.enableFoldGutters,
364
+ // enableSearch:this.enableSearch
365
+ // }),
366
+ // lineNumbersExtension,
367
+ // readOnlyExtension,
368
+ // restrictSingleLineExtension,
369
+ // customAutoCompletions,
370
+ // placeholderExtension,
371
+ // defaultSyntaxHighlightingExtension,
372
+ // this.autoCompletionComp.of(
373
+ // autocompletion({ aboveCursor: this.aboveCursor })
374
+ // ),
375
+ // language,
376
+ // customThemeExtension,
377
+ // autoCompleteStyleExtension,
378
+ // this.getTabCompletionKeymap(),
379
+ // EditorView.updateListener.of((v: ViewUpdate) => {
380
+ // if (v.docChanged) {
381
+ // this.debounce ? this.emitAfterTimeout({ value: this.view.state.doc.toString() }) : this.emit('nile-change', { value: this.view.state.doc.toString() })
382
+ // }
383
+ // }),
384
+ // EditorView.domEventHandlers({
385
+ // focus: () => this.dispatchEvent(new Event('nile-focus')),
386
+ // blur: () => this.dispatchEvent(new Event('nile-blur')),
387
+ // }),
388
+ // ],
389
+ // });
390
+ // return this.viewState
391
+ // }
392
+ // /**
393
+ // * Custom autocomplete handler for code editor suggestions
394
+ // * @param context CompletionContext from CodeMirror
395
+ // * @returns CompletionResult with suggestions or null if no suggestions
396
+ // */
397
+ // customAutocomplete = (context: CompletionContext): CompletionResult | null => {
398
+ // // Getting the valid last line, last text from the code editor
399
+ // const text = context.state.doc.sliceString(0, context.pos);
400
+ // const lastWord = text.split('\n').at(-1)?.split(' ').at(-1) || '';
401
+ // const [textBeforeCursor, baseTextAfterSeperation] = splitStringAtLastSeparator(lastWord);
402
+
403
+ // return this.getNestedSuggestions(context, textBeforeCursor, baseTextAfterSeperation)
404
+ // || this.getTopLevelSuggestions(context, textBeforeCursor);
405
+ // };
406
+
407
+ // /**
408
+ // * Gets nested property suggestions based on the current path
409
+ // * @param context CompletionContext from CodeMirror
410
+ // * @param textBeforeCursor Text before cursor position
411
+ // * @param baseTextAfterSeperation Text after the last separator (. or [)
412
+ // * @returns CompletionResult with nested suggestions or null
413
+ // */
414
+ // getNestedSuggestions(context: CompletionContext, textBeforeCursor: string, baseTextAfterSeperation: string) {
415
+ // // Return early if not a valid path or not ending with . or [
416
+ // if (!isValidPath(textBeforeCursor) || !['.', '['].includes(textBeforeCursor.at(-1)!)) {
417
+ // return null;
418
+ // }
419
+
420
+ // const path = parsePath(textBeforeCursor);
421
+ // if (!path) return null;
422
+
423
+ // const textAfterSeperation = baseTextAfterSeperation.replace(/["'\[]/g, '');
424
+ // const isInString = textAfterSeperation !== baseTextAfterSeperation;
425
+ // const isBracket = textBeforeCursor.at(-1) === '[';
426
+
427
+ // // Return null if we're in a string after a dot
428
+ // if (textBeforeCursor.at(-1) === '.' && isInString) return null;
429
+
430
+ // // Get nested properties and filter by text after separation if it exists
431
+ // let resolved = resolveNestedProperties(this.customAutoCompletions, path);
432
+ // if (!resolved || typeof resolved !== 'object') return null;
433
+
434
+ // if (textAfterSeperation) {
435
+ // resolved = Object.fromEntries(
436
+ // Object.entries(resolved).filter(([key]) =>
437
+ // key.toLowerCase().startsWith(textAfterSeperation.toLowerCase())
438
+ // )
439
+ // );
440
+ // }
441
+
442
+ // return {
443
+ // from: context.pos - textAfterSeperation.length,
444
+ // options: Object.keys(resolved).map(key => ({
445
+ // label: key,
446
+ // type: 'property',
447
+ // info: `Key of ${path[path.length - 1]}`,
448
+ // apply: !this.allowVariableInCustomSuggestion && (isBracket && !isInString)
449
+ // ? `'${key}'`
450
+ // : key,
451
+ // boost: 999
452
+ // }))
453
+ // };
454
+ // }
455
+
456
+ // /**
457
+ // * Gets top level suggestions based on custom completions and paths
458
+ // * @param context CompletionContext from CodeMirror
459
+ // * @param textBeforeCursor Text before cursor position
460
+ // * @returns CompletionResult with top level suggestions or null
461
+ // */
462
+ // getTopLevelSuggestions(context: CompletionContext,textBeforeCursor:string){
463
+ // const baseMatch: any = textBeforeCursor.match(/([a-zA-Z_$][\w$]*)$/);
464
+
465
+ // if (!baseMatch) {
466
+ // const trimmedText = textBeforeCursor.trim();
467
+ // if (trimmedText === '' && !this.isSpacePressed) {
468
+ // const optionsList = Object.keys(this.customAutoCompletions).filter(key =>
469
+ // Object.keys(this.customAutoCompletions[key]).length
470
+ // );
471
+
472
+ // const options = optionsList.map((key) => ({
473
+ // label: key,
474
+ // type: 'property',
475
+ // apply: key,
476
+ // boost: 999
477
+ // }));
478
+
479
+ // if(this.customCompletionsPaths.length){
480
+ // this.customCompletionsPaths.forEach(path => {
481
+ // options.push({
482
+ // label: ''+path,
483
+ // type: 'property',
484
+ // apply: ''+path,
485
+ // boost: 998
486
+ // });
487
+ // });
488
+ // }
489
+
490
+ // return {
491
+ // from: context.pos,
492
+ // options: options
493
+ // };
494
+ // }
495
+ // return null;
496
+ // }
497
+
498
+ // const optionsList = Object.keys(this.customAutoCompletions).filter(key =>
499
+ // Object.keys(this.customAutoCompletions[key]).length &&
500
+ // key.toLowerCase().startsWith(textBeforeCursor.toLowerCase())
501
+ // );
502
+
503
+ // const options=optionsList.map((key) => ({
504
+ // label: key,
505
+ // type: 'property',
506
+ // apply: key,
507
+ // boost: 999
508
+ // }))
509
+ // if(this.customCompletionsPaths.length){
510
+ // this.customCompletionsPaths
511
+ // .filter(path=>path.toLocaleLowerCase().includes(textBeforeCursor.toLocaleLowerCase()))
512
+ // .forEach(path=>{
513
+ // options.push({
514
+ // label: ''+path,
515
+ // type: 'property',
516
+ // apply: ''+path,
517
+ // boost: 998
518
+ // })
519
+ // })
520
+ // }
521
+ // return {
522
+ // from: context.pos - baseMatch[1].length,
523
+ // options: options
524
+ // }
525
+ // }
526
+
527
+ // emitAfterTimeout(value:any){
528
+ // if(this.timeOut) clearTimeout(this.timeOut);
529
+ // this.timeOut=setTimeout(()=> this.emit('nile-change', value, false), this.debounceTimeout)
530
+ // }
531
+
532
+ // public focusAtPosition(pos: number=this.view.state.doc.toString().length): void {
533
+ // if (this.view) {
534
+ // this.view.dispatch({
535
+ // selection: { anchor: pos },
536
+ // });
537
+ // this.view.focus();
538
+ // }
539
+ // }
540
+
541
+ // public insertBetweenCode=(text: string) => {
542
+ // const transaction = this.view.state.changeByRange(range => {
543
+ // const { from, to } = range;
544
+ // return { changes: { from:from, to, insert: text }, range };
545
+ // });
546
+ // this.view.dispatch(transaction);
547
+ // }
548
+
549
+ // singleLineMultiLineToggle() {
550
+ // this.view.dispatch({
551
+ // changes: {
552
+ // from: 0,
553
+ // to: this.view.state.doc.length,
554
+ // insert: !this.multiline
555
+ // ? convertToSingleLine(this.value)
556
+ // : this.value,
557
+ // },
558
+ // });
559
+ // }
560
+
561
+ // //EXTENSION CONFIGURATIONS
562
+ // getLineNumbersExension() {
563
+ // return (!this.multiline && this.lineNumbers) || (this.multiline && this.lineNumbersMultiline) ? lineNumbers() : [];
564
+ // }
565
+
566
+ // getLanguageExtension():Extension{
567
+ // switch(this.language){
568
+ // case 'sql':
569
+ // return sql();
570
+ // case 'json':
571
+ // return json();
572
+ // case 'html':
573
+ // return htmlLang();
574
+ // default:
575
+ // return javascript();
576
+ // }
577
+ // }
578
+
579
+ // getReadOnlyExtension() {
580
+ // return this.readonly ? EditorState.readOnly.of(true) : [];
581
+ // }
582
+
583
+ // getSingleLineExtension() {
584
+ // return !this.multiline ? EditorState.transactionFilter.of(tr =>
585
+ // tr.newDoc.lines > 1 ? [] : tr
586
+ // ) : [];
587
+ // }
588
+
589
+ // getPlaceholderExtension(){
590
+ // return this.placeholder ? placeholder(this.placeholder) : [];
591
+ // }
592
+
593
+ // getDefaultSyntaxHighlightingExtension(){
594
+ // return !this.disableSyntaxHighlighting ? syntaxHighlighting(defaultHighlightStyle, { fallback: true }):[]
595
+ // }
596
+
597
+ // getCustomThemeExtension(): Extension {
598
+ // if(this.customThemeCSS) {
599
+ // if(this.defaultFont){
600
+ // return [EditorView.theme(this.customThemeCSS as { [selector: string]: StyleSpec }), EditorView.theme(customisedThemeCss),EditorView.theme(fontFamily)];
601
+ // }
602
+ // return [EditorView.theme(this.customThemeCSS as { [selector: string]: StyleSpec }), EditorView.theme(customisedThemeCss)];
603
+ // }
604
+ // if(this.defaultFont){
605
+ // return [EditorView.theme(customisedThemeCss), EditorView.theme(fontFamily)];
606
+ // }
607
+ // return [EditorView.theme(customisedThemeCss)];
608
+ // }
609
+
610
+ // getAutoCompleteStyleExtension(width?: number): Extension {
611
+ // if (this.autoCompleteStyle?.width) {
612
+ // const containerWidth = width || (this.codeEditor ? this.codeEditor.getBoundingClientRect().width : 300);
613
+ // const widthPercentage = parseFloat(this.autoCompleteStyle.width.replace('%', ''));
614
+ // const codeEditorWidth = (containerWidth * widthPercentage) / 100;
615
+
616
+ // const multilineStyles: { [key: string]: string } = this.autoCompleteStyle.multiline ? {
617
+ // overflow: "visible",
618
+ // textOverflow: "unset",
619
+ // whiteSpace: "normal",
620
+ // wordWrap: "break-word"
621
+ // } : {
622
+ // overflow: "hidden",
623
+ // textOverflow: "ellipsis",
624
+ // whiteSpace: "nowrap"
625
+ // };
626
+
627
+ // return [
628
+ // tooltips({
629
+ // position: "fixed",
630
+ // tooltipSpace: () => {
631
+ // const rect = this.codeEditor.getBoundingClientRect();
632
+ // return {
633
+ // left: rect.left,
634
+ // top: 0,
635
+ // right: rect.right,
636
+ // bottom: 1000
637
+ // };
638
+ // }
639
+ // }),
640
+ // EditorView.theme({
641
+ // ".cm-tooltip.cm-tooltip-autocomplete": {
642
+ // maxWidth: (codeEditorWidth - 15) + "px !important"
643
+ // },
644
+ // ".cm-tooltip.cm-tooltip-autocomplete > ul > li": {
645
+ // ...multilineStyles,
646
+ // maxWidth: "100%"
647
+ // }
648
+ // })
649
+ // ];
650
+ // }
651
+ // return [];
652
+ // }
653
+
654
+ // private updateAutocompleteWidth(width: number) {
655
+ // if (this.view) {
656
+ // this.view.dispatch({
657
+ // effects: this.autoCompleteStyleComp.reconfigure(this.getAutoCompleteStyleExtension(width))
658
+ // });
659
+ // }
660
+ // }
661
+
662
+ // restrictSingleLine() {
663
+ // return EditorState.transactionFilter.of(tr =>
664
+ // tr.newDoc.lines > 1 ? [] : tr
665
+ // );
666
+ // }
667
+ // /* #endregion */
668
+ // }
669
+
670
+ // export default NileCodeEditor;
671
+
672
+ // declare global {
673
+ // interface HTMLElementTagNameMap {
674
+ // 'nile-code-editor': NileCodeEditor;
675
+ // }
676
+ // }
677
+
678
+ // /**
679
+ // * Parses a string path into an array of keys representing nested object access
680
+ // * @param text The path string to parse (e.g. "foo.bar[0].baz")
681
+ // * @returns Array of keys if valid path, null otherwise
682
+ // * @example
683
+ // * parsePath("foo.bar[0]") // returns ["foo", "bar", "0"]
684
+ // * parsePath("invalid") // returns null
685
+ // */
686
+ // function parsePath(text: string) {
687
+ // const regex = /([a-zA-Z_$][\w$]*)(\[(?:[^\]]+)\]|\.[a-zA-Z_$][\w$]*)*/g;
688
+ // const matches = [...text.matchAll(regex)];
689
+ // if (matches.length > 0) {
690
+ // const base = matches[0][1]; // The base object name
691
+ // const keys = [base];
692
+ // // Extract keys from dot or bracket notation
693
+ // const pathMatches = text.match(/\[(.*?)\]|\.(\w+)/g) || [];
694
+ // for (const match of pathMatches) {
695
+ // if (match.startsWith('[')) {
696
+ // keys.push(match.slice(1, -1).replace(/['"]/g, '')); // Remove brackets and quotes
697
+ // } else if (match.startsWith('.')) {
698
+ // keys.push(match.slice(1));
699
+ // }
700
+ // }
701
+ // return keys;
702
+ // }
703
+ // return null;
704
+ // };
705
+
706
+ // /**
707
+ // * Splits a path string at the last separator (. or [)
708
+ // * @param input The path string to split
709
+ // * @returns Array containing [path up to last separator, remainder after separator]
710
+ // * @example
711
+ // * splitStringAtLastSeparator("foo.bar[0]") // returns ["foo.bar[", "0"]
712
+ // */
713
+ // function splitStringAtLastSeparator(input:string) {
714
+ // const lastSeparatorIndex = Math.max(input.lastIndexOf('.'), input.lastIndexOf('['));
715
+ // if (lastSeparatorIndex === -1) return [input, ''];
716
+ // return [input.slice(0, lastSeparatorIndex + 1), input.slice(lastSeparatorIndex + 1)];
717
+ // }
718
+
719
+ // /**
720
+ // * Traverses an object using an array of keys to access nested properties
721
+ // * @param obj The object to traverse
722
+ // * @param keys Array of keys defining the path to the desired property
723
+ // * @returns The value at the specified path, or null if path is invalid
724
+ // * @example
725
+ // * resolveNestedProperties({foo: {bar: 123}}, ["foo", "bar"]) // returns 123
726
+ // */
727
+ // function resolveNestedProperties (obj:any, keys:any[]){
728
+ // return keys.reduce((acc, key) => {
729
+ // if (acc && typeof acc === 'object') {
730
+ // return acc[key];
731
+ // }
732
+ // return null;
733
+ // }, obj);
734
+ // };
735
+
736
+ // /**
737
+ // * Validates if a string represents a valid object path format
738
+ // * @param path The path string to validate
739
+ // * @returns Boolean indicating if path format is valid
740
+ // * @example
741
+ // * isValidPath("foo.bar[0]") // returns true
742
+ // * isValidPath("foo..bar") // returns false
743
+ // */
744
+ // function isValidPath(path: string) {
745
+ // // Regex to validate the format of the string
746
+ // const regex = /^([a-zA-Z_$][\w$]*)(\.[a-zA-Z_$][\w$]*|\[\s*(['"]?[a-zA-Z0-9_$]*['"]?)\s*\])*([\.\[])?$/;
747
+ // // Test the string against the regex
748
+ // return regex.test(path);
749
+ // }
750
+
751
+ // /**
752
+ // * Converts multi-line code into a single line by removing line breaks and extra whitespace
753
+ // * @param code The code string to convert
754
+ // * @returns Single line version of the code
755
+ // * @example
756
+ // * convertToSingleLine("foo\n bar") // returns "foo bar"
757
+ // */
758
+ // function convertToSingleLine(code: string) {
759
+ // if (!code) return '';
760
+ // // Remove line breaks and unnecessary whitespace
761
+ // return code.replace(/\s+/g, ' ').trim();
762
+ // }
763
+