@aquera/nile-elements 1.9.6 → 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 +3 -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 +3595 -629
- 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-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 +1 -1
- 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-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-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-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-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 +450 -0
- 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,83 @@
|
|
|
1
|
+
import type { CommandAttrs, CommandName } from './engine/commands';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Toolbar configuration. The string form uses space-separated item names with
|
|
5
|
+
* `|` as a group divider, e.g. `"bold italic | heading | link"`. `"none"`
|
|
6
|
+
* hides the toolbar entirely.
|
|
7
|
+
*/
|
|
8
|
+
export type ToolbarConfig = string;
|
|
9
|
+
|
|
10
|
+
/** Pseudo-commands handled by the host chrome rather than the registry. */
|
|
11
|
+
export type UiCommandName =
|
|
12
|
+
| 'openLink'
|
|
13
|
+
| 'openImage'
|
|
14
|
+
| 'openEmbed'
|
|
15
|
+
| 'openBookmark'
|
|
16
|
+
| 'toggleSource'
|
|
17
|
+
| 'togglePastePlainText'
|
|
18
|
+
| 'toggleFullscreen'
|
|
19
|
+
| 'toggleShowBlocks'
|
|
20
|
+
| 'openShortcutHelp'
|
|
21
|
+
| 'openSpecialChars'
|
|
22
|
+
| 'openEmoji'
|
|
23
|
+
| 'openFind'
|
|
24
|
+
| 'exportPdf'
|
|
25
|
+
| 'exportWord'
|
|
26
|
+
| 'exportInlineHtml'
|
|
27
|
+
| 'importWord'
|
|
28
|
+
| 'toggleFormatPainter'
|
|
29
|
+
| 'openMergeField'
|
|
30
|
+
| 'openTemplate'
|
|
31
|
+
| 'openMath'
|
|
32
|
+
| 'openMarkdown';
|
|
33
|
+
|
|
34
|
+
/** Detail payload of the internal `wysiwyg-command` event (toolbar → host). */
|
|
35
|
+
export interface WysiwygCommandDetail {
|
|
36
|
+
name: CommandName | UiCommandName;
|
|
37
|
+
attrs?: CommandAttrs;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** Mention configuration: trigger character → items. Same shape as the
|
|
41
|
+
* legacy nile-rich-text-editor. */
|
|
42
|
+
export type MentionsConfig = Record<string, { key: string; label: string }[]>;
|
|
43
|
+
|
|
44
|
+
/** Reusable content snippet, offered through the "/" menu. */
|
|
45
|
+
export interface SnippetConfig {
|
|
46
|
+
key: string;
|
|
47
|
+
label: string;
|
|
48
|
+
html: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** A mail-merge / personalization placeholder offered in the merge-field picker. */
|
|
52
|
+
export interface MergeFieldConfig {
|
|
53
|
+
/** Stable identifier substituted at render time (e.g. `first_name`). */
|
|
54
|
+
id: string;
|
|
55
|
+
/** Human-readable label shown in the chip and picker. */
|
|
56
|
+
label: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** A predefined content structure offered in the template picker. */
|
|
60
|
+
export interface TemplateConfig {
|
|
61
|
+
label: string;
|
|
62
|
+
/** Optional secondary line shown under the label in the picker. */
|
|
63
|
+
description?: string;
|
|
64
|
+
/** HTML inserted at the cursor when chosen. */
|
|
65
|
+
html: string;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** Detail payload of `nile-change` / `nile-input`. */
|
|
69
|
+
export interface WysiwygChangeDetail {
|
|
70
|
+
value: string;
|
|
71
|
+
json: Record<string, unknown>;
|
|
72
|
+
/** Alias of `value` for drop-in parity with nile-rich-text-editor. */
|
|
73
|
+
content: string;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export const DEFAULT_TOOLBAR =
|
|
77
|
+
'undo redo findReplace | heading | bold italic underline strike subscript superscript | fontFamily fontSize lineHeight | ' +
|
|
78
|
+
'textColor bgColor | alignLeft alignCenter alignRight alignJustify | ' +
|
|
79
|
+
'bulletList orderedList taskList listStyle indent outdent blockquote | ' +
|
|
80
|
+
'link bookmark table image embed codeBlock math horizontalRule specialChars emoji | ' +
|
|
81
|
+
'mergeField template | ' +
|
|
82
|
+
'formatPainter caseChange clearFormatting pastePlainText showBlocks sourceView | ' +
|
|
83
|
+
'importMarkdown importWord exportInlineHtml exportWord exportPdf | shortcutHelp fullscreen';
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { html, css, TemplateResult, CSSResultArray } from 'lit';
|
|
2
|
+
import { customElement, property, query, state } from 'lit/decorators.js';
|
|
3
|
+
import NileElement from '../../internal/nile-element';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Floating bookmark-insert panel: name an in-text anchor. Emits
|
|
7
|
+
* `wysiwyg-bookmark-apply` detail: { id } and `wysiwyg-bookmark-cancel`.
|
|
8
|
+
*/
|
|
9
|
+
@customElement('nile-wysiwyg-bookmark-panel')
|
|
10
|
+
export class NileWysiwygBookmarkPanel extends NileElement {
|
|
11
|
+
@property({ type: Boolean, reflect: true }) open = false;
|
|
12
|
+
|
|
13
|
+
@state() private error = '';
|
|
14
|
+
|
|
15
|
+
@query('.bookmark-panel__name') nameInput?: HTMLInputElement;
|
|
16
|
+
|
|
17
|
+
public static get styles(): CSSResultArray {
|
|
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
|
+
.bookmark-panel {
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
gap: 8px;
|
|
38
|
+
min-width: 280px;
|
|
39
|
+
padding: 12px;
|
|
40
|
+
background: var(--nile-wysiwyg-popover-bg, #ffffff);
|
|
41
|
+
border: 1px solid var(--nile-colors-neutral-400, #d0d5dd);
|
|
42
|
+
border-radius: var(--nile-wysiwyg-radius, 8px);
|
|
43
|
+
box-shadow: var(--nile-wysiwyg-popover-shadow, 0 4px 12px rgba(16, 24, 40, 0.12));
|
|
44
|
+
font-size: 13px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
label {
|
|
48
|
+
display: flex;
|
|
49
|
+
flex-direction: column;
|
|
50
|
+
gap: 4px;
|
|
51
|
+
color: var(--nile-colors-neutral-700, #344054);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
input {
|
|
55
|
+
font: inherit;
|
|
56
|
+
padding: 6px 8px;
|
|
57
|
+
border: 1px solid var(--nile-colors-neutral-400, #d0d5dd);
|
|
58
|
+
border-radius: 6px;
|
|
59
|
+
outline: none;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
input:focus {
|
|
63
|
+
border-color: var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600, #2563eb));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.hint {
|
|
67
|
+
font-size: 12px;
|
|
68
|
+
color: var(--nile-colors-neutral-500, #98a2b3);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.error {
|
|
72
|
+
font-size: 12px;
|
|
73
|
+
color: var(--nile-colors-error-600, #d92d20);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.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
|
+
];
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
public focusInput(): void {
|
|
101
|
+
this.error = '';
|
|
102
|
+
this.updateComplete.then(() => {
|
|
103
|
+
if (this.nameInput) this.nameInput.value = '';
|
|
104
|
+
this.nameInput?.focus();
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
private handleSubmit(event: Event): void {
|
|
109
|
+
event.preventDefault();
|
|
110
|
+
// Anchor ids can't contain whitespace; collapse runs to a single dash.
|
|
111
|
+
const id = (this.nameInput?.value ?? '').trim().replace(/\s+/g, '-');
|
|
112
|
+
if (!id) {
|
|
113
|
+
this.error = 'Enter a bookmark name.';
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
this.error = '';
|
|
117
|
+
this.emit('wysiwyg-bookmark-apply', { id });
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
public render(): TemplateResult {
|
|
121
|
+
return html`
|
|
122
|
+
<form
|
|
123
|
+
class="bookmark-panel"
|
|
124
|
+
part="bookmark-panel"
|
|
125
|
+
@submit=${this.handleSubmit}
|
|
126
|
+
@keydown=${(e: KeyboardEvent) => {
|
|
127
|
+
if (e.key === 'Escape') {
|
|
128
|
+
e.stopPropagation();
|
|
129
|
+
this.emit('wysiwyg-bookmark-cancel');
|
|
130
|
+
}
|
|
131
|
+
}}
|
|
132
|
+
>
|
|
133
|
+
<label>
|
|
134
|
+
Bookmark name
|
|
135
|
+
<input class="bookmark-panel__name" type="text" placeholder="section-intro" />
|
|
136
|
+
</label>
|
|
137
|
+
${this.error
|
|
138
|
+
? html`<div class="error">${this.error}</div>`
|
|
139
|
+
: html`<div class="hint">An invisible anchor you can link to with #name</div>`}
|
|
140
|
+
<div class="actions">
|
|
141
|
+
<button type="button" @click=${() => this.emit('wysiwyg-bookmark-cancel')}>
|
|
142
|
+
Cancel
|
|
143
|
+
</button>
|
|
144
|
+
<button type="submit" class="primary">Insert</button>
|
|
145
|
+
</div>
|
|
146
|
+
</form>
|
|
147
|
+
`;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
declare global {
|
|
152
|
+
interface HTMLElementTagNameMap {
|
|
153
|
+
'nile-wysiwyg-bookmark-panel': NileWysiwygBookmarkPanel;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { html, css, TemplateResult, CSSResultArray } from 'lit';
|
|
2
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
3
|
+
import NileElement from '../../internal/nile-element';
|
|
4
|
+
import { renderGlyph } from '../../internal/glyph';
|
|
5
|
+
import type { ToolbarState } from '../engine/selection-state';
|
|
6
|
+
import type { WysiwygCommandDetail } from '../types';
|
|
7
|
+
|
|
8
|
+
interface BubbleItem {
|
|
9
|
+
name: WysiwygCommandDetail['name'];
|
|
10
|
+
label: string;
|
|
11
|
+
/** nile-glyph icon name (ng-* names are stroke-drawn). */
|
|
12
|
+
icon: string;
|
|
13
|
+
active: (state: ToolbarState) => boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Balloon toolbar shown over non-empty selections. The host owns positioning
|
|
18
|
+
* (absolute left/top) and visibility; commands bubble up as
|
|
19
|
+
* `wysiwyg-command` events, same contract as the main toolbar.
|
|
20
|
+
*/
|
|
21
|
+
@customElement('nile-wysiwyg-bubble-menu')
|
|
22
|
+
export class NileWysiwygBubbleMenu extends NileElement {
|
|
23
|
+
@property({ type: Boolean, reflect: true }) open = false;
|
|
24
|
+
|
|
25
|
+
@property({ attribute: false }) toolbarState?: ToolbarState;
|
|
26
|
+
|
|
27
|
+
public static get styles(): CSSResultArray {
|
|
28
|
+
return [
|
|
29
|
+
css`
|
|
30
|
+
:host {
|
|
31
|
+
font-family: var(
|
|
32
|
+
--nile-font-family-sans-serif,
|
|
33
|
+
var(--ng-font-family-body, system-ui, -apple-system, sans-serif)
|
|
34
|
+
);
|
|
35
|
+
position: absolute;
|
|
36
|
+
z-index: 15;
|
|
37
|
+
display: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:host([open]) {
|
|
41
|
+
display: block;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.bubble {
|
|
45
|
+
display: flex;
|
|
46
|
+
gap: 2px;
|
|
47
|
+
padding: 4px;
|
|
48
|
+
background: var(--nile-wysiwyg-popover-bg, #ffffff);
|
|
49
|
+
border: 1px solid
|
|
50
|
+
var(--nile-wysiwyg-border-color, var(--nile-colors-neutral-400, #d0d5dd));
|
|
51
|
+
border-radius: var(--nile-wysiwyg-radius, 8px);
|
|
52
|
+
box-shadow: var(
|
|
53
|
+
--nile-wysiwyg-popover-shadow,
|
|
54
|
+
0 4px 12px rgba(16, 24, 40, 0.12)
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
button {
|
|
59
|
+
display: inline-flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
justify-content: center;
|
|
62
|
+
width: 26px;
|
|
63
|
+
height: 26px;
|
|
64
|
+
border: none;
|
|
65
|
+
border-radius: 5px;
|
|
66
|
+
background: transparent;
|
|
67
|
+
cursor: pointer;
|
|
68
|
+
font-size: 13px;
|
|
69
|
+
font-weight: 600;
|
|
70
|
+
color: var(--nile-colors-neutral-700, #344054);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
button:hover {
|
|
74
|
+
background: var(--nile-colors-neutral-100, #f2f4f7);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
button[data-active] {
|
|
78
|
+
background: var(--nile-colors-primary-50, var(--ng-componentcolors-utility-blue-50, #eff4ff));
|
|
79
|
+
color: var(--nile-colors-primary-700, var(--ng-componentcolors-utility-blue-700, #1d4ed8));
|
|
80
|
+
}
|
|
81
|
+
`,
|
|
82
|
+
];
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/** Same icon set as the main toolbar, so both surfaces look identical. */
|
|
86
|
+
private items: BubbleItem[] = [
|
|
87
|
+
{ name: 'bold', label: 'Bold', icon: 'format_bold', active: s => s.bold },
|
|
88
|
+
{ name: 'italic', label: 'Italic', icon: 'format_italic', active: s => s.italic },
|
|
89
|
+
{
|
|
90
|
+
name: 'underline',
|
|
91
|
+
label: 'Underline',
|
|
92
|
+
icon: 'format_underline',
|
|
93
|
+
active: s => s.underline,
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: 'strike',
|
|
97
|
+
label: 'Strikethrough',
|
|
98
|
+
icon: 'ng-strikethrough',
|
|
99
|
+
active: s => s.strike,
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: 'openLink',
|
|
103
|
+
label: 'Link',
|
|
104
|
+
icon: 'link_2',
|
|
105
|
+
active: s => s.linkActive,
|
|
106
|
+
},
|
|
107
|
+
];
|
|
108
|
+
|
|
109
|
+
public render(): TemplateResult {
|
|
110
|
+
const state = this.toolbarState;
|
|
111
|
+
return html`
|
|
112
|
+
<div class="bubble" part="bubble-menu" @mousedown=${(e: Event) => e.preventDefault()}>
|
|
113
|
+
${this.items.map(
|
|
114
|
+
item => html`
|
|
115
|
+
<button
|
|
116
|
+
type="button"
|
|
117
|
+
title=${item.label}
|
|
118
|
+
aria-label=${item.label}
|
|
119
|
+
?data-active=${state ? item.active(state) : false}
|
|
120
|
+
@click=${() => this.emit('wysiwyg-command', { name: item.name })}
|
|
121
|
+
>
|
|
122
|
+
${renderGlyph(item.icon, 16)}
|
|
123
|
+
</button>
|
|
124
|
+
`
|
|
125
|
+
)}
|
|
126
|
+
</div>
|
|
127
|
+
`;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
declare global {
|
|
132
|
+
interface HTMLElementTagNameMap {
|
|
133
|
+
'nile-wysiwyg-bubble-menu': NileWysiwygBubbleMenu;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { html, css, TemplateResult, CSSResultArray } from 'lit';
|
|
2
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
3
|
+
import NileElement from '../../internal/nile-element';
|
|
4
|
+
import { CODE_LANGUAGES } from '../engine/plugins/code-highlight';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Compact floating language picker shown while the cursor is inside a code
|
|
8
|
+
* block. Selection dispatches `wysiwyg-command` with setCodeBlockLanguage.
|
|
9
|
+
*/
|
|
10
|
+
@customElement('nile-wysiwyg-code-menu')
|
|
11
|
+
export class NileWysiwygCodeMenu extends NileElement {
|
|
12
|
+
@property({ type: Boolean, reflect: true }) open = false;
|
|
13
|
+
|
|
14
|
+
/** Current language attr ('' = auto, null treated as ''). */
|
|
15
|
+
@property({ type: String }) language: string | null = null;
|
|
16
|
+
|
|
17
|
+
public static get styles(): CSSResultArray {
|
|
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: 15;
|
|
27
|
+
display: none;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:host([open]) {
|
|
31
|
+
display: block;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.menu {
|
|
35
|
+
display: inline-flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
gap: 6px;
|
|
38
|
+
padding: 4px 4px 4px 10px;
|
|
39
|
+
border: 1px solid var(--nile-colors-neutral-400, #d0d5dd);
|
|
40
|
+
border-radius: 8px;
|
|
41
|
+
background: var(--nile-colors-white-base, #ffffff);
|
|
42
|
+
box-shadow: 0 4px 12px rgba(16, 24, 40, 0.12);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.label {
|
|
46
|
+
font-size: 12px;
|
|
47
|
+
color: var(--nile-colors-neutral-500, #98a2b3);
|
|
48
|
+
white-space: nowrap;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
select {
|
|
52
|
+
font: inherit;
|
|
53
|
+
font-size: 12px;
|
|
54
|
+
height: 24px;
|
|
55
|
+
padding: 0 4px;
|
|
56
|
+
border: none;
|
|
57
|
+
border-radius: 5px;
|
|
58
|
+
background: transparent;
|
|
59
|
+
color: var(--nile-colors-neutral-700, #344054);
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
outline: none;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
select:hover {
|
|
65
|
+
background: var(--nile-colors-neutral-100, #f2f4f7);
|
|
66
|
+
}
|
|
67
|
+
`,
|
|
68
|
+
];
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
public render(): TemplateResult {
|
|
72
|
+
const value = this.language ?? '';
|
|
73
|
+
return html`
|
|
74
|
+
<span class="menu" part="code-language" @mousedown=${(e: Event) => e.stopPropagation()}>
|
|
75
|
+
<span class="label">Language</span>
|
|
76
|
+
<select
|
|
77
|
+
aria-label="Code block language"
|
|
78
|
+
title="Syntax highlighting language for this code block"
|
|
79
|
+
.value=${value}
|
|
80
|
+
@change=${(e: Event) => {
|
|
81
|
+
const language = (e.target as HTMLSelectElement).value;
|
|
82
|
+
this.emit('wysiwyg-command', {
|
|
83
|
+
name: 'setCodeBlockLanguage',
|
|
84
|
+
attrs: { language: language || null },
|
|
85
|
+
});
|
|
86
|
+
}}
|
|
87
|
+
>
|
|
88
|
+
${CODE_LANGUAGES.map(
|
|
89
|
+
lang => html`
|
|
90
|
+
<option value=${lang.value} ?selected=${lang.value === value}>
|
|
91
|
+
${lang.label}
|
|
92
|
+
</option>
|
|
93
|
+
`
|
|
94
|
+
)}
|
|
95
|
+
</select>
|
|
96
|
+
</span>
|
|
97
|
+
`;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
declare global {
|
|
102
|
+
interface HTMLElementTagNameMap {
|
|
103
|
+
'nile-wysiwyg-code-menu': NileWysiwygCodeMenu;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { html, css, TemplateResult, CSSResultArray } from 'lit';
|
|
2
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
3
|
+
import NileElement from '../../internal/nile-element';
|
|
4
|
+
import { renderGlyph } from '../../internal/glyph';
|
|
5
|
+
import type { ToolbarState } from '../engine/selection-state';
|
|
6
|
+
|
|
7
|
+
interface EmbedOp {
|
|
8
|
+
label: string;
|
|
9
|
+
icon?: string;
|
|
10
|
+
text?: string;
|
|
11
|
+
command: string;
|
|
12
|
+
attrs?: Record<string, unknown>;
|
|
13
|
+
active?: (s: ToolbarState) => boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const OPS: EmbedOp[] = [
|
|
17
|
+
{
|
|
18
|
+
label: 'Align left',
|
|
19
|
+
icon: 'format_align_left',
|
|
20
|
+
command: 'setEmbedAlign',
|
|
21
|
+
attrs: { align: 'left' },
|
|
22
|
+
active: s => s.embedAlign === 'left' || s.embedAlign === null,
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
label: 'Align center',
|
|
26
|
+
icon: 'format_align_middle',
|
|
27
|
+
command: 'setEmbedAlign',
|
|
28
|
+
attrs: { align: 'center' },
|
|
29
|
+
active: s => s.embedAlign === 'center',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
label: 'Align right',
|
|
33
|
+
icon: 'format_align_right',
|
|
34
|
+
command: 'setEmbedAlign',
|
|
35
|
+
attrs: { align: 'right' },
|
|
36
|
+
active: s => s.embedAlign === 'right',
|
|
37
|
+
},
|
|
38
|
+
{ label: 'Delete video', icon: 'ng-trash-01', command: 'deleteEmbed' },
|
|
39
|
+
];
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Compact floating bar shown while a video embed is selected — mirrors the
|
|
43
|
+
* image menu (align left/center/right, delete). The host positions it;
|
|
44
|
+
* operations bubble up as `wysiwyg-command` events.
|
|
45
|
+
*/
|
|
46
|
+
@customElement('nile-wysiwyg-embed-menu')
|
|
47
|
+
export class NileWysiwygEmbedMenu extends NileElement {
|
|
48
|
+
@property({ type: Boolean, reflect: true }) open = false;
|
|
49
|
+
|
|
50
|
+
@property({ attribute: false }) toolbarState?: ToolbarState;
|
|
51
|
+
|
|
52
|
+
public static get styles(): CSSResultArray {
|
|
53
|
+
return [
|
|
54
|
+
css`
|
|
55
|
+
:host {
|
|
56
|
+
font-family: var(
|
|
57
|
+
--nile-font-family-sans-serif,
|
|
58
|
+
var(--ng-font-family-body, system-ui, -apple-system, sans-serif)
|
|
59
|
+
);
|
|
60
|
+
position: absolute;
|
|
61
|
+
z-index: 15;
|
|
62
|
+
display: none;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
:host([open]) {
|
|
66
|
+
display: block;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.menu {
|
|
70
|
+
display: flex;
|
|
71
|
+
gap: 2px;
|
|
72
|
+
padding: 4px;
|
|
73
|
+
background: var(--nile-wysiwyg-popover-bg, #ffffff);
|
|
74
|
+
border: 1px solid var(--nile-colors-neutral-400, #d0d5dd);
|
|
75
|
+
border-radius: 8px;
|
|
76
|
+
box-shadow: var(--nile-wysiwyg-popover-shadow, 0 4px 12px rgba(16, 24, 40, 0.12));
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
button {
|
|
80
|
+
display: inline-flex;
|
|
81
|
+
align-items: center;
|
|
82
|
+
justify-content: center;
|
|
83
|
+
min-width: 26px;
|
|
84
|
+
height: 26px;
|
|
85
|
+
padding: 0 4px;
|
|
86
|
+
border: none;
|
|
87
|
+
border-radius: 5px;
|
|
88
|
+
background: transparent;
|
|
89
|
+
cursor: pointer;
|
|
90
|
+
font-size: 12px;
|
|
91
|
+
font-weight: 600;
|
|
92
|
+
color: var(--nile-colors-neutral-700, #344054);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
button:hover {
|
|
96
|
+
background: var(--nile-colors-neutral-100, #f2f4f7);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
button[data-active] {
|
|
100
|
+
background: var(--nile-colors-primary-50, var(--ng-componentcolors-utility-blue-50, #eff4ff));
|
|
101
|
+
color: var(--nile-colors-primary-700, var(--ng-componentcolors-utility-blue-700, #1d4ed8));
|
|
102
|
+
}
|
|
103
|
+
`,
|
|
104
|
+
];
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
public render(): TemplateResult {
|
|
108
|
+
const state = this.toolbarState;
|
|
109
|
+
return html`
|
|
110
|
+
<div class="menu" part="embed-menu" @mousedown=${(e: Event) => e.preventDefault()}>
|
|
111
|
+
${OPS.map(
|
|
112
|
+
op => html`
|
|
113
|
+
<button
|
|
114
|
+
type="button"
|
|
115
|
+
title=${op.label}
|
|
116
|
+
aria-label=${op.label}
|
|
117
|
+
?data-active=${state && op.active ? op.active(state) : false}
|
|
118
|
+
@click=${() => this.emit('wysiwyg-command', { name: op.command, attrs: op.attrs })}
|
|
119
|
+
>
|
|
120
|
+
${op.icon ? renderGlyph(op.icon, 16) : op.text}
|
|
121
|
+
</button>
|
|
122
|
+
`
|
|
123
|
+
)}
|
|
124
|
+
</div>
|
|
125
|
+
`;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
declare global {
|
|
130
|
+
interface HTMLElementTagNameMap {
|
|
131
|
+
'nile-wysiwyg-embed-menu': NileWysiwygEmbedMenu;
|
|
132
|
+
}
|
|
133
|
+
}
|