@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
|
@@ -13,8 +13,8 @@ export const styles = css `
|
|
|
13
13
|
display: flex;
|
|
14
14
|
align-items: center;
|
|
15
15
|
justify-content: space-between;
|
|
16
|
-
padding-top: var(--nile-spacing-
|
|
17
|
-
padding-bottom: var(--nile-spacing-
|
|
16
|
+
padding-top: var(--nile-spacing-lg, var(--ng-spacing-lg));
|
|
17
|
+
padding-bottom: var(--nile-spacing-xl, var(--ng-spacing-xl));
|
|
18
18
|
padding-left: var(--nile-spacing-xl, var(--ng-spacing-xl));
|
|
19
19
|
padding-right: var(--nile-spacing-xl, var(--ng-spacing-xl));
|
|
20
20
|
top: 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nile-side-bar-header.css.js","sourceRoot":"","sources":["../../../src/nile-side-bar-header/nile-side-bar-header.css.ts"],"names":[],"mappings":"AAAA;;;;;EAKE;AAEF,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyDxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n* Copyright Aquera Inc 2023\n*\n* This source code is licensed under the BSD-3-Clause license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\nimport {css} from 'lit';\n\n/**\n * SideBarHeader CSS\n */\nexport const styles = css`\n :host {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding-top: var(--nile-spacing-
|
|
1
|
+
{"version":3,"file":"nile-side-bar-header.css.js","sourceRoot":"","sources":["../../../src/nile-side-bar-header/nile-side-bar-header.css.ts"],"names":[],"mappings":"AAAA;;;;;EAKE;AAEF,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyDxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n* Copyright Aquera Inc 2023\n*\n* This source code is licensed under the BSD-3-Clause license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\nimport {css} from 'lit';\n\n/**\n * SideBarHeader CSS\n */\nexport const styles = css`\n :host {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding-top: var(--nile-spacing-lg, var(--ng-spacing-lg));\n padding-bottom: var(--nile-spacing-xl, var(--ng-spacing-xl));\n padding-left: var(--nile-spacing-xl, var(--ng-spacing-xl));\n padding-right: var(--nile-spacing-xl, var(--ng-spacing-xl));\n top: 0;\n background: var(--nile-colors-neutral-100, var(--ng-colors-bg-primary));\n}\n\n/* Opt-in: drop the surface color so the header sits on whatever is behind it. */\n:host([background='transparent']) {\n background: transparent;\n}\n\n.header-content {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n}\n\n\n:host([collapsed]) .header-content {\n flex-direction: column;\n justify-content: center;\n gap: var(--nile-spacing-lg, var(--ng-spacing-md));\n}\n\n\n\n \n \n::slotted([slot='logo']) {\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n font-weight: var(--nile-font-weight-bold, var(--ng-font-weight-bold));\n letter-spacing: -0.02em;\n color: var(--nile-colors-dark-900, var(--ng-colors-graylightmode-900));\n text-transform: none;\n}\n\n/* The workspace switcher fills the row rather than centering at its text width. */\n::slotted(nile-side-bar-header-switcher) {\n flex: 1 1 auto;\n align-self: stretch;\n min-width: 0;\n}\n\n::slotted([slot='actions']) {\n display: flex;\n align-items: center;\n gap: var(--nile-spacing-md);\n}\n\n`;\n\nexport default [styles];"]}
|
|
@@ -59,6 +59,55 @@ export const styles = css `
|
|
|
59
59
|
box-sizing: border-box;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
+
/* --- Focused (active) state: only the writing area is highlighted, the
|
|
63
|
+
toolbar keeps the neutral frame (like CKEditor). The surface pulls itself
|
|
64
|
+
1px over the frame/toolbar divider with negative margins, so its border
|
|
65
|
+
replaces those lines instead of doubling them, with no layout shift. --- */
|
|
66
|
+
.nile-wysiwyg__surface {
|
|
67
|
+
border: 1px solid transparent;
|
|
68
|
+
margin: -1px;
|
|
69
|
+
position: relative;
|
|
70
|
+
/* A themed surface background must not paint over the frame's border. */
|
|
71
|
+
background-clip: padding-box;
|
|
72
|
+
transition: border-color 0.15s ease;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* The surface is the bottom of the frame unless the counter follows it
|
|
76
|
+
(the floating menus after it are absolutely positioned). */
|
|
77
|
+
.nile-wysiwyg__surface {
|
|
78
|
+
border-radius: 0 0 var(--nile-wysiwyg-radius, var(--nile-radius-radius-xl, 8px))
|
|
79
|
+
var(--nile-wysiwyg-radius, var(--nile-radius-radius-xl, 8px));
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.nile-wysiwyg__surface:first-child {
|
|
83
|
+
border-radius: var(--nile-wysiwyg-radius, var(--nile-radius-radius-xl, 8px));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.nile-wysiwyg__surface:has(+ .nile-wysiwyg__counter) {
|
|
87
|
+
border-bottom-left-radius: 0;
|
|
88
|
+
border-bottom-right-radius: 0;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.nile-wysiwyg__surface:first-child:has(+ .nile-wysiwyg__counter) {
|
|
92
|
+
border-radius: var(--nile-wysiwyg-radius, var(--nile-radius-radius-xl, 8px))
|
|
93
|
+
var(--nile-wysiwyg-radius, var(--nile-radius-radius-xl, 8px)) 0 0;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
:host(:not([disabled]):not([readonly]):not([fullscreen]))
|
|
97
|
+
.nile-wysiwyg--focused
|
|
98
|
+
.nile-wysiwyg__surface {
|
|
99
|
+
border-color: var(
|
|
100
|
+
--nile-wysiwyg-focus-border-color,
|
|
101
|
+
var(--nile-colors-primary-500, var(--ng-colors-border-brand))
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@media (prefers-reduced-motion: reduce) {
|
|
106
|
+
.nile-wysiwyg__surface {
|
|
107
|
+
transition: none;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
62
111
|
/* --- Fullscreen (distraction-free) mode --- */
|
|
63
112
|
:host([fullscreen]) {
|
|
64
113
|
position: fixed;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nile-wysiwyg-editor.css.js","sourceRoot":"","sources":["../../../src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;qEACqE;AACrE,MAAM,gBAAgB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;CAyB3B,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAsFnB,gBAAgB;;;;;;;;;;;;;;MAchB,gBAAgB;;;;;;;;;;;;;;;;MAgBhB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmyBrB,CAAC","sourcesContent":["import { css } from 'lit';\n\n/** Semantic --ng-* tokens used inside the editing surface, re-pointed at their\n * light-theme primitives. Used by no-theme / no-theme-components. */\nconst lightThemeTokens = css`\n --ng-colors-bg-primary: var(--ng-color-base-white);\n --ng-colors-bg-secondary: var(--ng-color-graylightmode-50);\n --ng-colors-bg-tertiary: var(--ng-color-graylightmode-100);\n --ng-colors-bg-disabled-subtle: var(--ng-color-graylightmode-50);\n --ng-colors-text-primary-900: var(--ng-color-graylightmode-900);\n --ng-colors-text-tertiary-600: var(--ng-color-graylightmode-600);\n --ng-colors-text-quaternary-500: var(--ng-color-graylightmode-500);\n --ng-colors-text-disabled: var(--ng-color-graylightmode-400);\n --ng-colors-text-brand-tertiary-600: var(--ng-color-bluedark-600);\n --ng-colors-border-primary: var(--ng-color-graylightmode-300);\n --ng-colors-border-secondary: var(--ng-color-graylightmode-200);\n --ng-colors-border-neutral: var(--ng-color-graylightmode-400);\n --ng-colors-border-disabled: var(--ng-color-graylightmode-200);\n /* mention chips, code highlighting, tracked changes */\n --ng-componentcolors-utility-blue-50: var(--ng-color-blue-50);\n --ng-componentcolors-utility-blue-600: var(--ng-color-blue-600);\n --ng-componentcolors-utility-blue-700: var(--ng-color-blue-700);\n --ng-componentcolors-utility-error-600: var(--ng-color-error-600);\n --ng-componentcolors-utility-gray-500: var(--ng-color-graylightmode-500);\n --ng-componentcolors-utility-green-600: var(--ng-color-green-600);\n --ng-componentcolors-utility-indigo-600: var(--ng-color-indigo-600);\n --ng-componentcolors-utility-orange-600: var(--ng-color-orange-600);\n --ng-componentcolors-utility-purple-300: var(--ng-color-purple-300);\n --ng-componentcolors-utility-purple-600: var(--ng-color-purple-600);\n`;\n\nexport const styles = css`\n :host {\n display: block;\n font-family: var(\n --nile-wysiwyg-font-family,\n var(\n --nile-font-family-sans-serif,\n var(--ng-font-family-body, system-ui, -apple-system, sans-serif)\n )\n );\n }\n\n .nile-wysiwyg {\n position: relative;\n display: flex;\n flex-direction: column;\n border: 1px solid\n var(\n --nile-wysiwyg-border-color,\n var(--nile-colors-neutral-400, var(--ng-colors-border-primary))\n );\n border-radius: var(\n --nile-wysiwyg-radius,\n var(--nile-radius-radius-xl, var(--ng-radius-md, 8px))\n );\n background: var(\n --nile-wysiwyg-bg,\n var(--nile-colors-white-base, var(--ng-colors-bg-primary))\n );\n box-sizing: border-box;\n }\n\n /* --- Fullscreen (distraction-free) mode --- */\n :host([fullscreen]) {\n position: fixed;\n inset: 0;\n z-index: var(--nile-wysiwyg-fullscreen-z-index, 1000);\n background: var(\n --nile-wysiwyg-bg,\n var(--nile-colors-white-base, var(--ng-colors-bg-primary))\n );\n }\n\n :host([fullscreen]) .nile-wysiwyg {\n height: 100%;\n border: none;\n border-radius: 0;\n }\n\n :host([fullscreen]) .nile-wysiwyg__surface {\n max-height: none;\n }\n\n :host([disabled]) .nile-wysiwyg {\n border-color: var(--nile-colors-neutral-500, var(--ng-colors-border-disabled));\n background: var(\n --nile-wysiwyg-disabled-bg,\n var(--nile-colors-dark-200, var(--ng-colors-bg-disabled-subtle))\n );\n cursor: not-allowed;\n pointer-events: none;\n }\n\n :host([disabled]) .ProseMirror {\n background: var(--nile-colors-dark-200, var(--ng-colors-bg-disabled-subtle));\n color: var(--nile-colors-dark-500, var(--ng-colors-text-disabled));\n }\n\n .nile-wysiwyg__surface {\n flex: 1;\n overflow-y: auto;\n max-height: var(--nile-wysiwyg-max-height, none);\n }\n\n /* --- no-theme / no-theme-components: keep content on light colours ---\n * Dark themes remap the semantic --ng-* tokens at :root; the primitives they\n * point at do not change. Re-pointing the semantic tokens at their light\n * primitives (lightThemeTokens) on an element keeps it and everything inside\n * it light, while the rest of the editor keeps following the page theme.\n * no-theme -> the whole editing surface\n * no-theme-components=\"a,b\" -> only the listed content components\n * (all | mentions | merge-fields | links | math | code | blockquote |\n * table | task-list | images) */\n :host([no-theme]) .nile-wysiwyg__surface,\n .nile-wysiwyg[data-no-theme~='all'] .nile-wysiwyg__surface {\n color-scheme: light;\n ${lightThemeTokens}\n background: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n }\n\n /* Inline components and those that paint their own background: the light\n * tokens are enough. */\n .nile-wysiwyg[data-no-theme~='mentions'] .ProseMirror span.nile-wysiwyg__mention,\n .nile-wysiwyg[data-no-theme~='merge-fields'] .ProseMirror span.nile-wysiwyg__merge-field,\n .nile-wysiwyg[data-no-theme~='links'] .ProseMirror a,\n .nile-wysiwyg[data-no-theme~='math'] .ProseMirror span.nile-wysiwyg__math,\n .nile-wysiwyg[data-no-theme~='code'] .ProseMirror code.nile-wysiwyg__inline-code,\n .nile-wysiwyg[data-no-theme~='code'] .ProseMirror pre.nile-wysiwyg__code-block {\n color-scheme: light;\n ${lightThemeTokens}\n }\n\n /* Text inside these inherits the surface colour, so pin it too. */\n .nile-wysiwyg[data-no-theme~='code'] .ProseMirror code.nile-wysiwyg__inline-code,\n .nile-wysiwyg[data-no-theme~='code'] .ProseMirror pre.nile-wysiwyg__code-block,\n .nile-wysiwyg[data-no-theme~='math'] .ProseMirror span.nile-wysiwyg__math {\n color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n }\n\n /* Block components with no background of their own get the light surface. */\n .nile-wysiwyg[data-no-theme~='table'] .ProseMirror table,\n .nile-wysiwyg[data-no-theme~='blockquote'] .ProseMirror blockquote,\n .nile-wysiwyg[data-no-theme~='task-list'] .ProseMirror ul.nile-wysiwyg__task-list,\n .nile-wysiwyg[data-no-theme~='images'] .ProseMirror figure.nile-wysiwyg__figure {\n color-scheme: light;\n ${lightThemeTokens}\n background: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n }\n\n /* --- ProseMirror base rules (inlined from prosemirror-view/style) --- */\n .ProseMirror {\n position: relative;\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: 'liga' 0;\n outline: none;\n padding: var(--nile-wysiwyg-content-padding, 12px);\n min-height: var(--nile-wysiwyg-min-height, 160px);\n font-size: var(--nile-wysiwyg-font-size, inherit);\n line-height: var(--nile-wysiwyg-line-height, inherit);\n tab-size: 4;\n -moz-tab-size: 4;\n word-break: break-word;\n color: var(\n --nile-wysiwyg-color,\n var(--nile-colors-dark-900, var(--ng-colors-text-primary-900))\n );\n box-sizing: border-box;\n border-radius: 0 0 var(--nile-wysiwyg-radius, var(--nile-radius-radius-xl, 8px))\n var(--nile-wysiwyg-radius, var(--nile-radius-radius-xl, 8px));\n }\n\n .ProseMirror pre {\n white-space: pre-wrap;\n }\n\n .ProseMirror li {\n position: relative;\n }\n\n .ProseMirror-hideselection *::selection {\n background: transparent;\n }\n\n .ProseMirror-hideselection {\n caret-color: transparent;\n }\n\n .ProseMirror-selectednode {\n outline: 2px solid\n var(--nile-wysiwyg-focus-border-color, var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600)));\n }\n\n /* Gap cursor (inlined from prosemirror-gapcursor/style) */\n .ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n }\n\n .ProseMirror-gapcursor:after {\n content: '';\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid currentColor;\n animation: nile-wysiwyg-cursor-blink 1.1s steps(2, start) infinite;\n }\n\n @keyframes nile-wysiwyg-cursor-blink {\n to {\n visibility: hidden;\n }\n }\n\n .ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n }\n\n /* --- Placeholder (legacy: neutral-500 at 0.7 opacity) --- */\n .nile-wysiwyg__empty::before {\n content: attr(data-placeholder);\n float: left;\n height: 0;\n pointer-events: none;\n user-select: none;\n opacity: 0.7;\n color: var(\n --nile-wysiwyg-placeholder-color,\n var(--nile-colors-neutral-500, var(--ng-colors-text-secondary))\n );\n }\n\n /* --- Document content typography --- */\n .ProseMirror > :first-child {\n margin-top: 0;\n }\n\n .ProseMirror > :last-child {\n margin-bottom: 0;\n }\n\n /* Legacy nile-rich-text-editor typography */\n .ProseMirror p {\n margin: 1em 0;\n }\n\n .ProseMirror h1,\n .ProseMirror h2,\n .ProseMirror h3,\n .ProseMirror h4,\n .ProseMirror h5,\n .ProseMirror h6 {\n font-weight: bold;\n }\n\n .ProseMirror h1 {\n font-size: 2em;\n margin: 0.67em 0;\n }\n .ProseMirror h2 {\n font-size: 1.5em;\n margin: 0.83em 0;\n }\n .ProseMirror h3 {\n font-size: 1.17em;\n margin: 1em 0;\n }\n .ProseMirror h4 {\n font-size: 1em;\n margin: 1.33em 0;\n }\n .ProseMirror h5 {\n font-size: 0.83em;\n margin: 1.67em 0;\n }\n .ProseMirror h6 {\n font-size: 0.67em;\n margin: 2.33em 0;\n }\n\n .ProseMirror blockquote {\n margin: 0.5em 0;\n padding: 0.25em 0 0.25em 1em;\n border-left: 3px solid\n var(\n --nile-wysiwyg-blockquote-border,\n var(--nile-colors-neutral-300, var(--ng-colors-border-primary))\n );\n color: var(\n --nile-wysiwyg-blockquote-color,\n var(--nile-colors-neutral-600, var(--ng-colors-text-tertiary-600))\n );\n }\n\n .ProseMirror ul,\n .ProseMirror ol {\n list-style-position: outside;\n padding-inline-start: 24px;\n }\n\n .ProseMirror hr {\n border: none;\n border-top: 1px solid\n var(--nile-wysiwyg-border-color, var(--ng-colors-border-secondary));\n margin: 1em 0;\n }\n\n /* Legacy: brand color, no underline */\n .ProseMirror a {\n color: var(\n --nile-wysiwyg-link-color,\n var(--nile-colors-primary-600, var(--ng-colors-text-brand-tertiary-600))\n );\n text-decoration: none;\n cursor: pointer;\n }\n\n .ProseMirror code.nile-wysiwyg__inline-code {\n font-family: var(--nile-wysiwyg-code-font, ui-monospace, SFMono-Regular, Menlo, monospace);\n font-size: 0.9em;\n background: var(\n --nile-wysiwyg-code-bg,\n var(--nile-colors-neutral-100, var(--ng-colors-bg-tertiary))\n );\n border-radius: 4px;\n padding: 0.1em 0.35em;\n }\n\n /* --- Code blocks --- */\n .ProseMirror pre.nile-wysiwyg__code-block {\n font-family: var(--nile-wysiwyg-code-font, ui-monospace, SFMono-Regular, Menlo, monospace);\n font-size: 0.9em;\n background: var(\n --nile-wysiwyg-code-bg,\n var(--nile-colors-neutral-100, var(--ng-colors-bg-tertiary))\n );\n border: 1px solid var(--nile-colors-neutral-200, var(--ng-colors-border-secondary));\n border-radius: 6px;\n padding: 12px 14px;\n margin: 0.5em 0;\n overflow-x: auto;\n }\n\n /* --- Tables (rules required by prosemirror-tables) --- */\n .ProseMirror .tableWrapper {\n overflow-x: auto;\n margin: 0.5em 0;\n }\n\n .ProseMirror table {\n border-collapse: collapse;\n table-layout: fixed;\n width: 100%;\n overflow: hidden;\n }\n\n .ProseMirror td,\n .ProseMirror th {\n vertical-align: top;\n box-sizing: border-box;\n position: relative;\n border: 1px solid\n var(\n --nile-wysiwyg-table-border,\n var(--nile-colors-neutral-300, var(--ng-colors-border-primary))\n );\n padding: 6px 8px;\n min-width: 1em;\n }\n\n .ProseMirror th {\n background: var(\n --nile-wysiwyg-table-header-bg,\n var(--nile-colors-neutral-50, var(--ng-colors-bg-secondary))\n );\n font-weight: 600;\n text-align: left;\n }\n\n \n .ProseMirror td > *,\n .ProseMirror th > * {\n margin-top: 0;\n margin-bottom: 0;\n }\n\n .ProseMirror .column-resize-handle {\n position: absolute;\n right: -2px;\n top: 0;\n bottom: 0;\n width: 4px;\n z-index: 20;\n background-color: var(--nile-colors-primary-300, var(--ng-componentcolors-utility-purple-300));\n pointer-events: none;\n }\n\n .ProseMirror.resize-cursor {\n cursor: ew-resize;\n cursor: col-resize;\n }\n\n /* --- Email fidelity: an unsized layout table (e.g. a button) fits its\n content, as it does in mail clients, instead of the 100% default. --- */\n :host([email-fidelity]) .ProseMirror table[data-autowidth] {\n width: auto;\n }\n\n /* Column resizing sets an inline min-width of 100px per column; on a nested\n layout table (e.g. a row of social icons) that overflows the cell holding it. */\n :host([email-fidelity]) .ProseMirror table[data-layout-table] {\n min-width: 0 !important;\n }\n\n /* Email fidelity: the wrapper is editor-only (it holds the resize handles), so\n its margin would add space the saved email doesn't have. */\n :host([email-fidelity]) .ProseMirror .tableWrapper {\n margin: 0;\n }\n\n /* Email fidelity: draw unstyled layout-table cells like a mail client (no padding, centred, no header fill). */\n :host([email-fidelity]) .ProseMirror table[data-layout-table] > tbody > tr > td,\n :host([email-fidelity]) .ProseMirror table[data-layout-table] > tbody > tr > th {\n padding: 0;\n vertical-align: middle;\n }\n\n :host([email-fidelity]) .ProseMirror table[data-layout-table] > tbody > tr > th {\n background: none;\n }\n\n /* --- Layout tables (role=\"presentation\"): borderless output, dashed\n guides while editing so the structure stays visible. --- */\n .ProseMirror table[data-layout] td,\n .ProseMirror table[data-layout] th {\n /* Draw the editing guide with an inset outline, not a border/background, so\n author-set cell borders and backgrounds (email fidelity) are preserved. */\n outline: 1px dashed var(--nile-colors-neutral-300, var(--ng-colors-border-primary));\n outline-offset: -1px;\n font-weight: inherit;\n text-align: inherit;\n }\n\n /* --- Bookmarks: invisible anchors get a flag marker while editing --- */\n .ProseMirror a[data-bookmark] {\n display: inline-block;\n vertical-align: baseline;\n cursor: default;\n text-decoration: none;\n }\n\n .ProseMirror a[data-bookmark]::after {\n content: '⚑';\n font-size: 12px;\n line-height: 1;\n padding: 0 1px;\n color: var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600));\n }\n\n .ProseMirror .selectedCell:after {\n z-index: 2;\n position: absolute;\n content: '';\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n background: var(--nile-wysiwyg-cell-selection, rgba(127, 86, 217, 0.12));\n pointer-events: none;\n }\n\n /* --- Images (ProseMirror's standard inline image node) --- */\n .ProseMirror img {\n max-width: 100%;\n height: auto;\n border-radius: 4px;\n }\n\n /* --- Image resize handles --- */\n .ProseMirror .nile-wysiwyg__image-resizer {\n position: relative;\n display: inline-block;\n line-height: 0;\n max-width: 100%;\n }\n\n .ProseMirror .nile-wysiwyg__resize-handle {\n display: none;\n position: absolute;\n width: 9px;\n height: 9px;\n background: var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600));\n border: 1.5px solid var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n border-radius: 2px;\n z-index: 2;\n }\n\n .ProseMirror .nile-wysiwyg__image-resizer--selected .nile-wysiwyg__resize-handle {\n display: block;\n }\n\n .ProseMirror .nile-wysiwyg__image-resizer--selected img {\n outline: 2px solid var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600));\n }\n\n .ProseMirror .nile-wysiwyg__resize-handle--nw { top: -5px; left: -5px; cursor: nwse-resize; }\n .ProseMirror .nile-wysiwyg__resize-handle--ne { top: -5px; right: -5px; cursor: nesw-resize; }\n .ProseMirror .nile-wysiwyg__resize-handle--sw { bottom: -5px; left: -5px; cursor: nesw-resize; }\n .ProseMirror .nile-wysiwyg__resize-handle--se { bottom: -5px; right: -5px; cursor: nwse-resize; }\n\n /* --- Captioned figures --- */\n .ProseMirror figure.nile-wysiwyg__figure {\n margin: 0.75em 0;\n max-width: 100%;\n }\n\n .ProseMirror figure.nile-wysiwyg__figure[data-align='center'] {\n margin-left: auto;\n margin-right: auto;\n }\n\n .ProseMirror figure.nile-wysiwyg__figure[data-align='right'] {\n margin-left: auto;\n margin-right: 0;\n }\n\n .ProseMirror figure.nile-wysiwyg__figure img {\n width: 100%;\n display: block;\n }\n\n .ProseMirror figure.nile-wysiwyg__figure .nile-wysiwyg__image-resizer {\n display: block;\n }\n\n .ProseMirror .nile-wysiwyg__figcaption {\n font-size: 0.85em;\n color: var(--nile-colors-neutral-500, var(--ng-colors-text-tertiary-600));\n text-align: center;\n padding: 4px 8px;\n line-height: 1.4;\n }\n\n .ProseMirror figure.nile-wysiwyg__figure--empty-caption .nile-wysiwyg__figcaption::before {\n content: 'Add a caption…';\n float: left;\n width: 100%;\n pointer-events: none;\n color: var(--nile-colors-neutral-400, var(--ng-colors-text-quaternary-500));\n margin-bottom: -1.4em;\n }\n\n .ProseMirror figure.nile-wysiwyg__figure--selected {\n border-radius: 4px;\n }\n\n /* --- Embeds --- */\n .ProseMirror div.nile-wysiwyg__embed {\n position: relative;\n aspect-ratio: 16 / 9;\n /* Default size; an inline width from drag-resize overrides it, capped by\n max-width. overflow stays visible so the resize handles aren't clipped\n (rounding lives on the iframe). */\n width: min(640px, 100%);\n max-width: 100%;\n margin: 0.75em 0;\n border-radius: 8px;\n background: var(--nile-colors-neutral-100, var(--ng-colors-bg-tertiary));\n }\n\n .ProseMirror div.nile-wysiwyg__embed iframe {\n width: 100%;\n height: 100%;\n border: 0;\n display: block;\n border-radius: 8px;\n /* Editing mode: the first click selects the node instead of hitting the\n iframe; once selected (or in readonly) the video is interactive. */\n pointer-events: none;\n }\n\n .ProseMirror div.nile-wysiwyg__embed.ProseMirror-selectednode iframe,\n :host([readonly]) .ProseMirror div.nile-wysiwyg__embed iframe {\n pointer-events: auto;\n }\n\n .ProseMirror div.nile-wysiwyg__embed.ProseMirror-selectednode {\n outline: 2px solid var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600));\n }\n\n .ProseMirror div.nile-wysiwyg__embed.ProseMirror-selectednode .nile-wysiwyg__resize-handle {\n display: block;\n }\n\n /* A live resize drag must not lose mousemove to the embedded document. */\n .ProseMirror div.nile-wysiwyg__embed.nile-wysiwyg__resizing iframe {\n pointer-events: none !important;\n }\n\n /* --- Code highlighting (hljs tokens) ---\n Each hue routes through an --ng-componentcolors-utility-* token, which the\n token layer remaps to its lighter 400 step in the dark theme. Hardcoding the\n one-light palette here left syntax unreadable on the dark code surface. --- */\n .ProseMirror .hljs-comment,\n .ProseMirror .hljs-quote {\n color: var(--ng-componentcolors-utility-gray-500);\n font-style: italic;\n }\n\n .ProseMirror .hljs-keyword,\n .ProseMirror .hljs-selector-tag,\n .ProseMirror .hljs-formula,\n .ProseMirror .hljs-doctag {\n color: var(--ng-componentcolors-utility-purple-600);\n }\n\n .ProseMirror .hljs-section,\n .ProseMirror .hljs-name,\n .ProseMirror .hljs-selector-id,\n .ProseMirror .hljs-selector-class,\n .ProseMirror .hljs-deletion,\n .ProseMirror .hljs-subst,\n .ProseMirror .hljs-tag {\n color: var(--ng-componentcolors-utility-error-600);\n }\n\n .ProseMirror .hljs-literal,\n .ProseMirror .hljs-built_in,\n .ProseMirror .hljs-bullet {\n color: var(--ng-componentcolors-utility-blue-600);\n }\n\n .ProseMirror .hljs-string,\n .ProseMirror .hljs-regexp,\n .ProseMirror .hljs-addition,\n .ProseMirror .hljs-attribute,\n .ProseMirror .hljs-meta .hljs-string {\n color: var(--ng-componentcolors-utility-green-600);\n }\n\n .ProseMirror .hljs-attr,\n .ProseMirror .hljs-variable,\n .ProseMirror .hljs-template-variable,\n .ProseMirror .hljs-type,\n .ProseMirror .hljs-selector-attr,\n .ProseMirror .hljs-selector-pseudo,\n .ProseMirror .hljs-number {\n color: var(--ng-componentcolors-utility-orange-600);\n }\n\n .ProseMirror .hljs-symbol,\n .ProseMirror .hljs-meta,\n .ProseMirror .hljs-link,\n .ProseMirror .hljs-operator,\n .ProseMirror .hljs-title,\n .ProseMirror .hljs-title.class_,\n .ProseMirror .hljs-title.function_ {\n color: var(--ng-componentcolors-utility-indigo-600);\n }\n\n .ProseMirror .hljs-emphasis {\n font-style: italic;\n }\n\n .ProseMirror .hljs-strong {\n font-weight: bold;\n }\n\n /* --- Checklists --- */\n .ProseMirror ul.nile-wysiwyg__task-list {\n list-style: none;\n padding-inline-start: 4px;\n }\n\n .ProseMirror li.nile-wysiwyg__task-item {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n }\n\n .ProseMirror li.nile-wysiwyg__task-item > input[type='checkbox'] {\n /* Center on the first text line: (1 line box - checkbox height) / 2. */\n margin: calc((1em * 1.45 - 14px) / 2) 0 0;\n width: 14px;\n height: 14px;\n flex: none;\n cursor: pointer;\n accent-color: var(\n --nile-colors-primary-600,\n var(--ng-componentcolors-utility-blue-600)\n );\n }\n\n .ProseMirror li.nile-wysiwyg__task-item > .nile-wysiwyg__task-content {\n flex: 1;\n min-width: 0;\n }\n\n /* The content's paragraph margins (legacy 1em) push text below the\n checkbox — strip them at the edges of each item. */\n .ProseMirror li.nile-wysiwyg__task-item > .nile-wysiwyg__task-content > :first-child {\n margin-top: 0;\n }\n\n .ProseMirror li.nile-wysiwyg__task-item > .nile-wysiwyg__task-content > :last-child {\n margin-bottom: 0;\n }\n\n .ProseMirror ul.nile-wysiwyg__task-list > li + li {\n margin-top: 0.35em;\n }\n\n .ProseMirror li.nile-wysiwyg__task-item[data-checked='true'] > .nile-wysiwyg__task-content {\n color: var(--nile-colors-neutral-500, var(--ng-colors-text-quaternary-500));\n text-decoration: line-through;\n }\n\n /* --- Counter footer --- */\n .nile-wysiwyg__counter {\n padding: 4px 12px 6px;\n text-align: right;\n font-size: 12px;\n color: var(--nile-colors-neutral-500, var(--ng-colors-text-secondary));\n border-top: 1px solid var(--nile-colors-neutral-200, var(--ng-colors-border-secondary));\n }\n\n .nile-wysiwyg__counter.over {\n color: var(--nile-colors-error-600, var(--ng-componentcolors-utility-error-600));\n font-weight: 600;\n }\n\n /* --- Author <style> block (from HTML source) ---\n Applied live by StyleBlockView (a hidden <style> host, scoped to the\n content); the block renders nothing in the editor. */\n .nile-wysiwyg__style-block {\n display: none;\n }\n\n /* --- Sticky toolbar ---\n Pins to the top of the scroll container. Note: sticky anchors to the\n container's PADDING box, so if the scroll container has top padding, a\n band of content shows above the toolbar — set --nile-wysiwyg-sticky-top\n (or remove the container's top padding) to compensate. The opaque\n background makes the pinned bar self-backing so content can never bleed\n through it. */\n :host([sticky-toolbar]) nile-wysiwyg-toolbar {\n position: sticky;\n top: var(--nile-wysiwyg-sticky-top, 0);\n z-index: 12;\n background: var(\n --nile-wysiwyg-bg,\n var(--nile-colors-white-base, var(--ng-colors-bg-primary))\n );\n }\n\n /* --- Mentions & suggestions --- */\n .ProseMirror span.nile-wysiwyg__mention {\n display: inline-block;\n padding: 0 4px;\n border-radius: 4px;\n background: var(--nile-wysiwyg-mention-bg, var(--nile-colors-primary-50, var(--ng-componentcolors-utility-blue-50)));\n color: var(--nile-wysiwyg-mention-color, var(--nile-colors-primary-700, var(--ng-componentcolors-utility-blue-700)));\n font-weight: 500;\n /* Short mentions stay on one line; a long one (e.g. a deep field path) wraps\n inside its container instead of overflowing a table cell or the editor. */\n max-width: 100%;\n overflow-wrap: anywhere;\n }\n\n /* The chip's 500 is only a default — bold, headings and an explicit\n font-weight from the content win, so the chip looks the way it exports. */\n .ProseMirror :is(strong, b, h1, h2, h3, h4, h5, h6, th, [style*='font-weight'])\n span.nile-wysiwyg__mention {\n font-weight: inherit;\n }\n\n .ProseMirror span.nile-wysiwyg__mention.ProseMirror-selectednode {\n outline: 2px solid var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600));\n }\n\n /* --- Merge fields --- */\n .ProseMirror span.nile-wysiwyg__merge-field {\n display: inline-block;\n padding: 0 4px;\n border-radius: 4px;\n background: var(\n --nile-wysiwyg-merge-bg,\n var(--nile-colors-neutral-100, var(--ng-colors-bg-tertiary))\n );\n color: var(\n --nile-wysiwyg-merge-color,\n var(--nile-colors-neutral-700, var(--ng-colors-text-primary-900))\n );\n border: 1px dashed var(--nile-colors-neutral-400, var(--ng-colors-border-primary));\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n font-size: 0.9em;\n white-space: nowrap;\n }\n\n .ProseMirror span.nile-wysiwyg__merge-field.ProseMirror-selectednode {\n outline: 2px solid var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600));\n }\n\n /* --- Math --- */\n .ProseMirror span.nile-wysiwyg__math {\n display: inline-block;\n padding: 0 2px;\n font-family: \"Cambria Math\", \"Latin Modern Math\", serif;\n }\n\n .ProseMirror span.nile-wysiwyg__math--block {\n display: block;\n text-align: center;\n margin: 8px 0;\n }\n\n .ProseMirror span.nile-wysiwyg__math.ProseMirror-selectednode {\n outline: 2px solid var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600));\n border-radius: 3px;\n }\n\n /* Format painter armed: hint the next selection will be painted. */\n .ProseMirror.nile-wysiwyg--painting {\n cursor: cell;\n }\n\n .ProseMirror .nile-wysiwyg__suggestion {\n background: var(--nile-colors-primary-50, var(--ng-componentcolors-utility-blue-50));\n border-radius: 3px;\n }\n\n /* --- Find & replace highlights --- */\n .ProseMirror .nile-wysiwyg__find-match {\n background: var(--nile-wysiwyg-find-bg, rgba(255, 214, 102, 0.45));\n border-radius: 2px;\n }\n\n .ProseMirror .nile-wysiwyg__find-active {\n background: var(--nile-wysiwyg-find-active-bg, rgba(255, 170, 0, 0.65));\n }\n\n /* --- Upload placeholder --- */\n .nile-wysiwyg__upload-placeholder {\n display: inline-block;\n padding: 6px 12px;\n border: 1px dashed var(--nile-colors-neutral-400, var(--ng-colors-border-primary));\n border-radius: 6px;\n background: var(--nile-colors-neutral-50, var(--ng-colors-bg-secondary));\n color: var(--nile-colors-neutral-600, var(--ng-colors-text-tertiary-600));\n font-size: 0.85em;\n }\n\n /* --- Multi-level (legal) ordered lists: 1 / 1.1 / 1.1.1 numbering.\n Serialized output carries data-list-style=\"multilevel\"; consumers\n rendering it outside the editor need these same counter rules. --- */\n .ProseMirror ol[data-list-style='multilevel'],\n .ProseMirror ol[data-list-style='multilevel'] ol {\n list-style: none;\n counter-reset: nile-multilevel;\n }\n\n .ProseMirror ol[data-list-style='multilevel'] > li,\n .ProseMirror ol[data-list-style='multilevel'] ol > li {\n counter-increment: nile-multilevel;\n }\n\n /* The number sits inside the item's first paragraph so it shares a line. */\n .ProseMirror ol[data-list-style='multilevel'] > li > p:first-child::before,\n .ProseMirror ol[data-list-style='multilevel'] ol > li > p:first-child::before {\n content: counters(nile-multilevel, '.') '. ';\n font-variant-numeric: tabular-nums;\n }\n\n /* --- Show blocks: dashed outlines + tag labels while editing --- */\n .nile-wysiwyg--show-blocks .ProseMirror p,\n .nile-wysiwyg--show-blocks .ProseMirror h1,\n .nile-wysiwyg--show-blocks .ProseMirror h2,\n .nile-wysiwyg--show-blocks .ProseMirror h3,\n .nile-wysiwyg--show-blocks .ProseMirror h4,\n .nile-wysiwyg--show-blocks .ProseMirror h5,\n .nile-wysiwyg--show-blocks .ProseMirror h6,\n .nile-wysiwyg--show-blocks .ProseMirror blockquote,\n .nile-wysiwyg--show-blocks .ProseMirror pre,\n .nile-wysiwyg--show-blocks .ProseMirror figure,\n .nile-wysiwyg--show-blocks .ProseMirror ul,\n .nile-wysiwyg--show-blocks .ProseMirror ol,\n .nile-wysiwyg--show-blocks .ProseMirror li,\n .nile-wysiwyg--show-blocks .ProseMirror table {\n outline: 1px dashed\n var(\n --nile-wysiwyg-block-outline,\n var(--nile-colors-neutral-400, var(--ng-colors-border-primary))\n );\n outline-offset: -1px;\n }\n\n .nile-wysiwyg--show-blocks .ProseMirror p,\n .nile-wysiwyg--show-blocks .ProseMirror h1,\n .nile-wysiwyg--show-blocks .ProseMirror h2,\n .nile-wysiwyg--show-blocks .ProseMirror h3,\n .nile-wysiwyg--show-blocks .ProseMirror h4,\n .nile-wysiwyg--show-blocks .ProseMirror h5,\n .nile-wysiwyg--show-blocks .ProseMirror h6,\n .nile-wysiwyg--show-blocks .ProseMirror blockquote,\n .nile-wysiwyg--show-blocks .ProseMirror pre {\n position: relative;\n }\n\n .nile-wysiwyg--show-blocks .ProseMirror p::after,\n .nile-wysiwyg--show-blocks .ProseMirror h1::after,\n .nile-wysiwyg--show-blocks .ProseMirror h2::after,\n .nile-wysiwyg--show-blocks .ProseMirror h3::after,\n .nile-wysiwyg--show-blocks .ProseMirror h4::after,\n .nile-wysiwyg--show-blocks .ProseMirror h5::after,\n .nile-wysiwyg--show-blocks .ProseMirror h6::after,\n .nile-wysiwyg--show-blocks .ProseMirror blockquote::after,\n .nile-wysiwyg--show-blocks .ProseMirror pre::after {\n position: absolute;\n top: 0;\n left: 0;\n padding: 0 3px;\n font-family: system-ui, sans-serif;\n font-size: 9px;\n font-weight: 600;\n font-style: normal;\n line-height: 14px;\n letter-spacing: 0.5px;\n color: var(--nile-colors-neutral-500, var(--ng-colors-text-tertiary-600));\n background: var(--nile-colors-neutral-100, var(--ng-colors-bg-tertiary));\n border-radius: 0 0 4px 0;\n pointer-events: none;\n }\n\n .nile-wysiwyg--show-blocks .ProseMirror p::after { content: 'P'; }\n .nile-wysiwyg--show-blocks .ProseMirror h1::after { content: 'H1'; }\n .nile-wysiwyg--show-blocks .ProseMirror h2::after { content: 'H2'; }\n .nile-wysiwyg--show-blocks .ProseMirror h3::after { content: 'H3'; }\n .nile-wysiwyg--show-blocks .ProseMirror h4::after { content: 'H4'; }\n .nile-wysiwyg--show-blocks .ProseMirror h5::after { content: 'H5'; }\n .nile-wysiwyg--show-blocks .ProseMirror h6::after { content: 'H6'; }\n .nile-wysiwyg--show-blocks .ProseMirror blockquote::after { content: 'QUOTE'; }\n .nile-wysiwyg--show-blocks .ProseMirror pre::after { content: 'PRE'; }\n`;\n"]}
|
|
1
|
+
{"version":3,"file":"nile-wysiwyg-editor.css.js","sourceRoot":"","sources":["../../../src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;qEACqE;AACrE,MAAM,gBAAgB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;CAyB3B,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAuInB,gBAAgB;;;;;;;;;;;;;;MAchB,gBAAgB;;;;;;;;;;;;;;;;MAgBhB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmyBrB,CAAC","sourcesContent":["import { css } from 'lit';\n\n/** Semantic --ng-* tokens used inside the editing surface, re-pointed at their\n * light-theme primitives. Used by no-theme / no-theme-components. */\nconst lightThemeTokens = css`\n --ng-colors-bg-primary: var(--ng-color-base-white);\n --ng-colors-bg-secondary: var(--ng-color-graylightmode-50);\n --ng-colors-bg-tertiary: var(--ng-color-graylightmode-100);\n --ng-colors-bg-disabled-subtle: var(--ng-color-graylightmode-50);\n --ng-colors-text-primary-900: var(--ng-color-graylightmode-900);\n --ng-colors-text-tertiary-600: var(--ng-color-graylightmode-600);\n --ng-colors-text-quaternary-500: var(--ng-color-graylightmode-500);\n --ng-colors-text-disabled: var(--ng-color-graylightmode-400);\n --ng-colors-text-brand-tertiary-600: var(--ng-color-bluedark-600);\n --ng-colors-border-primary: var(--ng-color-graylightmode-300);\n --ng-colors-border-secondary: var(--ng-color-graylightmode-200);\n --ng-colors-border-neutral: var(--ng-color-graylightmode-400);\n --ng-colors-border-disabled: var(--ng-color-graylightmode-200);\n /* mention chips, code highlighting, tracked changes */\n --ng-componentcolors-utility-blue-50: var(--ng-color-blue-50);\n --ng-componentcolors-utility-blue-600: var(--ng-color-blue-600);\n --ng-componentcolors-utility-blue-700: var(--ng-color-blue-700);\n --ng-componentcolors-utility-error-600: var(--ng-color-error-600);\n --ng-componentcolors-utility-gray-500: var(--ng-color-graylightmode-500);\n --ng-componentcolors-utility-green-600: var(--ng-color-green-600);\n --ng-componentcolors-utility-indigo-600: var(--ng-color-indigo-600);\n --ng-componentcolors-utility-orange-600: var(--ng-color-orange-600);\n --ng-componentcolors-utility-purple-300: var(--ng-color-purple-300);\n --ng-componentcolors-utility-purple-600: var(--ng-color-purple-600);\n`;\n\nexport const styles = css`\n :host {\n display: block;\n font-family: var(\n --nile-wysiwyg-font-family,\n var(\n --nile-font-family-sans-serif,\n var(--ng-font-family-body, system-ui, -apple-system, sans-serif)\n )\n );\n }\n\n .nile-wysiwyg {\n position: relative;\n display: flex;\n flex-direction: column;\n border: 1px solid\n var(\n --nile-wysiwyg-border-color,\n var(--nile-colors-neutral-400, var(--ng-colors-border-primary))\n );\n border-radius: var(\n --nile-wysiwyg-radius,\n var(--nile-radius-radius-xl, var(--ng-radius-md, 8px))\n );\n background: var(\n --nile-wysiwyg-bg,\n var(--nile-colors-white-base, var(--ng-colors-bg-primary))\n );\n box-sizing: border-box;\n }\n\n /* --- Focused (active) state: only the writing area is highlighted, the\n toolbar keeps the neutral frame (like CKEditor). The surface pulls itself\n 1px over the frame/toolbar divider with negative margins, so its border\n replaces those lines instead of doubling them, with no layout shift. --- */\n .nile-wysiwyg__surface {\n border: 1px solid transparent;\n margin: -1px;\n position: relative;\n /* A themed surface background must not paint over the frame's border. */\n background-clip: padding-box;\n transition: border-color 0.15s ease;\n }\n\n /* The surface is the bottom of the frame unless the counter follows it\n (the floating menus after it are absolutely positioned). */\n .nile-wysiwyg__surface {\n border-radius: 0 0 var(--nile-wysiwyg-radius, var(--nile-radius-radius-xl, 8px))\n var(--nile-wysiwyg-radius, var(--nile-radius-radius-xl, 8px));\n }\n\n .nile-wysiwyg__surface:first-child {\n border-radius: var(--nile-wysiwyg-radius, var(--nile-radius-radius-xl, 8px));\n }\n\n .nile-wysiwyg__surface:has(+ .nile-wysiwyg__counter) {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n }\n\n .nile-wysiwyg__surface:first-child:has(+ .nile-wysiwyg__counter) {\n border-radius: var(--nile-wysiwyg-radius, var(--nile-radius-radius-xl, 8px))\n var(--nile-wysiwyg-radius, var(--nile-radius-radius-xl, 8px)) 0 0;\n }\n\n :host(:not([disabled]):not([readonly]):not([fullscreen]))\n .nile-wysiwyg--focused\n .nile-wysiwyg__surface {\n border-color: var(\n --nile-wysiwyg-focus-border-color,\n var(--nile-colors-primary-500, var(--ng-colors-border-brand))\n );\n }\n\n @media (prefers-reduced-motion: reduce) {\n .nile-wysiwyg__surface {\n transition: none;\n }\n }\n\n /* --- Fullscreen (distraction-free) mode --- */\n :host([fullscreen]) {\n position: fixed;\n inset: 0;\n z-index: var(--nile-wysiwyg-fullscreen-z-index, 1000);\n background: var(\n --nile-wysiwyg-bg,\n var(--nile-colors-white-base, var(--ng-colors-bg-primary))\n );\n }\n\n :host([fullscreen]) .nile-wysiwyg {\n height: 100%;\n border: none;\n border-radius: 0;\n }\n\n :host([fullscreen]) .nile-wysiwyg__surface {\n max-height: none;\n }\n\n :host([disabled]) .nile-wysiwyg {\n border-color: var(--nile-colors-neutral-500, var(--ng-colors-border-disabled));\n background: var(\n --nile-wysiwyg-disabled-bg,\n var(--nile-colors-dark-200, var(--ng-colors-bg-disabled-subtle))\n );\n cursor: not-allowed;\n pointer-events: none;\n }\n\n :host([disabled]) .ProseMirror {\n background: var(--nile-colors-dark-200, var(--ng-colors-bg-disabled-subtle));\n color: var(--nile-colors-dark-500, var(--ng-colors-text-disabled));\n }\n\n .nile-wysiwyg__surface {\n flex: 1;\n overflow-y: auto;\n max-height: var(--nile-wysiwyg-max-height, none);\n }\n\n /* --- no-theme / no-theme-components: keep content on light colours ---\n * Dark themes remap the semantic --ng-* tokens at :root; the primitives they\n * point at do not change. Re-pointing the semantic tokens at their light\n * primitives (lightThemeTokens) on an element keeps it and everything inside\n * it light, while the rest of the editor keeps following the page theme.\n * no-theme -> the whole editing surface\n * no-theme-components=\"a,b\" -> only the listed content components\n * (all | mentions | merge-fields | links | math | code | blockquote |\n * table | task-list | images) */\n :host([no-theme]) .nile-wysiwyg__surface,\n .nile-wysiwyg[data-no-theme~='all'] .nile-wysiwyg__surface {\n color-scheme: light;\n ${lightThemeTokens}\n background: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n }\n\n /* Inline components and those that paint their own background: the light\n * tokens are enough. */\n .nile-wysiwyg[data-no-theme~='mentions'] .ProseMirror span.nile-wysiwyg__mention,\n .nile-wysiwyg[data-no-theme~='merge-fields'] .ProseMirror span.nile-wysiwyg__merge-field,\n .nile-wysiwyg[data-no-theme~='links'] .ProseMirror a,\n .nile-wysiwyg[data-no-theme~='math'] .ProseMirror span.nile-wysiwyg__math,\n .nile-wysiwyg[data-no-theme~='code'] .ProseMirror code.nile-wysiwyg__inline-code,\n .nile-wysiwyg[data-no-theme~='code'] .ProseMirror pre.nile-wysiwyg__code-block {\n color-scheme: light;\n ${lightThemeTokens}\n }\n\n /* Text inside these inherits the surface colour, so pin it too. */\n .nile-wysiwyg[data-no-theme~='code'] .ProseMirror code.nile-wysiwyg__inline-code,\n .nile-wysiwyg[data-no-theme~='code'] .ProseMirror pre.nile-wysiwyg__code-block,\n .nile-wysiwyg[data-no-theme~='math'] .ProseMirror span.nile-wysiwyg__math {\n color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n }\n\n /* Block components with no background of their own get the light surface. */\n .nile-wysiwyg[data-no-theme~='table'] .ProseMirror table,\n .nile-wysiwyg[data-no-theme~='blockquote'] .ProseMirror blockquote,\n .nile-wysiwyg[data-no-theme~='task-list'] .ProseMirror ul.nile-wysiwyg__task-list,\n .nile-wysiwyg[data-no-theme~='images'] .ProseMirror figure.nile-wysiwyg__figure {\n color-scheme: light;\n ${lightThemeTokens}\n background: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n }\n\n /* --- ProseMirror base rules (inlined from prosemirror-view/style) --- */\n .ProseMirror {\n position: relative;\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: 'liga' 0;\n outline: none;\n padding: var(--nile-wysiwyg-content-padding, 12px);\n min-height: var(--nile-wysiwyg-min-height, 160px);\n font-size: var(--nile-wysiwyg-font-size, inherit);\n line-height: var(--nile-wysiwyg-line-height, inherit);\n tab-size: 4;\n -moz-tab-size: 4;\n word-break: break-word;\n color: var(\n --nile-wysiwyg-color,\n var(--nile-colors-dark-900, var(--ng-colors-text-primary-900))\n );\n box-sizing: border-box;\n border-radius: 0 0 var(--nile-wysiwyg-radius, var(--nile-radius-radius-xl, 8px))\n var(--nile-wysiwyg-radius, var(--nile-radius-radius-xl, 8px));\n }\n\n .ProseMirror pre {\n white-space: pre-wrap;\n }\n\n .ProseMirror li {\n position: relative;\n }\n\n .ProseMirror-hideselection *::selection {\n background: transparent;\n }\n\n .ProseMirror-hideselection {\n caret-color: transparent;\n }\n\n .ProseMirror-selectednode {\n outline: 2px solid\n var(--nile-wysiwyg-focus-border-color, var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600)));\n }\n\n /* Gap cursor (inlined from prosemirror-gapcursor/style) */\n .ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n }\n\n .ProseMirror-gapcursor:after {\n content: '';\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid currentColor;\n animation: nile-wysiwyg-cursor-blink 1.1s steps(2, start) infinite;\n }\n\n @keyframes nile-wysiwyg-cursor-blink {\n to {\n visibility: hidden;\n }\n }\n\n .ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n }\n\n /* --- Placeholder (legacy: neutral-500 at 0.7 opacity) --- */\n .nile-wysiwyg__empty::before {\n content: attr(data-placeholder);\n float: left;\n height: 0;\n pointer-events: none;\n user-select: none;\n opacity: 0.7;\n color: var(\n --nile-wysiwyg-placeholder-color,\n var(--nile-colors-neutral-500, var(--ng-colors-text-secondary))\n );\n }\n\n /* --- Document content typography --- */\n .ProseMirror > :first-child {\n margin-top: 0;\n }\n\n .ProseMirror > :last-child {\n margin-bottom: 0;\n }\n\n /* Legacy nile-rich-text-editor typography */\n .ProseMirror p {\n margin: 1em 0;\n }\n\n .ProseMirror h1,\n .ProseMirror h2,\n .ProseMirror h3,\n .ProseMirror h4,\n .ProseMirror h5,\n .ProseMirror h6 {\n font-weight: bold;\n }\n\n .ProseMirror h1 {\n font-size: 2em;\n margin: 0.67em 0;\n }\n .ProseMirror h2 {\n font-size: 1.5em;\n margin: 0.83em 0;\n }\n .ProseMirror h3 {\n font-size: 1.17em;\n margin: 1em 0;\n }\n .ProseMirror h4 {\n font-size: 1em;\n margin: 1.33em 0;\n }\n .ProseMirror h5 {\n font-size: 0.83em;\n margin: 1.67em 0;\n }\n .ProseMirror h6 {\n font-size: 0.67em;\n margin: 2.33em 0;\n }\n\n .ProseMirror blockquote {\n margin: 0.5em 0;\n padding: 0.25em 0 0.25em 1em;\n border-left: 3px solid\n var(\n --nile-wysiwyg-blockquote-border,\n var(--nile-colors-neutral-300, var(--ng-colors-border-primary))\n );\n color: var(\n --nile-wysiwyg-blockquote-color,\n var(--nile-colors-neutral-600, var(--ng-colors-text-tertiary-600))\n );\n }\n\n .ProseMirror ul,\n .ProseMirror ol {\n list-style-position: outside;\n padding-inline-start: 24px;\n }\n\n .ProseMirror hr {\n border: none;\n border-top: 1px solid\n var(--nile-wysiwyg-border-color, var(--ng-colors-border-secondary));\n margin: 1em 0;\n }\n\n /* Legacy: brand color, no underline */\n .ProseMirror a {\n color: var(\n --nile-wysiwyg-link-color,\n var(--nile-colors-primary-600, var(--ng-colors-text-brand-tertiary-600))\n );\n text-decoration: none;\n cursor: pointer;\n }\n\n .ProseMirror code.nile-wysiwyg__inline-code {\n font-family: var(--nile-wysiwyg-code-font, ui-monospace, SFMono-Regular, Menlo, monospace);\n font-size: 0.9em;\n background: var(\n --nile-wysiwyg-code-bg,\n var(--nile-colors-neutral-100, var(--ng-colors-bg-tertiary))\n );\n border-radius: 4px;\n padding: 0.1em 0.35em;\n }\n\n /* --- Code blocks --- */\n .ProseMirror pre.nile-wysiwyg__code-block {\n font-family: var(--nile-wysiwyg-code-font, ui-monospace, SFMono-Regular, Menlo, monospace);\n font-size: 0.9em;\n background: var(\n --nile-wysiwyg-code-bg,\n var(--nile-colors-neutral-100, var(--ng-colors-bg-tertiary))\n );\n border: 1px solid var(--nile-colors-neutral-200, var(--ng-colors-border-secondary));\n border-radius: 6px;\n padding: 12px 14px;\n margin: 0.5em 0;\n overflow-x: auto;\n }\n\n /* --- Tables (rules required by prosemirror-tables) --- */\n .ProseMirror .tableWrapper {\n overflow-x: auto;\n margin: 0.5em 0;\n }\n\n .ProseMirror table {\n border-collapse: collapse;\n table-layout: fixed;\n width: 100%;\n overflow: hidden;\n }\n\n .ProseMirror td,\n .ProseMirror th {\n vertical-align: top;\n box-sizing: border-box;\n position: relative;\n border: 1px solid\n var(\n --nile-wysiwyg-table-border,\n var(--nile-colors-neutral-300, var(--ng-colors-border-primary))\n );\n padding: 6px 8px;\n min-width: 1em;\n }\n\n .ProseMirror th {\n background: var(\n --nile-wysiwyg-table-header-bg,\n var(--nile-colors-neutral-50, var(--ng-colors-bg-secondary))\n );\n font-weight: 600;\n text-align: left;\n }\n\n \n .ProseMirror td > *,\n .ProseMirror th > * {\n margin-top: 0;\n margin-bottom: 0;\n }\n\n .ProseMirror .column-resize-handle {\n position: absolute;\n right: -2px;\n top: 0;\n bottom: 0;\n width: 4px;\n z-index: 20;\n background-color: var(--nile-colors-primary-300, var(--ng-componentcolors-utility-purple-300));\n pointer-events: none;\n }\n\n .ProseMirror.resize-cursor {\n cursor: ew-resize;\n cursor: col-resize;\n }\n\n /* --- Email fidelity: an unsized layout table (e.g. a button) fits its\n content, as it does in mail clients, instead of the 100% default. --- */\n :host([email-fidelity]) .ProseMirror table[data-autowidth] {\n width: auto;\n }\n\n /* Column resizing sets an inline min-width of 100px per column; on a nested\n layout table (e.g. a row of social icons) that overflows the cell holding it. */\n :host([email-fidelity]) .ProseMirror table[data-layout-table] {\n min-width: 0 !important;\n }\n\n /* Email fidelity: the wrapper is editor-only (it holds the resize handles), so\n its margin would add space the saved email doesn't have. */\n :host([email-fidelity]) .ProseMirror .tableWrapper {\n margin: 0;\n }\n\n /* Email fidelity: draw unstyled layout-table cells like a mail client (no padding, centred, no header fill). */\n :host([email-fidelity]) .ProseMirror table[data-layout-table] > tbody > tr > td,\n :host([email-fidelity]) .ProseMirror table[data-layout-table] > tbody > tr > th {\n padding: 0;\n vertical-align: middle;\n }\n\n :host([email-fidelity]) .ProseMirror table[data-layout-table] > tbody > tr > th {\n background: none;\n }\n\n /* --- Layout tables (role=\"presentation\"): borderless output, dashed\n guides while editing so the structure stays visible. --- */\n .ProseMirror table[data-layout] td,\n .ProseMirror table[data-layout] th {\n /* Draw the editing guide with an inset outline, not a border/background, so\n author-set cell borders and backgrounds (email fidelity) are preserved. */\n outline: 1px dashed var(--nile-colors-neutral-300, var(--ng-colors-border-primary));\n outline-offset: -1px;\n font-weight: inherit;\n text-align: inherit;\n }\n\n /* --- Bookmarks: invisible anchors get a flag marker while editing --- */\n .ProseMirror a[data-bookmark] {\n display: inline-block;\n vertical-align: baseline;\n cursor: default;\n text-decoration: none;\n }\n\n .ProseMirror a[data-bookmark]::after {\n content: '⚑';\n font-size: 12px;\n line-height: 1;\n padding: 0 1px;\n color: var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600));\n }\n\n .ProseMirror .selectedCell:after {\n z-index: 2;\n position: absolute;\n content: '';\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n background: var(--nile-wysiwyg-cell-selection, rgba(127, 86, 217, 0.12));\n pointer-events: none;\n }\n\n /* --- Images (ProseMirror's standard inline image node) --- */\n .ProseMirror img {\n max-width: 100%;\n height: auto;\n border-radius: 4px;\n }\n\n /* --- Image resize handles --- */\n .ProseMirror .nile-wysiwyg__image-resizer {\n position: relative;\n display: inline-block;\n line-height: 0;\n max-width: 100%;\n }\n\n .ProseMirror .nile-wysiwyg__resize-handle {\n display: none;\n position: absolute;\n width: 9px;\n height: 9px;\n background: var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600));\n border: 1.5px solid var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n border-radius: 2px;\n z-index: 2;\n }\n\n .ProseMirror .nile-wysiwyg__image-resizer--selected .nile-wysiwyg__resize-handle {\n display: block;\n }\n\n .ProseMirror .nile-wysiwyg__image-resizer--selected img {\n outline: 2px solid var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600));\n }\n\n .ProseMirror .nile-wysiwyg__resize-handle--nw { top: -5px; left: -5px; cursor: nwse-resize; }\n .ProseMirror .nile-wysiwyg__resize-handle--ne { top: -5px; right: -5px; cursor: nesw-resize; }\n .ProseMirror .nile-wysiwyg__resize-handle--sw { bottom: -5px; left: -5px; cursor: nesw-resize; }\n .ProseMirror .nile-wysiwyg__resize-handle--se { bottom: -5px; right: -5px; cursor: nwse-resize; }\n\n /* --- Captioned figures --- */\n .ProseMirror figure.nile-wysiwyg__figure {\n margin: 0.75em 0;\n max-width: 100%;\n }\n\n .ProseMirror figure.nile-wysiwyg__figure[data-align='center'] {\n margin-left: auto;\n margin-right: auto;\n }\n\n .ProseMirror figure.nile-wysiwyg__figure[data-align='right'] {\n margin-left: auto;\n margin-right: 0;\n }\n\n .ProseMirror figure.nile-wysiwyg__figure img {\n width: 100%;\n display: block;\n }\n\n .ProseMirror figure.nile-wysiwyg__figure .nile-wysiwyg__image-resizer {\n display: block;\n }\n\n .ProseMirror .nile-wysiwyg__figcaption {\n font-size: 0.85em;\n color: var(--nile-colors-neutral-500, var(--ng-colors-text-tertiary-600));\n text-align: center;\n padding: 4px 8px;\n line-height: 1.4;\n }\n\n .ProseMirror figure.nile-wysiwyg__figure--empty-caption .nile-wysiwyg__figcaption::before {\n content: 'Add a caption…';\n float: left;\n width: 100%;\n pointer-events: none;\n color: var(--nile-colors-neutral-400, var(--ng-colors-text-quaternary-500));\n margin-bottom: -1.4em;\n }\n\n .ProseMirror figure.nile-wysiwyg__figure--selected {\n border-radius: 4px;\n }\n\n /* --- Embeds --- */\n .ProseMirror div.nile-wysiwyg__embed {\n position: relative;\n aspect-ratio: 16 / 9;\n /* Default size; an inline width from drag-resize overrides it, capped by\n max-width. overflow stays visible so the resize handles aren't clipped\n (rounding lives on the iframe). */\n width: min(640px, 100%);\n max-width: 100%;\n margin: 0.75em 0;\n border-radius: 8px;\n background: var(--nile-colors-neutral-100, var(--ng-colors-bg-tertiary));\n }\n\n .ProseMirror div.nile-wysiwyg__embed iframe {\n width: 100%;\n height: 100%;\n border: 0;\n display: block;\n border-radius: 8px;\n /* Editing mode: the first click selects the node instead of hitting the\n iframe; once selected (or in readonly) the video is interactive. */\n pointer-events: none;\n }\n\n .ProseMirror div.nile-wysiwyg__embed.ProseMirror-selectednode iframe,\n :host([readonly]) .ProseMirror div.nile-wysiwyg__embed iframe {\n pointer-events: auto;\n }\n\n .ProseMirror div.nile-wysiwyg__embed.ProseMirror-selectednode {\n outline: 2px solid var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600));\n }\n\n .ProseMirror div.nile-wysiwyg__embed.ProseMirror-selectednode .nile-wysiwyg__resize-handle {\n display: block;\n }\n\n /* A live resize drag must not lose mousemove to the embedded document. */\n .ProseMirror div.nile-wysiwyg__embed.nile-wysiwyg__resizing iframe {\n pointer-events: none !important;\n }\n\n /* --- Code highlighting (hljs tokens) ---\n Each hue routes through an --ng-componentcolors-utility-* token, which the\n token layer remaps to its lighter 400 step in the dark theme. Hardcoding the\n one-light palette here left syntax unreadable on the dark code surface. --- */\n .ProseMirror .hljs-comment,\n .ProseMirror .hljs-quote {\n color: var(--ng-componentcolors-utility-gray-500);\n font-style: italic;\n }\n\n .ProseMirror .hljs-keyword,\n .ProseMirror .hljs-selector-tag,\n .ProseMirror .hljs-formula,\n .ProseMirror .hljs-doctag {\n color: var(--ng-componentcolors-utility-purple-600);\n }\n\n .ProseMirror .hljs-section,\n .ProseMirror .hljs-name,\n .ProseMirror .hljs-selector-id,\n .ProseMirror .hljs-selector-class,\n .ProseMirror .hljs-deletion,\n .ProseMirror .hljs-subst,\n .ProseMirror .hljs-tag {\n color: var(--ng-componentcolors-utility-error-600);\n }\n\n .ProseMirror .hljs-literal,\n .ProseMirror .hljs-built_in,\n .ProseMirror .hljs-bullet {\n color: var(--ng-componentcolors-utility-blue-600);\n }\n\n .ProseMirror .hljs-string,\n .ProseMirror .hljs-regexp,\n .ProseMirror .hljs-addition,\n .ProseMirror .hljs-attribute,\n .ProseMirror .hljs-meta .hljs-string {\n color: var(--ng-componentcolors-utility-green-600);\n }\n\n .ProseMirror .hljs-attr,\n .ProseMirror .hljs-variable,\n .ProseMirror .hljs-template-variable,\n .ProseMirror .hljs-type,\n .ProseMirror .hljs-selector-attr,\n .ProseMirror .hljs-selector-pseudo,\n .ProseMirror .hljs-number {\n color: var(--ng-componentcolors-utility-orange-600);\n }\n\n .ProseMirror .hljs-symbol,\n .ProseMirror .hljs-meta,\n .ProseMirror .hljs-link,\n .ProseMirror .hljs-operator,\n .ProseMirror .hljs-title,\n .ProseMirror .hljs-title.class_,\n .ProseMirror .hljs-title.function_ {\n color: var(--ng-componentcolors-utility-indigo-600);\n }\n\n .ProseMirror .hljs-emphasis {\n font-style: italic;\n }\n\n .ProseMirror .hljs-strong {\n font-weight: bold;\n }\n\n /* --- Checklists --- */\n .ProseMirror ul.nile-wysiwyg__task-list {\n list-style: none;\n padding-inline-start: 4px;\n }\n\n .ProseMirror li.nile-wysiwyg__task-item {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n }\n\n .ProseMirror li.nile-wysiwyg__task-item > input[type='checkbox'] {\n /* Center on the first text line: (1 line box - checkbox height) / 2. */\n margin: calc((1em * 1.45 - 14px) / 2) 0 0;\n width: 14px;\n height: 14px;\n flex: none;\n cursor: pointer;\n accent-color: var(\n --nile-colors-primary-600,\n var(--ng-componentcolors-utility-blue-600)\n );\n }\n\n .ProseMirror li.nile-wysiwyg__task-item > .nile-wysiwyg__task-content {\n flex: 1;\n min-width: 0;\n }\n\n /* The content's paragraph margins (legacy 1em) push text below the\n checkbox — strip them at the edges of each item. */\n .ProseMirror li.nile-wysiwyg__task-item > .nile-wysiwyg__task-content > :first-child {\n margin-top: 0;\n }\n\n .ProseMirror li.nile-wysiwyg__task-item > .nile-wysiwyg__task-content > :last-child {\n margin-bottom: 0;\n }\n\n .ProseMirror ul.nile-wysiwyg__task-list > li + li {\n margin-top: 0.35em;\n }\n\n .ProseMirror li.nile-wysiwyg__task-item[data-checked='true'] > .nile-wysiwyg__task-content {\n color: var(--nile-colors-neutral-500, var(--ng-colors-text-quaternary-500));\n text-decoration: line-through;\n }\n\n /* --- Counter footer --- */\n .nile-wysiwyg__counter {\n padding: 4px 12px 6px;\n text-align: right;\n font-size: 12px;\n color: var(--nile-colors-neutral-500, var(--ng-colors-text-secondary));\n border-top: 1px solid var(--nile-colors-neutral-200, var(--ng-colors-border-secondary));\n }\n\n .nile-wysiwyg__counter.over {\n color: var(--nile-colors-error-600, var(--ng-componentcolors-utility-error-600));\n font-weight: 600;\n }\n\n /* --- Author <style> block (from HTML source) ---\n Applied live by StyleBlockView (a hidden <style> host, scoped to the\n content); the block renders nothing in the editor. */\n .nile-wysiwyg__style-block {\n display: none;\n }\n\n /* --- Sticky toolbar ---\n Pins to the top of the scroll container. Note: sticky anchors to the\n container's PADDING box, so if the scroll container has top padding, a\n band of content shows above the toolbar — set --nile-wysiwyg-sticky-top\n (or remove the container's top padding) to compensate. The opaque\n background makes the pinned bar self-backing so content can never bleed\n through it. */\n :host([sticky-toolbar]) nile-wysiwyg-toolbar {\n position: sticky;\n top: var(--nile-wysiwyg-sticky-top, 0);\n z-index: 12;\n background: var(\n --nile-wysiwyg-bg,\n var(--nile-colors-white-base, var(--ng-colors-bg-primary))\n );\n }\n\n /* --- Mentions & suggestions --- */\n .ProseMirror span.nile-wysiwyg__mention {\n display: inline-block;\n padding: 0 4px;\n border-radius: 4px;\n background: var(--nile-wysiwyg-mention-bg, var(--nile-colors-primary-50, var(--ng-componentcolors-utility-blue-50)));\n color: var(--nile-wysiwyg-mention-color, var(--nile-colors-primary-700, var(--ng-componentcolors-utility-blue-700)));\n font-weight: 500;\n /* Short mentions stay on one line; a long one (e.g. a deep field path) wraps\n inside its container instead of overflowing a table cell or the editor. */\n max-width: 100%;\n overflow-wrap: anywhere;\n }\n\n /* The chip's 500 is only a default — bold, headings and an explicit\n font-weight from the content win, so the chip looks the way it exports. */\n .ProseMirror :is(strong, b, h1, h2, h3, h4, h5, h6, th, [style*='font-weight'])\n span.nile-wysiwyg__mention {\n font-weight: inherit;\n }\n\n .ProseMirror span.nile-wysiwyg__mention.ProseMirror-selectednode {\n outline: 2px solid var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600));\n }\n\n /* --- Merge fields --- */\n .ProseMirror span.nile-wysiwyg__merge-field {\n display: inline-block;\n padding: 0 4px;\n border-radius: 4px;\n background: var(\n --nile-wysiwyg-merge-bg,\n var(--nile-colors-neutral-100, var(--ng-colors-bg-tertiary))\n );\n color: var(\n --nile-wysiwyg-merge-color,\n var(--nile-colors-neutral-700, var(--ng-colors-text-primary-900))\n );\n border: 1px dashed var(--nile-colors-neutral-400, var(--ng-colors-border-primary));\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n font-size: 0.9em;\n white-space: nowrap;\n }\n\n .ProseMirror span.nile-wysiwyg__merge-field.ProseMirror-selectednode {\n outline: 2px solid var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600));\n }\n\n /* --- Math --- */\n .ProseMirror span.nile-wysiwyg__math {\n display: inline-block;\n padding: 0 2px;\n font-family: \"Cambria Math\", \"Latin Modern Math\", serif;\n }\n\n .ProseMirror span.nile-wysiwyg__math--block {\n display: block;\n text-align: center;\n margin: 8px 0;\n }\n\n .ProseMirror span.nile-wysiwyg__math.ProseMirror-selectednode {\n outline: 2px solid var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600));\n border-radius: 3px;\n }\n\n /* Format painter armed: hint the next selection will be painted. */\n .ProseMirror.nile-wysiwyg--painting {\n cursor: cell;\n }\n\n .ProseMirror .nile-wysiwyg__suggestion {\n background: var(--nile-colors-primary-50, var(--ng-componentcolors-utility-blue-50));\n border-radius: 3px;\n }\n\n /* --- Find & replace highlights --- */\n .ProseMirror .nile-wysiwyg__find-match {\n background: var(--nile-wysiwyg-find-bg, rgba(255, 214, 102, 0.45));\n border-radius: 2px;\n }\n\n .ProseMirror .nile-wysiwyg__find-active {\n background: var(--nile-wysiwyg-find-active-bg, rgba(255, 170, 0, 0.65));\n }\n\n /* --- Upload placeholder --- */\n .nile-wysiwyg__upload-placeholder {\n display: inline-block;\n padding: 6px 12px;\n border: 1px dashed var(--nile-colors-neutral-400, var(--ng-colors-border-primary));\n border-radius: 6px;\n background: var(--nile-colors-neutral-50, var(--ng-colors-bg-secondary));\n color: var(--nile-colors-neutral-600, var(--ng-colors-text-tertiary-600));\n font-size: 0.85em;\n }\n\n /* --- Multi-level (legal) ordered lists: 1 / 1.1 / 1.1.1 numbering.\n Serialized output carries data-list-style=\"multilevel\"; consumers\n rendering it outside the editor need these same counter rules. --- */\n .ProseMirror ol[data-list-style='multilevel'],\n .ProseMirror ol[data-list-style='multilevel'] ol {\n list-style: none;\n counter-reset: nile-multilevel;\n }\n\n .ProseMirror ol[data-list-style='multilevel'] > li,\n .ProseMirror ol[data-list-style='multilevel'] ol > li {\n counter-increment: nile-multilevel;\n }\n\n /* The number sits inside the item's first paragraph so it shares a line. */\n .ProseMirror ol[data-list-style='multilevel'] > li > p:first-child::before,\n .ProseMirror ol[data-list-style='multilevel'] ol > li > p:first-child::before {\n content: counters(nile-multilevel, '.') '. ';\n font-variant-numeric: tabular-nums;\n }\n\n /* --- Show blocks: dashed outlines + tag labels while editing --- */\n .nile-wysiwyg--show-blocks .ProseMirror p,\n .nile-wysiwyg--show-blocks .ProseMirror h1,\n .nile-wysiwyg--show-blocks .ProseMirror h2,\n .nile-wysiwyg--show-blocks .ProseMirror h3,\n .nile-wysiwyg--show-blocks .ProseMirror h4,\n .nile-wysiwyg--show-blocks .ProseMirror h5,\n .nile-wysiwyg--show-blocks .ProseMirror h6,\n .nile-wysiwyg--show-blocks .ProseMirror blockquote,\n .nile-wysiwyg--show-blocks .ProseMirror pre,\n .nile-wysiwyg--show-blocks .ProseMirror figure,\n .nile-wysiwyg--show-blocks .ProseMirror ul,\n .nile-wysiwyg--show-blocks .ProseMirror ol,\n .nile-wysiwyg--show-blocks .ProseMirror li,\n .nile-wysiwyg--show-blocks .ProseMirror table {\n outline: 1px dashed\n var(\n --nile-wysiwyg-block-outline,\n var(--nile-colors-neutral-400, var(--ng-colors-border-primary))\n );\n outline-offset: -1px;\n }\n\n .nile-wysiwyg--show-blocks .ProseMirror p,\n .nile-wysiwyg--show-blocks .ProseMirror h1,\n .nile-wysiwyg--show-blocks .ProseMirror h2,\n .nile-wysiwyg--show-blocks .ProseMirror h3,\n .nile-wysiwyg--show-blocks .ProseMirror h4,\n .nile-wysiwyg--show-blocks .ProseMirror h5,\n .nile-wysiwyg--show-blocks .ProseMirror h6,\n .nile-wysiwyg--show-blocks .ProseMirror blockquote,\n .nile-wysiwyg--show-blocks .ProseMirror pre {\n position: relative;\n }\n\n .nile-wysiwyg--show-blocks .ProseMirror p::after,\n .nile-wysiwyg--show-blocks .ProseMirror h1::after,\n .nile-wysiwyg--show-blocks .ProseMirror h2::after,\n .nile-wysiwyg--show-blocks .ProseMirror h3::after,\n .nile-wysiwyg--show-blocks .ProseMirror h4::after,\n .nile-wysiwyg--show-blocks .ProseMirror h5::after,\n .nile-wysiwyg--show-blocks .ProseMirror h6::after,\n .nile-wysiwyg--show-blocks .ProseMirror blockquote::after,\n .nile-wysiwyg--show-blocks .ProseMirror pre::after {\n position: absolute;\n top: 0;\n left: 0;\n padding: 0 3px;\n font-family: system-ui, sans-serif;\n font-size: 9px;\n font-weight: 600;\n font-style: normal;\n line-height: 14px;\n letter-spacing: 0.5px;\n color: var(--nile-colors-neutral-500, var(--ng-colors-text-tertiary-600));\n background: var(--nile-colors-neutral-100, var(--ng-colors-bg-tertiary));\n border-radius: 0 0 4px 0;\n pointer-events: none;\n }\n\n .nile-wysiwyg--show-blocks .ProseMirror p::after { content: 'P'; }\n .nile-wysiwyg--show-blocks .ProseMirror h1::after { content: 'H1'; }\n .nile-wysiwyg--show-blocks .ProseMirror h2::after { content: 'H2'; }\n .nile-wysiwyg--show-blocks .ProseMirror h3::after { content: 'H3'; }\n .nile-wysiwyg--show-blocks .ProseMirror h4::after { content: 'H4'; }\n .nile-wysiwyg--show-blocks .ProseMirror h5::after { content: 'H5'; }\n .nile-wysiwyg--show-blocks .ProseMirror h6::after { content: 'H6'; }\n .nile-wysiwyg--show-blocks .ProseMirror blockquote::after { content: 'QUOTE'; }\n .nile-wysiwyg--show-blocks .ProseMirror pre::after { content: 'PRE'; }\n`;\n"]}
|
|
@@ -1812,7 +1812,7 @@ let NileWysiwygEditor = class NileWysiwygEditor extends NileElement {
|
|
|
1812
1812
|
const showToolbar = (this.toolbar !== 'none' || hasAuthoredToolbar) && !this.readonly;
|
|
1813
1813
|
return html `
|
|
1814
1814
|
<div
|
|
1815
|
-
class="nile-wysiwyg ${this.showBlocks ? 'nile-wysiwyg--show-blocks' : ''}"
|
|
1815
|
+
class="nile-wysiwyg ${this.showBlocks ? 'nile-wysiwyg--show-blocks' : ''} ${this.hasFocus ? 'nile-wysiwyg--focused' : ''}"
|
|
1816
1816
|
part="base"
|
|
1817
1817
|
data-no-theme=${this.noThemeComponentsAttr() || nothing}
|
|
1818
1818
|
@wysiwyg-command=${this.handleCommand}
|