@aquera/nile-elements 1.9.5 → 1.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/dist/index-178e1e57.cjs.js +2 -0
- package/dist/index-178e1e57.cjs.js.map +1 -0
- package/dist/index-1faa963c.esm.js +1 -0
- package/dist/index-249de90a.esm.js +1 -0
- package/dist/index-353172ed.esm.js +1 -0
- package/dist/index-6f3fa4ab.esm.js +1 -0
- package/dist/index-89c520e9.cjs.js +5 -0
- package/dist/index-89c520e9.cjs.js.map +1 -0
- package/dist/index-920675c4.esm.js +1 -0
- package/dist/index-b387a9f4.cjs.js +2 -0
- package/dist/index-b387a9f4.cjs.js.map +1 -0
- package/dist/index-cc1385e0.cjs.js +2 -0
- package/dist/index-cc1385e0.cjs.js.map +1 -0
- package/dist/index-dedc38a6.esm.js +1 -0
- package/dist/index-df196058.cjs.js +2 -0
- package/dist/index-df196058.cjs.js.map +1 -0
- package/dist/index-f956f56d.cjs.js +7 -0
- package/dist/index-f956f56d.cjs.js.map +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +3802 -664
- package/dist/internal/glyph.cjs.js +2 -0
- package/dist/internal/glyph.cjs.js.map +1 -0
- package/dist/internal/glyph.esm.js +5 -0
- package/dist/nile-auto-complete/index.cjs.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.cjs.js +1 -1
- package/dist/nile-auto-complete/portal-manager.cjs.js +1 -1
- package/dist/nile-auto-complete/portal-utils.cjs.js +1 -1
- package/dist/nile-chip/nile-chip.css.cjs.js +1 -1
- package/dist/nile-chip/nile-chip.css.cjs.js.map +1 -1
- package/dist/nile-chip/nile-chip.css.esm.js +8 -1
- package/dist/nile-code-editor/extensionSetup.cjs.js +7 -7
- package/dist/nile-code-editor/extensionSetup.cjs.js.map +1 -1
- package/dist/nile-code-editor/extensionSetup.esm.js +1 -1
- package/dist/nile-code-editor/index.cjs.js +1 -1
- package/dist/nile-code-editor/index.esm.js +1 -1
- package/dist/nile-code-editor/nile-code-editor.cjs.js +2 -2
- package/dist/nile-code-editor/nile-code-editor.cjs.js.map +1 -1
- package/dist/nile-code-editor/nile-code-editor.esm.js +4 -4
- package/dist/nile-color-picker/index.cjs.js +1 -1
- package/dist/nile-color-picker/nile-color-picker.cjs.js +1 -1
- package/dist/nile-combobox/index.cjs.js +1 -1
- package/dist/nile-combobox/index.esm.js +1 -1
- package/dist/nile-combobox/nile-combobox.cjs.js +1 -1
- package/dist/nile-combobox/nile-combobox.esm.js +1 -1
- package/dist/nile-combobox/portal-manager.cjs.js +1 -1
- package/dist/nile-context-menu/index.cjs.js +1 -1
- package/dist/nile-context-menu/nile-context-menu.cjs.js +1 -1
- package/dist/nile-context-submenu/index.cjs.js +1 -1
- package/dist/nile-context-submenu/nile-context-submenu.cjs.js +1 -1
- package/dist/nile-detail/index.cjs.js +1 -1
- package/dist/nile-detail/index.esm.js +1 -1
- package/dist/nile-detail/nile-detail.cjs.js +1 -1
- package/dist/nile-detail/nile-detail.esm.js +1 -1
- package/dist/nile-dropdown/index.cjs.js +1 -1
- package/dist/nile-dropdown/nile-dropdown.cjs.js +1 -1
- package/dist/nile-dropdown/portal-manager.cjs.js +1 -1
- package/dist/nile-file-upload/index.cjs.js +1 -1
- package/dist/nile-file-upload/nile-file-upload.cjs.js +1 -1
- package/dist/nile-file-upload/nile-file-upload.template.cjs.js +1 -1
- package/dist/nile-floating-panel/index.cjs.js +1 -1
- package/dist/nile-floating-panel/nile-floating-panel.cjs.js +1 -1
- package/dist/nile-hero/nile-hero.cjs.js +1 -1
- package/dist/nile-hero/nile-hero.cjs.js.map +1 -1
- package/dist/nile-hero/nile-hero.css.cjs.js +1 -1
- package/dist/nile-hero/nile-hero.css.cjs.js.map +1 -1
- package/dist/nile-hero/nile-hero.css.esm.js +14 -14
- package/dist/nile-hero/nile-hero.esm.js +1 -1
- package/dist/nile-hero-header/nile-hero-header.cjs.js +1 -1
- package/dist/nile-hero-header/nile-hero-header.cjs.js.map +1 -1
- package/dist/nile-hero-header/nile-hero-header.css.cjs.js +1 -1
- package/dist/nile-hero-header/nile-hero-header.css.cjs.js.map +1 -1
- package/dist/nile-hero-header/nile-hero-header.css.esm.js +11 -11
- package/dist/nile-hero-header/nile-hero-header.esm.js +3 -3
- package/dist/nile-lite-tooltip/index.cjs.js +1 -1
- package/dist/nile-lite-tooltip/nile-lite-tooltip.cjs.js +1 -1
- package/dist/nile-markdown-editor/index.cjs.js +1 -1
- package/dist/nile-markdown-editor/nile-markdown-editor.cjs.js +1 -1
- package/dist/nile-popover/index.cjs.js +1 -1
- package/dist/nile-popover/nile-popover.cjs.js +1 -1
- package/dist/nile-popover/portal-manager.cjs.js +1 -1
- package/dist/nile-popup/index.cjs.js +1 -1
- package/dist/nile-popup/nile-popup.cjs.js +1 -1
- package/dist/nile-rich-text-editor/index.cjs.js +1 -1
- package/dist/nile-rich-text-editor/index.esm.js +1 -1
- package/dist/nile-rich-text-editor/nile-rich-text-editor.cjs.js +1 -1
- package/dist/nile-rich-text-editor/nile-rich-text-editor.cjs.js.map +1 -1
- package/dist/nile-rich-text-editor/nile-rich-text-editor.css.cjs.js +1 -1
- package/dist/nile-rich-text-editor/nile-rich-text-editor.css.cjs.js.map +1 -1
- package/dist/nile-rich-text-editor/nile-rich-text-editor.css.esm.js +70 -0
- package/dist/nile-rich-text-editor/nile-rich-text-editor.esm.js +1 -1
- package/dist/nile-rich-text-editor/nile-rte-image.cjs.js +3 -0
- package/dist/nile-rich-text-editor/nile-rte-image.cjs.js.map +1 -0
- package/dist/nile-rich-text-editor/nile-rte-image.esm.js +96 -0
- package/dist/nile-select/index.cjs.js +1 -1
- package/dist/nile-select/nile-select.cjs.js +1 -1
- package/dist/nile-select/portal-manager.cjs.js +1 -1
- package/dist/nile-side-bar-action/index.cjs.js +1 -1
- package/dist/nile-side-bar-action/nile-side-bar-action.cjs.js +1 -1
- package/dist/nile-side-bar-action/portal-manager.cjs.js +1 -1
- package/dist/nile-tooltip/index.cjs.js +1 -1
- package/dist/nile-tooltip/nile-tooltip.cjs.js +1 -1
- package/dist/nile-virtual-select/index.cjs.js +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.cjs.js +1 -1
- package/dist/nile-virtual-select/portal-manager.cjs.js +1 -1
- package/dist/nile-virtual-select/renderer.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/emoji.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/emoji.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/emoji.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/commands.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/commands.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/commands.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/create-state.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/create-state.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/create-state.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/export.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/export.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/export.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/index.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/index.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/index.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/inputrules.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/inputrules.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/inputrules.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/keymap.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/keymap.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/keymap.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/markdown-parse.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/markdown-parse.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/markdown-parse.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/markdown.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/markdown.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/markdown.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/office-paste.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/office-paste.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/office-paste.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/code-highlight.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/code-highlight.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/code-highlight.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/embed-view.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/embed-view.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/embed-view.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/embeds.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/embeds.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/embeds.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/find-replace.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/find-replace.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/find-replace.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/format-painter.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/format-painter.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/format-painter.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/image-view.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/image-view.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/image-view.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/image.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/image.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/image.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/link.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/link.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/link.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/math-view.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/math-view.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/math-view.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/max-length.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/max-length.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/max-length.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/paste.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/paste.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/paste.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/placeholder.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/placeholder.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/placeholder.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/single-line.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/single-line.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/single-line.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/suggestions.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/suggestions.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/suggestions.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/tables.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/tables.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/tables.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/task-list.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/task-list.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/plugins/task-list.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/sanitize.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/sanitize.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/sanitize.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/schema.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/schema.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/schema.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/selection-state.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/selection-state.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/selection-state.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/serializer.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/serializer.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/serializer.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/index.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/index.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/index.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.css.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.css.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.css.esm.js +780 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.esm.js +97 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.esm.js +244 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.esm.js +137 -0
- package/dist/nile-wysiwyg-editor/types.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/types.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/types.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/ui/bookmark-panel.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/bookmark-panel.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/bookmark-panel.esm.js +97 -0
- package/dist/nile-wysiwyg-editor/ui/bubble-menu.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/bubble-menu.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/bubble-menu.esm.js +67 -0
- package/dist/nile-wysiwyg-editor/ui/code-block-menu.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/code-block-menu.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/code-block-menu.esm.js +65 -0
- package/dist/nile-wysiwyg-editor/ui/embed-menu.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/embed-menu.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/embed-menu.esm.js +64 -0
- package/dist/nile-wysiwyg-editor/ui/embed-panel.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/embed-panel.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/embed-panel.esm.js +68 -0
- package/dist/nile-wysiwyg-editor/ui/emoji-picker.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/emoji-picker.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/emoji-picker.esm.js +96 -0
- package/dist/nile-wysiwyg-editor/ui/find-replace.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/find-replace.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/find-replace.esm.js +112 -0
- package/dist/nile-wysiwyg-editor/ui/image-menu.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/image-menu.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/image-menu.esm.js +64 -0
- package/dist/nile-wysiwyg-editor/ui/image-panel.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/image-panel.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/image-panel.esm.js +171 -0
- package/dist/nile-wysiwyg-editor/ui/insert-menu.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/insert-menu.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/insert-menu.esm.js +90 -0
- package/dist/nile-wysiwyg-editor/ui/link-editor.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/link-editor.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/link-editor.esm.js +114 -0
- package/dist/nile-wysiwyg-editor/ui/markdown-panel.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/markdown-panel.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/markdown-panel.esm.js +80 -0
- package/dist/nile-wysiwyg-editor/ui/math-panel.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/math-panel.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/math-panel.esm.js +92 -0
- package/dist/nile-wysiwyg-editor/ui/shortcut-help.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/shortcut-help.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/shortcut-help.esm.js +147 -0
- package/dist/nile-wysiwyg-editor/ui/source-view.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/source-view.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/source-view.esm.js +79 -0
- package/dist/nile-wysiwyg-editor/ui/special-chars.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/special-chars.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/special-chars.esm.js +96 -0
- package/dist/nile-wysiwyg-editor/ui/suggest-list.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/suggest-list.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/suggest-list.esm.js +67 -0
- package/dist/nile-wysiwyg-editor/ui/table-grid-picker.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/table-grid-picker.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/table-grid-picker.esm.js +100 -0
- package/dist/nile-wysiwyg-editor/ui/table-menu.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/ui/table-menu.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/ui/table-menu.esm.js +58 -0
- package/dist/src/index.d.ts +24 -0
- package/dist/src/index.js +19 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal/glyph.d.ts +6 -0
- package/dist/src/internal/glyph.js +13 -0
- package/dist/src/internal/glyph.js.map +1 -0
- package/dist/src/nile-chip/nile-chip.css.js +8 -1
- package/dist/src/nile-chip/nile-chip.css.js.map +1 -1
- package/dist/src/nile-code-editor/nile-code-editor.js +3 -3
- package/dist/src/nile-code-editor/nile-code-editor.js.map +1 -1
- package/dist/src/nile-hero/nile-hero.css.js +12 -12
- package/dist/src/nile-hero/nile-hero.css.js.map +1 -1
- package/dist/src/nile-hero/nile-hero.js +1 -1
- package/dist/src/nile-hero/nile-hero.js.map +1 -1
- package/dist/src/nile-hero-header/nile-hero-header.css.js +9 -9
- package/dist/src/nile-hero-header/nile-hero-header.css.js.map +1 -1
- package/dist/src/nile-hero-header/nile-hero-header.js +1 -1
- package/dist/src/nile-hero-header/nile-hero-header.js.map +1 -1
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.css.js +70 -0
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.css.js.map +1 -1
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.d.ts +3 -0
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.js +81 -3
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.js.map +1 -1
- package/dist/src/nile-rich-text-editor/nile-rte-image.d.ts +87 -0
- package/dist/src/nile-rich-text-editor/nile-rte-image.js +1073 -0
- package/dist/src/nile-rich-text-editor/nile-rte-image.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/emoji.d.ts +5 -0
- package/dist/src/nile-wysiwyg-editor/emoji.js +138 -0
- package/dist/src/nile-wysiwyg-editor/emoji.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/commands.d.ts +69 -0
- package/dist/src/nile-wysiwyg-editor/engine/commands.js +863 -0
- package/dist/src/nile-wysiwyg-editor/engine/commands.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/create-state.d.ts +35 -0
- package/dist/src/nile-wysiwyg-editor/engine/create-state.js +67 -0
- package/dist/src/nile-wysiwyg-editor/engine/create-state.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/export.d.ts +38 -0
- package/dist/src/nile-wysiwyg-editor/engine/export.js +208 -0
- package/dist/src/nile-wysiwyg-editor/engine/export.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/export.test.d.ts +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/export.test.js +96 -0
- package/dist/src/nile-wysiwyg-editor/engine/export.test.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/index.d.ts +37 -0
- package/dist/src/nile-wysiwyg-editor/engine/index.js +29 -0
- package/dist/src/nile-wysiwyg-editor/engine/index.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/inputrules.d.ts +12 -0
- package/dist/src/nile-wysiwyg-editor/engine/inputrules.js +144 -0
- package/dist/src/nile-wysiwyg-editor/engine/inputrules.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/keymap.d.ts +15 -0
- package/dist/src/nile-wysiwyg-editor/engine/keymap.js +94 -0
- package/dist/src/nile-wysiwyg-editor/engine/keymap.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/markdown-parse.d.ts +22 -0
- package/dist/src/nile-wysiwyg-editor/engine/markdown-parse.js +287 -0
- package/dist/src/nile-wysiwyg-editor/engine/markdown-parse.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/markdown-parse.test.d.ts +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/markdown-parse.test.js +106 -0
- package/dist/src/nile-wysiwyg-editor/engine/markdown-parse.test.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/markdown.d.ts +10 -0
- package/dist/src/nile-wysiwyg-editor/engine/markdown.js +162 -0
- package/dist/src/nile-wysiwyg-editor/engine/markdown.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/office-paste.d.ts +13 -0
- package/dist/src/nile-wysiwyg-editor/engine/office-paste.js +182 -0
- package/dist/src/nile-wysiwyg-editor/engine/office-paste.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/code-highlight.d.ts +10 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/code-highlight.js +165 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/code-highlight.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/embed-view.d.ts +17 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/embed-view.js +69 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/embed-view.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/embeds.d.ts +17 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/embeds.js +96 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/embeds.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/find-replace.d.ts +26 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/find-replace.js +123 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/find-replace.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/format-painter.d.ts +28 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/format-painter.js +72 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/format-painter.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/image-view.d.ts +41 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/image-view.js +176 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/image-view.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/image.d.ts +15 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/image.js +64 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/image.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/link.d.ts +11 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/link.js +42 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/link.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/math-view.d.ts +18 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/math-view.js +46 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/math-view.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/max-length.d.ts +7 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/max-length.js +26 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/max-length.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/paste.d.ts +31 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/paste.js +55 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/paste.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/placeholder.d.ts +7 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/placeholder.js +25 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/placeholder.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/single-line.d.ts +10 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/single-line.js +48 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/single-line.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/suggestions.d.ts +29 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/suggestions.js +87 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/suggestions.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/tables.d.ts +8 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/tables.js +11 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/tables.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/task-list.d.ts +16 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/task-list.js +49 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/task-list.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/pm.test.d.ts +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/pm.test.js +883 -0
- package/dist/src/nile-wysiwyg-editor/engine/pm.test.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/productivity.test.d.ts +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/productivity.test.js +129 -0
- package/dist/src/nile-wysiwyg-editor/engine/productivity.test.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/sanitize.d.ts +13 -0
- package/dist/src/nile-wysiwyg-editor/engine/sanitize.js +155 -0
- package/dist/src/nile-wysiwyg-editor/engine/sanitize.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/schema.d.ts +20 -0
- package/dist/src/nile-wysiwyg-editor/engine/schema.js +823 -0
- package/dist/src/nile-wysiwyg-editor/engine/schema.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/selection-state.d.ts +70 -0
- package/dist/src/nile-wysiwyg-editor/engine/selection-state.js +138 -0
- package/dist/src/nile-wysiwyg-editor/engine/selection-state.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/serializer.d.ts +18 -0
- package/dist/src/nile-wysiwyg-editor/engine/serializer.js +63 -0
- package/dist/src/nile-wysiwyg-editor/engine/serializer.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/index.d.ts +3 -0
- package/dist/src/nile-wysiwyg-editor/index.js +3 -0
- package/dist/src/nile-wysiwyg-editor/index.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.d.ts +1 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.js +782 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.d.ts +364 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.js +2038 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.test.d.ts +1 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.test.js +636 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.test.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.d.ts +1 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.js +2 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.d.ts +6 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.js +251 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.d.ts +41 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.js +700 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/types.d.ts +49 -0
- package/dist/src/nile-wysiwyg-editor/types.js +8 -0
- package/dist/src/nile-wysiwyg-editor/types.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/bookmark-panel.d.ts +20 -0
- package/dist/src/nile-wysiwyg-editor/ui/bookmark-panel.js +159 -0
- package/dist/src/nile-wysiwyg-editor/ui/bookmark-panel.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/bubble-menu.d.ts +21 -0
- package/dist/src/nile-wysiwyg-editor/ui/bubble-menu.js +125 -0
- package/dist/src/nile-wysiwyg-editor/ui/bubble-menu.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/code-block-menu.d.ts +18 -0
- package/dist/src/nile-wysiwyg-editor/ui/code-block-menu.js +107 -0
- package/dist/src/nile-wysiwyg-editor/ui/code-block-menu.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/embed-menu.d.ts +19 -0
- package/dist/src/nile-wysiwyg-editor/ui/embed-menu.js +123 -0
- package/dist/src/nile-wysiwyg-editor/ui/embed-menu.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/embed-panel.d.ts +27 -0
- package/dist/src/nile-wysiwyg-editor/ui/embed-panel.js +146 -0
- package/dist/src/nile-wysiwyg-editor/ui/embed-panel.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/emoji-picker.d.ts +21 -0
- package/dist/src/nile-wysiwyg-editor/ui/emoji-picker.js +154 -0
- package/dist/src/nile-wysiwyg-editor/ui/emoji-picker.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/find-replace.d.ts +26 -0
- package/dist/src/nile-wysiwyg-editor/ui/find-replace.js +178 -0
- package/dist/src/nile-wysiwyg-editor/ui/find-replace.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/image-menu.d.ts +18 -0
- package/dist/src/nile-wysiwyg-editor/ui/image-menu.js +129 -0
- package/dist/src/nile-wysiwyg-editor/ui/image-menu.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/image-panel.d.ts +56 -0
- package/dist/src/nile-wysiwyg-editor/ui/image-panel.js +349 -0
- package/dist/src/nile-wysiwyg-editor/ui/image-panel.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/insert-menu.d.ts +25 -0
- package/dist/src/nile-wysiwyg-editor/ui/insert-menu.js +142 -0
- package/dist/src/nile-wysiwyg-editor/ui/insert-menu.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/link-editor.d.ts +30 -0
- package/dist/src/nile-wysiwyg-editor/ui/link-editor.js +189 -0
- package/dist/src/nile-wysiwyg-editor/ui/link-editor.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/markdown-panel.d.ts +24 -0
- package/dist/src/nile-wysiwyg-editor/ui/markdown-panel.js +144 -0
- package/dist/src/nile-wysiwyg-editor/ui/markdown-panel.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/math-panel.d.ts +31 -0
- package/dist/src/nile-wysiwyg-editor/ui/math-panel.js +172 -0
- package/dist/src/nile-wysiwyg-editor/ui/math-panel.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/shortcut-help.d.ts +30 -0
- package/dist/src/nile-wysiwyg-editor/ui/shortcut-help.js +296 -0
- package/dist/src/nile-wysiwyg-editor/ui/shortcut-help.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/source-view.d.ts +19 -0
- package/dist/src/nile-wysiwyg-editor/ui/source-view.js +120 -0
- package/dist/src/nile-wysiwyg-editor/ui/source-view.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/special-chars.d.ts +20 -0
- package/dist/src/nile-wysiwyg-editor/ui/special-chars.js +199 -0
- package/dist/src/nile-wysiwyg-editor/ui/special-chars.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/suggest-list.d.ts +31 -0
- package/dist/src/nile-wysiwyg-editor/ui/suggest-list.js +133 -0
- package/dist/src/nile-wysiwyg-editor/ui/suggest-list.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/table-grid-picker.d.ts +23 -0
- package/dist/src/nile-wysiwyg-editor/ui/table-grid-picker.js +177 -0
- package/dist/src/nile-wysiwyg-editor/ui/table-grid-picker.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/ui/table-menu.d.ts +16 -0
- package/dist/src/nile-wysiwyg-editor/ui/table-menu.js +101 -0
- package/dist/src/nile-wysiwyg-editor/ui/table-menu.js.map +1 -0
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +18 -2
- package/src/index.ts +57 -1
- package/src/internal/glyph.ts +13 -0
- package/src/nile-chip/nile-chip.css.ts +8 -1
- package/src/nile-code-editor/nile-code-editor.ts +3 -3
- package/src/nile-hero/nile-hero.css.ts +12 -12
- package/src/nile-hero/nile-hero.ts +1 -1
- package/src/nile-hero-header/nile-hero-header.css.ts +9 -9
- package/src/nile-hero-header/nile-hero-header.ts +1 -1
- package/src/nile-rich-text-editor/nile-rich-text-editor.css.ts +70 -0
- package/src/nile-rich-text-editor/nile-rich-text-editor.ts +89 -3
- package/src/nile-rich-text-editor/nile-rte-image.ts +1132 -0
- package/src/nile-wysiwyg-editor/emoji.ts +137 -0
- package/src/nile-wysiwyg-editor/engine/commands.ts +1035 -0
- package/src/nile-wysiwyg-editor/engine/create-state.ts +117 -0
- package/src/nile-wysiwyg-editor/engine/export.test.ts +113 -0
- package/src/nile-wysiwyg-editor/engine/export.ts +242 -0
- package/src/nile-wysiwyg-editor/engine/index.ts +69 -0
- package/src/nile-wysiwyg-editor/engine/inputrules.ts +169 -0
- package/src/nile-wysiwyg-editor/engine/keymap.ts +146 -0
- package/src/nile-wysiwyg-editor/engine/markdown-parse.test.ts +148 -0
- package/src/nile-wysiwyg-editor/engine/markdown-parse.ts +337 -0
- package/src/nile-wysiwyg-editor/engine/markdown.ts +165 -0
- package/src/nile-wysiwyg-editor/engine/office-paste.ts +199 -0
- package/src/nile-wysiwyg-editor/engine/plugins/code-highlight.ts +173 -0
- package/src/nile-wysiwyg-editor/engine/plugins/embed-view.ts +85 -0
- package/src/nile-wysiwyg-editor/engine/plugins/embeds.ts +99 -0
- package/src/nile-wysiwyg-editor/engine/plugins/find-replace.ts +155 -0
- package/src/nile-wysiwyg-editor/engine/plugins/format-painter.ts +80 -0
- package/src/nile-wysiwyg-editor/engine/plugins/image-view.ts +220 -0
- package/src/nile-wysiwyg-editor/engine/plugins/image.ts +80 -0
- package/src/nile-wysiwyg-editor/engine/plugins/link.ts +42 -0
- package/src/nile-wysiwyg-editor/engine/plugins/math-view.ts +56 -0
- package/src/nile-wysiwyg-editor/engine/plugins/max-length.ts +24 -0
- package/src/nile-wysiwyg-editor/engine/plugins/paste.ts +74 -0
- package/src/nile-wysiwyg-editor/engine/plugins/placeholder.ts +24 -0
- package/src/nile-wysiwyg-editor/engine/plugins/single-line.ts +47 -0
- package/src/nile-wysiwyg-editor/engine/plugins/suggestions.ts +110 -0
- package/src/nile-wysiwyg-editor/engine/plugins/tables.ts +12 -0
- package/src/nile-wysiwyg-editor/engine/plugins/task-list.ts +65 -0
- package/src/nile-wysiwyg-editor/engine/pm.test.ts +1088 -0
- package/src/nile-wysiwyg-editor/engine/productivity.test.ts +163 -0
- package/src/nile-wysiwyg-editor/engine/sanitize.ts +156 -0
- package/src/nile-wysiwyg-editor/engine/schema.ts +859 -0
- package/src/nile-wysiwyg-editor/engine/selection-state.ts +210 -0
- package/src/nile-wysiwyg-editor/engine/serializer.ts +78 -0
- package/src/nile-wysiwyg-editor/index.ts +3 -0
- package/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.ts +782 -0
- package/src/nile-wysiwyg-editor/nile-wysiwyg-editor.test.ts +750 -0
- package/src/nile-wysiwyg-editor/nile-wysiwyg-editor.ts +2155 -0
- package/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.ts +1 -0
- package/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.css.ts +251 -0
- package/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.ts +772 -0
- package/src/nile-wysiwyg-editor/types.ts +83 -0
- package/src/nile-wysiwyg-editor/ui/bookmark-panel.ts +155 -0
- package/src/nile-wysiwyg-editor/ui/bubble-menu.ts +135 -0
- package/src/nile-wysiwyg-editor/ui/code-block-menu.ts +105 -0
- package/src/nile-wysiwyg-editor/ui/embed-menu.ts +133 -0
- package/src/nile-wysiwyg-editor/ui/embed-panel.ts +143 -0
- package/src/nile-wysiwyg-editor/ui/emoji-picker.ts +152 -0
- package/src/nile-wysiwyg-editor/ui/find-replace.ts +174 -0
- package/src/nile-wysiwyg-editor/ui/image-menu.ts +140 -0
- package/src/nile-wysiwyg-editor/ui/image-panel.ts +337 -0
- package/src/nile-wysiwyg-editor/ui/insert-menu.ts +142 -0
- package/src/nile-wysiwyg-editor/ui/link-editor.ts +180 -0
- package/src/nile-wysiwyg-editor/ui/markdown-panel.ts +143 -0
- package/src/nile-wysiwyg-editor/ui/math-panel.ts +169 -0
- package/src/nile-wysiwyg-editor/ui/shortcut-help.ts +311 -0
- package/src/nile-wysiwyg-editor/ui/source-view.ts +119 -0
- package/src/nile-wysiwyg-editor/ui/special-chars.ts +209 -0
- package/src/nile-wysiwyg-editor/ui/suggest-list.ts +138 -0
- package/src/nile-wysiwyg-editor/ui/table-grid-picker.ts +173 -0
- package/src/nile-wysiwyg-editor/ui/table-menu.ts +109 -0
- package/vscode-html-custom-data.json +491 -1
- package/web-dev-server.config.mjs +6 -2
- package/dist/index-5fef1a0d.esm.js +0 -1
- package/dist/index-8f38fae3.cjs.js +0 -2
- package/dist/index-8f38fae3.cjs.js.map +0 -1
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Webcomponent nile-elements following open-wc recommendations",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "nile-elements",
|
|
6
|
-
"version": "1.9.
|
|
6
|
+
"version": "1.9.7",
|
|
7
7
|
"main": "dist/src/index.js",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"module": "dist/src/index.js",
|
|
@@ -131,7 +131,9 @@
|
|
|
131
131
|
"./nile-color-picker": "./dist/src/nile-color-picker/index.js",
|
|
132
132
|
"./nile-color-swatch": "./dist/src/nile-color-swatch/index.js",
|
|
133
133
|
"./nile-tree": "./dist/src/nile-tree/index.js",
|
|
134
|
-
"./nile-tree-item": "./dist/src/nile-tree-item/index.js"
|
|
134
|
+
"./nile-tree-item": "./dist/src/nile-tree-item/index.js",
|
|
135
|
+
"./nile-wysiwyg-editor": "./dist/src/nile-wysiwyg-editor/index.js",
|
|
136
|
+
"./nile-wysiwyg-toolbar": "./dist/src/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.js"
|
|
135
137
|
},
|
|
136
138
|
"scripts": {
|
|
137
139
|
"analyze": "cem analyze --litelement",
|
|
@@ -167,8 +169,22 @@
|
|
|
167
169
|
"composed-offset-position": "^0.0.4",
|
|
168
170
|
"element-internals-polyfill": "^1.1.20",
|
|
169
171
|
"figlet": "1.7.0",
|
|
172
|
+
"highlight.js": "^11.9.0",
|
|
170
173
|
"lit": "^3.0.0",
|
|
171
174
|
"marked": "^15.0.12",
|
|
175
|
+
"prosemirror-commands": "^1.7.1",
|
|
176
|
+
"prosemirror-dropcursor": "^1.8.2",
|
|
177
|
+
"prosemirror-gapcursor": "^1.4.1",
|
|
178
|
+
"prosemirror-history": "^1.5.0",
|
|
179
|
+
"prosemirror-inputrules": "^1.5.1",
|
|
180
|
+
"prosemirror-keymap": "^1.2.3",
|
|
181
|
+
"prosemirror-model": "^1.25.0",
|
|
182
|
+
"prosemirror-schema-basic": "^1.2.4",
|
|
183
|
+
"prosemirror-schema-list": "^1.5.1",
|
|
184
|
+
"prosemirror-state": "^1.4.3",
|
|
185
|
+
"prosemirror-tables": "^1.8.0",
|
|
186
|
+
"prosemirror-transform": "^1.10.0",
|
|
187
|
+
"prosemirror-view": "^1.38.0",
|
|
172
188
|
"tippy.js": "^6.3.7"
|
|
173
189
|
},
|
|
174
190
|
"devDependencies": {
|
package/src/index.ts
CHANGED
|
@@ -137,4 +137,60 @@ export { NileCommandMenuItem } from './nile-command-menu-item';
|
|
|
137
137
|
export { NileInlineSidebarItemHeader } from './nile-inline-sidebar-item-header';
|
|
138
138
|
export { NileInlineSidebarItemBody } from './nile-inline-sidebar-item-body';
|
|
139
139
|
export { NileMarkdown } from './nile-markdown';
|
|
140
|
-
export { NileMarkdownEditor } from './nile-markdown-editor';
|
|
140
|
+
export { NileMarkdownEditor } from './nile-markdown-editor';
|
|
141
|
+
|
|
142
|
+
// nile-wysiwyg-editor — ProseMirror-powered rich text editor
|
|
143
|
+
export { NileWysiwygEditor, DEFAULT_TOOLBAR } from './nile-wysiwyg-editor/index';
|
|
144
|
+
export type {
|
|
145
|
+
WysiwygChangeDetail,
|
|
146
|
+
WysiwygCommandDetail,
|
|
147
|
+
ToolbarConfig,
|
|
148
|
+
} from './nile-wysiwyg-editor/index';
|
|
149
|
+
export { NileWysiwygToolbar } from './nile-wysiwyg-editor/nile-wysiwyg-toolbar/index';
|
|
150
|
+
export { NileWysiwygLinkEditor } from './nile-wysiwyg-editor/ui/link-editor';
|
|
151
|
+
export { NileWysiwygBubbleMenu } from './nile-wysiwyg-editor/ui/bubble-menu';
|
|
152
|
+
export { NileWysiwygImagePanel } from './nile-wysiwyg-editor/ui/image-panel';
|
|
153
|
+
export { NileWysiwygTableMenu } from './nile-wysiwyg-editor/ui/table-menu';
|
|
154
|
+
export { NileWysiwygTablePicker } from './nile-wysiwyg-editor/ui/table-grid-picker';
|
|
155
|
+
export { NileWysiwygSuggestList } from './nile-wysiwyg-editor/ui/suggest-list';
|
|
156
|
+
export { NileWysiwygFindBar } from './nile-wysiwyg-editor/ui/find-replace';
|
|
157
|
+
export { NileWysiwygSourceView } from './nile-wysiwyg-editor/ui/source-view';
|
|
158
|
+
export { NileWysiwygEmbedPanel } from './nile-wysiwyg-editor/ui/embed-panel';
|
|
159
|
+
export { NileWysiwygCodeMenu } from './nile-wysiwyg-editor/ui/code-block-menu';
|
|
160
|
+
export { NileWysiwygShortcutHelp } from './nile-wysiwyg-editor/ui/shortcut-help';
|
|
161
|
+
export { NileWysiwygImageMenu } from './nile-wysiwyg-editor/ui/image-menu';
|
|
162
|
+
export { NileWysiwygSpecialChars } from './nile-wysiwyg-editor/ui/special-chars';
|
|
163
|
+
export { NileWysiwygInsertMenu } from './nile-wysiwyg-editor/ui/insert-menu';
|
|
164
|
+
export type { InsertMenuItem } from './nile-wysiwyg-editor/ui/insert-menu';
|
|
165
|
+
export { NileWysiwygMathPanel } from './nile-wysiwyg-editor/ui/math-panel';
|
|
166
|
+
export type { SuggestItem } from './nile-wysiwyg-editor/ui/suggest-list';
|
|
167
|
+
export type {
|
|
168
|
+
MentionsConfig,
|
|
169
|
+
MergeFieldConfig,
|
|
170
|
+
TemplateConfig,
|
|
171
|
+
} from './nile-wysiwyg-editor/types';
|
|
172
|
+
export type { MathRenderer } from './nile-wysiwyg-editor/engine/plugins/math-view';
|
|
173
|
+
export {
|
|
174
|
+
createSchema,
|
|
175
|
+
defaultSchema,
|
|
176
|
+
sanitizeHtml,
|
|
177
|
+
htmlToDoc,
|
|
178
|
+
docToHtml,
|
|
179
|
+
docToMarkdown,
|
|
180
|
+
markdownToHtml,
|
|
181
|
+
looksLikeMarkdown,
|
|
182
|
+
docToJson,
|
|
183
|
+
jsonToDoc,
|
|
184
|
+
computeToolbarState,
|
|
185
|
+
createEditorState,
|
|
186
|
+
toInlineStyledHtml,
|
|
187
|
+
buildWordDocument,
|
|
188
|
+
buildPrintDocument,
|
|
189
|
+
} from './nile-wysiwyg-editor/engine';
|
|
190
|
+
export type {
|
|
191
|
+
ToolbarState,
|
|
192
|
+
CommandName,
|
|
193
|
+
CommandAttrs,
|
|
194
|
+
Alignment,
|
|
195
|
+
PrintOptions,
|
|
196
|
+
} from './nile-wysiwyg-editor/engine';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { html, TemplateResult } from 'lit';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Renders a design-system icon through nile-glyph. ng-prefixed names are
|
|
5
|
+
* stroke-drawn in @aquera/nile-glyph's set; the rest are fill-drawn.
|
|
6
|
+
*/
|
|
7
|
+
export function renderGlyph(name: string, size: number): TemplateResult {
|
|
8
|
+
return html`<nile-glyph
|
|
9
|
+
name=${name}
|
|
10
|
+
size=${size}
|
|
11
|
+
method=${name.startsWith('ng-') ? 'stroke' : 'fill'}
|
|
12
|
+
></nile-glyph>`;
|
|
13
|
+
}
|
|
@@ -89,11 +89,13 @@ export const styles = css`
|
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
.nile-chip {
|
|
92
|
-
padding: var(--nile-spacing-5px,var(
|
|
92
|
+
padding: var(--nile-spacing-5px,var(--ng-spacing-xs)) var(--nile-spacing-10px,var(--ng-spacing-lg));
|
|
93
|
+
min-height: var(--ng-height-40px);
|
|
93
94
|
background-color: var(--nile-colors-white-base,var( --ng-colors-bg-primary));
|
|
94
95
|
border-radius: var(--nile-radius-radius-xs,var(--ng-radius-md));
|
|
95
96
|
border: solid 1px var(--nile-colors-neutral-500,var(--ng-colors-border-primary));
|
|
96
97
|
display: flex;
|
|
98
|
+
align-items: center;
|
|
97
99
|
flex-wrap: wrap;
|
|
98
100
|
width: 100%;
|
|
99
101
|
overflow-x: hidden;
|
|
@@ -102,6 +104,7 @@ export const styles = css`
|
|
|
102
104
|
|
|
103
105
|
nile-input::part(base) {
|
|
104
106
|
padding: 0px !important;
|
|
107
|
+
height: auto;
|
|
105
108
|
}
|
|
106
109
|
|
|
107
110
|
.nile-chip--no-wrap {
|
|
@@ -171,6 +174,10 @@ export const styles = css`
|
|
|
171
174
|
nile-auto-complete::part(input) {
|
|
172
175
|
padding: var(--nile-spacing-lg, var(--ng-spacing-none));
|
|
173
176
|
}
|
|
177
|
+
|
|
178
|
+
nile-auto-complete::part(base) {
|
|
179
|
+
height: auto;
|
|
180
|
+
}
|
|
174
181
|
|
|
175
182
|
.nile-chip:hover:not(.nile-chip--disabled) {
|
|
176
183
|
border-color: var(--nile-colors-neutral-500, var(--ng-colors-border-neutral));
|
|
@@ -298,12 +298,12 @@ export class NileCodeEditor extends NileElement {
|
|
|
298
298
|
${this.expandable && !this.disabled
|
|
299
299
|
? html`
|
|
300
300
|
<div @click="${(e: CustomEvent) => this.emit('nile-expand')}" class="expand__icon__container">
|
|
301
|
-
<nile-
|
|
301
|
+
<nile-glyph
|
|
302
302
|
name="${this.expandIcon}"
|
|
303
|
-
method="var(--nile-svg-method-fill, var(--ng-svg-method-
|
|
303
|
+
method="var(--nile-svg-method-fill, var(--ng-svg-method-fill))"
|
|
304
304
|
size="16"
|
|
305
305
|
color="black"
|
|
306
|
-
></nile-
|
|
306
|
+
></nile-glyph>
|
|
307
307
|
</div>`
|
|
308
308
|
: ''}
|
|
309
309
|
</div>
|
|
@@ -37,12 +37,12 @@ export const styles = css`
|
|
|
37
37
|
|
|
38
38
|
.hero__container--collapsed{
|
|
39
39
|
height: 67px;
|
|
40
|
-
background-color: var(--nile-hero-collapsed-background);
|
|
40
|
+
background-color: var(--nile-hero-collapsed-background, var(--ng-colors-bg-primary));
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
.hero__container--expanded{
|
|
44
|
-
height:var(--nile-hero-height);
|
|
45
|
-
background:linear-gradient(180deg, var( --nile-hero-color-bg-from-gradient) 0%, var( --nile-hero-color-bg-to-gradient) 100%);
|
|
44
|
+
height:var(--nile-hero-height, var(--ng-height-200px));
|
|
45
|
+
background:linear-gradient(180deg, var( --nile-hero-color-bg-from-gradient, var(--ng-color-bluelight-50)) 0%, var( --nile-hero-color-bg-to-gradient, var(--ng-componentcolors-utility-gray-200)) 100%);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
.icon__container {
|
|
@@ -50,17 +50,17 @@ export const styles = css`
|
|
|
50
50
|
aspect-ratio: 1 / 1;
|
|
51
51
|
place-items: center;
|
|
52
52
|
display: grid;
|
|
53
|
-
border-radius: var(--nile-radius-radius-xl);
|
|
54
|
-
border: 1px solid var(--nile-colors-neutral-400);
|
|
55
|
-
background: linear-gradient(180deg, var(--nile-hero-color-icon-bg-from-gradient) 0%, var(--nile-hero-color-icon-bg-to-gradient) 100%);
|
|
53
|
+
border-radius: var(--nile-radius-radius-xl, var(--ng-radius-md));
|
|
54
|
+
border: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
|
|
55
|
+
background: linear-gradient(180deg, var(--nile-hero-color-icon-bg-from-gradient, var(--ng-colors-bg-primary)) 0%, var(--nile-hero-color-icon-bg-to-gradient, var(--ng-colors-bg-secondary)) 100%);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
.hero__slot__container {
|
|
59
|
-
height:var(--nile-hero-height);
|
|
60
|
-
padding-left: var(--nile-spacing-5xl);
|
|
59
|
+
height:var(--nile-hero-height, var(--ng-height-200px));
|
|
60
|
+
padding-left: var(--nile-spacing-5xl, var(--ng-spacing-5xl));
|
|
61
61
|
display: flex;
|
|
62
62
|
align-items: center;
|
|
63
|
-
gap:var(--nile-spacing-spacing-xl);
|
|
63
|
+
gap:var(--nile-spacing-spacing-xl, var(--ng-spacing-xl));
|
|
64
64
|
position: absolute;
|
|
65
65
|
left: 0;
|
|
66
66
|
bottom:0;
|
|
@@ -69,11 +69,11 @@ export const styles = css`
|
|
|
69
69
|
|
|
70
70
|
.hero__slot {
|
|
71
71
|
display: flex;
|
|
72
|
-
gap:var(--nile-spacing-spacing-xl);
|
|
72
|
+
gap:var(--nile-spacing-spacing-xl, var(--ng-spacing-xl));
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
.hero__img__container {
|
|
76
|
-
height:var(--nile-hero-height);
|
|
76
|
+
height:var(--nile-hero-height, var(--ng-height-200px));
|
|
77
77
|
overflow:hidden;
|
|
78
78
|
width:max-content;
|
|
79
79
|
position: absolute;
|
|
@@ -84,7 +84,7 @@ export const styles = css`
|
|
|
84
84
|
|
|
85
85
|
.hero__img {
|
|
86
86
|
object-fit:cover;
|
|
87
|
-
height:var(--nile-hero-height);
|
|
87
|
+
height:var(--nile-hero-height, var(--ng-height-200px));
|
|
88
88
|
width:auto;
|
|
89
89
|
}
|
|
90
90
|
`;
|
|
@@ -52,7 +52,7 @@ export class NileHero extends NileElement {
|
|
|
52
52
|
<div class="hero__slot__container" style="opacity:${this.collapse?0:1}">
|
|
53
53
|
<div class="hero__slot">
|
|
54
54
|
<span class="icon__container">
|
|
55
|
-
<nile-icon size="16" method="var(--nile-svg-method-stroke, var(--ng-svg-method-
|
|
55
|
+
<nile-icon size="16" method="var(--nile-svg-method-stroke, var(--ng-svg-method-fill))" name="${this.icon}"></nile-icon>
|
|
56
56
|
</span>
|
|
57
57
|
<slot></slot>
|
|
58
58
|
</div>
|
|
@@ -16,8 +16,8 @@ export const styles = css`
|
|
|
16
16
|
width:100%;
|
|
17
17
|
display: flex;
|
|
18
18
|
align-items: center;
|
|
19
|
-
padding:var(--nile-spacing-xl) var(--nile-spacing-5xl);
|
|
20
|
-
gap: var(--nile-spacing-xl);
|
|
19
|
+
padding:var(--nile-spacing-xl, var(--ng-spacing-xl)) var(--nile-spacing-5xl, var(--ng-spacing-5xl));
|
|
20
|
+
gap: var(--nile-spacing-xl, var(--ng-spacing-xl));
|
|
21
21
|
border-bottom: 1px solid rgb(234, 236, 240);
|
|
22
22
|
-webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));
|
|
23
23
|
-moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));
|
|
@@ -29,17 +29,17 @@ export const styles = css`
|
|
|
29
29
|
aspect-ratio: 1 / 1;
|
|
30
30
|
place-items: center;
|
|
31
31
|
display: grid;
|
|
32
|
-
border-radius: var(--nile-radius-radius-xl);
|
|
33
|
-
border: 1px solid var(--nile-colors-neutral-400);
|
|
34
|
-
background: linear-gradient(180deg, var(--nile-hero-color-icon-bg-from-gradient) 0%, var(--nile-hero-color-icon-bg-to-gradient) 100%);
|
|
32
|
+
border-radius: var(--nile-radius-radius-xl, var(--ng-radius-md));
|
|
33
|
+
border: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
|
|
34
|
+
background: linear-gradient(180deg, var(--nile-hero-color-icon-bg-from-gradient, var(--ng-colors-bg-primary)) 0%, var(--nile-hero-color-icon-bg-to-gradient, var(--ng-colors-bg-secondary)) 100%);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.hero__text {
|
|
38
|
-
color: var(--nile-hero-text-color);
|
|
39
|
-
font-size: var(--nile-hero-text-font-size);
|
|
40
|
-
line-height: var(--nile-hero-text-line-height);
|
|
38
|
+
color: var(--nile-hero-text-color, var(--ng-colors-text-primary-900));
|
|
39
|
+
font-size: var(--nile-hero-text-font-size, var(--ng-font-size-text-md));
|
|
40
|
+
line-height: var(--nile-hero-text-line-height, var(--ng-line-height-text-md));
|
|
41
41
|
font-style: normal;
|
|
42
|
-
font-weight: var(--nile-hero-text-font-weight);
|
|
42
|
+
font-weight: var(--nile-hero-text-font-weight, var(--ng-font-weight-bold));
|
|
43
43
|
}
|
|
44
44
|
`;
|
|
45
45
|
|
|
@@ -41,7 +41,7 @@ export class NileHeroHeader extends NileElement {
|
|
|
41
41
|
public render(): TemplateResult {
|
|
42
42
|
return html`
|
|
43
43
|
<span class="icon__container">
|
|
44
|
-
<nile-icon method="var(--nile-svg-method-stroke, var(--ng-svg-method-
|
|
44
|
+
<nile-icon method="var(--nile-svg-method-stroke, var(--ng-svg-method-fill))" size="16" name="${this.icon}"></nile-icon>
|
|
45
45
|
</span>
|
|
46
46
|
<span class="hero__text">${this.heroText}</span>
|
|
47
47
|
`;
|
|
@@ -201,6 +201,76 @@ nile-rich-text-editor[disabled] .editor a {
|
|
|
201
201
|
pointer-events: none;
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
+
.editor figure.rte-image,
|
|
205
|
+
nile-rte-preview figure.rte-image {
|
|
206
|
+
margin: 1em 0;
|
|
207
|
+
width: fit-content;
|
|
208
|
+
max-width: 100%;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.editor > figure.rte-image:first-child,
|
|
212
|
+
nile-rte-preview > figure.rte-image:first-child {
|
|
213
|
+
margin-top: 0;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.editor figure.rte-image[data-align='center'],
|
|
217
|
+
nile-rte-preview figure.rte-image[data-align='center'] {
|
|
218
|
+
margin-left: auto;
|
|
219
|
+
margin-right: auto;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.editor figure.rte-image[data-align='right'],
|
|
223
|
+
nile-rte-preview figure.rte-image[data-align='right'] {
|
|
224
|
+
margin-left: auto;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.editor figure.rte-image[data-align='justify'],
|
|
228
|
+
nile-rte-preview figure.rte-image[data-align='justify'] {
|
|
229
|
+
width: 100%;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.editor figure.rte-image[data-align='justify'] img,
|
|
233
|
+
nile-rte-preview figure.rte-image[data-align='justify'] img {
|
|
234
|
+
width: 100%;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.editor figure.rte-image img,
|
|
238
|
+
nile-rte-preview figure.rte-image img {
|
|
239
|
+
max-width: 100%;
|
|
240
|
+
height: auto;
|
|
241
|
+
display: block;
|
|
242
|
+
border-radius: var(--nile-radius-radius-lg, var(--ng-radius-md));
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.editor figure.rte-image figcaption,
|
|
246
|
+
nile-rte-preview figure.rte-image figcaption {
|
|
247
|
+
margin-top: 6px;
|
|
248
|
+
font-size: 0.875em;
|
|
249
|
+
color: var(--nile-colors-neutral-600, var(--ng-colors-text-secondary));
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.editor figure.rte-image {
|
|
253
|
+
cursor: pointer;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.editor figure.rte-image:hover img {
|
|
257
|
+
outline: 2px solid var(--nile-colors-primary-400, var(--ng-componentcolors-utility-blue-400));
|
|
258
|
+
outline-offset: 2px;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
nile-rte-image nile-button.rte-image-button[data-active]::part(base) {
|
|
262
|
+
background-color: var(--nile-colors-primary-400, var(--ng-componentcolors-utility-blue-400));
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
nile-rte-image nile-button.rte-image-button[data-active]::part(base):hover {
|
|
266
|
+
background-color: var(--nile-colors-primary-500, var(--ng-componentcolors-utility-blue-500));
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
nile-rich-text-editor[disabled] .editor figure.rte-image {
|
|
270
|
+
cursor: not-allowed;
|
|
271
|
+
pointer-events: none;
|
|
272
|
+
}
|
|
273
|
+
|
|
204
274
|
.editor.empty::before {
|
|
205
275
|
content: attr(data-placeholder);
|
|
206
276
|
color: var(--nile-colors-neutral-500, var(--ng-colors-text-secondary));
|
|
@@ -9,6 +9,7 @@ import './nile-rte-divider';
|
|
|
9
9
|
import './nile-rte-preview';
|
|
10
10
|
import './nile-rte-mentions';
|
|
11
11
|
import './nile-rte-link';
|
|
12
|
+
import './nile-rte-image';
|
|
12
13
|
|
|
13
14
|
import {
|
|
14
15
|
closestBlock,
|
|
@@ -135,6 +136,7 @@ export class NileRichTextEditor extends LitElement {
|
|
|
135
136
|
private bgSwatchEl: HTMLElement | null = null;
|
|
136
137
|
private containerEl: HTMLElement | null = null;
|
|
137
138
|
private linkEl: HTMLElement | null = null;
|
|
139
|
+
private imageEl: HTMLElement | null = null;
|
|
138
140
|
|
|
139
141
|
private mentionsEl: HTMLElement | null = null;
|
|
140
142
|
|
|
@@ -265,6 +267,9 @@ export class NileRichTextEditor extends LitElement {
|
|
|
265
267
|
if (this.linkEl) {
|
|
266
268
|
(this.linkEl as any).disabled = this.disabled;
|
|
267
269
|
}
|
|
270
|
+
if (this.imageEl) {
|
|
271
|
+
(this.imageEl as any).disabled = this.disabled;
|
|
272
|
+
}
|
|
268
273
|
}
|
|
269
274
|
if (changed.has('placeholder') && this.editorEl) {
|
|
270
275
|
if (this.placeholder) {
|
|
@@ -418,6 +423,13 @@ export class NileRichTextEditor extends LitElement {
|
|
|
418
423
|
this.updateToolbarState();
|
|
419
424
|
}
|
|
420
425
|
|
|
426
|
+
if (
|
|
427
|
+
(e.key === 'Backspace' || e.key === 'Delete') &&
|
|
428
|
+
this.handleFigureDeletion(e)
|
|
429
|
+
) {
|
|
430
|
+
return;
|
|
431
|
+
}
|
|
432
|
+
|
|
421
433
|
if (this.singleLineEditor && e.key === 'Enter') {
|
|
422
434
|
e.preventDefault();
|
|
423
435
|
return;
|
|
@@ -465,6 +477,61 @@ export class NileRichTextEditor extends LitElement {
|
|
|
465
477
|
this.updateContent();
|
|
466
478
|
this.updateToolbarState();
|
|
467
479
|
};
|
|
480
|
+
private handleFigureDeletion(e: KeyboardEvent): boolean {
|
|
481
|
+
const sel = window.getSelection();
|
|
482
|
+
if (!sel || sel.rangeCount === 0) return false;
|
|
483
|
+
const range = sel.getRangeAt(0);
|
|
484
|
+
if (!this.editorEl.contains(range.commonAncestorContainer)) return false;
|
|
485
|
+
|
|
486
|
+
if (!range.collapsed) {
|
|
487
|
+
const figures = Array.from(
|
|
488
|
+
this.editorEl.querySelectorAll('figure.rte-image')
|
|
489
|
+
);
|
|
490
|
+
const touched = figures.filter(f => range.intersectsNode(f));
|
|
491
|
+
if (!touched.length) return false;
|
|
492
|
+
|
|
493
|
+
e.preventDefault();
|
|
494
|
+
range.deleteContents();
|
|
495
|
+
touched.forEach(f => f.isConnected && f.remove());
|
|
496
|
+
this.ensureAtLeastOneParagraph();
|
|
497
|
+
this.updateContent();
|
|
498
|
+
this.updateToolbarState();
|
|
499
|
+
return true;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
const block =
|
|
503
|
+
closestBlock(range.startContainer, this.editorEl) || this.editorEl;
|
|
504
|
+
|
|
505
|
+
if (e.key === 'Backspace') {
|
|
506
|
+
const before = document.createRange();
|
|
507
|
+
before.setStart(block, 0);
|
|
508
|
+
before.setEnd(range.startContainer, range.startOffset);
|
|
509
|
+
const atStart = before.toString().replace(/\u200B/g, '') === '';
|
|
510
|
+
const prev = block.previousElementSibling;
|
|
511
|
+
if (atStart && prev?.matches?.('figure.rte-image')) {
|
|
512
|
+
e.preventDefault();
|
|
513
|
+
prev.remove();
|
|
514
|
+
this.updateContent();
|
|
515
|
+
this.updateToolbarState();
|
|
516
|
+
return true;
|
|
517
|
+
}
|
|
518
|
+
} else {
|
|
519
|
+
const after = document.createRange();
|
|
520
|
+
after.setStart(range.endContainer, range.endOffset);
|
|
521
|
+
after.setEnd(block, block.childNodes.length);
|
|
522
|
+
const atEnd = after.toString().replace(/\u200B/g, '') === '';
|
|
523
|
+
const next = block.nextElementSibling;
|
|
524
|
+
if (atEnd && next?.matches?.('figure.rte-image')) {
|
|
525
|
+
e.preventDefault();
|
|
526
|
+
next.remove();
|
|
527
|
+
this.updateContent();
|
|
528
|
+
this.updateToolbarState();
|
|
529
|
+
return true;
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
return false;
|
|
534
|
+
}
|
|
468
535
|
|
|
469
536
|
private wireAuthoredToolbar(tb: HTMLElement) {
|
|
470
537
|
this.buttonMap.clear();
|
|
@@ -496,6 +563,16 @@ export class NileRichTextEditor extends LitElement {
|
|
|
496
563
|
});
|
|
497
564
|
return;
|
|
498
565
|
}
|
|
566
|
+
if (tag === 'nile-rte-image') {
|
|
567
|
+
(child as any).editorEl = this.editorEl;
|
|
568
|
+
(child as any).disabled = this.disabled;
|
|
569
|
+
this.imageEl = child as HTMLElement;
|
|
570
|
+
child.addEventListener('nile-image-changed', () => {
|
|
571
|
+
this.updateContent();
|
|
572
|
+
this.updateToolbarState();
|
|
573
|
+
});
|
|
574
|
+
return;
|
|
575
|
+
}
|
|
499
576
|
|
|
500
577
|
if (tag === 'nile-rte-toolbar-item') {
|
|
501
578
|
let btn = child.querySelector(
|
|
@@ -666,7 +743,8 @@ export class NileRichTextEditor extends LitElement {
|
|
|
666
743
|
if (!el) return;
|
|
667
744
|
|
|
668
745
|
const onlyWhitespace =
|
|
669
|
-
(el.textContent ?? '').replace(/\u200B/g, '').trim() === ''
|
|
746
|
+
(el.textContent ?? '').replace(/\u200B/g, '').trim() === '' &&
|
|
747
|
+
!el.querySelector('img');
|
|
670
748
|
if (el.childNodes.length === 0 || onlyWhitespace) {
|
|
671
749
|
el.innerHTML = '<p><br></p>';
|
|
672
750
|
const p = el.querySelector('p');
|
|
@@ -684,7 +762,7 @@ export class NileRichTextEditor extends LitElement {
|
|
|
684
762
|
}
|
|
685
763
|
|
|
686
764
|
const hasBlock = el.querySelector(
|
|
687
|
-
'p,h1,h2,h3,h4,h5,h6,ul,ol,table,blockquote,pre'
|
|
765
|
+
'p,h1,h2,h3,h4,h5,h6,ul,ol,table,blockquote,pre,figure'
|
|
688
766
|
);
|
|
689
767
|
if (!hasBlock) {
|
|
690
768
|
const p = document.createElement('p');
|
|
@@ -849,6 +927,12 @@ export class NileRichTextEditor extends LitElement {
|
|
|
849
927
|
if (linkBtn) linkBtn.toggleAttribute('data-active', inLink);
|
|
850
928
|
}
|
|
851
929
|
|
|
930
|
+
if (this.imageEl) {
|
|
931
|
+
const inImage = !!startElm.closest('figure.rte-image');
|
|
932
|
+
const imageBtn = this.imageEl.querySelector('nile-button');
|
|
933
|
+
if (imageBtn) imageBtn.toggleAttribute('data-active', inImage);
|
|
934
|
+
}
|
|
935
|
+
|
|
852
936
|
this.setBtnActive(
|
|
853
937
|
'left',
|
|
854
938
|
alignNorm === 'left' &&
|
|
@@ -928,7 +1012,9 @@ export class NileRichTextEditor extends LitElement {
|
|
|
928
1012
|
private updateContent() {
|
|
929
1013
|
if (!this.editorEl) return;
|
|
930
1014
|
this.ensureAtLeastOneParagraph();
|
|
931
|
-
const isEmpty =
|
|
1015
|
+
const isEmpty =
|
|
1016
|
+
(this.editorEl.textContent ?? '').trim() === '' &&
|
|
1017
|
+
!this.editorEl.querySelector('img');
|
|
932
1018
|
this.editorEl.classList.toggle('empty', isEmpty);
|
|
933
1019
|
|
|
934
1020
|
const sel = window.getSelection();
|