@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
@@ -3712,13 +3712,131 @@
3712
3712
  }
3713
3713
  ]
3714
3714
  },
3715
+ {
3716
+ "kind": "javascript-module",
3717
+ "path": "src/components/content/code-viewer/code-viewer.diff.ts",
3718
+ "declarations": [
3719
+ {
3720
+ "kind": "function",
3721
+ "name": "parseUnifiedDiff",
3722
+ "return": {
3723
+ "type": {
3724
+ "text": "ParsedDiff"
3725
+ }
3726
+ },
3727
+ "parameters": [
3728
+ {
3729
+ "name": "raw",
3730
+ "type": {
3731
+ "text": "string"
3732
+ }
3733
+ }
3734
+ ],
3735
+ "description": "Parse a unified diff. File headers (`diff --git`, `index`, `---`, `+++` and\nthe like) are left out: the file name belongs to the page around the viewer.\nSo is `\`. A hunk ends where its `@@` header says\nit does, so the headers of a next file in a multi-file diff are not taken for\ncode; their name is lost, though, so give each file a viewer of its own.\nWithout any `@@` header, every line after the file header is code and the\nnumbers start at 1."
3736
+ },
3737
+ {
3738
+ "kind": "function",
3739
+ "name": "pairChangedLines",
3740
+ "return": {
3741
+ "type": {
3742
+ "text": "Array<[number, number]>"
3743
+ }
3744
+ },
3745
+ "parameters": [
3746
+ {
3747
+ "name": "lines",
3748
+ "type": {
3749
+ "text": "DiffLine[]"
3750
+ }
3751
+ }
3752
+ ],
3753
+ "description": "The removed and added lines that are one change: within a hunk, a run of\nremoved lines directly followed by a run of added lines, paired in order.\nIndices are into `lines`."
3754
+ },
3755
+ {
3756
+ "kind": "function",
3757
+ "name": "diffExtensions",
3758
+ "return": {
3759
+ "type": {
3760
+ "text": "Extension"
3761
+ }
3762
+ },
3763
+ "parameters": [
3764
+ {
3765
+ "name": "parsed",
3766
+ "type": {
3767
+ "text": "ParsedDiff"
3768
+ }
3769
+ },
3770
+ {
3771
+ "name": "labels",
3772
+ "type": {
3773
+ "text": "DiffLabels"
3774
+ }
3775
+ }
3776
+ ],
3777
+ "description": "Line colors, gutters, hunk headers and line labels for a parsed diff."
3778
+ },
3779
+ {
3780
+ "kind": "function",
3781
+ "name": "wordExtensions",
3782
+ "return": {
3783
+ "type": {
3784
+ "text": "Promise<Extension>"
3785
+ }
3786
+ },
3787
+ "parameters": [
3788
+ {
3789
+ "name": "parsed",
3790
+ "type": {
3791
+ "text": "ParsedDiff"
3792
+ }
3793
+ }
3794
+ ],
3795
+ "description": "Marks on the words that differ between each paired removed and added line.\nLoads"
3796
+ }
3797
+ ],
3798
+ "exports": [
3799
+ {
3800
+ "kind": "js",
3801
+ "name": "parseUnifiedDiff",
3802
+ "declaration": {
3803
+ "name": "parseUnifiedDiff",
3804
+ "module": "src/components/content/code-viewer/code-viewer.diff.ts"
3805
+ }
3806
+ },
3807
+ {
3808
+ "kind": "js",
3809
+ "name": "pairChangedLines",
3810
+ "declaration": {
3811
+ "name": "pairChangedLines",
3812
+ "module": "src/components/content/code-viewer/code-viewer.diff.ts"
3813
+ }
3814
+ },
3815
+ {
3816
+ "kind": "js",
3817
+ "name": "diffExtensions",
3818
+ "declaration": {
3819
+ "name": "diffExtensions",
3820
+ "module": "src/components/content/code-viewer/code-viewer.diff.ts"
3821
+ }
3822
+ },
3823
+ {
3824
+ "kind": "js",
3825
+ "name": "wordExtensions",
3826
+ "declaration": {
3827
+ "name": "wordExtensions",
3828
+ "module": "src/components/content/code-viewer/code-viewer.diff.ts"
3829
+ }
3830
+ }
3831
+ ]
3832
+ },
3715
3833
  {
3716
3834
  "kind": "javascript-module",
3717
3835
  "path": "src/components/content/code-viewer/code-viewer.ts",
3718
3836
  "declarations": [
3719
3837
  {
3720
3838
  "kind": "class",
3721
- "description": "A read-only block of code/text built on a non-editable CodeMirror 6 view. Visually pairs with nldd-code-editor (same engine, same token palette). Whitespace is preserved; long lines scroll horizontally by default. Set `wrap` to break long lines onto the next visual line. The viewer grows with its content. Set `max-height` to show a long file in a frame of its own: the block grows up to that height and scrolls beyond it. A scroller that overflows, in either direction, is a tab stop with a role and a name, so the keyboard reaches what a pointer can scroll to. Set `language` to one of the supported grammars (yaml, json, javascript, typescript, css, html, xml, bash, markdown, rust, gherkin, toml, sql, python) to highlight the content. Without `language` the content renders plain. Grammars are loaded lazily on first use, so a page that never sets `language` ships zero grammar code. Token colors are the `--semantics-code-syntax-*` custom properties (shared with the editor via the CodeMirror highlight style). Override them per-instance to swap the theme.",
3839
+ "description": "A read-only block of code/text built on a non-editable CodeMirror 6 view. Visually pairs with nldd-code-editor (same engine, same token palette). Whitespace is preserved; long lines scroll horizontally by default. Set `wrap` to break long lines onto the next visual line. The viewer grows with its content. Set `max-height` to show a long file in a frame of its own: the block grows up to that height and scrolls beyond it. A scroller that overflows, in either direction, is a tab stop with a role and a name, so the keyboard reaches what a pointer can scroll to. Set `language` to one of the supported grammars (yaml, json, javascript, typescript, css, html, xml, bash, markdown, rust, gherkin, toml, sql, python) to highlight the content. Without `language` the content renders plain. Grammars are loaded lazily on first use, so a page that never sets `language` ships zero grammar code. Set `diff` when the content is a unified diff, as git and pull request tools hand it out. The viewer shows the code it changes: an added line green and a removed line red, a column with the old and one with the new line number, a column with the `+` or `−`, and the `@@` header of each hunk between them. Within a removed line that is directly followed by an added one, the words that differ are marked, unless more than half of the line changed. File headers (`diff --git`, `---`, `+++`) are left out: name the file in the page around the viewer, and give each file of a multi-file diff a viewer of its own. `language` still highlights the code. A screen reader hears a summary first (\"2 regels toegevoegd, 1 regel verwijderd\") and \"Toegevoegd\" or \"Verwijderd\" with the line number before each changed line. A selection copies the code; the copy button copies the diff. Token colors are the `--semantics-code-syntax-*` custom properties (shared with the editor via the CodeMirror highlight style). Override them per-instance to swap the theme.",
3722
3840
  "name": "NLDDCodeViewer",
3723
3841
  "members": [
3724
3842
  {
@@ -3742,6 +3860,17 @@
3742
3860
  "attribute": "language",
3743
3861
  "reflects": true
3744
3862
  },
3863
+ {
3864
+ "kind": "field",
3865
+ "name": "diff",
3866
+ "type": {
3867
+ "text": "boolean"
3868
+ },
3869
+ "default": "false",
3870
+ "description": "The content is a unified diff.",
3871
+ "attribute": "diff",
3872
+ "reflects": true
3873
+ },
3745
3874
  {
3746
3875
  "kind": "field",
3747
3876
  "name": "noCopy",
@@ -3830,6 +3959,15 @@
3830
3959
  "fieldName": "language",
3831
3960
  "description": "Grammar to highlight with. Empty disables highlighting."
3832
3961
  },
3962
+ {
3963
+ "name": "diff",
3964
+ "type": {
3965
+ "text": "boolean"
3966
+ },
3967
+ "default": "false",
3968
+ "description": "The content is a unified diff: shown with line colors, old and new line numbers, and the changed words marked.",
3969
+ "fieldName": "diff"
3970
+ },
3833
3971
  {
3834
3972
  "name": "no-copy",
3835
3973
  "type": {
@@ -4909,7 +5047,7 @@
4909
5047
  "declarations": [
4910
5048
  {
4911
5049
  "kind": "class",
4912
- "description": "A container for rich text content that automatically applies responsive typography. Uses no shadow DOM so styles apply to all nested elements. Import nldd-rich-text.css globally in your application. The rich text lays out its direct children in a grid: the vertical rhythm between headings, paragraphs and lists, and the width zones below, apply to those children only. A single wrapper `div` without `class`, `style`, `role` or `data-rich-text-width`, as a markdown renderer or a component root produces it, is passed through with `display: contents`, so its children count as direct. Any other wrapper becomes a single grid item, and the paragraphs inside it lose their spacing. The headings keep one size on every width, the one they have on a phone. A heading in running text sits in a column as wide as a line of reading, on any screen, so its relation to the text beside it does not change and it has no reason to grow. Growing, an h2 on a wide screen was more than twice the size of the text, and an article broke into blocks at every heading. Page and section titles do grow: use nldd-title for those. Children are placed in three zones. A child belongs to the text unless it is listed, so it reads at the `main` size and is never wider than a line: text (headings, paragraphs, lists, blockquote, div/section) and every component that is not named below, such as nldd-box, nldd-card, nldd-banner, nldd-list and a button, and code (pre, nldd-code-viewer), which scrolls inside its block when a line is longer. Media, tables and a step bar (img, figure, video, iframe, table, nldd-table, nldd-image, nldd-step-bar) get the `wide` accent. What needs the room gets the `full` span: hr, nldd-collection and nldd-container. A child takes the room it needs inside its zone (`justify-self: start`), so the room is available without being forced. Overridable per child with `data-rich-text-width=\"main\" | \"wide\" | \"full\"`. In the left-aligned layout, wide and full read as a bleed to the right; with `centered` they are symmetrical.",
5050
+ "description": "A container for rich text content that automatically applies responsive typography. Uses no shadow DOM so styles apply to all nested elements. Import nldd-rich-text.css globally in your application. The rich text lays out its direct children in a grid: the vertical rhythm between headings, paragraphs and lists, and the width zones below, apply to those children only. A single wrapper `div` without `class`, `style`, `role` or `data-rich-text-width`, as a markdown renderer or a component root produces it, is passed through with `display: contents`, so its children count as direct. Any other wrapper becomes a single grid item, and the paragraphs inside it lose their spacing. The headings keep one size on every width, the one they have on a phone. A heading in running text sits in a column as wide as a line of reading, on any screen, so its relation to the text beside it does not change and it has no reason to grow. Growing, an h2 on a wide screen was more than twice the size of the text, and an article broke into blocks at every heading. Page and section titles do grow: use nldd-title for those. Children are placed in three zones. A child belongs to the text unless it is listed, so it reads at the `main` size and is never wider than a line: text (headings, paragraphs, lists, blockquote, div/section) and every component that is not named below, such as nldd-box, nldd-card, nldd-banner, nldd-list and a button, and code (pre, nldd-code-viewer), which scrolls inside its block when a line is longer. Media, tables and a step bar (img, figure, video, iframe, table, nldd-table, nldd-image, nldd-step-bar) get the `wide` accent. What needs the room gets the `full` span: hr, nldd-collection and nldd-container. A child takes the room it needs inside its zone (`justify-self: start`), so the room is available without being forced. Overridable per child with `data-rich-text-width=\"main\" | \"wide\" | \"full\"`. In the left-aligned layout, wide and full read as a bleed to the right; with `centered` they are symmetrical. An element with `data-mention` reads as a mention: the name in the mention color with the @ icon in front of it. Use `<a href=\"…\" data-mention>` when the person has a page to go to: it becomes the tinted token nldd-text-editor shows, and the tint is what says you can follow it. Use `<span data-mention>` when not: it keeps the color and the icon, without the tint. Write the name without the `@`: the rich text draws it. A mention in the editor's value, `[@Name](user:id)`, comes out of a markdown renderer as a link to `user:id`, which goes nowhere, so turn it into one of these yourself.",
4913
5051
  "name": "NLDDRichText",
4914
5052
  "members": [
4915
5053
  {
@@ -8640,93 +8778,6 @@
8640
8778
  "description": "A monospace editor for code, YAML, JSON and other technical content, built on CodeMirror 6 (via NLDDCodeMirrorElement). Visually pairs with nldd-code-viewer for a matching read-only surface. Default `appearance=\"simple\"` is a bare, flush editor (no frame, no focus ring) for use inside an nldd-form-field or a consumer composition that owns its own chrome and focus treatment; the caret is rendered as a prominent accent as the focus cue. `appearance=\"input-field\"` adds the framed surface (border ring, tinted fill, inner padding, radius) and a focus ring for standalone use. The simple variant has no surrounding space of its own: let a layout container own the spacing and forward clicks with `focusFromPoint()` so clicking the padding still starts editing. Optional `language` enables lazy syntax highlighting; `line-numbers` adds a gutter (click a number to move the caret to that line).",
8641
8779
  "name": "NLDDCodeEditor",
8642
8780
  "members": [
8643
- {
8644
- "kind": "field",
8645
- "name": "shadowRootOptions",
8646
- "type": {
8647
- "text": "object"
8648
- },
8649
- "static": true,
8650
- "default": "{ ...LitElement.shadowRootOptions, delegatesFocus: true, }"
8651
- },
8652
- {
8653
- "kind": "field",
8654
- "name": "isFormInput",
8655
- "type": {
8656
- "text": "boolean"
8657
- },
8658
- "static": true,
8659
- "default": "true",
8660
- "description": "Says this is the control an nldd-form-field is about, so the field can\nfind it, name it and move focus into it. See nldd-form-field."
8661
- },
8662
- {
8663
- "kind": "field",
8664
- "name": "value",
8665
- "type": {
8666
- "text": "string"
8667
- },
8668
- "default": "''",
8669
- "attribute": "value"
8670
- },
8671
- {
8672
- "kind": "field",
8673
- "name": "inputId",
8674
- "type": {
8675
- "text": "string"
8676
- },
8677
- "default": "''",
8678
- "attribute": "input-id"
8679
- },
8680
- {
8681
- "kind": "field",
8682
- "name": "placeholder",
8683
- "type": {
8684
- "text": "string"
8685
- },
8686
- "default": "''",
8687
- "attribute": "placeholder",
8688
- "reflects": true
8689
- },
8690
- {
8691
- "kind": "field",
8692
- "name": "disabled",
8693
- "type": {
8694
- "text": "boolean"
8695
- },
8696
- "default": "false",
8697
- "attribute": "disabled",
8698
- "reflects": true
8699
- },
8700
- {
8701
- "kind": "field",
8702
- "name": "name",
8703
- "type": {
8704
- "text": "string"
8705
- },
8706
- "default": "''",
8707
- "attribute": "name",
8708
- "reflects": true
8709
- },
8710
- {
8711
- "kind": "field",
8712
- "name": "readonly",
8713
- "type": {
8714
- "text": "boolean"
8715
- },
8716
- "default": "false",
8717
- "attribute": "readonly",
8718
- "reflects": true
8719
- },
8720
- {
8721
- "kind": "field",
8722
- "name": "required",
8723
- "type": {
8724
- "text": "boolean"
8725
- },
8726
- "default": "false",
8727
- "attribute": "required",
8728
- "reflects": true
8729
- },
8730
8781
  {
8731
8782
  "kind": "field",
8732
8783
  "name": "wrap",
@@ -8737,15 +8788,6 @@
8737
8788
  "attribute": "wrap",
8738
8789
  "reflects": true
8739
8790
  },
8740
- {
8741
- "kind": "field",
8742
- "name": "rows",
8743
- "type": {
8744
- "text": "number"
8745
- },
8746
- "default": "6",
8747
- "attribute": "rows"
8748
- },
8749
8791
  {
8750
8792
  "kind": "field",
8751
8793
  "name": "resize",
@@ -8788,64 +8830,17 @@
8788
8830
  },
8789
8831
  {
8790
8832
  "kind": "field",
8791
- "name": "accessibleLabel",
8792
- "type": {
8793
- "text": "string"
8794
- },
8795
- "default": "''",
8796
- "attribute": "accessible-label"
8797
- },
8798
- {
8799
- "kind": "field",
8800
- "name": "invalid",
8833
+ "name": "describedByElements",
8801
8834
  "type": {
8802
- "text": "boolean"
8803
- },
8804
- "default": "false",
8805
- "description": "Marks the control as invalid.\n\nAnnounced and not drawn. What is wrong belongs in an\nnldd-validation-list, in words: a red ring around a single\ncheckbox or radio would say the option is wrong, while it is the question\nthat is unanswered. `aria-invalid` still goes on the control, because\nchoosing not to show something is not a reason to keep quiet about it.",
8806
- "attribute": "invalid",
8807
- "reflects": true
8808
- },
8809
- {
8810
- "kind": "method",
8811
- "name": "formValue",
8812
- "return": {
8813
- "type": {
8814
- "text": "FormValue"
8815
- }
8835
+ "text": "readonly Element[]"
8816
8836
  },
8817
- "description": "The value submitted under `name`; `null` submits nothing. Override.",
8837
+ "default": "[]",
8838
+ "description": "Set by nldd-form-field. A consumer never writes this.",
8818
8839
  "inheritedFrom": {
8819
- "name": "FormAssociated",
8820
- "module": "src/utilities/form-associated-mixin.ts"
8821
- }
8822
- },
8823
- {
8824
- "kind": "method",
8825
- "name": "formResetCallback",
8826
- "return": {
8827
- "type": {
8828
- "text": "void"
8829
- }
8840
+ "name": "DescribedBy",
8841
+ "module": "src/utilities/described-by-mixin.ts"
8830
8842
  }
8831
8843
  },
8832
- {
8833
- "kind": "method",
8834
- "name": "formStateRestoreCallback",
8835
- "return": {
8836
- "type": {
8837
- "text": "void"
8838
- }
8839
- },
8840
- "parameters": [
8841
- {
8842
- "name": "state",
8843
- "type": {
8844
- "text": "File | string | FormData | null"
8845
- }
8846
- }
8847
- ]
8848
- },
8849
8844
  {
8850
8845
  "kind": "method",
8851
8846
  "name": "describedTarget",
@@ -8854,23 +8849,10 @@
8854
8849
  "text": "Element | null"
8855
8850
  }
8856
8851
  },
8857
- "description": "CodeMirror builds the textbox; the host is only its container.",
8858
- "inheritedFrom": {
8859
- "name": "DescribedBy",
8860
- "module": "src/utilities/described-by-mixin.ts"
8861
- }
8862
- },
8863
- {
8864
- "kind": "field",
8865
- "name": "describedByElements",
8866
- "type": {
8867
- "text": "readonly Element[]"
8868
- },
8869
- "default": "[]",
8870
- "description": "Set by nldd-form-field. A consumer never writes this.",
8852
+ "description": "The element the description belongs to. Override where it differs.\n\nPublic rather than protected because TypeScript refuses to emit a\ndeclaration for an anonymous class with protected members, and a mixin\nreturns exactly that. Same reason `formValue()` is public in\nFormAssociated.",
8871
8853
  "inheritedFrom": {
8872
- "name": "DescribedBy",
8873
- "module": "src/utilities/described-by-mixin.ts"
8854
+ "name": "NLDDCodeMirrorInput",
8855
+ "module": "src/utilities/codemirror/codemirror-input.ts"
8874
8856
  }
8875
8857
  },
8876
8858
  {
@@ -8895,6 +8877,20 @@
8895
8877
  "module": "src/utilities/form-associated-mixin.ts"
8896
8878
  }
8897
8879
  },
8880
+ {
8881
+ "kind": "method",
8882
+ "name": "formValue",
8883
+ "return": {
8884
+ "type": {
8885
+ "text": "FormValue"
8886
+ }
8887
+ },
8888
+ "description": "The value submitted under `name`; `null` submits nothing. Override.",
8889
+ "inheritedFrom": {
8890
+ "name": "NLDDCodeMirrorInput",
8891
+ "module": "src/utilities/codemirror/codemirror-input.ts"
8892
+ }
8893
+ },
8898
8894
  {
8899
8895
  "kind": "method",
8900
8896
  "name": "formState",
@@ -9007,99 +9003,215 @@
9007
9003
  "name": "FormAssociated",
9008
9004
  "module": "src/utilities/form-associated-mixin.ts"
9009
9005
  }
9010
- }
9011
- ],
9012
- "events": [
9006
+ },
9013
9007
  {
9014
- "name": "input",
9015
- "description": "When the content changes (detail: { value })"
9008
+ "kind": "field",
9009
+ "name": "shadowRootOptions",
9010
+ "type": {
9011
+ "text": "object"
9012
+ },
9013
+ "static": true,
9014
+ "default": "{ ...LitElement.shadowRootOptions, delegatesFocus: true, }",
9015
+ "inheritedFrom": {
9016
+ "name": "NLDDCodeMirrorInput",
9017
+ "module": "src/utilities/codemirror/codemirror-input.ts"
9018
+ }
9016
9019
  },
9017
9020
  {
9018
- "name": "change",
9019
- "description": "When the content is committed on blur (detail: { value })"
9020
- }
9021
- ],
9022
- "attributes": [
9021
+ "kind": "field",
9022
+ "name": "isFormInput",
9023
+ "type": {
9024
+ "text": "boolean"
9025
+ },
9026
+ "static": true,
9027
+ "default": "true",
9028
+ "description": "Says this is the control an nldd-form-field is about, so the field can\nfind it, name it and move focus into it. See nldd-form-field.",
9029
+ "inheritedFrom": {
9030
+ "name": "NLDDCodeMirrorInput",
9031
+ "module": "src/utilities/codemirror/codemirror-input.ts"
9032
+ }
9033
+ },
9023
9034
  {
9035
+ "kind": "field",
9024
9036
  "name": "value",
9025
9037
  "type": {
9026
9038
  "text": "string"
9027
9039
  },
9028
9040
  "default": "''",
9029
- "fieldName": "value",
9030
- "description": "Editor content"
9041
+ "attribute": "value",
9042
+ "inheritedFrom": {
9043
+ "name": "NLDDCodeMirrorInput",
9044
+ "module": "src/utilities/codemirror/codemirror-input.ts"
9045
+ }
9031
9046
  },
9032
9047
  {
9033
- "name": "input-id",
9048
+ "kind": "field",
9049
+ "name": "inputId",
9034
9050
  "type": {
9035
9051
  "text": "string"
9036
9052
  },
9037
9053
  "default": "''",
9038
- "fieldName": "inputId",
9039
- "description": "Sets the id on the editable element. Set automatically by nldd-form-field."
9054
+ "attribute": "input-id",
9055
+ "inheritedFrom": {
9056
+ "name": "NLDDCodeMirrorInput",
9057
+ "module": "src/utilities/codemirror/codemirror-input.ts"
9058
+ }
9040
9059
  },
9041
9060
  {
9061
+ "kind": "field",
9042
9062
  "name": "placeholder",
9043
9063
  "type": {
9044
9064
  "text": "string"
9045
9065
  },
9046
9066
  "default": "''",
9047
- "fieldName": "placeholder",
9048
- "description": "Placeholder text shown while empty"
9067
+ "attribute": "placeholder",
9068
+ "reflects": true,
9069
+ "inheritedFrom": {
9070
+ "name": "NLDDCodeMirrorInput",
9071
+ "module": "src/utilities/codemirror/codemirror-input.ts"
9072
+ }
9049
9073
  },
9050
9074
  {
9075
+ "kind": "field",
9051
9076
  "name": "disabled",
9052
9077
  "type": {
9053
9078
  "text": "boolean"
9054
9079
  },
9055
9080
  "default": "false",
9056
- "fieldName": "disabled",
9057
- "description": "Disabled state"
9081
+ "attribute": "disabled",
9082
+ "reflects": true,
9083
+ "inheritedFrom": {
9084
+ "name": "NLDDCodeMirrorInput",
9085
+ "module": "src/utilities/codemirror/codemirror-input.ts"
9086
+ }
9058
9087
  },
9059
9088
  {
9089
+ "kind": "field",
9060
9090
  "name": "name",
9061
9091
  "type": {
9062
9092
  "text": "string"
9063
9093
  },
9064
9094
  "default": "''",
9065
- "fieldName": "name",
9066
- "description": "Field name for form submission"
9095
+ "attribute": "name",
9096
+ "reflects": true,
9097
+ "inheritedFrom": {
9098
+ "name": "NLDDCodeMirrorInput",
9099
+ "module": "src/utilities/codemirror/codemirror-input.ts"
9100
+ }
9067
9101
  },
9068
9102
  {
9103
+ "kind": "field",
9069
9104
  "name": "readonly",
9070
9105
  "type": {
9071
9106
  "text": "boolean"
9072
9107
  },
9073
9108
  "default": "false",
9074
- "fieldName": "readonly",
9075
- "description": "Readonly state (focusable and selectable, not editable)"
9109
+ "attribute": "readonly",
9110
+ "reflects": true,
9111
+ "inheritedFrom": {
9112
+ "name": "NLDDCodeMirrorInput",
9113
+ "module": "src/utilities/codemirror/codemirror-input.ts"
9114
+ }
9076
9115
  },
9077
9116
  {
9117
+ "kind": "field",
9078
9118
  "name": "required",
9079
9119
  "type": {
9080
9120
  "text": "boolean"
9081
9121
  },
9082
9122
  "default": "false",
9083
- "fieldName": "required",
9084
- "description": "Required state"
9123
+ "attribute": "required",
9124
+ "reflects": true,
9125
+ "inheritedFrom": {
9126
+ "name": "NLDDCodeMirrorInput",
9127
+ "module": "src/utilities/codemirror/codemirror-input.ts"
9128
+ }
9085
9129
  },
9086
9130
  {
9087
- "name": "wrap",
9131
+ "kind": "field",
9132
+ "name": "rows",
9133
+ "type": {
9134
+ "text": "number"
9135
+ },
9136
+ "default": "6",
9137
+ "attribute": "rows",
9138
+ "inheritedFrom": {
9139
+ "name": "NLDDCodeMirrorInput",
9140
+ "module": "src/utilities/codemirror/codemirror-input.ts"
9141
+ }
9142
+ },
9143
+ {
9144
+ "kind": "field",
9145
+ "name": "accessibleLabel",
9146
+ "type": {
9147
+ "text": "string"
9148
+ },
9149
+ "default": "''",
9150
+ "attribute": "accessible-label",
9151
+ "inheritedFrom": {
9152
+ "name": "NLDDCodeMirrorInput",
9153
+ "module": "src/utilities/codemirror/codemirror-input.ts"
9154
+ }
9155
+ },
9156
+ {
9157
+ "kind": "field",
9158
+ "name": "invalid",
9088
9159
  "type": {
9089
9160
  "text": "boolean"
9090
9161
  },
9091
9162
  "default": "false",
9092
- "fieldName": "wrap",
9093
- "description": "Wrap long lines instead of horizontal scroll"
9163
+ "description": "Marks the control as invalid.\n\nAnnounced and not drawn. What is wrong belongs in an\nnldd-validation-list, in words: a red ring around a single\ncheckbox or radio would say the option is wrong, while it is the question\nthat is unanswered. `aria-invalid` still goes on the control, because\nchoosing not to show something is not a reason to keep quiet about it.",
9164
+ "attribute": "invalid",
9165
+ "reflects": true,
9166
+ "inheritedFrom": {
9167
+ "name": "NLDDCodeMirrorInput",
9168
+ "module": "src/utilities/codemirror/codemirror-input.ts"
9169
+ }
9094
9170
  },
9095
9171
  {
9096
- "name": "rows",
9172
+ "kind": "method",
9173
+ "name": "formResetCallback",
9174
+ "return": {
9175
+ "type": {
9176
+ "text": "void"
9177
+ }
9178
+ },
9179
+ "inheritedFrom": {
9180
+ "name": "NLDDCodeMirrorInput",
9181
+ "module": "src/utilities/codemirror/codemirror-input.ts"
9182
+ }
9183
+ },
9184
+ {
9185
+ "kind": "method",
9186
+ "name": "formStateRestoreCallback",
9187
+ "return": {
9188
+ "type": {
9189
+ "text": "void"
9190
+ }
9191
+ },
9192
+ "parameters": [
9193
+ {
9194
+ "name": "state",
9195
+ "type": {
9196
+ "text": "File | string | FormData | null"
9197
+ }
9198
+ }
9199
+ ],
9200
+ "inheritedFrom": {
9201
+ "name": "NLDDCodeMirrorInput",
9202
+ "module": "src/utilities/codemirror/codemirror-input.ts"
9203
+ }
9204
+ }
9205
+ ],
9206
+ "attributes": [
9207
+ {
9208
+ "name": "wrap",
9097
9209
  "type": {
9098
- "text": "number"
9210
+ "text": "boolean"
9099
9211
  },
9100
- "default": "6",
9101
- "fieldName": "rows",
9102
- "description": "Minimum visible rows (the floor in every resize mode). Default: 6."
9212
+ "default": "false",
9213
+ "fieldName": "wrap",
9214
+ "description": "Wrap long lines instead of horizontal scroll"
9103
9215
  },
9104
9216
  {
9105
9217
  "name": "resize",
@@ -9137,6 +9249,110 @@
9137
9249
  "fieldName": "lineNumbers",
9138
9250
  "description": "Show a line-number gutter"
9139
9251
  },
9252
+ {
9253
+ "name": "value",
9254
+ "type": {
9255
+ "text": "string"
9256
+ },
9257
+ "default": "''",
9258
+ "fieldName": "value",
9259
+ "inheritedFrom": {
9260
+ "name": "NLDDCodeMirrorInput",
9261
+ "module": "src/utilities/codemirror/codemirror-input.ts"
9262
+ },
9263
+ "description": "Editor content"
9264
+ },
9265
+ {
9266
+ "name": "input-id",
9267
+ "type": {
9268
+ "text": "string"
9269
+ },
9270
+ "default": "''",
9271
+ "fieldName": "inputId",
9272
+ "inheritedFrom": {
9273
+ "name": "NLDDCodeMirrorInput",
9274
+ "module": "src/utilities/codemirror/codemirror-input.ts"
9275
+ },
9276
+ "description": "Sets the id on the editable element. Set automatically by nldd-form-field."
9277
+ },
9278
+ {
9279
+ "name": "placeholder",
9280
+ "type": {
9281
+ "text": "string"
9282
+ },
9283
+ "default": "''",
9284
+ "fieldName": "placeholder",
9285
+ "inheritedFrom": {
9286
+ "name": "NLDDCodeMirrorInput",
9287
+ "module": "src/utilities/codemirror/codemirror-input.ts"
9288
+ },
9289
+ "description": "Placeholder text shown while empty"
9290
+ },
9291
+ {
9292
+ "name": "disabled",
9293
+ "type": {
9294
+ "text": "boolean"
9295
+ },
9296
+ "default": "false",
9297
+ "fieldName": "disabled",
9298
+ "inheritedFrom": {
9299
+ "name": "NLDDCodeMirrorInput",
9300
+ "module": "src/utilities/codemirror/codemirror-input.ts"
9301
+ },
9302
+ "description": "Disabled state"
9303
+ },
9304
+ {
9305
+ "name": "name",
9306
+ "type": {
9307
+ "text": "string"
9308
+ },
9309
+ "default": "''",
9310
+ "fieldName": "name",
9311
+ "inheritedFrom": {
9312
+ "name": "NLDDCodeMirrorInput",
9313
+ "module": "src/utilities/codemirror/codemirror-input.ts"
9314
+ },
9315
+ "description": "Field name for form submission"
9316
+ },
9317
+ {
9318
+ "name": "readonly",
9319
+ "type": {
9320
+ "text": "boolean"
9321
+ },
9322
+ "default": "false",
9323
+ "fieldName": "readonly",
9324
+ "inheritedFrom": {
9325
+ "name": "NLDDCodeMirrorInput",
9326
+ "module": "src/utilities/codemirror/codemirror-input.ts"
9327
+ },
9328
+ "description": "Readonly state (focusable and selectable, not editable)"
9329
+ },
9330
+ {
9331
+ "name": "required",
9332
+ "type": {
9333
+ "text": "boolean"
9334
+ },
9335
+ "default": "false",
9336
+ "fieldName": "required",
9337
+ "inheritedFrom": {
9338
+ "name": "NLDDCodeMirrorInput",
9339
+ "module": "src/utilities/codemirror/codemirror-input.ts"
9340
+ },
9341
+ "description": "Required state"
9342
+ },
9343
+ {
9344
+ "name": "rows",
9345
+ "type": {
9346
+ "text": "number"
9347
+ },
9348
+ "default": "6",
9349
+ "fieldName": "rows",
9350
+ "inheritedFrom": {
9351
+ "name": "NLDDCodeMirrorInput",
9352
+ "module": "src/utilities/codemirror/codemirror-input.ts"
9353
+ },
9354
+ "description": "Minimum visible rows (the floor in every resize mode). Default: 6."
9355
+ },
9140
9356
  {
9141
9357
  "name": "accessible-label",
9142
9358
  "type": {
@@ -9144,6 +9360,10 @@
9144
9360
  },
9145
9361
  "default": "''",
9146
9362
  "fieldName": "accessibleLabel",
9363
+ "inheritedFrom": {
9364
+ "name": "NLDDCodeMirrorInput",
9365
+ "module": "src/utilities/codemirror/codemirror-input.ts"
9366
+ },
9147
9367
  "description": "Accessible label forwarded to the editor. Set automatically by nldd-form-field."
9148
9368
  },
9149
9369
  {
@@ -9153,25 +9373,29 @@
9153
9373
  },
9154
9374
  "default": "false",
9155
9375
  "description": "Marks the control as invalid. Announced with aria-invalid; nothing is drawn for it.",
9156
- "fieldName": "invalid"
9376
+ "fieldName": "invalid",
9377
+ "inheritedFrom": {
9378
+ "name": "NLDDCodeMirrorInput",
9379
+ "module": "src/utilities/codemirror/codemirror-input.ts"
9380
+ }
9157
9381
  }
9158
9382
  ],
9159
- "mixins": [
9383
+ "superclass": {
9384
+ "name": "NLDDCodeMirrorInput",
9385
+ "module": "/src/utilities/codemirror/codemirror-input.js"
9386
+ },
9387
+ "tagName": "nldd-code-editor",
9388
+ "customElement": true,
9389
+ "events": [
9160
9390
  {
9161
- "name": "DescribedBy",
9162
- "module": "/src/utilities/described-by-mixin.js"
9391
+ "name": "input",
9392
+ "description": "When the content changes (detail: { value })"
9163
9393
  },
9164
9394
  {
9165
- "name": "FormAssociated",
9166
- "module": "/src/utilities/form-associated-mixin.js"
9395
+ "name": "change",
9396
+ "description": "When the content is committed on blur (detail: { value })"
9167
9397
  }
9168
- ],
9169
- "superclass": {
9170
- "name": "NLDDCodeMirrorElement",
9171
- "module": "/src/utilities/codemirror/codemirror-element.js"
9172
- },
9173
- "tagName": "nldd-code-editor",
9174
- "customElement": true
9398
+ ]
9175
9399
  }
9176
9400
  ],
9177
9401
  "exports": [
@@ -17819,6 +18043,127 @@
17819
18043
  }
17820
18044
  ]
17821
18045
  },
18046
+ {
18047
+ "kind": "javascript-module",
18048
+ "path": "src/components/inputs/text-editor/text-editor.clipboard.ts",
18049
+ "declarations": [
18050
+ {
18051
+ "kind": "class",
18052
+ "description": "",
18053
+ "name": "AnnotationClipboard",
18054
+ "members": [
18055
+ {
18056
+ "kind": "field",
18057
+ "name": "cut",
18058
+ "type": {
18059
+ "text": "{ text: string; anns: CarriedAnnotation[] } | null"
18060
+ },
18061
+ "privacy": "private",
18062
+ "default": "null"
18063
+ },
18064
+ {
18065
+ "kind": "method",
18066
+ "name": "annotationsInSelection",
18067
+ "privacy": "private",
18068
+ "return": {
18069
+ "type": {
18070
+ "text": "CarriedAnnotation[]"
18071
+ }
18072
+ },
18073
+ "parameters": [
18074
+ {
18075
+ "name": "view",
18076
+ "type": {
18077
+ "text": "EditorView"
18078
+ }
18079
+ }
18080
+ ],
18081
+ "description": "The annotations lying fully inside the selection, offset from its clean start."
18082
+ },
18083
+ {
18084
+ "kind": "method",
18085
+ "name": "selectedText",
18086
+ "return": {
18087
+ "type": {
18088
+ "text": "string"
18089
+ }
18090
+ },
18091
+ "parameters": [
18092
+ {
18093
+ "name": "view",
18094
+ "type": {
18095
+ "text": "EditorView"
18096
+ }
18097
+ }
18098
+ ],
18099
+ "description": "The selection as clipboard text, without sentinels."
18100
+ },
18101
+ {
18102
+ "kind": "method",
18103
+ "name": "rememberCut",
18104
+ "return": {
18105
+ "type": {
18106
+ "text": "void"
18107
+ }
18108
+ },
18109
+ "parameters": [
18110
+ {
18111
+ "name": "view",
18112
+ "type": {
18113
+ "text": "EditorView"
18114
+ }
18115
+ }
18116
+ ],
18117
+ "description": "Remember a cut of the selection; an empty selection cuts nothing."
18118
+ },
18119
+ {
18120
+ "kind": "method",
18121
+ "name": "forget",
18122
+ "return": {
18123
+ "type": {
18124
+ "text": "void"
18125
+ }
18126
+ },
18127
+ "description": "A copy is plain text: a pending cut's annotations must not ride along."
18128
+ },
18129
+ {
18130
+ "kind": "method",
18131
+ "name": "paste",
18132
+ "return": {
18133
+ "type": {
18134
+ "text": "void"
18135
+ }
18136
+ },
18137
+ "parameters": [
18138
+ {
18139
+ "name": "view",
18140
+ "type": {
18141
+ "text": "EditorView"
18142
+ }
18143
+ },
18144
+ {
18145
+ "name": "raw",
18146
+ "type": {
18147
+ "text": "string"
18148
+ }
18149
+ }
18150
+ ],
18151
+ "description": "Put `raw` at the selection. When it is the text of the last cut, its\nannotations come along, once: a second paste would duplicate their ids."
18152
+ }
18153
+ ]
18154
+ }
18155
+ ],
18156
+ "exports": [
18157
+ {
18158
+ "kind": "js",
18159
+ "name": "AnnotationClipboard",
18160
+ "declaration": {
18161
+ "name": "AnnotationClipboard",
18162
+ "module": "src/components/inputs/text-editor/text-editor.clipboard.ts"
18163
+ }
18164
+ }
18165
+ ]
18166
+ },
17822
18167
  {
17823
18168
  "kind": "javascript-module",
17824
18169
  "path": "src/components/inputs/text-editor/text-editor.commands.ts",
@@ -18487,6 +18832,77 @@
18487
18832
  }
18488
18833
  ]
18489
18834
  },
18835
+ {
18836
+ "kind": "javascript-module",
18837
+ "path": "src/components/inputs/text-editor/text-editor.focus-selection.ts",
18838
+ "declarations": [
18839
+ {
18840
+ "kind": "function",
18841
+ "name": "focusSelectionGuard",
18842
+ "return": {
18843
+ "type": {
18844
+ "text": "Extension"
18845
+ }
18846
+ }
18847
+ }
18848
+ ],
18849
+ "exports": [
18850
+ {
18851
+ "kind": "js",
18852
+ "name": "focusSelectionGuard",
18853
+ "declaration": {
18854
+ "name": "focusSelectionGuard",
18855
+ "module": "src/components/inputs/text-editor/text-editor.focus-selection.ts"
18856
+ }
18857
+ }
18858
+ ]
18859
+ },
18860
+ {
18861
+ "kind": "javascript-module",
18862
+ "path": "src/components/inputs/text-editor/text-editor.hidden-syntax.ts",
18863
+ "declarations": [
18864
+ {
18865
+ "kind": "function",
18866
+ "name": "hiddenSyntax",
18867
+ "description": "The syntax=\"hidden\" extension. Highest precedence, so hiding a mark wins over\nthe dimmed styling the markdown decorations give it."
18868
+ }
18869
+ ],
18870
+ "exports": [
18871
+ {
18872
+ "kind": "js",
18873
+ "name": "hiddenSyntax",
18874
+ "declaration": {
18875
+ "name": "hiddenSyntax",
18876
+ "module": "src/components/inputs/text-editor/text-editor.hidden-syntax.ts"
18877
+ }
18878
+ }
18879
+ ]
18880
+ },
18881
+ {
18882
+ "kind": "javascript-module",
18883
+ "path": "src/components/inputs/text-editor/text-editor.keymap.ts",
18884
+ "declarations": [
18885
+ {
18886
+ "kind": "variable",
18887
+ "name": "textEditorKeymap",
18888
+ "type": {
18889
+ "text": "Extension"
18890
+ },
18891
+ "default": "[ // Prec.highest so this beats the markdown language's deleteMarkupBackward, // which would otherwise leave alignment whitespace when a non-first list // marker is backspaced. Falls through (returns false) off a list marker. Prec.highest(keymap.of([{ key: 'Backspace', run: clearListMarkerBackward }])), keymap.of([ { key: 'Mod-b', run: (view) => { toggleInlineWrap(view, '**', 'StrongEmphasis'); return true; } }, { key: 'Mod-i', run: (view) => { toggleInlineWrap(view, '*', 'Emphasis'); return true; } }, { key: 'Mod-e', run: (view) => { toggleInlineWrap(view, '`', 'InlineCode'); return true; } }, { key: 'Mod-k', run: (view) => { toggleLink(view); return true; } }, // A mention deletes in two steps: the first Backspace/Delete next to it // selects the whole token, the second removes it. { key: 'Backspace', run: (view) => selectMentionBeforeDelete(view, -1) }, { key: 'Delete', run: (view) => selectMentionBeforeDelete(view, 1) }, // Cmd/Ctrl+] and +[ nest and un-nest list items. defaultKeymap binds them // to indentMore/indentLess, whose four-space indent turns plain text into // an indented code block. Consumed here in every case: off a list item // they do nothing, which beats a code block nobody asked for. { key: 'Mod-]', run: (view) => { indentListItems(view); return true; } }, { key: 'Mod-[', run: (view) => { outdentListItems(view); return true; } }, // The browser deletes where the editor has nothing to add, so the // spelling marks on the line stay (see leaveDeletionToBrowser). { key: 'Backspace', run: (view) => !leaveDeletionToBrowser(view, 'Backspace') && deleteCharBackward(view), shift: deleteCharBackward }, { key: 'Delete', run: (view) => !leaveDeletionToBrowser(view, 'Delete') && deleteCharForward(view) }, ...defaultKeymap.filter((binding) => binding.key !== 'Backspace' && binding.key !== 'Delete'), ...historyKeymap, ]), ]",
18892
+ "description": "The editor's keys: the formatting shortcuts, the two-step mention delete, list\nnesting, and CodeMirror's defaults and history with Backspace and Delete taken\nover."
18893
+ }
18894
+ ],
18895
+ "exports": [
18896
+ {
18897
+ "kind": "js",
18898
+ "name": "textEditorKeymap",
18899
+ "declaration": {
18900
+ "name": "textEditorKeymap",
18901
+ "module": "src/components/inputs/text-editor/text-editor.keymap.ts"
18902
+ }
18903
+ }
18904
+ ]
18905
+ },
18490
18906
  {
18491
18907
  "kind": "javascript-module",
18492
18908
  "path": "src/components/inputs/text-editor/text-editor.labels.ts",
@@ -18668,80 +19084,8 @@
18668
19084
  "type": {
18669
19085
  "text": "Extension"
18670
19086
  },
18671
- "default": "[ markdown({ extensions: GFM }), markDecorationPlugin, heldEmphasis, hangingIndentField, // Prec.highest keeps the mention chip the innermost decoration, so it nests inside // a heading/bold run and inherits its font (scaling with it) instead of sitting at // the base size as an outer sibling. Prec.highest(mentionChipField), mentionAtomicRanges, ]",
19087
+ "default": "[ markdown({ extensions: GFM }), markDecorationPlugin, heldEmphasis, hangingIndentField, mentionTokens, ]",
18672
19088
  "description": "Markdown language (with GFM) plus the hybrid inline-styling decorations."
18673
- },
18674
- {
18675
- "kind": "function",
18676
- "name": "mentionRangeAt",
18677
- "return": {
18678
- "type": {
18679
- "text": "{ from: number; to: number } | null"
18680
- }
18681
- },
18682
- "parameters": [
18683
- {
18684
- "name": "state",
18685
- "type": {
18686
- "text": "EditorState"
18687
- }
18688
- },
18689
- {
18690
- "name": "pos",
18691
- "type": {
18692
- "text": "number"
18693
- }
18694
- }
18695
- ],
18696
- "description": "The mention whose collapsed token contains `pos` (used to select it on click)."
18697
- },
18698
- {
18699
- "kind": "function",
18700
- "name": "mentionRangeEndingAt",
18701
- "return": {
18702
- "type": {
18703
- "text": "{ from: number; to: number } | null"
18704
- }
18705
- },
18706
- "parameters": [
18707
- {
18708
- "name": "state",
18709
- "type": {
18710
- "text": "EditorState"
18711
- }
18712
- },
18713
- {
18714
- "name": "pos",
18715
- "type": {
18716
- "text": "number"
18717
- }
18718
- }
18719
- ],
18720
- "description": "A mention token ending exactly at `pos` (cursor just after it — backspace)."
18721
- },
18722
- {
18723
- "kind": "function",
18724
- "name": "mentionRangeStartingAt",
18725
- "return": {
18726
- "type": {
18727
- "text": "{ from: number; to: number } | null"
18728
- }
18729
- },
18730
- "parameters": [
18731
- {
18732
- "name": "state",
18733
- "type": {
18734
- "text": "EditorState"
18735
- }
18736
- },
18737
- {
18738
- "name": "pos",
18739
- "type": {
18740
- "text": "number"
18741
- }
18742
- }
18743
- ],
18744
- "description": "A mention token starting exactly at `pos` (cursor just before it — delete)."
18745
19089
  }
18746
19090
  ],
18747
19091
  "exports": [
@@ -18752,76 +19096,13 @@
18752
19096
  "name": "markdownEditing",
18753
19097
  "module": "src/components/inputs/text-editor/text-editor.markdown.ts"
18754
19098
  }
18755
- },
18756
- {
18757
- "kind": "js",
18758
- "name": "mentionRangeAt",
18759
- "declaration": {
18760
- "name": "mentionRangeAt",
18761
- "module": "src/components/inputs/text-editor/text-editor.markdown.ts"
18762
- }
18763
- },
18764
- {
18765
- "kind": "js",
18766
- "name": "mentionRangeEndingAt",
18767
- "declaration": {
18768
- "name": "mentionRangeEndingAt",
18769
- "module": "src/components/inputs/text-editor/text-editor.markdown.ts"
18770
- }
18771
- },
18772
- {
18773
- "kind": "js",
18774
- "name": "mentionRangeStartingAt",
18775
- "declaration": {
18776
- "name": "mentionRangeStartingAt",
18777
- "module": "src/components/inputs/text-editor/text-editor.markdown.ts"
18778
- }
18779
19099
  }
18780
19100
  ]
18781
19101
  },
18782
19102
  {
18783
19103
  "kind": "javascript-module",
18784
- "path": "src/components/inputs/text-editor/text-editor.mentions.ts",
19104
+ "path": "src/components/inputs/text-editor/text-editor.mention.ts",
18785
19105
  "declarations": [
18786
- {
18787
- "kind": "variable",
18788
- "name": "DEFAULT_TYPEAHEAD_QUERY",
18789
- "type": {
18790
- "text": "string"
18791
- },
18792
- "default": "'[\\\\p{L}\\\\p{M}\\\\p{N}_.+-]*'",
18793
- "description": "What may follow a trigger when a list says nothing else: letters in any\nscript and with any accent, digits, `_`, `.`, `+` and `-`. A name like\n`józef` reaches the source whole, and so does the `+1` of `:+1:`. A space\nends the query, as it ends a mention in most systems."
18794
- },
18795
- {
18796
- "kind": "function",
18797
- "name": "typeaheadQueryAt",
18798
- "return": {
18799
- "type": {
18800
- "text": "{ from: number; to: number; query: string; trigger: string } | null"
18801
- }
18802
- },
18803
- "parameters": [
18804
- {
18805
- "name": "state",
18806
- "type": {
18807
- "text": "EditorState"
18808
- }
18809
- },
18810
- {
18811
- "name": "pos",
18812
- "type": {
18813
- "text": "number"
18814
- }
18815
- },
18816
- {
18817
- "name": "triggers",
18818
- "type": {
18819
- "text": "readonly TypeaheadTrigger[]"
18820
- }
18821
- }
18822
- ],
18823
- "description": "The typeahead query at `pos` for one of `triggers`, or null when the text\nbefore the caret is not one. `from` is the trigger, `query` the typed text\nwithout it. Both the completion source and the reopen-on-delete path go\nthrough this, so they cannot disagree about what counts as a query."
18824
- },
18825
19106
  {
18826
19107
  "kind": "variable",
18827
19108
  "name": "MENTION_HREF_PREFIX",
@@ -18903,61 +19184,167 @@
18903
19184
  ],
18904
19185
  "description": "Reverse `mentionToken`'s id encoding. Falls back to the raw text when it isn't\nvalid percent-encoding (e.g. a token authored by hand before this encoding)."
18905
19186
  },
19187
+ {
19188
+ "kind": "variable",
19189
+ "name": "MENTION_TOKEN_RE",
19190
+ "default": "new RegExp(`\\\\[(@[^\\\\]]*)\\\\]\\\\(${MENTION_HREF_PREFIX}[^)]*\\\\)`, 'g')",
19191
+ "description": "A stored mention in running text, with its `@Naam` as the first group."
19192
+ },
18906
19193
  {
18907
19194
  "kind": "function",
18908
- "name": "typeaheads",
19195
+ "name": "isMentionHref",
18909
19196
  "return": {
18910
19197
  "type": {
18911
- "text": "Extension"
19198
+ "text": "boolean"
18912
19199
  }
18913
19200
  },
18914
19201
  "parameters": [
18915
19202
  {
18916
- "name": "getTypeaheads",
19203
+ "name": "href",
18917
19204
  "type": {
18918
- "text": "() => readonly Typeahead[]"
19205
+ "text": "string"
19206
+ }
19207
+ }
19208
+ ],
19209
+ "description": "Whether an address is a mention's (`user:id`), not a place to go."
19210
+ },
19211
+ {
19212
+ "kind": "function",
19213
+ "name": "isMentionLink",
19214
+ "return": {
19215
+ "type": {
19216
+ "text": "boolean"
19217
+ }
19218
+ },
19219
+ "parameters": [
19220
+ {
19221
+ "name": "state",
19222
+ "type": {
19223
+ "text": "EditorState"
18919
19224
  }
18920
19225
  },
18921
19226
  {
18922
- "name": "onChoose",
19227
+ "name": "link",
18923
19228
  "type": {
18924
- "text": "(choice: TypeaheadChoice) => void"
19229
+ "text": "SyntaxNode"
19230
+ }
19231
+ }
19232
+ ],
19233
+ "description": "Whether a `Link` node is a mention."
19234
+ },
19235
+ {
19236
+ "kind": "variable",
19237
+ "name": "mentionTokens",
19238
+ "type": {
19239
+ "text": "Extension"
19240
+ },
19241
+ "default": "[Prec.highest(mentionChipField), mentionAtomicRanges]",
19242
+ "description": "The mention token: the chip that replaces the whole link, and the atomic range\nthe caret steps over. Prec.highest keeps the chip the innermost decoration, so\nit nests inside a heading or bold run and scales with its font."
19243
+ },
19244
+ {
19245
+ "kind": "function",
19246
+ "name": "mentionRangeAt",
19247
+ "return": {
19248
+ "type": {
19249
+ "text": "{ from: number; to: number } | null"
19250
+ }
19251
+ },
19252
+ "parameters": [
19253
+ {
19254
+ "name": "state",
19255
+ "type": {
19256
+ "text": "EditorState"
18925
19257
  }
18926
19258
  },
18927
19259
  {
18928
- "name": "defaultEmptyText",
18929
- "default": "() => null",
19260
+ "name": "pos",
18930
19261
  "type": {
18931
- "text": "(query: string) => string | null"
19262
+ "text": "number"
18932
19263
  }
18933
19264
  }
18934
19265
  ],
18935
- "description": "The typeaheads. `getTypeaheads` is read on every keystroke, so the editor can\nhand over its current lists; choosing a candidate writes what the list's\n`insert` says and calls `onChoose`. Without lists it is inert."
18936
- }
18937
- ],
18938
- "exports": [
19266
+ "description": "The mention whose collapsed token contains `pos` (used to select it on click)."
19267
+ },
18939
19268
  {
18940
- "kind": "js",
18941
- "name": "DEFAULT_TYPEAHEAD_QUERY",
18942
- "declaration": {
18943
- "name": "DEFAULT_TYPEAHEAD_QUERY",
18944
- "module": "src/components/inputs/text-editor/text-editor.mentions.ts"
18945
- }
19269
+ "kind": "function",
19270
+ "name": "mentionRangeEndingAt",
19271
+ "return": {
19272
+ "type": {
19273
+ "text": "{ from: number; to: number } | null"
19274
+ }
19275
+ },
19276
+ "parameters": [
19277
+ {
19278
+ "name": "state",
19279
+ "type": {
19280
+ "text": "EditorState"
19281
+ }
19282
+ },
19283
+ {
19284
+ "name": "pos",
19285
+ "type": {
19286
+ "text": "number"
19287
+ }
19288
+ }
19289
+ ],
19290
+ "description": "A mention token ending exactly at `pos` (cursor just after it — backspace)."
18946
19291
  },
18947
19292
  {
18948
- "kind": "js",
18949
- "name": "typeaheadQueryAt",
18950
- "declaration": {
18951
- "name": "typeaheadQueryAt",
18952
- "module": "src/components/inputs/text-editor/text-editor.mentions.ts"
18953
- }
19293
+ "kind": "function",
19294
+ "name": "mentionRangeStartingAt",
19295
+ "return": {
19296
+ "type": {
19297
+ "text": "{ from: number; to: number } | null"
19298
+ }
19299
+ },
19300
+ "parameters": [
19301
+ {
19302
+ "name": "state",
19303
+ "type": {
19304
+ "text": "EditorState"
19305
+ }
19306
+ },
19307
+ {
19308
+ "name": "pos",
19309
+ "type": {
19310
+ "text": "number"
19311
+ }
19312
+ }
19313
+ ],
19314
+ "description": "A mention token starting exactly at `pos` (cursor just before it — delete)."
18954
19315
  },
19316
+ {
19317
+ "kind": "function",
19318
+ "name": "selectMentionBeforeDelete",
19319
+ "return": {
19320
+ "type": {
19321
+ "text": "boolean"
19322
+ }
19323
+ },
19324
+ "parameters": [
19325
+ {
19326
+ "name": "view",
19327
+ "type": {
19328
+ "text": "EditorView"
19329
+ }
19330
+ },
19331
+ {
19332
+ "name": "dir",
19333
+ "type": {
19334
+ "text": "-1 | 1"
19335
+ }
19336
+ }
19337
+ ],
19338
+ "description": "Two-step mention delete: the first Backspace (`dir` -1) or Delete (1) next\nto a mention selects the whole token, the second removes it. False when\nthere is a selection already or no mention at the caret, so the normal\ndelete runs."
19339
+ }
19340
+ ],
19341
+ "exports": [
18955
19342
  {
18956
19343
  "kind": "js",
18957
19344
  "name": "MENTION_HREF_PREFIX",
18958
19345
  "declaration": {
18959
19346
  "name": "MENTION_HREF_PREFIX",
18960
- "module": "src/components/inputs/text-editor/text-editor.mentions.ts"
19347
+ "module": "src/components/inputs/text-editor/text-editor.mention.ts"
18961
19348
  }
18962
19349
  },
18963
19350
  {
@@ -18965,7 +19352,7 @@
18965
19352
  "name": "mentionToken",
18966
19353
  "declaration": {
18967
19354
  "name": "mentionToken",
18968
- "module": "src/components/inputs/text-editor/text-editor.mentions.ts"
19355
+ "module": "src/components/inputs/text-editor/text-editor.mention.ts"
18969
19356
  }
18970
19357
  },
18971
19358
  {
@@ -18973,7 +19360,7 @@
18973
19360
  "name": "mentionInsert",
18974
19361
  "declaration": {
18975
19362
  "name": "mentionInsert",
18976
- "module": "src/components/inputs/text-editor/text-editor.mentions.ts"
19363
+ "module": "src/components/inputs/text-editor/text-editor.mention.ts"
18977
19364
  }
18978
19365
  },
18979
19366
  {
@@ -18981,7 +19368,7 @@
18981
19368
  "name": "unescapeMentionLabel",
18982
19369
  "declaration": {
18983
19370
  "name": "unescapeMentionLabel",
18984
- "module": "src/components/inputs/text-editor/text-editor.mentions.ts"
19371
+ "module": "src/components/inputs/text-editor/text-editor.mention.ts"
18985
19372
  }
18986
19373
  },
18987
19374
  {
@@ -18989,6 +19376,164 @@
18989
19376
  "name": "decodeMentionId",
18990
19377
  "declaration": {
18991
19378
  "name": "decodeMentionId",
19379
+ "module": "src/components/inputs/text-editor/text-editor.mention.ts"
19380
+ }
19381
+ },
19382
+ {
19383
+ "kind": "js",
19384
+ "name": "MENTION_TOKEN_RE",
19385
+ "declaration": {
19386
+ "name": "MENTION_TOKEN_RE",
19387
+ "module": "src/components/inputs/text-editor/text-editor.mention.ts"
19388
+ }
19389
+ },
19390
+ {
19391
+ "kind": "js",
19392
+ "name": "isMentionHref",
19393
+ "declaration": {
19394
+ "name": "isMentionHref",
19395
+ "module": "src/components/inputs/text-editor/text-editor.mention.ts"
19396
+ }
19397
+ },
19398
+ {
19399
+ "kind": "js",
19400
+ "name": "isMentionLink",
19401
+ "declaration": {
19402
+ "name": "isMentionLink",
19403
+ "module": "src/components/inputs/text-editor/text-editor.mention.ts"
19404
+ }
19405
+ },
19406
+ {
19407
+ "kind": "js",
19408
+ "name": "mentionTokens",
19409
+ "declaration": {
19410
+ "name": "mentionTokens",
19411
+ "module": "src/components/inputs/text-editor/text-editor.mention.ts"
19412
+ }
19413
+ },
19414
+ {
19415
+ "kind": "js",
19416
+ "name": "mentionRangeAt",
19417
+ "declaration": {
19418
+ "name": "mentionRangeAt",
19419
+ "module": "src/components/inputs/text-editor/text-editor.mention.ts"
19420
+ }
19421
+ },
19422
+ {
19423
+ "kind": "js",
19424
+ "name": "mentionRangeEndingAt",
19425
+ "declaration": {
19426
+ "name": "mentionRangeEndingAt",
19427
+ "module": "src/components/inputs/text-editor/text-editor.mention.ts"
19428
+ }
19429
+ },
19430
+ {
19431
+ "kind": "js",
19432
+ "name": "mentionRangeStartingAt",
19433
+ "declaration": {
19434
+ "name": "mentionRangeStartingAt",
19435
+ "module": "src/components/inputs/text-editor/text-editor.mention.ts"
19436
+ }
19437
+ },
19438
+ {
19439
+ "kind": "js",
19440
+ "name": "selectMentionBeforeDelete",
19441
+ "declaration": {
19442
+ "name": "selectMentionBeforeDelete",
19443
+ "module": "src/components/inputs/text-editor/text-editor.mention.ts"
19444
+ }
19445
+ }
19446
+ ]
19447
+ },
19448
+ {
19449
+ "kind": "javascript-module",
19450
+ "path": "src/components/inputs/text-editor/text-editor.mentions.ts",
19451
+ "declarations": [
19452
+ {
19453
+ "kind": "variable",
19454
+ "name": "DEFAULT_TYPEAHEAD_QUERY",
19455
+ "type": {
19456
+ "text": "string"
19457
+ },
19458
+ "default": "'[\\\\p{L}\\\\p{M}\\\\p{N}_.+-]*'",
19459
+ "description": "What may follow a trigger when a list says nothing else: letters in any\nscript and with any accent, digits, `_`, `.`, `+` and `-`. A name like\n`józef` reaches the source whole, and so does the `+1` of `:+1:`. A space\nends the query, as it ends a mention in most systems."
19460
+ },
19461
+ {
19462
+ "kind": "function",
19463
+ "name": "typeaheadQueryAt",
19464
+ "return": {
19465
+ "type": {
19466
+ "text": "{ from: number; to: number; query: string; trigger: string } | null"
19467
+ }
19468
+ },
19469
+ "parameters": [
19470
+ {
19471
+ "name": "state",
19472
+ "type": {
19473
+ "text": "EditorState"
19474
+ }
19475
+ },
19476
+ {
19477
+ "name": "pos",
19478
+ "type": {
19479
+ "text": "number"
19480
+ }
19481
+ },
19482
+ {
19483
+ "name": "triggers",
19484
+ "type": {
19485
+ "text": "readonly TypeaheadTrigger[]"
19486
+ }
19487
+ }
19488
+ ],
19489
+ "description": "The typeahead query at `pos` for one of `triggers`, or null when the text\nbefore the caret is not one. `from` is the trigger, `query` the typed text\nwithout it. Both the completion source and the reopen-on-delete path go\nthrough this, so they cannot disagree about what counts as a query."
19490
+ },
19491
+ {
19492
+ "kind": "function",
19493
+ "name": "typeaheads",
19494
+ "return": {
19495
+ "type": {
19496
+ "text": "Extension"
19497
+ }
19498
+ },
19499
+ "parameters": [
19500
+ {
19501
+ "name": "getTypeaheads",
19502
+ "type": {
19503
+ "text": "() => readonly Typeahead[]"
19504
+ }
19505
+ },
19506
+ {
19507
+ "name": "onChoose",
19508
+ "type": {
19509
+ "text": "(choice: TypeaheadChoice) => void"
19510
+ }
19511
+ },
19512
+ {
19513
+ "name": "defaultEmptyText",
19514
+ "default": "() => null",
19515
+ "type": {
19516
+ "text": "(query: string) => string | null"
19517
+ }
19518
+ }
19519
+ ],
19520
+ "description": "The typeaheads. `getTypeaheads` is read on every keystroke, so the editor can\nhand over its current lists; choosing a candidate writes what the list's\n`insert` says and calls `onChoose`. Without lists it is inert."
19521
+ }
19522
+ ],
19523
+ "exports": [
19524
+ {
19525
+ "kind": "js",
19526
+ "name": "DEFAULT_TYPEAHEAD_QUERY",
19527
+ "declaration": {
19528
+ "name": "DEFAULT_TYPEAHEAD_QUERY",
19529
+ "module": "src/components/inputs/text-editor/text-editor.mentions.ts"
19530
+ }
19531
+ },
19532
+ {
19533
+ "kind": "js",
19534
+ "name": "typeaheadQueryAt",
19535
+ "declaration": {
19536
+ "name": "typeaheadQueryAt",
18992
19537
  "module": "src/components/inputs/text-editor/text-editor.mentions.ts"
18993
19538
  }
18994
19539
  },
@@ -19048,6 +19593,26 @@
19048
19593
  }
19049
19594
  ]
19050
19595
  },
19596
+ {
19597
+ "kind": "javascript-module",
19598
+ "path": "src/components/inputs/text-editor/text-editor.selection.ts",
19599
+ "declarations": [
19600
+ {
19601
+ "kind": "variable",
19602
+ "name": "lineHighSelection"
19603
+ }
19604
+ ],
19605
+ "exports": [
19606
+ {
19607
+ "kind": "js",
19608
+ "name": "lineHighSelection",
19609
+ "declaration": {
19610
+ "name": "lineHighSelection",
19611
+ "module": "src/components/inputs/text-editor/text-editor.selection.ts"
19612
+ }
19613
+ }
19614
+ ]
19615
+ },
19051
19616
  {
19052
19617
  "kind": "javascript-module",
19053
19618
  "path": "src/components/inputs/text-editor/text-editor.spellcheck.ts",
@@ -19158,6 +19723,155 @@
19158
19723
  ],
19159
19724
  "description": "The innermost node at `pos` that `match` accepts, looking outward from there.\n`side` decides which node a position between two of them belongs to: -1 the\none that ends there, 1 the one that starts there. Null when none matches."
19160
19725
  },
19726
+ {
19727
+ "kind": "variable",
19728
+ "name": "CODE_BLOCK_NODES",
19729
+ "type": {
19730
+ "text": "ReadonlySet<string>"
19731
+ },
19732
+ "default": "new Set(['FencedCode', 'CodeBlock'])",
19733
+ "description": "The nodes whose text is code, quoted as it is: no list, quote or link in it."
19734
+ },
19735
+ {
19736
+ "kind": "variable",
19737
+ "name": "CODE_NODES",
19738
+ "type": {
19739
+ "text": "ReadonlySet<string>"
19740
+ },
19741
+ "default": "new Set([...CODE_BLOCK_NODES, 'InlineCode'])"
19742
+ },
19743
+ {
19744
+ "kind": "function",
19745
+ "name": "inCodeBlock",
19746
+ "return": {
19747
+ "type": {
19748
+ "text": "boolean"
19749
+ }
19750
+ },
19751
+ "parameters": [
19752
+ {
19753
+ "name": "state",
19754
+ "type": {
19755
+ "text": "EditorState"
19756
+ }
19757
+ },
19758
+ {
19759
+ "name": "pos",
19760
+ "type": {
19761
+ "text": "number"
19762
+ }
19763
+ }
19764
+ ],
19765
+ "description": "Whether `pos` sits in a fenced or indented code block, where a leading `-`,\n`1.` or `>` is literal code."
19766
+ },
19767
+ {
19768
+ "kind": "function",
19769
+ "name": "inCode",
19770
+ "return": {
19771
+ "type": {
19772
+ "text": "boolean"
19773
+ }
19774
+ },
19775
+ "parameters": [
19776
+ {
19777
+ "name": "state",
19778
+ "type": {
19779
+ "text": "EditorState"
19780
+ }
19781
+ },
19782
+ {
19783
+ "name": "pos",
19784
+ "type": {
19785
+ "text": "number"
19786
+ }
19787
+ }
19788
+ ],
19789
+ "description": "Whether `pos` sits in any code, the backtick span included."
19790
+ },
19791
+ {
19792
+ "kind": "function",
19793
+ "name": "forEachLineStart",
19794
+ "return": {
19795
+ "type": {
19796
+ "text": "void"
19797
+ }
19798
+ },
19799
+ "parameters": [
19800
+ {
19801
+ "name": "state",
19802
+ "type": {
19803
+ "text": "EditorState"
19804
+ }
19805
+ },
19806
+ {
19807
+ "name": "from",
19808
+ "type": {
19809
+ "text": "number"
19810
+ }
19811
+ },
19812
+ {
19813
+ "name": "to",
19814
+ "type": {
19815
+ "text": "number"
19816
+ }
19817
+ },
19818
+ {
19819
+ "name": "each",
19820
+ "type": {
19821
+ "text": "(lineFrom: number) => void"
19822
+ }
19823
+ }
19824
+ ],
19825
+ "description": "Call `each` with the start of every line from `from` to `to`."
19826
+ },
19827
+ {
19828
+ "kind": "function",
19829
+ "name": "treeAdvanced",
19830
+ "return": {
19831
+ "type": {
19832
+ "text": "boolean"
19833
+ }
19834
+ },
19835
+ "parameters": [
19836
+ {
19837
+ "name": "before",
19838
+ "type": {
19839
+ "text": "EditorState"
19840
+ }
19841
+ },
19842
+ {
19843
+ "name": "after",
19844
+ "type": {
19845
+ "text": "EditorState"
19846
+ }
19847
+ }
19848
+ ],
19849
+ "description": "Whether the parse moved on between two states. The tree is parsed in the\nbackground, so a decoration built from it must be built again when it has\ncaught up, not only when the text, the viewport or the selection changes."
19850
+ },
19851
+ {
19852
+ "kind": "function",
19853
+ "name": "isRuleLine",
19854
+ "return": {
19855
+ "type": {
19856
+ "text": "boolean"
19857
+ }
19858
+ },
19859
+ "parameters": [
19860
+ {
19861
+ "name": "state",
19862
+ "type": {
19863
+ "text": "EditorState"
19864
+ }
19865
+ },
19866
+ {
19867
+ "name": "lineFrom",
19868
+ "type": {
19869
+ "text": "number"
19870
+ }
19871
+ }
19872
+ ],
19873
+ "description": "Whether the line at `lineFrom` is a thematic break (`---`, `* * *`). Its\ncharacters look like a bullet to a regular expression; to the tree they are not."
19874
+ },
19161
19875
  {
19162
19876
  "kind": "function",
19163
19877
  "name": "enclosingNamed",
@@ -19193,6 +19907,24 @@
19193
19907
  }
19194
19908
  ],
19195
19909
  "description": "`enclosingNode` for the common case: a node that goes by one of these names."
19910
+ },
19911
+ {
19912
+ "kind": "function",
19913
+ "name": "linkTextRange",
19914
+ "return": {
19915
+ "type": {
19916
+ "text": "{ from: number; to: number } | null"
19917
+ }
19918
+ },
19919
+ "parameters": [
19920
+ {
19921
+ "name": "link",
19922
+ "type": {
19923
+ "text": "SyntaxNode"
19924
+ }
19925
+ }
19926
+ ],
19927
+ "description": "The text of a `[text](url)` link, between its brackets; null when it is empty."
19196
19928
  }
19197
19929
  ],
19198
19930
  "exports": [
@@ -19204,6 +19936,62 @@
19204
19936
  "module": "src/components/inputs/text-editor/text-editor.syntax.ts"
19205
19937
  }
19206
19938
  },
19939
+ {
19940
+ "kind": "js",
19941
+ "name": "CODE_BLOCK_NODES",
19942
+ "declaration": {
19943
+ "name": "CODE_BLOCK_NODES",
19944
+ "module": "src/components/inputs/text-editor/text-editor.syntax.ts"
19945
+ }
19946
+ },
19947
+ {
19948
+ "kind": "js",
19949
+ "name": "CODE_NODES",
19950
+ "declaration": {
19951
+ "name": "CODE_NODES",
19952
+ "module": "src/components/inputs/text-editor/text-editor.syntax.ts"
19953
+ }
19954
+ },
19955
+ {
19956
+ "kind": "js",
19957
+ "name": "inCodeBlock",
19958
+ "declaration": {
19959
+ "name": "inCodeBlock",
19960
+ "module": "src/components/inputs/text-editor/text-editor.syntax.ts"
19961
+ }
19962
+ },
19963
+ {
19964
+ "kind": "js",
19965
+ "name": "inCode",
19966
+ "declaration": {
19967
+ "name": "inCode",
19968
+ "module": "src/components/inputs/text-editor/text-editor.syntax.ts"
19969
+ }
19970
+ },
19971
+ {
19972
+ "kind": "js",
19973
+ "name": "forEachLineStart",
19974
+ "declaration": {
19975
+ "name": "forEachLineStart",
19976
+ "module": "src/components/inputs/text-editor/text-editor.syntax.ts"
19977
+ }
19978
+ },
19979
+ {
19980
+ "kind": "js",
19981
+ "name": "treeAdvanced",
19982
+ "declaration": {
19983
+ "name": "treeAdvanced",
19984
+ "module": "src/components/inputs/text-editor/text-editor.syntax.ts"
19985
+ }
19986
+ },
19987
+ {
19988
+ "kind": "js",
19989
+ "name": "isRuleLine",
19990
+ "declaration": {
19991
+ "name": "isRuleLine",
19992
+ "module": "src/components/inputs/text-editor/text-editor.syntax.ts"
19993
+ }
19994
+ },
19207
19995
  {
19208
19996
  "kind": "js",
19209
19997
  "name": "enclosingNamed",
@@ -19211,6 +19999,14 @@
19211
19999
  "name": "enclosingNamed",
19212
20000
  "module": "src/components/inputs/text-editor/text-editor.syntax.ts"
19213
20001
  }
20002
+ },
20003
+ {
20004
+ "kind": "js",
20005
+ "name": "linkTextRange",
20006
+ "declaration": {
20007
+ "name": "linkTextRange",
20008
+ "module": "src/components/inputs/text-editor/text-editor.syntax.ts"
20009
+ }
19214
20010
  }
19215
20011
  ]
19216
20012
  },
@@ -19220,131 +20016,35 @@
19220
20016
  "declarations": [
19221
20017
  {
19222
20018
  "kind": "class",
19223
- "description": "A hybrid markdown editor built on CodeMirror 6 (via NLDDCodeMirrorElement): the document stays plain markdown text, but formatting is shown inline (bold is bold, headings are larger, links are colored) while the syntax markers stay visible, only dimmed — the iA Writer / Kirby approach. No WYSIWYG tree, so the data stays portable. Default `appearance=\"simple\"` is bare (no frame, no focus ring) for use inside a composition (e.g. a message field) that owns its chrome and focus; the caret is a prominent accent. `appearance=\"input-field\"` adds a framed surface + focus Headless: there is no built-in toolbar. A consumer drives formatting via the command methods (toggleBold/toggleItalic/toggleInlineCode/toggleStrikethrough/ toggleHeading/toggleBulletList/toggleTaskList/toggleQuote/toggleLink/runCommand to toggle, and setHeading/setList for picker-style \"set\" semantics), reads the active formats with getState(), listens to the nldd-text-editor-state event to render toggle states, and forwards padding clicks with focusFromPoint(). Cmd/Ctrl+B/I/E/K are bound out of the box. Commands keep focus on the editor. An inline toggle wraps the selected text (whitespace at its edges stays outside the markers), unwraps a run the caret is in, and with the caret at the very end of a run steps out of it. Bold that a typed space has broken (`**woord **`) keeps its styling while the caret is inside; the space moves outside the markers when the caret leaves. insertAtCursor(text) puts text at the caret and replaceRange(from, to, text) writes at the same clean offsets getSelection() reads. An @-mention typeahead (mentionSource) collapses to an atomic token, further typeahead lists on their own trigger (typeaheads) write what you tell them to, and a W3C-style annotation overlay (annotations) marks ranges with a dashed underline, light tint and a count badge without touching the underlying text.",
20019
+ "description": "A hybrid markdown editor built on CodeMirror 6 (via NLDDCodeMirrorElement): the document stays plain markdown text, but formatting is shown inline (bold is bold, headings are larger, links are colored) while the syntax markers stay visible, only dimmed — the iA Writer / Kirby approach. No WYSIWYG tree, so the data stays portable. Default `appearance=\"simple\"` is bare (no frame, no focus ring) for use inside a composition (e.g. a message field) that owns its chrome and focus; the caret is a prominent accent. `appearance=\"input-field\"` adds a framed surface + focus Headless: there is no built-in toolbar. A consumer drives formatting via the command methods (toggleBold/toggleItalic/toggleInlineCode/toggleStrikethrough/ toggleHeading/toggleBulletList/toggleTaskList/toggleQuote/toggleLink/runCommand to toggle, and setHeading/setList for picker-style \"set\" semantics), reads the active formats with getState(), listens to the nldd-text-editor-state event to render toggle states, and forwards padding clicks with focusFromPoint(). Cmd/Ctrl+B/I/E/K are bound out of the box. Commands keep focus on the editor. An inline toggle wraps the selected text (whitespace at its edges stays outside the markers), unwraps a run the caret is in, and with the caret at the very end of a run steps out of it. Bold that a typed space has broken (`**woord **`) keeps its styling while the caret is inside; the space moves outside the markers when the caret leaves. insertAtCursor(text) puts text at the caret and replaceRange(from, to, text) writes at the same clean offsets getSelection() reads. An @-mention typeahead (mentionSource) collapses to an atomic token, further typeahead lists on their own trigger (typeaheads) write what you tell them to, and a W3C-style annotation overlay (annotations) marks ranges with a light tint and a count badge without touching the underlying text. To show the value, render the markdown into nldd-rich-text, which uses the same type, bold and code as the editor. A mention is stored as `[@Name](user:id)`: turn it into `<a href=\"…\" data-mention>Name</a>` (or a `span` when there is no page for the person), without the `@`. A link reads as the same token there; a span keeps the color and the icon without the tint.",
19224
20020
  "name": "NLDDTextEditor",
19225
20021
  "members": [
19226
20022
  {
19227
20023
  "kind": "field",
19228
- "name": "shadowRootOptions",
20024
+ "name": "noSpellcheck",
19229
20025
  "type": {
19230
- "text": "object"
20026
+ "text": "boolean"
19231
20027
  },
19232
- "static": true,
19233
- "default": "{ ...LitElement.shadowRootOptions, delegatesFocus: true, }"
20028
+ "default": "false",
20029
+ "description": "Turns spellchecking off. On by default, without code, URLs and mentions.",
20030
+ "attribute": "no-spellcheck",
20031
+ "reflects": true
19234
20032
  },
19235
20033
  {
19236
20034
  "kind": "field",
19237
- "name": "isFormInput",
20035
+ "name": "wrap",
19238
20036
  "type": {
19239
20037
  "text": "boolean"
19240
20038
  },
19241
- "static": true,
19242
20039
  "default": "true",
19243
- "description": "Says this is the control an nldd-form-field is about, so the field can\nfind it, name it and move focus into it. See nldd-form-field."
20040
+ "attribute": "wrap",
20041
+ "reflects": true
19244
20042
  },
19245
20043
  {
19246
20044
  "kind": "field",
19247
- "name": "value",
20045
+ "name": "resize",
19248
20046
  "type": {
19249
- "text": "string"
19250
- },
19251
- "default": "''",
19252
- "attribute": "value"
19253
- },
19254
- {
19255
- "kind": "field",
19256
- "name": "inputId",
19257
- "type": {
19258
- "text": "string"
19259
- },
19260
- "default": "''",
19261
- "attribute": "input-id"
19262
- },
19263
- {
19264
- "kind": "field",
19265
- "name": "placeholder",
19266
- "type": {
19267
- "text": "string"
19268
- },
19269
- "default": "''",
19270
- "attribute": "placeholder",
19271
- "reflects": true
19272
- },
19273
- {
19274
- "kind": "field",
19275
- "name": "disabled",
19276
- "type": {
19277
- "text": "boolean"
19278
- },
19279
- "default": "false",
19280
- "attribute": "disabled",
19281
- "reflects": true
19282
- },
19283
- {
19284
- "kind": "field",
19285
- "name": "name",
19286
- "type": {
19287
- "text": "string"
19288
- },
19289
- "default": "''",
19290
- "attribute": "name",
19291
- "reflects": true
19292
- },
19293
- {
19294
- "kind": "field",
19295
- "name": "readonly",
19296
- "type": {
19297
- "text": "boolean"
19298
- },
19299
- "default": "false",
19300
- "attribute": "readonly",
19301
- "reflects": true
19302
- },
19303
- {
19304
- "kind": "field",
19305
- "name": "required",
19306
- "type": {
19307
- "text": "boolean"
19308
- },
19309
- "default": "false",
19310
- "attribute": "required",
19311
- "reflects": true
19312
- },
19313
- {
19314
- "kind": "field",
19315
- "name": "noSpellcheck",
19316
- "type": {
19317
- "text": "boolean"
19318
- },
19319
- "default": "false",
19320
- "description": "Turns spellchecking off. On by default, without code, URLs and mentions.",
19321
- "attribute": "no-spellcheck",
19322
- "reflects": true
19323
- },
19324
- {
19325
- "kind": "field",
19326
- "name": "wrap",
19327
- "type": {
19328
- "text": "boolean"
19329
- },
19330
- "default": "true",
19331
- "attribute": "wrap",
19332
- "reflects": true
19333
- },
19334
- {
19335
- "kind": "field",
19336
- "name": "rows",
19337
- "type": {
19338
- "text": "number"
19339
- },
19340
- "default": "6",
19341
- "attribute": "rows"
19342
- },
19343
- {
19344
- "kind": "field",
19345
- "name": "resize",
19346
- "type": {
19347
- "text": "ResizeMode"
20047
+ "text": "ResizeMode"
19348
20048
  },
19349
20049
  "default": "'auto'",
19350
20050
  "attribute": "resize",
@@ -19362,12 +20062,13 @@
19362
20062
  },
19363
20063
  {
19364
20064
  "kind": "field",
19365
- "name": "accessibleLabel",
20065
+ "name": "syntax",
19366
20066
  "type": {
19367
- "text": "string"
20067
+ "text": "TextEditorSyntax"
19368
20068
  },
19369
- "default": "''",
19370
- "attribute": "accessible-label"
20069
+ "default": "'visible'",
20070
+ "attribute": "syntax",
20071
+ "reflects": true
19371
20072
  },
19372
20073
  {
19373
20074
  "kind": "field",
@@ -19432,17 +20133,6 @@
19432
20133
  "description": "Override translation keys for the editor's assistive-tech strings (the\nopen-in-new-tab link badge and the annotation count badge). Unset keys fall\nback to Dutch.",
19433
20134
  "attribute": "translations"
19434
20135
  },
19435
- {
19436
- "kind": "field",
19437
- "name": "invalid",
19438
- "type": {
19439
- "text": "boolean"
19440
- },
19441
- "default": "false",
19442
- "description": "Marks the control as invalid.\n\nAnnounced and not drawn. What is wrong belongs in an\nnldd-validation-list, in words: a red ring around a single\ncheckbox or radio would say the option is wrong, while it is the question\nthat is unanswered. `aria-invalid` still goes on the control, because\nchoosing not to show something is not a reason to keep quiet about it.",
19443
- "attribute": "invalid",
19444
- "reflects": true
19445
- },
19446
20136
  {
19447
20137
  "kind": "method",
19448
20138
  "name": "toggleBold",
@@ -19768,45 +20458,18 @@
19768
20458
  "description": "The annotations currently in the editor, in CLEAN coordinates, each quote\nre-sliced from the current text — so a consumer can persist positions that\nmoved with edits (read this on save, then write the anchors back)."
19769
20459
  },
19770
20460
  {
19771
- "kind": "method",
19772
- "name": "formValue",
19773
- "return": {
19774
- "type": {
19775
- "text": "FormValue"
19776
- }
20461
+ "kind": "field",
20462
+ "name": "describedByElements",
20463
+ "type": {
20464
+ "text": "readonly Element[]"
19777
20465
  },
19778
- "description": "The value submitted under `name`; `null` submits nothing. Override.",
20466
+ "default": "[]",
20467
+ "description": "Set by nldd-form-field. A consumer never writes this.",
19779
20468
  "inheritedFrom": {
19780
- "name": "FormAssociated",
19781
- "module": "src/utilities/form-associated-mixin.ts"
19782
- }
19783
- },
19784
- {
19785
- "kind": "method",
19786
- "name": "formResetCallback",
19787
- "return": {
19788
- "type": {
19789
- "text": "void"
19790
- }
20469
+ "name": "DescribedBy",
20470
+ "module": "src/utilities/described-by-mixin.ts"
19791
20471
  }
19792
20472
  },
19793
- {
19794
- "kind": "method",
19795
- "name": "formStateRestoreCallback",
19796
- "return": {
19797
- "type": {
19798
- "text": "void"
19799
- }
19800
- },
19801
- "parameters": [
19802
- {
19803
- "name": "state",
19804
- "type": {
19805
- "text": "File | string | FormData | null"
19806
- }
19807
- }
19808
- ]
19809
- },
19810
20473
  {
19811
20474
  "kind": "method",
19812
20475
  "name": "describedTarget",
@@ -19815,23 +20478,10 @@
19815
20478
  "text": "Element | null"
19816
20479
  }
19817
20480
  },
19818
- "description": "CodeMirror builds the textbox; the host is only its container.",
19819
- "inheritedFrom": {
19820
- "name": "DescribedBy",
19821
- "module": "src/utilities/described-by-mixin.ts"
19822
- }
19823
- },
19824
- {
19825
- "kind": "field",
19826
- "name": "describedByElements",
19827
- "type": {
19828
- "text": "readonly Element[]"
19829
- },
19830
- "default": "[]",
19831
- "description": "Set by nldd-form-field. A consumer never writes this.",
20481
+ "description": "The element the description belongs to. Override where it differs.\n\nPublic rather than protected because TypeScript refuses to emit a\ndeclaration for an anonymous class with protected members, and a mixin\nreturns exactly that. Same reason `formValue()` is public in\nFormAssociated.",
19832
20482
  "inheritedFrom": {
19833
- "name": "DescribedBy",
19834
- "module": "src/utilities/described-by-mixin.ts"
20483
+ "name": "NLDDCodeMirrorInput",
20484
+ "module": "src/utilities/codemirror/codemirror-input.ts"
19835
20485
  }
19836
20486
  },
19837
20487
  {
@@ -19856,6 +20506,20 @@
19856
20506
  "module": "src/utilities/form-associated-mixin.ts"
19857
20507
  }
19858
20508
  },
20509
+ {
20510
+ "kind": "method",
20511
+ "name": "formValue",
20512
+ "return": {
20513
+ "type": {
20514
+ "text": "FormValue"
20515
+ }
20516
+ },
20517
+ "description": "The value submitted under `name`; `null` submits nothing. Override.",
20518
+ "inheritedFrom": {
20519
+ "name": "NLDDCodeMirrorInput",
20520
+ "module": "src/utilities/codemirror/codemirror-input.ts"
20521
+ }
20522
+ },
19859
20523
  {
19860
20524
  "kind": "method",
19861
20525
  "name": "formState",
@@ -19968,6 +20632,204 @@
19968
20632
  "name": "FormAssociated",
19969
20633
  "module": "src/utilities/form-associated-mixin.ts"
19970
20634
  }
20635
+ },
20636
+ {
20637
+ "kind": "field",
20638
+ "name": "shadowRootOptions",
20639
+ "type": {
20640
+ "text": "object"
20641
+ },
20642
+ "static": true,
20643
+ "default": "{ ...LitElement.shadowRootOptions, delegatesFocus: true, }",
20644
+ "inheritedFrom": {
20645
+ "name": "NLDDCodeMirrorInput",
20646
+ "module": "src/utilities/codemirror/codemirror-input.ts"
20647
+ }
20648
+ },
20649
+ {
20650
+ "kind": "field",
20651
+ "name": "isFormInput",
20652
+ "type": {
20653
+ "text": "boolean"
20654
+ },
20655
+ "static": true,
20656
+ "default": "true",
20657
+ "description": "Says this is the control an nldd-form-field is about, so the field can\nfind it, name it and move focus into it. See nldd-form-field.",
20658
+ "inheritedFrom": {
20659
+ "name": "NLDDCodeMirrorInput",
20660
+ "module": "src/utilities/codemirror/codemirror-input.ts"
20661
+ }
20662
+ },
20663
+ {
20664
+ "kind": "field",
20665
+ "name": "value",
20666
+ "type": {
20667
+ "text": "string"
20668
+ },
20669
+ "default": "''",
20670
+ "attribute": "value",
20671
+ "inheritedFrom": {
20672
+ "name": "NLDDCodeMirrorInput",
20673
+ "module": "src/utilities/codemirror/codemirror-input.ts"
20674
+ }
20675
+ },
20676
+ {
20677
+ "kind": "field",
20678
+ "name": "inputId",
20679
+ "type": {
20680
+ "text": "string"
20681
+ },
20682
+ "default": "''",
20683
+ "attribute": "input-id",
20684
+ "inheritedFrom": {
20685
+ "name": "NLDDCodeMirrorInput",
20686
+ "module": "src/utilities/codemirror/codemirror-input.ts"
20687
+ }
20688
+ },
20689
+ {
20690
+ "kind": "field",
20691
+ "name": "placeholder",
20692
+ "type": {
20693
+ "text": "string"
20694
+ },
20695
+ "default": "''",
20696
+ "attribute": "placeholder",
20697
+ "reflects": true,
20698
+ "inheritedFrom": {
20699
+ "name": "NLDDCodeMirrorInput",
20700
+ "module": "src/utilities/codemirror/codemirror-input.ts"
20701
+ }
20702
+ },
20703
+ {
20704
+ "kind": "field",
20705
+ "name": "disabled",
20706
+ "type": {
20707
+ "text": "boolean"
20708
+ },
20709
+ "default": "false",
20710
+ "attribute": "disabled",
20711
+ "reflects": true,
20712
+ "inheritedFrom": {
20713
+ "name": "NLDDCodeMirrorInput",
20714
+ "module": "src/utilities/codemirror/codemirror-input.ts"
20715
+ }
20716
+ },
20717
+ {
20718
+ "kind": "field",
20719
+ "name": "name",
20720
+ "type": {
20721
+ "text": "string"
20722
+ },
20723
+ "default": "''",
20724
+ "attribute": "name",
20725
+ "reflects": true,
20726
+ "inheritedFrom": {
20727
+ "name": "NLDDCodeMirrorInput",
20728
+ "module": "src/utilities/codemirror/codemirror-input.ts"
20729
+ }
20730
+ },
20731
+ {
20732
+ "kind": "field",
20733
+ "name": "readonly",
20734
+ "type": {
20735
+ "text": "boolean"
20736
+ },
20737
+ "default": "false",
20738
+ "attribute": "readonly",
20739
+ "reflects": true,
20740
+ "inheritedFrom": {
20741
+ "name": "NLDDCodeMirrorInput",
20742
+ "module": "src/utilities/codemirror/codemirror-input.ts"
20743
+ }
20744
+ },
20745
+ {
20746
+ "kind": "field",
20747
+ "name": "required",
20748
+ "type": {
20749
+ "text": "boolean"
20750
+ },
20751
+ "default": "false",
20752
+ "attribute": "required",
20753
+ "reflects": true,
20754
+ "inheritedFrom": {
20755
+ "name": "NLDDCodeMirrorInput",
20756
+ "module": "src/utilities/codemirror/codemirror-input.ts"
20757
+ }
20758
+ },
20759
+ {
20760
+ "kind": "field",
20761
+ "name": "rows",
20762
+ "type": {
20763
+ "text": "number"
20764
+ },
20765
+ "default": "6",
20766
+ "attribute": "rows",
20767
+ "inheritedFrom": {
20768
+ "name": "NLDDCodeMirrorInput",
20769
+ "module": "src/utilities/codemirror/codemirror-input.ts"
20770
+ }
20771
+ },
20772
+ {
20773
+ "kind": "field",
20774
+ "name": "accessibleLabel",
20775
+ "type": {
20776
+ "text": "string"
20777
+ },
20778
+ "default": "''",
20779
+ "attribute": "accessible-label",
20780
+ "inheritedFrom": {
20781
+ "name": "NLDDCodeMirrorInput",
20782
+ "module": "src/utilities/codemirror/codemirror-input.ts"
20783
+ }
20784
+ },
20785
+ {
20786
+ "kind": "field",
20787
+ "name": "invalid",
20788
+ "type": {
20789
+ "text": "boolean"
20790
+ },
20791
+ "default": "false",
20792
+ "description": "Marks the control as invalid.\n\nAnnounced and not drawn. What is wrong belongs in an\nnldd-validation-list, in words: a red ring around a single\ncheckbox or radio would say the option is wrong, while it is the question\nthat is unanswered. `aria-invalid` still goes on the control, because\nchoosing not to show something is not a reason to keep quiet about it.",
20793
+ "attribute": "invalid",
20794
+ "reflects": true,
20795
+ "inheritedFrom": {
20796
+ "name": "NLDDCodeMirrorInput",
20797
+ "module": "src/utilities/codemirror/codemirror-input.ts"
20798
+ }
20799
+ },
20800
+ {
20801
+ "kind": "method",
20802
+ "name": "formResetCallback",
20803
+ "return": {
20804
+ "type": {
20805
+ "text": "void"
20806
+ }
20807
+ },
20808
+ "inheritedFrom": {
20809
+ "name": "NLDDCodeMirrorInput",
20810
+ "module": "src/utilities/codemirror/codemirror-input.ts"
20811
+ }
20812
+ },
20813
+ {
20814
+ "kind": "method",
20815
+ "name": "formStateRestoreCallback",
20816
+ "return": {
20817
+ "type": {
20818
+ "text": "void"
20819
+ }
20820
+ },
20821
+ "parameters": [
20822
+ {
20823
+ "name": "state",
20824
+ "type": {
20825
+ "text": "File | string | FormData | null"
20826
+ }
20827
+ }
20828
+ ],
20829
+ "inheritedFrom": {
20830
+ "name": "NLDDCodeMirrorInput",
20831
+ "module": "src/utilities/codemirror/codemirror-input.ts"
20832
+ }
19971
20833
  }
19972
20834
  ],
19973
20835
  "events": [
@@ -19997,6 +20859,69 @@
19997
20859
  }
19998
20860
  ],
19999
20861
  "attributes": [
20862
+ {
20863
+ "name": "no-spellcheck",
20864
+ "type": {
20865
+ "text": "boolean"
20866
+ },
20867
+ "default": "false",
20868
+ "description": "Turns spellchecking off. It is on by default, like the other text fields, and leaves out what is not running text: inline code and code blocks, the address of a link and a bare URL (the link text is checked), and mentions. Autocorrect and autocapitalize follow the user's own settings, as in the other fields, also with `no-spellcheck`. Two limits come from the browser: text that was already there is checked once you edit near it, not when the editor opens (the editor lives in a shadow root; Firefox only checks around the caret), and markup that changes how a line is built, such as starting a list item, hides the underlines on that line until you type on.",
20869
+ "fieldName": "noSpellcheck"
20870
+ },
20871
+ {
20872
+ "name": "wrap",
20873
+ "type": {
20874
+ "text": "boolean"
20875
+ },
20876
+ "default": "true",
20877
+ "fieldName": "wrap",
20878
+ "description": "Wrap long lines (default true; prose wraps)"
20879
+ },
20880
+ {
20881
+ "name": "resize",
20882
+ "type": {
20883
+ "text": "ResizeMode"
20884
+ },
20885
+ "default": "'auto'",
20886
+ "fieldName": "resize",
20887
+ "description": "'none' (fixed) | 'vertical' (drag) | 'auto' (grow, default)"
20888
+ },
20889
+ {
20890
+ "name": "appearance",
20891
+ "type": {
20892
+ "text": "TextEditorAppearance"
20893
+ },
20894
+ "default": "'simple'",
20895
+ "fieldName": "appearance",
20896
+ "description": "'simple' (default, bare) | 'input-field' (framed surface)"
20897
+ },
20898
+ {
20899
+ "name": "syntax",
20900
+ "type": {
20901
+ "text": "TextEditorSyntax"
20902
+ },
20903
+ "default": "'visible'",
20904
+ "fieldName": "syntax",
20905
+ "description": "'visible' (default): every formatting mark stays in view, dimmed, a bullet as the character you typed (`-`, `*` or `+`). 'hidden': the marks of bold, italic, strikethrough, inline code, links and the `#` of a heading are hidden and come back where the caret or the selection touches that construct, so the text reads closer to the result while what you edit is still the markdown. A bullet reads as a dot, and shows its character on the line the caret is on. A quote reads as a line on the left; with the caret anywhere in it, its `>` marks show instead, in the same place. A `---` line reads as a divider until the caret is on it, and a code block loses its ``` fence lines until the caret is in it, since its own tint and edge already say what it is. The numbers of a numbered list stay: they are content. Read-only and disabled hide every mark, which makes a clean read view. The value is plain markdown either way."
20906
+ },
20907
+ {
20908
+ "name": "annotatable",
20909
+ "type": {
20910
+ "text": "boolean"
20911
+ },
20912
+ "default": "false",
20913
+ "description": "Enable the annotation overlay (off by default). Annotations only render when this is set.",
20914
+ "fieldName": "annotatable"
20915
+ },
20916
+ {
20917
+ "name": "translations",
20918
+ "type": {
20919
+ "text": "Partial<NLDDTextEditorTranslations>"
20920
+ },
20921
+ "default": "{}",
20922
+ "description": "Override the editor's assistive-tech strings (the open-in-new-tab link badge and the annotation count badge). Unset keys fall back to Dutch.",
20923
+ "fieldName": "translations"
20924
+ },
20000
20925
  {
20001
20926
  "name": "value",
20002
20927
  "type": {
@@ -20004,6 +20929,10 @@
20004
20929
  },
20005
20930
  "default": "''",
20006
20931
  "fieldName": "value",
20932
+ "inheritedFrom": {
20933
+ "name": "NLDDCodeMirrorInput",
20934
+ "module": "src/utilities/codemirror/codemirror-input.ts"
20935
+ },
20007
20936
  "description": "Editor content (markdown)"
20008
20937
  },
20009
20938
  {
@@ -20013,6 +20942,10 @@
20013
20942
  },
20014
20943
  "default": "''",
20015
20944
  "fieldName": "inputId",
20945
+ "inheritedFrom": {
20946
+ "name": "NLDDCodeMirrorInput",
20947
+ "module": "src/utilities/codemirror/codemirror-input.ts"
20948
+ },
20016
20949
  "description": "Sets the id on the editable element. Set automatically by nldd-form-field."
20017
20950
  },
20018
20951
  {
@@ -20022,6 +20955,10 @@
20022
20955
  },
20023
20956
  "default": "''",
20024
20957
  "fieldName": "placeholder",
20958
+ "inheritedFrom": {
20959
+ "name": "NLDDCodeMirrorInput",
20960
+ "module": "src/utilities/codemirror/codemirror-input.ts"
20961
+ },
20025
20962
  "description": "Placeholder text shown while empty"
20026
20963
  },
20027
20964
  {
@@ -20031,6 +20968,10 @@
20031
20968
  },
20032
20969
  "default": "false",
20033
20970
  "fieldName": "disabled",
20971
+ "inheritedFrom": {
20972
+ "name": "NLDDCodeMirrorInput",
20973
+ "module": "src/utilities/codemirror/codemirror-input.ts"
20974
+ },
20034
20975
  "description": "Disabled state"
20035
20976
  },
20036
20977
  {
@@ -20040,6 +20981,10 @@
20040
20981
  },
20041
20982
  "default": "''",
20042
20983
  "fieldName": "name",
20984
+ "inheritedFrom": {
20985
+ "name": "NLDDCodeMirrorInput",
20986
+ "module": "src/utilities/codemirror/codemirror-input.ts"
20987
+ },
20043
20988
  "description": "Field name for form submission"
20044
20989
  },
20045
20990
  {
@@ -20049,6 +20994,10 @@
20049
20994
  },
20050
20995
  "default": "false",
20051
20996
  "fieldName": "readonly",
20997
+ "inheritedFrom": {
20998
+ "name": "NLDDCodeMirrorInput",
20999
+ "module": "src/utilities/codemirror/codemirror-input.ts"
21000
+ },
20052
21001
  "description": "Readonly state (focusable and selectable, not editable)"
20053
21002
  },
20054
21003
  {
@@ -20058,25 +21007,11 @@
20058
21007
  },
20059
21008
  "default": "false",
20060
21009
  "fieldName": "required",
20061
- "description": "Required state"
20062
- },
20063
- {
20064
- "name": "no-spellcheck",
20065
- "type": {
20066
- "text": "boolean"
20067
- },
20068
- "default": "false",
20069
- "description": "Turns spellchecking off. It is on by default, like the other text fields, and leaves out what is not running text: inline code and code blocks, the address of a link and a bare URL (the link text is checked), and mentions. Autocorrect and autocapitalize follow the user's own settings, as in the other fields, also with `no-spellcheck`. Two limits come from the browser: text that was already there is checked once you edit near it, not when the editor opens (the editor lives in a shadow root; Firefox only checks around the caret), and markup that changes how a line is built, such as starting a list item, hides the underlines on that line until you type on.",
20070
- "fieldName": "noSpellcheck"
20071
- },
20072
- {
20073
- "name": "wrap",
20074
- "type": {
20075
- "text": "boolean"
21010
+ "inheritedFrom": {
21011
+ "name": "NLDDCodeMirrorInput",
21012
+ "module": "src/utilities/codemirror/codemirror-input.ts"
20076
21013
  },
20077
- "default": "true",
20078
- "fieldName": "wrap",
20079
- "description": "Wrap long lines (default true; prose wraps)"
21014
+ "description": "Required state"
20080
21015
  },
20081
21016
  {
20082
21017
  "name": "rows",
@@ -20085,25 +21020,11 @@
20085
21020
  },
20086
21021
  "default": "6",
20087
21022
  "fieldName": "rows",
20088
- "description": "Minimum visible rows (the floor in every resize mode). Default: 6."
20089
- },
20090
- {
20091
- "name": "resize",
20092
- "type": {
20093
- "text": "ResizeMode"
20094
- },
20095
- "default": "'auto'",
20096
- "fieldName": "resize",
20097
- "description": "'none' (fixed) | 'vertical' (drag) | 'auto' (grow, default)"
20098
- },
20099
- {
20100
- "name": "appearance",
20101
- "type": {
20102
- "text": "TextEditorAppearance"
21023
+ "inheritedFrom": {
21024
+ "name": "NLDDCodeMirrorInput",
21025
+ "module": "src/utilities/codemirror/codemirror-input.ts"
20103
21026
  },
20104
- "default": "'simple'",
20105
- "fieldName": "appearance",
20106
- "description": "'simple' (default, bare) | 'input-field' (framed surface)"
21027
+ "description": "Minimum visible rows (the floor in every resize mode). Default: 6."
20107
21028
  },
20108
21029
  {
20109
21030
  "name": "accessible-label",
@@ -20112,25 +21033,11 @@
20112
21033
  },
20113
21034
  "default": "''",
20114
21035
  "fieldName": "accessibleLabel",
20115
- "description": "Accessible label forwarded to the editor. Set automatically by nldd-form-field."
20116
- },
20117
- {
20118
- "name": "annotatable",
20119
- "type": {
20120
- "text": "boolean"
20121
- },
20122
- "default": "false",
20123
- "description": "Enable the annotation overlay (off by default). Annotations only render when this is set.",
20124
- "fieldName": "annotatable"
20125
- },
20126
- {
20127
- "name": "translations",
20128
- "type": {
20129
- "text": "Partial<NLDDTextEditorTranslations>"
21036
+ "inheritedFrom": {
21037
+ "name": "NLDDCodeMirrorInput",
21038
+ "module": "src/utilities/codemirror/codemirror-input.ts"
20130
21039
  },
20131
- "default": "{}",
20132
- "description": "Override the editor's assistive-tech strings (the open-in-new-tab link badge and the annotation count badge). Unset keys fall back to Dutch.",
20133
- "fieldName": "translations"
21040
+ "description": "Accessible label forwarded to the editor. Set automatically by nldd-form-field."
20134
21041
  },
20135
21042
  {
20136
21043
  "name": "invalid",
@@ -20139,22 +21046,16 @@
20139
21046
  },
20140
21047
  "default": "false",
20141
21048
  "description": "Marks the control as invalid. Announced with aria-invalid; nothing is drawn for it.",
20142
- "fieldName": "invalid"
20143
- }
20144
- ],
20145
- "mixins": [
20146
- {
20147
- "name": "DescribedBy",
20148
- "module": "/src/utilities/described-by-mixin.js"
20149
- },
20150
- {
20151
- "name": "FormAssociated",
20152
- "module": "/src/utilities/form-associated-mixin.js"
21049
+ "fieldName": "invalid",
21050
+ "inheritedFrom": {
21051
+ "name": "NLDDCodeMirrorInput",
21052
+ "module": "src/utilities/codemirror/codemirror-input.ts"
21053
+ }
20153
21054
  }
20154
21055
  ],
20155
21056
  "superclass": {
20156
- "name": "NLDDCodeMirrorElement",
20157
- "module": "/src/utilities/codemirror/codemirror-element.js"
21057
+ "name": "NLDDCodeMirrorInput",
21058
+ "module": "/src/utilities/codemirror/codemirror-input.js"
20158
21059
  },
20159
21060
  "tagName": "nldd-text-editor",
20160
21061
  "customElement": true
@@ -37533,7 +38434,7 @@
37533
38434
  "declarations": [
37534
38435
  {
37535
38436
  "kind": "class",
37536
- "description": "A short message that arrives over the interface and leaves on its own: a save that worked, a request that failed. Not a banner, which stands in the page and stays there — this one floats, stacks, and goes away. It places itself. Write it wherever it belongs in your code and it moves to one shared area: top right from md, full width across the top below that. Nothing about the position is settable, so notifications from anywhere in an application land in the same place and stack in the same order. A modal overlay is the one thing that moves it. An nldd-sheet, nldd-window or nldd-modal-dialog paints in the browser's top layer, above the whole page and out of reach of any z-index, and while one is open everything outside it is inert. So the area goes in: into the topmost overlay that is open, and back down as they close. A notification already on screen travels with it, and one raised from inside a sheet is readable and reachable where it is raised. More than one is a deck, not a list: the front one is readable and the older ones peek out below it, so a burst of messages takes the room of roughly one. The newest is in front. Behind it a notification is a bare surface, cut to the height of the one in front; dismiss the front and it slides up into the place that came free while its message fades in, because it was standing there all along. Under the front notification sits a strip as wide as the deck and as tall as the deck is when it fans out. Pointing at it fans the deck out to fill it, which is the only hint that there is more here than the message you can read; clicking it, or moving focus into the area, lays the whole deck out as a list. Clicking or tabbing away puts it back. The notification itself is not a button: a click on the message you are reading does nothing. Only the front of the deck counts down, and only while the deck is closed: open means someone is reading. The rest wait, so nothing disappears from under the one you are reading. `critical` never leaves on its own: a failure is worth reading, and the count-down would take it away while you were. That also keeps this within WCAG 2.2.1, which allows a time limit when what disappears is not essential. The clock pauses while a pointer moves over the notification and while focus is inside it, and resumes where it left off rather than starting over. A pointer that merely happens to rest where the notification appears does not count: it never moved, so nobody is reading. role follows the variant: `critical` becomes role=\"alert\", the rest role=\"status\". Focus never moves on its own. Escape dismisses the notification that focus is in. `NLDDNotification.show({ text, supportingText, variant, icon, duration, actions })` raises a notification without an element to manage: it creates one, shows it, and removes it once it is dismissed. An action is `{ text, onClick }`, at most 2, and a click on one also takes the notification away. It returns a handle with `dismiss()` and `update(options)`. An update changes the message, puts the notification in front and starts its clock over, so a status that changes often is one notification that keeps up instead of a new one sliding in each time; one that has already left arrives again. Use `show()` from a framework. Because a notification places itself, an element that a framework rendered is no longer where that framework left it: a keyed list (`v-for` with a `:key`) then fails on its next render, and a removed row leaves its notification on screen.",
38437
+ "description": "A short message that arrives over the interface and leaves on its own: a save that worked, a request that failed. Not a banner, which stands in the page and stays there — this one floats, stacks, and goes away. It places itself. Write it wherever it belongs in your code and it moves to one shared area: top right from md, where it slides in from the right, and full width across the top below that, where it drops in from the top. Nothing about the position is settable, so notifications from anywhere in an application land in the same place and stack in the same order. A modal overlay is the one thing that moves it. An nldd-sheet, nldd-window or nldd-modal-dialog paints in the browser's top layer, above the whole page and out of reach of any z-index, and while one is open everything outside it is inert. So the area goes in: into the topmost overlay that is open, and back down as they close. A notification already on screen travels with it, and one raised from inside a sheet is readable and reachable where it is raised. More than one is a deck, not a list: the front one is readable and the older ones peek out below it, so a burst of messages takes the room of roughly one. The newest is in front. Behind it a notification is a bare surface, cut to the height of the one in front; dismiss the front and it slides up into the place that came free while its message fades in, because it was standing there all along. Under the front notification sits a strip as wide as the deck and as tall as the deck is when it fans out. Pointing at it fans the deck out to fill it, which is the only hint that there is more here than the message you can read; clicking it, or moving focus into the area, lays the whole deck out as a list. Clicking or tabbing away puts it back. The notification itself is not a button: a click on the message you are reading does nothing. Only the front of the deck counts down, and only while the deck is closed: open means someone is reading. The rest wait, so nothing disappears from under the one you are reading. `critical` never leaves on its own: a failure is worth reading, and the count-down would take it away while you were. That also keeps this within WCAG 2.2.1, which allows a time limit when what disappears is not essential. The clock pauses while a pointer moves over the notification and while focus is inside it, and resumes where it left off rather than starting over. A pointer that merely happens to rest where the notification appears does not count: it never moved, so nobody is reading. role follows the variant: `critical` becomes role=\"alert\", the rest role=\"status\". Focus never moves on its own. Escape dismisses the notification that focus is in. `NLDDNotification.show({ text, supportingText, variant, icon, duration, actions })` raises a notification without an element to manage: it creates one, shows it, and removes it once it is dismissed. An action is `{ text, onClick }`, at most 2, and a click on one also takes the notification away. It returns a handle with `dismiss()` and `update(options)`. An update changes the message, puts the notification in front and starts its clock over, so a status that changes often is one notification that keeps up instead of a new one sliding in each time; one that has already left arrives again. Use `show()` from a framework. Because a notification places itself, an element that a framework rendered is no longer where that framework left it: a keyed list (`v-for` with a `:key`) then fails on its next render, and a removed row leaves its notification on screen.",
37537
38438
  "name": "NLDDNotification",
37538
38439
  "members": [
37539
38440
  {
@@ -39035,6 +39936,672 @@
39035
39936
  }
39036
39937
  ]
39037
39938
  },
39939
+ {
39940
+ "kind": "javascript-module",
39941
+ "path": "src/utilities/codemirror/codemirror-input.ts",
39942
+ "declarations": [
39943
+ {
39944
+ "kind": "class",
39945
+ "description": "Shared base for the CodeMirror editors that are form controls\n(nldd-code-editor, nldd-text-editor). nldd-code-viewer is not one, so this\nsits between NLDDCodeMirrorElement and the two editors.\n\nIt owns what a form control needs and both editors did the same way: the\nvalue and its `input`/`change` events, editable and read-only, the\nplaceholder, the textbox attributes (label, id, aria-readonly,\naria-required), form association and reset, a press on the padding that\nstarts editing, and the warning for a missing label. A subclass adds its own\nextensions after `inputExtensions()` and can shape three things:\n`docToValue()`, `contentAttributes()` and `beforeChangeCheck()`.",
39946
+ "name": "NLDDCodeMirrorInput",
39947
+ "members": [
39948
+ {
39949
+ "kind": "field",
39950
+ "name": "shadowRootOptions",
39951
+ "type": {
39952
+ "text": "object"
39953
+ },
39954
+ "static": true,
39955
+ "default": "{ ...LitElement.shadowRootOptions, delegatesFocus: true, }"
39956
+ },
39957
+ {
39958
+ "kind": "field",
39959
+ "name": "isFormInput",
39960
+ "type": {
39961
+ "text": "boolean"
39962
+ },
39963
+ "static": true,
39964
+ "default": "true",
39965
+ "description": "Says this is the control an nldd-form-field is about, so the field can\nfind it, name it and move focus into it. See nldd-form-field."
39966
+ },
39967
+ {
39968
+ "kind": "field",
39969
+ "name": "value",
39970
+ "type": {
39971
+ "text": "string"
39972
+ },
39973
+ "default": "''",
39974
+ "attribute": "value"
39975
+ },
39976
+ {
39977
+ "kind": "field",
39978
+ "name": "inputId",
39979
+ "type": {
39980
+ "text": "string"
39981
+ },
39982
+ "default": "''",
39983
+ "attribute": "input-id"
39984
+ },
39985
+ {
39986
+ "kind": "field",
39987
+ "name": "placeholder",
39988
+ "type": {
39989
+ "text": "string"
39990
+ },
39991
+ "default": "''",
39992
+ "attribute": "placeholder",
39993
+ "reflects": true
39994
+ },
39995
+ {
39996
+ "kind": "field",
39997
+ "name": "disabled",
39998
+ "type": {
39999
+ "text": "boolean"
40000
+ },
40001
+ "default": "false",
40002
+ "attribute": "disabled",
40003
+ "reflects": true
40004
+ },
40005
+ {
40006
+ "kind": "field",
40007
+ "name": "name",
40008
+ "type": {
40009
+ "text": "string"
40010
+ },
40011
+ "default": "''",
40012
+ "attribute": "name",
40013
+ "reflects": true
40014
+ },
40015
+ {
40016
+ "kind": "field",
40017
+ "name": "readonly",
40018
+ "type": {
40019
+ "text": "boolean"
40020
+ },
40021
+ "default": "false",
40022
+ "attribute": "readonly",
40023
+ "reflects": true
40024
+ },
40025
+ {
40026
+ "kind": "field",
40027
+ "name": "required",
40028
+ "type": {
40029
+ "text": "boolean"
40030
+ },
40031
+ "default": "false",
40032
+ "attribute": "required",
40033
+ "reflects": true
40034
+ },
40035
+ {
40036
+ "kind": "field",
40037
+ "name": "rows",
40038
+ "type": {
40039
+ "text": "number"
40040
+ },
40041
+ "default": "6",
40042
+ "attribute": "rows"
40043
+ },
40044
+ {
40045
+ "kind": "field",
40046
+ "name": "accessibleLabel",
40047
+ "type": {
40048
+ "text": "string"
40049
+ },
40050
+ "default": "''",
40051
+ "attribute": "accessible-label"
40052
+ },
40053
+ {
40054
+ "kind": "field",
40055
+ "name": "invalid",
40056
+ "type": {
40057
+ "text": "boolean"
40058
+ },
40059
+ "default": "false",
40060
+ "description": "Marks the control as invalid.\n\nAnnounced and not drawn. What is wrong belongs in an\nnldd-validation-list, in words: a red ring around a single\ncheckbox or radio would say the option is wrong, while it is the question\nthat is unanswered. `aria-invalid` still goes on the control, because\nchoosing not to show something is not a reason to keep quiet about it.",
40061
+ "attribute": "invalid",
40062
+ "reflects": true
40063
+ },
40064
+ {
40065
+ "kind": "field",
40066
+ "name": "_initialValue",
40067
+ "type": {
40068
+ "text": "string"
40069
+ },
40070
+ "privacy": "private",
40071
+ "default": "''"
40072
+ },
40073
+ {
40074
+ "kind": "field",
40075
+ "name": "_valueAtFocus",
40076
+ "type": {
40077
+ "text": "string"
40078
+ },
40079
+ "privacy": "private",
40080
+ "default": "''"
40081
+ },
40082
+ {
40083
+ "kind": "field",
40084
+ "name": "_accessibleLabelWarned",
40085
+ "type": {
40086
+ "text": "boolean"
40087
+ },
40088
+ "privacy": "private",
40089
+ "default": "false"
40090
+ },
40091
+ {
40092
+ "kind": "field",
40093
+ "name": "_editableCompartment",
40094
+ "privacy": "private",
40095
+ "default": "new Compartment()"
40096
+ },
40097
+ {
40098
+ "kind": "field",
40099
+ "name": "_placeholderCompartment",
40100
+ "privacy": "private",
40101
+ "default": "new Compartment()"
40102
+ },
40103
+ {
40104
+ "kind": "field",
40105
+ "name": "_attrsCompartment",
40106
+ "privacy": "private",
40107
+ "default": "new Compartment()"
40108
+ },
40109
+ {
40110
+ "kind": "field",
40111
+ "name": "rowsProperty",
40112
+ "type": {
40113
+ "text": "string"
40114
+ },
40115
+ "privacy": "protected",
40116
+ "readonly": true,
40117
+ "description": "The custom property the visible row count goes into, named after the tag."
40118
+ },
40119
+ {
40120
+ "kind": "method",
40121
+ "name": "docToValue",
40122
+ "privacy": "protected",
40123
+ "return": {
40124
+ "type": {
40125
+ "text": "string"
40126
+ }
40127
+ },
40128
+ "parameters": [
40129
+ {
40130
+ "name": "doc",
40131
+ "type": {
40132
+ "text": "string"
40133
+ }
40134
+ }
40135
+ ],
40136
+ "description": "The value for a document. Default: the document itself."
40137
+ },
40138
+ {
40139
+ "kind": "method",
40140
+ "name": "contentAttributes",
40141
+ "privacy": "protected",
40142
+ "return": {
40143
+ "type": {
40144
+ "text": "Record<string, string>"
40145
+ }
40146
+ },
40147
+ "description": "Attributes of the content element beyond label, id, aria-readonly and\naria-required. Default: none."
40148
+ },
40149
+ {
40150
+ "kind": "method",
40151
+ "name": "beforeChangeCheck",
40152
+ "privacy": "protected",
40153
+ "return": {
40154
+ "type": {
40155
+ "text": "void"
40156
+ }
40157
+ },
40158
+ "parameters": [
40159
+ {
40160
+ "name": "_view",
40161
+ "type": {
40162
+ "text": "EditorView"
40163
+ }
40164
+ }
40165
+ ],
40166
+ "description": "Runs on blur, before the value is compared with the one at focus, so a\nsubclass can settle the document first. Default: nothing."
40167
+ },
40168
+ {
40169
+ "kind": "method",
40170
+ "name": "inputExtensions",
40171
+ "privacy": "protected",
40172
+ "return": {
40173
+ "type": {
40174
+ "text": "Extension[]"
40175
+ }
40176
+ },
40177
+ "description": "The extensions every input needs. A subclass puts these in its own\n`buildExtensions()`, next to what is its own."
40178
+ },
40179
+ {
40180
+ "kind": "method",
40181
+ "name": "_editableExtension",
40182
+ "privacy": "private",
40183
+ "return": {
40184
+ "type": {
40185
+ "text": "Extension"
40186
+ }
40187
+ }
40188
+ },
40189
+ {
40190
+ "kind": "method",
40191
+ "name": "_placeholderExtension",
40192
+ "privacy": "private",
40193
+ "return": {
40194
+ "type": {
40195
+ "text": "Extension"
40196
+ }
40197
+ }
40198
+ },
40199
+ {
40200
+ "kind": "method",
40201
+ "name": "_attrsExtension",
40202
+ "privacy": "private",
40203
+ "return": {
40204
+ "type": {
40205
+ "text": "Extension"
40206
+ }
40207
+ }
40208
+ },
40209
+ {
40210
+ "kind": "method",
40211
+ "name": "refreshContentAttributes",
40212
+ "privacy": "protected",
40213
+ "return": {
40214
+ "type": {
40215
+ "text": "void"
40216
+ }
40217
+ },
40218
+ "description": "Build the textbox attributes again, after something `contentAttributes()`\nreads has changed."
40219
+ },
40220
+ {
40221
+ "kind": "method",
40222
+ "name": "onEditorMounted",
40223
+ "privacy": "protected",
40224
+ "return": {
40225
+ "type": {
40226
+ "text": "void"
40227
+ }
40228
+ }
40229
+ },
40230
+ {
40231
+ "kind": "method",
40232
+ "name": "_onDocChanged",
40233
+ "privacy": "private",
40234
+ "return": {
40235
+ "type": {
40236
+ "text": "void"
40237
+ }
40238
+ }
40239
+ },
40240
+ {
40241
+ "kind": "method",
40242
+ "name": "_emitChange",
40243
+ "privacy": "private",
40244
+ "return": {
40245
+ "type": {
40246
+ "text": "void"
40247
+ }
40248
+ }
40249
+ },
40250
+ {
40251
+ "kind": "field",
40252
+ "name": "_onScrollerPointerDown",
40253
+ "privacy": "private"
40254
+ },
40255
+ {
40256
+ "kind": "method",
40257
+ "name": "_checkAccessibleLabel",
40258
+ "privacy": "private",
40259
+ "return": {
40260
+ "type": {
40261
+ "text": "void"
40262
+ }
40263
+ }
40264
+ },
40265
+ {
40266
+ "kind": "method",
40267
+ "name": "formValue",
40268
+ "return": {
40269
+ "type": {
40270
+ "text": "FormValue"
40271
+ }
40272
+ },
40273
+ "description": "The value submitted under `name`; `null` submits nothing. Override.",
40274
+ "inheritedFrom": {
40275
+ "name": "FormAssociated",
40276
+ "module": "src/utilities/form-associated-mixin.ts"
40277
+ }
40278
+ },
40279
+ {
40280
+ "kind": "method",
40281
+ "name": "formResetCallback",
40282
+ "return": {
40283
+ "type": {
40284
+ "text": "void"
40285
+ }
40286
+ }
40287
+ },
40288
+ {
40289
+ "kind": "method",
40290
+ "name": "formStateRestoreCallback",
40291
+ "return": {
40292
+ "type": {
40293
+ "text": "void"
40294
+ }
40295
+ },
40296
+ "parameters": [
40297
+ {
40298
+ "name": "state",
40299
+ "type": {
40300
+ "text": "File | string | FormData | null"
40301
+ }
40302
+ }
40303
+ ]
40304
+ },
40305
+ {
40306
+ "kind": "method",
40307
+ "name": "describedTarget",
40308
+ "return": {
40309
+ "type": {
40310
+ "text": "Element | null"
40311
+ }
40312
+ },
40313
+ "description": "CodeMirror builds the textbox; the host is only its container.",
40314
+ "inheritedFrom": {
40315
+ "name": "DescribedBy",
40316
+ "module": "src/utilities/described-by-mixin.ts"
40317
+ }
40318
+ },
40319
+ {
40320
+ "kind": "field",
40321
+ "name": "describedByElements",
40322
+ "type": {
40323
+ "text": "readonly Element[]"
40324
+ },
40325
+ "default": "[]",
40326
+ "description": "Set by nldd-form-field. A consumer never writes this.",
40327
+ "inheritedFrom": {
40328
+ "name": "DescribedBy",
40329
+ "module": "src/utilities/described-by-mixin.ts"
40330
+ }
40331
+ },
40332
+ {
40333
+ "kind": "field",
40334
+ "name": "formAssociated",
40335
+ "type": {
40336
+ "text": "boolean"
40337
+ },
40338
+ "static": true,
40339
+ "default": "true",
40340
+ "inheritedFrom": {
40341
+ "name": "FormAssociated",
40342
+ "module": "src/utilities/form-associated-mixin.ts"
40343
+ }
40344
+ },
40345
+ {
40346
+ "kind": "field",
40347
+ "name": "internals",
40348
+ "readonly": true,
40349
+ "inheritedFrom": {
40350
+ "name": "FormAssociated",
40351
+ "module": "src/utilities/form-associated-mixin.ts"
40352
+ }
40353
+ },
40354
+ {
40355
+ "kind": "method",
40356
+ "name": "formState",
40357
+ "return": {
40358
+ "type": {
40359
+ "text": "FormValue | undefined"
40360
+ }
40361
+ },
40362
+ "description": "Extra state kept for bfcache and state restore, when the submitted\nvalue alone cannot rebuild the control (a combo box submits a code but\nshows a label). Override alongside `formValue()`.",
40363
+ "inheritedFrom": {
40364
+ "name": "FormAssociated",
40365
+ "module": "src/utilities/form-associated-mixin.ts"
40366
+ }
40367
+ },
40368
+ {
40369
+ "kind": "method",
40370
+ "name": "commitFormValue",
40371
+ "return": {
40372
+ "type": {
40373
+ "text": "void"
40374
+ }
40375
+ },
40376
+ "description": "Commit the value now, from the handler that changed it.",
40377
+ "inheritedFrom": {
40378
+ "name": "FormAssociated",
40379
+ "module": "src/utilities/form-associated-mixin.ts"
40380
+ }
40381
+ },
40382
+ {
40383
+ "kind": "method",
40384
+ "name": "validationTarget",
40385
+ "return": {
40386
+ "type": {
40387
+ "text": "HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | null"
40388
+ }
40389
+ },
40390
+ "description": "The native control this host speaks for.\n\nThe constraint attributes are handed to a control inside the shadow\nroot, and that control is not a member of the form around the host: the\nform sees the host, the host sees the control, and without something\njoining them a `required` field submits empty. Override when the control\nis not the first one in the shadow root, or return null for a component\nthat has no native control to speak for.",
40391
+ "inheritedFrom": {
40392
+ "name": "FormAssociated",
40393
+ "module": "src/utilities/form-associated-mixin.ts"
40394
+ }
40395
+ },
40396
+ {
40397
+ "kind": "method",
40398
+ "name": "validationAnchor",
40399
+ "return": {
40400
+ "type": {
40401
+ "text": "HTMLElement | undefined"
40402
+ }
40403
+ },
40404
+ "description": "Where an invalid submit points its message and puts the focus.\n\nThe native control, where the user reads and fixes it. Not when that\ncontrol is hidden, as the radio that only carries `required` is: a radio\ninside an element that is itself the radio is a control inside a control,\nand a hidden element cannot hold the message. Then it goes on this\nelement. Override where neither is what the user should land on, such as\na group that has no focus of its own.",
40405
+ "inheritedFrom": {
40406
+ "name": "FormAssociated",
40407
+ "module": "src/utilities/form-associated-mixin.ts"
40408
+ }
40409
+ },
40410
+ {
40411
+ "kind": "method",
40412
+ "name": "setCustomValidity",
40413
+ "return": {
40414
+ "type": {
40415
+ "text": "void"
40416
+ }
40417
+ },
40418
+ "parameters": [
40419
+ {
40420
+ "name": "message",
40421
+ "type": {
40422
+ "text": "string"
40423
+ }
40424
+ }
40425
+ ],
40426
+ "description": "A reason the host is invalid that no attribute can express: a server that\nrefused the value, or an nldd-validation-list whose rule it fails. Kept\nbeside the native flags rather than replacing them, because\n`setValidity` writes the whole set at once and the two arrive from\ndifferent places at different times.",
40427
+ "inheritedFrom": {
40428
+ "name": "FormAssociated",
40429
+ "module": "src/utilities/form-associated-mixin.ts"
40430
+ }
40431
+ },
40432
+ {
40433
+ "kind": "method",
40434
+ "name": "commitValidity",
40435
+ "return": {
40436
+ "type": {
40437
+ "text": "void"
40438
+ }
40439
+ },
40440
+ "description": "Hands the control's verdict to the form, as the host's own.\n\nCalled on every render and from `commitFormValue`, so it follows the\nvalue for the same reason and with the same timing.",
40441
+ "inheritedFrom": {
40442
+ "name": "FormAssociated",
40443
+ "module": "src/utilities/form-associated-mixin.ts"
40444
+ }
40445
+ },
40446
+ {
40447
+ "kind": "field",
40448
+ "name": "_customValidity",
40449
+ "type": {
40450
+ "text": "string"
40451
+ },
40452
+ "privacy": "private",
40453
+ "default": "''",
40454
+ "inheritedFrom": {
40455
+ "name": "FormAssociated",
40456
+ "module": "src/utilities/form-associated-mixin.ts"
40457
+ }
40458
+ },
40459
+ {
40460
+ "kind": "method",
40461
+ "name": "formDisabledCallback",
40462
+ "return": {
40463
+ "type": {
40464
+ "text": "void"
40465
+ }
40466
+ },
40467
+ "parameters": [
40468
+ {
40469
+ "name": "disabled",
40470
+ "type": {
40471
+ "text": "boolean"
40472
+ }
40473
+ }
40474
+ ],
40475
+ "inheritedFrom": {
40476
+ "name": "FormAssociated",
40477
+ "module": "src/utilities/form-associated-mixin.ts"
40478
+ }
40479
+ }
40480
+ ],
40481
+ "events": [
40482
+ {
40483
+ "name": "input",
40484
+ "type": {
40485
+ "text": "CustomEvent"
40486
+ }
40487
+ },
40488
+ {
40489
+ "name": "change",
40490
+ "type": {
40491
+ "text": "CustomEvent"
40492
+ }
40493
+ }
40494
+ ],
40495
+ "attributes": [
40496
+ {
40497
+ "name": "value",
40498
+ "type": {
40499
+ "text": "string"
40500
+ },
40501
+ "default": "''",
40502
+ "fieldName": "value"
40503
+ },
40504
+ {
40505
+ "name": "input-id",
40506
+ "type": {
40507
+ "text": "string"
40508
+ },
40509
+ "default": "''",
40510
+ "fieldName": "inputId"
40511
+ },
40512
+ {
40513
+ "name": "placeholder",
40514
+ "type": {
40515
+ "text": "string"
40516
+ },
40517
+ "default": "''",
40518
+ "fieldName": "placeholder"
40519
+ },
40520
+ {
40521
+ "name": "disabled",
40522
+ "type": {
40523
+ "text": "boolean"
40524
+ },
40525
+ "default": "false",
40526
+ "fieldName": "disabled"
40527
+ },
40528
+ {
40529
+ "name": "name",
40530
+ "type": {
40531
+ "text": "string"
40532
+ },
40533
+ "default": "''",
40534
+ "fieldName": "name"
40535
+ },
40536
+ {
40537
+ "name": "readonly",
40538
+ "type": {
40539
+ "text": "boolean"
40540
+ },
40541
+ "default": "false",
40542
+ "fieldName": "readonly"
40543
+ },
40544
+ {
40545
+ "name": "required",
40546
+ "type": {
40547
+ "text": "boolean"
40548
+ },
40549
+ "default": "false",
40550
+ "fieldName": "required"
40551
+ },
40552
+ {
40553
+ "name": "rows",
40554
+ "type": {
40555
+ "text": "number"
40556
+ },
40557
+ "default": "6",
40558
+ "fieldName": "rows"
40559
+ },
40560
+ {
40561
+ "name": "accessible-label",
40562
+ "type": {
40563
+ "text": "string"
40564
+ },
40565
+ "default": "''",
40566
+ "fieldName": "accessibleLabel"
40567
+ },
40568
+ {
40569
+ "name": "invalid",
40570
+ "type": {
40571
+ "text": "boolean"
40572
+ },
40573
+ "default": "false",
40574
+ "description": "Marks the control as invalid.\n\nAnnounced and not drawn. What is wrong belongs in an\nnldd-validation-list, in words: a red ring around a single\ncheckbox or radio would say the option is wrong, while it is the question\nthat is unanswered. `aria-invalid` still goes on the control, because\nchoosing not to show something is not a reason to keep quiet about it.",
40575
+ "fieldName": "invalid"
40576
+ }
40577
+ ],
40578
+ "mixins": [
40579
+ {
40580
+ "name": "DescribedBy",
40581
+ "module": "/src/utilities/described-by-mixin.js"
40582
+ },
40583
+ {
40584
+ "name": "FormAssociated",
40585
+ "module": "/src/utilities/form-associated-mixin.js"
40586
+ }
40587
+ ],
40588
+ "superclass": {
40589
+ "name": "NLDDCodeMirrorElement",
40590
+ "module": "/src/utilities/codemirror/codemirror-element.js"
40591
+ }
40592
+ }
40593
+ ],
40594
+ "exports": [
40595
+ {
40596
+ "kind": "js",
40597
+ "name": "NLDDCodeMirrorInput",
40598
+ "declaration": {
40599
+ "name": "NLDDCodeMirrorInput",
40600
+ "module": "src/utilities/codemirror/codemirror-input.ts"
40601
+ }
40602
+ }
40603
+ ]
40604
+ },
39038
40605
  {
39039
40606
  "kind": "javascript-module",
39040
40607
  "path": "src/utilities/color-scheme-repaint.ts",