@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
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { html, css, nothing } from 'lit';
|
|
3
|
+
import { customElement, property, query } from 'lit/decorators.js';
|
|
4
|
+
import NileElement from '../../internal/nile-element';
|
|
5
|
+
/**
|
|
6
|
+
* Floating link create/edit panel. The host positions it absolutely inside
|
|
7
|
+
* the editor chrome and listens for:
|
|
8
|
+
* - `wysiwyg-link-apply` detail: { href, text }
|
|
9
|
+
* - `wysiwyg-link-remove`
|
|
10
|
+
* - `wysiwyg-link-cancel`
|
|
11
|
+
*/
|
|
12
|
+
let NileWysiwygLinkEditor = class NileWysiwygLinkEditor extends NileElement {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.open = false;
|
|
16
|
+
this.href = '';
|
|
17
|
+
this.text = '';
|
|
18
|
+
/** Show the text field (only when creating a link from a cursor). */
|
|
19
|
+
this.allowText = false;
|
|
20
|
+
/** Show the remove button (when editing an existing link). */
|
|
21
|
+
this.canRemove = false;
|
|
22
|
+
}
|
|
23
|
+
static get styles() {
|
|
24
|
+
return [
|
|
25
|
+
css `
|
|
26
|
+
:host {
|
|
27
|
+
font-family: var(
|
|
28
|
+
--nile-font-family-sans-serif,
|
|
29
|
+
var(--ng-font-family-body, system-ui, -apple-system, sans-serif)
|
|
30
|
+
);
|
|
31
|
+
position: absolute;
|
|
32
|
+
z-index: 20;
|
|
33
|
+
display: none;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:host([open]) {
|
|
37
|
+
display: block;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.link-editor {
|
|
41
|
+
display: flex;
|
|
42
|
+
flex-direction: column;
|
|
43
|
+
gap: 8px;
|
|
44
|
+
min-width: 280px;
|
|
45
|
+
padding: 12px;
|
|
46
|
+
background: var(--nile-wysiwyg-popover-bg, #ffffff);
|
|
47
|
+
border: 1px solid
|
|
48
|
+
var(--nile-wysiwyg-border-color, var(--nile-colors-neutral-400, #d0d5dd));
|
|
49
|
+
border-radius: var(--nile-wysiwyg-radius, 8px);
|
|
50
|
+
box-shadow: var(
|
|
51
|
+
--nile-wysiwyg-popover-shadow,
|
|
52
|
+
0 4px 12px rgba(16, 24, 40, 0.12)
|
|
53
|
+
);
|
|
54
|
+
font-size: 13px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
label {
|
|
58
|
+
display: flex;
|
|
59
|
+
flex-direction: column;
|
|
60
|
+
gap: 4px;
|
|
61
|
+
color: var(--nile-colors-neutral-700, #344054);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
input {
|
|
65
|
+
font: inherit;
|
|
66
|
+
padding: 6px 8px;
|
|
67
|
+
border: 1px solid var(--nile-colors-neutral-400, #d0d5dd);
|
|
68
|
+
border-radius: 6px;
|
|
69
|
+
outline: none;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
input:focus {
|
|
73
|
+
border-color: var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600, #2563eb));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.link-editor__actions {
|
|
77
|
+
display: flex;
|
|
78
|
+
gap: 8px;
|
|
79
|
+
justify-content: flex-end;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
button {
|
|
83
|
+
font: inherit;
|
|
84
|
+
padding: 6px 12px;
|
|
85
|
+
border-radius: 6px;
|
|
86
|
+
border: 1px solid transparent;
|
|
87
|
+
cursor: pointer;
|
|
88
|
+
background: transparent;
|
|
89
|
+
color: var(--nile-colors-neutral-700, #344054);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
button.primary {
|
|
93
|
+
background: var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600, #2563eb));
|
|
94
|
+
color: #ffffff;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
button.danger {
|
|
98
|
+
color: var(--nile-colors-error-600, #d92d20);
|
|
99
|
+
}
|
|
100
|
+
`,
|
|
101
|
+
];
|
|
102
|
+
}
|
|
103
|
+
/** Focuses the URL field; called by the host after opening. */
|
|
104
|
+
focusInput() {
|
|
105
|
+
this.updateComplete.then(() => this.hrefInput?.focus());
|
|
106
|
+
}
|
|
107
|
+
handleSubmit(event) {
|
|
108
|
+
event.preventDefault();
|
|
109
|
+
const href = this.hrefInput?.value.trim() ?? '';
|
|
110
|
+
if (!href)
|
|
111
|
+
return;
|
|
112
|
+
const textInput = this.shadowRoot?.querySelector('.link-editor__text');
|
|
113
|
+
this.emit('wysiwyg-link-apply', { href, text: textInput?.value.trim() ?? '' });
|
|
114
|
+
}
|
|
115
|
+
handleKeydown(event) {
|
|
116
|
+
if (event.key === 'Escape') {
|
|
117
|
+
event.stopPropagation();
|
|
118
|
+
this.emit('wysiwyg-link-cancel');
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
render() {
|
|
122
|
+
return html `
|
|
123
|
+
<form
|
|
124
|
+
class="link-editor"
|
|
125
|
+
part="link-editor"
|
|
126
|
+
@submit=${this.handleSubmit}
|
|
127
|
+
@keydown=${this.handleKeydown}
|
|
128
|
+
>
|
|
129
|
+
<label>
|
|
130
|
+
URL
|
|
131
|
+
<input
|
|
132
|
+
class="link-editor__href"
|
|
133
|
+
type="url"
|
|
134
|
+
placeholder="https://"
|
|
135
|
+
.value=${this.href}
|
|
136
|
+
/>
|
|
137
|
+
</label>
|
|
138
|
+
${this.allowText
|
|
139
|
+
? html `
|
|
140
|
+
<label>
|
|
141
|
+
Text
|
|
142
|
+
<input class="link-editor__text" type="text" .value=${this.text} />
|
|
143
|
+
</label>
|
|
144
|
+
`
|
|
145
|
+
: nothing}
|
|
146
|
+
<div class="link-editor__actions">
|
|
147
|
+
${this.canRemove
|
|
148
|
+
? html `
|
|
149
|
+
<button
|
|
150
|
+
type="button"
|
|
151
|
+
class="danger"
|
|
152
|
+
@click=${() => this.emit('wysiwyg-link-remove')}
|
|
153
|
+
>
|
|
154
|
+
Remove
|
|
155
|
+
</button>
|
|
156
|
+
`
|
|
157
|
+
: nothing}
|
|
158
|
+
<button type="button" @click=${() => this.emit('wysiwyg-link-cancel')}>
|
|
159
|
+
Cancel
|
|
160
|
+
</button>
|
|
161
|
+
<button type="submit" class="primary">Apply</button>
|
|
162
|
+
</div>
|
|
163
|
+
</form>
|
|
164
|
+
`;
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
__decorate([
|
|
168
|
+
property({ type: Boolean, reflect: true })
|
|
169
|
+
], NileWysiwygLinkEditor.prototype, "open", void 0);
|
|
170
|
+
__decorate([
|
|
171
|
+
property({ type: String })
|
|
172
|
+
], NileWysiwygLinkEditor.prototype, "href", void 0);
|
|
173
|
+
__decorate([
|
|
174
|
+
property({ type: String })
|
|
175
|
+
], NileWysiwygLinkEditor.prototype, "text", void 0);
|
|
176
|
+
__decorate([
|
|
177
|
+
property({ type: Boolean })
|
|
178
|
+
], NileWysiwygLinkEditor.prototype, "allowText", void 0);
|
|
179
|
+
__decorate([
|
|
180
|
+
property({ type: Boolean })
|
|
181
|
+
], NileWysiwygLinkEditor.prototype, "canRemove", void 0);
|
|
182
|
+
__decorate([
|
|
183
|
+
query('.link-editor__href')
|
|
184
|
+
], NileWysiwygLinkEditor.prototype, "hrefInput", void 0);
|
|
185
|
+
NileWysiwygLinkEditor = __decorate([
|
|
186
|
+
customElement('nile-wysiwyg-link-editor')
|
|
187
|
+
], NileWysiwygLinkEditor);
|
|
188
|
+
export { NileWysiwygLinkEditor };
|
|
189
|
+
//# sourceMappingURL=link-editor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link-editor.js","sourceRoot":"","sources":["../../../../src/nile-wysiwyg-editor/ui/link-editor.ts"],"names":[],"mappings":"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","sourcesContent":["import { html, css, TemplateResult, CSSResultArray, nothing } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport NileElement from '../../internal/nile-element';\n\n/**\n * Floating link create/edit panel. The host positions it absolutely inside\n * the editor chrome and listens for:\n * - `wysiwyg-link-apply` detail: { href, text }\n * - `wysiwyg-link-remove`\n * - `wysiwyg-link-cancel`\n */\n@customElement('nile-wysiwyg-link-editor')\nexport class NileWysiwygLinkEditor extends NileElement {\n @property({ type: Boolean, reflect: true }) open = false;\n\n @property({ type: String }) href = '';\n\n @property({ type: String }) text = '';\n\n /** Show the text field (only when creating a link from a cursor). */\n @property({ type: Boolean }) allowText = false;\n\n /** Show the remove button (when editing an existing link). */\n @property({ type: Boolean }) canRemove = false;\n\n @query('.link-editor__href') hrefInput?: HTMLInputElement;\n\n public static get styles(): CSSResultArray {\n return [\n css`\n :host {\n font-family: var(\n --nile-font-family-sans-serif,\n var(--ng-font-family-body, system-ui, -apple-system, sans-serif)\n );\n position: absolute;\n z-index: 20;\n display: none;\n }\n\n :host([open]) {\n display: block;\n }\n\n .link-editor {\n display: flex;\n flex-direction: column;\n gap: 8px;\n min-width: 280px;\n padding: 12px;\n background: var(--nile-wysiwyg-popover-bg, #ffffff);\n border: 1px solid\n var(--nile-wysiwyg-border-color, var(--nile-colors-neutral-400, #d0d5dd));\n border-radius: var(--nile-wysiwyg-radius, 8px);\n box-shadow: var(\n --nile-wysiwyg-popover-shadow,\n 0 4px 12px rgba(16, 24, 40, 0.12)\n );\n font-size: 13px;\n }\n\n label {\n display: flex;\n flex-direction: column;\n gap: 4px;\n color: var(--nile-colors-neutral-700, #344054);\n }\n\n input {\n font: inherit;\n padding: 6px 8px;\n border: 1px solid var(--nile-colors-neutral-400, #d0d5dd);\n border-radius: 6px;\n outline: none;\n }\n\n input:focus {\n border-color: var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600, #2563eb));\n }\n\n .link-editor__actions {\n display: flex;\n gap: 8px;\n justify-content: flex-end;\n }\n\n button {\n font: inherit;\n padding: 6px 12px;\n border-radius: 6px;\n border: 1px solid transparent;\n cursor: pointer;\n background: transparent;\n color: var(--nile-colors-neutral-700, #344054);\n }\n\n button.primary {\n background: var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600, #2563eb));\n color: #ffffff;\n }\n\n button.danger {\n color: var(--nile-colors-error-600, #d92d20);\n }\n `,\n ];\n }\n\n /** Focuses the URL field; called by the host after opening. */\n public focusInput(): void {\n this.updateComplete.then(() => this.hrefInput?.focus());\n }\n\n private handleSubmit(event: Event): void {\n event.preventDefault();\n const href = this.hrefInput?.value.trim() ?? '';\n if (!href) return;\n const textInput = this.shadowRoot?.querySelector<HTMLInputElement>('.link-editor__text');\n this.emit('wysiwyg-link-apply', { href, text: textInput?.value.trim() ?? '' });\n }\n\n private handleKeydown(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n event.stopPropagation();\n this.emit('wysiwyg-link-cancel');\n }\n }\n\n public render(): TemplateResult {\n return html`\n <form\n class=\"link-editor\"\n part=\"link-editor\"\n @submit=${this.handleSubmit}\n @keydown=${this.handleKeydown}\n >\n <label>\n URL\n <input\n class=\"link-editor__href\"\n type=\"url\"\n placeholder=\"https://\"\n .value=${this.href}\n />\n </label>\n ${this.allowText\n ? html`\n <label>\n Text\n <input class=\"link-editor__text\" type=\"text\" .value=${this.text} />\n </label>\n `\n : nothing}\n <div class=\"link-editor__actions\">\n ${this.canRemove\n ? html`\n <button\n type=\"button\"\n class=\"danger\"\n @click=${() => this.emit('wysiwyg-link-remove')}\n >\n Remove\n </button>\n `\n : nothing}\n <button type=\"button\" @click=${() => this.emit('wysiwyg-link-cancel')}>\n Cancel\n </button>\n <button type=\"submit\" class=\"primary\">Apply</button>\n </div>\n </form>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-wysiwyg-link-editor': NileWysiwygLinkEditor;\n }\n}\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { TemplateResult, CSSResultArray } from 'lit';
|
|
2
|
+
import NileElement from '../../internal/nile-element';
|
|
3
|
+
import '../../nile-button/index';
|
|
4
|
+
/**
|
|
5
|
+
* Floating "Paste Markdown" panel: paste/type Markdown and insert it into the
|
|
6
|
+
* document as formatted content. The host converts and inserts on apply.
|
|
7
|
+
* Emits `wysiwyg-markdown-apply` detail: { markdown } and
|
|
8
|
+
* `wysiwyg-markdown-cancel`.
|
|
9
|
+
*/
|
|
10
|
+
export declare class NileWysiwygMarkdownPanel extends NileElement {
|
|
11
|
+
open: boolean;
|
|
12
|
+
textarea?: HTMLTextAreaElement;
|
|
13
|
+
static get styles(): CSSResultArray;
|
|
14
|
+
focusInput(): void;
|
|
15
|
+
reset(): void;
|
|
16
|
+
private submit;
|
|
17
|
+
private handleKeydown;
|
|
18
|
+
render(): TemplateResult;
|
|
19
|
+
}
|
|
20
|
+
declare global {
|
|
21
|
+
interface HTMLElementTagNameMap {
|
|
22
|
+
'nile-wysiwyg-markdown-panel': NileWysiwygMarkdownPanel;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { html, css } from 'lit';
|
|
3
|
+
import { customElement, property, query } from 'lit/decorators.js';
|
|
4
|
+
import NileElement from '../../internal/nile-element';
|
|
5
|
+
import '../../nile-button/index';
|
|
6
|
+
/**
|
|
7
|
+
* Floating "Paste Markdown" panel: paste/type Markdown and insert it into the
|
|
8
|
+
* document as formatted content. The host converts and inserts on apply.
|
|
9
|
+
* Emits `wysiwyg-markdown-apply` detail: { markdown } and
|
|
10
|
+
* `wysiwyg-markdown-cancel`.
|
|
11
|
+
*/
|
|
12
|
+
let NileWysiwygMarkdownPanel = class NileWysiwygMarkdownPanel extends NileElement {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.open = false;
|
|
16
|
+
}
|
|
17
|
+
static get styles() {
|
|
18
|
+
return [
|
|
19
|
+
css `
|
|
20
|
+
:host {
|
|
21
|
+
font-family: var(
|
|
22
|
+
--nile-font-family-sans-serif,
|
|
23
|
+
var(--ng-font-family-body, system-ui, -apple-system, sans-serif)
|
|
24
|
+
);
|
|
25
|
+
position: absolute;
|
|
26
|
+
z-index: 20;
|
|
27
|
+
display: none;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:host([open]) {
|
|
31
|
+
display: block;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.md-panel {
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
gap: 10px;
|
|
38
|
+
width: 460px;
|
|
39
|
+
max-width: 90vw;
|
|
40
|
+
padding: 14px;
|
|
41
|
+
background: var(--nile-wysiwyg-popover-bg, #ffffff);
|
|
42
|
+
border: 1px solid var(--nile-colors-neutral-400, #d0d5dd);
|
|
43
|
+
border-radius: 8px;
|
|
44
|
+
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
|
|
45
|
+
font-size: 13px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.heading {
|
|
49
|
+
font-weight: 600;
|
|
50
|
+
color: var(--nile-colors-neutral-800, #1d2939);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.hint {
|
|
54
|
+
font-size: 12px;
|
|
55
|
+
color: var(--nile-colors-neutral-500, #98a2b3);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
textarea {
|
|
59
|
+
font-family: var(--nile-wysiwyg-code-font, ui-monospace, SFMono-Regular, Menlo, monospace);
|
|
60
|
+
font-size: 13px;
|
|
61
|
+
line-height: 1.5;
|
|
62
|
+
min-height: 180px;
|
|
63
|
+
resize: vertical;
|
|
64
|
+
padding: 10px;
|
|
65
|
+
border: 1px solid var(--nile-colors-neutral-400, #d0d5dd);
|
|
66
|
+
border-radius: 6px;
|
|
67
|
+
outline: none;
|
|
68
|
+
color: var(--nile-colors-dark-900, #101828);
|
|
69
|
+
background: var(--nile-colors-neutral-50, #f9fafb);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
textarea:focus {
|
|
73
|
+
border-color: var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600, #2563eb));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.actions {
|
|
77
|
+
display: flex;
|
|
78
|
+
justify-content: flex-end;
|
|
79
|
+
align-items: center;
|
|
80
|
+
gap: 8px;
|
|
81
|
+
}
|
|
82
|
+
`,
|
|
83
|
+
];
|
|
84
|
+
}
|
|
85
|
+
focusInput() {
|
|
86
|
+
this.updateComplete.then(() => this.textarea?.focus());
|
|
87
|
+
}
|
|
88
|
+
reset() {
|
|
89
|
+
this.updateComplete.then(() => {
|
|
90
|
+
if (this.textarea)
|
|
91
|
+
this.textarea.value = '';
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
submit() {
|
|
95
|
+
const markdown = this.textarea?.value ?? '';
|
|
96
|
+
if (!markdown.trim()) {
|
|
97
|
+
this.emit('wysiwyg-markdown-cancel');
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
this.emit('wysiwyg-markdown-apply', { markdown });
|
|
101
|
+
}
|
|
102
|
+
handleKeydown(event) {
|
|
103
|
+
if (event.key === 'Escape') {
|
|
104
|
+
event.stopPropagation();
|
|
105
|
+
this.emit('wysiwyg-markdown-cancel');
|
|
106
|
+
}
|
|
107
|
+
else if (event.key === 'Enter' && (event.metaKey || event.ctrlKey)) {
|
|
108
|
+
// Ctrl/Cmd+Enter inserts (plain Enter keeps adding newlines).
|
|
109
|
+
event.preventDefault();
|
|
110
|
+
event.stopPropagation();
|
|
111
|
+
this.submit();
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
render() {
|
|
115
|
+
return html `
|
|
116
|
+
<div class="md-panel" part="markdown-panel" @keydown=${this.handleKeydown}>
|
|
117
|
+
<span class="heading">Paste Markdown</span>
|
|
118
|
+
<textarea
|
|
119
|
+
part="markdown-textarea"
|
|
120
|
+
placeholder="# Heading Paste **Markdown** here — lists, \`code\`, tables…"
|
|
121
|
+
spellcheck="false"
|
|
122
|
+
></textarea>
|
|
123
|
+
<span class="hint">Converts to formatted content on insert (⌘/Ctrl+Enter).</span>
|
|
124
|
+
<div class="actions">
|
|
125
|
+
<nile-button variant="tertiary" @click=${() => this.emit('wysiwyg-markdown-cancel')}
|
|
126
|
+
>Cancel</nile-button
|
|
127
|
+
>
|
|
128
|
+
<nile-button variant="primary" @click=${() => this.submit()}>Insert</nile-button>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
`;
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
__decorate([
|
|
135
|
+
property({ type: Boolean, reflect: true })
|
|
136
|
+
], NileWysiwygMarkdownPanel.prototype, "open", void 0);
|
|
137
|
+
__decorate([
|
|
138
|
+
query('textarea')
|
|
139
|
+
], NileWysiwygMarkdownPanel.prototype, "textarea", void 0);
|
|
140
|
+
NileWysiwygMarkdownPanel = __decorate([
|
|
141
|
+
customElement('nile-wysiwyg-markdown-panel')
|
|
142
|
+
], NileWysiwygMarkdownPanel);
|
|
143
|
+
export { NileWysiwygMarkdownPanel };
|
|
144
|
+
//# sourceMappingURL=markdown-panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown-panel.js","sourceRoot":"","sources":["../../../../src/nile-wysiwyg-editor/ui/markdown-panel.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAkC,MAAM,KAAK,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,WAAW,MAAM,6BAA6B,CAAC;AACtD,OAAO,yBAAyB,CAAC;AAEjC;;;;;GAKG;AAEI,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,WAAW;IAAlD;;QACuC,SAAI,GAAG,KAAK,CAAC;IA2H3D,CAAC;IAvHQ,MAAM,KAAK,MAAM;QACtB,OAAO;YACL,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+DF;SACF,CAAC;IACJ,CAAC;IAEM,UAAU;QACf,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;IACzD,CAAC;IAEM,KAAK;QACV,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE;YAC5B,IAAI,IAAI,CAAC,QAAQ;gBAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,GAAG,EAAE,CAAC;QAC9C,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,MAAM;QACZ,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE,CAAC;QAC5C,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC;YACrB,IAAI,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;YACrC,OAAO;QACT,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,wBAAwB,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;IACpD,CAAC;IAEO,aAAa,CAAC,KAAoB;QACxC,IAAI,KAAK,CAAC,GAAG,KAAK,QAAQ,EAAE,CAAC;YAC3B,KAAK,CAAC,eAAe,EAAE,CAAC;YACxB,IAAI,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;QACvC,CAAC;aAAM,IAAI,KAAK,CAAC,GAAG,KAAK,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;YACrE,8DAA8D;YAC9D,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,KAAK,CAAC,eAAe,EAAE,CAAC;YACxB,IAAI,CAAC,MAAM,EAAE,CAAC;QAChB,CAAC;IACH,CAAC;IAEM,MAAM;QACX,OAAO,IAAI,CAAA;6DAC8C,IAAI,CAAC,aAAa;;;;;;;;;mDAS5B,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,yBAAyB,CAAC;;;kDAG3C,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE;;;KAGhE,CAAC;IACJ,CAAC;CACF,CAAA;AA3H6C;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;sDAAc;AAEtC;IAAlB,KAAK,CAAC,UAAU,CAAC;0DAAgC;AAHvC,wBAAwB;IADpC,aAAa,CAAC,6BAA6B,CAAC;GAChC,wBAAwB,CA4HpC","sourcesContent":["import { html, css, TemplateResult, CSSResultArray } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport NileElement from '../../internal/nile-element';\nimport '../../nile-button/index';\n\n/**\n * Floating \"Paste Markdown\" panel: paste/type Markdown and insert it into the\n * document as formatted content. The host converts and inserts on apply.\n * Emits `wysiwyg-markdown-apply` detail: { markdown } and\n * `wysiwyg-markdown-cancel`.\n */\n@customElement('nile-wysiwyg-markdown-panel')\nexport class NileWysiwygMarkdownPanel extends NileElement {\n @property({ type: Boolean, reflect: true }) open = false;\n\n @query('textarea') textarea?: HTMLTextAreaElement;\n\n public static get styles(): CSSResultArray {\n return [\n css`\n :host {\n font-family: var(\n --nile-font-family-sans-serif,\n var(--ng-font-family-body, system-ui, -apple-system, sans-serif)\n );\n position: absolute;\n z-index: 20;\n display: none;\n }\n\n :host([open]) {\n display: block;\n }\n\n .md-panel {\n display: flex;\n flex-direction: column;\n gap: 10px;\n width: 460px;\n max-width: 90vw;\n padding: 14px;\n background: var(--nile-wysiwyg-popover-bg, #ffffff);\n border: 1px solid var(--nile-colors-neutral-400, #d0d5dd);\n border-radius: 8px;\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);\n font-size: 13px;\n }\n\n .heading {\n font-weight: 600;\n color: var(--nile-colors-neutral-800, #1d2939);\n }\n\n .hint {\n font-size: 12px;\n color: var(--nile-colors-neutral-500, #98a2b3);\n }\n\n textarea {\n font-family: var(--nile-wysiwyg-code-font, ui-monospace, SFMono-Regular, Menlo, monospace);\n font-size: 13px;\n line-height: 1.5;\n min-height: 180px;\n resize: vertical;\n padding: 10px;\n border: 1px solid var(--nile-colors-neutral-400, #d0d5dd);\n border-radius: 6px;\n outline: none;\n color: var(--nile-colors-dark-900, #101828);\n background: var(--nile-colors-neutral-50, #f9fafb);\n }\n\n textarea:focus {\n border-color: var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600, #2563eb));\n }\n\n .actions {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n gap: 8px;\n }\n `,\n ];\n }\n\n public focusInput(): void {\n this.updateComplete.then(() => this.textarea?.focus());\n }\n\n public reset(): void {\n this.updateComplete.then(() => {\n if (this.textarea) this.textarea.value = '';\n });\n }\n\n private submit(): void {\n const markdown = this.textarea?.value ?? '';\n if (!markdown.trim()) {\n this.emit('wysiwyg-markdown-cancel');\n return;\n }\n this.emit('wysiwyg-markdown-apply', { markdown });\n }\n\n private handleKeydown(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n event.stopPropagation();\n this.emit('wysiwyg-markdown-cancel');\n } else if (event.key === 'Enter' && (event.metaKey || event.ctrlKey)) {\n // Ctrl/Cmd+Enter inserts (plain Enter keeps adding newlines).\n event.preventDefault();\n event.stopPropagation();\n this.submit();\n }\n }\n\n public render(): TemplateResult {\n return html`\n <div class=\"md-panel\" part=\"markdown-panel\" @keydown=${this.handleKeydown}>\n <span class=\"heading\">Paste Markdown</span>\n <textarea\n part=\"markdown-textarea\"\n placeholder=\"# Heading Paste **Markdown** here — lists, \\`code\\`, tables…\"\n spellcheck=\"false\"\n ></textarea>\n <span class=\"hint\">Converts to formatted content on insert (⌘/Ctrl+Enter).</span>\n <div class=\"actions\">\n <nile-button variant=\"tertiary\" @click=${() => this.emit('wysiwyg-markdown-cancel')}\n >Cancel</nile-button\n >\n <nile-button variant=\"primary\" @click=${() => this.submit()}>Insert</nile-button>\n </div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-wysiwyg-markdown-panel': NileWysiwygMarkdownPanel;\n }\n}\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { TemplateResult, CSSResultArray } from 'lit';
|
|
2
|
+
import NileElement from '../../internal/nile-element';
|
|
3
|
+
import '../../nile-input/index';
|
|
4
|
+
import '../../nile-button/index';
|
|
5
|
+
import '../../nile-button-toggle-group/index';
|
|
6
|
+
import '../../nile-button-toggle/index';
|
|
7
|
+
/**
|
|
8
|
+
* Floating math-insert panel: enter a LaTeX expression. Styled to match the
|
|
9
|
+
* image/embed panels (nile-input + nile-button). Emits `wysiwyg-math-apply`
|
|
10
|
+
* detail: { latex, display } and `wysiwyg-math-cancel`. Rendering of the
|
|
11
|
+
* formula itself is the host's job (via a mathRenderer).
|
|
12
|
+
*/
|
|
13
|
+
export declare class NileWysiwygMathPanel extends NileElement {
|
|
14
|
+
open: boolean;
|
|
15
|
+
private latexValue;
|
|
16
|
+
private display;
|
|
17
|
+
static get styles(): CSSResultArray;
|
|
18
|
+
/** Opens with an optional initial value (editing an existing formula). */
|
|
19
|
+
focusInput(initial?: string): void;
|
|
20
|
+
/** Clears the field. */
|
|
21
|
+
reset(): void;
|
|
22
|
+
private onLatex;
|
|
23
|
+
private handleSubmit;
|
|
24
|
+
private handleKeydown;
|
|
25
|
+
render(): TemplateResult;
|
|
26
|
+
}
|
|
27
|
+
declare global {
|
|
28
|
+
interface HTMLElementTagNameMap {
|
|
29
|
+
'nile-wysiwyg-math-panel': NileWysiwygMathPanel;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { html, css } from 'lit';
|
|
3
|
+
import { customElement, property, state } from 'lit/decorators.js';
|
|
4
|
+
import NileElement from '../../internal/nile-element';
|
|
5
|
+
import '../../nile-input/index';
|
|
6
|
+
import '../../nile-button/index';
|
|
7
|
+
import '../../nile-button-toggle-group/index';
|
|
8
|
+
import '../../nile-button-toggle/index';
|
|
9
|
+
/**
|
|
10
|
+
* Floating math-insert panel: enter a LaTeX expression. Styled to match the
|
|
11
|
+
* image/embed panels (nile-input + nile-button). Emits `wysiwyg-math-apply`
|
|
12
|
+
* detail: { latex, display } and `wysiwyg-math-cancel`. Rendering of the
|
|
13
|
+
* formula itself is the host's job (via a mathRenderer).
|
|
14
|
+
*/
|
|
15
|
+
let NileWysiwygMathPanel = class NileWysiwygMathPanel extends NileElement {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this.open = false;
|
|
19
|
+
this.latexValue = '';
|
|
20
|
+
this.display = 'inline';
|
|
21
|
+
}
|
|
22
|
+
static get styles() {
|
|
23
|
+
return [
|
|
24
|
+
css `
|
|
25
|
+
:host {
|
|
26
|
+
font-family: var(
|
|
27
|
+
--nile-font-family-sans-serif,
|
|
28
|
+
var(--ng-font-family-body, system-ui, -apple-system, sans-serif)
|
|
29
|
+
);
|
|
30
|
+
position: absolute;
|
|
31
|
+
z-index: 20;
|
|
32
|
+
display: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:host([open]) {
|
|
36
|
+
display: block;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.math-panel {
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
gap: 12px;
|
|
43
|
+
min-width: 340px;
|
|
44
|
+
max-width: 420px;
|
|
45
|
+
padding: 12px;
|
|
46
|
+
background: var(--nile-wysiwyg-popover-bg, #ffffff);
|
|
47
|
+
border: 1px solid var(--nile-colors-neutral-400, #d0d5dd);
|
|
48
|
+
border-radius: 8px;
|
|
49
|
+
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
|
|
50
|
+
font-size: 13px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
nile-input {
|
|
54
|
+
width: 100%;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* Keep the LaTeX field monospaced. */
|
|
58
|
+
nile-input::part(input) {
|
|
59
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.display-row {
|
|
63
|
+
display: flex;
|
|
64
|
+
align-items: center;
|
|
65
|
+
gap: 10px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.display-label {
|
|
69
|
+
color: var(--nile-colors-neutral-700, #344054);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.hint {
|
|
73
|
+
font-size: 12px;
|
|
74
|
+
color: var(--nile-colors-neutral-500, #98a2b3);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.actions {
|
|
78
|
+
display: flex;
|
|
79
|
+
justify-content: flex-end;
|
|
80
|
+
align-items: center;
|
|
81
|
+
gap: 8px;
|
|
82
|
+
width: 100%;
|
|
83
|
+
}
|
|
84
|
+
`,
|
|
85
|
+
];
|
|
86
|
+
}
|
|
87
|
+
/** Opens with an optional initial value (editing an existing formula). */
|
|
88
|
+
focusInput(initial = '') {
|
|
89
|
+
this.latexValue = initial;
|
|
90
|
+
this.updateComplete.then(() => {
|
|
91
|
+
const input = this.shadowRoot?.querySelector('nile-input');
|
|
92
|
+
input?.focus();
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
/** Clears the field. */
|
|
96
|
+
reset() {
|
|
97
|
+
this.latexValue = '';
|
|
98
|
+
this.display = 'inline';
|
|
99
|
+
}
|
|
100
|
+
onLatex(event) {
|
|
101
|
+
this.latexValue = (event.detail?.value ?? '');
|
|
102
|
+
}
|
|
103
|
+
handleSubmit() {
|
|
104
|
+
const latex = this.latexValue.trim();
|
|
105
|
+
if (!latex) {
|
|
106
|
+
this.emit('wysiwyg-math-cancel');
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
this.emit('wysiwyg-math-apply', { latex, display: this.display });
|
|
110
|
+
}
|
|
111
|
+
handleKeydown(event) {
|
|
112
|
+
if (event.key === 'Escape') {
|
|
113
|
+
event.stopPropagation();
|
|
114
|
+
this.emit('wysiwyg-math-cancel');
|
|
115
|
+
}
|
|
116
|
+
else if (event.key === 'Enter') {
|
|
117
|
+
event.preventDefault();
|
|
118
|
+
event.stopPropagation();
|
|
119
|
+
this.handleSubmit();
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
render() {
|
|
123
|
+
return html `
|
|
124
|
+
<div class="math-panel" part="math-panel" @keydown=${this.handleKeydown}>
|
|
125
|
+
<nile-input
|
|
126
|
+
label="LaTeX expression"
|
|
127
|
+
placeholder="e.g. \\frac{a}{b} = c^2"
|
|
128
|
+
.value=${this.latexValue}
|
|
129
|
+
@nile-input=${this.onLatex}
|
|
130
|
+
></nile-input>
|
|
131
|
+
|
|
132
|
+
<div class="display-row">
|
|
133
|
+
<span class="display-label">Display</span>
|
|
134
|
+
<nile-button-toggle-group
|
|
135
|
+
class="toggle"
|
|
136
|
+
.value=${this.display}
|
|
137
|
+
@nile-change=${(e) => {
|
|
138
|
+
this.display = e.detail.value === 'block' ? 'block' : 'inline';
|
|
139
|
+
}}
|
|
140
|
+
>
|
|
141
|
+
<nile-button-toggle value="inline">Inline</nile-button-toggle>
|
|
142
|
+
<nile-button-toggle value="block">Block</nile-button-toggle>
|
|
143
|
+
</nile-button-toggle-group>
|
|
144
|
+
</div>
|
|
145
|
+
|
|
146
|
+
<span class="hint"
|
|
147
|
+
>LaTeX is stored as-is; rendering uses your math renderer if configured.</span
|
|
148
|
+
>
|
|
149
|
+
|
|
150
|
+
<div class="actions">
|
|
151
|
+
<nile-button variant="primary" @click=${() => this.handleSubmit()}
|
|
152
|
+
>Insert</nile-button
|
|
153
|
+
>
|
|
154
|
+
</div>
|
|
155
|
+
</div>
|
|
156
|
+
`;
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
__decorate([
|
|
160
|
+
property({ type: Boolean, reflect: true })
|
|
161
|
+
], NileWysiwygMathPanel.prototype, "open", void 0);
|
|
162
|
+
__decorate([
|
|
163
|
+
state()
|
|
164
|
+
], NileWysiwygMathPanel.prototype, "latexValue", void 0);
|
|
165
|
+
__decorate([
|
|
166
|
+
state()
|
|
167
|
+
], NileWysiwygMathPanel.prototype, "display", void 0);
|
|
168
|
+
NileWysiwygMathPanel = __decorate([
|
|
169
|
+
customElement('nile-wysiwyg-math-panel')
|
|
170
|
+
], NileWysiwygMathPanel);
|
|
171
|
+
export { NileWysiwygMathPanel };
|
|
172
|
+
//# sourceMappingURL=math-panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"math-panel.js","sourceRoot":"","sources":["../../../../src/nile-wysiwyg-editor/ui/math-panel.ts"],"names":[],"mappings":"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","sourcesContent":["import { html, css, TemplateResult, CSSResultArray } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport NileElement from '../../internal/nile-element';\nimport '../../nile-input/index';\nimport '../../nile-button/index';\nimport '../../nile-button-toggle-group/index';\nimport '../../nile-button-toggle/index';\n\n/**\n * Floating math-insert panel: enter a LaTeX expression. Styled to match the\n * image/embed panels (nile-input + nile-button). Emits `wysiwyg-math-apply`\n * detail: { latex, display } and `wysiwyg-math-cancel`. Rendering of the\n * formula itself is the host's job (via a mathRenderer).\n */\n@customElement('nile-wysiwyg-math-panel')\nexport class NileWysiwygMathPanel extends NileElement {\n @property({ type: Boolean, reflect: true }) open = false;\n\n @state() private latexValue = '';\n @state() private display: 'inline' | 'block' = 'inline';\n\n public static get styles(): CSSResultArray {\n return [\n css`\n :host {\n font-family: var(\n --nile-font-family-sans-serif,\n var(--ng-font-family-body, system-ui, -apple-system, sans-serif)\n );\n position: absolute;\n z-index: 20;\n display: none;\n }\n\n :host([open]) {\n display: block;\n }\n\n .math-panel {\n display: flex;\n flex-direction: column;\n gap: 12px;\n min-width: 340px;\n max-width: 420px;\n padding: 12px;\n background: var(--nile-wysiwyg-popover-bg, #ffffff);\n border: 1px solid var(--nile-colors-neutral-400, #d0d5dd);\n border-radius: 8px;\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);\n font-size: 13px;\n }\n\n nile-input {\n width: 100%;\n }\n\n /* Keep the LaTeX field monospaced. */\n nile-input::part(input) {\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n }\n\n .display-row {\n display: flex;\n align-items: center;\n gap: 10px;\n }\n\n .display-label {\n color: var(--nile-colors-neutral-700, #344054);\n }\n\n .hint {\n font-size: 12px;\n color: var(--nile-colors-neutral-500, #98a2b3);\n }\n\n .actions {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n gap: 8px;\n width: 100%;\n }\n `,\n ];\n }\n\n /** Opens with an optional initial value (editing an existing formula). */\n public focusInput(initial = ''): void {\n this.latexValue = initial;\n this.updateComplete.then(() => {\n const input = this.shadowRoot?.querySelector('nile-input') as HTMLElement | null;\n input?.focus();\n });\n }\n\n /** Clears the field. */\n public reset(): void {\n this.latexValue = '';\n this.display = 'inline';\n }\n\n private onLatex(event: CustomEvent): void {\n this.latexValue = (event.detail?.value ?? '') as string;\n }\n\n private handleSubmit(): void {\n const latex = this.latexValue.trim();\n if (!latex) {\n this.emit('wysiwyg-math-cancel');\n return;\n }\n this.emit('wysiwyg-math-apply', { latex, display: this.display });\n }\n\n private handleKeydown(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n event.stopPropagation();\n this.emit('wysiwyg-math-cancel');\n } else if (event.key === 'Enter') {\n event.preventDefault();\n event.stopPropagation();\n this.handleSubmit();\n }\n }\n\n public render(): TemplateResult {\n return html`\n <div class=\"math-panel\" part=\"math-panel\" @keydown=${this.handleKeydown}>\n <nile-input\n label=\"LaTeX expression\"\n placeholder=\"e.g. \\\\frac{a}{b} = c^2\"\n .value=${this.latexValue}\n @nile-input=${this.onLatex}\n ></nile-input>\n\n <div class=\"display-row\">\n <span class=\"display-label\">Display</span>\n <nile-button-toggle-group\n class=\"toggle\"\n .value=${this.display}\n @nile-change=${(e: CustomEvent) => {\n this.display = e.detail.value === 'block' ? 'block' : 'inline';\n }}\n >\n <nile-button-toggle value=\"inline\">Inline</nile-button-toggle>\n <nile-button-toggle value=\"block\">Block</nile-button-toggle>\n </nile-button-toggle-group>\n </div>\n\n <span class=\"hint\"\n >LaTeX is stored as-is; rendering uses your math renderer if configured.</span\n >\n\n <div class=\"actions\">\n <nile-button variant=\"primary\" @click=${() => this.handleSubmit()}\n >Insert</nile-button\n >\n </div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-wysiwyg-math-panel': NileWysiwygMathPanel;\n }\n}\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { TemplateResult, CSSResultArray, PropertyValues, nothing } from 'lit';
|
|
2
|
+
import NileElement from '../../internal/nile-element';
|
|
3
|
+
/**
|
|
4
|
+
* Keyboard shortcut reference dialog, opened from the toolbar or Mod-/.
|
|
5
|
+
* Emits `wysiwyg-shortcut-help-close` when dismissed (Esc, ✕ or backdrop).
|
|
6
|
+
*/
|
|
7
|
+
export declare class NileWysiwygShortcutHelp extends NileElement {
|
|
8
|
+
open: boolean;
|
|
9
|
+
private panelEl?;
|
|
10
|
+
/** Body overflow value before we locked it; null = not locked by us. */
|
|
11
|
+
private previousBodyOverflow;
|
|
12
|
+
static get styles(): CSSResultArray;
|
|
13
|
+
/**
|
|
14
|
+
* Locks page scrolling while the dialog is open (the fixed backdrop blocks
|
|
15
|
+
* clicks but not wheel/touch scrolling of the document behind it).
|
|
16
|
+
* Save/restore keeps it composable with other locks (e.g. fullscreen).
|
|
17
|
+
*/
|
|
18
|
+
protected updated(changed: PropertyValues): void;
|
|
19
|
+
disconnectedCallback(): void;
|
|
20
|
+
/** Moves focus into the dialog so Esc lands here. */
|
|
21
|
+
focusPanel(): void;
|
|
22
|
+
private close;
|
|
23
|
+
private handleKeydown;
|
|
24
|
+
render(): TemplateResult | typeof nothing;
|
|
25
|
+
}
|
|
26
|
+
declare global {
|
|
27
|
+
interface HTMLElementTagNameMap {
|
|
28
|
+
'nile-wysiwyg-shortcut-help': NileWysiwygShortcutHelp;
|
|
29
|
+
}
|
|
30
|
+
}
|