@nldd/design-system 0.11.0 → 0.13.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 (268) hide show
  1. package/custom-elements.json +2726 -617
  2. package/dist/components/actions/button-group/button-group.d.ts +4 -3
  3. package/dist/components/actions/button-group/button-group.d.ts.map +1 -1
  4. package/dist/components/actions/button-group/button-group.js +4 -3
  5. package/dist/components/actions/button-group/button-group.js.map +1 -1
  6. package/dist/components/actions/button-group/button-group.styles.d.ts.map +1 -1
  7. package/dist/components/actions/button-group/button-group.styles.js +6 -6
  8. package/dist/components/actions/button-group/button-group.styles.js.map +1 -1
  9. package/dist/components/actions/menu/menu.d.ts.map +1 -1
  10. package/dist/components/actions/menu/menu.js +3 -0
  11. package/dist/components/actions/menu/menu.js.map +1 -1
  12. package/dist/components/components.js +21704 -19266
  13. package/dist/components/content/avatar/avatar.d.ts +2 -1
  14. package/dist/components/content/avatar/avatar.d.ts.map +1 -1
  15. package/dist/components/content/avatar/avatar.js +12 -1
  16. package/dist/components/content/avatar/avatar.js.map +1 -1
  17. package/dist/components/content/avatar-group/avatar-group.d.ts +30 -2
  18. package/dist/components/content/avatar-group/avatar-group.d.ts.map +1 -1
  19. package/dist/components/content/avatar-group/avatar-group.i18n.d.ts +1 -0
  20. package/dist/components/content/avatar-group/avatar-group.i18n.d.ts.map +1 -1
  21. package/dist/components/content/avatar-group/avatar-group.i18n.js +1 -0
  22. package/dist/components/content/avatar-group/avatar-group.i18n.js.map +1 -1
  23. package/dist/components/content/avatar-group/avatar-group.js +96 -7
  24. package/dist/components/content/avatar-group/avatar-group.js.map +1 -1
  25. package/dist/components/content/avatar-group/avatar-group.styles.d.ts.map +1 -1
  26. package/dist/components/content/avatar-group/avatar-group.styles.js +35 -1
  27. package/dist/components/content/avatar-group/avatar-group.styles.js.map +1 -1
  28. package/dist/components/content/avatar-group/avatar-group.template.d.ts +1 -0
  29. package/dist/components/content/avatar-group/avatar-group.template.d.ts.map +1 -1
  30. package/dist/components/content/avatar-group/avatar-group.template.js +52 -29
  31. package/dist/components/content/avatar-group/avatar-group.template.js.map +1 -1
  32. package/dist/components/content/code-viewer/code-viewer.d.ts +14 -1
  33. package/dist/components/content/code-viewer/code-viewer.d.ts.map +1 -1
  34. package/dist/components/content/code-viewer/code-viewer.diff.d.ts +40 -0
  35. package/dist/components/content/code-viewer/code-viewer.diff.d.ts.map +1 -0
  36. package/dist/components/content/code-viewer/code-viewer.diff.js +261 -0
  37. package/dist/components/content/code-viewer/code-viewer.diff.js.map +1 -0
  38. package/dist/components/content/code-viewer/code-viewer.i18n.d.ts +5 -0
  39. package/dist/components/content/code-viewer/code-viewer.i18n.d.ts.map +1 -1
  40. package/dist/components/content/code-viewer/code-viewer.i18n.js +9 -0
  41. package/dist/components/content/code-viewer/code-viewer.i18n.js.map +1 -1
  42. package/dist/components/content/code-viewer/code-viewer.js +98 -6
  43. package/dist/components/content/code-viewer/code-viewer.js.map +1 -1
  44. package/dist/components/content/code-viewer/code-viewer.styles.d.ts.map +1 -1
  45. package/dist/components/content/code-viewer/code-viewer.styles.js +180 -14
  46. package/dist/components/content/code-viewer/code-viewer.styles.js.map +1 -1
  47. package/dist/components/content/code-viewer/code-viewer.template.d.ts.map +1 -1
  48. package/dist/components/content/code-viewer/code-viewer.template.js +5 -4
  49. package/dist/components/content/code-viewer/code-viewer.template.js.map +1 -1
  50. package/dist/components/content/icon/icon-aliases.d.ts.map +1 -1
  51. package/dist/components/content/icon/icon-aliases.js +32 -4
  52. package/dist/components/content/icon/icon-aliases.js.map +1 -1
  53. package/dist/components/content/icon/icon-gallery-status.d.ts.map +1 -1
  54. package/dist/components/content/icon/icon-gallery-status.js +19 -0
  55. package/dist/components/content/icon/icon-gallery-status.js.map +1 -1
  56. package/dist/components/content/icon/icon-registry.d.ts.map +1 -1
  57. package/dist/components/content/icon/icon-registry.js +19 -4
  58. package/dist/components/content/icon/icon-registry.js.map +1 -1
  59. package/dist/components/content/rich-text/rich-text.d.ts +10 -0
  60. package/dist/components/content/rich-text/rich-text.d.ts.map +1 -1
  61. package/dist/components/content/rich-text/rich-text.js +10 -0
  62. package/dist/components/content/rich-text/rich-text.js.map +1 -1
  63. package/dist/components/content/tooltip/tooltip.d.ts.map +1 -1
  64. package/dist/components/content/tooltip/tooltip.js +2 -0
  65. package/dist/components/content/tooltip/tooltip.js.map +1 -1
  66. package/dist/components/{dist-Bo5Jeyfn.js → dist-B5E3q-ea.js} +2 -1
  67. package/dist/components/{dist-DbNhCpS5.js → dist-BFw_yEMS.js} +2 -1
  68. package/dist/components/{dist-DnZmcpbQ.js → dist-BNLAXAyO.js} +2 -1
  69. package/dist/components/{dist-DkqAbJH8.js → dist-BOVSVPSz.js} +1 -1
  70. package/dist/components/{dist-Ch3gNAuT.js → dist-BPB3rWnd.js} +2 -1
  71. package/dist/components/{dist-Bud_7w5g.js → dist-BWlUmyq3.js} +34 -2869
  72. package/dist/components/dist-CC8oiVtm.js +366 -0
  73. package/dist/components/dist-COKR0tYU.js +2860 -0
  74. package/dist/components/{dist-CaxHkqR2.js → dist-Co-tsc9S.js} +4 -3
  75. package/dist/components/{dist-iC2RTM0V.js → dist-D_9ZyZ5v.js} +3 -2
  76. package/dist/components/{dist-BB5mlo7D.js → dist-Dn9pjiud.js} +3 -2
  77. package/dist/components/{dist-B2QcygzG.js → dist-Dz28se9B.js} +2 -1
  78. package/dist/components/{dist-CA0yDFIt.js → dist-IPm8ilWf.js} +3 -2
  79. package/dist/components/{icon-zNX9A6d3.js → icon-BJHKWhY5.js} +39 -8
  80. package/dist/components/{icon-button-Cntrg4_E.js → icon-button-DhBIq6lN.js} +75 -2
  81. package/dist/components/inputs/code-editor/code-editor.d.ts +4 -54
  82. package/dist/components/inputs/code-editor/code-editor.d.ts.map +1 -1
  83. package/dist/components/inputs/code-editor/code-editor.js +22 -262
  84. package/dist/components/inputs/code-editor/code-editor.js.map +1 -1
  85. package/dist/components/inputs/code-editor/code-editor.styles.d.ts.map +1 -1
  86. package/dist/components/inputs/code-editor/code-editor.styles.js +43 -6
  87. package/dist/components/inputs/code-editor/code-editor.styles.js.map +1 -1
  88. package/dist/components/inputs/date-picker/date-picker.d.ts +2 -2
  89. package/dist/components/inputs/date-picker/date-picker.i18n.d.ts +1 -1
  90. package/dist/components/inputs/date-picker/date-picker.i18n.js +1 -1
  91. package/dist/components/inputs/date-picker/date-picker.i18n.js.map +1 -1
  92. package/dist/components/inputs/date-picker/date-picker.template.js +1 -1
  93. package/dist/components/inputs/date-picker/date-picker.template.js.map +1 -1
  94. package/dist/components/inputs/file-field/file-field.d.ts +86 -10
  95. package/dist/components/inputs/file-field/file-field.d.ts.map +1 -1
  96. package/dist/components/inputs/file-field/file-field.drop.d.ts +34 -0
  97. package/dist/components/inputs/file-field/file-field.drop.d.ts.map +1 -0
  98. package/dist/components/inputs/file-field/file-field.drop.js +176 -0
  99. package/dist/components/inputs/file-field/file-field.drop.js.map +1 -0
  100. package/dist/components/inputs/file-field/file-field.i18n.d.ts +20 -1
  101. package/dist/components/inputs/file-field/file-field.i18n.d.ts.map +1 -1
  102. package/dist/components/inputs/file-field/file-field.i18n.js +20 -1
  103. package/dist/components/inputs/file-field/file-field.i18n.js.map +1 -1
  104. package/dist/components/inputs/file-field/file-field.js +283 -15
  105. package/dist/components/inputs/file-field/file-field.js.map +1 -1
  106. package/dist/components/inputs/file-field/file-field.styles.d.ts.map +1 -1
  107. package/dist/components/inputs/file-field/file-field.styles.js +245 -10
  108. package/dist/components/inputs/file-field/file-field.styles.js.map +1 -1
  109. package/dist/components/inputs/file-field/file-field.template.d.ts +1 -0
  110. package/dist/components/inputs/file-field/file-field.template.d.ts.map +1 -1
  111. package/dist/components/inputs/file-field/file-field.template.js +167 -28
  112. package/dist/components/inputs/file-field/file-field.template.js.map +1 -1
  113. package/dist/components/inputs/file-field/file-field.truncate.d.ts +22 -0
  114. package/dist/components/inputs/file-field/file-field.truncate.d.ts.map +1 -0
  115. package/dist/components/inputs/file-field/file-field.truncate.js +62 -0
  116. package/dist/components/inputs/file-field/file-field.truncate.js.map +1 -0
  117. package/dist/components/inputs/text-editor/text-editor.annotation-sentinels.d.ts.map +1 -1
  118. package/dist/components/inputs/text-editor/text-editor.annotation-sentinels.js +9 -7
  119. package/dist/components/inputs/text-editor/text-editor.annotation-sentinels.js.map +1 -1
  120. package/dist/components/inputs/text-editor/text-editor.annotations.js +1 -1
  121. package/dist/components/inputs/text-editor/text-editor.annotations.js.map +1 -1
  122. package/dist/components/inputs/text-editor/text-editor.clipboard.d.ts +16 -0
  123. package/dist/components/inputs/text-editor/text-editor.clipboard.d.ts.map +1 -0
  124. package/dist/components/inputs/text-editor/text-editor.clipboard.js +50 -0
  125. package/dist/components/inputs/text-editor/text-editor.clipboard.js.map +1 -0
  126. package/dist/components/inputs/text-editor/text-editor.code-copy.d.ts +10 -0
  127. package/dist/components/inputs/text-editor/text-editor.code-copy.d.ts.map +1 -0
  128. package/dist/components/inputs/text-editor/text-editor.code-copy.js +141 -0
  129. package/dist/components/inputs/text-editor/text-editor.code-copy.js.map +1 -0
  130. package/dist/components/inputs/text-editor/text-editor.commands.d.ts.map +1 -1
  131. package/dist/components/inputs/text-editor/text-editor.commands.js +31 -58
  132. package/dist/components/inputs/text-editor/text-editor.commands.js.map +1 -1
  133. package/dist/components/inputs/text-editor/text-editor.d.ts +17 -64
  134. package/dist/components/inputs/text-editor/text-editor.d.ts.map +1 -1
  135. package/dist/components/inputs/text-editor/text-editor.drag.d.ts.map +1 -1
  136. package/dist/components/inputs/text-editor/text-editor.drag.js +2 -1
  137. package/dist/components/inputs/text-editor/text-editor.drag.js.map +1 -1
  138. package/dist/components/inputs/text-editor/text-editor.focus-selection.d.ts +3 -0
  139. package/dist/components/inputs/text-editor/text-editor.focus-selection.d.ts.map +1 -0
  140. package/dist/components/inputs/text-editor/text-editor.focus-selection.js +55 -0
  141. package/dist/components/inputs/text-editor/text-editor.focus-selection.js.map +1 -0
  142. package/dist/components/inputs/text-editor/text-editor.hidden-syntax.d.ts +6 -0
  143. package/dist/components/inputs/text-editor/text-editor.hidden-syntax.d.ts.map +1 -0
  144. package/dist/components/inputs/text-editor/text-editor.hidden-syntax.js +305 -0
  145. package/dist/components/inputs/text-editor/text-editor.hidden-syntax.js.map +1 -0
  146. package/dist/components/inputs/text-editor/text-editor.i18n.d.ts +5 -0
  147. package/dist/components/inputs/text-editor/text-editor.i18n.d.ts.map +1 -1
  148. package/dist/components/inputs/text-editor/text-editor.i18n.js +7 -0
  149. package/dist/components/inputs/text-editor/text-editor.i18n.js.map +1 -1
  150. package/dist/components/inputs/text-editor/text-editor.js +126 -315
  151. package/dist/components/inputs/text-editor/text-editor.js.map +1 -1
  152. package/dist/components/inputs/text-editor/text-editor.keymap.d.ts +6 -0
  153. package/dist/components/inputs/text-editor/text-editor.keymap.d.ts.map +1 -0
  154. package/dist/components/inputs/text-editor/text-editor.keymap.js +38 -0
  155. package/dist/components/inputs/text-editor/text-editor.keymap.js.map +1 -0
  156. package/dist/components/inputs/text-editor/text-editor.links.d.ts.map +1 -1
  157. package/dist/components/inputs/text-editor/text-editor.links.js +11 -9
  158. package/dist/components/inputs/text-editor/text-editor.links.js.map +1 -1
  159. package/dist/components/inputs/text-editor/text-editor.markdown.d.ts +1 -17
  160. package/dist/components/inputs/text-editor/text-editor.markdown.d.ts.map +1 -1
  161. package/dist/components/inputs/text-editor/text-editor.markdown.js +32 -188
  162. package/dist/components/inputs/text-editor/text-editor.markdown.js.map +1 -1
  163. package/dist/components/inputs/text-editor/text-editor.mention.d.ts +52 -0
  164. package/dist/components/inputs/text-editor/text-editor.mention.d.ts.map +1 -0
  165. package/dist/components/inputs/text-editor/text-editor.mention.js +186 -0
  166. package/dist/components/inputs/text-editor/text-editor.mention.js.map +1 -0
  167. package/dist/components/inputs/text-editor/text-editor.mentions.d.ts +0 -16
  168. package/dist/components/inputs/text-editor/text-editor.mentions.d.ts.map +1 -1
  169. package/dist/components/inputs/text-editor/text-editor.mentions.js +1 -41
  170. package/dist/components/inputs/text-editor/text-editor.mentions.js.map +1 -1
  171. package/dist/components/inputs/text-editor/text-editor.selection.d.ts +13 -0
  172. package/dist/components/inputs/text-editor/text-editor.selection.d.ts.map +1 -0
  173. package/dist/components/inputs/text-editor/text-editor.selection.js +72 -0
  174. package/dist/components/inputs/text-editor/text-editor.selection.js.map +1 -0
  175. package/dist/components/inputs/text-editor/text-editor.spellcheck.d.ts.map +1 -1
  176. package/dist/components/inputs/text-editor/text-editor.spellcheck.js +4 -6
  177. package/dist/components/inputs/text-editor/text-editor.spellcheck.js.map +1 -1
  178. package/dist/components/inputs/text-editor/text-editor.styles.d.ts.map +1 -1
  179. package/dist/components/inputs/text-editor/text-editor.styles.js +301 -60
  180. package/dist/components/inputs/text-editor/text-editor.styles.js.map +1 -1
  181. package/dist/components/inputs/text-editor/text-editor.syntax.d.ts +22 -0
  182. package/dist/components/inputs/text-editor/text-editor.syntax.d.ts.map +1 -1
  183. package/dist/components/inputs/text-editor/text-editor.syntax.js +44 -0
  184. package/dist/components/inputs/text-editor/text-editor.syntax.js.map +1 -1
  185. package/dist/components/inputs/text-editor/text-editor.tasks.d.ts +17 -0
  186. package/dist/components/inputs/text-editor/text-editor.tasks.d.ts.map +1 -0
  187. package/dist/components/inputs/text-editor/text-editor.tasks.js +109 -0
  188. package/dist/components/inputs/text-editor/text-editor.tasks.js.map +1 -0
  189. package/dist/components/layout/page-sections/hero/hero-corner.styles.d.ts.map +1 -1
  190. package/dist/components/layout/page-sections/hero/hero-corner.styles.js +61 -0
  191. package/dist/components/layout/page-sections/hero/hero-corner.styles.js.map +1 -1
  192. package/dist/components/layout/page-sections/hero/hero.d.ts +1 -1
  193. package/dist/components/layout/page-sections/hero/hero.js +1 -1
  194. package/dist/components/layout/popover/popover.d.ts +6 -0
  195. package/dist/components/layout/popover/popover.d.ts.map +1 -1
  196. package/dist/components/layout/popover/popover.js +16 -0
  197. package/dist/components/layout/popover/popover.js.map +1 -1
  198. package/dist/components/layout/popover/popover.styles.d.ts.map +1 -1
  199. package/dist/components/layout/popover/popover.styles.js +13 -0
  200. package/dist/components/layout/popover/popover.styles.js.map +1 -1
  201. package/dist/components/navigation/document-tab-bar/document-tab-bar.d.ts.map +1 -1
  202. package/dist/components/navigation/document-tab-bar/document-tab-bar.js +5 -0
  203. package/dist/components/navigation/document-tab-bar/document-tab-bar.js.map +1 -1
  204. package/dist/components/navigation/menu-bar/menu-bar.d.ts.map +1 -1
  205. package/dist/components/navigation/menu-bar/menu-bar.js +2 -0
  206. package/dist/components/navigation/menu-bar/menu-bar.js.map +1 -1
  207. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.d.ts.map +1 -1
  208. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js +3 -0
  209. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js.map +1 -1
  210. package/dist/components/status-and-feedback/banner/banner.d.ts +1 -1
  211. package/dist/components/status-and-feedback/banner/banner.js +2 -2
  212. package/dist/components/status-and-feedback/banner/banner.js.map +1 -1
  213. package/dist/components/status-and-feedback/notification/notification.d.ts +3 -2
  214. package/dist/components/status-and-feedback/notification/notification.d.ts.map +1 -1
  215. package/dist/components/status-and-feedback/notification/notification.js +9 -4
  216. package/dist/components/status-and-feedback/notification/notification.js.map +1 -1
  217. package/dist/components/status-and-feedback/notification/notification.styles.d.ts.map +1 -1
  218. package/dist/components/status-and-feedback/notification/notification.styles.js +18 -0
  219. package/dist/components/status-and-feedback/notification/notification.styles.js.map +1 -1
  220. package/dist/components/status-and-feedback/notification/notifications-area.d.ts.map +1 -1
  221. package/dist/components/status-and-feedback/notification/notifications-area.js +14 -0
  222. package/dist/components/status-and-feedback/notification/notifications-area.js.map +1 -1
  223. package/dist/components/status-and-feedback/progress-bar/progress-bar.i18n.d.ts +1 -1
  224. package/dist/components/status-and-feedback/progress-bar/progress-bar.i18n.js +1 -1
  225. package/dist/components/status-and-feedback/progress-bar/progress-bar.i18n.js.map +1 -1
  226. package/dist/components/status-and-feedback/progress-bar/progress-bar.js +1 -1
  227. package/dist/components/status-and-feedback/progress-bar/progress-bar.js.map +1 -1
  228. package/dist/components/status-and-feedback/progress-circle/progress-circle.i18n.d.ts +1 -1
  229. package/dist/components/status-and-feedback/progress-circle/progress-circle.i18n.js +1 -1
  230. package/dist/components/status-and-feedback/progress-circle/progress-circle.i18n.js.map +1 -1
  231. package/dist/components/status-and-feedback/progress-circle/progress-circle.js +1 -1
  232. package/dist/components/status-and-feedback/progress-circle/progress-circle.js.map +1 -1
  233. package/dist/css/rich-text.css +61 -1
  234. package/dist/css/themes/donkergeel.css +12 -3
  235. package/dist/css/themes/geel.css +12 -3
  236. package/dist/css/themes.css +24 -6
  237. package/dist/css/variables.css +16 -10
  238. package/dist/nldd.min.js +2217 -1329
  239. package/dist/translations/en-US.d.ts.map +1 -1
  240. package/dist/translations/en-US.js +34 -4
  241. package/dist/translations/en-US.js.map +1 -1
  242. package/dist/translations/fy.d.ts.map +1 -1
  243. package/dist/translations/fy.js +29 -4
  244. package/dist/translations/fy.js.map +1 -1
  245. package/dist/translations/nl.generated.d.ts +34 -4
  246. package/dist/translations/nl.generated.d.ts.map +1 -1
  247. package/dist/translations/pap-AW.d.ts.map +1 -1
  248. package/dist/translations/pap-AW.js +29 -4
  249. package/dist/translations/pap-AW.js.map +1 -1
  250. package/dist/translations/pap-CW.d.ts.map +1 -1
  251. package/dist/translations/pap-CW.js +29 -4
  252. package/dist/translations/pap-CW.js.map +1 -1
  253. package/dist/types/vue.d.ts +43 -39
  254. package/dist/utilities/carried-context.d.ts +20 -0
  255. package/dist/utilities/carried-context.d.ts.map +1 -0
  256. package/dist/utilities/carried-context.js +76 -0
  257. package/dist/utilities/carried-context.js.map +1 -0
  258. package/dist/utilities/codemirror/codemirror-input.d.ts +90 -0
  259. package/dist/utilities/codemirror/codemirror-input.d.ts.map +1 -0
  260. package/dist/utilities/codemirror/codemirror-input.js +250 -0
  261. package/dist/utilities/codemirror/codemirror-input.js.map +1 -0
  262. package/dist/utilities/codemirror/languages.d.ts +5 -1
  263. package/dist/utilities/codemirror/languages.d.ts.map +1 -1
  264. package/dist/utilities/codemirror/languages.js +21 -1
  265. package/dist/utilities/codemirror/languages.js.map +1 -1
  266. package/dist/utilities/dismiss-from-title-bar.d.ts +1 -1
  267. package/dist/utilities/dismiss-from-title-bar.js +1 -1
  268. package/package.json +2 -1
@@ -11,37 +11,68 @@ export const textEditorStyles = css `
11
11
  --_text-editor-drop-cursor-color: var(--components-text-editor-drop-cursor-color);
12
12
  --_text-editor-drag-ghost-background-color: var(--components-text-editor-drag-ghost-background-color);
13
13
  --_text-editor-caret-ring-width: var(--primitives-border-width-thin);
14
+ --_text-editor-caret-ring-color: var(--semantics-surfaces-base-background-color);
14
15
  --_text-editor-corner-radius: 0;
15
16
  --_text-editor-background-color: transparent;
16
- --_text-editor-highlight-border-color: transparent;
17
- --_text-editor-highlight-border-shadow: none;
17
+ --_text-editor-input-field-border-color: transparent;
18
+ --_text-editor-input-field-border-shadow: none;
19
+ --_text-editor-input-field-border-z-index: 1;
18
20
  --_text-editor-padding-block: 0px;
19
21
  /* Room for the caret's own ink at the first and last position of a line:
20
22
  its width plus its ring. Without it the edge carets are clipped. */
21
23
  --_text-editor-padding-inline: calc(var(--_text-editor-caret-width) + var(--_text-editor-caret-ring-width));
22
24
  --_text-editor-content-color: var(--semantics-content-color);
25
+ --_text-editor-mark-color: var(--semantics-content-secondary-color);
26
+ --_text-editor-link-color: var(--semantics-links-color);
27
+ --_text-editor-strong-font-weight: var(--primitives-font-weight-body-bold);
28
+ --_text-editor-heading-1-font: var(--primitives-font-display-1-sm);
29
+ --_text-editor-heading-2-font: var(--primitives-font-display-2-sm);
30
+ --_text-editor-heading-3-font: var(--primitives-font-display-3-sm);
31
+ --_text-editor-heading-4-font: var(--primitives-font-display-4-sm);
32
+ --_text-editor-heading-5-font: var(--primitives-font-display-5-sm);
33
+ --_text-editor-heading-6-font: var(--primitives-font-display-6-sm);
34
+ --_text-editor-quote-font-size: var(--primitives-font-size-200);
23
35
  --_text-editor-font: var(--primitives-font-body-md-regular-snug);
24
- --_text-editor-code-font: var(--primitives-font-monospace-md-regular-snug);
25
- --_text-editor-code-font-size: calc(var(--primitives-font-size-90) / var(--primitives-font-size-100) * 1em);
36
+ --_text-editor-code-font: var(--primitives-font-monospace-sm-regular-snug);
37
+ --_text-editor-code-font-size: var(--semantics-code-inline-font-size);
38
+ --_text-editor-code-font-family: var(--primitives-font-family-monospace);
39
+ --_text-editor-code-font-weight: var(--primitives-font-weight-body-regular);
40
+ /* The scale of --semantics-code-inline-font-size, and the JetBrains Mono box
41
+ (ascent 1020 + descent 300 per 1000), to size inline code like a token. */
42
+ --_text-editor-code-scale: 0.85;
43
+ --_text-editor-code-content-height: 1.32em;
26
44
  --_text-editor-marker-font-size: var(--primitives-font-size-90);
45
+ --_text-editor-task-box-size: 1.7em;
46
+ --_text-editor-code-copy-gap: var(--primitives-space-4);
47
+ --_text-editor-code-copy-font: var(--semantics-buttons-sm-primary-text-font);
48
+ --_text-editor-code-copy-content-color: var(--semantics-buttons-accent-transparent-content-color);
49
+ --_text-editor-code-copy-is-hovered-content-color: var(--semantics-buttons-accent-transparent-is-hovered-content-color);
50
+ --_text-editor-code-copy-is-active-content-color: var(--semantics-buttons-accent-transparent-is-active-content-color);
51
+ --_text-editor-task-box-shift: -0.11em;
27
52
  /* JetBrains Mono advance (600/1000 em) at the marker size; leading
28
53
  list/quote markers are mono so the hanging indent equals their width. */
29
54
  --_text-editor-marker-advance: calc(0.6 * var(--_text-editor-marker-font-size));
30
55
  --_text-editor-bullet-size: 0.45em;
31
- --_text-editor-bullet-color: var(--semantics-content-secondary-color);
56
+ --_text-editor-bullet-color: var(--semantics-content-color);
57
+ --_text-editor-rule-thickness: var(--semantics-dividers-thickness);
58
+ --_text-editor-quote-border-width: var(--primitives-border-width-regular);
59
+ --_text-editor-quote-border-color: var(--semantics-content-color);
60
+ --_text-editor-rule-color: var(--semantics-dividers-color);
32
61
  --_text-editor-heading-marker-scale: 75%;
33
62
  --_text-editor-token-corner-radius: var(--primitives-corner-radius-sm);
34
- --_text-editor-token-block-padding: 0.15em;
35
63
  --_text-editor-token-inline-padding: 0.3em;
36
64
  /* Vertical padding for an inline token that inherits the block font (tint,
37
65
  mention): fills the line up to its line-height, never past it, so tokens on
38
66
  adjacent lines never overlap. 1lh and em resolve on the token, so it adapts
39
67
  to a heading's tighter line. (~1.2em is the text's own box.) */
40
68
  --_text-editor-token-block-padding-fit: max(0em, (1lh - 1.2em) / 2);
41
- --_text-editor-code-token-background-color: light-dark(var(--primitives-color-neutral-50), var(--primitives-color-neutral-150));
69
+ --_text-editor-code-token-background-color: var(--semantics-surfaces-tinted-background-color);
70
+ --_text-editor-code-token-highlight-border-color: var(--semantics-surfaces-tinted-highlight-border-color);
71
+ --_text-editor-token-highlight-border-width: var(--semantics-surfaces-highlight-border-width);
42
72
  --_text-editor-code-token-is-selected-background-color: light-dark(var(--primitives-color-neutral-200), var(--primitives-color-neutral-300));
43
- --_text-editor-code-block-inline-padding: var(--_text-editor-token-inline-padding);
44
- --_text-editor-code-block-block-padding: var(--_text-editor-token-block-padding);
73
+ --_text-editor-code-block-inline-padding: var(--primitives-space-16);
74
+ --_text-editor-code-block-block-padding: var(--primitives-space-16);
75
+ --_text-editor-code-block-corner-radius: var(--semantics-surfaces-corner-radius);
45
76
  --_text-editor-annotation-token-background-color: light-dark(var(--primitives-color-mark-75), var(--primitives-color-mark-150));
46
77
  --_text-editor-annotation-token-is-selected-background-color: light-dark(var(--primitives-color-mark-200), var(--primitives-color-mark-400));
47
78
  --_text-editor-annotation-token-badge-content-color: var(--primitives-color-mark-1000);
@@ -56,9 +87,12 @@ export const textEditorStyles = css `
56
87
  that swallows the white (mark-1000) badge number. */
57
88
  --_text-editor-annotation-token-is-selected-badge-background-color: var(--primitives-color-mark-450);
58
89
  --_text-editor-annotation-token-is-selected-badge-highlight-border-color: var(--primitives-color-mark-500);
90
+ --_text-editor-annotation-token-is-selected-content-color: var(--primitives-color-neutral-950);
91
+ --_text-editor-annotation-badge-font-family: var(--primitives-font-family-body);
59
92
  --_text-editor-annotation-badge-size: 1.5em;
60
93
  --_text-editor-annotation-badge-font-scale: 0.62;
61
94
  --_text-editor-link-badge-size: calc(1em + 2 * var(--_text-editor-token-block-padding-fit));
95
+ --_text-editor-link-badge-gap: 0.1em;
62
96
  --_text-editor-link-badge-content-color: var(--components-text-editor-link-badge-content-color);
63
97
  --_text-editor-link-badge-background-color: var(--components-text-editor-link-badge-background-color);
64
98
  --_text-editor-link-badge-highlight-border-color: var(--components-text-editor-link-badge-highlight-border-color);
@@ -67,10 +101,13 @@ export const textEditorStyles = css `
67
101
  --_text-editor-link-badge-is-hovered-highlight-border-color: var(--components-text-editor-link-badge-is-hovered-highlight-border-color);
68
102
  --_text-editor-link-badge-is-active-highlight-border-color: var(--components-text-editor-link-badge-is-active-highlight-border-color);
69
103
  --_text-editor-mention-icon-size: 0.95em;
70
- --_text-editor-mention-token-background-color: var(--components-text-editor-mention-background-color);
71
- --_text-editor-mention-token-content-color: var(--components-text-editor-mention-content-color);
72
- --_text-editor-mention-token-is-selected-background-color: var(--components-text-editor-mention-is-selected-background-color);
73
- --_text-editor-mention-token-is-selected-content-color: var(--components-text-editor-mention-is-selected-content-color);
104
+ --_text-editor-mention-token-background-color: var(--semantics-mentions-background-color);
105
+ --_text-editor-selection-color: var(--semantics-text-selection-background-color);
106
+ --_text-editor-selection-content-color: var(--primitives-color-neutral-1000);
107
+ --_text-editor-mention-token-highlight-border-color: var(--semantics-mentions-highlight-border-color);
108
+ --_text-editor-mention-token-content-color: var(--semantics-mentions-content-color);
109
+ --_text-editor-mention-token-is-selected-background-color: var(--semantics-mentions-is-selected-background-color);
110
+ --_text-editor-mention-token-is-selected-content-color: var(--semantics-mentions-is-selected-content-color);
74
111
  --_text-editor-rows: 6;
75
112
 
76
113
  ${inheritedTextReset}
@@ -93,8 +130,8 @@ export const textEditorStyles = css `
93
130
  :host([appearance="input-field"]) {
94
131
  --_text-editor-corner-radius: var(--primitives-corner-radius-lg);
95
132
  --_text-editor-background-color: var(--semantics-input-fields-background-color);
96
- --_text-editor-highlight-border-color: var(--semantics-input-fields-border-color);
97
- --_text-editor-highlight-border-shadow: inset 0 0 0 var(--semantics-input-fields-border-width) var(--_text-editor-highlight-border-color);
133
+ --_text-editor-input-field-border-color: var(--semantics-input-fields-border-color);
134
+ --_text-editor-input-field-border-shadow: inset 0 0 0 var(--semantics-input-fields-border-width) var(--_text-editor-input-field-border-color);
98
135
  --_text-editor-padding-block: var(--semantics-controls-md-inline-padding);
99
136
  --_text-editor-padding-inline: var(--semantics-controls-md-inline-padding);
100
137
  }
@@ -107,7 +144,6 @@ export const textEditorStyles = css `
107
144
  display: flex;
108
145
  position: relative;
109
146
  border-radius: var(--_text-editor-corner-radius);
110
- box-shadow: var(--_text-editor-highlight-border-shadow);
111
147
  background-color: var(--_text-editor-background-color);
112
148
  min-height: 0;
113
149
  flex-direction: column;
@@ -118,9 +154,27 @@ export const textEditorStyles = css `
118
154
  font: var(--_text-editor-font);
119
155
  }
120
156
 
157
+ /* The border ring lies over the content, so a selection or a block that runs
158
+ to the edge cannot cover it. Inset, it takes no layout space. */
159
+ .text-editor::after {
160
+ content: '';
161
+ position: absolute;
162
+ inset: 0;
163
+ z-index: var(--_text-editor-input-field-border-z-index);
164
+ border-radius: inherit;
165
+ box-shadow: var(--_text-editor-input-field-border-shadow);
166
+ pointer-events: none;
167
+ }
168
+
169
+ .text-editor .cm-editor {
170
+ isolation: isolate;
171
+ }
172
+
121
173
  :host([disabled]) .text-editor {
122
174
  opacity: var(--primitives-opacity-disabled);
123
175
  pointer-events: none;
176
+ -webkit-user-select: none;
177
+ user-select: none;
124
178
  }
125
179
 
126
180
  /* Focus ring only on the input-field variant; simple relies on the accent caret and
@@ -128,7 +182,7 @@ export const textEditorStyles = css `
128
182
  :host([appearance="input-field"]) .text-editor:focus-within {
129
183
  outline: var(--semantics-focus-ring-outline);
130
184
  outline-offset: var(--semantics-focus-ring-outline-offset);
131
- box-shadow: var(--semantics-focus-ring-box-shadow), var(--_text-editor-highlight-border-shadow);
185
+ box-shadow: var(--semantics-focus-ring-box-shadow);
132
186
  }
133
187
 
134
188
 
@@ -147,6 +201,11 @@ export const textEditorStyles = css `
147
201
  min-height: calc(var(--_text-editor-rows) * 1lh);
148
202
  }
149
203
 
204
+ /* Read-only, like a native read-only field: select and copy, but no caret. */
205
+ :host([readonly]) .cm-nldd-cursorLayer {
206
+ visibility: hidden;
207
+ }
208
+
150
209
  /* Prominent accent caret in both variants (the input-field variant additionally has the focus
151
210
  ring). The doubled class is purely for specificity — it outweighs
152
211
  CodeMirror's theme cursor color without depending on an attribute. */
@@ -162,7 +221,7 @@ export const textEditorStyles = css `
162
221
  /* A thin surface-colored ring, like the drop cursor, so the caret stays legible
163
222
  even over a tinted token (annotation, inline code) where the accent alone can
164
223
  blend in. Blinks with the caret (opacity covers the shadow too). */
165
- box-shadow: 0 0 0 var(--_text-editor-caret-ring-width) var(--semantics-surfaces-base-background-color);
224
+ box-shadow: 0 0 0 var(--_text-editor-caret-ring-width) var(--_text-editor-caret-ring-color);
166
225
  }
167
226
 
168
227
  :host .cm-scroller {
@@ -185,34 +244,34 @@ export const textEditorStyles = css `
185
244
  prefix a predictable width for the hanging indent (see --_text-editor-marker-advance). */
186
245
 
187
246
  .cm-md-h1 {
188
- font: var(--primitives-font-display-1-sm);
247
+ font: var(--_text-editor-heading-1-font);
189
248
  }
190
249
 
191
250
  .cm-md-h2 {
192
- font: var(--primitives-font-display-2-sm);
251
+ font: var(--_text-editor-heading-2-font);
193
252
  }
194
253
 
195
254
  .cm-md-h3 {
196
- font: var(--primitives-font-display-3-sm);
255
+ font: var(--_text-editor-heading-3-font);
197
256
  }
198
257
 
199
258
  .cm-md-h4 {
200
- font: var(--primitives-font-display-4-sm);
259
+ font: var(--_text-editor-heading-4-font);
201
260
  }
202
261
 
203
262
  .cm-md-h5 {
204
- font: var(--primitives-font-display-5-sm);
263
+ font: var(--_text-editor-heading-5-font);
205
264
  }
206
265
 
207
266
  .cm-md-h6 {
208
- font: var(--primitives-font-display-6-sm);
267
+ font: var(--_text-editor-heading-6-font);
209
268
  }
210
269
 
211
270
  :is(.cm-md-h1, .cm-md-h2, .cm-md-h3, .cm-md-h4, .cm-md-h5, .cm-md-h6) .cm-md-mark {
212
271
  font-size: var(--_text-editor-heading-marker-scale);
213
272
  }
214
273
  .cm-md-strong {
215
- font-weight: bold;
274
+ font-weight: var(--_text-editor-strong-font-weight);
216
275
  }
217
276
  .cm-md-emphasis {
218
277
  font-style: italic;
@@ -224,38 +283,69 @@ export const textEditorStyles = css `
224
283
  /* The selected run is darkened with a decoration (see cm-md-code-selected
225
284
  below), since drawSelection hides the native selection. */
226
285
  .cm-md-code {
227
- padding-block: var(--_text-editor-token-block-padding-fit);
286
+ padding-block: max(0em, (1lh / var(--_text-editor-code-scale) - var(--_text-editor-code-content-height)) / 2);
228
287
  /* No inline padding: the tint hugs the backticks, which are the visible bounds
229
288
  anyway. A padded mark has no coordsAt hook, so the caret at its edge would
230
289
  otherwise jump by the padding depending on the direction it arrives from. */
231
290
  /* line-height is left to inherit from the block, so a fixed snug line-height
232
291
  won't make the chip overflow inside a tight heading. */
233
- font-family: var(--primitives-font-family-monospace);
292
+ font-family: var(--_text-editor-code-font-family);
234
293
  font-size: var(--_text-editor-code-font-size);
235
- font-weight: var(--primitives-font-weight-body-regular);
294
+ font-weight: var(--_text-editor-code-font-weight);
295
+ box-shadow: inset 0 0 0 var(--_text-editor-token-highlight-border-width) var(--_text-editor-code-token-highlight-border-color);
236
296
  background-color: var(--_text-editor-code-token-background-color);
237
297
  border-radius: var(--_text-editor-token-corner-radius);
238
298
  }
239
299
 
300
+ .cm-md-code-bare {
301
+ padding-inline: var(--_text-editor-token-inline-padding);
302
+ }
303
+
304
+ .cm-md-rule {
305
+ display: inline-block;
306
+ border-top: var(--_text-editor-rule-thickness) solid var(--_text-editor-rule-color);
307
+ width: 100%;
308
+ vertical-align: middle;
309
+ }
310
+
240
311
  /* :host beats the shared theme's ".cm-line { padding: 0 }" reset (equal
241
312
  specificity otherwise wins on source order), same as .cm-content above —
242
313
  without it the block padding never lands and the surface reads cramped. */
314
+ /* The block is drawn line by line, so its edge is too: the sides on every
315
+ line, the top on the first and the bottom on the last. */
243
316
  :host .cm-md-codeblock {
317
+ --_text-editor-code-block-edge: var(--_text-editor-token-highlight-border-width);
318
+
244
319
  padding-inline: var(--_text-editor-code-block-inline-padding);
320
+ box-shadow:
321
+ inset var(--_text-editor-code-block-edge) 0 0 var(--_text-editor-code-token-highlight-border-color),
322
+ inset calc(-1 * var(--_text-editor-code-block-edge)) 0 0 var(--_text-editor-code-token-highlight-border-color);
245
323
  font: var(--_text-editor-code-font);
246
324
  background-color: var(--_text-editor-code-token-background-color);
247
325
  }
248
326
 
249
327
  :host .cm-md-codeblock-first {
250
328
  padding-top: var(--_text-editor-code-block-block-padding);
251
- border-start-start-radius: var(--_text-editor-token-corner-radius);
252
- border-start-end-radius: var(--_text-editor-token-corner-radius);
329
+ box-shadow:
330
+ inset var(--_text-editor-code-block-edge) 0 0 var(--_text-editor-code-token-highlight-border-color),
331
+ inset calc(-1 * var(--_text-editor-code-block-edge)) 0 0 var(--_text-editor-code-token-highlight-border-color),
332
+ inset 0 var(--_text-editor-code-block-edge) 0 var(--_text-editor-code-token-highlight-border-color);
333
+ border-start-start-radius: var(--_text-editor-code-block-corner-radius);
334
+ border-start-end-radius: var(--_text-editor-code-block-corner-radius);
253
335
  }
254
336
 
255
337
  :host .cm-md-codeblock-last {
256
338
  padding-bottom: var(--_text-editor-code-block-block-padding);
257
- border-end-start-radius: var(--_text-editor-token-corner-radius);
258
- border-end-end-radius: var(--_text-editor-token-corner-radius);
339
+ box-shadow:
340
+ inset var(--_text-editor-code-block-edge) 0 0 var(--_text-editor-code-token-highlight-border-color),
341
+ inset calc(-1 * var(--_text-editor-code-block-edge)) 0 0 var(--_text-editor-code-token-highlight-border-color),
342
+ inset 0 calc(-1 * var(--_text-editor-code-block-edge)) 0 var(--_text-editor-code-token-highlight-border-color);
343
+ border-end-start-radius: var(--_text-editor-code-block-corner-radius);
344
+ border-end-end-radius: var(--_text-editor-code-block-corner-radius);
345
+ }
346
+
347
+ :host .cm-md-codeblock-first.cm-md-codeblock-last {
348
+ box-shadow: inset 0 0 0 var(--_text-editor-code-block-edge) var(--_text-editor-code-token-highlight-border-color);
259
349
  }
260
350
 
261
351
  /* Selected slice of a code span — drawSelection hides the native ::selection,
@@ -272,6 +362,29 @@ export const textEditorStyles = css `
272
362
  background-color: transparent;
273
363
  }
274
364
 
365
+ .cm-md-code .cm-md-code-selected {
366
+ --_text-editor-code-slice-start: 0px;
367
+ --_text-editor-code-slice-end: 0px;
368
+ padding-block: max(0em, (1lh / var(--_text-editor-code-scale) - var(--_text-editor-code-content-height)) / 2);
369
+ box-shadow:
370
+ inset 0 var(--_text-editor-token-highlight-border-width) 0 var(--_text-editor-code-token-highlight-border-color),
371
+ inset 0 calc(-1 * var(--_text-editor-token-highlight-border-width)) 0 var(--_text-editor-code-token-highlight-border-color),
372
+ inset var(--_text-editor-code-slice-start) 0 0 var(--_text-editor-code-token-highlight-border-color),
373
+ inset calc(-1 * var(--_text-editor-code-slice-end)) 0 0 var(--_text-editor-code-token-highlight-border-color);
374
+ }
375
+
376
+ .cm-md-code .cm-md-code-selected-start {
377
+ --_text-editor-code-slice-start: var(--_text-editor-token-highlight-border-width);
378
+ border-start-start-radius: var(--_text-editor-token-corner-radius);
379
+ border-end-start-radius: var(--_text-editor-token-corner-radius);
380
+ }
381
+
382
+ .cm-md-code .cm-md-code-selected-end {
383
+ --_text-editor-code-slice-end: var(--_text-editor-token-highlight-border-width);
384
+ border-start-end-radius: var(--_text-editor-token-corner-radius);
385
+ border-end-end-radius: var(--_text-editor-token-corner-radius);
386
+ }
387
+
275
388
  /* Whole code block selected: the line background (its padding-inline, the
276
389
  first/last line's block padding, and the rounded corners) takes the selected
277
390
  tint, so the block lights up edge to edge — the padding included, like a
@@ -280,17 +393,15 @@ export const textEditorStyles = css `
280
393
  background-color: var(--_text-editor-code-token-is-selected-background-color);
281
394
  }
282
395
 
283
- .cm-md-mention {
284
- color: var(--semantics-content-accent-color);
285
- font-weight: 600;
286
- }
287
396
 
288
397
  .cm-md-mention-token {
398
+ position: relative;
289
399
  padding-block: var(--_text-editor-token-block-padding-fit);
290
400
  /* Left space equals the @ icon's vertical inset (token height minus the icon,
291
401
  halved), so the icon sits equally clear left, top and bottom; the right keeps
292
402
  the normal token inset around the name. */
293
403
  padding-inline: max(0em, (max(1.2em, 1lh) - var(--_text-editor-mention-icon-size)) / 2) var(--_text-editor-token-inline-padding);
404
+ box-shadow: inset 0 0 0 var(--_text-editor-token-highlight-border-width) var(--_text-editor-mention-token-highlight-border-color);
294
405
  color: var(--_text-editor-mention-token-content-color);
295
406
  background-color: var(--_text-editor-mention-token-background-color);
296
407
  border-radius: var(--_text-editor-token-corner-radius);
@@ -318,7 +429,24 @@ export const textEditorStyles = css `
318
429
  content: attr(data-label);
319
430
  }
320
431
 
432
+ /* CodeMirror draws no selection under a token, so its rounded corners showed
433
+ white. A selected token puts the selection color behind itself, in the
434
+ selection layer's stacking (the scroller), so the corners take it. */
435
+ .cm-md-mention-token[data-selected="within"]::before {
436
+ content: '';
437
+ position: absolute;
438
+ inset: 0;
439
+ z-index: -1;
440
+ background-color: var(--_text-editor-selection-color);
441
+ }
442
+
443
+ /* A mention selected on its own keeps its rounded corners: the selection is the token. */
444
+ :host .cm-editor:has(.cm-md-mention-token[data-selected="alone"]) .cm-selectionLayer {
445
+ visibility: hidden;
446
+ }
447
+
321
448
  .cm-md-mention-token[data-selected] {
449
+ box-shadow: none;
322
450
  color: var(--_text-editor-mention-token-is-selected-content-color);
323
451
  background-color: var(--_text-editor-mention-token-is-selected-background-color);
324
452
  }
@@ -330,11 +458,11 @@ export const textEditorStyles = css `
330
458
  }
331
459
 
332
460
  .cm-md-link {
333
- color: var(--semantics-links-color);
461
+ color: var(--_text-editor-link-color);
334
462
  }
335
463
 
336
464
  .cm-md-url {
337
- color: var(--semantics-content-secondary-color);
465
+ color: var(--_text-editor-mark-color);
338
466
  }
339
467
 
340
468
  /* The markdown highlight style tints the URL token (teal); make its span inherit
@@ -347,7 +475,7 @@ export const textEditorStyles = css `
347
475
  and override the highlight-style URL tint (teal) on its token span so the
348
476
  whole address is the link color, not just the mark wrapper. */
349
477
  .cm-md-autolink {
350
- color: var(--semantics-links-color);
478
+ color: var(--_text-editor-link-color);
351
479
  }
352
480
 
353
481
  .cm-md-autolink span {
@@ -355,16 +483,20 @@ export const textEditorStyles = css `
355
483
  }
356
484
 
357
485
  .cm-md-quote {
358
- color: var(--semantics-content-color);
486
+ color: var(--_text-editor-content-color);
359
487
  font-style: italic;
360
- font-size: var(--primitives-font-size-200);
488
+ font-size: var(--_text-editor-quote-font-size);
489
+ }
490
+
491
+ .cm-md-quote-row {
492
+ font-size: var(--_text-editor-quote-font-size);
361
493
  }
362
494
 
363
495
  /* Markers: dimmed (secondary color, not opacity, so contrast holds) and
364
496
  monospace at the 16px marker size — tidy, and a fixed-width leading prefix. */
365
497
  .cm-md-mark {
366
- color: var(--semantics-content-secondary-color);
367
- font-family: var(--primitives-font-family-monospace);
498
+ color: var(--_text-editor-mark-color);
499
+ font-family: var(--_text-editor-code-font-family);
368
500
  font-size: var(--_text-editor-marker-font-size);
369
501
  }
370
502
 
@@ -372,9 +504,119 @@ export const textEditorStyles = css `
372
504
  font-size: 1em;
373
505
  }
374
506
 
375
- /* Bullet-list marker: hide the literal dash (its box keeps the mono advance so
376
- wrapped lines still align under the text) and draw a filled dot in its place.
377
- Fully styleable via --_text-editor-bullet-size / --_text-editor-bullet-color above. */
507
+ /* A shadow, not a border, so the line takes no room and the text stays put
508
+ when the quote shows its marks instead. */
509
+ /* A gradient, not an inset shadow with an offset: iOS Safari leaves a hairline
510
+ of such a shadow along the bottom of a line with a fractional height. */
511
+ .cm-md-quote-line {
512
+ background-image: linear-gradient(var(--_text-editor-quote-border-color), var(--_text-editor-quote-border-color));
513
+ background-repeat: no-repeat;
514
+ background-position: left;
515
+ background-size: var(--_text-editor-quote-border-width) 100%;
516
+ }
517
+
518
+ :host .cm-md-quote-mark-hidden,
519
+ :host .cm-md-quote-mark-hidden * {
520
+ color: transparent;
521
+ }
522
+
523
+ /* A task's box, in a width the hanging indent counts on (TASK_BOX_WIDTH in
524
+ text-editor.hidden-syntax.ts), so wrapped lines line up under the text. */
525
+ /* No height of its own, so a box a little taller than the text does not
526
+ make its line taller than the others; the icon is centered on it. */
527
+ .cm-md-task-box {
528
+ display: inline-flex;
529
+ width: 2.5ch;
530
+ height: 0;
531
+ vertical-align: middle;
532
+ justify-content: flex-start;
533
+ align-items: center;
534
+ color: var(--_text-editor-content-color);
535
+ }
536
+
537
+ /* Up from the middle of the x-height to the middle of the capitals: next to
538
+ a line with capitals and ascenders, that is where the eye puts its middle. */
539
+ .cm-md-task-box-icon {
540
+ flex-shrink: 0;
541
+ width: var(--_text-editor-task-box-size);
542
+ translate: 0 var(--_text-editor-task-box-shift);
543
+ }
544
+
545
+ .cm-md-task-box-label {
546
+ position: absolute;
547
+ width: 1px;
548
+ height: 1px;
549
+ overflow: hidden;
550
+ clip-path: inset(50%);
551
+ white-space: nowrap;
552
+ }
553
+
554
+ /* The opening line of a code block is its head: the language on the left,
555
+ the copy button on the right edge of the block. */
556
+ .cm-md-code-head {
557
+ position: relative;
558
+ }
559
+
560
+ .cm-md-code-copy-wrap {
561
+ position: absolute;
562
+ top: 50%;
563
+ right: 0;
564
+ translate: 0 -50%;
565
+ }
566
+
567
+ .cm-md-code-copy {
568
+ display: inline-flex;
569
+ gap: var(--_text-editor-code-copy-gap);
570
+ align-items: center;
571
+ border: none;
572
+ border-radius: var(--_text-editor-token-corner-radius);
573
+ background: none;
574
+ padding: 0;
575
+ color: var(--_text-editor-code-copy-content-color);
576
+ font: var(--_text-editor-code-copy-font);
577
+ }
578
+
579
+ .cm-md-code-copy:hover {
580
+ color: var(--_text-editor-code-copy-is-hovered-content-color);
581
+ }
582
+
583
+ .cm-md-code-copy:active {
584
+ color: var(--_text-editor-code-copy-is-active-content-color);
585
+ }
586
+
587
+ .cm-md-code-copy:focus-visible {
588
+ outline: var(--semantics-focus-ring-outline);
589
+ outline-offset: var(--semantics-focus-ring-outline-offset);
590
+ box-shadow: var(--semantics-focus-ring-box-shadow);
591
+ }
592
+
593
+ .cm-md-code-copy-icon {
594
+ width: 1.1em;
595
+ }
596
+
597
+ .cm-md-code-copy-status {
598
+ position: absolute;
599
+ width: 1px;
600
+ height: 1px;
601
+ overflow: hidden;
602
+ clip-path: inset(50%);
603
+ white-space: nowrap;
604
+ }
605
+
606
+ .cm-md-code-language {
607
+ color: var(--_text-editor-mark-color);
608
+ font-family: var(--_text-editor-code-font-family);
609
+ font-size: var(--_text-editor-marker-font-size);
610
+ }
611
+
612
+ .cm-md-ordinal,
613
+ .cm-md-ordinal .cm-md-mark,
614
+ .cm-md-mark .cm-md-ordinal {
615
+ color: var(--_text-editor-content-color);
616
+ }
617
+
618
+ /* A bullet with syntax="hidden": the character keeps its mono advance, so a
619
+ wrapped line still aligns under the text, and a dot is drawn over it. */
378
620
  .cm-md-bullet {
379
621
  position: relative;
380
622
  color: transparent;
@@ -397,23 +639,21 @@ export const textEditorStyles = css `
397
639
  mono advance and the hanging indent lines up exactly. */
398
640
  .cm-md-listprefix,
399
641
  .cm-md-listprefix * {
400
- font-family: var(--primitives-font-family-monospace);
642
+ font-family: var(--_text-editor-code-font-family);
401
643
  font-size: var(--_text-editor-marker-font-size);
402
644
  }
403
645
 
404
646
 
405
647
  /* # Annotation overlay
406
- A light body tint + a dashed underline mark the annotated text; a solid
407
- badge (the nub) sits at the end carrying the count. One role for all
408
- annotations — the type is communicated by the consumer's pane, not color.
409
- The dashed line is a non-color cue (with the badge) for accessibility. */
648
+ A light body tint marks the annotated text; a solid badge (the nub) sits at
649
+ the end carrying the count, the cue that does not rest on color. One role
650
+ for all annotations — the type is communicated by the consumer's pane. */
410
651
 
411
652
  /* One cohesive yellow block: the light tint with rounded corners and a reserved
412
653
  space on the right for the solid nub (which lives inside this run, so it
413
- shares the tint and wraps with the text). The dashed underline stays as a
414
- non-color cue. box-decoration-break keeps the tint + rounding on every
415
- wrapped fragment; padding-block extends the tint without growing the line
416
- (vertical padding on an inline box is visual only). */
654
+ shares the tint and wraps with the text). box-decoration-break keeps the
655
+ tint + rounding on every wrapped fragment; padding-block extends the tint
656
+ without growing the line (vertical padding on an inline box is visual only). */
417
657
  .cm-annotation {
418
658
  background-color: var(--_text-editor-annotation-token-background-color);
419
659
  border-radius: var(--_text-editor-token-corner-radius);
@@ -442,15 +682,15 @@ export const textEditorStyles = css `
442
682
  .cm-annotation.is-selected,
443
683
  .cm-annotation .is-selected {
444
684
  background-color: var(--_text-editor-annotation-token-is-selected-background-color);
445
- color: var(--primitives-color-neutral-950);
685
+ color: var(--_text-editor-annotation-token-is-selected-content-color);
446
686
  }
447
687
 
448
688
  .cm-content ::selection {
449
- color: var(--primitives-color-neutral-1000);
689
+ color: var(--_text-editor-selection-content-color);
450
690
  }
451
691
 
452
692
  .cm-annotation ::selection {
453
- color: var(--primitives-color-neutral-950);
693
+ color: var(--_text-editor-annotation-token-is-selected-content-color);
454
694
  }
455
695
 
456
696
  .cm-annotation-badge {
@@ -474,7 +714,7 @@ export const textEditorStyles = css `
474
714
  than it looks and scales with the token in headings. */
475
715
  vertical-align: middle;
476
716
  transform: translateY(-0.11em);
477
- font-family: var(--primitives-font-family-body);
717
+ font-family: var(--_text-editor-annotation-badge-font-family);
478
718
  font-size: calc(var(--_text-editor-annotation-badge-font-scale) * 1em);
479
719
  font-weight: 700;
480
720
  line-height: 1;
@@ -535,7 +775,7 @@ export const textEditorStyles = css `
535
775
  width: var(--primitives-border-width-regular);
536
776
  border-radius: var(--primitives-border-width-thin);
537
777
  background-color: var(--_text-editor-drop-cursor-color);
538
- box-shadow: 0 0 0 var(--primitives-border-width-thin) var(--semantics-surfaces-base-background-color);
778
+ box-shadow: 0 0 0 var(--primitives-border-width-thin) var(--_text-editor-caret-ring-color);
539
779
  pointer-events: none;
540
780
  z-index: 4;
541
781
  }
@@ -561,6 +801,7 @@ export const textEditorStyles = css `
561
801
  display: inline-flex;
562
802
  align-items: center;
563
803
  justify-content: center;
804
+ margin-inline: var(--_text-editor-link-badge-gap);
564
805
  min-width: var(--_text-editor-link-badge-size);
565
806
  height: var(--_text-editor-link-badge-size);
566
807
  border-radius: var(--primitives-corner-radius-full);
@@ -1 +1 @@
1
- {"version":3,"file":"text-editor.styles.js","sourceRoot":"","sources":["../../../../src/components/inputs/text-editor/text-editor.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAyE/B,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAghBrB,CAAC"}
1
+ {"version":3,"file":"text-editor.styles.js","sourceRoot":"","sources":["../../../../src/components/inputs/text-editor/text-editor.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA8G/B,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4tBrB,CAAC"}
@@ -4,6 +4,28 @@ import type { SyntaxNode } from '@lezer/common';
4
4
  * `side` decides which node a position between two of them belongs to: -1 the
5
5
  * one that ends there, 1 the one that starts there. Null when none matches. */
6
6
  export declare function enclosingNode(state: EditorState, pos: number, side: -1 | 0 | 1, match: (node: SyntaxNode) => boolean): SyntaxNode | null;
7
+ /** The nodes whose text is code, quoted as it is: no list, quote or link in it. */
8
+ export declare const CODE_BLOCK_NODES: ReadonlySet<string>;
9
+ export declare const CODE_NODES: ReadonlySet<string>;
10
+ /** Whether `pos` sits in a fenced or indented code block, where a leading `-`,
11
+ * `1.` or `>` is literal code. */
12
+ export declare function inCodeBlock(state: EditorState, pos: number): boolean;
13
+ /** Whether `pos` sits in any code, the backtick span included. */
14
+ export declare function inCode(state: EditorState, pos: number): boolean;
15
+ /** Call `each` with the start of every line from `from` to `to`. */
16
+ export declare function forEachLineStart(state: EditorState, from: number, to: number, each: (lineFrom: number) => void): void;
17
+ /** Whether the parse moved on between two states. The tree is parsed in the
18
+ * background, so a decoration built from it must be built again when it has
19
+ * caught up, not only when the text, the viewport or the selection changes. */
20
+ export declare function treeAdvanced(before: EditorState, after: EditorState): boolean;
21
+ /** Whether the line at `lineFrom` is a thematic break (`---`, `* * *`). Its
22
+ * characters look like a bullet to a regular expression; to the tree they are not. */
23
+ export declare function isRuleLine(state: EditorState, lineFrom: number): boolean;
7
24
  /** `enclosingNode` for the common case: a node that goes by one of these names. */
8
25
  export declare function enclosingNamed(state: EditorState, pos: number, side: -1 | 0 | 1, names: string | ReadonlySet<string>): SyntaxNode | null;
26
+ /** The text of a `[text](url)` link, between its brackets; null when it is empty. */
27
+ export declare function linkTextRange(link: SyntaxNode): {
28
+ from: number;
29
+ to: number;
30
+ } | null;
9
31
  //# sourceMappingURL=text-editor.syntax.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"text-editor.syntax.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/text-editor/text-editor.syntax.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAOhD;;gFAEgF;AAChF,wBAAgB,aAAa,CAC5B,KAAK,EAAE,WAAW,EAClB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAChB,KAAK,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,OAAO,GAClC,UAAU,GAAG,IAAI,CAKnB;AAED,mFAAmF;AACnF,wBAAgB,cAAc,CAC7B,KAAK,EAAE,WAAW,EAClB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAChB,KAAK,EAAE,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,GACjC,UAAU,GAAG,IAAI,CAEnB"}
1
+ {"version":3,"file":"text-editor.syntax.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/text-editor/text-editor.syntax.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAOhD;;gFAEgF;AAChF,wBAAgB,aAAa,CAC5B,KAAK,EAAE,WAAW,EAClB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAChB,KAAK,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,OAAO,GAClC,UAAU,GAAG,IAAI,CAKnB;AAED,mFAAmF;AACnF,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAAwC,CAAC;AAC1F,eAAO,MAAM,UAAU,EAAE,WAAW,CAAC,MAAM,CAAgD,CAAC;AAE5F;mCACmC;AACnC,wBAAgB,WAAW,CAAC,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAEpE;AAED,kEAAkE;AAClE,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAE/D;AAED,oEAAoE;AACpE,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI,CAMrH;AAED;;gFAEgF;AAChF,wBAAgB,YAAY,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAE7E;AAED;uFACuF;AACvF,wBAAgB,UAAU,CAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAExE;AAED,mFAAmF;AACnF,wBAAgB,cAAc,CAC7B,KAAK,EAAE,WAAW,EAClB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAChB,KAAK,EAAE,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,GACjC,UAAU,GAAG,IAAI,CAEnB;AAED,qFAAqF;AACrF,wBAAgB,aAAa,CAAC,IAAI,EAAE,UAAU,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CASnF"}