@aquera/nile-elements 2.0.23 → 2.0.24
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 +4 -0
- package/dist/index.js +53 -4
- package/dist/nile-side-bar-header/nile-side-bar-header.css.cjs.js +1 -1
- package/dist/nile-side-bar-header/nile-side-bar-header.css.cjs.js.map +1 -1
- package/dist/nile-side-bar-header/nile-side-bar-header.css.esm.js +2 -2
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.css.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.css.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.css.esm.js +49 -0
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.esm.js +1 -1
- package/dist/src/nile-side-bar-header/nile-side-bar-header.css.js +2 -2
- package/dist/src/nile-side-bar-header/nile-side-bar-header.css.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.js +49 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.js +1 -1
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.js.map +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/docs/screenshots/wysiwyg-focus-state-focused.png +0 -0
- package/docs/screenshots/wysiwyg-focus-state-unfocused.png +0 -0
- package/package.json +1 -1
- package/src/nile-side-bar-header/nile-side-bar-header.css.ts +2 -2
- package/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.ts +49 -0
- package/src/nile-wysiwyg-editor/nile-wysiwyg-editor.ts +1 -1
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -15,8 +15,8 @@ export const styles = css`
|
|
|
15
15
|
display: flex;
|
|
16
16
|
align-items: center;
|
|
17
17
|
justify-content: space-between;
|
|
18
|
-
padding-top: var(--nile-spacing-
|
|
19
|
-
padding-bottom: var(--nile-spacing-
|
|
18
|
+
padding-top: var(--nile-spacing-lg, var(--ng-spacing-lg));
|
|
19
|
+
padding-bottom: var(--nile-spacing-xl, var(--ng-spacing-xl));
|
|
20
20
|
padding-left: var(--nile-spacing-xl, var(--ng-spacing-xl));
|
|
21
21
|
padding-right: var(--nile-spacing-xl, var(--ng-spacing-xl));
|
|
22
22
|
top: 0;
|
|
@@ -61,6 +61,55 @@ export const styles = css`
|
|
|
61
61
|
box-sizing: border-box;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
/* --- Focused (active) state: only the writing area is highlighted, the
|
|
65
|
+
toolbar keeps the neutral frame (like CKEditor). The surface pulls itself
|
|
66
|
+
1px over the frame/toolbar divider with negative margins, so its border
|
|
67
|
+
replaces those lines instead of doubling them, with no layout shift. --- */
|
|
68
|
+
.nile-wysiwyg__surface {
|
|
69
|
+
border: 1px solid transparent;
|
|
70
|
+
margin: -1px;
|
|
71
|
+
position: relative;
|
|
72
|
+
/* A themed surface background must not paint over the frame's border. */
|
|
73
|
+
background-clip: padding-box;
|
|
74
|
+
transition: border-color 0.15s ease;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* The surface is the bottom of the frame unless the counter follows it
|
|
78
|
+
(the floating menus after it are absolutely positioned). */
|
|
79
|
+
.nile-wysiwyg__surface {
|
|
80
|
+
border-radius: 0 0 var(--nile-wysiwyg-radius, var(--nile-radius-radius-xl, 8px))
|
|
81
|
+
var(--nile-wysiwyg-radius, var(--nile-radius-radius-xl, 8px));
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.nile-wysiwyg__surface:first-child {
|
|
85
|
+
border-radius: var(--nile-wysiwyg-radius, var(--nile-radius-radius-xl, 8px));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.nile-wysiwyg__surface:has(+ .nile-wysiwyg__counter) {
|
|
89
|
+
border-bottom-left-radius: 0;
|
|
90
|
+
border-bottom-right-radius: 0;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.nile-wysiwyg__surface:first-child:has(+ .nile-wysiwyg__counter) {
|
|
94
|
+
border-radius: var(--nile-wysiwyg-radius, var(--nile-radius-radius-xl, 8px))
|
|
95
|
+
var(--nile-wysiwyg-radius, var(--nile-radius-radius-xl, 8px)) 0 0;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
:host(:not([disabled]):not([readonly]):not([fullscreen]))
|
|
99
|
+
.nile-wysiwyg--focused
|
|
100
|
+
.nile-wysiwyg__surface {
|
|
101
|
+
border-color: var(
|
|
102
|
+
--nile-wysiwyg-focus-border-color,
|
|
103
|
+
var(--nile-colors-primary-500, var(--ng-colors-border-brand))
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
@media (prefers-reduced-motion: reduce) {
|
|
108
|
+
.nile-wysiwyg__surface {
|
|
109
|
+
transition: none;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
64
113
|
/* --- Fullscreen (distraction-free) mode --- */
|
|
65
114
|
:host([fullscreen]) {
|
|
66
115
|
position: fixed;
|
|
@@ -2226,7 +2226,7 @@ export class NileWysiwygEditor extends NileElement {
|
|
|
2226
2226
|
(this.toolbar !== 'none' || hasAuthoredToolbar) && !this.readonly;
|
|
2227
2227
|
return html`
|
|
2228
2228
|
<div
|
|
2229
|
-
class="nile-wysiwyg ${this.showBlocks ? 'nile-wysiwyg--show-blocks' : ''}"
|
|
2229
|
+
class="nile-wysiwyg ${this.showBlocks ? 'nile-wysiwyg--show-blocks' : ''} ${this.hasFocus ? 'nile-wysiwyg--focused' : ''}"
|
|
2230
2230
|
part="base"
|
|
2231
2231
|
data-no-theme=${this.noThemeComponentsAttr() || nothing}
|
|
2232
2232
|
@wysiwyg-command=${this.handleCommand}
|