@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,296 @@
|
|
|
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
|
+
const isMac = typeof navigator !== 'undefined' && /Mac|iP(hone|[oa]d)/.test(navigator.platform);
|
|
6
|
+
/** Renders a binding like 'Mod-B' with platform-appropriate key labels. */
|
|
7
|
+
function keyLabel(binding) {
|
|
8
|
+
return binding
|
|
9
|
+
.split('-')
|
|
10
|
+
.map(part => {
|
|
11
|
+
switch (part) {
|
|
12
|
+
case 'Mod':
|
|
13
|
+
return isMac ? '⌘' : 'Ctrl';
|
|
14
|
+
case 'Shift':
|
|
15
|
+
return isMac ? '⇧' : 'Shift';
|
|
16
|
+
case 'Alt':
|
|
17
|
+
return isMac ? '⌥' : 'Alt';
|
|
18
|
+
case 'Ctrl':
|
|
19
|
+
return isMac ? '⌃' : 'Ctrl';
|
|
20
|
+
default:
|
|
21
|
+
return part;
|
|
22
|
+
}
|
|
23
|
+
})
|
|
24
|
+
.join(isMac ? '' : '+');
|
|
25
|
+
}
|
|
26
|
+
const GROUPS = [
|
|
27
|
+
{
|
|
28
|
+
title: 'Formatting',
|
|
29
|
+
items: [
|
|
30
|
+
{ keys: ['Mod-B'], label: 'Bold' },
|
|
31
|
+
{ keys: ['Mod-I'], label: 'Italic' },
|
|
32
|
+
{ keys: ['Mod-U'], label: 'Underline' },
|
|
33
|
+
{ keys: ['Mod-Shift-X'], label: 'Strikethrough' },
|
|
34
|
+
{ keys: ['Mod-,'], label: 'Subscript' },
|
|
35
|
+
{ keys: ['Mod-.'], label: 'Superscript' },
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
title: 'Blocks',
|
|
40
|
+
items: [
|
|
41
|
+
{ keys: ['Ctrl-Shift-0'], label: 'Paragraph' },
|
|
42
|
+
{ keys: ['Ctrl-Shift-1…6'], label: 'Heading 1–6' },
|
|
43
|
+
{ keys: ['Mod-Shift-8'], label: 'Bulleted list' },
|
|
44
|
+
{ keys: ['Mod-Shift-7'], label: 'Numbered list' },
|
|
45
|
+
{ keys: ['Mod-Shift-9'], label: 'Blockquote' },
|
|
46
|
+
{ keys: ['Mod-Alt-C'], label: 'Code block' },
|
|
47
|
+
{ keys: ['Tab', 'Shift-Tab'], label: 'Indent / outdent list item' },
|
|
48
|
+
{ keys: ['Mod-]', 'Mod-['], label: 'Indent / outdent block' },
|
|
49
|
+
{ keys: ['Shift-Enter'], label: 'Line break' },
|
|
50
|
+
],
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
title: 'Editing & tools',
|
|
54
|
+
items: [
|
|
55
|
+
{ keys: ['Mod-Z'], label: 'Undo' },
|
|
56
|
+
{ keys: ['Mod-Shift-Z'], label: 'Redo' },
|
|
57
|
+
{ keys: ['Mod-K'], label: 'Insert or edit link' },
|
|
58
|
+
{ keys: ['Mod-F'], label: 'Find & replace' },
|
|
59
|
+
{ keys: ['Mod-Shift-V'], label: 'Paste without formatting' },
|
|
60
|
+
{ keys: ['Mod-/'], label: 'This dialog' },
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
title: 'Typing shortcuts',
|
|
65
|
+
items: [
|
|
66
|
+
{ keys: ['# + space'], label: 'Heading (## for level 2 …)' },
|
|
67
|
+
{ keys: ['- + space'], label: 'Bulleted list' },
|
|
68
|
+
{ keys: ['1. + space'], label: 'Numbered list' },
|
|
69
|
+
{ keys: ['[] + space'], label: 'Checklist' },
|
|
70
|
+
{ keys: ['> + space'], label: 'Blockquote' },
|
|
71
|
+
{ keys: ['```'], label: 'Code block' },
|
|
72
|
+
{ keys: ['**text**'], label: 'Bold as you type' },
|
|
73
|
+
{ keys: ['URL + space'], label: 'Automatic link' },
|
|
74
|
+
{ keys: ['/'], label: 'Command menu' },
|
|
75
|
+
{ keys: [': + name'], label: 'Emoji picker' },
|
|
76
|
+
],
|
|
77
|
+
},
|
|
78
|
+
];
|
|
79
|
+
/**
|
|
80
|
+
* Keyboard shortcut reference dialog, opened from the toolbar or Mod-/.
|
|
81
|
+
* Emits `wysiwyg-shortcut-help-close` when dismissed (Esc, ✕ or backdrop).
|
|
82
|
+
*/
|
|
83
|
+
let NileWysiwygShortcutHelp = class NileWysiwygShortcutHelp extends NileElement {
|
|
84
|
+
constructor() {
|
|
85
|
+
super(...arguments);
|
|
86
|
+
this.open = false;
|
|
87
|
+
/** Body overflow value before we locked it; null = not locked by us. */
|
|
88
|
+
this.previousBodyOverflow = null;
|
|
89
|
+
}
|
|
90
|
+
static get styles() {
|
|
91
|
+
return [
|
|
92
|
+
css `
|
|
93
|
+
/* Fixed so the dialog overlays the viewport instead of being
|
|
94
|
+
clipped by a small editor. */
|
|
95
|
+
:host {
|
|
96
|
+
font-family: var(
|
|
97
|
+
--nile-font-family-sans-serif,
|
|
98
|
+
var(--ng-font-family-body, system-ui, -apple-system, sans-serif)
|
|
99
|
+
);
|
|
100
|
+
position: fixed;
|
|
101
|
+
inset: 0;
|
|
102
|
+
z-index: var(--nile-wysiwyg-dialog-z-index, 1100);
|
|
103
|
+
display: none;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
:host([open]) {
|
|
107
|
+
display: flex;
|
|
108
|
+
align-items: center;
|
|
109
|
+
justify-content: center;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.help__backdrop {
|
|
113
|
+
position: absolute;
|
|
114
|
+
inset: 0;
|
|
115
|
+
background: rgba(16, 24, 40, 0.4);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.help__panel {
|
|
119
|
+
position: relative;
|
|
120
|
+
max-width: 560px;
|
|
121
|
+
max-height: min(80%, 480px);
|
|
122
|
+
margin: 16px;
|
|
123
|
+
padding: 16px 20px;
|
|
124
|
+
overflow-y: auto;
|
|
125
|
+
overscroll-behavior: contain;
|
|
126
|
+
outline: none;
|
|
127
|
+
background: var(--nile-wysiwyg-popover-bg, #ffffff);
|
|
128
|
+
border: 1px solid var(--nile-colors-neutral-400, #d0d5dd);
|
|
129
|
+
border-radius: 10px;
|
|
130
|
+
box-shadow: var(
|
|
131
|
+
--nile-wysiwyg-popover-shadow,
|
|
132
|
+
0 8px 24px rgba(16, 24, 40, 0.18)
|
|
133
|
+
);
|
|
134
|
+
font-size: 13px;
|
|
135
|
+
color: var(--nile-colors-neutral-700, #344054);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.help__header {
|
|
139
|
+
display: flex;
|
|
140
|
+
align-items: center;
|
|
141
|
+
justify-content: space-between;
|
|
142
|
+
margin-bottom: 8px;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.help__title {
|
|
146
|
+
font-size: 14px;
|
|
147
|
+
font-weight: 600;
|
|
148
|
+
color: var(--nile-colors-dark-900, #101828);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.help__close {
|
|
152
|
+
font: inherit;
|
|
153
|
+
border: none;
|
|
154
|
+
background: transparent;
|
|
155
|
+
border-radius: 5px;
|
|
156
|
+
padding: 4px 8px;
|
|
157
|
+
cursor: pointer;
|
|
158
|
+
color: var(--nile-colors-neutral-700, #344054);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.help__close:hover {
|
|
162
|
+
background: var(--nile-colors-neutral-100, #f2f4f7);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.help__columns {
|
|
166
|
+
display: grid;
|
|
167
|
+
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
|
|
168
|
+
gap: 4px 24px;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.help__group-title {
|
|
172
|
+
margin: 10px 0 4px;
|
|
173
|
+
font-size: 11px;
|
|
174
|
+
font-weight: 600;
|
|
175
|
+
text-transform: uppercase;
|
|
176
|
+
letter-spacing: 0.04em;
|
|
177
|
+
color: var(--nile-colors-neutral-500, #98a2b3);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.help__row {
|
|
181
|
+
display: flex;
|
|
182
|
+
align-items: center;
|
|
183
|
+
justify-content: space-between;
|
|
184
|
+
gap: 12px;
|
|
185
|
+
padding: 3px 0;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.help__keys {
|
|
189
|
+
white-space: nowrap;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
kbd {
|
|
193
|
+
display: inline-block;
|
|
194
|
+
padding: 1px 6px;
|
|
195
|
+
font-family: inherit;
|
|
196
|
+
font-size: 12px;
|
|
197
|
+
line-height: 1.5;
|
|
198
|
+
background: var(--nile-colors-neutral-100, #f2f4f7);
|
|
199
|
+
border: 1px solid var(--nile-colors-neutral-400, #d0d5dd);
|
|
200
|
+
border-bottom-width: 2px;
|
|
201
|
+
border-radius: 5px;
|
|
202
|
+
}
|
|
203
|
+
`,
|
|
204
|
+
];
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Locks page scrolling while the dialog is open (the fixed backdrop blocks
|
|
208
|
+
* clicks but not wheel/touch scrolling of the document behind it).
|
|
209
|
+
* Save/restore keeps it composable with other locks (e.g. fullscreen).
|
|
210
|
+
*/
|
|
211
|
+
updated(changed) {
|
|
212
|
+
if (!changed.has('open'))
|
|
213
|
+
return;
|
|
214
|
+
if (this.open) {
|
|
215
|
+
if (this.previousBodyOverflow === null) {
|
|
216
|
+
this.previousBodyOverflow = document.body.style.overflow;
|
|
217
|
+
document.body.style.overflow = 'hidden';
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
else if (this.previousBodyOverflow !== null) {
|
|
221
|
+
document.body.style.overflow = this.previousBodyOverflow;
|
|
222
|
+
this.previousBodyOverflow = null;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
disconnectedCallback() {
|
|
226
|
+
super.disconnectedCallback();
|
|
227
|
+
if (this.previousBodyOverflow !== null) {
|
|
228
|
+
document.body.style.overflow = this.previousBodyOverflow;
|
|
229
|
+
this.previousBodyOverflow = null;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
/** Moves focus into the dialog so Esc lands here. */
|
|
233
|
+
focusPanel() {
|
|
234
|
+
this.updateComplete.then(() => this.panelEl?.focus());
|
|
235
|
+
}
|
|
236
|
+
close() {
|
|
237
|
+
this.emit('wysiwyg-shortcut-help-close');
|
|
238
|
+
}
|
|
239
|
+
handleKeydown(event) {
|
|
240
|
+
if (event.key === 'Escape') {
|
|
241
|
+
event.stopPropagation();
|
|
242
|
+
this.close();
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
render() {
|
|
246
|
+
if (!this.open)
|
|
247
|
+
return nothing;
|
|
248
|
+
return html `
|
|
249
|
+
<div class="help__backdrop" @click=${this.close}></div>
|
|
250
|
+
<div
|
|
251
|
+
class="help__panel"
|
|
252
|
+
part="shortcut-help"
|
|
253
|
+
role="dialog"
|
|
254
|
+
aria-modal="true"
|
|
255
|
+
aria-label="Keyboard shortcuts"
|
|
256
|
+
tabindex="-1"
|
|
257
|
+
@keydown=${this.handleKeydown}
|
|
258
|
+
>
|
|
259
|
+
<div class="help__header">
|
|
260
|
+
<span class="help__title">Keyboard shortcuts</span>
|
|
261
|
+
<button type="button" class="help__close" title="Close (Esc)" @click=${this.close}>
|
|
262
|
+
✕
|
|
263
|
+
</button>
|
|
264
|
+
</div>
|
|
265
|
+
<div class="help__columns">
|
|
266
|
+
${GROUPS.map(group => html `
|
|
267
|
+
<div>
|
|
268
|
+
<div class="help__group-title">${group.title}</div>
|
|
269
|
+
${group.items.map(item => html `
|
|
270
|
+
<div class="help__row">
|
|
271
|
+
<span>${item.label}</span>
|
|
272
|
+
<span class="help__keys">
|
|
273
|
+
${item.keys.map((key, index) => html `${index > 0 ? ' / ' : nothing}<kbd
|
|
274
|
+
>${keyLabel(key)}</kbd
|
|
275
|
+
>`)}
|
|
276
|
+
</span>
|
|
277
|
+
</div>
|
|
278
|
+
`)}
|
|
279
|
+
</div>
|
|
280
|
+
`)}
|
|
281
|
+
</div>
|
|
282
|
+
</div>
|
|
283
|
+
`;
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
__decorate([
|
|
287
|
+
property({ type: Boolean, reflect: true })
|
|
288
|
+
], NileWysiwygShortcutHelp.prototype, "open", void 0);
|
|
289
|
+
__decorate([
|
|
290
|
+
query('.help__panel')
|
|
291
|
+
], NileWysiwygShortcutHelp.prototype, "panelEl", void 0);
|
|
292
|
+
NileWysiwygShortcutHelp = __decorate([
|
|
293
|
+
customElement('nile-wysiwyg-shortcut-help')
|
|
294
|
+
], NileWysiwygShortcutHelp);
|
|
295
|
+
export { NileWysiwygShortcutHelp };
|
|
296
|
+
//# sourceMappingURL=shortcut-help.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shortcut-help.js","sourceRoot":"","sources":["../../../../src/nile-wysiwyg-editor/ui/shortcut-help.ts"],"names":[],"mappings":"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","sourcesContent":["import { html, css, TemplateResult, CSSResultArray, PropertyValues, nothing } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport NileElement from '../../internal/nile-element';\n\nconst isMac =\n typeof navigator !== 'undefined' && /Mac|iP(hone|[oa]d)/.test(navigator.platform);\n\n/** Renders a binding like 'Mod-B' with platform-appropriate key labels. */\nfunction keyLabel(binding: string): string {\n return binding\n .split('-')\n .map(part => {\n switch (part) {\n case 'Mod':\n return isMac ? '⌘' : 'Ctrl';\n case 'Shift':\n return isMac ? '⇧' : 'Shift';\n case 'Alt':\n return isMac ? '⌥' : 'Alt';\n case 'Ctrl':\n return isMac ? '⌃' : 'Ctrl';\n default:\n return part;\n }\n })\n .join(isMac ? '' : '+');\n}\n\ninterface ShortcutGroup {\n title: string;\n items: { keys: string[]; label: string }[];\n}\n\nconst GROUPS: ShortcutGroup[] = [\n {\n title: 'Formatting',\n items: [\n { keys: ['Mod-B'], label: 'Bold' },\n { keys: ['Mod-I'], label: 'Italic' },\n { keys: ['Mod-U'], label: 'Underline' },\n { keys: ['Mod-Shift-X'], label: 'Strikethrough' },\n { keys: ['Mod-,'], label: 'Subscript' },\n { keys: ['Mod-.'], label: 'Superscript' },\n ],\n },\n {\n title: 'Blocks',\n items: [\n { keys: ['Ctrl-Shift-0'], label: 'Paragraph' },\n { keys: ['Ctrl-Shift-1…6'], label: 'Heading 1–6' },\n { keys: ['Mod-Shift-8'], label: 'Bulleted list' },\n { keys: ['Mod-Shift-7'], label: 'Numbered list' },\n { keys: ['Mod-Shift-9'], label: 'Blockquote' },\n { keys: ['Mod-Alt-C'], label: 'Code block' },\n { keys: ['Tab', 'Shift-Tab'], label: 'Indent / outdent list item' },\n { keys: ['Mod-]', 'Mod-['], label: 'Indent / outdent block' },\n { keys: ['Shift-Enter'], label: 'Line break' },\n ],\n },\n {\n title: 'Editing & tools',\n items: [\n { keys: ['Mod-Z'], label: 'Undo' },\n { keys: ['Mod-Shift-Z'], label: 'Redo' },\n { keys: ['Mod-K'], label: 'Insert or edit link' },\n { keys: ['Mod-F'], label: 'Find & replace' },\n { keys: ['Mod-Shift-V'], label: 'Paste without formatting' },\n { keys: ['Mod-/'], label: 'This dialog' },\n ],\n },\n {\n title: 'Typing shortcuts',\n items: [\n { keys: ['# + space'], label: 'Heading (## for level 2 …)' },\n { keys: ['- + space'], label: 'Bulleted list' },\n { keys: ['1. + space'], label: 'Numbered list' },\n { keys: ['[] + space'], label: 'Checklist' },\n { keys: ['> + space'], label: 'Blockquote' },\n { keys: ['```'], label: 'Code block' },\n { keys: ['**text**'], label: 'Bold as you type' },\n { keys: ['URL + space'], label: 'Automatic link' },\n { keys: ['/'], label: 'Command menu' },\n { keys: [': + name'], label: 'Emoji picker' },\n ],\n },\n];\n\n/**\n * Keyboard shortcut reference dialog, opened from the toolbar or Mod-/.\n * Emits `wysiwyg-shortcut-help-close` when dismissed (Esc, ✕ or backdrop).\n */\n@customElement('nile-wysiwyg-shortcut-help')\nexport class NileWysiwygShortcutHelp extends NileElement {\n @property({ type: Boolean, reflect: true }) open = false;\n\n @query('.help__panel') private panelEl?: HTMLElement;\n\n /** Body overflow value before we locked it; null = not locked by us. */\n private previousBodyOverflow: string | null = null;\n\n public static get styles(): CSSResultArray {\n return [\n css`\n /* Fixed so the dialog overlays the viewport instead of being\n clipped by a small editor. */\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: fixed;\n inset: 0;\n z-index: var(--nile-wysiwyg-dialog-z-index, 1100);\n display: none;\n }\n\n :host([open]) {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .help__backdrop {\n position: absolute;\n inset: 0;\n background: rgba(16, 24, 40, 0.4);\n }\n\n .help__panel {\n position: relative;\n max-width: 560px;\n max-height: min(80%, 480px);\n margin: 16px;\n padding: 16px 20px;\n overflow-y: auto;\n overscroll-behavior: contain;\n outline: none;\n background: var(--nile-wysiwyg-popover-bg, #ffffff);\n border: 1px solid var(--nile-colors-neutral-400, #d0d5dd);\n border-radius: 10px;\n box-shadow: var(\n --nile-wysiwyg-popover-shadow,\n 0 8px 24px rgba(16, 24, 40, 0.18)\n );\n font-size: 13px;\n color: var(--nile-colors-neutral-700, #344054);\n }\n\n .help__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 8px;\n }\n\n .help__title {\n font-size: 14px;\n font-weight: 600;\n color: var(--nile-colors-dark-900, #101828);\n }\n\n .help__close {\n font: inherit;\n border: none;\n background: transparent;\n border-radius: 5px;\n padding: 4px 8px;\n cursor: pointer;\n color: var(--nile-colors-neutral-700, #344054);\n }\n\n .help__close:hover {\n background: var(--nile-colors-neutral-100, #f2f4f7);\n }\n\n .help__columns {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));\n gap: 4px 24px;\n }\n\n .help__group-title {\n margin: 10px 0 4px;\n font-size: 11px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n color: var(--nile-colors-neutral-500, #98a2b3);\n }\n\n .help__row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n padding: 3px 0;\n }\n\n .help__keys {\n white-space: nowrap;\n }\n\n kbd {\n display: inline-block;\n padding: 1px 6px;\n font-family: inherit;\n font-size: 12px;\n line-height: 1.5;\n background: var(--nile-colors-neutral-100, #f2f4f7);\n border: 1px solid var(--nile-colors-neutral-400, #d0d5dd);\n border-bottom-width: 2px;\n border-radius: 5px;\n }\n `,\n ];\n }\n\n /**\n * Locks page scrolling while the dialog is open (the fixed backdrop blocks\n * clicks but not wheel/touch scrolling of the document behind it).\n * Save/restore keeps it composable with other locks (e.g. fullscreen).\n */\n protected updated(changed: PropertyValues): void {\n if (!changed.has('open')) return;\n if (this.open) {\n if (this.previousBodyOverflow === null) {\n this.previousBodyOverflow = document.body.style.overflow;\n document.body.style.overflow = 'hidden';\n }\n } else if (this.previousBodyOverflow !== null) {\n document.body.style.overflow = this.previousBodyOverflow;\n this.previousBodyOverflow = null;\n }\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n if (this.previousBodyOverflow !== null) {\n document.body.style.overflow = this.previousBodyOverflow;\n this.previousBodyOverflow = null;\n }\n }\n\n /** Moves focus into the dialog so Esc lands here. */\n public focusPanel(): void {\n this.updateComplete.then(() => this.panelEl?.focus());\n }\n\n private close(): void {\n this.emit('wysiwyg-shortcut-help-close');\n }\n\n private handleKeydown(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n event.stopPropagation();\n this.close();\n }\n }\n\n public render(): TemplateResult | typeof nothing {\n if (!this.open) return nothing;\n return html`\n <div class=\"help__backdrop\" @click=${this.close}></div>\n <div\n class=\"help__panel\"\n part=\"shortcut-help\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label=\"Keyboard shortcuts\"\n tabindex=\"-1\"\n @keydown=${this.handleKeydown}\n >\n <div class=\"help__header\">\n <span class=\"help__title\">Keyboard shortcuts</span>\n <button type=\"button\" class=\"help__close\" title=\"Close (Esc)\" @click=${this.close}>\n ✕\n </button>\n </div>\n <div class=\"help__columns\">\n ${GROUPS.map(\n group => html`\n <div>\n <div class=\"help__group-title\">${group.title}</div>\n ${group.items.map(\n item => html`\n <div class=\"help__row\">\n <span>${item.label}</span>\n <span class=\"help__keys\">\n ${item.keys.map(\n (key, index) => html`${index > 0 ? ' / ' : nothing}<kbd\n >${keyLabel(key)}</kbd\n >`\n )}\n </span>\n </div>\n `\n )}\n </div>\n `\n )}\n </div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-wysiwyg-shortcut-help': NileWysiwygShortcutHelp;\n }\n}\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { TemplateResult, CSSResultArray } from 'lit';
|
|
2
|
+
import NileElement from '../../internal/nile-element';
|
|
3
|
+
/**
|
|
4
|
+
* Raw HTML source editing mode. Replaces the rich surface while open; the
|
|
5
|
+
* host re-parses (and re-sanitizes) the HTML on apply. Emits
|
|
6
|
+
* `wysiwyg-source-apply` detail: { html } and `wysiwyg-source-cancel`.
|
|
7
|
+
*/
|
|
8
|
+
export declare class NileWysiwygSourceView extends NileElement {
|
|
9
|
+
value: string;
|
|
10
|
+
textarea?: HTMLTextAreaElement;
|
|
11
|
+
static get styles(): CSSResultArray;
|
|
12
|
+
focusInput(): void;
|
|
13
|
+
render(): TemplateResult;
|
|
14
|
+
}
|
|
15
|
+
declare global {
|
|
16
|
+
interface HTMLElementTagNameMap {
|
|
17
|
+
'nile-wysiwyg-source-view': NileWysiwygSourceView;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
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
|
+
/**
|
|
6
|
+
* Raw HTML source editing mode. Replaces the rich surface while open; the
|
|
7
|
+
* host re-parses (and re-sanitizes) the HTML on apply. Emits
|
|
8
|
+
* `wysiwyg-source-apply` detail: { html } and `wysiwyg-source-cancel`.
|
|
9
|
+
*/
|
|
10
|
+
let NileWysiwygSourceView = class NileWysiwygSourceView extends NileElement {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.value = '';
|
|
14
|
+
}
|
|
15
|
+
static get styles() {
|
|
16
|
+
return [
|
|
17
|
+
css `
|
|
18
|
+
:host {
|
|
19
|
+
font-family: var(
|
|
20
|
+
--nile-font-family-sans-serif,
|
|
21
|
+
var(--ng-font-family-body, system-ui, -apple-system, sans-serif)
|
|
22
|
+
);
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.bar {
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
justify-content: space-between;
|
|
31
|
+
padding: 6px 12px;
|
|
32
|
+
font-size: 12px;
|
|
33
|
+
color: var(--nile-colors-neutral-600, #475467);
|
|
34
|
+
border-bottom: 1px solid var(--nile-colors-neutral-300, #e4e7ec);
|
|
35
|
+
background: var(--nile-wysiwyg-toolbar-bg, var(--nile-colors-neutral-50, #f9fafb));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.actions {
|
|
39
|
+
display: flex;
|
|
40
|
+
gap: 8px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
button {
|
|
44
|
+
font: inherit;
|
|
45
|
+
font-size: 12px;
|
|
46
|
+
padding: 4px 12px;
|
|
47
|
+
border-radius: 6px;
|
|
48
|
+
border: 1px solid transparent;
|
|
49
|
+
cursor: pointer;
|
|
50
|
+
background: transparent;
|
|
51
|
+
color: var(--nile-colors-neutral-700, #344054);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
button.primary {
|
|
55
|
+
background: var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600, #2563eb));
|
|
56
|
+
color: #ffffff;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
textarea {
|
|
60
|
+
flex: 1;
|
|
61
|
+
min-height: var(--nile-wysiwyg-min-height, 160px);
|
|
62
|
+
padding: 12px 16px;
|
|
63
|
+
border: none;
|
|
64
|
+
outline: none;
|
|
65
|
+
resize: vertical;
|
|
66
|
+
font-family: var(--nile-wysiwyg-code-font, ui-monospace, SFMono-Regular, Menlo, monospace);
|
|
67
|
+
font-size: 12px;
|
|
68
|
+
line-height: 1.5;
|
|
69
|
+
color: var(--nile-colors-neutral-900, #101828);
|
|
70
|
+
background: transparent;
|
|
71
|
+
box-sizing: border-box;
|
|
72
|
+
}
|
|
73
|
+
`,
|
|
74
|
+
];
|
|
75
|
+
}
|
|
76
|
+
focusInput() {
|
|
77
|
+
this.updateComplete.then(() => this.textarea?.focus());
|
|
78
|
+
}
|
|
79
|
+
render() {
|
|
80
|
+
return html `
|
|
81
|
+
<div class="bar" part="source-bar">
|
|
82
|
+
<span>HTML source</span>
|
|
83
|
+
<span class="actions">
|
|
84
|
+
<button type="button" @click=${() => this.emit('wysiwyg-source-cancel')}>
|
|
85
|
+
Cancel
|
|
86
|
+
</button>
|
|
87
|
+
<button
|
|
88
|
+
type="button"
|
|
89
|
+
class="primary"
|
|
90
|
+
@click=${() => this.emit('wysiwyg-source-apply', { html: this.textarea?.value ?? '' })}
|
|
91
|
+
>
|
|
92
|
+
Done
|
|
93
|
+
</button>
|
|
94
|
+
</span>
|
|
95
|
+
</div>
|
|
96
|
+
<textarea
|
|
97
|
+
part="source-textarea"
|
|
98
|
+
spellcheck="false"
|
|
99
|
+
.value=${this.value}
|
|
100
|
+
@keydown=${(e) => {
|
|
101
|
+
if (e.key === 'Escape') {
|
|
102
|
+
e.stopPropagation();
|
|
103
|
+
this.emit('wysiwyg-source-cancel');
|
|
104
|
+
}
|
|
105
|
+
}}
|
|
106
|
+
></textarea>
|
|
107
|
+
`;
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
__decorate([
|
|
111
|
+
property({ type: String })
|
|
112
|
+
], NileWysiwygSourceView.prototype, "value", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
query('textarea')
|
|
115
|
+
], NileWysiwygSourceView.prototype, "textarea", void 0);
|
|
116
|
+
NileWysiwygSourceView = __decorate([
|
|
117
|
+
customElement('nile-wysiwyg-source-view')
|
|
118
|
+
], NileWysiwygSourceView);
|
|
119
|
+
export { NileWysiwygSourceView };
|
|
120
|
+
//# sourceMappingURL=source-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-view.js","sourceRoot":"","sources":["../../../../src/nile-wysiwyg-editor/ui/source-view.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;AAEtD;;;;GAIG;AAEI,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,WAAW;IAA/C;;QACuB,UAAK,GAAG,EAAE,CAAC;IAqGzC,CAAC;IAjGQ,MAAM,KAAK,MAAM;QACtB,OAAO;YACL,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwDF;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,MAAM;QACX,OAAO,IAAI,CAAA;;;;yCAI0B,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,uBAAuB,CAAC;;;;;;qBAM5D,GAAG,EAAE,CACZ,IAAI,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE,EAAE,CAAC;;;;;;;;;iBASpE,IAAI,CAAC,KAAK;mBACR,CAAC,CAAgB,EAAE,EAAE;YAC9B,IAAI,CAAC,CAAC,GAAG,KAAK,QAAQ,EAAE,CAAC;gBACvB,CAAC,CAAC,eAAe,EAAE,CAAC;gBACpB,IAAI,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;YACrC,CAAC;QACH,CAAC;;KAEJ,CAAC;IACJ,CAAC;CACF,CAAA;AArG6B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oDAAY;AAEpB;IAAlB,KAAK,CAAC,UAAU,CAAC;uDAAgC;AAHvC,qBAAqB;IADjC,aAAa,CAAC,0BAA0B,CAAC;GAC7B,qBAAqB,CAsGjC","sourcesContent":["import { html, css, TemplateResult, CSSResultArray } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport NileElement from '../../internal/nile-element';\n\n/**\n * Raw HTML source editing mode. Replaces the rich surface while open; the\n * host re-parses (and re-sanitizes) the HTML on apply. Emits\n * `wysiwyg-source-apply` detail: { html } and `wysiwyg-source-cancel`.\n */\n@customElement('nile-wysiwyg-source-view')\nexport class NileWysiwygSourceView extends NileElement {\n @property({ type: String }) value = '';\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 display: flex;\n flex-direction: column;\n }\n\n .bar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 6px 12px;\n font-size: 12px;\n color: var(--nile-colors-neutral-600, #475467);\n border-bottom: 1px solid var(--nile-colors-neutral-300, #e4e7ec);\n background: var(--nile-wysiwyg-toolbar-bg, var(--nile-colors-neutral-50, #f9fafb));\n }\n\n .actions {\n display: flex;\n gap: 8px;\n }\n\n button {\n font: inherit;\n font-size: 12px;\n padding: 4px 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 textarea {\n flex: 1;\n min-height: var(--nile-wysiwyg-min-height, 160px);\n padding: 12px 16px;\n border: none;\n outline: none;\n resize: vertical;\n font-family: var(--nile-wysiwyg-code-font, ui-monospace, SFMono-Regular, Menlo, monospace);\n font-size: 12px;\n line-height: 1.5;\n color: var(--nile-colors-neutral-900, #101828);\n background: transparent;\n box-sizing: border-box;\n }\n `,\n ];\n }\n\n public focusInput(): void {\n this.updateComplete.then(() => this.textarea?.focus());\n }\n\n public render(): TemplateResult {\n return html`\n <div class=\"bar\" part=\"source-bar\">\n <span>HTML source</span>\n <span class=\"actions\">\n <button type=\"button\" @click=${() => this.emit('wysiwyg-source-cancel')}>\n Cancel\n </button>\n <button\n type=\"button\"\n class=\"primary\"\n @click=${() =>\n this.emit('wysiwyg-source-apply', { html: this.textarea?.value ?? '' })}\n >\n Done\n </button>\n </span>\n </div>\n <textarea\n part=\"source-textarea\"\n spellcheck=\"false\"\n .value=${this.value}\n @keydown=${(e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n e.stopPropagation();\n this.emit('wysiwyg-source-cancel');\n }\n }}\n ></textarea>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-wysiwyg-source-view': NileWysiwygSourceView;\n }\n}\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { TemplateResult, CSSResultArray } from 'lit';
|
|
2
|
+
import NileElement from '../../internal/nile-element';
|
|
3
|
+
import '../../nile-button-toggle-group/index';
|
|
4
|
+
import '../../nile-button-toggle/index';
|
|
5
|
+
/**
|
|
6
|
+
* Special characters picker (the Ω toolbar item). Emits
|
|
7
|
+
* `wysiwyg-char-select` detail: { char } and `wysiwyg-char-cancel`.
|
|
8
|
+
*/
|
|
9
|
+
export declare class NileWysiwygSpecialChars extends NileElement {
|
|
10
|
+
open: boolean;
|
|
11
|
+
private category;
|
|
12
|
+
static get styles(): CSSResultArray;
|
|
13
|
+
private handleKeydown;
|
|
14
|
+
render(): TemplateResult;
|
|
15
|
+
}
|
|
16
|
+
declare global {
|
|
17
|
+
interface HTMLElementTagNameMap {
|
|
18
|
+
'nile-wysiwyg-special-chars': NileWysiwygSpecialChars;
|
|
19
|
+
}
|
|
20
|
+
}
|