@nldd/design-system 0.8.80 → 0.8.82

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 (184) hide show
  1. package/custom-elements.json +704 -5
  2. package/dist/components/actions/menu/menu.d.ts +25 -2
  3. package/dist/components/actions/menu/menu.d.ts.map +1 -1
  4. package/dist/components/actions/menu/menu.js +31 -8
  5. package/dist/components/actions/menu/menu.js.map +1 -1
  6. package/dist/components/actions/menu/menu.template.d.ts +1 -1
  7. package/dist/components/actions/menu/menu.template.d.ts.map +1 -1
  8. package/dist/components/actions/menu/menu.template.js +7 -3
  9. package/dist/components/actions/menu/menu.template.js.map +1 -1
  10. package/dist/components/actions/toolbar/toolbar.d.ts +20 -0
  11. package/dist/components/actions/toolbar/toolbar.d.ts.map +1 -1
  12. package/dist/components/actions/toolbar/toolbar.js +54 -0
  13. package/dist/components/actions/toolbar/toolbar.js.map +1 -1
  14. package/dist/components/breakpoints-CkxsiRgH.js +10 -0
  15. package/dist/components/components.js +51975 -117
  16. package/dist/components/content/icon/icon-gallery-status.d.ts.map +1 -1
  17. package/dist/components/content/icon/icon-gallery-status.js +14 -4
  18. package/dist/components/content/icon/icon-gallery-status.js.map +1 -1
  19. package/dist/components/content/icon/icon-registry.d.ts.map +1 -1
  20. package/dist/components/content/icon/icon-registry.js +10 -2
  21. package/dist/components/content/icon/icon-registry.js.map +1 -1
  22. package/dist/components/decorate-BKn10QQi.js +9 -0
  23. package/dist/components/dist-BYVOPNHp.js +381 -0
  24. package/dist/components/dist-Bq4xc7Bm.js +624 -0
  25. package/dist/components/dist-C0PiB1dr.js +870 -0
  26. package/dist/components/dist-C400RcFU.js +1498 -0
  27. package/dist/components/dist-CCg5Mso_.js +390 -0
  28. package/dist/components/dist-CJR_Rwhh.js +464 -0
  29. package/dist/components/dist-Ccw7ZfsU.js +18481 -0
  30. package/dist/components/dist-OBifyiJS.js +887 -0
  31. package/dist/components/dist-TpIL8G4G.js +1480 -0
  32. package/dist/components/dist-afrAoubg.js +1181 -0
  33. package/dist/components/dist-bO14jlsr.js +78 -0
  34. package/dist/components/forms/form-field/form-field.d.ts +59 -2
  35. package/dist/components/forms/form-field/form-field.d.ts.map +1 -1
  36. package/dist/components/forms/form-field/form-field.js +120 -35
  37. package/dist/components/forms/form-field/form-field.js.map +1 -1
  38. package/dist/components/gherkin-uCVRxsGf.js +108 -0
  39. package/dist/components/icon-CIpJq_cf.js +751 -0
  40. package/dist/components/icon-button-BAkUJTn6.js +1676 -0
  41. package/dist/components/input-modality-DhTeUxKi.js +43 -0
  42. package/dist/components/inputs/checkbox/checkbox.d.ts +8 -0
  43. package/dist/components/inputs/checkbox/checkbox.d.ts.map +1 -1
  44. package/dist/components/inputs/checkbox/checkbox.js +10 -0
  45. package/dist/components/inputs/checkbox/checkbox.js.map +1 -1
  46. package/dist/components/inputs/checkbox-field/checkbox-field.d.ts +9 -0
  47. package/dist/components/inputs/checkbox-field/checkbox-field.d.ts.map +1 -1
  48. package/dist/components/inputs/checkbox-field/checkbox-field.js +11 -0
  49. package/dist/components/inputs/checkbox-field/checkbox-field.js.map +1 -1
  50. package/dist/components/inputs/code-editor/code-editor.d.ts +3 -0
  51. package/dist/components/inputs/code-editor/code-editor.d.ts.map +1 -1
  52. package/dist/components/inputs/code-editor/code-editor.js +3 -0
  53. package/dist/components/inputs/code-editor/code-editor.js.map +1 -1
  54. package/dist/components/inputs/combo-box/combo-box.d.ts +6 -0
  55. package/dist/components/inputs/combo-box/combo-box.d.ts.map +1 -1
  56. package/dist/components/inputs/combo-box/combo-box.js +14 -0
  57. package/dist/components/inputs/combo-box/combo-box.js.map +1 -1
  58. package/dist/components/inputs/date-field/date-field.d.ts +6 -0
  59. package/dist/components/inputs/date-field/date-field.d.ts.map +1 -1
  60. package/dist/components/inputs/date-field/date-field.js +11 -0
  61. package/dist/components/inputs/date-field/date-field.js.map +1 -1
  62. package/dist/components/inputs/date-picker/date-picker.d.ts +3 -0
  63. package/dist/components/inputs/date-picker/date-picker.d.ts.map +1 -1
  64. package/dist/components/inputs/date-picker/date-picker.js +4 -1
  65. package/dist/components/inputs/date-picker/date-picker.js.map +1 -1
  66. package/dist/components/inputs/dropdown/dropdown.d.ts +29 -0
  67. package/dist/components/inputs/dropdown/dropdown.d.ts.map +1 -1
  68. package/dist/components/inputs/dropdown/dropdown.js +44 -1
  69. package/dist/components/inputs/dropdown/dropdown.js.map +1 -1
  70. package/dist/components/inputs/file-field/file-field.d.ts +3 -0
  71. package/dist/components/inputs/file-field/file-field.d.ts.map +1 -1
  72. package/dist/components/inputs/file-field/file-field.js +3 -0
  73. package/dist/components/inputs/file-field/file-field.js.map +1 -1
  74. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.d.ts +3 -0
  75. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.d.ts.map +1 -1
  76. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.js +3 -0
  77. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.js.map +1 -1
  78. package/dist/components/inputs/number-field/number-field.d.ts +9 -0
  79. package/dist/components/inputs/number-field/number-field.d.ts.map +1 -1
  80. package/dist/components/inputs/number-field/number-field.js +12 -0
  81. package/dist/components/inputs/number-field/number-field.js.map +1 -1
  82. package/dist/components/inputs/number-field/number-field.template.d.ts.map +1 -1
  83. package/dist/components/inputs/number-field/number-field.template.js +1 -0
  84. package/dist/components/inputs/number-field/number-field.template.js.map +1 -1
  85. package/dist/components/inputs/password-field/password-field.d.ts +9 -0
  86. package/dist/components/inputs/password-field/password-field.d.ts.map +1 -1
  87. package/dist/components/inputs/password-field/password-field.js +12 -0
  88. package/dist/components/inputs/password-field/password-field.js.map +1 -1
  89. package/dist/components/inputs/password-field/password-field.template.d.ts.map +1 -1
  90. package/dist/components/inputs/password-field/password-field.template.js +1 -0
  91. package/dist/components/inputs/password-field/password-field.template.js.map +1 -1
  92. package/dist/components/inputs/radio-button/radio-button.d.ts +8 -0
  93. package/dist/components/inputs/radio-button/radio-button.d.ts.map +1 -1
  94. package/dist/components/inputs/radio-button/radio-button.js +10 -0
  95. package/dist/components/inputs/radio-button/radio-button.js.map +1 -1
  96. package/dist/components/inputs/radio-button-field/radio-button-field.d.ts +9 -0
  97. package/dist/components/inputs/radio-button-field/radio-button-field.d.ts.map +1 -1
  98. package/dist/components/inputs/radio-button-field/radio-button-field.js +11 -0
  99. package/dist/components/inputs/radio-button-field/radio-button-field.js.map +1 -1
  100. package/dist/components/inputs/radio-button-group/radio-button-group.d.ts +16 -0
  101. package/dist/components/inputs/radio-button-group/radio-button-group.d.ts.map +1 -1
  102. package/dist/components/inputs/radio-button-group/radio-button-group.js +33 -0
  103. package/dist/components/inputs/radio-button-group/radio-button-group.js.map +1 -1
  104. package/dist/components/inputs/search-field/search-field.d.ts +6 -0
  105. package/dist/components/inputs/search-field/search-field.d.ts.map +1 -1
  106. package/dist/components/inputs/search-field/search-field.js +6 -0
  107. package/dist/components/inputs/search-field/search-field.js.map +1 -1
  108. package/dist/components/inputs/segmented-control/segmented-control.d.ts +16 -0
  109. package/dist/components/inputs/segmented-control/segmented-control.d.ts.map +1 -1
  110. package/dist/components/inputs/segmented-control/segmented-control.js +26 -7
  111. package/dist/components/inputs/segmented-control/segmented-control.js.map +1 -1
  112. package/dist/components/inputs/stepper/stepper.d.ts +17 -0
  113. package/dist/components/inputs/stepper/stepper.d.ts.map +1 -1
  114. package/dist/components/inputs/stepper/stepper.js +22 -0
  115. package/dist/components/inputs/stepper/stepper.js.map +1 -1
  116. package/dist/components/inputs/stepper/stepper.template.js +1 -1
  117. package/dist/components/inputs/stepper/stepper.template.js.map +1 -1
  118. package/dist/components/inputs/switch/switch.d.ts +3 -0
  119. package/dist/components/inputs/switch/switch.d.ts.map +1 -1
  120. package/dist/components/inputs/switch/switch.js +3 -0
  121. package/dist/components/inputs/switch/switch.js.map +1 -1
  122. package/dist/components/inputs/switch-field/switch-field.d.ts +3 -0
  123. package/dist/components/inputs/switch-field/switch-field.d.ts.map +1 -1
  124. package/dist/components/inputs/switch-field/switch-field.js +3 -0
  125. package/dist/components/inputs/switch-field/switch-field.js.map +1 -1
  126. package/dist/components/inputs/text-editor/text-editor.d.ts +3 -0
  127. package/dist/components/inputs/text-editor/text-editor.d.ts.map +1 -1
  128. package/dist/components/inputs/text-editor/text-editor.js +4 -1
  129. package/dist/components/inputs/text-editor/text-editor.js.map +1 -1
  130. package/dist/components/inputs/text-field/text-field.d.ts +9 -0
  131. package/dist/components/inputs/text-field/text-field.d.ts.map +1 -1
  132. package/dist/components/inputs/text-field/text-field.js +12 -0
  133. package/dist/components/inputs/text-field/text-field.js.map +1 -1
  134. package/dist/components/inputs/text-field/text-field.template.d.ts.map +1 -1
  135. package/dist/components/inputs/text-field/text-field.template.js +1 -0
  136. package/dist/components/inputs/text-field/text-field.template.js.map +1 -1
  137. package/dist/components/inputs/time-field/time-field.d.ts +6 -0
  138. package/dist/components/inputs/time-field/time-field.d.ts.map +1 -1
  139. package/dist/components/inputs/time-field/time-field.js +11 -0
  140. package/dist/components/inputs/time-field/time-field.js.map +1 -1
  141. package/dist/components/inputs/time-picker/time-picker.d.ts +3 -0
  142. package/dist/components/inputs/time-picker/time-picker.d.ts.map +1 -1
  143. package/dist/components/inputs/time-picker/time-picker.js +4 -1
  144. package/dist/components/inputs/time-picker/time-picker.js.map +1 -1
  145. package/dist/components/inputs/toggle-button/toggle-button.d.ts +10 -0
  146. package/dist/components/inputs/toggle-button/toggle-button.d.ts.map +1 -1
  147. package/dist/components/inputs/toggle-button/toggle-button.js +14 -0
  148. package/dist/components/inputs/toggle-button/toggle-button.js.map +1 -1
  149. package/dist/components/inputs/toggle-button-group/toggle-button-group.d.ts +11 -0
  150. package/dist/components/inputs/toggle-button-group/toggle-button-group.d.ts.map +1 -1
  151. package/dist/components/inputs/toggle-button-group/toggle-button-group.js +16 -6
  152. package/dist/components/inputs/toggle-button-group/toggle-button-group.js.map +1 -1
  153. package/dist/components/inputs/token-field/token-field.d.ts +6 -0
  154. package/dist/components/inputs/token-field/token-field.d.ts.map +1 -1
  155. package/dist/components/inputs/token-field/token-field.js +13 -0
  156. package/dist/components/inputs/token-field/token-field.js.map +1 -1
  157. package/dist/components/reflect-non-default-OLaK60rT.js +37 -0
  158. package/dist/components/rolldown-runtime-D7D4PA-g.js +13 -0
  159. package/dist/components/shadow-resets-aG-rgyNQ.js +61 -0
  160. package/dist/components/shell-C61GCsJA.js +223 -0
  161. package/dist/components/toml-C2HBbPgG.js +59 -0
  162. package/dist/components/visibility-mixin-GxbwkBb1.js +104 -0
  163. package/dist/components/with-translations-DzAdFTK8.js +48 -0
  164. package/dist/nldd.min.js +2284 -2251
  165. package/dist/types/vue.d.ts +13 -1
  166. package/dist/utilities/implicit-submission.d.ts +31 -0
  167. package/dist/utilities/implicit-submission.d.ts.map +1 -0
  168. package/dist/utilities/implicit-submission.js +65 -0
  169. package/dist/utilities/implicit-submission.js.map +1 -0
  170. package/dist/utilities/owned-attribute.d.ts +19 -0
  171. package/dist/utilities/owned-attribute.d.ts.map +1 -0
  172. package/dist/utilities/owned-attribute.js +32 -0
  173. package/dist/utilities/owned-attribute.js.map +1 -0
  174. package/package.json +3 -3
  175. package/dist/components/gherkin-DhZlEZiy.js +0 -115
  176. package/dist/components/index-8pDDdMeW.js +0 -384
  177. package/dist/components/index-C7QocEcT.js +0 -81
  178. package/dist/components/index-CDz7-C9c.js +0 -177
  179. package/dist/components/index-CWQunWUb.js +0 -75039
  180. package/dist/components/index-CoY3JfIy.js +0 -688
  181. package/dist/components/index-DP9dl7P7.js +0 -703
  182. package/dist/components/index-DV_2YpaH.js +0 -405
  183. package/dist/components/shell-BlsXDxCn.js +0 -222
  184. package/dist/components/toml-BOuWGMcf.js +0 -76
@@ -1,384 +0,0 @@
1
- import { L as LRParser, E as ExternalTokenizer, C as ContextTracker, s as styleTags, t as tags, a as LanguageSupport, g as EditorView, h as syntaxTree, j as EditorSelection, b as LRLanguage, i as indentNodeProp, f as foldNodeProp, k as bracketMatchingHandle } from "./index-CWQunWUb.js";
2
- const StartTag = 1, StartCloseTag = 2, MissingCloseTag = 3, mismatchedStartCloseTag = 4, incompleteStartCloseTag = 5, commentContent$1 = 36, piContent$1 = 37, cdataContent$1 = 38, Element$1 = 11, OpenTag = 13;
3
- function nameChar(ch) {
4
- return ch == 45 || ch == 46 || ch == 58 || ch >= 65 && ch <= 90 || ch == 95 || ch >= 97 && ch <= 122 || ch >= 161;
5
- }
6
- function isSpace(ch) {
7
- return ch == 9 || ch == 10 || ch == 13 || ch == 32;
8
- }
9
- let cachedName = null, cachedInput = null, cachedPos = 0;
10
- function tagNameAfter(input, offset) {
11
- let pos = input.pos + offset;
12
- if (cachedInput == input && cachedPos == pos) return cachedName;
13
- while (isSpace(input.peek(offset))) offset++;
14
- let name = "";
15
- for (; ; ) {
16
- let next = input.peek(offset);
17
- if (!nameChar(next)) break;
18
- name += String.fromCharCode(next);
19
- offset++;
20
- }
21
- cachedInput = input;
22
- cachedPos = pos;
23
- return cachedName = name || null;
24
- }
25
- function ElementContext(name, parent) {
26
- this.name = name;
27
- this.parent = parent;
28
- }
29
- const elementContext = new ContextTracker({
30
- start: null,
31
- shift(context, term, stack, input) {
32
- return term == StartTag ? new ElementContext(tagNameAfter(input, 1) || "", context) : context;
33
- },
34
- reduce(context, term) {
35
- return term == Element$1 && context ? context.parent : context;
36
- },
37
- reuse(context, node, _stack, input) {
38
- let type = node.type.id;
39
- return type == StartTag || type == OpenTag ? new ElementContext(tagNameAfter(input, 1) || "", context) : context;
40
- },
41
- strict: false
42
- });
43
- const startTag = new ExternalTokenizer((input, stack) => {
44
- if (input.next != 60) return;
45
- input.advance();
46
- if (input.next == 47) {
47
- input.advance();
48
- let name = tagNameAfter(input, 0);
49
- if (!name) return input.acceptToken(incompleteStartCloseTag);
50
- if (stack.context && name == stack.context.name) return input.acceptToken(StartCloseTag);
51
- for (let cx = stack.context; cx; cx = cx.parent) if (cx.name == name) return input.acceptToken(MissingCloseTag, -2);
52
- input.acceptToken(mismatchedStartCloseTag);
53
- } else if (input.next != 33 && input.next != 63) {
54
- return input.acceptToken(StartTag);
55
- }
56
- }, { contextual: true });
57
- function scanTo(type, end) {
58
- return new ExternalTokenizer((input) => {
59
- let len = 0, first = end.charCodeAt(0);
60
- scan: for (; ; input.advance(), len++) {
61
- if (input.next < 0) break;
62
- if (input.next == first) {
63
- for (let i = 1; i < end.length; i++)
64
- if (input.peek(i) != end.charCodeAt(i)) continue scan;
65
- break;
66
- }
67
- }
68
- if (len) input.acceptToken(type);
69
- });
70
- }
71
- const commentContent = scanTo(commentContent$1, "-->");
72
- const piContent = scanTo(piContent$1, "?>");
73
- const cdataContent = scanTo(cdataContent$1, "]]>");
74
- const xmlHighlighting = styleTags({
75
- Text: tags.content,
76
- "StartTag StartCloseTag EndTag SelfCloseEndTag": tags.angleBracket,
77
- TagName: tags.tagName,
78
- "MismatchedCloseTag/TagName": [tags.tagName, tags.invalid],
79
- AttributeName: tags.attributeName,
80
- AttributeValue: tags.attributeValue,
81
- Is: tags.definitionOperator,
82
- "EntityReference CharacterReference": tags.character,
83
- Comment: tags.blockComment,
84
- ProcessingInst: tags.processingInstruction,
85
- DoctypeDecl: tags.documentMeta,
86
- Cdata: tags.special(tags.string)
87
- });
88
- const parser = LRParser.deserialize({
89
- version: 14,
90
- states: ",lOQOaOOOrOxO'#CfOzOpO'#CiO!tOaO'#CgOOOP'#Cg'#CgO!{OrO'#CrO#TOtO'#CsO#]OpO'#CtOOOP'#DT'#DTOOOP'#Cv'#CvQQOaOOOOOW'#Cw'#CwO#eOxO,59QOOOP,59Q,59QOOOO'#Cx'#CxO#mOpO,59TO#uO!bO,59TOOOP'#C|'#C|O$TOaO,59RO$[OpO'#CoOOOP,59R,59ROOOQ'#C}'#C}O$dOrO,59^OOOP,59^,59^OOOS'#DO'#DOO$lOtO,59_OOOP,59_,59_O$tOpO,59`O$|OpO,59`OOOP-E6t-E6tOOOW-E6u-E6uOOOP1G.l1G.lOOOO-E6v-E6vO%UO!bO1G.oO%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{!sO|!qO~OW!tOX!tO}!sO!O!tO~O[!vOz^O~OW!qOX!qO{!yO|!qO~OW!tOX!tO}!yO!O!tO~O",
92
- goto: "%cxPPPPPPPPPPyyP!PP!VPP!`!jP!pyyyP!v!|#S$[$k$q$w$}%TPPPP%ZXWORYbXRORYb_t`qru!T!U!bQ!i!YS!p!e!fR!w!oQdRRybXSORYbQYORmYQ[PRn[Q_QQkVjp_krz!R!T!X!Z!^!`!f!j!oQr`QzcQ!RlQ!TqQ!XsQ!ZtQ!^{Q!`!QQ!f!YQ!j!]R!o!eQu`S!UqrU![u!U!bR!b!TQ!r!gR!x!rQ!u!hR!z!uQbRRxbQfTR|fQiUR!OiSXOYTaRb",
93
- nodeNames: "⚠ StartTag StartCloseTag MissingCloseTag StartCloseTag StartCloseTag Document Text EntityReference CharacterReference Cdata Element EndTag OpenTag TagName Attribute AttributeName Is AttributeValue CloseTag SelfCloseEndTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag DoctypeDecl",
94
- maxTerm: 50,
95
- context: elementContext,
96
- nodeProps: [
97
- ["closedBy", 1, "SelfCloseEndTag EndTag", 13, "CloseTag MissingCloseTag"],
98
- ["openedBy", 12, "StartTag StartCloseTag", 19, "OpenTag", 20, "StartTag"],
99
- ["isolate", -6, 13, 18, 19, 21, 22, 24, ""]
100
- ],
101
- propSources: [xmlHighlighting],
102
- skippedNodes: [0],
103
- repeatNodeCount: 9,
104
- tokenData: "!)v~R!YOX$qXY)iYZ)iZ]$q]^)i^p$qpq)iqr$qrs*vsv$qvw+fwx/ix}$q}!O0[!O!P$q!P!Q2z!Q![$q![!]4n!]!^$q!^!_8U!_!`!#t!`!a!$l!a!b!%d!b!c$q!c!}4n!}#P$q#P#Q!'W#Q#R$q#R#S4n#S#T$q#T#o4n#o%W$q%W%o4n%o%p$q%p&a4n&a&b$q&b1p4n1p4U$q4U4d4n4d4e$q4e$IS4n$IS$I`$q$I`$Ib4n$Ib$Kh$q$Kh%#t4n%#t&/x$q&/x&Et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_;'S$q;'S;=`)c<%lO$q",
105
- tokenizers: [startTag, commentContent, piContent, cdataContent, 0, 1, 2, 3, 4],
106
- topRules: { "Document": [0, 6] },
107
- tokenPrec: 0
108
- });
109
- function tagName(doc, tag) {
110
- let name = tag && tag.getChild("TagName");
111
- return name ? doc.sliceString(name.from, name.to) : "";
112
- }
113
- function elementName$1(doc, tree) {
114
- let tag = tree && tree.firstChild;
115
- return !tag || tag.name != "OpenTag" ? "" : tagName(doc, tag);
116
- }
117
- function attrName(doc, tag, pos) {
118
- let attr = tag && tag.getChildren("Attribute").find((a) => a.from <= pos && a.to >= pos);
119
- let name = attr && attr.getChild("AttributeName");
120
- return name ? doc.sliceString(name.from, name.to) : "";
121
- }
122
- function findParentElement(tree) {
123
- for (let cur = tree && tree.parent; cur; cur = cur.parent)
124
- if (cur.name == "Element")
125
- return cur;
126
- return null;
127
- }
128
- function findLocation(state, pos) {
129
- var _a;
130
- let at = syntaxTree(state).resolveInner(pos, -1), inTag = null;
131
- for (let cur = at; !inTag && cur.parent; cur = cur.parent)
132
- if (cur.name == "OpenTag" || cur.name == "CloseTag" || cur.name == "SelfClosingTag" || cur.name == "MismatchedCloseTag")
133
- inTag = cur;
134
- if (inTag && (inTag.to > pos || inTag.lastChild.type.isError)) {
135
- let elt = inTag.parent;
136
- if (at.name == "TagName")
137
- return inTag.name == "CloseTag" || inTag.name == "MismatchedCloseTag" ? { type: "closeTag", from: at.from, context: elt } : { type: "openTag", from: at.from, context: findParentElement(elt) };
138
- if (at.name == "AttributeName")
139
- return { type: "attrName", from: at.from, context: inTag };
140
- if (at.name == "AttributeValue")
141
- return { type: "attrValue", from: at.from, context: inTag };
142
- let before = at == inTag || at.name == "Attribute" ? at.childBefore(pos) : at;
143
- if ((before === null || before === void 0 ? void 0 : before.name) == "StartTag")
144
- return { type: "openTag", from: pos, context: findParentElement(elt) };
145
- if ((before === null || before === void 0 ? void 0 : before.name) == "StartCloseTag" && before.to <= pos)
146
- return { type: "closeTag", from: pos, context: elt };
147
- if ((before === null || before === void 0 ? void 0 : before.name) == "Is")
148
- return { type: "attrValue", from: pos, context: inTag };
149
- if (before)
150
- return { type: "attrName", from: pos, context: inTag };
151
- return null;
152
- } else if (at.name == "StartCloseTag") {
153
- return { type: "closeTag", from: pos, context: at.parent };
154
- }
155
- while (at.parent && at.to == pos && !((_a = at.lastChild) === null || _a === void 0 ? void 0 : _a.type.isError))
156
- at = at.parent;
157
- if (at.name == "Element" || at.name == "Text" || at.name == "Document")
158
- return { type: "tag", from: pos, context: at.name == "Element" ? at : findParentElement(at) };
159
- return null;
160
- }
161
- class Element {
162
- constructor(spec, attrs, attrValues) {
163
- this.attrs = attrs;
164
- this.attrValues = attrValues;
165
- this.children = [];
166
- this.name = spec.name;
167
- this.completion = Object.assign(Object.assign({ type: "type" }, spec.completion || {}), { label: this.name });
168
- this.openCompletion = Object.assign(Object.assign({}, this.completion), { label: "<" + this.name });
169
- this.closeCompletion = Object.assign(Object.assign({}, this.completion), { label: "</" + this.name + ">", boost: 2 });
170
- this.closeNameCompletion = Object.assign(Object.assign({}, this.completion), { label: this.name + ">" });
171
- this.text = spec.textContent ? spec.textContent.map((s) => ({ label: s, type: "text" })) : [];
172
- }
173
- }
174
- const Identifier = /^[:\-\.\w\u00b7-\uffff]*$/;
175
- function attrCompletion(spec) {
176
- return Object.assign(Object.assign({ type: "property" }, spec.completion || {}), { label: spec.name });
177
- }
178
- function valueCompletion(spec) {
179
- return typeof spec == "string" ? { label: `"${spec}"`, type: "constant" } : /^"/.test(spec.label) ? spec : Object.assign(Object.assign({}, spec), { label: `"${spec.label}"` });
180
- }
181
- function completeFromSchema(eltSpecs, attrSpecs) {
182
- let allAttrs = [], globalAttrs = [];
183
- let attrValues = /* @__PURE__ */ Object.create(null);
184
- for (let s of attrSpecs) {
185
- let completion = attrCompletion(s);
186
- allAttrs.push(completion);
187
- if (s.global)
188
- globalAttrs.push(completion);
189
- if (s.values)
190
- attrValues[s.name] = s.values.map(valueCompletion);
191
- }
192
- let allElements = [], topElements = [];
193
- let byName = /* @__PURE__ */ Object.create(null);
194
- for (let s of eltSpecs) {
195
- let attrs = globalAttrs, attrVals = attrValues;
196
- if (s.attributes)
197
- attrs = attrs.concat(s.attributes.map((s2) => {
198
- if (typeof s2 == "string")
199
- return allAttrs.find((a) => a.label == s2) || { label: s2, type: "property" };
200
- if (s2.values) {
201
- if (attrVals == attrValues)
202
- attrVals = Object.create(attrVals);
203
- attrVals[s2.name] = s2.values.map(valueCompletion);
204
- }
205
- return attrCompletion(s2);
206
- }));
207
- let elt = new Element(s, attrs, attrVals);
208
- byName[elt.name] = elt;
209
- allElements.push(elt);
210
- if (s.top)
211
- topElements.push(elt);
212
- }
213
- if (!topElements.length)
214
- topElements = allElements;
215
- for (let i = 0; i < allElements.length; i++) {
216
- let s = eltSpecs[i], elt = allElements[i];
217
- if (s.children) {
218
- for (let ch of s.children)
219
- if (byName[ch])
220
- elt.children.push(byName[ch]);
221
- } else {
222
- elt.children = allElements;
223
- }
224
- }
225
- return (cx) => {
226
- var _a;
227
- let { doc } = cx.state, loc = findLocation(cx.state, cx.pos);
228
- if (!loc || loc.type == "tag" && !cx.explicit)
229
- return null;
230
- let { type, from, context } = loc;
231
- if (type == "openTag") {
232
- let children = topElements;
233
- let parentName = elementName$1(doc, context);
234
- if (parentName) {
235
- let parent = byName[parentName];
236
- children = (parent === null || parent === void 0 ? void 0 : parent.children) || allElements;
237
- }
238
- return {
239
- from,
240
- options: children.map((ch) => ch.completion),
241
- validFor: Identifier
242
- };
243
- } else if (type == "closeTag") {
244
- let parentName = elementName$1(doc, context);
245
- return parentName ? {
246
- from,
247
- to: cx.pos + (doc.sliceString(cx.pos, cx.pos + 1) == ">" ? 1 : 0),
248
- options: [((_a = byName[parentName]) === null || _a === void 0 ? void 0 : _a.closeNameCompletion) || { label: parentName + ">", type: "type" }],
249
- validFor: Identifier
250
- } : null;
251
- } else if (type == "attrName") {
252
- let parent = byName[tagName(doc, context)];
253
- return {
254
- from,
255
- options: (parent === null || parent === void 0 ? void 0 : parent.attrs) || globalAttrs,
256
- validFor: Identifier
257
- };
258
- } else if (type == "attrValue") {
259
- let attr = attrName(doc, context, from);
260
- if (!attr)
261
- return null;
262
- let parent = byName[tagName(doc, context)];
263
- let values = ((parent === null || parent === void 0 ? void 0 : parent.attrValues) || attrValues)[attr];
264
- if (!values || !values.length)
265
- return null;
266
- return {
267
- from,
268
- to: cx.pos + (doc.sliceString(cx.pos, cx.pos + 1) == '"' ? 1 : 0),
269
- options: values,
270
- validFor: /^"[^"]*"?$/
271
- };
272
- } else if (type == "tag") {
273
- let parentName = elementName$1(doc, context), parent = byName[parentName];
274
- let closing = [], last = context && context.lastChild;
275
- if (parentName && (!last || last.name != "CloseTag" || tagName(doc, last) != parentName))
276
- closing.push(parent ? parent.closeCompletion : { label: "</" + parentName + ">", type: "type", boost: 2 });
277
- let options = closing.concat(((parent === null || parent === void 0 ? void 0 : parent.children) || (context ? allElements : topElements)).map((e) => e.openCompletion));
278
- if (context && (parent === null || parent === void 0 ? void 0 : parent.text.length)) {
279
- let openTag = context.firstChild;
280
- if (openTag.to > cx.pos - 20 && !/\S/.test(cx.state.sliceDoc(openTag.to, cx.pos)))
281
- options = options.concat(parent.text);
282
- }
283
- return {
284
- from,
285
- options,
286
- validFor: /^<\/?[:\-\.\w\u00b7-\uffff]*$/
287
- };
288
- } else {
289
- return null;
290
- }
291
- };
292
- }
293
- const xmlLanguage = /* @__PURE__ */ LRLanguage.define({
294
- name: "xml",
295
- parser: /* @__PURE__ */ parser.configure({
296
- props: [
297
- /* @__PURE__ */ indentNodeProp.add({
298
- Element(context) {
299
- let closed = /^\s*<\//.test(context.textAfter);
300
- return context.lineIndent(context.node.from) + (closed ? 0 : context.unit);
301
- },
302
- "OpenTag CloseTag SelfClosingTag"(context) {
303
- return context.column(context.node.from) + context.unit;
304
- }
305
- }),
306
- /* @__PURE__ */ foldNodeProp.add({
307
- Element(subtree) {
308
- let first = subtree.firstChild, last = subtree.lastChild;
309
- if (!first || first.name != "OpenTag")
310
- return null;
311
- return { from: first.to, to: last.name == "CloseTag" ? last.from : subtree.to };
312
- }
313
- }),
314
- /* @__PURE__ */ bracketMatchingHandle.add({
315
- "OpenTag CloseTag": (node) => node.getChild("TagName")
316
- })
317
- ]
318
- }),
319
- languageData: {
320
- commentTokens: { block: { open: "<!--", close: "-->" } },
321
- indentOnInput: /^\s*<\/$/
322
- }
323
- });
324
- function xml(conf = {}) {
325
- let support = [xmlLanguage.data.of({
326
- autocomplete: completeFromSchema(conf.elements || [], conf.attributes || [])
327
- })];
328
- if (conf.autoCloseTags !== false)
329
- support.push(autoCloseTags);
330
- return new LanguageSupport(xmlLanguage, support);
331
- }
332
- function elementName(doc, tree, max = doc.length) {
333
- if (!tree)
334
- return "";
335
- let tag = tree.firstChild;
336
- let name = tag && tag.getChild("TagName");
337
- return name ? doc.sliceString(name.from, Math.min(name.to, max)) : "";
338
- }
339
- const autoCloseTags = /* @__PURE__ */ EditorView.inputHandler.of((view, from, to, text, insertTransaction) => {
340
- if (view.composing || view.state.readOnly || from != to || text != ">" && text != "/" || !xmlLanguage.isActiveAt(view.state, from, -1))
341
- return false;
342
- let base = insertTransaction(), { state } = base;
343
- let closeTags = state.changeByRange((range) => {
344
- var _a, _b, _c;
345
- let { head } = range;
346
- let didType = state.doc.sliceString(head - 1, head) == text;
347
- let after = syntaxTree(state).resolveInner(head, -1), name;
348
- if (didType && text == ">" && after.name == "EndTag") {
349
- let tag = after.parent;
350
- if (((_b = (_a = tag.parent) === null || _a === void 0 ? void 0 : _a.lastChild) === null || _b === void 0 ? void 0 : _b.name) != "CloseTag" && (name = elementName(state.doc, tag.parent, head))) {
351
- let to2 = head + (state.doc.sliceString(head, head + 1) === ">" ? 1 : 0);
352
- let insert = `</${name}>`;
353
- return { range, changes: { from: head, to: to2, insert } };
354
- }
355
- } else if (didType && text == "/" && after.name == "StartCloseTag") {
356
- let base2 = after.parent;
357
- if (after.from == head - 2 && ((_c = base2.lastChild) === null || _c === void 0 ? void 0 : _c.name) != "CloseTag" && (name = elementName(state.doc, base2, head))) {
358
- let to2 = head + (state.doc.sliceString(head, head + 1) === ">" ? 1 : 0);
359
- let insert = `${name}>`;
360
- return {
361
- range: EditorSelection.cursor(head + insert.length, -1),
362
- changes: { from: head, to: to2, insert }
363
- };
364
- }
365
- }
366
- return { range };
367
- });
368
- if (closeTags.changes.empty)
369
- return false;
370
- view.dispatch([
371
- base,
372
- state.update(closeTags, {
373
- userEvent: "input.complete",
374
- scrollIntoView: true
375
- })
376
- ]);
377
- return true;
378
- });
379
- export {
380
- autoCloseTags,
381
- completeFromSchema,
382
- xml,
383
- xmlLanguage
384
- };
@@ -1,81 +0,0 @@
1
- import { L as LRParser, s as styleTags, t as tags, a as LanguageSupport, b as LRLanguage, i as indentNodeProp, c as continuedIndent, f as foldNodeProp, d as foldInside } from "./index-CWQunWUb.js";
2
- const jsonHighlighting = styleTags({
3
- String: tags.string,
4
- Number: tags.number,
5
- "True False": tags.bool,
6
- PropertyName: tags.propertyName,
7
- Null: tags.null,
8
- ", :": tags.separator,
9
- "[ ]": tags.squareBracket,
10
- "{ }": tags.brace
11
- });
12
- const parser = LRParser.deserialize({
13
- version: 14,
14
- states: "$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",
15
- stateData: "#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",
16
- goto: "!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",
17
- nodeNames: "⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",
18
- maxTerm: 25,
19
- nodeProps: [
20
- ["isolate", -2, 6, 11, ""],
21
- ["openedBy", 7, "{", 14, "["],
22
- ["closedBy", 8, "}", 15, "]"]
23
- ],
24
- propSources: [jsonHighlighting],
25
- skippedNodes: [0],
26
- repeatNodeCount: 2,
27
- tokenData: "(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",
28
- tokenizers: [0],
29
- topRules: { "JsonText": [0, 1] },
30
- tokenPrec: 0
31
- });
32
- const jsonParseLinter = () => (view) => {
33
- try {
34
- JSON.parse(view.state.doc.toString());
35
- } catch (e) {
36
- if (!(e instanceof SyntaxError))
37
- throw e;
38
- const pos = getErrorPosition(e, view.state.doc);
39
- return [{
40
- from: pos,
41
- message: e.message,
42
- severity: "error",
43
- to: pos
44
- }];
45
- }
46
- return [];
47
- };
48
- function getErrorPosition(error, doc) {
49
- let m;
50
- if (m = error.message.match(/at position (\d+)/))
51
- return Math.min(+m[1], doc.length);
52
- if (m = error.message.match(/at line (\d+) column (\d+)/))
53
- return Math.min(doc.line(+m[1]).from + +m[2] - 1, doc.length);
54
- return 0;
55
- }
56
- const jsonLanguage = /* @__PURE__ */ LRLanguage.define({
57
- name: "json",
58
- parser: /* @__PURE__ */ parser.configure({
59
- props: [
60
- /* @__PURE__ */ indentNodeProp.add({
61
- Object: /* @__PURE__ */ continuedIndent({ except: /^\s*\}/ }),
62
- Array: /* @__PURE__ */ continuedIndent({ except: /^\s*\]/ })
63
- }),
64
- /* @__PURE__ */ foldNodeProp.add({
65
- "Object Array": foldInside
66
- })
67
- ]
68
- }),
69
- languageData: {
70
- closeBrackets: { brackets: ["[", "{", '"'] },
71
- indentOnInput: /^\s*[\}\]]$/
72
- }
73
- });
74
- function json() {
75
- return new LanguageSupport(jsonLanguage);
76
- }
77
- export {
78
- json,
79
- jsonLanguage,
80
- jsonParseLinter
81
- };