@aquera/nile-elements 0.1.67-beta-1.6 → 0.1.67-beta-1.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/demo/index.html +11 -5
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +81 -12
- package/dist/nile-avatar/nile-avatar.test.cjs.js +1 -1
- package/dist/nile-avatar/nile-avatar.test.cjs.js.map +1 -1
- package/dist/nile-avatar/nile-avatar.test.esm.js +1 -1
- package/dist/nile-badge/index.cjs.js +1 -1
- package/dist/nile-badge/index.esm.js +1 -1
- package/dist/nile-badge/nile-badge.cjs.js +1 -1
- package/dist/nile-badge/nile-badge.cjs.js.map +1 -1
- package/dist/nile-badge/nile-badge.esm.js +1 -1
- package/dist/nile-badge/nile-badge.test.cjs.js +1 -1
- package/dist/nile-badge/nile-badge.test.cjs.js.map +1 -1
- package/dist/nile-badge/nile-badge.test.esm.js +1 -1
- package/dist/nile-button/index.cjs.js +1 -1
- package/dist/nile-button/index.esm.js +1 -1
- package/dist/nile-button/nile-button.cjs.js +1 -1
- package/dist/nile-button/nile-button.cjs.js.map +1 -1
- package/dist/nile-button/nile-button.esm.js +1 -1
- package/dist/nile-button/nile-button.test.cjs.js +1 -1
- package/dist/nile-button/nile-button.test.cjs.js.map +1 -1
- package/dist/nile-button/nile-button.test.esm.js +1 -1
- package/dist/nile-calendar/nile-calendar.test.cjs.js +1 -1
- package/dist/nile-calendar/nile-calendar.test.cjs.js.map +1 -1
- package/dist/nile-calendar/nile-calendar.test.esm.js +1 -1
- package/dist/nile-chip/nile-chip.test.cjs.js +1 -1
- package/dist/nile-chip/nile-chip.test.cjs.js.map +1 -1
- package/dist/nile-chip/nile-chip.test.esm.js +1 -1
- package/dist/nile-dialog/index.cjs.js +1 -1
- package/dist/nile-dialog/index.esm.js +1 -1
- package/dist/nile-dialog/nile-dialog.cjs.js +1 -1
- package/dist/nile-dialog/nile-dialog.cjs.js.map +1 -1
- package/dist/nile-dialog/nile-dialog.esm.js +2 -2
- package/dist/nile-dialog/nile-dialog.test.cjs.js +1 -1
- package/dist/nile-dialog/nile-dialog.test.cjs.js.map +1 -1
- package/dist/nile-dialog/nile-dialog.test.esm.js +1 -1
- package/dist/nile-drawer/index.cjs.js +1 -1
- package/dist/nile-drawer/index.esm.js +1 -1
- package/dist/nile-drawer/nile-drawer.cjs.js +1 -1
- package/dist/nile-drawer/nile-drawer.cjs.js.map +1 -1
- package/dist/nile-drawer/nile-drawer.esm.js +1 -1
- package/dist/nile-drawer/nile-drawer.test.cjs.js +1 -1
- package/dist/nile-drawer/nile-drawer.test.cjs.js.map +1 -1
- package/dist/nile-drawer/nile-drawer.test.esm.js +1 -1
- package/dist/nile-icon/icons/svg/format_clear.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/format_clear.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/format_clear.esm.js +1 -0
- package/dist/nile-icon/icons/svg/format_list_bulleted.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/format_list_bulleted.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/format_list_bulleted.esm.js +1 -0
- package/dist/nile-icon/icons/svg/format_list_numbered.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/format_list_numbered.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/format_list_numbered.esm.js +1 -0
- package/dist/nile-icon/icons/svg/index.cjs.js +1 -1
- package/dist/nile-icon/icons/svg/index.esm.js +1 -1
- package/dist/nile-icon/index.cjs.js +1 -1
- package/dist/nile-icon/index.cjs.js.map +1 -1
- package/dist/nile-icon/index.esm.js +2 -2
- package/dist/nile-icon/nile-icon.test.cjs.js +1 -1
- package/dist/nile-icon/nile-icon.test.cjs.js.map +1 -1
- package/dist/nile-icon/nile-icon.test.esm.js +1 -1
- package/dist/nile-icon-button/index.cjs.js +1 -1
- package/dist/nile-icon-button/index.esm.js +1 -1
- package/dist/nile-icon-button/nile-icon-button.cjs.js +1 -1
- package/dist/nile-icon-button/nile-icon-button.cjs.js.map +1 -1
- package/dist/nile-icon-button/nile-icon-button.esm.js +1 -1
- package/dist/nile-input/index.cjs.js +1 -1
- package/dist/nile-input/index.esm.js +1 -1
- package/dist/nile-input/nile-input.cjs.js +1 -1
- package/dist/nile-input/nile-input.cjs.js.map +1 -1
- package/dist/nile-input/nile-input.esm.js +1 -1
- package/dist/nile-input/nile-input.test.cjs.js +1 -1
- package/dist/nile-input/nile-input.test.cjs.js.map +1 -1
- package/dist/nile-input/nile-input.test.esm.js +1 -1
- package/dist/nile-menu-item/index.cjs.js +1 -1
- package/dist/nile-menu-item/index.esm.js +1 -1
- package/dist/nile-menu-item/nile-menu-item.cjs.js +1 -1
- package/dist/nile-menu-item/nile-menu-item.cjs.js.map +1 -1
- package/dist/nile-menu-item/nile-menu-item.esm.js +1 -1
- package/dist/nile-option/index.cjs.js +1 -1
- package/dist/nile-option/index.esm.js +1 -1
- package/dist/nile-option/nile-option.cjs.js +1 -1
- package/dist/nile-option/nile-option.cjs.js.map +1 -1
- package/dist/nile-option/nile-option.esm.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 +3 -5
- package/dist/nile-rich-text-editor/nile-rich-text-editor.esm.js +1 -1
- package/dist/nile-rich-text-editor/nile-rte-color.cjs.js +1 -1
- package/dist/nile-rich-text-editor/nile-rte-color.cjs.js.map +1 -1
- package/dist/nile-rich-text-editor/nile-rte-color.esm.js +54 -1
- package/dist/nile-rich-text-editor/nile-rte-link.cjs.js +2 -0
- package/dist/nile-rich-text-editor/nile-rte-link.cjs.js.map +1 -0
- package/dist/nile-rich-text-editor/nile-rte-link.esm.js +19 -0
- package/dist/nile-rich-text-editor/utils.cjs.js +1 -1
- package/dist/nile-rich-text-editor/utils.cjs.js.map +1 -1
- package/dist/nile-rich-text-editor/utils.esm.js +1 -1
- package/dist/nile-select/index.cjs.js +1 -1
- package/dist/nile-select/index.esm.js +1 -1
- package/dist/nile-select/nile-select.cjs.js +1 -1
- package/dist/nile-select/nile-select.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.esm.js +1 -1
- package/dist/nile-select/nile-select.test.cjs.js +1 -1
- package/dist/nile-select/nile-select.test.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.test.esm.js +1 -1
- package/dist/nile-tab/index.cjs.js +1 -1
- package/dist/nile-tab/index.esm.js +1 -1
- package/dist/nile-tab/nile-tab.cjs.js +1 -1
- package/dist/nile-tab/nile-tab.cjs.js.map +1 -1
- package/dist/nile-tab/nile-tab.esm.js +1 -1
- package/dist/nile-tab-group/index.cjs.js +1 -1
- package/dist/nile-tab-group/index.esm.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.cjs.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.cjs.js.map +1 -1
- package/dist/nile-tab-group/nile-tab-group.esm.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.test.cjs.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.test.cjs.js.map +1 -1
- package/dist/nile-tab-group/nile-tab-group.test.esm.js +1 -1
- package/dist/nile-tag/index.cjs.js +1 -1
- package/dist/nile-tag/index.esm.js +1 -1
- package/dist/nile-tag/nile-tag.cjs.js +1 -1
- package/dist/nile-tag/nile-tag.cjs.js.map +1 -1
- package/dist/nile-tag/nile-tag.esm.js +1 -1
- package/dist/nile-toast/index.cjs.js +1 -1
- package/dist/nile-toast/index.esm.js +1 -1
- package/dist/nile-toast/nile-toast.cjs.js +1 -1
- package/dist/nile-toast/nile-toast.cjs.js.map +1 -1
- package/dist/nile-toast/nile-toast.esm.js +1 -1
- package/dist/nile-tree/index.cjs.js +1 -1
- package/dist/nile-tree/index.esm.js +1 -1
- package/dist/nile-tree/nile-tree.cjs.js +1 -1
- package/dist/nile-tree/nile-tree.cjs.js.map +1 -1
- package/dist/nile-tree/nile-tree.esm.js +1 -1
- package/dist/nile-tree-item/index.cjs.js +1 -1
- package/dist/nile-tree-item/index.esm.js +1 -1
- package/dist/nile-tree-item/nile-tree-item.cjs.js +1 -1
- package/dist/nile-tree-item/nile-tree-item.cjs.js.map +1 -1
- package/dist/nile-tree-item/nile-tree-item.esm.js +1 -1
- package/dist/nile-virtual-select/index.cjs.js +1 -1
- package/dist/nile-virtual-select/index.esm.js +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.cjs.js +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.cjs.js.map +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.esm.js +1 -1
- package/dist/src/nile-icon/icons/svg/format_clear.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/format_clear.js +5 -0
- package/dist/src/nile-icon/icons/svg/format_clear.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/format_list_bulleted.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/format_list_bulleted.js +5 -0
- package/dist/src/nile-icon/icons/svg/format_list_bulleted.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/format_list_numbered.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/format_list_numbered.js +5 -0
- package/dist/src/nile-icon/icons/svg/format_list_numbered.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/index.d.ts +3 -0
- package/dist/src/nile-icon/icons/svg/index.js +3 -0
- package/dist/src/nile-icon/icons/svg/index.js.map +1 -1
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.css.js +3 -5
- 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 +1 -0
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.js +18 -78
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.js.map +1 -1
- package/dist/src/nile-rich-text-editor/nile-rte-color.d.ts +11 -3
- package/dist/src/nile-rich-text-editor/nile-rte-color.js +171 -6
- package/dist/src/nile-rich-text-editor/nile-rte-color.js.map +1 -1
- package/dist/src/nile-rich-text-editor/nile-rte-link.d.ts +19 -0
- package/dist/src/nile-rich-text-editor/nile-rte-link.js +172 -0
- package/dist/src/nile-rich-text-editor/nile-rte-link.js.map +1 -0
- package/dist/src/nile-rich-text-editor/sanatize.d.ts +1 -0
- package/dist/src/nile-rich-text-editor/sanatize.js +40 -0
- package/dist/src/nile-rich-text-editor/sanatize.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/nile-icon/icons/svg/format_clear.ts +5 -0
- package/src/nile-icon/icons/svg/format_list_bulleted.ts +5 -0
- package/src/nile-icon/icons/svg/format_list_numbered.ts +5 -0
- package/src/nile-icon/icons/svg/index.ts +3 -0
- package/src/nile-rich-text-editor/nile-rich-text-editor.css.ts +3 -5
- package/src/nile-rich-text-editor/nile-rich-text-editor.ts +26 -80
- package/src/nile-rich-text-editor/nile-rte-color.ts +182 -6
- package/src/nile-rich-text-editor/nile-rte-link.ts +161 -0
- package/vscode-html-custom-data.json +33 -3
package/package.json
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
"description": "Webcomponent nile-elements following open-wc recommendations",
|
4
4
|
"license": "MIT",
|
5
5
|
"author": "nile-elements",
|
6
|
-
"version": "0.1.67-beta-1.
|
6
|
+
"version": "0.1.67-beta-1.7",
|
7
7
|
"main": "dist/src/index.js",
|
8
8
|
"type": "module",
|
9
9
|
"module": "dist/src/index.js",
|
@@ -0,0 +1,5 @@
|
|
1
|
+
/**
|
2
|
+
* Do not edit directly
|
3
|
+
*/
|
4
|
+
|
5
|
+
export default "PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHZpZXd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5NDgzVjcuMTY2NjdDMS41IDcuMDM1ODkgMS41NDU2IDYuOTI2MjggMS42MzY4MSA2LjgzNzgzQzEuNzI4MDIgNi43NDkzOSAxLjg0MTA2IDYuNzA1MTcgMS45NzU5MiA2LjcwNTE3SDMuMjE4NzVWNS43OTQ4M0gxLjVWNS4yMDUxN0gzLjM1MDkyQzMuNDg1NzkgNS4yMDUxNyAzLjU5ODgyIDUuMjQ5MzkgMy42OTAwMyA1LjMzNzgzQzMuNzgxMjQgNS40MjYyOCAzLjgyNjg0IDUuNTM1ODkgMy44MjY4NCA1LjY2NjY3VjYuODMzMzNDMy44MjY4NCA2Ljk2NDExIDMuNzgxMjQgNy4wNzM3MiAzLjY5MDAzIDcuMTYyMTdDMy41OTg4MiA3LjI1MDYxIDMuNDg1NzkgNy4yOTQ4MyAzLjM1MDkyIDcuMjk0ODNIMi4xMDgwOVY4LjIwNTE3SDMuODI2ODRWOC43OTQ4M0gxLjVaTTIuNTMxMjUgNC41ODk2N1YxLjU4OTY3SDEuNVYxSDMuMTM5MzRWNC41ODk2N0gyLjUzMTI1Wk01LjM2MDY2IDExLjMzMzNWMTAuNjY2N0gxMi41VjExLjMzMzNINS4zNjA2NlpNNS4zNjA2NiA3LjMzMzMzVjYuNjY2NjdIMTIuNVY3LjMzMzMzSDUuMzYwNjZaTTUuMzYwNjYgMy4zMzMzM1YyLjY2NjY3SDEyLjVWMy4zMzMzM0g1LjM2MDY2WiIgZmlsbD0iYmxhY2siLz48L3N2Zz4=";
|
@@ -176,7 +176,10 @@ export { default as format_align_left } from './format_align_left';
|
|
176
176
|
export { default as format_align_middle } from './format_align_middle';
|
177
177
|
export { default as format_align_right } from './format_align_right';
|
178
178
|
export { default as format_bold } from './format_bold';
|
179
|
+
export { default as format_clear } from './format_clear';
|
179
180
|
export { default as format_italic } from './format_italic';
|
181
|
+
export { default as format_list_bulleted } from './format_list_bulleted';
|
182
|
+
export { default as format_list_numbered } from './format_list_numbered';
|
180
183
|
export { default as format_underline } from './format_underline';
|
181
184
|
export { default as frequency } from './frequency';
|
182
185
|
export { default as fullunion } from './full-union';
|
@@ -2,9 +2,7 @@
|
|
2
2
|
import { css } from 'lit';
|
3
3
|
|
4
4
|
export const styles = css`
|
5
|
-
|
6
|
-
all: revert;
|
7
|
-
}
|
5
|
+
|
8
6
|
|
9
7
|
nile-rich-text-editor { position: relative; display: block; font-family: inherit; }
|
10
8
|
|
@@ -38,14 +36,14 @@ nile-rte-toolbar-item > nile-button::part(base) {
|
|
38
36
|
nile-rte-divider { width:1px; height:20px; background:#e5e7eb; display:inline-block; margin:0 4px; }
|
39
37
|
|
40
38
|
.editor p { margin:1em 0; }
|
41
|
-
.editor h1 { font-size:2em, all: revert; display: block;
|
39
|
+
.editor h1, .preview h1 { font-size:2em, all: revert; display: block;
|
42
40
|
font-size: 2em;
|
43
41
|
margin-top: 0.67em;
|
44
42
|
margin-bottom: 0.67em;
|
45
43
|
margin-left: 0;
|
46
44
|
margin-right: 0;
|
47
45
|
font-weight: bold; }
|
48
|
-
.editor h2 { all: revert; display: block;
|
46
|
+
.editor h2, .preview h2 { all: revert; display: block;
|
49
47
|
font-size: 1.5em;
|
50
48
|
margin-top: 0.83em;
|
51
49
|
margin-bottom: 0.83em;
|
@@ -9,11 +9,12 @@ import './nile-rte-color';
|
|
9
9
|
import './nile-rte-divider';
|
10
10
|
import './nile-rte-preview';
|
11
11
|
import './nile-rte-mentions';
|
12
|
+
import './nile-rte-link';
|
12
13
|
|
13
14
|
import {
|
14
15
|
closestBlock, nearestElement, rgbToHex,
|
15
16
|
toggleInlineTag, setBlockTag, setAlignment,
|
16
|
-
setFontFamily, setForeColor,
|
17
|
+
setFontFamily, setForeColor, setBackColor,
|
17
18
|
} from './utils';
|
18
19
|
|
19
20
|
import {styles} from './nile-rich-text-editor.css';
|
@@ -35,7 +36,7 @@ const DEFAULT_ICONS: Record<string, string> = {
|
|
35
36
|
justify: 'format_align_justify',
|
36
37
|
ul: 'format_list_bulleted',
|
37
38
|
ol: 'format_list_numbered',
|
38
|
-
clear: '
|
39
|
+
clear: 'format_clear',
|
39
40
|
};
|
40
41
|
|
41
42
|
@customElement('nile-rich-text-editor')
|
@@ -259,7 +260,16 @@ private bgSwatchEl: HTMLElement | null = null;
|
|
259
260
|
});
|
260
261
|
return;
|
261
262
|
}
|
262
|
-
|
263
|
+
if (tag === 'nile-rte-link') {
|
264
|
+
(child as any).editorEl = this.editorEl;
|
265
|
+
child.addEventListener('link-changed', () => {
|
266
|
+
this.updateContent();
|
267
|
+
this.updateToolbarState();
|
268
|
+
});
|
269
|
+
return;
|
270
|
+
}
|
271
|
+
|
272
|
+
|
263
273
|
|
264
274
|
if (tag === 'nile-rte-toolbar-item') {
|
265
275
|
|
@@ -327,97 +337,33 @@ private bgSwatchEl: HTMLElement | null = null;
|
|
327
337
|
setFontFamily(this.editorEl, val);
|
328
338
|
}
|
329
339
|
|
330
|
-
|
340
|
+
|
331
341
|
this.updateContent();
|
332
342
|
this.updateToolbarState();
|
333
343
|
});
|
334
344
|
|
335
|
-
|
345
|
+
|
336
346
|
return;
|
337
347
|
}
|
338
348
|
|
339
349
|
|
340
350
|
if (tag === 'nile-rte-color') {
|
341
|
-
|
342
|
-
const value = child.getAttribute('value') ?? '#000000';
|
343
|
-
const mode = child.getAttribute('mode') ?? 'text'; // 'text' | 'background'
|
344
|
-
|
345
|
-
// Create/attach the hidden color input
|
346
|
-
let input = child.querySelector(':scope > input[type="color"]') as HTMLInputElement | null;
|
347
|
-
if (!input) {
|
348
|
-
input = document.createElement('input');
|
349
|
-
input.type = 'color';
|
350
|
-
input.style.position = 'absolute';
|
351
|
-
input.style.opacity = '0';
|
352
|
-
input.style.pointerEvents = 'none'; // we'll click it programmatically
|
353
|
-
child.appendChild(input);
|
354
|
-
}
|
355
|
-
input.title = label;
|
356
|
-
input.value = value;
|
357
|
-
|
358
|
-
let trigger = child.querySelector(':scope > nile-button') as HTMLElement | null;
|
359
|
-
if (!trigger) {
|
360
|
-
const nb = document.createElement('nile-button');
|
361
|
-
(nb as any).variant = 'ghost';
|
362
|
-
nb.className = 'rte-color-trigger';
|
363
|
-
nb.setAttribute('aria-label', label);
|
364
|
-
|
365
|
-
if (mode === 'background') {
|
366
|
-
nb.innerHTML = `<span class="swatch-box" aria-hidden="true"></span>`;
|
367
|
-
} else {
|
368
|
-
nb.innerHTML = `
|
369
|
-
<span class="glyph-stack" aria-hidden="true">
|
370
|
-
<span class="glyph">A</span>
|
371
|
-
<span class="underline"></span>
|
372
|
-
</span>
|
373
|
-
`;
|
374
|
-
}
|
375
|
-
|
376
|
-
child.appendChild(nb);
|
377
|
-
trigger = nb;
|
378
|
-
}
|
379
|
-
|
380
|
-
|
381
|
-
// Cache swatch elements to update later
|
382
|
-
const underline = trigger.querySelector('.underline') as HTMLElement | null;
|
383
|
-
const square = trigger.querySelector('.swatch-box') as HTMLElement | null;
|
384
|
-
|
385
|
-
if (mode === 'background') {
|
386
|
-
this.bgColorInput = input;
|
387
|
-
this.bgSwatchEl = square;
|
388
|
-
if (this.bgSwatchEl) this.bgSwatchEl.style.backgroundColor = input.value;
|
389
|
-
} else {
|
390
|
-
this.colorInput = input;
|
391
|
-
this.colorSwatchEl = underline;
|
392
|
-
if (this.colorSwatchEl) this.colorSwatchEl.style.backgroundColor = input.value;
|
393
|
-
}
|
394
|
-
|
395
|
-
// Open native picker on trigger click
|
396
|
-
trigger.addEventListener('click', (e) => {
|
397
|
-
e.preventDefault();
|
398
|
-
// Keep selection before opening the picker
|
351
|
+
child.addEventListener('change', (e: any) => {
|
399
352
|
this.focusAndRestore();
|
400
|
-
|
401
|
-
});
|
353
|
+
const { mode, value } = e.detail;
|
402
354
|
|
403
|
-
|
404
|
-
|
405
|
-
this.focusAndRestore();
|
406
|
-
if (mode === 'background') {
|
407
|
-
setBackColor(this.editorEl, input!.value);
|
408
|
-
if (this.bgSwatchEl) this.bgSwatchEl.style.backgroundColor = input!.value;
|
355
|
+
if (mode === 'backColor') {
|
356
|
+
setBackColor(this.editorEl, value);
|
409
357
|
} else {
|
410
|
-
setForeColor(this.editorEl,
|
411
|
-
if (this.colorSwatchEl) this.colorSwatchEl.style.backgroundColor = input!.value;
|
358
|
+
setForeColor(this.editorEl, value);
|
412
359
|
}
|
360
|
+
|
413
361
|
this.updateContent();
|
414
362
|
this.updateToolbarState();
|
415
363
|
});
|
416
|
-
|
417
|
-
// Prevent losing selection when interacting
|
418
|
-
trigger.addEventListener('mousedown', e => e.preventDefault());
|
419
|
-
input.addEventListener('mousedown', e => e.preventDefault());
|
364
|
+
return;
|
420
365
|
}
|
366
|
+
|
421
367
|
});
|
422
368
|
}
|
423
369
|
private onSelectionChange = () => {
|
@@ -441,12 +387,12 @@ private bgSwatchEl: HTMLElement | null = null;
|
|
441
387
|
}
|
442
388
|
private focusAndRestore() { this.editorEl?.focus(); this.restoreSelection(); }
|
443
389
|
|
444
|
-
|
390
|
+
|
445
391
|
private insertList(type: 'ul' | 'ol') {
|
446
392
|
this.restoreSelection();
|
447
393
|
if (!this.lastRange) return;
|
448
394
|
|
449
|
-
|
395
|
+
|
450
396
|
const list = document.createElement(type);
|
451
397
|
|
452
398
|
// grab the selected fragment
|
@@ -526,7 +472,7 @@ private ensureAtLeastOneParagraph() {
|
|
526
472
|
case 'justify': setAlignment(this.editorEl, 'justify'); break;
|
527
473
|
case 'ul': this.insertList('ul'); break;
|
528
474
|
case 'ol': this.insertList('ol'); break;
|
529
|
-
case 'link':
|
475
|
+
case 'link': break;
|
530
476
|
case 'clear':
|
531
477
|
const walker = document.createTreeWalker(this.editorEl, NodeFilter.SHOW_ELEMENT);
|
532
478
|
const toUnwrap: HTMLElement[] = [];
|
@@ -1,14 +1,190 @@
|
|
1
|
-
import { LitElement } from 'lit';
|
2
|
-
import { customElement, property } from 'lit/decorators.js';
|
1
|
+
import { LitElement, html } from 'lit';
|
2
|
+
import { customElement, property, state } from 'lit/decorators.js';
|
3
3
|
|
4
4
|
@customElement('nile-rte-color')
|
5
5
|
export class NileRteColor extends LitElement {
|
6
6
|
protected createRenderRoot() { return this; }
|
7
|
-
protected shouldUpdate() { return false; }
|
8
7
|
|
9
|
-
/**
|
10
|
-
@property({ type: String })
|
8
|
+
/** Whether this is text color or background color */
|
9
|
+
@property({ type: String }) mode: 'foreColor' | 'backColor' = 'foreColor';
|
11
10
|
@property({ type: String }) label = 'Text Color';
|
12
11
|
@property({ type: String }) value = '#000000';
|
12
|
+
|
13
|
+
/** Default palette, user can override via property or attribute */
|
14
|
+
@property({ type: Array })
|
15
|
+
palette: string[] = [
|
16
|
+
'#000000','#444444','#666666','#999999','#cccccc','#eeeeee','#ffffff',
|
17
|
+
'#d32f2f','#f44336','#ff9800','#ffeb3b','#4caf50','#2196f3','#3f51b5','#9c27b0',
|
18
|
+
'#03a9f4','#00bcd4','#009688','#8bc34a','#cddc39','#ffc107','#ff5722'
|
19
|
+
];
|
20
|
+
|
21
|
+
@state() private recentColors: string[] = [];
|
22
|
+
private inputEl!: HTMLInputElement;
|
23
|
+
|
24
|
+
connectedCallback() {
|
25
|
+
super.connectedCallback();
|
26
|
+
|
27
|
+
// Inject styles once
|
28
|
+
this.injectCss(`
|
29
|
+
nile-button.rte-color-trigger::part(base){
|
30
|
+
width:32px; height:32px; padding:0px 6px;
|
31
|
+
}
|
32
|
+
|
33
|
+
.glyph-stack { display:grid; align-items:center; justify-items:center; line-height:1; }
|
34
|
+
.glyph { font-size:14px; margin-bottom:2px; }
|
35
|
+
.underline { width:18px; height:3px; border-radius:2px; }
|
36
|
+
.swatch-box { width:18px; height:16px; border-radius:4px; border:1px solid rgba(0,0,0,0.35); }
|
37
|
+
|
38
|
+
nile-popover::part(popover) {
|
39
|
+
min-width: 225px;
|
40
|
+
height: 250px;
|
41
|
+
padding: 0px;
|
42
|
+
gap: 0px;
|
43
|
+
}
|
44
|
+
|
45
|
+
.swatch-dropdown {
|
46
|
+
height: 245px;
|
47
|
+
width: 275px;
|
48
|
+
padding: 12px;
|
49
|
+
background: #fff;
|
50
|
+
border-radius: 8px;
|
51
|
+
box-sizing: border-box;
|
52
|
+
overflow-y: auto;
|
53
|
+
}
|
54
|
+
|
55
|
+
.section { margin-bottom: 12px; }
|
56
|
+
.title { font-size: 13px; font-weight: 600; margin-bottom: 8px; color:#111; }
|
57
|
+
|
58
|
+
.swatches {
|
59
|
+
display: grid;
|
60
|
+
grid-template-columns: repeat(auto-fill, 24px);
|
61
|
+
gap: 8px;
|
62
|
+
}
|
63
|
+
|
64
|
+
.swatch {
|
65
|
+
width: 24px;
|
66
|
+
height: 24px;
|
67
|
+
border-radius: 50%;
|
68
|
+
border: 1px solid rgba(0,0,0,0.25);
|
69
|
+
cursor: pointer;
|
70
|
+
position: relative;
|
71
|
+
background-clip: content-box;
|
72
|
+
}
|
73
|
+
|
74
|
+
.swatch.add {
|
75
|
+
display:flex;
|
76
|
+
align-items:center;
|
77
|
+
justify-content:center;
|
78
|
+
font-weight:bold;
|
79
|
+
font-size:16px;
|
80
|
+
background:#fff;
|
81
|
+
}
|
82
|
+
|
83
|
+
.checkmark {
|
84
|
+
position: absolute;
|
85
|
+
top: 50%; left: 50%;
|
86
|
+
transform: translate(-50%,-50%);
|
87
|
+
font-size: 13px;
|
88
|
+
color: white;
|
89
|
+
text-shadow: 0 0 2px rgba(0,0,0,0.6);
|
90
|
+
}
|
91
|
+
`);
|
92
|
+
|
93
|
+
// hidden native color input
|
94
|
+
this.inputEl = document.createElement('input');
|
95
|
+
this.inputEl.type = 'color';
|
96
|
+
this.inputEl.style.position = 'absolute';
|
97
|
+
this.inputEl.style.opacity = '0';
|
98
|
+
this.inputEl.style.pointerEvents = 'none';
|
99
|
+
this.inputEl.value = this.value;
|
100
|
+
this.appendChild(this.inputEl);
|
101
|
+
|
102
|
+
this.inputEl.addEventListener('input', () => this.setColor(this.inputEl.value));
|
103
|
+
}
|
104
|
+
|
105
|
+
private injectCss(cssText: string) {
|
106
|
+
if (this.querySelector('style[data-rte-color-style]')) return;
|
107
|
+
const style = document.createElement('style');
|
108
|
+
style.setAttribute('data-rte-color-style', 'true');
|
109
|
+
style.textContent = cssText;
|
110
|
+
this.insertBefore(style, this.firstChild);
|
111
|
+
}
|
112
|
+
|
113
|
+
private setColor(color: string) {
|
114
|
+
this.value = color;
|
115
|
+
this.recentColors = [color, ...this.recentColors.filter(c => c !== color)].slice(0, 8);
|
116
|
+
|
117
|
+
this.dispatchEvent(new CustomEvent('change', {
|
118
|
+
detail: { mode: this.mode, value: color },
|
119
|
+
bubbles: true,
|
120
|
+
composed: true
|
121
|
+
}));
|
122
|
+
}
|
123
|
+
|
124
|
+
private pickCustom = () => this.inputEl.click();
|
125
|
+
|
126
|
+
render() {
|
127
|
+
return html`
|
128
|
+
<nile-popover placement="bottom-start" distance="6" .arrow=${false}>
|
129
|
+
<nile-button
|
130
|
+
slot="anchor"
|
131
|
+
variant="ghost"
|
132
|
+
size="small"
|
133
|
+
aria-label=${this.label}
|
134
|
+
class="rte-color-trigger"
|
135
|
+
>
|
136
|
+
${this.mode === 'backColor'
|
137
|
+
? html`<span class="swatch-box" style="background:${this.value}"></span>`
|
138
|
+
: html`
|
139
|
+
<span class="glyph-stack">
|
140
|
+
<span class="glyph">A</span>
|
141
|
+
<span class="underline" style="background:${this.value}"></span>
|
142
|
+
</span>
|
143
|
+
`}
|
144
|
+
</nile-button>
|
145
|
+
|
146
|
+
<div part="base" class="swatch-dropdown">
|
147
|
+
<div class="section">
|
148
|
+
<div class="title">Default</div>
|
149
|
+
<div class="swatches">
|
150
|
+
${this.palette.map(c => html`
|
151
|
+
<button class="swatch" style="background:${c}"
|
152
|
+
@click=${() => this.setColor(c)}
|
153
|
+
title=${c}>
|
154
|
+
${this.value === c ? html`<span class="checkmark">✓</span>` : ''}
|
155
|
+
</button>
|
156
|
+
`)}
|
157
|
+
</div>
|
158
|
+
</div>
|
159
|
+
|
160
|
+
${this.recentColors.length > 0 ? html`
|
161
|
+
<div class="section">
|
162
|
+
<div class="title">Recently Used</div>
|
163
|
+
<div class="swatches">
|
164
|
+
${this.recentColors.map(c => html`
|
165
|
+
<button class="swatch" style="background:${c}"
|
166
|
+
@click=${() => this.setColor(c)}
|
167
|
+
title=${c}></button>
|
168
|
+
`)}
|
169
|
+
</div>
|
170
|
+
</div>
|
171
|
+
` : ''}
|
172
|
+
|
173
|
+
<div class="section">
|
174
|
+
<div class="title">Custom</div>
|
175
|
+
<div class="swatches">
|
176
|
+
<button class="swatch add" @click=${this.pickCustom}>+</button>
|
177
|
+
<nile-icon name="eyedropper"></nile-icon>
|
178
|
+
</div>
|
179
|
+
</div>
|
180
|
+
</div>
|
181
|
+
</nile-popover>
|
182
|
+
`;
|
183
|
+
}
|
184
|
+
}
|
185
|
+
|
186
|
+
declare global {
|
187
|
+
interface HTMLElementTagNameMap {
|
188
|
+
'nile-rte-color': NileRteColor;
|
189
|
+
}
|
13
190
|
}
|
14
|
-
declare global { interface HTMLElementTagNameMap { 'nile-rte-color': NileRteColor; } }
|
@@ -0,0 +1,161 @@
|
|
1
|
+
import { LitElement, html } from 'lit';
|
2
|
+
import { customElement, property, state } from 'lit/decorators.js';
|
3
|
+
|
4
|
+
@customElement('nile-rte-link')
|
5
|
+
export class NileRteLink extends LitElement {
|
6
|
+
protected createRenderRoot() { return this; }
|
7
|
+
|
8
|
+
@property({ attribute: false }) editorEl!: HTMLElement;
|
9
|
+
@property({ type: String }) placeholder = 'https://';
|
10
|
+
|
11
|
+
@state() private linkValue = '';
|
12
|
+
private selectionRange: Range | null = null;
|
13
|
+
|
14
|
+
connectedCallback() {
|
15
|
+
super.connectedCallback();
|
16
|
+
this.injectCss(`
|
17
|
+
nile-rte-link nile-button.rte-link-trigger::part(base) {
|
18
|
+
width: 32px;
|
19
|
+
height: 32px;
|
20
|
+
padding: 0;
|
21
|
+
border: none;
|
22
|
+
border-radius: 6px;
|
23
|
+
}
|
24
|
+
.link-popup {
|
25
|
+
display: flex;
|
26
|
+
gap: 6px;
|
27
|
+
padding: 6px 8px;
|
28
|
+
align-items: center;
|
29
|
+
background: white;
|
30
|
+
}
|
31
|
+
.link-input {
|
32
|
+
flex: 1;
|
33
|
+
padding: 6px 8px;
|
34
|
+
font-size: 14px;
|
35
|
+
border: 1px solid #ccc;
|
36
|
+
border-radius: 4px;
|
37
|
+
}
|
38
|
+
nile-popover.rte-link-popover::part(popover) {
|
39
|
+
min-width: 250px;
|
40
|
+
height: 44px;
|
41
|
+
padding: 0px;
|
42
|
+
gap: 0px;
|
43
|
+
}
|
44
|
+
`);
|
45
|
+
}
|
46
|
+
|
47
|
+
private injectCss(cssText: string) {
|
48
|
+
if (this.querySelector('style[data-rte-link-style]')) return;
|
49
|
+
const style = document.createElement('style');
|
50
|
+
style.setAttribute('data-rte-link-style', 'true');
|
51
|
+
style.textContent = cssText;
|
52
|
+
this.insertBefore(style, this.firstChild);
|
53
|
+
}
|
54
|
+
|
55
|
+
private onOpen() {
|
56
|
+
if (!this.editorEl) return;
|
57
|
+
const sel = document.getSelection();
|
58
|
+
if (!sel || sel.rangeCount === 0) return;
|
59
|
+
|
60
|
+
this.selectionRange = sel.getRangeAt(0).cloneRange();
|
61
|
+
|
62
|
+
// Pre-fill with existing href if selection inside <a>
|
63
|
+
let n: Node | null = sel.anchorNode;
|
64
|
+
let a: HTMLAnchorElement | null = null;
|
65
|
+
while (n && n !== this.editorEl) {
|
66
|
+
if (n instanceof HTMLAnchorElement) { a = n; break; }
|
67
|
+
n = n.parentNode;
|
68
|
+
}
|
69
|
+
this.linkValue = a?.href || '';
|
70
|
+
|
71
|
+
setTimeout(() => {
|
72
|
+
this.querySelector<HTMLInputElement>('.link-input')?.focus();
|
73
|
+
}, 0);
|
74
|
+
}
|
75
|
+
|
76
|
+
private onApply() {
|
77
|
+
if (!this.editorEl || !this.selectionRange) return;
|
78
|
+
const url = this.linkValue.trim();
|
79
|
+
if (!url) return;
|
80
|
+
|
81
|
+
const sel = document.getSelection();
|
82
|
+
if (!sel) return;
|
83
|
+
sel.removeAllRanges();
|
84
|
+
sel.addRange(this.selectionRange);
|
85
|
+
|
86
|
+
// Check for existing <a>
|
87
|
+
let n: Node | null = this.selectionRange.startContainer;
|
88
|
+
let a: HTMLAnchorElement | null = null;
|
89
|
+
while (n && n !== this.editorEl) {
|
90
|
+
if (n instanceof HTMLAnchorElement) { a = n; break; }
|
91
|
+
n = n.parentNode;
|
92
|
+
}
|
93
|
+
|
94
|
+
if (a) {
|
95
|
+
a.href = url;
|
96
|
+
} else {
|
97
|
+
const link = document.createElement('a');
|
98
|
+
link.href = url;
|
99
|
+
if (this.selectionRange.collapsed) {
|
100
|
+
link.textContent = url;
|
101
|
+
this.selectionRange.insertNode(link);
|
102
|
+
} else {
|
103
|
+
try {
|
104
|
+
this.selectionRange.surroundContents(link);
|
105
|
+
} catch {
|
106
|
+
const frag = this.selectionRange.extractContents();
|
107
|
+
link.appendChild(frag);
|
108
|
+
this.selectionRange.insertNode(link);
|
109
|
+
}
|
110
|
+
}
|
111
|
+
}
|
112
|
+
|
113
|
+
this.emit(url);
|
114
|
+
|
115
|
+
// Close the popover by toggling `open`
|
116
|
+
const pop = this.querySelector('nile-popover');
|
117
|
+
if (pop) (pop as any).isShow = false;
|
118
|
+
}
|
119
|
+
|
120
|
+
private emit(href: string) {
|
121
|
+
this.dispatchEvent(new CustomEvent('link-changed', {
|
122
|
+
detail: { href },
|
123
|
+
bubbles: true,
|
124
|
+
composed: true
|
125
|
+
}));
|
126
|
+
}
|
127
|
+
|
128
|
+
render() {
|
129
|
+
return html`
|
130
|
+
<nile-popover placement="bottom-start" class="rte-link-popover" distance="10" .arrow=${false}>
|
131
|
+
<nile-button class="rte-link-trigger" slot="anchor" variant="tertiary" size="small" @click=${() => this.onOpen()}>
|
132
|
+
<nile-icon name="link_2" aria-label="Insert/Edit Link"></nile-icon>
|
133
|
+
</nile-button>
|
134
|
+
|
135
|
+
<div class="link-popup">
|
136
|
+
<input
|
137
|
+
class="link-input"
|
138
|
+
type="text"
|
139
|
+
placeholder="Type or paste link here"
|
140
|
+
.value=${this.linkValue}
|
141
|
+
@input=${(e: any) => this.linkValue = e.target.value}
|
142
|
+
@keydown=${(e: KeyboardEvent) => {
|
143
|
+
if (e.key === 'Enter') this.onApply();
|
144
|
+
if (e.key === 'Escape') {
|
145
|
+
const pop = this.querySelector('nile-popover');
|
146
|
+
if (pop) (pop as any).isShow = false;
|
147
|
+
}
|
148
|
+
}}
|
149
|
+
/>
|
150
|
+
<nile-button @click=${() => this.onApply()}>Apply</nile-button>
|
151
|
+
</div>
|
152
|
+
</nile-popover>
|
153
|
+
`;
|
154
|
+
}
|
155
|
+
}
|
156
|
+
|
157
|
+
declare global {
|
158
|
+
interface HTMLElementTagNameMap {
|
159
|
+
'nile-rte-link': NileRteLink;
|
160
|
+
}
|
161
|
+
}
|
@@ -2971,11 +2971,19 @@
|
|
2971
2971
|
},
|
2972
2972
|
{
|
2973
2973
|
"name": "nile-rte-color",
|
2974
|
-
"description": "
|
2974
|
+
"description": "Events:\n\n * `change` {`CustomEvent<{ mode: \"foreColor\" | \"backColor\"; value: string; }>`} - \n\nAttributes:\n\n * `mode` {`\"foreColor\" | \"backColor\"`} - Whether this is text color or background color\n\n * `label` {`string`} - \n\n * `value` {`string`} - \n\n * `palette` {`string[]`} - Default palette, user can override via property or attribute\n\nProperties:\n\n * `mode` {`\"foreColor\" | \"backColor\"`} - Whether this is text color or background color\n\n * `label` {`string`} - \n\n * `value` {`string`} - \n\n * `palette` {`string[]`} - Default palette, user can override via property or attribute\n\n * `recentColors` {`string[]`} - \n\n * `inputEl` {`HTMLInputElement`} - \n\n * `pickCustom` - ",
|
2975
2975
|
"attributes": [
|
2976
2976
|
{
|
2977
|
-
"name": "
|
2978
|
-
"description": "`
|
2977
|
+
"name": "mode",
|
2978
|
+
"description": "`mode` {`\"foreColor\" | \"backColor\"`} - Whether this is text color or background color\n\nProperty: mode\n\nDefault: foreColor",
|
2979
|
+
"values": [
|
2980
|
+
{
|
2981
|
+
"name": "foreColor"
|
2982
|
+
},
|
2983
|
+
{
|
2984
|
+
"name": "backColor"
|
2985
|
+
}
|
2986
|
+
]
|
2979
2987
|
},
|
2980
2988
|
{
|
2981
2989
|
"name": "label",
|
@@ -2984,6 +2992,14 @@
|
|
2984
2992
|
{
|
2985
2993
|
"name": "value",
|
2986
2994
|
"description": "`value` {`string`} - \n\nProperty: value\n\nDefault: #000000"
|
2995
|
+
},
|
2996
|
+
{
|
2997
|
+
"name": "palette",
|
2998
|
+
"description": "`palette` {`string[]`} - Default palette, user can override via property or attribute\n\nProperty: palette\n\nDefault: #000000,#444444,#666666,#999999,#cccccc,#eeeeee,#ffffff,#d32f2f,#f44336,#ff9800,#ffeb3b,#4caf50,#2196f3,#3f51b5,#9c27b0,#03a9f4,#00bcd4,#009688,#8bc34a,#cddc39,#ffc107,#ff5722"
|
2999
|
+
},
|
3000
|
+
{
|
3001
|
+
"name": "onchange",
|
3002
|
+
"description": "`change` {`CustomEvent<{ mode: \"foreColor\" | \"backColor\"; value: string; }>`} - "
|
2987
3003
|
}
|
2988
3004
|
]
|
2989
3005
|
},
|
@@ -2991,6 +3007,20 @@
|
|
2991
3007
|
"name": "nile-rte-divider",
|
2992
3008
|
"attributes": []
|
2993
3009
|
},
|
3010
|
+
{
|
3011
|
+
"name": "nile-rte-link",
|
3012
|
+
"description": "Events:\n\n * `link-changed` {`CustomEvent<{ href: string; }>`} - \n\nAttributes:\n\n * `placeholder` {`string`} - \n\nProperties:\n\n * `editorEl` {`HTMLElement`} - \n\n * `placeholder` {`string`} - \n\n * `linkValue` {`string`} - \n\n * `selectionRange` {`Range | null`} - ",
|
3013
|
+
"attributes": [
|
3014
|
+
{
|
3015
|
+
"name": "placeholder",
|
3016
|
+
"description": "`placeholder` {`string`} - \n\nProperty: placeholder\n\nDefault: https://"
|
3017
|
+
},
|
3018
|
+
{
|
3019
|
+
"name": "onlink-changed",
|
3020
|
+
"description": "`link-changed` {`CustomEvent<{ href: string; }>`} - "
|
3021
|
+
}
|
3022
|
+
]
|
3023
|
+
},
|
2994
3024
|
{
|
2995
3025
|
"name": "nile-rte-mentions-item",
|
2996
3026
|
"description": "Attributes:\n\n * `mentionscharacter` {`string`} - Single-character trigger, e.g., '@' or '#'\n\n * `mentionscolor` {`string`} - \n\n * `mentionsprefix` {`string`} - \n\n * `mentionssuffix` {`string`} - \n\n * `mentionsdata` {`MentionItem[]`} - \n\nProperties:\n\n * `mentionsCharacter` {`string`} - Single-character trigger, e.g., '@' or '#'\n\n * `mentionsColor` {`string`} - \n\n * `mentionsPrefix` {`string`} - \n\n * `mentionsSuffix` {`string`} - \n\n * `mentionsData` {`MentionItem[]`} - ",
|