@docx-editor.dev/core 2.0.1 → 2.1.0

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 (107) hide show
  1. package/README.md +32 -33
  2. package/dist/automation.cjs +1 -1
  3. package/dist/automation.d.cts +2 -2
  4. package/dist/automation.d.ts +2 -2
  5. package/dist/automation.js +1 -1
  6. package/dist/binding.cjs +1 -1
  7. package/dist/binding.d.cts +14 -8
  8. package/dist/binding.d.ts +14 -8
  9. package/dist/binding.js +1 -1
  10. package/dist/chunk-2DTQDAN7.js +2 -0
  11. package/dist/chunk-3JKQE4QJ.cjs +2 -0
  12. package/dist/chunk-4WWEDTTE.js +2 -0
  13. package/dist/chunk-6WIIHJFY.js +1 -0
  14. package/dist/chunk-7VQ7YLW3.cjs +1 -0
  15. package/dist/chunk-BS554B6D.cjs +2 -0
  16. package/dist/chunk-BZK64YU3.cjs +10 -0
  17. package/dist/chunk-CZFUMACF.cjs +12 -0
  18. package/dist/chunk-GQQOL4PV.js +1 -0
  19. package/dist/chunk-JQFDLZXQ.cjs +2 -0
  20. package/dist/chunk-O2WQY7IT.cjs +5 -0
  21. package/dist/chunk-PC76F2HR.cjs +1 -0
  22. package/dist/chunk-QRAUDDVY.js +2 -0
  23. package/dist/chunk-STCITBJK.js +12 -0
  24. package/dist/chunk-TBBXCC7D.js +5 -0
  25. package/dist/chunk-TSXT537P.cjs +12 -0
  26. package/dist/chunk-WOGYVM3W.js +12 -0
  27. package/dist/chunk-Y7TA7TPF.js +10 -0
  28. package/dist/contracts/editor.d.cts +6 -6
  29. package/dist/contracts/editor.d.ts +6 -6
  30. package/dist/contracts/interaction.d.cts +6 -6
  31. package/dist/contracts/interaction.d.ts +6 -6
  32. package/dist/contracts/modules.cjs +1 -1
  33. package/dist/contracts/modules.d.cts +30 -3
  34. package/dist/contracts/modules.d.ts +30 -3
  35. package/dist/contracts/modules.js +1 -1
  36. package/dist/{tree-package-store-DOKMtCnh.d.cts → custom-node-writes-YqISlSRl.d.cts} +181 -4
  37. package/dist/{tree-package-store-D5S7VKs5.d.ts → custom-node-writes-ttKuYd0M.d.ts} +181 -4
  38. package/dist/{editor-D0UDock4.d.cts → editor-B93PggnR.d.cts} +24 -5
  39. package/dist/{editor-C1QRi1v4.d.ts → editor-CFsSrxGR.d.ts} +24 -5
  40. package/dist/editor.cjs +1 -1
  41. package/dist/editor.css +1368 -279
  42. package/dist/editor.d.cts +19 -19
  43. package/dist/editor.d.ts +19 -19
  44. package/dist/editor.js +1 -1
  45. package/dist/{image-resources-BJnTpG66.d.ts → image-resources-C_YnqPhn.d.ts} +19 -11
  46. package/dist/{image-resources-BpIydXtU.d.cts → image-resources-DwpNnTg3.d.cts} +19 -11
  47. package/dist/{index-CrW-IxXt.d.cts → index-BjZelfWL.d.cts} +28 -11
  48. package/dist/{index-ZqBEOrTV.d.ts → index-DP1yJJ3R.d.ts} +28 -11
  49. package/dist/index.cjs +1 -1
  50. package/dist/index.d.cts +13 -13
  51. package/dist/index.d.ts +13 -13
  52. package/dist/index.js +1 -1
  53. package/dist/layout.cjs +1 -1
  54. package/dist/layout.d.cts +869 -819
  55. package/dist/layout.d.ts +869 -819
  56. package/dist/layout.js +1 -1
  57. package/dist/output.cjs +1 -1
  58. package/dist/output.d.cts +4 -4
  59. package/dist/output.d.ts +4 -4
  60. package/dist/output.js +1 -1
  61. package/dist/{protocol-oxHaWmt4.d.ts → protocol-BWVA3Q1p.d.ts} +56 -2
  62. package/dist/{protocol-CAkOBBGE.d.cts → protocol-FAz_nPm_.d.cts} +56 -2
  63. package/dist/review-reads-CsoXSvUg.d.ts +401 -0
  64. package/dist/review-reads-qW0jvdF1.d.cts +401 -0
  65. package/dist/{review-support-DS8DYX2a.d.cts → review-support-D64Wu236.d.cts} +37 -5
  66. package/dist/{review-support-Fy3vdIea.d.ts → review-support-nsLXC9jf.d.ts} +37 -5
  67. package/dist/{semantic-cell-selection-DsmHmLJ5.d.ts → semantic-cell-selection-D_8RbPII.d.ts} +2 -2
  68. package/dist/{semantic-cell-selection-CZjBSmMv.d.cts → semantic-cell-selection-DwLB71fF.d.cts} +2 -2
  69. package/dist/{semantic-interaction-Dy-dCUFF.d.ts → semantic-interaction-CXH2wFqi.d.ts} +1 -1
  70. package/dist/{semantic-interaction-D-Dszxrn.d.cts → semantic-interaction-DqcEonqD.d.cts} +1 -1
  71. package/dist/{semantic-paint-drawings-BA3z9jl8.d.ts → semantic-paint-drawings-B5Wk2so5.d.ts} +1 -1
  72. package/dist/{semantic-paint-drawings-D7qbB0E2.d.cts → semantic-paint-drawings-x8g44lD_.d.cts} +1 -1
  73. package/dist/{semantic-records-CJR3BvHs.d.cts → semantic-records-COVFW5aS.d.cts} +77 -4
  74. package/dist/{semantic-records-CWodBJsz.d.ts → semantic-records-zTC0_1zi.d.ts} +77 -4
  75. package/dist/{shaped-measurer-CNIT_svZ.d.cts → shaped-measurer-AFnFxoot.d.cts} +1 -1
  76. package/dist/{shaped-measurer-B-TAtcQU.d.ts → shaped-measurer-CZXL-a6v.d.ts} +1 -1
  77. package/dist/store.cjs +1 -1
  78. package/dist/store.d.cts +223 -317
  79. package/dist/store.d.ts +223 -317
  80. package/dist/store.js +1 -1
  81. package/dist/{tree-op-types-CwOeiaQ8.d.ts → tree-op-types-DWLCllG7.d.ts} +80 -25
  82. package/dist/{tree-op-types-DMiW6nIH.d.cts → tree-op-types-UOXlRUqQ.d.cts} +80 -25
  83. package/dist/{tree-session-CiUel5Kz.d.ts → tree-session-BtVFXsF6.d.ts} +45 -7
  84. package/dist/{tree-session-D47_imvR.d.cts → tree-session-DxIOHUOD.d.cts} +45 -7
  85. package/dist/{tree-store-CxifqwIv.d.cts → tree-store-B1lEkdXc.d.cts} +1 -1
  86. package/dist/{tree-store-hLtjeyWE.d.ts → tree-store-BscFPB7x.d.ts} +1 -1
  87. package/package.json +10 -5
  88. package/dist/chunk-5KSCB2OZ.js +0 -2
  89. package/dist/chunk-BSC44TIT.js +0 -5
  90. package/dist/chunk-DLPL5DAG.js +0 -12
  91. package/dist/chunk-DOEIARE2.js +0 -2
  92. package/dist/chunk-G7YCQBZE.cjs +0 -5
  93. package/dist/chunk-HR7K3W6A.js +0 -1
  94. package/dist/chunk-HVAV2JSN.js +0 -11
  95. package/dist/chunk-MYH2HCUJ.cjs +0 -2
  96. package/dist/chunk-NSM75TN6.cjs +0 -1
  97. package/dist/chunk-PHDVKUWZ.js +0 -1
  98. package/dist/chunk-QADYGK5L.cjs +0 -12
  99. package/dist/chunk-RNBHTPW7.js +0 -10
  100. package/dist/chunk-UD2ZXLFI.cjs +0 -2
  101. package/dist/chunk-VYAVK2AH.cjs +0 -1
  102. package/dist/chunk-YUK46A2N.cjs +0 -11
  103. package/dist/chunk-ZMIX42J7.cjs +0 -10
  104. package/dist/chunk-ZT55Q52J.cjs +0 -2
  105. package/dist/chunk-ZUALAR4M.js +0 -2
  106. package/dist/note-properties-CnmCoory.d.cts +0 -68
  107. package/dist/note-properties-m75hmP70.d.ts +0 -68
package/dist/editor.css CHANGED
@@ -1,3 +1,42 @@
1
+ .docx-editor :is(.transform), .docx-editor :is([data-side="bottom"]), .docx-editor :is([data-side="top"]) {
2
+ --tw-translate-x: 0;
3
+ --tw-translate-y: 0;
4
+ --tw-rotate: 0;
5
+ --tw-skew-x: 0;
6
+ --tw-skew-y: 0;
7
+ --tw-scale-x: 1;
8
+ --tw-scale-y: 1;
9
+ }
10
+
11
+ .docx-editor :is(.shadow-lg), .docx-editor :is(.shadow-sm) {
12
+ --tw-ring-offset-shadow: 0 0 #0000;
13
+ --tw-ring-shadow: 0 0 #0000;
14
+ --tw-shadow: 0 0 #0000;
15
+ --tw-shadow-colored: 0 0 #0000;
16
+ }
17
+
18
+ .docx-editor :is(.ring), .docx-editor :is(.focus\:ring-1), .docx-editor :is(.focus-visible\:ring-2) {
19
+ --tw-ring-inset: ;
20
+ --tw-ring-offset-width: 0px;
21
+ --tw-ring-offset-color: #fff;
22
+ --tw-ring-color: rgb(59 130 246 / 0.5);
23
+ --tw-ring-offset-shadow: 0 0 #0000;
24
+ --tw-ring-shadow: 0 0 #0000;
25
+ --tw-shadow: 0 0 #0000;
26
+ --tw-shadow-colored: 0 0 #0000;
27
+ }
28
+
29
+ .docx-editor :is(.blur), .docx-editor :is(.filter) {
30
+ --tw-blur: ;
31
+ --tw-brightness: ;
32
+ --tw-contrast: ;
33
+ --tw-grayscale: ;
34
+ --tw-hue-rotate: ;
35
+ --tw-invert: ;
36
+ --tw-saturate: ;
37
+ --tw-sepia: ;
38
+ --tw-drop-shadow: ;
39
+ }
1
40
  /**
2
41
  * DOCX Editor Styles — SINGLE SOURCE OF TRUTH.
3
42
  *
@@ -10,23 +49,762 @@
10
49
  *
11
50
  * Contains:
12
51
  * - CSS custom properties / color tokens (shadcn-compatible + --doc-* chrome
13
- * palette) and the .ep-root.dark scaffold
52
+ * palette) and the .docx-editor.dark scaffold
14
53
  * - Cursor/caret, selection, content-control, popup/menu chrome, etc.
15
54
  *
16
- * NOTE: `@tailwind utilities` lives here so the directive is shared; each
17
- * adapter's own Tailwind build (React via the CLI, Vue via vite PostCSS)
18
- * expands it against that adapter's component sources. We intentionally do NOT
19
- * include @tailwind base (preflight) to avoid resetting the host application.
55
+ * NOTE: `@tailwind utilities` lives here so the directive is shared. The CORE
56
+ * BUILD expands it (scripts/build-core-styles.mjs + tailwind.dist.config.cjs):
57
+ * dist/editor.css ships fully compiled, every utility scoped under `.docx-editor`,
58
+ * with no Tailwind directive left for a host pipeline to reinterpret — a host
59
+ * app's own Tailwind must never expand our directive against ITS config, and a
60
+ * host with no Tailwind still needs the chrome styled. In-repo examples that
61
+ * import this SOURCE file keep expanding it with their own Tailwind build for
62
+ * dev. We intentionally do NOT include @tailwind base (preflight) here to
63
+ * avoid resetting the host application; the dist build prepends it with
64
+ * preflight disabled purely for the `--tw-*` custom-property defaults.
20
65
  */
21
66
 
22
- @tailwind utilities;
67
+ .docx-editor .\!visible {
68
+ visibility: visible !important;
69
+ }
70
+
71
+ .docx-editor .visible {
72
+ visibility: visible;
73
+ }
74
+
75
+ .docx-editor .invisible {
76
+ visibility: hidden;
77
+ }
78
+
79
+ .docx-editor .collapse {
80
+ visibility: collapse;
81
+ }
82
+
83
+ .docx-editor .static {
84
+ position: static;
85
+ }
86
+
87
+ .docx-editor .fixed {
88
+ position: fixed;
89
+ }
90
+
91
+ .docx-editor .absolute {
92
+ position: absolute;
93
+ }
94
+
95
+ .docx-editor .relative {
96
+ position: relative;
97
+ }
98
+
99
+ .docx-editor .sticky {
100
+ position: sticky;
101
+ }
102
+
103
+ .docx-editor .right-2 {
104
+ right: 0.5rem;
105
+ }
106
+
107
+ .docx-editor .isolate {
108
+ isolation: isolate;
109
+ }
110
+
111
+ .docx-editor .z-50 {
112
+ z-index: 50;
113
+ }
114
+
115
+ .docx-editor .-mx-1 {
116
+ margin-left: -0.25rem;
117
+ margin-right: -0.25rem;
118
+ }
119
+
120
+ .docx-editor .mx-1\.5 {
121
+ margin-left: 0.375rem;
122
+ margin-right: 0.375rem;
123
+ }
124
+
125
+ .docx-editor .mx-2 {
126
+ margin-left: 0.5rem;
127
+ margin-right: 0.5rem;
128
+ }
129
+
130
+ .docx-editor .my-1 {
131
+ margin-top: 0.25rem;
132
+ margin-bottom: 0.25rem;
133
+ }
134
+
135
+ .docx-editor .-ml-1 {
136
+ margin-left: -0.25rem;
137
+ }
138
+
139
+ .docx-editor .mb-1 {
140
+ margin-bottom: 0.25rem;
141
+ }
142
+
143
+ .docx-editor .ml-auto {
144
+ margin-left: auto;
145
+ }
146
+
147
+ .docx-editor .block {
148
+ display: block;
149
+ }
150
+
151
+ .docx-editor .inline-block {
152
+ display: inline-block;
153
+ }
154
+
155
+ .docx-editor .\!inline {
156
+ display: inline !important;
157
+ }
158
+
159
+ .docx-editor .inline {
160
+ display: inline;
161
+ }
162
+
163
+ .docx-editor .flex {
164
+ display: flex;
165
+ }
166
+
167
+ .docx-editor .inline-flex {
168
+ display: inline-flex;
169
+ }
170
+
171
+ .docx-editor .\!table {
172
+ display: table !important;
173
+ }
174
+
175
+ .docx-editor .table {
176
+ display: table;
177
+ }
178
+
179
+ .docx-editor .table-cell {
180
+ display: table-cell;
181
+ }
182
+
183
+ .docx-editor .grid {
184
+ display: grid;
185
+ }
186
+
187
+ .docx-editor .contents {
188
+ display: contents;
189
+ }
190
+
191
+ .docx-editor .hidden {
192
+ display: none;
193
+ }
194
+
195
+ .docx-editor .h-10 {
196
+ height: 2.5rem;
197
+ }
198
+
199
+ .docx-editor .h-11 {
200
+ height: 2.75rem;
201
+ }
202
+
203
+ .docx-editor .h-3\.5 {
204
+ height: 0.875rem;
205
+ }
206
+
207
+ .docx-editor .h-4 {
208
+ height: 1rem;
209
+ }
210
+
211
+ .docx-editor .h-5 {
212
+ height: 1.25rem;
213
+ }
214
+
215
+ .docx-editor .h-6 {
216
+ height: 1.5rem;
217
+ }
218
+
219
+ .docx-editor .h-7 {
220
+ height: 1.75rem;
221
+ }
222
+
223
+ .docx-editor .h-8 {
224
+ height: 2rem;
225
+ }
226
+
227
+ .docx-editor .h-9 {
228
+ height: 2.25rem;
229
+ }
230
+
231
+ .docx-editor .h-\[var\(--radix-select-trigger-height\)\] {
232
+ height: var(--radix-select-trigger-height);
233
+ }
234
+
235
+ .docx-editor .h-px {
236
+ height: 1px;
237
+ }
238
+
239
+ .docx-editor .max-h-72 {
240
+ max-height: 18rem;
241
+ }
242
+
243
+ .docx-editor .max-h-\[300px\] {
244
+ max-height: 300px;
245
+ }
246
+
247
+ .docx-editor .max-h-\[400px\] {
248
+ max-height: 400px;
249
+ }
250
+
251
+ .docx-editor .min-h-\[36px\] {
252
+ min-height: 36px;
253
+ }
254
+
255
+ .docx-editor .w-10 {
256
+ width: 2.5rem;
257
+ }
258
+
259
+ .docx-editor .w-3\.5 {
260
+ width: 0.875rem;
261
+ }
262
+
263
+ .docx-editor .w-4 {
264
+ width: 1rem;
265
+ }
266
+
267
+ .docx-editor .w-5 {
268
+ width: 1.25rem;
269
+ }
270
+
271
+ .docx-editor .w-7 {
272
+ width: 1.75rem;
273
+ }
274
+
275
+ .docx-editor .w-8 {
276
+ width: 2rem;
277
+ }
278
+
279
+ .docx-editor .w-9 {
280
+ width: 2.25rem;
281
+ }
282
+
283
+ .docx-editor .w-full {
284
+ width: 100%;
285
+ }
286
+
287
+ .docx-editor .w-px {
288
+ width: 1px;
289
+ }
290
+
291
+ .docx-editor .min-w-0 {
292
+ min-width: 0px;
293
+ }
294
+
295
+ .docx-editor .min-w-\[100px\] {
296
+ min-width: 100px;
297
+ }
298
+
299
+ .docx-editor .min-w-\[260px\] {
300
+ min-width: 260px;
301
+ }
302
+
303
+ .docx-editor .min-w-\[55px\] {
304
+ min-width: 55px;
305
+ }
306
+
307
+ .docx-editor .min-w-\[64px\] {
308
+ min-width: 64px;
309
+ }
310
+
311
+ .docx-editor .min-w-\[8rem\] {
312
+ min-width: 8rem;
313
+ }
314
+
315
+ .docx-editor .min-w-\[var\(--radix-select-trigger-width\)\] {
316
+ min-width: var(--radix-select-trigger-width);
317
+ }
318
+
319
+ .docx-editor .max-w-\[300px\] {
320
+ max-width: 300px;
321
+ }
322
+
323
+ .docx-editor .flex-1 {
324
+ flex: 1 1 0%;
325
+ }
326
+
327
+ .docx-editor .flex-shrink-0 {
328
+ flex-shrink: 0;
329
+ }
330
+
331
+ .docx-editor .shrink {
332
+ flex-shrink: 1;
333
+ }
334
+
335
+ .docx-editor .shrink-0 {
336
+ flex-shrink: 0;
337
+ }
338
+
339
+ .docx-editor .transform {
340
+ transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
341
+ }
342
+
343
+ .docx-editor .cursor-not-allowed {
344
+ cursor: not-allowed;
345
+ }
346
+
347
+ .docx-editor .cursor-pointer {
348
+ cursor: pointer;
349
+ }
350
+
351
+ .docx-editor .select-none {
352
+ -webkit-user-select: none;
353
+ -moz-user-select: none;
354
+ user-select: none;
355
+ }
356
+
357
+ .docx-editor .resize {
358
+ resize: both;
359
+ }
360
+
361
+ .docx-editor .flex-col {
362
+ flex-direction: column;
363
+ }
364
+
365
+ .docx-editor .items-center {
366
+ align-items: center;
367
+ }
368
+
369
+ .docx-editor .items-stretch {
370
+ align-items: stretch;
371
+ }
372
+
373
+ .docx-editor .justify-center {
374
+ justify-content: center;
375
+ }
376
+
377
+ .docx-editor .justify-between {
378
+ justify-content: space-between;
379
+ }
380
+
381
+ .docx-editor .gap-0\.5 {
382
+ gap: 0.125rem;
383
+ }
384
+
385
+ .docx-editor .gap-1 {
386
+ gap: 0.25rem;
387
+ }
388
+
389
+ .docx-editor .gap-2 {
390
+ gap: 0.5rem;
391
+ }
392
+
393
+ .docx-editor .gap-px {
394
+ gap: 1px;
395
+ }
396
+
397
+ .docx-editor .overflow-hidden {
398
+ overflow: hidden;
399
+ }
400
+
401
+ .docx-editor .overflow-x-auto {
402
+ overflow-x: auto;
403
+ }
404
+
405
+ .docx-editor .truncate {
406
+ overflow: hidden;
407
+ text-overflow: ellipsis;
408
+ white-space: nowrap;
409
+ }
410
+
411
+ .docx-editor .whitespace-nowrap {
412
+ white-space: nowrap;
413
+ }
414
+
415
+ .docx-editor .rounded {
416
+ border-radius: 0.25rem;
417
+ }
418
+
419
+ .docx-editor .rounded-full {
420
+ border-radius: 9999px;
421
+ }
422
+
423
+ .docx-editor .rounded-lg {
424
+ border-radius: var(--radius);
425
+ }
426
+
427
+ .docx-editor .rounded-md {
428
+ border-radius: calc(var(--radius) - 2px);
429
+ }
430
+
431
+ .docx-editor .rounded-none {
432
+ border-radius: 0px;
433
+ }
434
+
435
+ .docx-editor .rounded-l-none {
436
+ border-top-left-radius: 0px;
437
+ border-bottom-left-radius: 0px;
438
+ }
439
+
440
+ .docx-editor .rounded-r-none {
441
+ border-top-right-radius: 0px;
442
+ border-bottom-right-radius: 0px;
443
+ }
444
+
445
+ .docx-editor .border {
446
+ border-width: 1px;
447
+ }
448
+
449
+ .docx-editor .border-0 {
450
+ border-width: 0px;
451
+ }
452
+
453
+ .docx-editor .border-r {
454
+ border-right-width: 1px;
455
+ }
456
+
457
+ .docx-editor .border-border {
458
+ --tw-border-opacity: 1;
459
+ border-color: hsl(var(--border) / var(--tw-border-opacity, 1));
460
+ }
461
+
462
+ .docx-editor .border-border\/50 {
463
+ border-color: hsl(var(--border) / 0.5);
464
+ }
465
+
466
+ .docx-editor .border-input {
467
+ --tw-border-opacity: 1;
468
+ border-color: hsl(var(--input) / var(--tw-border-opacity, 1));
469
+ }
470
+
471
+ .docx-editor .bg-background {
472
+ --tw-bg-opacity: 1;
473
+ background-color: hsl(var(--background) / var(--tw-bg-opacity, 1));
474
+ }
475
+
476
+ .docx-editor .bg-border {
477
+ --tw-bg-opacity: 1;
478
+ background-color: hsl(var(--border) / var(--tw-bg-opacity, 1));
479
+ }
480
+
481
+ .docx-editor .bg-destructive {
482
+ --tw-bg-opacity: 1;
483
+ background-color: hsl(var(--destructive) / var(--tw-bg-opacity, 1));
484
+ }
485
+
486
+ .docx-editor .bg-doc-bg {
487
+ background-color: var(--doc-bg);
488
+ }
489
+
490
+ .docx-editor .bg-doc-bg-input {
491
+ background-color: var(--doc-bg-input);
492
+ }
493
+
494
+ .docx-editor .bg-doc-surface {
495
+ background-color: var(--doc-surface);
496
+ }
497
+
498
+ .docx-editor .bg-foreground {
499
+ --tw-bg-opacity: 1;
500
+ background-color: hsl(var(--foreground) / var(--tw-bg-opacity, 1));
501
+ }
502
+
503
+ .docx-editor .bg-muted {
504
+ --tw-bg-opacity: 1;
505
+ background-color: hsl(var(--muted) / var(--tw-bg-opacity, 1));
506
+ }
507
+
508
+ .docx-editor .bg-popover {
509
+ --tw-bg-opacity: 1;
510
+ background-color: hsl(var(--popover) / var(--tw-bg-opacity, 1));
511
+ }
512
+
513
+ .docx-editor .bg-primary {
514
+ --tw-bg-opacity: 1;
515
+ background-color: hsl(var(--primary) / var(--tw-bg-opacity, 1));
516
+ }
517
+
518
+ .docx-editor .bg-secondary {
519
+ --tw-bg-opacity: 1;
520
+ background-color: hsl(var(--secondary) / var(--tw-bg-opacity, 1));
521
+ }
522
+
523
+ .docx-editor .bg-transparent {
524
+ background-color: transparent;
525
+ }
526
+
527
+ .docx-editor .p-1 {
528
+ padding: 0.25rem;
529
+ }
530
+
531
+ .docx-editor .px-1 {
532
+ padding-left: 0.25rem;
533
+ padding-right: 0.25rem;
534
+ }
535
+
536
+ .docx-editor .px-1\.5 {
537
+ padding-left: 0.375rem;
538
+ padding-right: 0.375rem;
539
+ }
540
+
541
+ .docx-editor .px-2 {
542
+ padding-left: 0.5rem;
543
+ padding-right: 0.5rem;
544
+ }
545
+
546
+ .docx-editor .px-3 {
547
+ padding-left: 0.75rem;
548
+ padding-right: 0.75rem;
549
+ }
550
+
551
+ .docx-editor .px-4 {
552
+ padding-left: 1rem;
553
+ padding-right: 1rem;
554
+ }
555
+
556
+ .docx-editor .px-8 {
557
+ padding-left: 2rem;
558
+ padding-right: 2rem;
559
+ }
560
+
561
+ .docx-editor .py-0 {
562
+ padding-top: 0px;
563
+ padding-bottom: 0px;
564
+ }
565
+
566
+ .docx-editor .py-1 {
567
+ padding-top: 0.25rem;
568
+ padding-bottom: 0.25rem;
569
+ }
570
+
571
+ .docx-editor .py-1\.5 {
572
+ padding-top: 0.375rem;
573
+ padding-bottom: 0.375rem;
574
+ }
575
+
576
+ .docx-editor .py-2 {
577
+ padding-top: 0.5rem;
578
+ padding-bottom: 0.5rem;
579
+ }
580
+
581
+ .docx-editor .py-2\.5 {
582
+ padding-top: 0.625rem;
583
+ padding-bottom: 0.625rem;
584
+ }
585
+
586
+ .docx-editor .pb-1 {
587
+ padding-bottom: 0.25rem;
588
+ }
589
+
590
+ .docx-editor .pl-3 {
591
+ padding-left: 0.75rem;
592
+ }
593
+
594
+ .docx-editor .pr-1 {
595
+ padding-right: 0.25rem;
596
+ }
597
+
598
+ .docx-editor .pt-2 {
599
+ padding-top: 0.5rem;
600
+ }
601
+
602
+ .docx-editor .text-left {
603
+ text-align: left;
604
+ }
605
+
606
+ .docx-editor .text-center {
607
+ text-align: center;
608
+ }
609
+
610
+ .docx-editor .text-base {
611
+ font-size: 1rem;
612
+ line-height: 1.5rem;
613
+ }
614
+
615
+ .docx-editor .text-sm {
616
+ font-size: 0.875rem;
617
+ line-height: 1.25rem;
618
+ }
619
+
620
+ .docx-editor .text-xs {
621
+ font-size: 0.75rem;
622
+ line-height: 1rem;
623
+ }
624
+
625
+ .docx-editor .font-medium {
626
+ font-weight: 500;
627
+ }
628
+
629
+ .docx-editor .font-normal {
630
+ font-weight: 400;
631
+ }
632
+
633
+ .docx-editor .uppercase {
634
+ text-transform: uppercase;
635
+ }
636
+
637
+ .docx-editor .lowercase {
638
+ text-transform: lowercase;
639
+ }
640
+
641
+ .docx-editor .italic {
642
+ font-style: italic;
643
+ }
644
+
645
+ .docx-editor .leading-tight {
646
+ line-height: 1.25;
647
+ }
648
+
649
+ .docx-editor .text-destructive {
650
+ --tw-text-opacity: 1;
651
+ color: hsl(var(--destructive) / var(--tw-text-opacity, 1));
652
+ }
653
+
654
+ .docx-editor .text-destructive-foreground {
655
+ --tw-text-opacity: 1;
656
+ color: hsl(var(--destructive-foreground) / var(--tw-text-opacity, 1));
657
+ }
658
+
659
+ .docx-editor .text-doc-text {
660
+ color: var(--doc-text);
661
+ }
662
+
663
+ .docx-editor .text-foreground {
664
+ --tw-text-opacity: 1;
665
+ color: hsl(var(--foreground) / var(--tw-text-opacity, 1));
666
+ }
667
+
668
+ .docx-editor .text-muted-foreground {
669
+ --tw-text-opacity: 1;
670
+ color: hsl(var(--muted-foreground) / var(--tw-text-opacity, 1));
671
+ }
672
+
673
+ .docx-editor .text-popover-foreground {
674
+ --tw-text-opacity: 1;
675
+ color: hsl(var(--popover-foreground) / var(--tw-text-opacity, 1));
676
+ }
677
+
678
+ .docx-editor .text-primary {
679
+ --tw-text-opacity: 1;
680
+ color: hsl(var(--primary) / var(--tw-text-opacity, 1));
681
+ }
682
+
683
+ .docx-editor .text-primary-foreground {
684
+ --tw-text-opacity: 1;
685
+ color: hsl(var(--primary-foreground) / var(--tw-text-opacity, 1));
686
+ }
687
+
688
+ .docx-editor .text-secondary-foreground {
689
+ --tw-text-opacity: 1;
690
+ color: hsl(var(--secondary-foreground) / var(--tw-text-opacity, 1));
691
+ }
692
+
693
+ .docx-editor .text-white {
694
+ --tw-text-opacity: 1;
695
+ color: rgb(255 255 255 / var(--tw-text-opacity, 1));
696
+ }
697
+
698
+ .docx-editor .underline {
699
+ text-decoration-line: underline;
700
+ }
701
+
702
+ .docx-editor .underline-offset-4 {
703
+ text-underline-offset: 4px;
704
+ }
705
+
706
+ .docx-editor .opacity-30 {
707
+ opacity: 0.3;
708
+ }
709
+
710
+ .docx-editor .opacity-50 {
711
+ opacity: 0.5;
712
+ }
713
+
714
+ .docx-editor .shadow-lg {
715
+ --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
716
+ --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
717
+ box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
718
+ }
719
+
720
+ .docx-editor .shadow-sm {
721
+ --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
722
+ --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);
723
+ box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
724
+ }
725
+
726
+ .docx-editor .outline-none {
727
+ outline: 2px solid transparent;
728
+ outline-offset: 2px;
729
+ }
730
+
731
+ .docx-editor .outline {
732
+ outline-style: solid;
733
+ }
734
+
735
+ .docx-editor .ring {
736
+ --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
737
+ --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);
738
+ box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
739
+ }
740
+
741
+ .docx-editor .ring-offset-background {
742
+ --tw-ring-offset-color: hsl(var(--background) / 1);
743
+ }
744
+
745
+ .docx-editor .blur {
746
+ --tw-blur: blur(8px);
747
+ filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
748
+ }
749
+
750
+ .docx-editor .filter {
751
+ filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
752
+ }
753
+
754
+ .docx-editor .transition {
755
+ transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
756
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
757
+ transition-duration: 150ms;
758
+ }
759
+
760
+ .docx-editor .transition-colors {
761
+ transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
762
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
763
+ transition-duration: 150ms;
764
+ }
765
+
766
+ .docx-editor .duration-150 {
767
+ transition-duration: 150ms;
768
+ }
769
+
770
+ .docx-editor .ease-out {
771
+ transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
772
+ }
773
+
774
+ @keyframes docx-editor-enter {
775
+
776
+ from {
777
+ opacity: var(--tw-enter-opacity, 1);
778
+ transform: translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0) scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0));
779
+ }
780
+ }
781
+
782
+ @keyframes docx-editor-exit {
783
+
784
+ to {
785
+ opacity: var(--tw-exit-opacity, 1);
786
+ transform: translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0) scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0));
787
+ }
788
+ }
789
+
790
+ .docx-editor .duration-150 {
791
+ animation-duration: 150ms;
792
+ }
793
+
794
+ .docx-editor .ease-out {
795
+ animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
796
+ }
797
+
798
+ .docx-editor .running {
799
+ animation-play-state: running;
800
+ }
23
801
 
24
802
  /* ============================================================================
25
803
  * CSS CUSTOM PROPERTIES (shadcn theme)
26
804
  * ============================================================================ */
27
805
 
28
- /* Scoped to .ep-root to avoid clashing with host application CSS variables */
29
- .ep-root {
806
+ /* Scoped to .docx-editor to avoid clashing with host application CSS variables */
807
+ .docx-editor {
30
808
  /* ----------------------------------------------------------------------
31
809
  * shadcn / Tailwind tokens (HSL triples). These back the Tailwind utility
32
810
  * classes (bg-primary, text-foreground, bg-muted, ...). These are the
@@ -58,7 +836,7 @@
58
836
  /* ======================================================================
59
837
  * Document-editor chrome palette — the single source of truth for UI
60
838
  * colors. Components reference these via var(--doc-*); component styles
61
- * carry no raw hex/rgba. Override the whole set under .ep-root.dark to
839
+ * carry no raw hex/rgba. Override the whole set under .docx-editor.dark to
62
840
  * theme the UI. The document canvas is painted from the .docx and is
63
841
  * intentionally NOT themed here (it stays Word-faithful, like a page in
64
842
  * Word/Google Docs that stays white regardless of app chrome).
@@ -146,7 +924,7 @@
146
924
  something did. */
147
925
  /* Per-AUTHOR review colours. OOXML carries no colour on a revision — Word assigns one per
148
926
  author in the application — so this ramp is presentation policy, and overriding a slot
149
- under `.ep-root` restyles both the painted document and the review cards. Chosen to stay
927
+ under `.docx-editor` restyles both the painted document and the review cards. Chosen to stay
150
928
  distinguishable from each other and from the black body text. */
151
929
  --doc-review-author-0: #c0392b;
152
930
  --doc-review-author-1: #1f6fb2;
@@ -190,7 +968,7 @@
190
968
  *
191
969
  * Declared here for the DEFAULT theme, which it was not: `--doc-page-bg` existed only
192
970
  * inside the dark block (and a dark print override), so
193
- * `.ep-one-surface__page { background: var(--doc-page-bg) }` resolved to nothing in light
971
+ * `.docx-editor-one-surface__page { background: var(--doc-page-bg) }` resolved to nothing in light
194
972
  * mode and the sheet painted TRANSPARENT — a box-shadow around a see-through interior,
195
973
  * because neither the viewport nor the surface sets a background either. The same silent
196
974
  * `var()` failure as the caret, in the same file, found by the scope-aware token check
@@ -216,10 +994,16 @@
216
994
  * for the inverted canvas.
217
995
  *
218
996
  * This was missing entirely and only ever declared in the dark block, so
219
- * `.ep-one-surface__caret { background: var(--doc-caret) }` resolved to nothing in the
997
+ * `.docx-editor-one-surface__caret { background: var(--doc-caret) }` resolved to nothing in the
220
998
  * default theme and painted a 1px transparent div — the caret was correctly positioned,
221
- * visible and non-blinking-off, and simply had no colour. */
999
+ * visible and non-blinking-off, and simply had no colour.
1000
+ *
1001
+ * `--doc-caret-contrast` is its complement, drawn as a 1px ring so the insertion point
1002
+ * survives a backdrop the core colour disappears into (see `.docx-editor-one-surface__caret`).
1003
+ * The two are transformed together by the dark page's inversion, so their contrast with
1004
+ * each other holds in both themes. */
222
1005
  --doc-caret: #202124;
1006
+ --doc-caret-contrast: #ffffff;
223
1007
 
224
1008
  /* Document scroll container scrollbar */
225
1009
  --doc-scrollbar-size: 14px;
@@ -229,23 +1013,23 @@
229
1013
  }
230
1014
 
231
1015
  /* ========================================================================
232
- * Dark theme. Add the `dark` class to the .ep-root element to enable it
1016
+ * Dark theme. Add the `dark` class to the .docx-editor element to enable it
233
1017
  * (Tailwind darkMode: ['class'] is already configured). Theming is driven by
234
1018
  * these token overrides — every UI token above is re-pointed here, so all
235
1019
  * chrome re-themes automatically. The document canvas is left untouched on
236
1020
  * purpose: it must stay Word-faithful.
237
1021
  *
238
- * NOTE: because `important: '.ep-root'` emits `dark:` utilities as
239
- * `.ep-root .dark\:x:is(.dark *)`, those variants only match DESCENDANTS of a
240
- * `.dark` element — NOT the `.ep-root.dark` element itself. So theme the root
1022
+ * NOTE: because `important: '.docx-editor'` emits `dark:` utilities as
1023
+ * `.docx-editor .dark\:x:is(.dark *)`, those variants only match DESCENDANTS of a
1024
+ * `.dark` element — NOT the `.docx-editor.dark` element itself. So theme the root
241
1025
  * via these token overrides (as below), never via a `dark:` utility placed
242
- * directly on the `.ep-root` node.
1026
+ * directly on the `.docx-editor` node.
243
1027
  * ====================================================================== */
244
- /* Also targets nested `.ep-root` elements (e.g. the paged-editor root, Radix
245
- * portals) so the base `.ep-root` light tokens don't shadow these inside a
1028
+ /* Also targets nested `.docx-editor` elements (e.g. the paged-editor root, Radix
1029
+ * portals) so the base `.docx-editor` light tokens don't shadow these inside a
246
1030
  * dark tree. */
247
- .ep-root.dark,
248
- .ep-root.dark .ep-root {
1031
+ .docx-editor.dark,
1032
+ .docx-editor.dark .docx-editor {
249
1033
  /* Palette sampled from Microsoft Word Online dark mode (chrome + canvas).
250
1034
  * shadcn / Tailwind tokens (HSL triples) — mirror the --doc-* chrome values
251
1035
  * below so shadcn-based components (Select, Button) re-theme in lockstep. */
@@ -345,13 +1129,14 @@
345
1129
  * page (it's a sibling, not filtered), so a black caret would be invisible —
346
1130
  * point it at a light colour in dark mode. */
347
1131
  --doc-caret: #e8e8e8;
1132
+ --doc-caret-contrast: #202124;
348
1133
  }
349
1134
 
350
1135
  /* Smart lightness inversion of the document canvas — the heart of dark mode.
351
1136
  * invert(1) hue-rotate(180deg) flips lightness but preserves hue for ALL
352
1137
  * authored colors, so nothing is unreadable. Media is double-inverted back so
353
1138
  * photos/logos render normally. */
354
- .ep-root.dark .layout-page,
1139
+ .docx-editor.dark .layout-page,
355
1140
  /* The paginated lane paints its content into `.docx-page-content`; inverting the page
356
1141
  FRAME as well would flip the paper itself, so the sheet keeps its own token background
357
1142
  and only the content it holds is lightness-inverted. */
@@ -361,8 +1146,8 @@
361
1146
  where it clamps to zero, landing on a dark olive that reads as a redaction bar. Word keeps
362
1147
  a highlight its authored colour, so the run is inverted back — the same treatment media
363
1148
  already gets, for the same reason. */
364
- .ep-root.dark .docx-page-content [data-highlight],
365
- .ep-root.dark .layout-page [data-highlight] {
1149
+ .docx-editor.dark .docx-page-content [data-highlight],
1150
+ .docx-editor.dark .layout-page [data-highlight] {
366
1151
  filter: invert(1) hue-rotate(180deg);
367
1152
  }
368
1153
 
@@ -370,10 +1155,13 @@
370
1155
  the filter receives, not what the user sees. A normal blue came out orange; this is the
371
1156
  pre-image that inverts back to the accent blue. The comment further up claiming the
372
1157
  selection overlay sits outside the inverted page is true of the legacy lane only. */
373
- .ep-root.dark .docx-page-content ::selection {
1158
+ .docx-editor.dark .docx-page-content ::-moz-selection {
1159
+ background-color: rgba(177, 98, 0, 0.32);
1160
+ }
1161
+ .docx-editor.dark .docx-page-content ::selection {
374
1162
  background-color: rgba(177, 98, 0, 0.32);
375
1163
  }
376
- .ep-root.dark .docx-page-content {
1164
+ .docx-editor.dark .docx-page-content {
377
1165
  /* contrast(0.92) softens the pure black/white extremes a plain invert
378
1166
  * produces, landing on Word's gentler off-white text / dark-grey fills
379
1167
  * rather than #fff on #000. */
@@ -385,26 +1173,26 @@
385
1173
  /* The ring replaces the page frame's drop shadow, so it belongs to the FRAME. Applied to
386
1174
  the content box as well it outlined the text area — a box Word never draws — while the
387
1175
  real page edge lost its separation from the workspace. */
388
- .ep-root.dark .layout-page {
1176
+ .docx-editor.dark .layout-page {
389
1177
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18) !important;
390
1178
  }
391
- .ep-root.dark .layout-page img,
392
- .ep-root.dark .layout-page svg,
393
- .ep-root.dark .layout-page canvas,
394
- .ep-root.dark .layout-page video,
395
- .ep-root.dark .layout-page [data-no-color-invert],
396
- .ep-root.dark .docx-page-content img,
397
- .ep-root.dark .docx-page-content svg,
398
- .ep-root.dark .docx-page-content canvas,
399
- .ep-root.dark .docx-page-content video,
400
- .ep-root.dark .docx-page-content [data-no-color-invert] {
1179
+ .docx-editor.dark .layout-page img,
1180
+ .docx-editor.dark .layout-page svg,
1181
+ .docx-editor.dark .layout-page canvas,
1182
+ .docx-editor.dark .layout-page video,
1183
+ .docx-editor.dark .layout-page [data-no-color-invert],
1184
+ .docx-editor.dark .docx-page-content img,
1185
+ .docx-editor.dark .docx-page-content svg,
1186
+ .docx-editor.dark .docx-page-content canvas,
1187
+ .docx-editor.dark .docx-page-content video,
1188
+ .docx-editor.dark .docx-page-content [data-no-color-invert] {
401
1189
  filter: invert(1) hue-rotate(180deg);
402
1190
  }
403
1191
 
404
1192
  /* Printing is always on white paper: drop the inversion and paint the page
405
1193
  * white with black text (matches Word, saves toner). */
406
1194
  @media print {
407
- .ep-root.dark {
1195
+ .docx-editor.dark {
408
1196
  --doc-page-bg: #ffffff;
409
1197
  /* The colour a sheet is PAINTED. In the legacy lane the page is lightness-inverted, so
410
1198
  `--doc-page-bg` is a pre-filter value and this is what it lands on; the paginated lane
@@ -416,11 +1204,11 @@
416
1204
  lands on near-white. */
417
1205
  --doc-page-text: #000000;
418
1206
  }
419
- .ep-root.dark .layout-page,
420
- .ep-root.dark .layout-page img,
421
- .ep-root.dark .layout-page svg,
422
- .ep-root.dark .layout-page canvas,
423
- .ep-root.dark .layout-page video {
1207
+ .docx-editor.dark .layout-page,
1208
+ .docx-editor.dark .layout-page img,
1209
+ .docx-editor.dark .layout-page svg,
1210
+ .docx-editor.dark .layout-page canvas,
1211
+ .docx-editor.dark .layout-page video {
424
1212
  filter: none;
425
1213
  }
426
1214
  }
@@ -429,40 +1217,40 @@
429
1217
  * DOCUMENT SCROLLBAR
430
1218
  * ============================================================================ */
431
1219
 
432
- .ep-root .docx-editor__scroll-container,
433
- .ep-root .docx-editor-vue__pages-viewport {
1220
+ .docx-editor .docx-editor__scroll-container,
1221
+ .docx-editor .docx-editor-vue__pages-viewport {
434
1222
  scrollbar-width: auto;
435
1223
  scrollbar-color: var(--doc-scrollbar-thumb) var(--doc-scrollbar-track);
436
1224
  }
437
1225
 
438
- .ep-root .docx-editor__scroll-container {
1226
+ .docx-editor .docx-editor__scroll-container {
439
1227
  /* `both-edges` reserves a symmetric gutter so the centered page stays centered
440
1228
  on classic-scrollbar platforms (single-edge nudges it ~7px left). Matches
441
1229
  the Vue viewport (DocxEditor.css `__pages-viewport`). */
442
1230
  scrollbar-gutter: stable both-edges;
443
1231
  }
444
1232
 
445
- .ep-root .docx-editor__scroll-container::-webkit-scrollbar,
446
- .ep-root .docx-editor-vue__pages-viewport::-webkit-scrollbar {
1233
+ .docx-editor .docx-editor__scroll-container::-webkit-scrollbar,
1234
+ .docx-editor .docx-editor-vue__pages-viewport::-webkit-scrollbar {
447
1235
  width: var(--doc-scrollbar-size);
448
1236
  height: var(--doc-scrollbar-size);
449
1237
  }
450
1238
 
451
- .ep-root .docx-editor__scroll-container::-webkit-scrollbar-track,
452
- .ep-root .docx-editor-vue__pages-viewport::-webkit-scrollbar-track {
1239
+ .docx-editor .docx-editor__scroll-container::-webkit-scrollbar-track,
1240
+ .docx-editor .docx-editor-vue__pages-viewport::-webkit-scrollbar-track {
453
1241
  background: var(--doc-scrollbar-track);
454
1242
  }
455
1243
 
456
- .ep-root .docx-editor__scroll-container::-webkit-scrollbar-thumb,
457
- .ep-root .docx-editor-vue__pages-viewport::-webkit-scrollbar-thumb {
1244
+ .docx-editor .docx-editor__scroll-container::-webkit-scrollbar-thumb,
1245
+ .docx-editor .docx-editor-vue__pages-viewport::-webkit-scrollbar-thumb {
458
1246
  background: var(--doc-scrollbar-thumb);
459
1247
  border: 3px solid transparent;
460
1248
  border-radius: 9999px;
461
1249
  background-clip: content-box;
462
1250
  }
463
1251
 
464
- .ep-root .docx-editor__scroll-container:hover::-webkit-scrollbar-thumb,
465
- .ep-root .docx-editor-vue__pages-viewport:hover::-webkit-scrollbar-thumb {
1252
+ .docx-editor .docx-editor__scroll-container:hover::-webkit-scrollbar-thumb,
1253
+ .docx-editor .docx-editor-vue__pages-viewport:hover::-webkit-scrollbar-thumb {
466
1254
  background: var(--doc-scrollbar-thumb-hover);
467
1255
  border: 3px solid transparent;
468
1256
  border-radius: 9999px;
@@ -473,8 +1261,10 @@
473
1261
  * CURSOR / CARET STYLING
474
1262
  * ============================================================================ */
475
1263
 
476
- /* Base cursor styles for all editable elements */
477
- [contenteditable='true'] {
1264
+ /* Base cursor styles for all editable elements. Scoped under .docx-editor: an
1265
+ unscoped [contenteditable] rule reaches into every rich-text field of the
1266
+ HOST application. */
1267
+ .docx-editor [contenteditable='true'] {
478
1268
  /* Black caret for light backgrounds - highly visible */
479
1269
  caret-color: #000;
480
1270
 
@@ -542,13 +1332,19 @@
542
1332
  * - Use rgba for semi-transparent highlight that shows text clearly
543
1333
  */
544
1334
 
545
- /* Base selection styling for all editable elements */
1335
+ /* Base selection styling for all editable elements. The bare [contenteditable]
1336
+ variants are scoped under .docx-editor so host-app editors keep their own
1337
+ selection colors. */
1338
+ .docx-run-editable::-moz-selection, .docx-run-editable *::-moz-selection, .docx-run::-moz-selection, .docx-run *::-moz-selection, .docx-editor [contenteditable='true']::-moz-selection, .docx-editor [contenteditable='true'] *::-moz-selection {
1339
+ background-color: rgba(26, 115, 232, 0.3) !important;
1340
+ color: inherit !important;
1341
+ }
546
1342
  .docx-run-editable::selection,
547
1343
  .docx-run-editable *::selection,
548
1344
  .docx-run::selection,
549
1345
  .docx-run *::selection,
550
- [contenteditable='true']::selection,
551
- [contenteditable='true'] *::selection {
1346
+ .docx-editor [contenteditable='true']::selection,
1347
+ .docx-editor [contenteditable='true'] *::selection {
552
1348
  background-color: rgba(26, 115, 232, 0.3) !important;
553
1349
  color: inherit !important;
554
1350
  }
@@ -558,13 +1354,17 @@
558
1354
  .docx-run-editable *::-moz-selection,
559
1355
  .docx-run::-moz-selection,
560
1356
  .docx-run *::-moz-selection,
561
- [contenteditable='true']::-moz-selection,
562
- [contenteditable='true'] *::-moz-selection {
1357
+ .docx-editor [contenteditable='true']::-moz-selection,
1358
+ .docx-editor [contenteditable='true'] *::-moz-selection {
563
1359
  background-color: rgba(26, 115, 232, 0.3) !important;
564
1360
  color: inherit !important;
565
1361
  }
566
1362
 
567
1363
  /* Selection in paragraphs - ensure runs within get consistent styling */
1364
+ .docx-paragraph::-moz-selection, .docx-paragraph *::-moz-selection, .docx-paragraph-editable::-moz-selection, .docx-paragraph-editable *::-moz-selection {
1365
+ background-color: rgba(26, 115, 232, 0.3) !important;
1366
+ color: inherit !important;
1367
+ }
568
1368
  .docx-paragraph::selection,
569
1369
  .docx-paragraph *::selection,
570
1370
  .docx-paragraph-editable::selection,
@@ -608,6 +1408,10 @@ a.docx-hyperlink:focus-visible {
608
1408
  }
609
1409
 
610
1410
  /* Selection in hyperlinks */
1411
+ .docx-hyperlink::-moz-selection, .docx-hyperlink *::-moz-selection {
1412
+ background-color: rgba(26, 115, 232, 0.3) !important;
1413
+ color: inherit !important;
1414
+ }
611
1415
  .docx-hyperlink::selection,
612
1416
  .docx-hyperlink *::selection {
613
1417
  background-color: rgba(26, 115, 232, 0.3) !important;
@@ -621,6 +1425,10 @@ a.docx-hyperlink:focus-visible {
621
1425
  }
622
1426
 
623
1427
  /* Selection on highlighted text - use darker selection for visibility */
1428
+ .docx-run-highlighted::-moz-selection, .docx-run-highlighted *::-moz-selection {
1429
+ background-color: rgba(26, 115, 232, 0.5) !important;
1430
+ color: inherit !important;
1431
+ }
624
1432
  .docx-run-highlighted::selection,
625
1433
  .docx-run-highlighted *::selection {
626
1434
  background-color: rgba(26, 115, 232, 0.5) !important;
@@ -634,6 +1442,10 @@ a.docx-hyperlink:focus-visible {
634
1442
  }
635
1443
 
636
1444
  /* Selection on dark background text - lighter selection */
1445
+ .docx-run-dark-bg::-moz-selection, .docx-run-dark-bg *::-moz-selection {
1446
+ background-color: rgba(100, 181, 246, 0.5) !important;
1447
+ color: inherit !important;
1448
+ }
637
1449
  .docx-run-dark-bg::selection,
638
1450
  .docx-run-dark-bg *::selection {
639
1451
  background-color: rgba(100, 181, 246, 0.5) !important;
@@ -647,6 +1459,10 @@ a.docx-hyperlink:focus-visible {
647
1459
  }
648
1460
 
649
1461
  /* Selection on bold text - ensure same style */
1462
+ .docx-run-bold::-moz-selection, .docx-run-bold *::-moz-selection {
1463
+ background-color: rgba(26, 115, 232, 0.3) !important;
1464
+ color: inherit !important;
1465
+ }
650
1466
  .docx-run-bold::selection,
651
1467
  .docx-run-bold *::selection {
652
1468
  background-color: rgba(26, 115, 232, 0.3) !important;
@@ -660,6 +1476,10 @@ a.docx-hyperlink:focus-visible {
660
1476
  }
661
1477
 
662
1478
  /* Selection on italic text - ensure same style */
1479
+ .docx-run-italic::-moz-selection, .docx-run-italic *::-moz-selection {
1480
+ background-color: rgba(26, 115, 232, 0.3) !important;
1481
+ color: inherit !important;
1482
+ }
663
1483
  .docx-run-italic::selection,
664
1484
  .docx-run-italic *::selection {
665
1485
  background-color: rgba(26, 115, 232, 0.3) !important;
@@ -736,7 +1556,9 @@ a.docx-hyperlink:focus-visible {
736
1556
  position: absolute;
737
1557
  background-color: rgba(66, 133, 244, 0.25);
738
1558
  pointer-events: none;
739
- user-select: none;
1559
+ -webkit-user-select: none;
1560
+ -moz-user-select: none;
1561
+ user-select: none;
740
1562
  }
741
1563
 
742
1564
  /* ============================================================================
@@ -770,7 +1592,9 @@ a.docx-hyperlink:focus-visible {
770
1592
 
771
1593
  .docx-generated-region {
772
1594
  cursor: pointer;
773
- user-select: none;
1595
+ -webkit-user-select: none;
1596
+ -moz-user-select: none;
1597
+ user-select: none;
774
1598
  }
775
1599
 
776
1600
  /*
@@ -800,7 +1624,9 @@ a.docx-hyperlink:focus-visible {
800
1624
  .docx-content-control-label,
801
1625
  .docx-content-control-widget {
802
1626
  cursor: default;
803
- user-select: none;
1627
+ -webkit-user-select: none;
1628
+ -moz-user-select: none;
1629
+ user-select: none;
804
1630
  }
805
1631
 
806
1632
  /* Content-control boundary furniture — overlay only; never contributes layout. */
@@ -836,27 +1662,35 @@ a.docx-hyperlink:focus-visible {
836
1662
  opacity: 0;
837
1663
  }
838
1664
 
1665
+ /* The label tab, shown only while a control is ACTIVE or OPEN — never on plain hover.
1666
+ An inline control sits in running text with no clearance above it, so the tab lands on the
1667
+ previous line; on hover that means moving the pointer across a paragraph flashes labels over
1668
+ the words being read. Word shows it when you are in the control, and so does this. The ring
1669
+ and shadow are what keep it legible over whatever line it does land on. */
839
1670
  .docx-content-control-label {
840
1671
  box-sizing: border-box;
841
1672
  max-width: 12rem;
842
1673
  overflow: hidden;
843
1674
  padding: 1px 6px;
844
- border-radius: 3px 3px 0 0;
1675
+ border-radius: 3px;
845
1676
  background: var(--doc-primary);
846
1677
  color: var(--doc-on-primary);
847
1678
  font:
848
- 500 10px/14px system-ui,
1679
+ 500 10px/14px ui-sans-serif,
1680
+ system-ui,
849
1681
  sans-serif;
1682
+ letter-spacing: 0.01em;
850
1683
  text-overflow: ellipsis;
851
1684
  white-space: nowrap;
852
1685
  display: none;
853
1686
  pointer-events: none;
1687
+ box-shadow:
1688
+ 0 0 0 2px var(--doc-page-bg-rendered),
1689
+ 0 1px 4px color-mix(in srgb, var(--doc-primary) 35%, transparent);
854
1690
  }
855
1691
 
856
1692
  .docx-content-control-chrome[data-active] .docx-content-control-label,
857
- .docx-content-control-chrome[data-open] .docx-content-control-label,
858
- .docx-content-control-chrome[data-hover] .docx-content-control-label,
859
- .docx-content-control-chrome:hover .docx-content-control-label {
1693
+ .docx-content-control-chrome[data-open] .docx-content-control-label {
860
1694
  display: block;
861
1695
  }
862
1696
 
@@ -942,7 +1776,9 @@ a.docx-hyperlink:focus-visible {
942
1776
  border-radius: 8px;
943
1777
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
944
1778
  padding: 0.3rem;
945
- user-select: none;
1779
+ -webkit-user-select: none;
1780
+ -moz-user-select: none;
1781
+ user-select: none;
946
1782
  }
947
1783
 
948
1784
  .docx-content-control-menu-item {
@@ -1126,7 +1962,7 @@ a.docx-hyperlink:focus-visible {
1126
1962
  max-height: none;
1127
1963
  }
1128
1964
 
1129
- .ep-root.dark .docx-drawing-placeholder-card,
1965
+ .docx-editor.dark .docx-drawing-placeholder-card,
1130
1966
  .dark .docx-drawing-placeholder-card {
1131
1967
  background: var(--doc-surface-muted, #2a2a2a);
1132
1968
  border-color: var(--doc-border, #404040);
@@ -1140,7 +1976,9 @@ a.docx-hyperlink:focus-visible {
1140
1976
  /* Template variable highlighting - non-editable within run */
1141
1977
  .docx-run-has-variable [contenteditable='false'] {
1142
1978
  cursor: default;
1143
- user-select: all;
1979
+ -webkit-user-select: all;
1980
+ -moz-user-select: all;
1981
+ user-select: all;
1144
1982
  }
1145
1983
 
1146
1984
  /* Table interaction furniture (core-owned, semantic geometry). */
@@ -1496,14 +2334,14 @@ a.docx-hyperlink:focus-visible {
1496
2334
  /* React toolbar toggle buttons (bold/italic/comments/...). Owned here, not via
1497
2335
  * Tailwind utilities: `cn` is clsx-only (no tailwind-merge), so competing
1498
2336
  * hover:bg utilities don't dedupe and the active slab could lose its color on
1499
- * hover (white icon on a light bg). The `.ep-root` prefix outranks the
2337
+ * hover (white icon on a light bg). The `.docx-editor` prefix outranks the
1500
2338
  * single-class Tailwind hover utilities. */
1501
- .ep-root .ep-toolbar-toggle:hover {
2339
+ .docx-editor .docx-editor-toolbar-toggle:hover {
1502
2340
  background-color: var(--doc-bg-hover);
1503
2341
  color: var(--doc-text);
1504
2342
  }
1505
- .ep-root .ep-toolbar-toggle[data-active='true'],
1506
- .ep-root .ep-toolbar-toggle[data-active='true']:hover {
2343
+ .docx-editor .docx-editor-toolbar-toggle[data-active='true'],
2344
+ .docx-editor .docx-editor-toolbar-toggle[data-active='true']:hover {
1507
2345
  background-color: var(--doc-toggle-active-bg);
1508
2346
  color: var(--doc-toggle-active-fg);
1509
2347
  }
@@ -1691,10 +2529,10 @@ a.docx-hyperlink:focus-visible {
1691
2529
  }
1692
2530
 
1693
2531
  /* Body caret blink for the Vue adapter's painted caret (useSelectionSync sets
1694
- `animation: ep-caret-blink ...` inline). React drives its caret's blink from a
2532
+ `animation: docx-editor-caret-blink ...` inline). React drives its caret's blink from a
1695
2533
  JS timer instead; both land on the same 530ms half-period, which is the
1696
2534
  platform default. Defined here so the keyframes aren't duplicated per adapter. */
1697
- @keyframes ep-caret-blink {
2535
+ @keyframes docx-editor-caret-blink {
1698
2536
  0%,
1699
2537
  49% {
1700
2538
  opacity: 1;
@@ -1736,7 +2574,7 @@ a.docx-hyperlink:focus-visible {
1736
2574
  }
1737
2575
 
1738
2576
  /* Hyperlink popup icon button hover */
1739
- .ep-hyperlink-popup__icon-btn:hover {
2577
+ .docx-editor-hyperlink-popup__icon-btn:hover {
1740
2578
  background: var(--doc-bg-hover);
1741
2579
  }
1742
2580
 
@@ -1781,7 +2619,9 @@ a.docx-hyperlink:focus-visible {
1781
2619
  padding: 2px 4px;
1782
2620
  border-radius: 3px 3px 3px 0;
1783
2621
  white-space: nowrap;
1784
- user-select: none;
2622
+ -webkit-user-select: none;
2623
+ -moz-user-select: none;
2624
+ user-select: none;
1785
2625
  pointer-events: none;
1786
2626
  }
1787
2627
 
@@ -1826,7 +2666,9 @@ a.docx-hyperlink:focus-visible {
1826
2666
  pointer-events: auto;
1827
2667
  border-radius: 2px;
1828
2668
  outline-offset: 1px;
1829
- user-select: none;
2669
+ -webkit-user-select: none;
2670
+ -moz-user-select: none;
2671
+ user-select: none;
1830
2672
  }
1831
2673
  .layout-inline-sdt-widget:hover,
1832
2674
  .layout-inline-sdt-widget:focus {
@@ -2005,19 +2847,19 @@ a.docx-hyperlink:focus-visible {
2005
2847
  text-decoration: line-through;
2006
2848
  }
2007
2849
 
2008
- .ep-revision-cell.ep-revision-ins {
2850
+ .docx-editor-revision-cell.docx-editor-revision-ins {
2009
2851
  box-shadow: inset 0 3px 0 var(--doc-revision-insertion);
2010
2852
  background-color: var(--doc-revision-insertion-tint);
2011
2853
  }
2012
2854
 
2013
- .ep-revision-cell.ep-revision-del {
2855
+ .docx-editor-revision-cell.docx-editor-revision-del {
2014
2856
  box-shadow: inset 0 3px 0 var(--doc-revision-deletion);
2015
2857
  background-color: var(--doc-revision-deletion-tint);
2016
2858
  text-decoration: line-through;
2017
2859
  text-decoration-color: color-mix(in srgb, var(--doc-revision-deletion) 60%, transparent);
2018
2860
  }
2019
2861
 
2020
- .ep-revision-cell.ep-revision-merge {
2862
+ .docx-editor-revision-cell.docx-editor-revision-merge {
2021
2863
  box-shadow: inset 0 3px 0 var(--doc-text-muted);
2022
2864
  background-color: color-mix(in srgb, var(--doc-text-muted) 8%, transparent);
2023
2865
  }
@@ -2061,11 +2903,11 @@ a.docx-hyperlink:focus-visible {
2061
2903
  *
2062
2904
  * Layer model, bottom to top, inside one scroll container:
2063
2905
  *
2064
- * .ep-one-surface positioning context
2065
- * └ .ep-one-surface__pages stacked page boxes
2066
- * └ .ep-one-surface__page one engine-sized page box
2067
- * ├ .ep-one-surface__content painted DisplayItem[] (engine geometry)
2068
- * └ .ep-one-surface__overlay caret + selection, pointer-transparent
2906
+ * .docx-editor-one-surface positioning context
2907
+ * └ .docx-editor-one-surface__pages stacked page boxes
2908
+ * └ .docx-editor-one-surface__page one engine-sized page box
2909
+ * ├ .docx-editor-one-surface__content painted DisplayItem[] (engine geometry)
2910
+ * └ .docx-editor-one-surface__overlay caret + selection, pointer-transparent
2069
2911
  *
2070
2912
  * Every box that carries document geometry is positioned by the engine in
2071
2913
  * content pixels through inline styles. Nothing here invents or overrides a
@@ -2076,7 +2918,7 @@ a.docx-hyperlink:focus-visible {
2076
2918
  * and geometry and paint agree by construction.
2077
2919
  * ======================================================================== */
2078
2920
 
2079
- .ep-one-surface {
2921
+ .docx-editor-one-surface {
2080
2922
  position: relative;
2081
2923
  /* Page separation is a paint concern; the engine reports the same gap in
2082
2924
  * scrollGeometry so hit testing and paint stay in agreement. */
@@ -2085,7 +2927,7 @@ a.docx-hyperlink:focus-visible {
2085
2927
 
2086
2928
  /* Scroll container. The host reports scrollTop/scrollLeft to the engine as
2087
2929
  * InteractionHostMetrics.scrollOffset — the engine never reads the DOM. */
2088
- .ep-one-surface__viewport {
2930
+ .docx-editor-one-surface__viewport {
2089
2931
  position: relative;
2090
2932
  overflow: auto;
2091
2933
  overscroll-behavior: contain;
@@ -2102,9 +2944,10 @@ a.docx-hyperlink:focus-visible {
2102
2944
  * (`align-items: center` on a stretched box) instead offsets every page from the
2103
2945
  * stack origin, which shifts every hit test by that offset and makes clicks land
2104
2946
  * on "page background". */
2105
- .ep-one-surface__pages {
2947
+ .docx-editor-one-surface__pages {
2106
2948
  display: flex;
2107
2949
  flex-direction: column;
2950
+ width: -moz-max-content;
2108
2951
  width: max-content;
2109
2952
  margin-inline: auto;
2110
2953
  gap: var(--doc-page-gap);
@@ -2115,7 +2958,7 @@ a.docx-hyperlink:focus-visible {
2115
2958
  transform-origin: 0 0;
2116
2959
  }
2117
2960
 
2118
- .ep-one-surface__page {
2961
+ .docx-editor-one-surface__page {
2119
2962
  position: relative;
2120
2963
  flex: none;
2121
2964
  background: var(--doc-page-bg);
@@ -2128,55 +2971,73 @@ a.docx-hyperlink:focus-visible {
2128
2971
  /* Painted display items. Text is selected through the engine's semantic
2129
2972
  * selection, never the browser's, so native selection is suppressed here to
2130
2973
  * stop a second, contradictory selection appearing on the same glyphs. */
2131
- .ep-one-surface__content {
2974
+ .docx-editor-one-surface__content {
2132
2975
  position: absolute;
2133
2976
  inset: 0;
2134
- user-select: none;
2977
+ -moz-user-select: none;
2978
+ user-select: none;
2135
2979
  -webkit-user-select: none;
2136
2980
  }
2137
2981
 
2138
- .ep-one-surface__content > * {
2982
+ .docx-editor-one-surface__content > * {
2139
2983
  position: absolute;
2140
2984
  }
2141
2985
 
2142
2986
  /* Overlay layer: caret and selection rectangles, both derived from
2143
2987
  * interaction-frame geometry. Pointer-transparent so a click always reaches
2144
2988
  * the page and resolves through the engine hit test. */
2145
- .ep-one-surface__overlay {
2989
+ .docx-editor-one-surface__overlay {
2146
2990
  position: absolute;
2147
2991
  inset: 0;
2148
2992
  pointer-events: none;
2149
2993
  }
2150
2994
 
2151
- .ep-one-surface__selection-rect {
2995
+ .docx-editor-one-surface__selection-rect {
2152
2996
  position: absolute;
2153
2997
  background: var(--doc-selection);
2154
2998
  }
2155
2999
 
2156
- .ep-one-surface__caret {
3000
+ .docx-editor-one-surface__caret {
2157
3001
  position: absolute;
2158
3002
  /* 2px, not 1: a hairline caret disappears against body text at 100% zoom on a
2159
3003
  * high-DPI screen, and reads as a rendering artefact rather than a cursor.
2160
3004
  * Every desktop word processor draws a two-pixel insertion point. */
2161
3005
  width: 2px;
2162
3006
  background: var(--doc-caret);
2163
- animation: ep-caret-blink 1.06s steps(1) infinite;
3007
+ /* A CONTRASTING 1px ring, because a caret position is not always beside text: the offset
3008
+ * before an inline image puts the insertion point exactly on the picture's leading edge,
3009
+ * so a full-width dark photo swallowed the near-black bar whole — the user could type
3010
+ * there and see nothing. Dark table shading and dark highlights do it to a lesser degree.
3011
+ *
3012
+ * The ring and the core are a complementary pair, so whichever one the backdrop hides,
3013
+ * the other reads. On an ordinary white page the ring is white on white and the caret
3014
+ * looks exactly as it did before.
3015
+ *
3016
+ * NOT `mix-blend-mode: difference`, which is the textbook XOR caret and is wrong here:
3017
+ * blending resolves against the nearest ISOLATED GROUP, and this stylesheet puts two of
3018
+ * them between the caret and the paper — the dark page's `filter` on
3019
+ * `.docx-page-content`, and the `opacity` that dims the body during header/footer
3020
+ * editing. Inside either, the backdrop is transparent rather than the sheet's paper, so
3021
+ * the caret would blend to white and the dark page's inversion would then paint it black
3022
+ * on black: the very bug this ring exists to fix. The pair needs no backdrop at all. */
3023
+ box-shadow: 0 0 0 1px var(--doc-caret-contrast);
3024
+ animation: docx-editor-caret-blink 1.06s steps(1) infinite;
2164
3025
  }
2165
3026
 
2166
3027
  /* A caret that is being moved or dragged should not blink. */
2167
- .ep-one-surface__caret--steady {
3028
+ .docx-editor-one-surface__caret--steady {
2168
3029
  animation: none;
2169
3030
  }
2170
3031
 
2171
3032
  /* Right-to-left runs paint their caret on the trailing edge; the engine
2172
3033
  * supplies the rect, this only marks direction for the host. */
2173
- .ep-one-surface__caret--rtl {
3034
+ .docx-editor-one-surface__caret--rtl {
2174
3035
  direction: rtl;
2175
3036
  }
2176
3037
 
2177
3038
  /* Active IME composition. The composed range stays visible under the engine
2178
3039
  * selection so the user can see what the input method is holding. */
2179
- .ep-one-surface__composition {
3040
+ .docx-editor-one-surface__composition {
2180
3041
  position: absolute;
2181
3042
  border-bottom: 1px solid var(--doc-text);
2182
3043
  pointer-events: none;
@@ -2186,7 +3047,7 @@ a.docx-hyperlink:focus-visible {
2186
3047
  * object controls that must receive their own pointer events. Anything using
2187
3048
  * this class opts out deliberately — it is not the default for overlay content.
2188
3049
  */
2189
- .ep-one-surface__overlay-control {
3050
+ .docx-editor-one-surface__overlay-control {
2190
3051
  pointer-events: auto;
2191
3052
  }
2192
3053
 
@@ -2213,13 +3074,13 @@ a.docx-hyperlink:focus-visible {
2213
3074
 
2214
3075
  /* The host must never expose a second visible or assistive copy of the
2215
3076
  * document, so its projected content is not painted. */
2216
- .ep-one-surface__input-host * {
3077
+ .docx-editor-one-surface__input-host * {
2217
3078
  color: transparent;
2218
3079
  }
2219
3080
 
2220
3081
  /* Private browser-feedback checkpoint: one page-like sheet with the real
2221
3082
  * ProseMirror contenteditable. It is deliberately not a pagination claim. */
2222
- .ep-browser-first__page {
3083
+ .docx-editor-browser-first__page {
2223
3084
  box-sizing: border-box;
2224
3085
  width: 816px;
2225
3086
  min-height: 1056px;
@@ -2228,12 +3089,12 @@ a.docx-hyperlink:focus-visible {
2228
3089
  cursor: text;
2229
3090
  }
2230
3091
 
2231
- .ep-browser-first__mount,
2232
- .ep-browser-first__mount * {
3092
+ .docx-editor-browser-first__mount,
3093
+ .docx-editor-browser-first__mount * {
2233
3094
  color: var(--doc-caret);
2234
3095
  }
2235
3096
 
2236
- .ep-browser-first__mount .ProseMirror {
3097
+ .docx-editor-browser-first__mount .ProseMirror {
2237
3098
  min-height: 864px;
2238
3099
  outline: none;
2239
3100
  font-size: 11pt;
@@ -2242,12 +3103,12 @@ a.docx-hyperlink:focus-visible {
2242
3103
  overflow-wrap: break-word;
2243
3104
  }
2244
3105
 
2245
- .ep-browser-first__mount .ProseMirror p {
3106
+ .docx-editor-browser-first__mount .ProseMirror p {
2246
3107
  margin: 0 0 0.75em;
2247
3108
  }
2248
3109
 
2249
3110
  @media (prefers-reduced-motion: reduce) {
2250
- .ep-one-surface__caret {
3111
+ .docx-editor-one-surface__caret {
2251
3112
  animation: none;
2252
3113
  }
2253
3114
  }
@@ -2260,12 +3121,12 @@ a.docx-hyperlink:focus-visible {
2260
3121
  * toolbar, rulers, and the page indicator.
2261
3122
  *
2262
3123
  * The shell owns CHROME ONLY. It sets no document geometry — the page stack
2263
- * inside `.ep-shell__canvas` is positioned by the engine, and the shell must
3124
+ * inside `.docx-editor-shell__canvas` is positioned by the engine, and the shell must
2264
3125
  * not introduce any horizontal offset the engine does not know about, or hit
2265
3126
  * testing drifts (the lesson from M3's centering bug).
2266
3127
  * ======================================================================== */
2267
3128
 
2268
- .ep-shell {
3129
+ .docx-editor-shell {
2269
3130
  display: flex;
2270
3131
  flex-direction: column;
2271
3132
  min-height: 0;
@@ -2274,15 +3135,15 @@ a.docx-hyperlink:focus-visible {
2274
3135
  color: var(--doc-text);
2275
3136
  }
2276
3137
 
2277
- .ep-shell__title,
2278
- .ep-shell__toolbar {
3138
+ .docx-editor-shell__title,
3139
+ .docx-editor-shell__toolbar {
2279
3140
  flex: none;
2280
3141
  border-bottom: 1px solid var(--doc-border);
2281
3142
  background: var(--doc-surface);
2282
3143
  }
2283
3144
 
2284
3145
  /* The scrolling document region — the backdrop the page sits on. */
2285
- .ep-shell__document {
3146
+ .docx-editor-shell__document {
2286
3147
  position: relative;
2287
3148
  flex: 1;
2288
3149
  min-height: 0;
@@ -2294,7 +3155,7 @@ a.docx-hyperlink:focus-visible {
2294
3155
 
2295
3156
  /* Sticky horizontal ruler: scrolls horizontally with the document, stays put
2296
3157
  * vertically, and never covers the page content. */
2297
- .ep-shell__ruler-h {
3158
+ .docx-editor-shell__ruler-h {
2298
3159
  position: sticky;
2299
3160
  top: 0;
2300
3161
  z-index: 2;
@@ -2305,7 +3166,7 @@ a.docx-hyperlink:focus-visible {
2305
3166
  background: var(--doc-bg);
2306
3167
  }
2307
3168
 
2308
- .ep-shell__canvas {
3169
+ .docx-editor-shell__canvas {
2309
3170
  position: relative;
2310
3171
  flex: 1;
2311
3172
  min-height: 0;
@@ -2314,7 +3175,7 @@ a.docx-hyperlink:focus-visible {
2314
3175
  }
2315
3176
 
2316
3177
  /* Vertical ruler pinned to the canvas's left edge so it scrolls with the page. */
2317
- .ep-shell__ruler-v {
3178
+ .docx-editor-shell__ruler-v {
2318
3179
  position: absolute;
2319
3180
  left: 0;
2320
3181
  top: 0;
@@ -2323,16 +3184,16 @@ a.docx-hyperlink:focus-visible {
2323
3184
  }
2324
3185
 
2325
3186
  /* The one-surface viewport fills the canvas. Page centering stays the page
2326
- * stack's own job (`margin-inline: auto` on `.ep-one-surface__pages`), so the
3187
+ * stack's own job (`margin-inline: auto` on `.docx-editor-one-surface__pages`), so the
2327
3188
  * shell adds no offset the engine would have to be told about. */
2328
- .ep-shell__canvas > .ep-one-surface {
3189
+ .docx-editor-shell__canvas > .docx-editor-one-surface {
2329
3190
  flex: 1;
2330
3191
  min-width: 0;
2331
3192
  }
2332
3193
 
2333
3194
  /* Floating page indicator, out of the document flow and pointer-transparent so
2334
3195
  * it can never swallow a click meant for the page. */
2335
- .ep-shell__page-indicator {
3196
+ .docx-editor-shell__page-indicator {
2336
3197
  position: absolute;
2337
3198
  bottom: 16px;
2338
3199
  left: 50%;
@@ -2344,8 +3205,8 @@ a.docx-hyperlink:focus-visible {
2344
3205
  /* Document scroll region padding: breathing room around the sheet, matching the
2345
3206
  * legacy backdrop. Applied to the viewport rather than the page stack so it
2346
3207
  * cannot shift the stack origin away from the engine's page origin. */
2347
- .ep-shell .ep-one-surface__viewport,
2348
- .docx-editor__content .ep-one-surface__viewport {
3208
+ .docx-editor-shell .docx-editor-one-surface__viewport,
3209
+ .docx-editor__content .docx-editor-one-surface__viewport {
2349
3210
  padding: 24px 0;
2350
3211
  scrollbar-gutter: stable both-edges;
2351
3212
  }
@@ -2354,7 +3215,7 @@ a.docx-hyperlink:focus-visible {
2354
3215
  * stays inline in `DocxEditorShell.tsx`; only what it expressed in CSS is here.
2355
3216
  *
2356
3217
  * A DEVIATION RECORDED HERE EARLIER IS NOW REVERTED: this file used to keep
2357
- * `.ep-one-surface__viewport` as the scroller inside the shell as well. With the shell's
3218
+ * `.docx-editor-one-surface__viewport` as the scroller inside the shell as well. With the shell's
2358
3219
  * container also declaring `overflow: auto`, neither box ended up bounded — the whole
2359
3220
  * chain grew to document height and the window scrolled, so the page indicator never
2360
3221
  * left page 1. Legacy's structure is restored: inside the shell,
@@ -2362,7 +3223,7 @@ a.docx-hyperlink:focus-visible {
2362
3223
  * Bare (no chrome), the viewport still scrolls and nothing about it changes. */
2363
3224
 
2364
3225
  /* Hosted in the shell: the shell's container scrolls, not this box. */
2365
- .ep-one-surface__viewport--hosted {
3226
+ .docx-editor-one-surface__viewport--hosted {
2366
3227
  overflow: visible;
2367
3228
  }
2368
3229
  /* The title + menu column, INSIDE the header row (legacy layout). It used to render as
@@ -2392,14 +3253,14 @@ a.docx-hyperlink:focus-visible {
2392
3253
 
2393
3254
  /* Title chrome and page indicator (interactive-paginated-editing M4.3). */
2394
3255
 
2395
- .ep-shell__title-bar {
3256
+ .docx-editor-shell__title-bar {
2396
3257
  display: flex;
2397
3258
  align-items: center;
2398
3259
  gap: 12px;
2399
3260
  padding: 8px 16px;
2400
3261
  }
2401
3262
 
2402
- .ep-shell__title-input {
3263
+ .docx-editor-shell__title-input {
2403
3264
  flex: 1;
2404
3265
  min-width: 0;
2405
3266
  border: 1px solid transparent;
@@ -2415,17 +3276,17 @@ a.docx-hyperlink:focus-visible {
2415
3276
  background: transparent;
2416
3277
  }
2417
3278
 
2418
- .ep-shell__title-input:hover:not([readonly]) {
3279
+ .docx-editor-shell__title-input:hover:not([readonly]) {
2419
3280
  border-color: var(--doc-border);
2420
3281
  }
2421
3282
 
2422
- .ep-shell__title-input:focus {
3283
+ .docx-editor-shell__title-input:focus {
2423
3284
  outline: none;
2424
3285
  border-color: var(--doc-primary);
2425
3286
  box-shadow: 0 0 0 2px var(--doc-focus-ring);
2426
3287
  }
2427
3288
 
2428
- .ep-shell__title-actions {
3289
+ .docx-editor-shell__title-actions {
2429
3290
  display: flex;
2430
3291
  align-items: center;
2431
3292
  gap: 8px;
@@ -2433,7 +3294,7 @@ a.docx-hyperlink:focus-visible {
2433
3294
 
2434
3295
  /* The indicator is a dark scrim in BOTH themes, so its text stays light —
2435
3296
  * --doc-on-primary flips dark in dark mode and would vanish here. */
2436
- .ep-shell__page-indicator-chip {
3297
+ .docx-editor-shell__page-indicator-chip {
2437
3298
  background: var(--doc-overlay);
2438
3299
  color: #fff;
2439
3300
  padding: 6px 12px;
@@ -2445,7 +3306,9 @@ a.docx-hyperlink:focus-visible {
2445
3306
  Roboto,
2446
3307
  sans-serif;
2447
3308
  white-space: nowrap;
2448
- user-select: none;
3309
+ -webkit-user-select: none;
3310
+ -moz-user-select: none;
3311
+ user-select: none;
2449
3312
  transition: opacity 0.3s ease;
2450
3313
  /* A status readout, never a control. Both PageIndicator components document that
2451
3314
  * this element "never intercepts pointer events", but nothing enforced it: Playwright
@@ -2475,16 +3338,18 @@ a.docx-hyperlink:focus-visible {
2475
3338
  * markers and no drag handles: this change owns no section-geometry contract,
2476
3339
  * so a draggable handle would be a control that silently does nothing. */
2477
3340
 
2478
- .ep-ruler {
3341
+ .docx-editor-ruler {
2479
3342
  position: relative;
2480
3343
  background: var(--doc-surface);
2481
3344
  border: 1px solid var(--doc-border-light);
2482
3345
  border-radius: 2px;
2483
- user-select: none;
3346
+ -webkit-user-select: none;
3347
+ -moz-user-select: none;
3348
+ user-select: none;
2484
3349
  pointer-events: none;
2485
3350
  }
2486
3351
 
2487
- .ep-ruler--horizontal {
3352
+ .docx-editor-ruler--horizontal {
2488
3353
  height: 22px;
2489
3354
  }
2490
3355
 
@@ -2502,26 +3367,26 @@ a.docx-hyperlink:focus-visible {
2502
3367
  }
2503
3368
  }
2504
3369
 
2505
- .ep-ruler--vertical {
3370
+ .docx-editor-ruler--vertical {
2506
3371
  height: 100%;
2507
3372
  }
2508
3373
 
2509
- .ep-ruler__tick {
3374
+ .docx-editor-ruler__tick {
2510
3375
  position: absolute;
2511
3376
  background: var(--doc-text-subtle);
2512
3377
  }
2513
3378
 
2514
- .ep-ruler--horizontal .ep-ruler__tick {
3379
+ .docx-editor-ruler--horizontal .docx-editor-ruler__tick {
2515
3380
  bottom: 0;
2516
3381
  width: 1px;
2517
3382
  }
2518
3383
 
2519
- .ep-ruler--vertical .ep-ruler__tick {
3384
+ .docx-editor-ruler--vertical .docx-editor-ruler__tick {
2520
3385
  right: 0;
2521
3386
  height: 1px;
2522
3387
  }
2523
3388
 
2524
- .ep-ruler__label {
3389
+ .docx-editor-ruler__label {
2525
3390
  position: absolute;
2526
3391
  font:
2527
3392
  400 9px/1 -apple-system,
@@ -2532,12 +3397,12 @@ a.docx-hyperlink:focus-visible {
2532
3397
  color: var(--doc-text-muted);
2533
3398
  }
2534
3399
 
2535
- .ep-ruler--horizontal .ep-ruler__label {
3400
+ .docx-editor-ruler--horizontal .docx-editor-ruler__label {
2536
3401
  left: 2px;
2537
3402
  bottom: 11px;
2538
3403
  }
2539
3404
 
2540
- .ep-ruler--vertical .ep-ruler__label {
3405
+ .docx-editor-ruler--vertical .docx-editor-ruler__label {
2541
3406
  right: 11px;
2542
3407
  top: -4px;
2543
3408
  }
@@ -2557,7 +3422,7 @@ a.docx-hyperlink:focus-visible {
2557
3422
  * (Toolbar.tsx:679: `flex items-center px-2 py-1 bg-muted rounded-full min-h-[36px]
2558
3423
  * overflow-x-auto mx-2 mb-1`). Only the scroll behaviour stays here: the pill scrolls
2559
3424
  * horizontally and must never become a second VERTICAL scroller. */
2560
- .ep-toolbar {
3425
+ .docx-editor-toolbar {
2561
3426
  flex-wrap: nowrap;
2562
3427
  flex-shrink: 0;
2563
3428
  overflow-y: hidden;
@@ -2566,12 +3431,12 @@ a.docx-hyperlink:focus-visible {
2566
3431
 
2567
3432
  /* One group plus the separator that precedes it, so the pair wraps together and a
2568
3433
  * separator never becomes the first thing on a wrapped row. */
2569
- .ep-toolbar__group-wrap {
3434
+ .docx-editor-toolbar__group-wrap {
2570
3435
  display: inline-flex;
2571
3436
  align-items: center;
2572
3437
  }
2573
3438
 
2574
- .ep-toolbar__group {
3439
+ .docx-editor-toolbar__group {
2575
3440
  display: flex;
2576
3441
  align-items: center;
2577
3442
  gap: 2px;
@@ -2579,7 +3444,7 @@ a.docx-hyperlink:focus-visible {
2579
3444
 
2580
3445
  /* Visually hidden but present for assistive technology: a parity-only picker has no
2581
3446
  * tooltip of its own, so its unavailable reason is exposed here instead. */
2582
- .ep-sr-only {
3447
+ .docx-editor-sr-only {
2583
3448
  position: absolute;
2584
3449
  width: 1px;
2585
3450
  height: 1px;
@@ -2591,7 +3456,7 @@ a.docx-hyperlink:focus-visible {
2591
3456
  border: 0;
2592
3457
  }
2593
3458
 
2594
- .ep-toolbar__separator {
3459
+ .docx-editor-toolbar__separator {
2595
3460
  width: 1px;
2596
3461
  align-self: stretch;
2597
3462
  margin: 4px 6px;
@@ -2600,7 +3465,7 @@ a.docx-hyperlink:focus-visible {
2600
3465
 
2601
3466
  /* Sidebar frame (interactive-paginated-editing M4.6). */
2602
3467
 
2603
- .ep-sidebar {
3468
+ .docx-editor-sidebar {
2604
3469
  display: flex;
2605
3470
  flex-direction: column;
2606
3471
  width: 300px;
@@ -2609,7 +3474,7 @@ a.docx-hyperlink:focus-visible {
2609
3474
  background: var(--doc-surface);
2610
3475
  }
2611
3476
 
2612
- .ep-sidebar__header {
3477
+ .docx-editor-sidebar__header {
2613
3478
  display: flex;
2614
3479
  align-items: center;
2615
3480
  justify-content: space-between;
@@ -2618,7 +3483,7 @@ a.docx-hyperlink:focus-visible {
2618
3483
  border-bottom: 1px solid var(--doc-border);
2619
3484
  }
2620
3485
 
2621
- .ep-sidebar__title {
3486
+ .docx-editor-sidebar__title {
2622
3487
  font:
2623
3488
  500 13px/1.2 -apple-system,
2624
3489
  BlinkMacSystemFont,
@@ -2628,7 +3493,7 @@ a.docx-hyperlink:focus-visible {
2628
3493
  color: var(--doc-text);
2629
3494
  }
2630
3495
 
2631
- .ep-sidebar__close {
3496
+ .docx-editor-sidebar__close {
2632
3497
  display: inline-flex;
2633
3498
  align-items: center;
2634
3499
  justify-content: center;
@@ -2641,11 +3506,11 @@ a.docx-hyperlink:focus-visible {
2641
3506
  cursor: pointer;
2642
3507
  }
2643
3508
 
2644
- .ep-sidebar__close:hover {
3509
+ .docx-editor-sidebar__close:hover {
2645
3510
  background: var(--doc-bg-hover);
2646
3511
  }
2647
3512
 
2648
- .ep-sidebar__body {
3513
+ .docx-editor-sidebar__body {
2649
3514
  flex: 1;
2650
3515
  min-height: 0;
2651
3516
  overflow: auto;
@@ -2778,7 +3643,7 @@ a.docx-hyperlink:focus-visible {
2778
3643
  }
2779
3644
 
2780
3645
  /* The page floats on the workspace backdrop with a drop shadow, as in the reference. */
2781
- .docx-editor__content .ep-one-surface__page {
3646
+ .docx-editor__content .docx-editor-one-surface__page {
2782
3647
  box-shadow:
2783
3648
  0 1px 3px rgb(60 64 67 / 30%),
2784
3649
  0 4px 8px 3px rgb(60 64 67 / 15%);
@@ -2882,14 +3747,14 @@ a.docx-hyperlink:focus-visible {
2882
3747
  }
2883
3748
 
2884
3749
  /* The pill needs enough fill to read AS a pill against the workspace. */
2885
- .ep-toolbar {
3750
+ .docx-editor-toolbar {
2886
3751
  background: var(--doc-bg-subtle);
2887
3752
  border: 1px solid var(--doc-border);
2888
3753
  }
2889
3754
 
2890
3755
  /* Ruler margin zones (M6V.6), from the legacy `ui/HorizontalRuler.tsx`:
2891
3756
  * `MARGIN_ZONE_COLOR = var(--doc-shadow-subtle)` with a 1px border on the inner edge. */
2892
- .ep-ruler__margin {
3757
+ .docx-editor-ruler__margin {
2893
3758
  position: absolute;
2894
3759
  top: 0;
2895
3760
  bottom: 0;
@@ -2897,26 +3762,26 @@ a.docx-hyperlink:focus-visible {
2897
3762
  pointer-events: none;
2898
3763
  }
2899
3764
 
2900
- .ep-ruler__margin--start {
3765
+ .docx-editor-ruler__margin--start {
2901
3766
  left: 0;
2902
3767
  border-right: 1px solid var(--doc-shadow-subtle);
2903
3768
  }
2904
3769
 
2905
- .ep-ruler__margin--end {
3770
+ .docx-editor-ruler__margin--end {
2906
3771
  right: 0;
2907
3772
  border-left: 1px solid var(--doc-shadow-subtle);
2908
3773
  }
2909
3774
 
2910
- /* The vertical ruler's zones run the other axis; the shared `.ep-ruler__margin` rule
3775
+ /* The vertical ruler's zones run the other axis; the shared `.docx-editor-ruler__margin` rule
2911
3776
  * pins top/bottom, so these override the horizontal defaults. */
2912
- .ep-ruler__margin--top {
3777
+ .docx-editor-ruler__margin--top {
2913
3778
  left: 0;
2914
3779
  right: 0;
2915
3780
  bottom: auto;
2916
3781
  border-bottom: 1px solid var(--doc-shadow-subtle);
2917
3782
  }
2918
3783
 
2919
- .ep-ruler__margin--bottom {
3784
+ .docx-editor-ruler__margin--bottom {
2920
3785
  left: 0;
2921
3786
  right: 0;
2922
3787
  top: auto;
@@ -2942,7 +3807,9 @@ a.docx-hyperlink:focus-visible {
2942
3807
  transparent 4px 8px
2943
3808
  );
2944
3809
  cursor: default;
2945
- user-select: none;
3810
+ -webkit-user-select: none;
3811
+ -moz-user-select: none;
3812
+ user-select: none;
2946
3813
  }
2947
3814
 
2948
3815
  /* A tab renders as whitespace that can still be seen while selecting. */
@@ -2959,19 +3826,19 @@ a.docx-hyperlink:focus-visible {
2959
3826
  position: relative;
2960
3827
  outline: none;
2961
3828
  }
2962
- .ep-root.dark .docx-paginated-surface .docx-page {
3829
+ .docx-editor.dark .docx-paginated-surface .docx-page {
2963
3830
  background: var(--doc-page-bg-rendered);
2964
3831
  }
2965
3832
  /* Paper is always white, whatever the screen theme. Without resetting the CONTENT
2966
3833
  inversion here, printing in dark mode left near-white text on paper the printer drops to
2967
3834
  white — blank pages. `print-color-adjust` stops the sheet colour being dropped too. */
2968
3835
  @media print {
2969
- .ep-root.dark .docx-page-content,
2970
- .ep-root.dark .docx-page-content img,
2971
- .ep-root.dark .docx-page-content svg,
2972
- .ep-root.dark .docx-page-content canvas,
2973
- .ep-root.dark .docx-page-content video,
2974
- .ep-root.dark .docx-page-content [data-no-color-invert] {
3836
+ .docx-editor.dark .docx-page-content,
3837
+ .docx-editor.dark .docx-page-content img,
3838
+ .docx-editor.dark .docx-page-content svg,
3839
+ .docx-editor.dark .docx-page-content canvas,
3840
+ .docx-editor.dark .docx-page-content video,
3841
+ .docx-editor.dark .docx-page-content [data-no-color-invert] {
2975
3842
  filter: none !important;
2976
3843
  }
2977
3844
  .docx-paginated-surface .docx-page {
@@ -2994,7 +3861,8 @@ a.docx-hyperlink:focus-visible {
2994
3861
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
2995
3862
  /* Painted text stays selectable so the BROWSER can run drag, double-click-for-a-word and
2996
3863
  triple-click-for-a-paragraph; the surface reads the result back as model positions. */
2997
- user-select: text;
3864
+ -moz-user-select: text;
3865
+ user-select: text;
2998
3866
  -webkit-user-select: text;
2999
3867
  }
3000
3868
  /* The caret and the TEXT highlight are the BROWSER's, so they follow real glyph shapes and
@@ -3034,7 +3902,8 @@ a.docx-hyperlink:focus-visible {
3034
3902
  sans-serif;
3035
3903
  font-size: 12px;
3036
3904
  color: var(--doc-primary);
3037
- user-select: none;
3905
+ -moz-user-select: none;
3906
+ user-select: none;
3038
3907
  -webkit-user-select: none;
3039
3908
  }
3040
3909
 
@@ -3044,7 +3913,7 @@ a.docx-hyperlink:focus-visible {
3044
3913
 
3045
3914
  /* Hovering an EXISTING inactive band tints it and floats an edit invitation beside it —
3046
3915
  * without this the enterable header answered a hover with nothing at all. The pill is a
3047
- * sibling because the band clips its own overflow. */
3916
+ * sibling because the `+` selector below needs it right after the band. */
3048
3917
  .docx-pages .docx-hf:not([data-docx-hf-active]):not(.docx-hf--placeholder):hover {
3049
3918
  background: var(--doc-primary-light);
3050
3919
  border-radius: 4px;
@@ -3075,7 +3944,8 @@ a.docx-hyperlink:focus-visible {
3075
3944
  border-radius: 10px;
3076
3945
  padding: 0 10px;
3077
3946
  margin-top: 4px;
3078
- user-select: none;
3947
+ -moz-user-select: none;
3948
+ user-select: none;
3079
3949
  -webkit-user-select: none;
3080
3950
  }
3081
3951
 
@@ -3179,7 +4049,7 @@ a.docx-hyperlink:focus-visible {
3179
4049
  * - bar: `flex items-center px-2 py-1 bg-muted rounded-full min-h-[36px]`
3180
4050
  * — the neutral #f1f3f4-family pill.
3181
4051
  * - buttons: 28px ghost squares (h-7 w-7), muted
3182
- * glyphs, subtle hover, the dark active slab (`.ep-toolbar-toggle`
4052
+ * glyphs, subtle hover, the dark active slab (`.docx-editor-toolbar-toggle`
3183
4053
  * [data-active] → --doc-toggle-active tokens), disabled at opacity .3.
3184
4054
  * - pickers (style, font family, editing mode): TRANSPARENT triggers with a
3185
4055
  * chevron (h-8 rounded px-2 bg-transparent hover:bg-muted/80),
@@ -3323,7 +4193,9 @@ a.docx-hyperlink:focus-visible {
3323
4193
  font-size: 11px;
3324
4194
  font-weight: 600;
3325
4195
  color: var(--doc-text-muted);
3326
- user-select: none;
4196
+ -webkit-user-select: none;
4197
+ -moz-user-select: none;
4198
+ user-select: none;
3327
4199
  }
3328
4200
 
3329
4201
  /* A control row: the registry's name on the left, the real control on the right. */
@@ -3427,7 +4299,9 @@ a.docx-hyperlink:focus-visible {
3427
4299
  background: transparent;
3428
4300
  color: var(--doc-text);
3429
4301
  white-space: nowrap;
3430
- user-select: none;
4302
+ -webkit-user-select: none;
4303
+ -moz-user-select: none;
4304
+ user-select: none;
3431
4305
  }
3432
4306
 
3433
4307
  .docx-toolbar__picker[aria-disabled='true'] {
@@ -3554,7 +4428,7 @@ a.docx-hyperlink:focus-visible {
3554
4428
  cursor: default;
3555
4429
  }
3556
4430
 
3557
- .ep-root .docx-menubar__item[aria-disabled='true']:hover {
4431
+ .docx-editor .docx-menubar__item[aria-disabled='true']:hover {
3558
4432
  background: transparent;
3559
4433
  }
3560
4434
 
@@ -3564,7 +4438,9 @@ a.docx-hyperlink:focus-visible {
3564
4438
  font-size: 11px;
3565
4439
  font-weight: 600;
3566
4440
  color: var(--doc-text-muted);
3567
- user-select: none;
4441
+ -webkit-user-select: none;
4442
+ -moz-user-select: none;
4443
+ user-select: none;
3568
4444
  }
3569
4445
 
3570
4446
  .docx-toolbar__menu-separator {
@@ -3652,7 +4528,9 @@ a.docx-hyperlink:focus-visible {
3652
4528
  text-align: center;
3653
4529
  color: var(--doc-text);
3654
4530
  font-variant-numeric: tabular-nums;
3655
- user-select: none;
4531
+ -webkit-user-select: none;
4532
+ -moz-user-select: none;
4533
+ user-select: none;
3656
4534
  }
3657
4535
 
3658
4536
  /* The boxed font-size value: `h-7 w-10 border bg-doc-bg-input rounded-none`. */
@@ -3885,7 +4763,9 @@ a.docx-hyperlink:focus-visible {
3885
4763
  .docx-toolbar__swatch-heading {
3886
4764
  font-size: 11px;
3887
4765
  color: var(--doc-text-muted);
3888
- user-select: none;
4766
+ -webkit-user-select: none;
4767
+ -moz-user-select: none;
4768
+ user-select: none;
3889
4769
  white-space: nowrap;
3890
4770
  }
3891
4771
 
@@ -3979,7 +4859,9 @@ a.docx-hyperlink:focus-visible {
3979
4859
  .docx-toolbar__swatch-hash {
3980
4860
  color: var(--doc-text-muted);
3981
4861
  font-size: 12px;
3982
- user-select: none;
4862
+ -webkit-user-select: none;
4863
+ -moz-user-select: none;
4864
+ user-select: none;
3983
4865
  }
3984
4866
 
3985
4867
  .docx-toolbar__swatch-hex {
@@ -4339,20 +5221,20 @@ a.docx-hyperlink:focus-visible {
4339
5221
  }
4340
5222
  }
4341
5223
 
4342
- /* ── Vue registry-toolbar (`ep-toolbar` family) additions for the same shapes:
5224
+ /* ── Vue registry-toolbar (`docx-editor-toolbar` family) additions for the same shapes:
4343
5225
  * the parity stepper lookalike and the merged alignment dropdown. */
4344
- .ep-toolbar__stepper {
5226
+ .docx-editor-toolbar__stepper {
4345
5227
  display: inline-flex;
4346
5228
  align-items: center;
4347
5229
  height: 28px;
4348
5230
  flex: none;
4349
5231
  }
4350
5232
 
4351
- .ep-toolbar__stepper[aria-disabled='true'] {
5233
+ .docx-editor-toolbar__stepper[aria-disabled='true'] {
4352
5234
  opacity: 0.5;
4353
5235
  }
4354
5236
 
4355
- .ep-toolbar__stepper-button {
5237
+ .docx-editor-toolbar__stepper-button {
4356
5238
  display: inline-flex;
4357
5239
  align-items: center;
4358
5240
  justify-content: center;
@@ -4360,22 +5242,26 @@ a.docx-hyperlink:focus-visible {
4360
5242
  height: 28px;
4361
5243
  color: var(--doc-text-muted);
4362
5244
  font-size: 14px;
4363
- user-select: none;
5245
+ -webkit-user-select: none;
5246
+ -moz-user-select: none;
5247
+ user-select: none;
4364
5248
  }
4365
5249
 
4366
- .ep-toolbar__stepper-value {
5250
+ .docx-editor-toolbar__stepper-value {
4367
5251
  min-width: 34px;
4368
5252
  text-align: center;
4369
5253
  font-variant-numeric: tabular-nums;
4370
- user-select: none;
5254
+ -webkit-user-select: none;
5255
+ -moz-user-select: none;
5256
+ user-select: none;
4371
5257
  }
4372
5258
 
4373
- .ep-toolbar__alignment {
5259
+ .docx-editor-toolbar__alignment {
4374
5260
  position: relative;
4375
5261
  display: inline-flex;
4376
5262
  }
4377
5263
 
4378
- .ep-toolbar__alignment-popup {
5264
+ .docx-editor-toolbar__alignment-popup {
4379
5265
  position: absolute;
4380
5266
  top: 100%;
4381
5267
  left: 0;
@@ -4411,7 +5297,7 @@ a.docx-hyperlink:focus-visible {
4411
5297
 
4412
5298
  /* The default screen when the host supplies no children.
4413
5299
  `display` and `box-sizing` are explicit rather than inherited from Tailwind's
4414
- preflight: the part emits its own `ep-root`, so it can be composed somewhere the
5300
+ preflight: the part emits its own `docx-editor`, so it can be composed somewhere the
4415
5301
  preflight does not reach, and an inline span would otherwise measure 42px and only
4416
5302
  size at all by accident of being a flex item. */
4417
5303
  .docx-editor__loading-spinner {
@@ -4717,7 +5603,7 @@ a.docx-hyperlink:focus-visible {
4717
5603
  /* The page column moves ONLY by what the adapter computed, and only while a pane
4718
5604
  * is open. Absent (no pane mounted, pane closed, gutter wide enough) the custom
4719
5605
  * property falls back to 0 and this rule is inert. */
4720
- .ep-root .docx-editor__scroll-container {
5606
+ .docx-editor .docx-editor__scroll-container {
4721
5607
  padding-inline-start: var(--docx-nav-shift, 0px);
4722
5608
  transition: padding-inline-start 0.2s ease;
4723
5609
  }
@@ -4725,7 +5611,7 @@ a.docx-hyperlink:focus-visible {
4725
5611
  /* Positioning frame: the gutter strip to the left of the page. `pointer-events`
4726
5612
  * is off on the frame and back on for its controls, so the strip never eats a
4727
5613
  * click meant for the document behind it. */
4728
- .ep-root .docx-nav {
5614
+ .docx-editor .docx-nav {
4729
5615
  position: absolute;
4730
5616
  inset-block: 0;
4731
5617
  inset-inline-start: 0;
@@ -4736,7 +5622,7 @@ a.docx-hyperlink:focus-visible {
4736
5622
  color: var(--doc-text);
4737
5623
  }
4738
5624
 
4739
- .ep-root .docx-nav > * {
5625
+ .docx-editor .docx-nav > * {
4740
5626
  pointer-events: auto;
4741
5627
  }
4742
5628
 
@@ -4748,7 +5634,7 @@ a.docx-hyperlink:focus-visible {
4748
5634
  * contents, so every heading appears to unwrap from the left edge while the
4749
5635
  * text reflows inside the shrinking box. The pane is a tool you open to look
4750
5636
  * something up; it should be there when you ask for it. */
4751
- .ep-root .docx-nav__panel-shell {
5637
+ .docx-editor .docx-nav__panel-shell {
4752
5638
  display: none;
4753
5639
  position: absolute;
4754
5640
  inset-block: 0;
@@ -4758,14 +5644,14 @@ a.docx-hyperlink:focus-visible {
4758
5644
  background: var(--doc-bg);
4759
5645
  }
4760
5646
 
4761
- .ep-root .docx-nav--open .docx-nav__panel-shell {
5647
+ .docx-editor .docx-nav--open .docx-nav__panel-shell {
4762
5648
  display: flex;
4763
5649
  }
4764
5650
 
4765
5651
  /* The collapsed disc. Aligned with the page's top edge, not the viewport's, so it
4766
5652
  * sits where the panel's back arrow will appear, and inset past the vertical
4767
5653
  * ruler's 20px tick column so it never covers the ticks. */
4768
- .ep-root .docx-nav__toggle {
5654
+ .docx-editor .docx-nav__toggle {
4769
5655
  position: absolute;
4770
5656
  inset-block-start: 24px;
4771
5657
  inset-inline-start: var(--docx-nav-inset, 32px);
@@ -4785,25 +5671,25 @@ a.docx-hyperlink:focus-visible {
4785
5671
  box-shadow 0.12s ease;
4786
5672
  }
4787
5673
 
4788
- .ep-root .docx-nav__toggle:hover {
5674
+ .docx-editor .docx-nav__toggle:hover {
4789
5675
  background: var(--doc-border);
4790
5676
  color: var(--doc-text);
4791
5677
  box-shadow: 0 1px 3px var(--doc-shadow);
4792
5678
  }
4793
5679
 
4794
- .ep-root .docx-nav__toggle:focus-visible,
4795
- .ep-root .docx-nav__close:focus-visible,
4796
- .ep-root .docx-nav__tab:focus-visible,
4797
- .ep-root .docx-nav__stepper:focus-visible,
4798
- .ep-root .docx-nav__heading:focus-visible,
4799
- .ep-root .docx-nav__result:focus-visible {
5680
+ .docx-editor .docx-nav__toggle:focus-visible,
5681
+ .docx-editor .docx-nav__close:focus-visible,
5682
+ .docx-editor .docx-nav__tab:focus-visible,
5683
+ .docx-editor .docx-nav__stepper:focus-visible,
5684
+ .docx-editor .docx-nav__heading:focus-visible,
5685
+ .docx-editor .docx-nav__result:focus-visible {
4800
5686
  outline: 2px solid var(--doc-primary);
4801
5687
  outline-offset: 2px;
4802
5688
  }
4803
5689
 
4804
5690
  /* ── Header ───────────────────────────────────────────────────────────────── */
4805
5691
 
4806
- .ep-root .docx-nav__header {
5692
+ .docx-editor .docx-nav__header {
4807
5693
  display: flex;
4808
5694
  align-items: center;
4809
5695
  gap: 8px;
@@ -4811,7 +5697,7 @@ a.docx-hyperlink:focus-visible {
4811
5697
  flex: none;
4812
5698
  }
4813
5699
 
4814
- .ep-root .docx-nav__close {
5700
+ .docx-editor .docx-nav__close {
4815
5701
  display: flex;
4816
5702
  align-items: center;
4817
5703
  justify-content: center;
@@ -4825,12 +5711,12 @@ a.docx-hyperlink:focus-visible {
4825
5711
  cursor: pointer;
4826
5712
  }
4827
5713
 
4828
- .ep-root .docx-nav__close:hover {
5714
+ .docx-editor .docx-nav__close:hover {
4829
5715
  background: var(--doc-bg-hover);
4830
5716
  color: var(--doc-text);
4831
5717
  }
4832
5718
 
4833
- .ep-root .docx-nav__title {
5719
+ .docx-editor .docx-nav__title {
4834
5720
  margin: 0;
4835
5721
  font-size: 17px;
4836
5722
  font-weight: 600;
@@ -4840,7 +5726,7 @@ a.docx-hyperlink:focus-visible {
4840
5726
 
4841
5727
  /* ── Tabs ─────────────────────────────────────────────────────────────────── */
4842
5728
 
4843
- .ep-root .docx-nav__tabs {
5729
+ .docx-editor .docx-nav__tabs {
4844
5730
  display: flex;
4845
5731
  align-items: stretch;
4846
5732
  gap: 4px;
@@ -4850,8 +5736,10 @@ a.docx-hyperlink:focus-visible {
4850
5736
  flex: none;
4851
5737
  }
4852
5738
 
4853
- .ep-root .docx-nav__tab {
4854
- appearance: none;
5739
+ .docx-editor .docx-nav__tab {
5740
+ -webkit-appearance: none;
5741
+ -moz-appearance: none;
5742
+ appearance: none;
4855
5743
  border: none;
4856
5744
  background: none;
4857
5745
  padding: 8px 10px;
@@ -4863,11 +5751,11 @@ a.docx-hyperlink:focus-visible {
4863
5751
  margin-block-end: -1px;
4864
5752
  }
4865
5753
 
4866
- .ep-root .docx-nav__tab:hover {
5754
+ .docx-editor .docx-nav__tab:hover {
4867
5755
  color: var(--doc-text);
4868
5756
  }
4869
5757
 
4870
- .ep-root .docx-nav__tab--selected {
5758
+ .docx-editor .docx-nav__tab--selected {
4871
5759
  color: var(--doc-primary);
4872
5760
  border-block-end-color: var(--doc-primary);
4873
5761
  font-weight: 600;
@@ -4875,7 +5763,7 @@ a.docx-hyperlink:focus-visible {
4875
5763
 
4876
5764
  /* ── Panels ───────────────────────────────────────────────────────────────── */
4877
5765
 
4878
- .ep-root .docx-nav__panel {
5766
+ .docx-editor .docx-nav__panel {
4879
5767
  display: flex;
4880
5768
  flex-direction: column;
4881
5769
  min-height: 0;
@@ -4884,11 +5772,11 @@ a.docx-hyperlink:focus-visible {
4884
5772
  gap: 8px;
4885
5773
  }
4886
5774
 
4887
- .ep-root .docx-nav__panel[hidden] {
5775
+ .docx-editor .docx-nav__panel[hidden] {
4888
5776
  display: none;
4889
5777
  }
4890
5778
 
4891
- .ep-root .docx-nav__empty {
5779
+ .docx-editor .docx-nav__empty {
4892
5780
  margin: 0;
4893
5781
  padding: 8px;
4894
5782
  color: var(--doc-text-subtle);
@@ -4896,7 +5784,7 @@ a.docx-hyperlink:focus-visible {
4896
5784
  line-height: 1.45;
4897
5785
  }
4898
5786
 
4899
- .ep-root .docx-nav__list {
5787
+ .docx-editor .docx-nav__list {
4900
5788
  list-style: none;
4901
5789
  margin: 0;
4902
5790
  padding: 0;
@@ -4907,7 +5795,7 @@ a.docx-hyperlink:focus-visible {
4907
5795
 
4908
5796
  /* ── Search box ───────────────────────────────────────────────────────────── */
4909
5797
 
4910
- .ep-root .docx-nav__searchbox {
5798
+ .docx-editor .docx-nav__searchbox {
4911
5799
  display: flex;
4912
5800
  align-items: center;
4913
5801
  gap: 6px;
@@ -4918,17 +5806,17 @@ a.docx-hyperlink:focus-visible {
4918
5806
  background: var(--doc-bg-input);
4919
5807
  }
4920
5808
 
4921
- .ep-root .docx-nav__searchbox:focus-within {
5809
+ .docx-editor .docx-nav__searchbox:focus-within {
4922
5810
  border-color: var(--doc-primary);
4923
5811
  box-shadow: 0 0 0 1px var(--doc-primary);
4924
5812
  }
4925
5813
 
4926
- .ep-root .docx-nav__search-icon {
5814
+ .docx-editor .docx-nav__search-icon {
4927
5815
  color: var(--doc-text-muted);
4928
5816
  flex: none;
4929
5817
  }
4930
5818
 
4931
- .ep-root .docx-nav__search-input {
5819
+ .docx-editor .docx-nav__search-input {
4932
5820
  flex: 1;
4933
5821
  min-width: 0;
4934
5822
  border: none;
@@ -4939,16 +5827,21 @@ a.docx-hyperlink:focus-visible {
4939
5827
  color: var(--doc-text);
4940
5828
  }
4941
5829
 
4942
- .ep-root .docx-nav__search-input::placeholder {
5830
+ .docx-editor .docx-nav__search-input::-moz-placeholder {
5831
+ color: var(--doc-text-placeholder);
5832
+ }
5833
+
5834
+ .docx-editor .docx-nav__search-input::placeholder {
4943
5835
  color: var(--doc-text-placeholder);
4944
5836
  }
4945
5837
 
4946
5838
  /* The UA's own clear affordance would sit next to ours. */
4947
- .ep-root .docx-nav__search-input::-webkit-search-cancel-button {
4948
- appearance: none;
5839
+ .docx-editor .docx-nav__search-input::-webkit-search-cancel-button {
5840
+ -webkit-appearance: none;
5841
+ appearance: none;
4949
5842
  }
4950
5843
 
4951
- .ep-root .docx-nav__search-clear {
5844
+ .docx-editor .docx-nav__search-clear {
4952
5845
  display: flex;
4953
5846
  align-items: center;
4954
5847
  justify-content: center;
@@ -4962,14 +5855,14 @@ a.docx-hyperlink:focus-visible {
4962
5855
  cursor: pointer;
4963
5856
  }
4964
5857
 
4965
- .ep-root .docx-nav__search-clear:hover {
5858
+ .docx-editor .docx-nav__search-clear:hover {
4966
5859
  background: var(--doc-bg-hover);
4967
5860
  color: var(--doc-text);
4968
5861
  }
4969
5862
 
4970
5863
  /* ── Find: options, counter, results ──────────────────────────────────────── */
4971
5864
 
4972
- .ep-root .docx-nav__options {
5865
+ .docx-editor .docx-nav__options {
4973
5866
  display: flex;
4974
5867
  flex-wrap: wrap;
4975
5868
  gap: 4px 12px;
@@ -4977,7 +5870,7 @@ a.docx-hyperlink:focus-visible {
4977
5870
  padding-inline: 2px;
4978
5871
  }
4979
5872
 
4980
- .ep-root .docx-nav__option {
5873
+ .docx-editor .docx-nav__option {
4981
5874
  display: flex;
4982
5875
  align-items: center;
4983
5876
  gap: 6px;
@@ -4986,7 +5879,7 @@ a.docx-hyperlink:focus-visible {
4986
5879
  cursor: pointer;
4987
5880
  }
4988
5881
 
4989
- .ep-root .docx-nav__resultbar {
5882
+ .docx-editor .docx-nav__resultbar {
4990
5883
  display: flex;
4991
5884
  align-items: center;
4992
5885
  justify-content: space-between;
@@ -4996,18 +5889,18 @@ a.docx-hyperlink:focus-visible {
4996
5889
  padding-inline: 2px;
4997
5890
  }
4998
5891
 
4999
- .ep-root .docx-nav__count {
5892
+ .docx-editor .docx-nav__count {
5000
5893
  font-size: 13px;
5001
5894
  font-weight: 600;
5002
5895
  color: var(--doc-text);
5003
5896
  }
5004
5897
 
5005
- .ep-root .docx-nav__steppers {
5898
+ .docx-editor .docx-nav__steppers {
5006
5899
  display: flex;
5007
5900
  gap: 4px;
5008
5901
  }
5009
5902
 
5010
- .ep-root .docx-nav__stepper {
5903
+ .docx-editor .docx-nav__stepper {
5011
5904
  display: flex;
5012
5905
  align-items: center;
5013
5906
  justify-content: center;
@@ -5425,7 +6318,7 @@ a.docx-hyperlink:focus-visible {
5425
6318
  /* Dark paper inverts the arithmetic: multiplying a tint into a dark sheet drives it to
5426
6319
  black, so the band disappears exactly where it is needed. Screen lightens instead, which
5427
6320
  is the same relationship the light theme has — the paper shifts, the glyphs do not. */
5428
- .ep-root.dark .docx-comment-overlay {
6321
+ .docx-editor.dark .docx-comment-overlay {
5429
6322
  mix-blend-mode: screen;
5430
6323
  }
5431
6324
 
@@ -5512,17 +6405,17 @@ a.docx-hyperlink:focus-visible {
5512
6405
  cursor: pointer;
5513
6406
  }
5514
6407
 
5515
- .ep-root .docx-nav__stepper:hover:not(:disabled) {
6408
+ .docx-editor .docx-nav__stepper:hover:not(:disabled) {
5516
6409
  background: var(--doc-bg-hover);
5517
6410
  color: var(--doc-text);
5518
6411
  }
5519
6412
 
5520
- .ep-root .docx-nav__stepper:disabled {
6413
+ .docx-editor .docx-nav__stepper:disabled {
5521
6414
  opacity: 0.4;
5522
6415
  cursor: default;
5523
6416
  }
5524
6417
 
5525
- .ep-root .docx-nav__result {
6418
+ .docx-editor .docx-nav__result {
5526
6419
  display: block;
5527
6420
  width: 100%;
5528
6421
  text-align: start;
@@ -5537,24 +6430,24 @@ a.docx-hyperlink:focus-visible {
5537
6430
  cursor: pointer;
5538
6431
  }
5539
6432
 
5540
- .ep-root .docx-nav__result:hover {
6433
+ .docx-editor .docx-nav__result:hover {
5541
6434
  background: var(--doc-bg-hover);
5542
6435
  }
5543
6436
 
5544
6437
  /* The active result reads as the one the caret is on: bordered, like Word's. */
5545
- .ep-root .docx-nav__result--active {
6438
+ .docx-editor .docx-nav__result--active {
5546
6439
  border-color: var(--doc-primary);
5547
6440
  color: var(--doc-text);
5548
6441
  }
5549
6442
 
5550
- .ep-root .docx-nav__result-text {
6443
+ .docx-editor .docx-nav__result-text {
5551
6444
  display: -webkit-box;
5552
6445
  -webkit-line-clamp: 3;
5553
6446
  -webkit-box-orient: vertical;
5554
6447
  overflow: hidden;
5555
6448
  }
5556
6449
 
5557
- .ep-root .docx-nav__result-hit {
6450
+ .docx-editor .docx-nav__result-hit {
5558
6451
  background: none;
5559
6452
  color: var(--doc-text);
5560
6453
  font-weight: 700;
@@ -5562,7 +6455,7 @@ a.docx-hyperlink:focus-visible {
5562
6455
 
5563
6456
  /* ── Headings list ────────────────────────────────────────────────────────── */
5564
6457
 
5565
- .ep-root .docx-nav__heading {
6458
+ .docx-editor .docx-nav__heading {
5566
6459
  display: block;
5567
6460
  width: 100%;
5568
6461
  text-align: start;
@@ -5581,18 +6474,18 @@ a.docx-hyperlink:focus-visible {
5581
6474
  text-overflow: ellipsis;
5582
6475
  }
5583
6476
 
5584
- .ep-root .docx-nav__heading:hover {
6477
+ .docx-editor .docx-nav__heading:hover {
5585
6478
  background: var(--doc-bg-hover);
5586
6479
  }
5587
6480
 
5588
- .ep-root .docx-nav__heading--current {
6481
+ .docx-editor .docx-nav__heading--current {
5589
6482
  background: var(--doc-primary-light);
5590
6483
  font-weight: 600;
5591
6484
  }
5592
6485
 
5593
6486
  /* Reduced motion: the page still moves when it has to, it just does not glide. */
5594
6487
  @media (prefers-reduced-motion: reduce) {
5595
- .ep-root .docx-editor__scroll-container {
6488
+ .docx-editor .docx-editor__scroll-container {
5596
6489
  transition-duration: 0s;
5597
6490
  }
5598
6491
  }
@@ -5604,7 +6497,7 @@ a.docx-hyperlink:focus-visible {
5604
6497
  * shared `.docx-toolbar__menu` card so a menu row and a toolbar dropdown row are the same
5605
6498
  * object. What the menu adds is the ROW GRID: a fixed icon column so labels line up down
5606
6499
  * the panel, and a right-hand shortcut column. */
5607
- .ep-root .docx-menubar {
6500
+ .docx-editor .docx-menubar {
5608
6501
  display: flex;
5609
6502
  align-items: center;
5610
6503
  flex-wrap: wrap;
@@ -5618,11 +6511,11 @@ a.docx-hyperlink:focus-visible {
5618
6511
  sans-serif;
5619
6512
  }
5620
6513
 
5621
- .ep-root .docx-menubar__menu-root {
6514
+ .docx-editor .docx-menubar__menu-root {
5622
6515
  position: relative;
5623
6516
  }
5624
6517
 
5625
- .ep-root .docx-menubar__trigger {
6518
+ .docx-editor .docx-menubar__trigger {
5626
6519
  padding: 4px 8px;
5627
6520
  border: none;
5628
6521
  border-radius: 4px;
@@ -5638,7 +6531,7 @@ a.docx-hyperlink:focus-visible {
5638
6531
  /* An OPT-IN trigger icon. The bar has none by default — Word and Docs do not — so this
5639
6532
  * only ever applies where a host passed one, and it inherits the trigger's colour so the
5640
6533
  * glyph tracks hover and open state with the label. */
5641
- .ep-root .docx-menubar__trigger-icon {
6534
+ .docx-editor .docx-menubar__trigger-icon {
5642
6535
  display: inline-flex;
5643
6536
  align-items: center;
5644
6537
  margin-right: 5px;
@@ -5646,13 +6539,13 @@ a.docx-hyperlink:focus-visible {
5646
6539
  color: inherit;
5647
6540
  }
5648
6541
 
5649
- .ep-root .docx-menubar__trigger:hover,
5650
- .ep-root .docx-menubar__trigger[data-open] {
6542
+ .docx-editor .docx-menubar__trigger:hover,
6543
+ .docx-editor .docx-menubar__trigger[data-open] {
5651
6544
  background: var(--doc-bg-hover);
5652
6545
  }
5653
6546
 
5654
6547
  /* The panel: the shared card, dropped below its trigger. */
5655
- .ep-root .docx-menubar__menu {
6548
+ .docx-editor .docx-menubar__menu {
5656
6549
  position: absolute;
5657
6550
  top: 100%;
5658
6551
  left: 0;
@@ -5663,11 +6556,11 @@ a.docx-hyperlink:focus-visible {
5663
6556
 
5664
6557
  /* The row grid: icon | label | shortcut. The icon column is reserved even on a row with
5665
6558
  * no glyph, so nothing shifts between rows. */
5666
- .ep-root .docx-menubar__item {
6559
+ .docx-editor .docx-menubar__item {
5667
6560
  gap: 12px;
5668
6561
  }
5669
6562
 
5670
- .ep-root .docx-menubar__item-icon {
6563
+ .docx-editor .docx-menubar__item-icon {
5671
6564
  display: inline-flex;
5672
6565
  align-items: center;
5673
6566
  justify-content: center;
@@ -5677,41 +6570,41 @@ a.docx-hyperlink:focus-visible {
5677
6570
  color: var(--doc-text-muted);
5678
6571
  }
5679
6572
 
5680
- .ep-root .docx-menubar__item-label {
6573
+ .docx-editor .docx-menubar__item-label {
5681
6574
  flex: 1;
5682
6575
  text-align: left;
5683
6576
  }
5684
6577
 
5685
- .ep-root .docx-menubar__item-shortcut,
5686
- .ep-root .docx-menubar__item-caret {
6578
+ .docx-editor .docx-menubar__item-shortcut,
6579
+ .docx-editor .docx-menubar__item-caret {
5687
6580
  flex: none;
5688
6581
  margin-left: 24px;
5689
6582
  color: var(--doc-text-muted);
5690
6583
  font-size: 12px;
5691
6584
  }
5692
6585
 
5693
- .ep-root .docx-menubar__item-caret {
6586
+ .docx-editor .docx-menubar__item-caret {
5694
6587
  margin-left: 16px;
5695
6588
  font-size: 14px;
5696
6589
  }
5697
6590
 
5698
6591
  /* An applied toggle row (Bold on bold text) reads as the checked one. */
5699
- .ep-root .docx-menubar__item[data-active] {
6592
+ .docx-editor .docx-menubar__item[data-active] {
5700
6593
  background: var(--doc-primary-light);
5701
6594
  }
5702
6595
 
5703
6596
  /* ── Submenus ──────────────────────────────────────────────────────────────────────── */
5704
- .ep-root .docx-menubar__submenu {
6597
+ .docx-editor .docx-menubar__submenu {
5705
6598
  position: relative;
5706
6599
  }
5707
6600
 
5708
- .ep-root .docx-menubar__submenu > .docx-menubar__item[data-open] {
6601
+ .docx-editor .docx-menubar__submenu > .docx-menubar__item[data-open] {
5709
6602
  background: var(--doc-bg-hover);
5710
6603
  }
5711
6604
 
5712
6605
  /* Opens to the RIGHT of its parent row, top-aligned with it — Word's and Docs' geometry.
5713
6606
  * The small negative offset pulls the panel's padding back onto the row. */
5714
- .ep-root .docx-menubar__submenu-panel {
6607
+ .docx-editor .docx-menubar__submenu-panel {
5715
6608
  top: -4px;
5716
6609
  left: 100%;
5717
6610
  margin-top: 0;
@@ -5726,7 +6619,7 @@ a.docx-hyperlink:focus-visible {
5726
6619
 
5727
6620
  /* A named section of rows. The heading is decoration (the group carries the accessible name),
5728
6621
  so it is sized to read as a label rather than as a row. */
5729
- .ep-root .docx-menubar__group-label {
6622
+ .docx-editor .docx-menubar__group-label {
5730
6623
  padding: 8px 12px 4px;
5731
6624
  color: var(--doc-text-subtle, #8a8f98);
5732
6625
  font-size: 10px;
@@ -5736,29 +6629,29 @@ a.docx-hyperlink:focus-visible {
5736
6629
  }
5737
6630
 
5738
6631
  /* No leading gap on the first group: the panel's own padding is already there. */
5739
- .ep-root .docx-menubar__group:first-child > .docx-menubar__group-label {
6632
+ .docx-editor .docx-menubar__group:first-child > .docx-menubar__group-label {
5740
6633
  padding-top: 2px;
5741
6634
  }
5742
6635
 
5743
6636
  /* ── The insert-table size grid ────────────────────────────────────────────────────── */
5744
- .ep-root .docx-menubar__grid {
6637
+ .docx-editor .docx-menubar__grid {
5745
6638
  padding: 8px;
5746
6639
  }
5747
6640
 
5748
6641
  /* Rows are real elements now (`role="row"`), so the cells lay out per row rather than as
5749
6642
  * one grid container. */
5750
- .ep-root .docx-menubar__grid-cells {
6643
+ .docx-editor .docx-menubar__grid-cells {
5751
6644
  display: flex;
5752
6645
  flex-direction: column;
5753
6646
  gap: 3px;
5754
6647
  }
5755
6648
 
5756
- .ep-root .docx-menubar__grid-row {
6649
+ .docx-editor .docx-menubar__grid-row {
5757
6650
  display: flex;
5758
6651
  gap: 3px;
5759
6652
  }
5760
6653
 
5761
- .ep-root .docx-menubar__grid-cell {
6654
+ .docx-editor .docx-menubar__grid-cell {
5762
6655
  width: 22px;
5763
6656
  height: 22px;
5764
6657
  padding: 0;
@@ -5771,12 +6664,12 @@ a.docx-hyperlink:focus-visible {
5771
6664
  border-color 0.06s ease;
5772
6665
  }
5773
6666
 
5774
- .ep-root .docx-menubar__grid-cell[data-filled] {
6667
+ .docx-editor .docx-menubar__grid-cell[data-filled] {
5775
6668
  background: var(--doc-primary);
5776
6669
  border-color: var(--doc-primary);
5777
6670
  }
5778
6671
 
5779
- .ep-root .docx-menubar__grid-caption {
6672
+ .docx-editor .docx-menubar__grid-caption {
5780
6673
  min-height: 18px;
5781
6674
  padding-top: 6px;
5782
6675
  text-align: center;
@@ -5802,7 +6695,7 @@ a.docx-hyperlink:focus-visible {
5802
6695
  * one definition. What this block adds is only what differs: the panel is placed in client
5803
6696
  * space by the component rather than relative to a trigger, and it sits above the dialogs
5804
6697
  * and dropdowns (z-index 40) because it is opened ON them as often as on the page. */
5805
- .ep-root .docx-contextmenu,
6698
+ .docx-editor .docx-contextmenu,
5806
6699
  .docx-contextmenu {
5807
6700
  z-index: 45;
5808
6701
  min-width: 240px;
@@ -5813,7 +6706,7 @@ a.docx-hyperlink:focus-visible {
5813
6706
  overflow-y: auto;
5814
6707
  }
5815
6708
 
5816
- /* The panel is `position: fixed`, so it renders OUTSIDE the `.ep-root` cascade's usual
6709
+ /* The panel is `position: fixed`, so it renders OUTSIDE the `.docx-editor` cascade's usual
5817
6710
  * geometry but still inside its subtree — the token values resolve, and this block is
5818
6711
  * duplicated unscoped above so a host that mounts the viewport without the wrapper class
5819
6712
  * still gets the card. Focus ring on the panel itself is suppressed: it takes focus only
@@ -5917,13 +6810,13 @@ a.docx-hyperlink:focus-visible {
5917
6810
  border: 0;
5918
6811
  }
5919
6812
 
5920
- .ep-root .docx-toolbar__image-wrap,
6813
+ .docx-editor .docx-toolbar__image-wrap,
5921
6814
  .docx-toolbar__image-wrap {
5922
6815
  position: relative;
5923
6816
  display: inline-flex;
5924
6817
  }
5925
6818
 
5926
- .ep-root .docx-toolbar__image-wrap-menu,
6819
+ .docx-editor .docx-toolbar__image-wrap-menu,
5927
6820
  .docx-toolbar__image-wrap-menu {
5928
6821
  position: absolute;
5929
6822
  top: calc(100% + 4px);
@@ -5937,7 +6830,7 @@ a.docx-hyperlink:focus-visible {
5937
6830
  box-shadow: 0 4px 16px var(--doc-shadow);
5938
6831
  }
5939
6832
 
5940
- .ep-root .docx-toolbar__image-wrap-item,
6833
+ .docx-editor .docx-toolbar__image-wrap-item,
5941
6834
  .docx-toolbar__image-wrap-item {
5942
6835
  display: block;
5943
6836
  width: 100%;
@@ -5950,18 +6843,18 @@ a.docx-hyperlink:focus-visible {
5950
6843
  cursor: pointer;
5951
6844
  }
5952
6845
 
5953
- .ep-root .docx-toolbar__image-wrap-item[data-active],
6846
+ .docx-editor .docx-toolbar__image-wrap-item[data-active],
5954
6847
  .docx-toolbar__image-wrap-item[data-active] {
5955
6848
  background: var(--doc-surface-hover, rgb(0 0 0 / 6%));
5956
6849
  }
5957
6850
 
5958
- .ep-root .docx-toolbar__alt-text,
6851
+ .docx-editor .docx-toolbar__alt-text,
5959
6852
  .docx-toolbar__alt-text {
5960
6853
  position: relative;
5961
6854
  display: inline-flex;
5962
6855
  }
5963
6856
 
5964
- .ep-root .docx-toolbar__alt-text-panel,
6857
+ .docx-editor .docx-toolbar__alt-text-panel,
5965
6858
  .docx-toolbar__alt-text-panel {
5966
6859
  position: absolute;
5967
6860
  top: calc(100% + 4px);
@@ -6015,3 +6908,199 @@ a.docx-hyperlink:focus-visible {
6015
6908
  outline: 2px solid var(--doc-primary);
6016
6909
  outline-offset: 1px;
6017
6910
  }
6911
+
6912
+ .docx-editor .first\:pl-0:first-child {
6913
+ padding-left: 0px;
6914
+ }
6915
+
6916
+ .docx-editor .last\:border-r-0:last-child {
6917
+ border-right-width: 0px;
6918
+ }
6919
+
6920
+ .docx-editor .hover\:border-input:hover {
6921
+ --tw-border-opacity: 1;
6922
+ border-color: hsl(var(--input) / var(--tw-border-opacity, 1));
6923
+ }
6924
+
6925
+ .docx-editor .hover\:bg-accent:hover {
6926
+ --tw-bg-opacity: 1;
6927
+ background-color: hsl(var(--accent) / var(--tw-bg-opacity, 1));
6928
+ }
6929
+
6930
+ .docx-editor .hover\:bg-destructive\/90:hover {
6931
+ background-color: hsl(var(--destructive) / 0.9);
6932
+ }
6933
+
6934
+ .docx-editor .hover\:bg-doc-bg-hover:hover {
6935
+ background-color: var(--doc-bg-hover);
6936
+ }
6937
+
6938
+ .docx-editor .hover\:bg-muted:hover {
6939
+ --tw-bg-opacity: 1;
6940
+ background-color: hsl(var(--muted) / var(--tw-bg-opacity, 1));
6941
+ }
6942
+
6943
+ .docx-editor .hover\:bg-muted\/80:hover {
6944
+ background-color: hsl(var(--muted) / 0.8);
6945
+ }
6946
+
6947
+ .docx-editor .hover\:bg-primary\/90:hover {
6948
+ background-color: hsl(var(--primary) / 0.9);
6949
+ }
6950
+
6951
+ .docx-editor .hover\:bg-secondary\/80:hover {
6952
+ background-color: hsl(var(--secondary) / 0.8);
6953
+ }
6954
+
6955
+ .docx-editor .hover\:text-accent-foreground:hover {
6956
+ --tw-text-opacity: 1;
6957
+ color: hsl(var(--accent-foreground) / var(--tw-text-opacity, 1));
6958
+ }
6959
+
6960
+ .docx-editor .hover\:text-foreground:hover {
6961
+ --tw-text-opacity: 1;
6962
+ color: hsl(var(--foreground) / var(--tw-text-opacity, 1));
6963
+ }
6964
+
6965
+ .docx-editor .hover\:underline:hover {
6966
+ text-decoration-line: underline;
6967
+ }
6968
+
6969
+ .docx-editor .focus\:bg-doc-bg-input:focus {
6970
+ background-color: var(--doc-bg-input);
6971
+ }
6972
+
6973
+ .docx-editor .focus\:bg-muted:focus {
6974
+ --tw-bg-opacity: 1;
6975
+ background-color: hsl(var(--muted) / var(--tw-bg-opacity, 1));
6976
+ }
6977
+
6978
+ .docx-editor .focus\:bg-muted\/80:focus {
6979
+ background-color: hsl(var(--muted) / 0.8);
6980
+ }
6981
+
6982
+ .docx-editor .focus\:outline-none:focus {
6983
+ outline: 2px solid transparent;
6984
+ outline-offset: 2px;
6985
+ }
6986
+
6987
+ .docx-editor .focus\:ring-1:focus {
6988
+ --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
6989
+ --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
6990
+ box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
6991
+ }
6992
+
6993
+ .docx-editor .focus\:ring-ring:focus {
6994
+ --tw-ring-opacity: 1;
6995
+ --tw-ring-color: hsl(var(--ring) / var(--tw-ring-opacity, 1));
6996
+ }
6997
+
6998
+ .docx-editor .focus-visible\:outline-none:focus-visible {
6999
+ outline: 2px solid transparent;
7000
+ outline-offset: 2px;
7001
+ }
7002
+
7003
+ .docx-editor .focus-visible\:ring-2:focus-visible {
7004
+ --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
7005
+ --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
7006
+ box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
7007
+ }
7008
+
7009
+ .docx-editor .focus-visible\:ring-ring:focus-visible {
7010
+ --tw-ring-opacity: 1;
7011
+ --tw-ring-color: hsl(var(--ring) / var(--tw-ring-opacity, 1));
7012
+ }
7013
+
7014
+ .docx-editor .focus-visible\:ring-offset-2:focus-visible {
7015
+ --tw-ring-offset-width: 2px;
7016
+ }
7017
+
7018
+ .docx-editor .disabled\:pointer-events-none:disabled {
7019
+ pointer-events: none;
7020
+ }
7021
+
7022
+ .docx-editor .disabled\:cursor-not-allowed:disabled {
7023
+ cursor: not-allowed;
7024
+ }
7025
+
7026
+ .docx-editor .disabled\:opacity-50:disabled {
7027
+ opacity: 0.5;
7028
+ }
7029
+
7030
+ .docx-editor .data-\[disabled\]\:pointer-events-none[data-disabled] {
7031
+ pointer-events: none;
7032
+ }
7033
+
7034
+ .docx-editor .data-\[side\=bottom\]\:translate-y-1[data-side="bottom"] {
7035
+ --tw-translate-y: 0.25rem;
7036
+ transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
7037
+ }
7038
+
7039
+ .docx-editor .data-\[side\=top\]\:-translate-y-1[data-side="top"] {
7040
+ --tw-translate-y: -0.25rem;
7041
+ transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
7042
+ }
7043
+
7044
+ .docx-editor .data-\[disabled\]\:opacity-50[data-disabled] {
7045
+ opacity: 0.5;
7046
+ }
7047
+
7048
+ .docx-editor .data-\[state\=open\]\:animate-in[data-state="open"] {
7049
+ animation-name: docx-editor-enter;
7050
+ animation-duration: 150ms;
7051
+ --tw-enter-opacity: initial;
7052
+ --tw-enter-scale: initial;
7053
+ --tw-enter-rotate: initial;
7054
+ --tw-enter-translate-x: initial;
7055
+ --tw-enter-translate-y: initial;
7056
+ }
7057
+
7058
+ .docx-editor .data-\[state\=closed\]\:animate-out[data-state="closed"] {
7059
+ animation-name: docx-editor-exit;
7060
+ animation-duration: 150ms;
7061
+ --tw-exit-opacity: initial;
7062
+ --tw-exit-scale: initial;
7063
+ --tw-exit-rotate: initial;
7064
+ --tw-exit-translate-x: initial;
7065
+ --tw-exit-translate-y: initial;
7066
+ }
7067
+
7068
+ .docx-editor .data-\[state\=closed\]\:fade-out-0[data-state="closed"] {
7069
+ --tw-exit-opacity: 0;
7070
+ }
7071
+
7072
+ .docx-editor .data-\[state\=open\]\:fade-in-0[data-state="open"] {
7073
+ --tw-enter-opacity: 0;
7074
+ }
7075
+
7076
+ .docx-editor .data-\[state\=closed\]\:zoom-out-95[data-state="closed"] {
7077
+ --tw-exit-scale: .95;
7078
+ }
7079
+
7080
+ .docx-editor .data-\[state\=open\]\:zoom-in-95[data-state="open"] {
7081
+ --tw-enter-scale: .95;
7082
+ }
7083
+
7084
+ .docx-editor .data-\[side\=bottom\]\:slide-in-from-top-2[data-side="bottom"] {
7085
+ --tw-enter-translate-y: -0.5rem;
7086
+ }
7087
+
7088
+ .docx-editor .data-\[side\=top\]\:slide-in-from-bottom-2[data-side="top"] {
7089
+ --tw-enter-translate-y: 0.5rem;
7090
+ }
7091
+
7092
+ .docx-editor .dark\:bg-muted:is(.dark *) {
7093
+ --tw-bg-opacity: 1;
7094
+ background-color: hsl(var(--muted) / var(--tw-bg-opacity, 1));
7095
+ }
7096
+
7097
+ .docx-editor .dark\:text-foreground:is(.dark *) {
7098
+ --tw-text-opacity: 1;
7099
+ color: hsl(var(--foreground) / var(--tw-text-opacity, 1));
7100
+ }
7101
+
7102
+ .docx-editor :is(.\[\&\>span\]\:truncate>span) {
7103
+ overflow: hidden;
7104
+ text-overflow: ellipsis;
7105
+ white-space: nowrap;
7106
+ }