@nldd/design-system 0.11.0 → 0.12.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 (142) hide show
  1. package/custom-elements.json +2188 -621
  2. package/dist/components/components.js +2475 -1602
  3. package/dist/components/content/code-viewer/code-viewer.d.ts +14 -1
  4. package/dist/components/content/code-viewer/code-viewer.d.ts.map +1 -1
  5. package/dist/components/content/code-viewer/code-viewer.diff.d.ts +40 -0
  6. package/dist/components/content/code-viewer/code-viewer.diff.d.ts.map +1 -0
  7. package/dist/components/content/code-viewer/code-viewer.diff.js +261 -0
  8. package/dist/components/content/code-viewer/code-viewer.diff.js.map +1 -0
  9. package/dist/components/content/code-viewer/code-viewer.i18n.d.ts +5 -0
  10. package/dist/components/content/code-viewer/code-viewer.i18n.d.ts.map +1 -1
  11. package/dist/components/content/code-viewer/code-viewer.i18n.js +9 -0
  12. package/dist/components/content/code-viewer/code-viewer.i18n.js.map +1 -1
  13. package/dist/components/content/code-viewer/code-viewer.js +98 -6
  14. package/dist/components/content/code-viewer/code-viewer.js.map +1 -1
  15. package/dist/components/content/code-viewer/code-viewer.styles.d.ts.map +1 -1
  16. package/dist/components/content/code-viewer/code-viewer.styles.js +134 -1
  17. package/dist/components/content/code-viewer/code-viewer.styles.js.map +1 -1
  18. package/dist/components/content/code-viewer/code-viewer.template.d.ts.map +1 -1
  19. package/dist/components/content/code-viewer/code-viewer.template.js +5 -4
  20. package/dist/components/content/code-viewer/code-viewer.template.js.map +1 -1
  21. package/dist/components/content/icon/icon-aliases.d.ts.map +1 -1
  22. package/dist/components/content/icon/icon-aliases.js +13 -4
  23. package/dist/components/content/icon/icon-aliases.js.map +1 -1
  24. package/dist/components/content/icon/icon-gallery-status.d.ts.map +1 -1
  25. package/dist/components/content/icon/icon-gallery-status.js +9 -0
  26. package/dist/components/content/icon/icon-gallery-status.js.map +1 -1
  27. package/dist/components/content/icon/icon-registry.d.ts.map +1 -1
  28. package/dist/components/content/icon/icon-registry.js +9 -2
  29. package/dist/components/content/icon/icon-registry.js.map +1 -1
  30. package/dist/components/content/rich-text/rich-text.d.ts +10 -0
  31. package/dist/components/content/rich-text/rich-text.d.ts.map +1 -1
  32. package/dist/components/content/rich-text/rich-text.js +10 -0
  33. package/dist/components/content/rich-text/rich-text.js.map +1 -1
  34. package/dist/components/{dist-Bo5Jeyfn.js → dist-B5E3q-ea.js} +2 -1
  35. package/dist/components/{dist-DbNhCpS5.js → dist-BFw_yEMS.js} +2 -1
  36. package/dist/components/{dist-DnZmcpbQ.js → dist-BNLAXAyO.js} +2 -1
  37. package/dist/components/{dist-DkqAbJH8.js → dist-BOVSVPSz.js} +1 -1
  38. package/dist/components/{dist-Ch3gNAuT.js → dist-BPB3rWnd.js} +2 -1
  39. package/dist/components/{dist-Bud_7w5g.js → dist-BWlUmyq3.js} +34 -2869
  40. package/dist/components/dist-CC8oiVtm.js +366 -0
  41. package/dist/components/dist-COKR0tYU.js +2860 -0
  42. package/dist/components/{dist-CaxHkqR2.js → dist-Co-tsc9S.js} +4 -3
  43. package/dist/components/{dist-iC2RTM0V.js → dist-D_9ZyZ5v.js} +3 -2
  44. package/dist/components/{dist-BB5mlo7D.js → dist-Dn9pjiud.js} +3 -2
  45. package/dist/components/{dist-B2QcygzG.js → dist-Dz28se9B.js} +2 -1
  46. package/dist/components/{dist-CA0yDFIt.js → dist-IPm8ilWf.js} +3 -2
  47. package/dist/components/{icon-zNX9A6d3.js → icon-DFhgRf3P.js} +18 -6
  48. package/dist/components/{icon-button-Cntrg4_E.js → icon-button-Sxkh5cVr.js} +1 -1
  49. package/dist/components/inputs/code-editor/code-editor.d.ts +4 -54
  50. package/dist/components/inputs/code-editor/code-editor.d.ts.map +1 -1
  51. package/dist/components/inputs/code-editor/code-editor.js +22 -262
  52. package/dist/components/inputs/code-editor/code-editor.js.map +1 -1
  53. package/dist/components/inputs/code-editor/code-editor.styles.d.ts.map +1 -1
  54. package/dist/components/inputs/code-editor/code-editor.styles.js +7 -0
  55. package/dist/components/inputs/code-editor/code-editor.styles.js.map +1 -1
  56. package/dist/components/inputs/text-editor/text-editor.annotation-sentinels.d.ts.map +1 -1
  57. package/dist/components/inputs/text-editor/text-editor.annotation-sentinels.js +9 -7
  58. package/dist/components/inputs/text-editor/text-editor.annotation-sentinels.js.map +1 -1
  59. package/dist/components/inputs/text-editor/text-editor.annotations.js +1 -1
  60. package/dist/components/inputs/text-editor/text-editor.annotations.js.map +1 -1
  61. package/dist/components/inputs/text-editor/text-editor.clipboard.d.ts +16 -0
  62. package/dist/components/inputs/text-editor/text-editor.clipboard.d.ts.map +1 -0
  63. package/dist/components/inputs/text-editor/text-editor.clipboard.js +50 -0
  64. package/dist/components/inputs/text-editor/text-editor.clipboard.js.map +1 -0
  65. package/dist/components/inputs/text-editor/text-editor.commands.d.ts.map +1 -1
  66. package/dist/components/inputs/text-editor/text-editor.commands.js +31 -58
  67. package/dist/components/inputs/text-editor/text-editor.commands.js.map +1 -1
  68. package/dist/components/inputs/text-editor/text-editor.d.ts +17 -64
  69. package/dist/components/inputs/text-editor/text-editor.d.ts.map +1 -1
  70. package/dist/components/inputs/text-editor/text-editor.drag.d.ts.map +1 -1
  71. package/dist/components/inputs/text-editor/text-editor.drag.js +2 -1
  72. package/dist/components/inputs/text-editor/text-editor.drag.js.map +1 -1
  73. package/dist/components/inputs/text-editor/text-editor.focus-selection.d.ts +3 -0
  74. package/dist/components/inputs/text-editor/text-editor.focus-selection.d.ts.map +1 -0
  75. package/dist/components/inputs/text-editor/text-editor.focus-selection.js +55 -0
  76. package/dist/components/inputs/text-editor/text-editor.focus-selection.js.map +1 -0
  77. package/dist/components/inputs/text-editor/text-editor.hidden-syntax.d.ts +6 -0
  78. package/dist/components/inputs/text-editor/text-editor.hidden-syntax.d.ts.map +1 -0
  79. package/dist/components/inputs/text-editor/text-editor.hidden-syntax.js +257 -0
  80. package/dist/components/inputs/text-editor/text-editor.hidden-syntax.js.map +1 -0
  81. package/dist/components/inputs/text-editor/text-editor.js +93 -313
  82. package/dist/components/inputs/text-editor/text-editor.js.map +1 -1
  83. package/dist/components/inputs/text-editor/text-editor.keymap.d.ts +6 -0
  84. package/dist/components/inputs/text-editor/text-editor.keymap.d.ts.map +1 -0
  85. package/dist/components/inputs/text-editor/text-editor.keymap.js +38 -0
  86. package/dist/components/inputs/text-editor/text-editor.keymap.js.map +1 -0
  87. package/dist/components/inputs/text-editor/text-editor.links.d.ts.map +1 -1
  88. package/dist/components/inputs/text-editor/text-editor.links.js +11 -9
  89. package/dist/components/inputs/text-editor/text-editor.links.js.map +1 -1
  90. package/dist/components/inputs/text-editor/text-editor.markdown.d.ts +1 -17
  91. package/dist/components/inputs/text-editor/text-editor.markdown.d.ts.map +1 -1
  92. package/dist/components/inputs/text-editor/text-editor.markdown.js +26 -186
  93. package/dist/components/inputs/text-editor/text-editor.markdown.js.map +1 -1
  94. package/dist/components/inputs/text-editor/text-editor.mention.d.ts +52 -0
  95. package/dist/components/inputs/text-editor/text-editor.mention.d.ts.map +1 -0
  96. package/dist/components/inputs/text-editor/text-editor.mention.js +186 -0
  97. package/dist/components/inputs/text-editor/text-editor.mention.js.map +1 -0
  98. package/dist/components/inputs/text-editor/text-editor.mentions.d.ts +0 -16
  99. package/dist/components/inputs/text-editor/text-editor.mentions.d.ts.map +1 -1
  100. package/dist/components/inputs/text-editor/text-editor.mentions.js +1 -41
  101. package/dist/components/inputs/text-editor/text-editor.mentions.js.map +1 -1
  102. package/dist/components/inputs/text-editor/text-editor.selection.d.ts +13 -0
  103. package/dist/components/inputs/text-editor/text-editor.selection.d.ts.map +1 -0
  104. package/dist/components/inputs/text-editor/text-editor.selection.js +62 -0
  105. package/dist/components/inputs/text-editor/text-editor.selection.js.map +1 -0
  106. package/dist/components/inputs/text-editor/text-editor.spellcheck.d.ts.map +1 -1
  107. package/dist/components/inputs/text-editor/text-editor.spellcheck.js +4 -6
  108. package/dist/components/inputs/text-editor/text-editor.spellcheck.js.map +1 -1
  109. package/dist/components/inputs/text-editor/text-editor.styles.d.ts.map +1 -1
  110. package/dist/components/inputs/text-editor/text-editor.styles.js +172 -54
  111. package/dist/components/inputs/text-editor/text-editor.styles.js.map +1 -1
  112. package/dist/components/inputs/text-editor/text-editor.syntax.d.ts +22 -0
  113. package/dist/components/inputs/text-editor/text-editor.syntax.d.ts.map +1 -1
  114. package/dist/components/inputs/text-editor/text-editor.syntax.js +44 -0
  115. package/dist/components/inputs/text-editor/text-editor.syntax.js.map +1 -1
  116. package/dist/components/status-and-feedback/notification/notification.d.ts +2 -1
  117. package/dist/components/status-and-feedback/notification/notification.d.ts.map +1 -1
  118. package/dist/components/status-and-feedback/notification/notification.js +5 -2
  119. package/dist/components/status-and-feedback/notification/notification.js.map +1 -1
  120. package/dist/components/status-and-feedback/notification/notification.styles.d.ts.map +1 -1
  121. package/dist/components/status-and-feedback/notification/notification.styles.js +18 -0
  122. package/dist/components/status-and-feedback/notification/notification.styles.js.map +1 -1
  123. package/dist/components/status-and-feedback/notification/notifications-area.d.ts.map +1 -1
  124. package/dist/components/status-and-feedback/notification/notifications-area.js +14 -0
  125. package/dist/components/status-and-feedback/notification/notifications-area.js.map +1 -1
  126. package/dist/css/rich-text.css +61 -1
  127. package/dist/css/themes/donkergeel.css +7 -3
  128. package/dist/css/themes/geel.css +7 -3
  129. package/dist/css/themes.css +14 -6
  130. package/dist/css/variables.css +10 -4
  131. package/dist/nldd.min.js +853 -557
  132. package/dist/translations/en-US.d.ts.map +1 -1
  133. package/dist/translations/en-US.js +5 -0
  134. package/dist/translations/en-US.js.map +1 -1
  135. package/dist/translations/nl.generated.d.ts +5 -0
  136. package/dist/translations/nl.generated.d.ts.map +1 -1
  137. package/dist/types/vue.d.ts +34 -30
  138. package/dist/utilities/codemirror/codemirror-input.d.ts +90 -0
  139. package/dist/utilities/codemirror/codemirror-input.d.ts.map +1 -0
  140. package/dist/utilities/codemirror/codemirror-input.js +250 -0
  141. package/dist/utilities/codemirror/codemirror-input.js.map +1 -0
  142. package/package.json +2 -1
@@ -1 +1 @@
1
- {"version":3,"file":"text-editor.spellcheck.js","sourceRoot":"","sources":["../../../../src/components/inputs/text-editor/text-editor.spellcheck.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAuC,MAAM,kBAAkB,CAAC;AAC3G,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,eAAe,EAAoC,MAAM,mBAAmB,CAAC;AAEnG,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE;;;iFAGiF;AAEjF;;0EAE0E;AAC1E,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC,MAAM,EAAwD,CAAC;AAEzG;;0DAE0D;AAC1D,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,CAAC,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC;AAExF,SAAS,SAAS,CAAC,IAAmB,EAAE,KAAkB;IACzD,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM;QAAE,OAAO,KAAK,CAAC;IACvC,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACtC,OAAO,GAAG,KAAK,IAAI,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;AACzF,CAAC;AAED,MAAM,OAAO,GAAG,oBAAoB,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;AAE7G,MAAM,YAAY,GAAG,UAAU,CAAC,IAAI,CAAC,EAAE,UA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,MAAM,IAAI,CAAC,CAAC;IACrE,CAAC;IACD,0EAA0E;IAC1E,4CAA4C;IAC5C,OAAO,GAAG,KAAK,WAAW;QACzB,CAAC,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC;QACnB,CAAC,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;AAC/D,CAAC;AAED,iFAAiF;AACjF,MAAM,UAAU,UAAU;IACzB,OAAO;QACN,UAAU,CAAC,iBAAiB,CAAC,EAAE,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;QACvD,OAAO;QACP,oEAAoE;QACpE,uBAAuB;QACvB,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC;QAC5B,cAAc,CAAC,EAAE,CAAC,IAAI,CAAC;QACvB,aAAa;KACb,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"text-editor.spellcheck.js","sourceRoot":"","sources":["../../../../src/components/inputs/text-editor/text-editor.spellcheck.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAuC,MAAM,kBAAkB,CAAC;AAC3G,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,eAAe,EAAoC,MAAM,mBAAmB,CAAC;AAEnG,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD;;;iFAGiF;AAEjF;;0EAE0E;AAC1E,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC,MAAM,EAAwD,CAAC;AAEzG;;0DAE0D;AAC1D,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,CAAC,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC;AAExF,S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,KAAK,QAAQ,IAAI,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IACnG,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACjC,IAAI,CAAC,KAAK;QAAE,OAAO,KAAK,CAAC;IACzB,IAAI,CAAC,KAAK,EAAE,CAAC;QACZ,qEAAqE;QACrE,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAC7B,OAAO,GAAG,KAAK,IAAI,IAAI,GAAG,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC,CAAC;IACrE,CAAC;IACD,0EAA0E;IAC1E,4CAA4C;IAC5C,OAAO,GAAG,KAAK,WAAW;QACzB,CAAC,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC;QACnB,CAAC,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;AAC/D,CAAC;AAED,iFAAiF;AACjF,MAAM,UAAU,UAAU;IACzB,OAAO;QACN,UAAU,CAAC,iBAAiB,CAAC,EAAE,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;QACvD,OAAO;QACP,oEAAoE;QACpE,uBAAuB;QACvB,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC;QAC5B,cAAc,CAAC,EAAE,CAAC,IAAI,CAAC;QACvB,aAAa;KACb,CAAC;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"text-editor.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/text-editor/text-editor.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB,yBAylB5B,CAAC"}
1
+ {"version":3,"file":"text-editor.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/text-editor/text-editor.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB,yBA+sB5B,CAAC"}
@@ -11,6 +11,7 @@ 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
17
  --_text-editor-highlight-border-color: transparent;
@@ -20,28 +21,50 @@ export const textEditorStyles = css `
20
21
  its width plus its ring. Without it the edge carets are clipped. */
21
22
  --_text-editor-padding-inline: calc(var(--_text-editor-caret-width) + var(--_text-editor-caret-ring-width));
22
23
  --_text-editor-content-color: var(--semantics-content-color);
24
+ --_text-editor-mark-color: var(--semantics-content-secondary-color);
25
+ --_text-editor-link-color: var(--semantics-links-color);
26
+ --_text-editor-strong-font-weight: var(--primitives-font-weight-body-bold);
27
+ --_text-editor-heading-1-font: var(--primitives-font-display-1-sm);
28
+ --_text-editor-heading-2-font: var(--primitives-font-display-2-sm);
29
+ --_text-editor-heading-3-font: var(--primitives-font-display-3-sm);
30
+ --_text-editor-heading-4-font: var(--primitives-font-display-4-sm);
31
+ --_text-editor-heading-5-font: var(--primitives-font-display-5-sm);
32
+ --_text-editor-heading-6-font: var(--primitives-font-display-6-sm);
33
+ --_text-editor-quote-font-size: var(--primitives-font-size-200);
23
34
  --_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);
35
+ --_text-editor-code-font: var(--primitives-font-monospace-sm-regular-snug);
36
+ --_text-editor-code-font-size: var(--semantics-code-inline-font-size);
37
+ --_text-editor-code-font-family: var(--primitives-font-family-monospace);
38
+ --_text-editor-code-font-weight: var(--primitives-font-weight-body-regular);
39
+ /* The scale of --semantics-code-inline-font-size, and the JetBrains Mono box
40
+ (ascent 1020 + descent 300 per 1000), to size inline code like a token. */
41
+ --_text-editor-code-scale: 0.85;
42
+ --_text-editor-code-content-height: 1.32em;
26
43
  --_text-editor-marker-font-size: var(--primitives-font-size-90);
27
44
  /* JetBrains Mono advance (600/1000 em) at the marker size; leading
28
45
  list/quote markers are mono so the hanging indent equals their width. */
29
46
  --_text-editor-marker-advance: calc(0.6 * var(--_text-editor-marker-font-size));
30
47
  --_text-editor-bullet-size: 0.45em;
31
- --_text-editor-bullet-color: var(--semantics-content-secondary-color);
48
+ --_text-editor-bullet-color: var(--semantics-content-color);
49
+ --_text-editor-rule-thickness: var(--semantics-dividers-thickness);
50
+ --_text-editor-quote-border-width: var(--primitives-border-width-regular);
51
+ --_text-editor-quote-border-color: var(--semantics-content-color);
52
+ --_text-editor-rule-color: var(--semantics-dividers-color);
32
53
  --_text-editor-heading-marker-scale: 75%;
33
54
  --_text-editor-token-corner-radius: var(--primitives-corner-radius-sm);
34
- --_text-editor-token-block-padding: 0.15em;
35
55
  --_text-editor-token-inline-padding: 0.3em;
36
56
  /* Vertical padding for an inline token that inherits the block font (tint,
37
57
  mention): fills the line up to its line-height, never past it, so tokens on
38
58
  adjacent lines never overlap. 1lh and em resolve on the token, so it adapts
39
59
  to a heading's tighter line. (~1.2em is the text's own box.) */
40
60
  --_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));
61
+ --_text-editor-code-token-background-color: var(--semantics-surfaces-tinted-background-color);
62
+ --_text-editor-code-token-highlight-border-color: var(--semantics-surfaces-tinted-highlight-border-color);
63
+ --_text-editor-token-highlight-border-width: var(--semantics-surfaces-highlight-border-width);
42
64
  --_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);
65
+ --_text-editor-code-block-inline-padding: var(--primitives-space-16);
66
+ --_text-editor-code-block-block-padding: var(--primitives-space-16);
67
+ --_text-editor-code-block-corner-radius: var(--semantics-surfaces-corner-radius);
45
68
  --_text-editor-annotation-token-background-color: light-dark(var(--primitives-color-mark-75), var(--primitives-color-mark-150));
46
69
  --_text-editor-annotation-token-is-selected-background-color: light-dark(var(--primitives-color-mark-200), var(--primitives-color-mark-400));
47
70
  --_text-editor-annotation-token-badge-content-color: var(--primitives-color-mark-1000);
@@ -56,9 +79,12 @@ export const textEditorStyles = css `
56
79
  that swallows the white (mark-1000) badge number. */
57
80
  --_text-editor-annotation-token-is-selected-badge-background-color: var(--primitives-color-mark-450);
58
81
  --_text-editor-annotation-token-is-selected-badge-highlight-border-color: var(--primitives-color-mark-500);
82
+ --_text-editor-annotation-token-is-selected-content-color: var(--primitives-color-neutral-950);
83
+ --_text-editor-annotation-badge-font-family: var(--primitives-font-family-body);
59
84
  --_text-editor-annotation-badge-size: 1.5em;
60
85
  --_text-editor-annotation-badge-font-scale: 0.62;
61
86
  --_text-editor-link-badge-size: calc(1em + 2 * var(--_text-editor-token-block-padding-fit));
87
+ --_text-editor-link-badge-gap: 0.1em;
62
88
  --_text-editor-link-badge-content-color: var(--components-text-editor-link-badge-content-color);
63
89
  --_text-editor-link-badge-background-color: var(--components-text-editor-link-badge-background-color);
64
90
  --_text-editor-link-badge-highlight-border-color: var(--components-text-editor-link-badge-highlight-border-color);
@@ -67,10 +93,13 @@ export const textEditorStyles = css `
67
93
  --_text-editor-link-badge-is-hovered-highlight-border-color: var(--components-text-editor-link-badge-is-hovered-highlight-border-color);
68
94
  --_text-editor-link-badge-is-active-highlight-border-color: var(--components-text-editor-link-badge-is-active-highlight-border-color);
69
95
  --_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);
96
+ --_text-editor-mention-token-background-color: var(--semantics-mentions-background-color);
97
+ --_text-editor-selection-color: var(--semantics-text-selection-background-color);
98
+ --_text-editor-selection-content-color: var(--primitives-color-neutral-1000);
99
+ --_text-editor-mention-token-highlight-border-color: var(--semantics-mentions-highlight-border-color);
100
+ --_text-editor-mention-token-content-color: var(--semantics-mentions-content-color);
101
+ --_text-editor-mention-token-is-selected-background-color: var(--semantics-mentions-is-selected-background-color);
102
+ --_text-editor-mention-token-is-selected-content-color: var(--semantics-mentions-is-selected-content-color);
74
103
  --_text-editor-rows: 6;
75
104
 
76
105
  ${inheritedTextReset}
@@ -121,6 +150,8 @@ export const textEditorStyles = css `
121
150
  :host([disabled]) .text-editor {
122
151
  opacity: var(--primitives-opacity-disabled);
123
152
  pointer-events: none;
153
+ -webkit-user-select: none;
154
+ user-select: none;
124
155
  }
125
156
 
126
157
  /* Focus ring only on the input-field variant; simple relies on the accent caret and
@@ -147,6 +178,11 @@ export const textEditorStyles = css `
147
178
  min-height: calc(var(--_text-editor-rows) * 1lh);
148
179
  }
149
180
 
181
+ /* Read-only, like a native read-only field: select and copy, but no caret. */
182
+ :host([readonly]) .cm-nldd-cursorLayer {
183
+ visibility: hidden;
184
+ }
185
+
150
186
  /* Prominent accent caret in both variants (the input-field variant additionally has the focus
151
187
  ring). The doubled class is purely for specificity — it outweighs
152
188
  CodeMirror's theme cursor color without depending on an attribute. */
@@ -162,7 +198,7 @@ export const textEditorStyles = css `
162
198
  /* A thin surface-colored ring, like the drop cursor, so the caret stays legible
163
199
  even over a tinted token (annotation, inline code) where the accent alone can
164
200
  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);
201
+ box-shadow: 0 0 0 var(--_text-editor-caret-ring-width) var(--_text-editor-caret-ring-color);
166
202
  }
167
203
 
168
204
  :host .cm-scroller {
@@ -185,34 +221,34 @@ export const textEditorStyles = css `
185
221
  prefix a predictable width for the hanging indent (see --_text-editor-marker-advance). */
186
222
 
187
223
  .cm-md-h1 {
188
- font: var(--primitives-font-display-1-sm);
224
+ font: var(--_text-editor-heading-1-font);
189
225
  }
190
226
 
191
227
  .cm-md-h2 {
192
- font: var(--primitives-font-display-2-sm);
228
+ font: var(--_text-editor-heading-2-font);
193
229
  }
194
230
 
195
231
  .cm-md-h3 {
196
- font: var(--primitives-font-display-3-sm);
232
+ font: var(--_text-editor-heading-3-font);
197
233
  }
198
234
 
199
235
  .cm-md-h4 {
200
- font: var(--primitives-font-display-4-sm);
236
+ font: var(--_text-editor-heading-4-font);
201
237
  }
202
238
 
203
239
  .cm-md-h5 {
204
- font: var(--primitives-font-display-5-sm);
240
+ font: var(--_text-editor-heading-5-font);
205
241
  }
206
242
 
207
243
  .cm-md-h6 {
208
- font: var(--primitives-font-display-6-sm);
244
+ font: var(--_text-editor-heading-6-font);
209
245
  }
210
246
 
211
247
  :is(.cm-md-h1, .cm-md-h2, .cm-md-h3, .cm-md-h4, .cm-md-h5, .cm-md-h6) .cm-md-mark {
212
248
  font-size: var(--_text-editor-heading-marker-scale);
213
249
  }
214
250
  .cm-md-strong {
215
- font-weight: bold;
251
+ font-weight: var(--_text-editor-strong-font-weight);
216
252
  }
217
253
  .cm-md-emphasis {
218
254
  font-style: italic;
@@ -224,38 +260,69 @@ export const textEditorStyles = css `
224
260
  /* The selected run is darkened with a decoration (see cm-md-code-selected
225
261
  below), since drawSelection hides the native selection. */
226
262
  .cm-md-code {
227
- padding-block: var(--_text-editor-token-block-padding-fit);
263
+ padding-block: max(0em, (1lh / var(--_text-editor-code-scale) - var(--_text-editor-code-content-height)) / 2);
228
264
  /* No inline padding: the tint hugs the backticks, which are the visible bounds
229
265
  anyway. A padded mark has no coordsAt hook, so the caret at its edge would
230
266
  otherwise jump by the padding depending on the direction it arrives from. */
231
267
  /* line-height is left to inherit from the block, so a fixed snug line-height
232
268
  won't make the chip overflow inside a tight heading. */
233
- font-family: var(--primitives-font-family-monospace);
269
+ font-family: var(--_text-editor-code-font-family);
234
270
  font-size: var(--_text-editor-code-font-size);
235
- font-weight: var(--primitives-font-weight-body-regular);
271
+ font-weight: var(--_text-editor-code-font-weight);
272
+ box-shadow: inset 0 0 0 var(--_text-editor-token-highlight-border-width) var(--_text-editor-code-token-highlight-border-color);
236
273
  background-color: var(--_text-editor-code-token-background-color);
237
274
  border-radius: var(--_text-editor-token-corner-radius);
238
275
  }
239
276
 
277
+ .cm-md-code-bare {
278
+ padding-inline: var(--_text-editor-token-inline-padding);
279
+ }
280
+
281
+ .cm-md-rule {
282
+ display: inline-block;
283
+ border-top: var(--_text-editor-rule-thickness) solid var(--_text-editor-rule-color);
284
+ width: 100%;
285
+ vertical-align: middle;
286
+ }
287
+
240
288
  /* :host beats the shared theme's ".cm-line { padding: 0 }" reset (equal
241
289
  specificity otherwise wins on source order), same as .cm-content above —
242
290
  without it the block padding never lands and the surface reads cramped. */
291
+ /* The block is drawn line by line, so its edge is too: the sides on every
292
+ line, the top on the first and the bottom on the last. */
243
293
  :host .cm-md-codeblock {
294
+ --_text-editor-code-block-edge: var(--_text-editor-token-highlight-border-width);
295
+
244
296
  padding-inline: var(--_text-editor-code-block-inline-padding);
297
+ box-shadow:
298
+ inset var(--_text-editor-code-block-edge) 0 0 var(--_text-editor-code-token-highlight-border-color),
299
+ inset calc(-1 * var(--_text-editor-code-block-edge)) 0 0 var(--_text-editor-code-token-highlight-border-color);
245
300
  font: var(--_text-editor-code-font);
246
301
  background-color: var(--_text-editor-code-token-background-color);
247
302
  }
248
303
 
249
304
  :host .cm-md-codeblock-first {
250
305
  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);
306
+ box-shadow:
307
+ inset var(--_text-editor-code-block-edge) 0 0 var(--_text-editor-code-token-highlight-border-color),
308
+ inset calc(-1 * var(--_text-editor-code-block-edge)) 0 0 var(--_text-editor-code-token-highlight-border-color),
309
+ inset 0 var(--_text-editor-code-block-edge) 0 var(--_text-editor-code-token-highlight-border-color);
310
+ border-start-start-radius: var(--_text-editor-code-block-corner-radius);
311
+ border-start-end-radius: var(--_text-editor-code-block-corner-radius);
253
312
  }
254
313
 
255
314
  :host .cm-md-codeblock-last {
256
315
  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);
316
+ box-shadow:
317
+ inset var(--_text-editor-code-block-edge) 0 0 var(--_text-editor-code-token-highlight-border-color),
318
+ inset calc(-1 * var(--_text-editor-code-block-edge)) 0 0 var(--_text-editor-code-token-highlight-border-color),
319
+ inset 0 calc(-1 * var(--_text-editor-code-block-edge)) 0 var(--_text-editor-code-token-highlight-border-color);
320
+ border-end-start-radius: var(--_text-editor-code-block-corner-radius);
321
+ border-end-end-radius: var(--_text-editor-code-block-corner-radius);
322
+ }
323
+
324
+ :host .cm-md-codeblock-first.cm-md-codeblock-last {
325
+ box-shadow: inset 0 0 0 var(--_text-editor-code-block-edge) var(--_text-editor-code-token-highlight-border-color);
259
326
  }
260
327
 
261
328
  /* Selected slice of a code span — drawSelection hides the native ::selection,
@@ -272,6 +339,29 @@ export const textEditorStyles = css `
272
339
  background-color: transparent;
273
340
  }
274
341
 
342
+ .cm-md-code .cm-md-code-selected {
343
+ --_text-editor-code-slice-start: 0px;
344
+ --_text-editor-code-slice-end: 0px;
345
+ padding-block: max(0em, (1lh / var(--_text-editor-code-scale) - var(--_text-editor-code-content-height)) / 2);
346
+ box-shadow:
347
+ inset 0 var(--_text-editor-token-highlight-border-width) 0 var(--_text-editor-code-token-highlight-border-color),
348
+ inset 0 calc(-1 * var(--_text-editor-token-highlight-border-width)) 0 var(--_text-editor-code-token-highlight-border-color),
349
+ inset var(--_text-editor-code-slice-start) 0 0 var(--_text-editor-code-token-highlight-border-color),
350
+ inset calc(-1 * var(--_text-editor-code-slice-end)) 0 0 var(--_text-editor-code-token-highlight-border-color);
351
+ }
352
+
353
+ .cm-md-code .cm-md-code-selected-start {
354
+ --_text-editor-code-slice-start: var(--_text-editor-token-highlight-border-width);
355
+ border-start-start-radius: var(--_text-editor-token-corner-radius);
356
+ border-end-start-radius: var(--_text-editor-token-corner-radius);
357
+ }
358
+
359
+ .cm-md-code .cm-md-code-selected-end {
360
+ --_text-editor-code-slice-end: var(--_text-editor-token-highlight-border-width);
361
+ border-start-end-radius: var(--_text-editor-token-corner-radius);
362
+ border-end-end-radius: var(--_text-editor-token-corner-radius);
363
+ }
364
+
275
365
  /* Whole code block selected: the line background (its padding-inline, the
276
366
  first/last line's block padding, and the rounded corners) takes the selected
277
367
  tint, so the block lights up edge to edge — the padding included, like a
@@ -280,17 +370,15 @@ export const textEditorStyles = css `
280
370
  background-color: var(--_text-editor-code-token-is-selected-background-color);
281
371
  }
282
372
 
283
- .cm-md-mention {
284
- color: var(--semantics-content-accent-color);
285
- font-weight: 600;
286
- }
287
373
 
288
374
  .cm-md-mention-token {
375
+ position: relative;
289
376
  padding-block: var(--_text-editor-token-block-padding-fit);
290
377
  /* Left space equals the @ icon's vertical inset (token height minus the icon,
291
378
  halved), so the icon sits equally clear left, top and bottom; the right keeps
292
379
  the normal token inset around the name. */
293
380
  padding-inline: max(0em, (max(1.2em, 1lh) - var(--_text-editor-mention-icon-size)) / 2) var(--_text-editor-token-inline-padding);
381
+ box-shadow: inset 0 0 0 var(--_text-editor-token-highlight-border-width) var(--_text-editor-mention-token-highlight-border-color);
294
382
  color: var(--_text-editor-mention-token-content-color);
295
383
  background-color: var(--_text-editor-mention-token-background-color);
296
384
  border-radius: var(--_text-editor-token-corner-radius);
@@ -318,7 +406,24 @@ export const textEditorStyles = css `
318
406
  content: attr(data-label);
319
407
  }
320
408
 
409
+ /* CodeMirror draws no selection under a token, so its rounded corners showed
410
+ white. A selected token puts the selection color behind itself, in the
411
+ selection layer's stacking (the scroller), so the corners take it. */
412
+ .cm-md-mention-token[data-selected="within"]::before {
413
+ content: '';
414
+ position: absolute;
415
+ inset: 0;
416
+ z-index: -1;
417
+ background-color: var(--_text-editor-selection-color);
418
+ }
419
+
420
+ /* A mention selected on its own keeps its rounded corners: the selection is the token. */
421
+ :host .cm-editor:has(.cm-md-mention-token[data-selected="alone"]) .cm-selectionLayer {
422
+ visibility: hidden;
423
+ }
424
+
321
425
  .cm-md-mention-token[data-selected] {
426
+ box-shadow: none;
322
427
  color: var(--_text-editor-mention-token-is-selected-content-color);
323
428
  background-color: var(--_text-editor-mention-token-is-selected-background-color);
324
429
  }
@@ -330,11 +435,11 @@ export const textEditorStyles = css `
330
435
  }
331
436
 
332
437
  .cm-md-link {
333
- color: var(--semantics-links-color);
438
+ color: var(--_text-editor-link-color);
334
439
  }
335
440
 
336
441
  .cm-md-url {
337
- color: var(--semantics-content-secondary-color);
442
+ color: var(--_text-editor-mark-color);
338
443
  }
339
444
 
340
445
  /* The markdown highlight style tints the URL token (teal); make its span inherit
@@ -347,7 +452,7 @@ export const textEditorStyles = css `
347
452
  and override the highlight-style URL tint (teal) on its token span so the
348
453
  whole address is the link color, not just the mark wrapper. */
349
454
  .cm-md-autolink {
350
- color: var(--semantics-links-color);
455
+ color: var(--_text-editor-link-color);
351
456
  }
352
457
 
353
458
  .cm-md-autolink span {
@@ -355,16 +460,20 @@ export const textEditorStyles = css `
355
460
  }
356
461
 
357
462
  .cm-md-quote {
358
- color: var(--semantics-content-color);
463
+ color: var(--_text-editor-content-color);
359
464
  font-style: italic;
360
- font-size: var(--primitives-font-size-200);
465
+ font-size: var(--_text-editor-quote-font-size);
466
+ }
467
+
468
+ .cm-md-quote-row {
469
+ font-size: var(--_text-editor-quote-font-size);
361
470
  }
362
471
 
363
472
  /* Markers: dimmed (secondary color, not opacity, so contrast holds) and
364
473
  monospace at the 16px marker size — tidy, and a fixed-width leading prefix. */
365
474
  .cm-md-mark {
366
- color: var(--semantics-content-secondary-color);
367
- font-family: var(--primitives-font-family-monospace);
475
+ color: var(--_text-editor-mark-color);
476
+ font-family: var(--_text-editor-code-font-family);
368
477
  font-size: var(--_text-editor-marker-font-size);
369
478
  }
370
479
 
@@ -372,9 +481,19 @@ export const textEditorStyles = css `
372
481
  font-size: 1em;
373
482
  }
374
483
 
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. */
484
+ /* A shadow, not a border, so the line takes no room and the text stays put
485
+ when the quote shows its marks instead. */
486
+ .cm-md-quote-line {
487
+ box-shadow: inset var(--_text-editor-quote-border-width) 0 0 var(--_text-editor-quote-border-color);
488
+ }
489
+
490
+ :host .cm-md-quote-mark-hidden,
491
+ :host .cm-md-quote-mark-hidden * {
492
+ color: transparent;
493
+ }
494
+
495
+ /* A bullet with syntax="hidden": the character keeps its mono advance, so a
496
+ wrapped line still aligns under the text, and a dot is drawn over it. */
378
497
  .cm-md-bullet {
379
498
  position: relative;
380
499
  color: transparent;
@@ -397,23 +516,21 @@ export const textEditorStyles = css `
397
516
  mono advance and the hanging indent lines up exactly. */
398
517
  .cm-md-listprefix,
399
518
  .cm-md-listprefix * {
400
- font-family: var(--primitives-font-family-monospace);
519
+ font-family: var(--_text-editor-code-font-family);
401
520
  font-size: var(--_text-editor-marker-font-size);
402
521
  }
403
522
 
404
523
 
405
524
  /* # 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. */
525
+ A light body tint marks the annotated text; a solid badge (the nub) sits at
526
+ the end carrying the count, the cue that does not rest on color. One role
527
+ for all annotations — the type is communicated by the consumer's pane. */
410
528
 
411
529
  /* One cohesive yellow block: the light tint with rounded corners and a reserved
412
530
  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). */
531
+ shares the tint and wraps with the text). box-decoration-break keeps the
532
+ tint + rounding on every wrapped fragment; padding-block extends the tint
533
+ without growing the line (vertical padding on an inline box is visual only). */
417
534
  .cm-annotation {
418
535
  background-color: var(--_text-editor-annotation-token-background-color);
419
536
  border-radius: var(--_text-editor-token-corner-radius);
@@ -442,15 +559,15 @@ export const textEditorStyles = css `
442
559
  .cm-annotation.is-selected,
443
560
  .cm-annotation .is-selected {
444
561
  background-color: var(--_text-editor-annotation-token-is-selected-background-color);
445
- color: var(--primitives-color-neutral-950);
562
+ color: var(--_text-editor-annotation-token-is-selected-content-color);
446
563
  }
447
564
 
448
565
  .cm-content ::selection {
449
- color: var(--primitives-color-neutral-1000);
566
+ color: var(--_text-editor-selection-content-color);
450
567
  }
451
568
 
452
569
  .cm-annotation ::selection {
453
- color: var(--primitives-color-neutral-950);
570
+ color: var(--_text-editor-annotation-token-is-selected-content-color);
454
571
  }
455
572
 
456
573
  .cm-annotation-badge {
@@ -474,7 +591,7 @@ export const textEditorStyles = css `
474
591
  than it looks and scales with the token in headings. */
475
592
  vertical-align: middle;
476
593
  transform: translateY(-0.11em);
477
- font-family: var(--primitives-font-family-body);
594
+ font-family: var(--_text-editor-annotation-badge-font-family);
478
595
  font-size: calc(var(--_text-editor-annotation-badge-font-scale) * 1em);
479
596
  font-weight: 700;
480
597
  line-height: 1;
@@ -535,7 +652,7 @@ export const textEditorStyles = css `
535
652
  width: var(--primitives-border-width-regular);
536
653
  border-radius: var(--primitives-border-width-thin);
537
654
  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);
655
+ box-shadow: 0 0 0 var(--primitives-border-width-thin) var(--_text-editor-caret-ring-color);
539
656
  pointer-events: none;
540
657
  z-index: 4;
541
658
  }
@@ -561,6 +678,7 @@ export const textEditorStyles = css `
561
678
  display: inline-flex;
562
679
  align-items: center;
563
680
  justify-content: center;
681
+ margin-inline: var(--_text-editor-link-badge-gap);
564
682
  min-width: var(--_text-editor-link-badge-size);
565
683
  height: var(--_text-editor-link-badge-size);
566
684
  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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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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"}
@@ -13,8 +13,52 @@ export function enclosingNode(state, pos, side, match) {
13
13
  }
14
14
  return null;
15
15
  }
16
+ /** The nodes whose text is code, quoted as it is: no list, quote or link in it. */
17
+ export const CODE_BLOCK_NODES = new Set(['FencedCode', 'CodeBlock']);
18
+ export const CODE_NODES = new Set([...CODE_BLOCK_NODES, 'InlineCode']);
19
+ /** Whether `pos` sits in a fenced or indented code block, where a leading `-`,
20
+ * `1.` or `>` is literal code. */
21
+ export function inCodeBlock(state, pos) {
22
+ return enclosingNamed(state, pos, 1, CODE_BLOCK_NODES) !== null;
23
+ }
24
+ /** Whether `pos` sits in any code, the backtick span included. */
25
+ export function inCode(state, pos) {
26
+ return enclosingNamed(state, pos, 1, CODE_NODES) !== null;
27
+ }
28
+ /** Call `each` with the start of every line from `from` to `to`. */
29
+ export function forEachLineStart(state, from, to, each) {
30
+ for (let pos = from; pos <= to;) {
31
+ const line = state.doc.lineAt(pos);
32
+ each(line.from);
33
+ pos = line.to + 1;
34
+ }
35
+ }
36
+ /** Whether the parse moved on between two states. The tree is parsed in the
37
+ * background, so a decoration built from it must be built again when it has
38
+ * caught up, not only when the text, the viewport or the selection changes. */
39
+ export function treeAdvanced(before, after) {
40
+ return syntaxTree(before) !== syntaxTree(after);
41
+ }
42
+ /** Whether the line at `lineFrom` is a thematic break (`---`, `* * *`). Its
43
+ * characters look like a bullet to a regular expression; to the tree they are not. */
44
+ export function isRuleLine(state, lineFrom) {
45
+ return enclosingNamed(state, lineFrom, 1, 'HorizontalRule') !== null;
46
+ }
16
47
  /** `enclosingNode` for the common case: a node that goes by one of these names. */
17
48
  export function enclosingNamed(state, pos, side, names) {
18
49
  return enclosingNode(state, pos, side, typeof names === 'string' ? (node) => node.name === names : (node) => names.has(node.name));
19
50
  }
51
+ /** The text of a `[text](url)` link, between its brackets; null when it is empty. */
52
+ export function linkTextRange(link) {
53
+ const marks = [];
54
+ for (let child = link.firstChild; child; child = child.nextSibling) {
55
+ if (child.name === 'LinkMark')
56
+ marks.push(child);
57
+ }
58
+ if (marks.length < 2)
59
+ return null;
60
+ const from = marks[0].to; // after the opening '['
61
+ const to = marks[1].from; // before the closing ']'
62
+ return to > from ? { from, to } : null;
63
+ }
20
64
  //# sourceMappingURL=text-editor.syntax.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"text-editor.syntax.js","sourceRoot":"","sources":["../../../../src/components/inputs/text-editor/text-editor.syntax.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAIlD;;;6DAG6D;AAE7D;;gFAEgF;AAChF,MAAM,UAAU,aAAa,CAC5B,KAAkB,EAClB,GAAW,EACX,IAAgB,EAChB,KAAoC;IAEpC,KAAK,IAAI,IAAI,GAAsB,UAAU,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;QACxG,IAAI,KAAK,CAAC,IAAI,CAAC;YAAE,OAAO,IAAI,CAAC;IAC9B,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,cAAc,CAC7B,KAAkB,EAClB,GAAW,EACX,IAAgB,EAChB,KAAmC;IAEnC,OAAO,aAAa,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AACpI,CAAC"}
1
+ {"version":3,"file":"text-editor.syntax.js","sourceRoot":"","sources":["../../../../src/components/inputs/text-editor/text-editor.syntax.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAIlD;;;6DAG6D;AAE7D;;gFAEgF;AAChF,MAAM,UAAU,aAAa,CAC5B,KAAkB,EAClB,GAAW,EACX,IAAgB,EAChB,KAAoC;IAEpC,KAAK,IAAI,IAAI,GAAsB,UAAU,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;QACxG,IAAI,KAAK,CAAC,IAAI,CAAC;YAAE,OAAO,IAAI,CAAC;IAC9B,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC;AAED,mFAAmF;AACnF,MAAM,CAAC,MAAM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AAU,cAAc,CAC7B,KAAkB,EAClB,GAAW,EACX,IAAgB,EAChB,KAAmC;IAEnC,OAAO,aAAa,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AACpI,CAAC;AAED,qFAAqF;AACrF,MAAM,UAAU,aAAa,CAAC,IAAgB;IAC7C,MAAM,KAAK,GAAiB,EAAE,CAAC;IAC/B,KAAK,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,KAAK,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;QACpE,IAAI,KAAK,CAAC,IAAI,KAAK,UAAU;YAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClD,CAAC;IACD,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IAClC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,wBAAwB;IAClD,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,yBAAyB;IACnD,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AACxC,CAAC"}
@@ -6,7 +6,8 @@
6
6
  * page and stays there — this one floats, stacks, and goes away.
7
7
  *
8
8
  * It places itself. Write it wherever it belongs in your code and it moves to
9
- * one shared area: top right from md, full width across the top below that.
9
+ * one shared area: top right from md, where it slides in from the right, and
10
+ * full width across the top below that, where it drops in from the top.
10
11
  * Nothing about the position is settable, so notifications from anywhere in an
11
12
  * application land in the same place and stack in the same order.
12
13
  *
@@ -1 +1 @@
1
- {"version":3,"file":"notification.d.ts","sourceRoot":"","sources":["../../../../src/components/status-and-feedback/notification/notification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiFG;AAEH,OAAO,EAAE,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAQtD,OAAO,4BAA4B,CAAC;AACpC,OAAO,0CAA0C,CAAC;AAClD,OAAO,gCAAgC,CAAC;AAExC,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;AAY5F,yEAAyE;AACzE,MAAM,WAAW,kBAAkB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;yEACyE;AACzE,MAAM,WAAW,mBAAmB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,kBAAkB,EAAE,CAAC;CAC/B;AAED,iDAAiD;AACjD,MAAM,WAAW,kBAAkB;IAClC,2EAA2E;IAC3E,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAC;IACnC,0EAA0E;IAC1E,OAAO,IAAI,IAAI,CAAC;IAChB;2CACuC;IACvC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,mBAAmB,CAAC,GAAG,IAAI,CAAC;CACpD;;;;;;;;AAED,qBACa,gBAAiB,SAAQ,qBAA0D;IAC/F,OAAgB,MAAM,0BAAsB;IAG5C,OAAO,EAAE,mBAAmB,CAAa;I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Ac,QAAO,IAAI,CAEvB;IAEF,OAAO,CAAC,QAAQ;IAKP,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,mBAAmB,EAAE,gBAAgB,CAAC;KACtC;CACD"}
1
+ {"version":3,"file":"notification.d.ts","sourceRoot":"","sources":["../../../../src/components/status-and-feedback/notification/notification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkFG;AAEH,OAAO,EAAE,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAQtD,OAAO,4BAA4B,CAAC;AACpC,OAAO,0CAA0C,CAAC;AAClD,OAAO,gCAAgC,CAAC;AAKxC,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;AAY5F,yEAAyE;AACzE,MAAM,WAAW,kBAAkB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;yEACyE;AACzE,MAAM,WAAW,mBAAmB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,kBAAkB,EAAE,CAAC;CAC/B;AAED,iDAAiD;AACjD,MAAM,WAAW,kBAAkB;IAClC,2EAA2E;IAC3E,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAC;IACnC,0EAA0E;IAC1E,OAAO,IAAI,IAAI,CAAC;IAChB;2CACuC;IACvC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,mBAAmB,C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