@aquera/nile-elements 2.0.21 → 2.0.22

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.
Files changed (46) hide show
  1. package/README.md +4 -0
  2. package/dist/index.js +120 -47
  3. package/dist/nile-empty-state/nile-empty-state.cjs.js +1 -1
  4. package/dist/nile-empty-state/nile-empty-state.cjs.js.map +1 -1
  5. package/dist/nile-empty-state/nile-empty-state.esm.js +4 -4
  6. package/dist/nile-wysiwyg-editor/index.cjs.js +1 -1
  7. package/dist/nile-wysiwyg-editor/index.esm.js +1 -1
  8. package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.cjs.js +1 -1
  9. package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.cjs.js.map +1 -1
  10. package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.css.cjs.js +1 -1
  11. package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.css.cjs.js.map +1 -1
  12. package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.css.esm.js +73 -1
  13. package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.esm.js +3 -2
  14. package/dist/nile-wysiwyg-editor/types.cjs.js +1 -1
  15. package/dist/nile-wysiwyg-editor/types.cjs.js.map +1 -1
  16. package/dist/nile-wysiwyg-editor/types.esm.js +1 -1
  17. package/dist/src/nile-empty-state/nile-empty-state.d.ts +5 -0
  18. package/dist/src/nile-empty-state/nile-empty-state.js +11 -2
  19. package/dist/src/nile-empty-state/nile-empty-state.js.map +1 -1
  20. package/dist/src/nile-empty-state/nile-empty-state.test.js +31 -0
  21. package/dist/src/nile-empty-state/nile-empty-state.test.js.map +1 -1
  22. package/dist/src/nile-wysiwyg-editor/index.d.ts +2 -1
  23. package/dist/src/nile-wysiwyg-editor/index.js +1 -1
  24. package/dist/src/nile-wysiwyg-editor/index.js.map +1 -1
  25. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.js +75 -0
  26. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.js.map +1 -1
  27. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.d.ts +20 -0
  28. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.js +37 -1
  29. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.js.map +1 -1
  30. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.test.js +108 -0
  31. package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.test.js.map +1 -1
  32. package/dist/src/nile-wysiwyg-editor/types.d.ts +8 -0
  33. package/dist/src/nile-wysiwyg-editor/types.js +50 -0
  34. package/dist/src/nile-wysiwyg-editor/types.js.map +1 -1
  35. package/dist/src/version.js +1 -1
  36. package/dist/src/version.js.map +1 -1
  37. package/dist/tsconfig.tsbuildinfo +1 -1
  38. package/package.json +1 -1
  39. package/src/nile-empty-state/nile-empty-state.test.ts +24 -0
  40. package/src/nile-empty-state/nile-empty-state.ts +12 -2
  41. package/src/nile-wysiwyg-editor/index.ts +2 -1
  42. package/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.ts +76 -0
  43. package/src/nile-wysiwyg-editor/nile-wysiwyg-editor.test.ts +132 -0
  44. package/src/nile-wysiwyg-editor/nile-wysiwyg-editor.ts +40 -1
  45. package/src/nile-wysiwyg-editor/types.ts +52 -0
  46. package/vscode-html-custom-data.json +23 -2
@@ -1,4 +1,32 @@
1
1
  import { css } from 'lit';
2
+ /** Semantic --ng-* tokens used inside the editing surface, re-pointed at their
3
+ * light-theme primitives. Used by no-theme / no-theme-components. */
4
+ const lightThemeTokens = css `
5
+ --ng-colors-bg-primary: var(--ng-color-base-white);
6
+ --ng-colors-bg-secondary: var(--ng-color-graylightmode-50);
7
+ --ng-colors-bg-tertiary: var(--ng-color-graylightmode-100);
8
+ --ng-colors-bg-disabled-subtle: var(--ng-color-graylightmode-50);
9
+ --ng-colors-text-primary-900: var(--ng-color-graylightmode-900);
10
+ --ng-colors-text-tertiary-600: var(--ng-color-graylightmode-600);
11
+ --ng-colors-text-quaternary-500: var(--ng-color-graylightmode-500);
12
+ --ng-colors-text-disabled: var(--ng-color-graylightmode-400);
13
+ --ng-colors-text-brand-tertiary-600: var(--ng-color-bluedark-600);
14
+ --ng-colors-border-primary: var(--ng-color-graylightmode-300);
15
+ --ng-colors-border-secondary: var(--ng-color-graylightmode-200);
16
+ --ng-colors-border-neutral: var(--ng-color-graylightmode-400);
17
+ --ng-colors-border-disabled: var(--ng-color-graylightmode-200);
18
+ /* mention chips, code highlighting, tracked changes */
19
+ --ng-componentcolors-utility-blue-50: var(--ng-color-blue-50);
20
+ --ng-componentcolors-utility-blue-600: var(--ng-color-blue-600);
21
+ --ng-componentcolors-utility-blue-700: var(--ng-color-blue-700);
22
+ --ng-componentcolors-utility-error-600: var(--ng-color-error-600);
23
+ --ng-componentcolors-utility-gray-500: var(--ng-color-graylightmode-500);
24
+ --ng-componentcolors-utility-green-600: var(--ng-color-green-600);
25
+ --ng-componentcolors-utility-indigo-600: var(--ng-color-indigo-600);
26
+ --ng-componentcolors-utility-orange-600: var(--ng-color-orange-600);
27
+ --ng-componentcolors-utility-purple-300: var(--ng-color-purple-300);
28
+ --ng-componentcolors-utility-purple-600: var(--ng-color-purple-600);
29
+ `;
2
30
  export const styles = css `
3
31
  :host {
4
32
  display: block;
@@ -73,6 +101,53 @@ export const styles = css `
73
101
  max-height: var(--nile-wysiwyg-max-height, none);
74
102
  }
75
103
 
104
+ /* --- no-theme / no-theme-components: keep content on light colours ---
105
+ * Dark themes remap the semantic --ng-* tokens at :root; the primitives they
106
+ * point at do not change. Re-pointing the semantic tokens at their light
107
+ * primitives (lightThemeTokens) on an element keeps it and everything inside
108
+ * it light, while the rest of the editor keeps following the page theme.
109
+ * no-theme -> the whole editing surface
110
+ * no-theme-components="a,b" -> only the listed content components
111
+ * (all | mentions | merge-fields | links | math | code | blockquote |
112
+ * table | task-list | images) */
113
+ :host([no-theme]) .nile-wysiwyg__surface,
114
+ .nile-wysiwyg[data-no-theme~='all'] .nile-wysiwyg__surface {
115
+ color-scheme: light;
116
+ ${lightThemeTokens}
117
+ background: var(--nile-colors-white-base, var(--ng-colors-bg-primary));
118
+ color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));
119
+ }
120
+
121
+ /* Inline components and those that paint their own background: the light
122
+ * tokens are enough. */
123
+ .nile-wysiwyg[data-no-theme~='mentions'] .ProseMirror span.nile-wysiwyg__mention,
124
+ .nile-wysiwyg[data-no-theme~='merge-fields'] .ProseMirror span.nile-wysiwyg__merge-field,
125
+ .nile-wysiwyg[data-no-theme~='links'] .ProseMirror a,
126
+ .nile-wysiwyg[data-no-theme~='math'] .ProseMirror span.nile-wysiwyg__math,
127
+ .nile-wysiwyg[data-no-theme~='code'] .ProseMirror code.nile-wysiwyg__inline-code,
128
+ .nile-wysiwyg[data-no-theme~='code'] .ProseMirror pre.nile-wysiwyg__code-block {
129
+ color-scheme: light;
130
+ ${lightThemeTokens}
131
+ }
132
+
133
+ /* Text inside these inherits the surface colour, so pin it too. */
134
+ .nile-wysiwyg[data-no-theme~='code'] .ProseMirror code.nile-wysiwyg__inline-code,
135
+ .nile-wysiwyg[data-no-theme~='code'] .ProseMirror pre.nile-wysiwyg__code-block,
136
+ .nile-wysiwyg[data-no-theme~='math'] .ProseMirror span.nile-wysiwyg__math {
137
+ color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));
138
+ }
139
+
140
+ /* Block components with no background of their own get the light surface. */
141
+ .nile-wysiwyg[data-no-theme~='table'] .ProseMirror table,
142
+ .nile-wysiwyg[data-no-theme~='blockquote'] .ProseMirror blockquote,
143
+ .nile-wysiwyg[data-no-theme~='task-list'] .ProseMirror ul.nile-wysiwyg__task-list,
144
+ .nile-wysiwyg[data-no-theme~='images'] .ProseMirror figure.nile-wysiwyg__figure {
145
+ color-scheme: light;
146
+ ${lightThemeTokens}
147
+ background: var(--nile-colors-white-base, var(--ng-colors-bg-primary));
148
+ color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));
149
+ }
150
+
76
151
  /* --- ProseMirror base rules (inlined from prosemirror-view/style) --- */
77
152
  .ProseMirror {
78
153
  position: relative;
@@ -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,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAw2BxB,CAAC","sourcesContent":["import { css } from 'lit';\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-neutral))\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 /* --- 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-neutral));\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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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-neutral))\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-neutral));\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"]}
@@ -4,6 +4,7 @@ import NileElement from '../internal/nile-element';
4
4
  import type { CommandAttrs } from './engine/commands';
5
5
  import type { MathRenderer } from './engine/plugins/math-view';
6
6
  import type { MentionsConfig, SnippetConfig, MergeFieldConfig, TemplateConfig } from './types';
7
+ import type { NoThemeComponent } from './types';
7
8
  import './nile-wysiwyg-toolbar/nile-wysiwyg-toolbar';
8
9
  import './nile-wysiwyg-toolbar/nile-wysiwyg-toolbar-item';
9
10
  import './ui/link-editor';
@@ -150,6 +151,21 @@ export declare class NileWysiwygEditor extends NileElement {
150
151
  fullscreen: boolean;
151
152
  /** Outlines block boundaries (paragraphs, headings, lists…) while editing. */
152
153
  showBlocks: boolean;
154
+ /**
155
+ * Keeps the editing surface on light-theme colours whatever the page theme
156
+ * (e.g. nxtgen dark), so authored content looks the way it will be sent.
157
+ * The toolbar still follows the theme.
158
+ */
159
+ noTheme: boolean;
160
+ /**
161
+ * Like `noTheme`, but only for the listed content components, which stay on
162
+ * light-theme colours while the rest of the surface follows the page theme.
163
+ * Values: `all`, `mentions`, `merge-fields`, `links`, `math`, `code`,
164
+ * `blockquote`, `table`, `task-list`, `images`. Unknown names are ignored.
165
+ * Set as an array (`['mentions', 'table']`), or as an attribute holding a
166
+ * comma/space-separated list (`"mentions, table"`) or a JSON array.
167
+ */
168
+ noThemeComponents: NoThemeComponent[];
153
169
  private toolbarState?;
154
170
  private hasFocus;
155
171
  private sourceMode;
@@ -414,6 +430,10 @@ export declare class NileWysiwygEditor extends NileElement {
414
430
  * whether elsewhere in the editor (e.g. the content area) or off the widget.
415
431
  */
416
432
  private onOutsidePointerDown;
433
+ /** Space-separated, validated list for the base element's data-no-theme,
434
+ * which the stylesheet matches with [data-no-theme~='name']. Accepts a
435
+ * string too, for callers that set the property from plain JS. */
436
+ private noThemeComponentsAttr;
417
437
  render(): TemplateResult;
418
438
  }
419
439
  export default NileWysiwygEditor;
@@ -7,7 +7,7 @@ import NileElement from '../internal/nile-element';
7
7
  import { styles } from './nile-wysiwyg-editor.css';
8
8
  import { defaultSchema, createEditorState, computeToolbarState, htmlToDoc, htmlToSlice, docToHtml, docToText, docToMarkdown, markdownToHtml, docToJson, jsonToDoc, isDocEmpty, sanitizeHtml, relocateEmailContainers, getCommand, getMarkRange, flattenToSingleParagraph, imageUploadKey, findUploadPos, countWords, TaskItemView, ImageView, FigureView, EmbedView, StyleBlockView, MathView, isOfficeHtml, cleanOfficeHtml, toInlineStyledHtml, buildWordDocument, buildPrintDocument, isFormatPainterArmed, armFormatPainter, disarmFormatPainter, applyFormatPainter, getFindState, searchTr, findStepTr, clearFindTr, replaceActiveTr, replaceAllTr, normalizeEmailAllowedStyles, parseAllowedStylesAttr, } from './engine';
9
9
  import { selectedImageInfo } from './engine/commands';
10
- import { DEFAULT_TOOLBAR } from './types';
10
+ import { DEFAULT_TOOLBAR, parseNoThemeComponents } from './types';
11
11
  import { EMOJI } from './emoji';
12
12
  import './nile-wysiwyg-toolbar/nile-wysiwyg-toolbar';
13
13
  import './nile-wysiwyg-toolbar/nile-wysiwyg-toolbar-item';
@@ -55,6 +55,14 @@ function readFileAsDataURL(file) {
55
55
  });
56
56
  }
57
57
  const CHANGE_DEBOUNCE_MS = 250;
58
+ /**
59
+ * Attribute converter for `no-theme-components`. A named constant (not an inline
60
+ * arrow) so the @property options stay parenthesis-free: nile-lint's manifest
61
+ * scanner reads `@property({...})` with a regex that stops at the first `)`.
62
+ */
63
+ const NO_THEME_COMPONENTS_CONVERTER = {
64
+ fromAttribute: (value) => parseNoThemeComponents(value),
65
+ };
58
66
  /**
59
67
  * WYSIWYG rich text editor powered by ProseMirror.
60
68
  *
@@ -156,6 +164,21 @@ let NileWysiwygEditor = class NileWysiwygEditor extends NileElement {
156
164
  this.fullscreen = false;
157
165
  /** Outlines block boundaries (paragraphs, headings, lists…) while editing. */
158
166
  this.showBlocks = false;
167
+ /**
168
+ * Keeps the editing surface on light-theme colours whatever the page theme
169
+ * (e.g. nxtgen dark), so authored content looks the way it will be sent.
170
+ * The toolbar still follows the theme.
171
+ */
172
+ this.noTheme = false;
173
+ /**
174
+ * Like `noTheme`, but only for the listed content components, which stay on
175
+ * light-theme colours while the rest of the surface follows the page theme.
176
+ * Values: `all`, `mentions`, `merge-fields`, `links`, `math`, `code`,
177
+ * `blockquote`, `table`, `task-list`, `images`. Unknown names are ignored.
178
+ * Set as an array (`['mentions', 'table']`), or as an attribute holding a
179
+ * comma/space-separated list (`"mentions, table"`) or a JSON array.
180
+ */
181
+ this.noThemeComponents = [];
159
182
  this.hasFocus = false;
160
183
  this.sourceMode = false;
161
184
  this.counter = { words: 0, characters: 0 };
@@ -1774,6 +1797,12 @@ let NileWysiwygEditor = class NileWysiwygEditor extends NileElement {
1774
1797
  if (this.markdownPanelEl?.open)
1775
1798
  this.closeMarkdownPanel(refocus);
1776
1799
  }
1800
+ /** Space-separated, validated list for the base element's data-no-theme,
1801
+ * which the stylesheet matches with [data-no-theme~='name']. Accepts a
1802
+ * string too, for callers that set the property from plain JS. */
1803
+ noThemeComponentsAttr() {
1804
+ return parseNoThemeComponents(this.noThemeComponents).join(' ');
1805
+ }
1777
1806
  render() {
1778
1807
  const hasAuthoredToolbar = (this.authoredToolbar?.length ?? 0) > 0;
1779
1808
  // Keep the toolbar mounted in source mode too, so the main menu stays put
@@ -1785,6 +1814,7 @@ let NileWysiwygEditor = class NileWysiwygEditor extends NileElement {
1785
1814
  <div
1786
1815
  class="nile-wysiwyg ${this.showBlocks ? 'nile-wysiwyg--show-blocks' : ''}"
1787
1816
  part="base"
1817
+ data-no-theme=${this.noThemeComponentsAttr() || nothing}
1788
1818
  @wysiwyg-command=${this.handleCommand}
1789
1819
  @focusout=${this.handleChromeFocusOut}
1790
1820
  @keydown=${this.handleBaseKeydown}
@@ -2189,6 +2219,12 @@ __decorate([
2189
2219
  __decorate([
2190
2220
  property({ type: Boolean, attribute: 'show-blocks', reflect: true })
2191
2221
  ], NileWysiwygEditor.prototype, "showBlocks", void 0);
2222
+ __decorate([
2223
+ property({ type: Boolean, attribute: 'no-theme', reflect: true })
2224
+ ], NileWysiwygEditor.prototype, "noTheme", void 0);
2225
+ __decorate([
2226
+ property({ attribute: 'no-theme-components', converter: NO_THEME_COMPONENTS_CONVERTER })
2227
+ ], NileWysiwygEditor.prototype, "noThemeComponents", void 0);
2192
2228
  __decorate([
2193
2229
  state()
2194
2230
  ], NileWysiwygEditor.prototype, "toolbarState", void 0);