@drjoshcsimmons/scl 0.1.0 → 0.1.2

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 (195) hide show
  1. package/dist/components/ui/alert/alert.d.ts +1 -1
  2. package/dist/components/ui/alert/alert.d.ts.map +1 -1
  3. package/dist/components/ui/badge/badge.d.ts +1 -1
  4. package/dist/components/ui/badge/badge.d.ts.map +1 -1
  5. package/dist/components/ui/button/button.d.ts +1 -1
  6. package/dist/components/ui/button/button.d.ts.map +1 -1
  7. package/dist/components/ui/combobox/combobox.d.ts +31 -0
  8. package/dist/components/ui/combobox/combobox.d.ts.map +1 -0
  9. package/dist/components/ui/combobox/index.d.ts +3 -0
  10. package/dist/components/ui/combobox/index.d.ts.map +1 -0
  11. package/dist/components/ui/command/command.d.ts +85 -0
  12. package/dist/components/ui/command/command.d.ts.map +1 -0
  13. package/dist/components/ui/command/index.d.ts +2 -0
  14. package/dist/components/ui/command/index.d.ts.map +1 -0
  15. package/dist/components/ui/dithered-image/dithered-image.d.ts +6 -2
  16. package/dist/components/ui/dithered-image/dithered-image.d.ts.map +1 -1
  17. package/dist/components/ui/dithered-image/index.d.ts +1 -1
  18. package/dist/components/ui/dithered-image/index.d.ts.map +1 -1
  19. package/dist/components/ui/form/form.d.ts +24 -0
  20. package/dist/components/ui/form/form.d.ts.map +1 -0
  21. package/dist/components/ui/form/index.d.ts +2 -0
  22. package/dist/components/ui/form/index.d.ts.map +1 -0
  23. package/dist/components/ui/progress/progress.d.ts +0 -6
  24. package/dist/components/ui/progress/progress.d.ts.map +1 -1
  25. package/dist/components/ui/scroll-area/scroll-area.d.ts.map +1 -1
  26. package/dist/components/ui/skeleton/skeleton.d.ts +4 -1
  27. package/dist/components/ui/skeleton/skeleton.d.ts.map +1 -1
  28. package/dist/components/ui/statusline/statusline.d.ts.map +1 -1
  29. package/dist/components/ui/terminal-textarea/terminal-textarea.d.ts +0 -5
  30. package/dist/components/ui/terminal-textarea/terminal-textarea.d.ts.map +1 -1
  31. package/dist/index.d.ts +3 -0
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +166 -143
  34. package/dist/index10.js +30 -30
  35. package/dist/index100.js +218 -29
  36. package/dist/index101.js +646 -11
  37. package/dist/index102.js +173 -127
  38. package/dist/index103.js +4 -50
  39. package/dist/index104.js +30 -9
  40. package/dist/index105.js +6 -4
  41. package/dist/index106.js +11 -180
  42. package/dist/index107.js +19 -648
  43. package/dist/index108.js +9 -107
  44. package/dist/index109.js +38 -91
  45. package/dist/index11.js +13 -13
  46. package/dist/index110.js +18 -67
  47. package/dist/index111.js +201 -154
  48. package/dist/index112.js +20 -395
  49. package/dist/index113.js +395 -1675
  50. package/dist/index114.js +2 -278
  51. package/dist/index115.js +49 -128
  52. package/dist/index116.js +65 -32
  53. package/dist/index117.js +19 -1605
  54. package/dist/index118.js +28 -297
  55. package/dist/index119.js +5 -635
  56. package/dist/index12.js +1 -1
  57. package/dist/index120.js +2 -144
  58. package/dist/index121.js +2 -21
  59. package/dist/index122.js +5 -9
  60. package/dist/index123.js +3 -38
  61. package/dist/index124.js +24 -18
  62. package/dist/index125.js +113 -6
  63. package/dist/index126.js +15 -11
  64. package/dist/index127.js +513 -194
  65. package/dist/index128.js +128 -22
  66. package/dist/index129.js +114 -380
  67. package/dist/index13.js +132 -93
  68. package/dist/index130.js +59 -1300
  69. package/dist/index131.js +63 -612
  70. package/dist/index132.js +9 -2
  71. package/dist/index133.js +13 -52
  72. package/dist/index134.js +64 -63
  73. package/dist/index135.js +3 -24
  74. package/dist/index136.js +23 -29
  75. package/dist/index137.js +23 -5
  76. package/dist/index138.js +13 -2
  77. package/dist/index139.js +28 -2
  78. package/dist/index14.js +106 -220
  79. package/dist/index140.js +5 -5
  80. package/dist/index15.js +79 -125
  81. package/dist/index16.js +280 -17
  82. package/dist/index17.js +139 -12
  83. package/dist/index18.js +92 -22
  84. package/dist/index19.js +18 -55
  85. package/dist/index2.js +2 -2
  86. package/dist/index20.js +14 -26
  87. package/dist/index21.js +19 -33
  88. package/dist/index22.js +38 -121
  89. package/dist/index23.js +29 -22
  90. package/dist/index24.js +31 -64
  91. package/dist/index25.js +121 -15
  92. package/dist/index26.js +19 -29
  93. package/dist/index27.js +68 -77
  94. package/dist/index28.js +20 -25
  95. package/dist/index29.js +32 -88
  96. package/dist/index3.js +11 -9
  97. package/dist/index30.js +138 -38
  98. package/dist/index31.js +20 -227
  99. package/dist/index32.js +88 -18
  100. package/dist/index33.js +37 -28
  101. package/dist/index34.js +86 -22
  102. package/dist/index35.js +17 -102
  103. package/dist/index36.js +34 -65
  104. package/dist/index37.js +23 -49
  105. package/dist/index38.js +38 -99
  106. package/dist/index39.js +65 -10
  107. package/dist/index4.js +6 -6
  108. package/dist/index40.js +49 -15
  109. package/dist/index41.js +93 -2256
  110. package/dist/index42.js +10 -32
  111. package/dist/index43.js +15 -18
  112. package/dist/index44.js +2251 -225
  113. package/dist/index45.js +237 -11
  114. package/dist/index46.js +11 -73
  115. package/dist/index47.js +33 -249
  116. package/dist/index48.js +118 -9
  117. package/dist/index49.js +63 -326
  118. package/dist/index5.js +23 -23
  119. package/dist/index50.js +307 -57
  120. package/dist/index51.js +12 -241
  121. package/dist/index52.js +222 -822
  122. package/dist/index53.js +6 -3
  123. package/dist/index54.js +56 -114
  124. package/dist/index55.js +248 -219
  125. package/dist/index56.js +249 -11
  126. package/dist/index57.js +3 -5
  127. package/dist/index58.js +110 -221
  128. package/dist/index59.js +12 -260
  129. package/dist/index6.js +12 -12
  130. package/dist/index60.js +18 -12
  131. package/dist/index61.js +221 -18
  132. package/dist/index62.js +11 -530
  133. package/dist/index63.js +11 -6155
  134. package/dist/index64.js +234 -2626
  135. package/dist/index65.js +230 -292
  136. package/dist/index66.js +504 -646
  137. package/dist/index67.js +155 -824
  138. package/dist/index68.js +128 -23
  139. package/dist/index69.js +319 -311
  140. package/dist/index7.js +22 -22
  141. package/dist/index70.js +72 -4889
  142. package/dist/index71.js +408 -802
  143. package/dist/index72.js +18 -1254
  144. package/dist/index73.js +844 -518
  145. package/dist/index74.js +9 -125
  146. package/dist/index75.js +31 -161
  147. package/dist/index76.js +7 -31
  148. package/dist/index77.js +62 -429
  149. package/dist/index78.js +50 -128
  150. package/dist/index79.js +4 -81
  151. package/dist/index8.js +17 -18
  152. package/dist/index80.js +23 -64
  153. package/dist/index81.js +33 -45
  154. package/dist/index82.js +63 -21
  155. package/dist/index83.js +10 -6
  156. package/dist/index84.js +52 -49
  157. package/dist/index85.js +10 -33
  158. package/dist/index86.js +30 -11
  159. package/dist/index87.js +12 -7
  160. package/dist/index88.js +46 -30
  161. package/dist/index89.js +7 -54
  162. package/dist/index9.js +23 -31
  163. package/dist/index90.js +14 -10
  164. package/dist/index91.js +125 -4
  165. package/dist/index92.js +131 -9
  166. package/dist/index93.js +14 -6
  167. package/dist/index94.js +14 -24
  168. package/dist/index95.js +9 -69
  169. package/dist/index96.js +47 -122
  170. package/dist/index97.js +51 -216
  171. package/dist/index98.js +6 -14
  172. package/dist/index99.js +24 -53
  173. package/dist/tokens/colors.d.ts +26 -86
  174. package/dist/tokens/colors.d.ts.map +1 -1
  175. package/dist/tokens/index.d.ts +12 -84
  176. package/dist/tokens/index.d.ts.map +1 -1
  177. package/package.json +28 -23
  178. package/dist/index141.js +0 -5
  179. package/dist/index142.js +0 -26
  180. package/dist/index143.js +0 -115
  181. package/dist/index144.js +0 -18
  182. package/dist/index145.js +0 -527
  183. package/dist/index146.js +0 -130
  184. package/dist/index147.js +0 -136
  185. package/dist/index148.js +0 -67
  186. package/dist/index149.js +0 -71
  187. package/dist/index150.js +0 -11
  188. package/dist/index151.js +0 -16
  189. package/dist/index152.js +0 -68
  190. package/dist/index153.js +0 -6
  191. package/dist/index154.js +0 -25
  192. package/dist/index155.js +0 -25
  193. package/dist/index156.js +0 -15
  194. package/dist/index157.js +0 -30
  195. package/dist/index158.js +0 -7
package/dist/index112.js CHANGED
@@ -1,399 +1,24 @@
1
- import { Annotation as T, Transaction as L, Text as A, StateEffect as x, StateField as D, Prec as O, EditorSelection as k, Facet as P, MapMode as v, RangeValue as M } from "./index64.js";
2
- import { EditorView as w, Decoration as g, keymap as B, WidgetType as R } from "./index63.js";
3
- import { syntaxTree as $, indentUnit as j } from "./index72.js";
4
- class oe {
5
- /**
6
- Create a new completion context. (Mostly useful for testing
7
- completion sources—in the editor, the extension will create
8
- these for you.)
9
- */
10
- constructor(t, e, n, i) {
11
- this.state = t, this.pos = e, this.explicit = n, this.view = i, this.abortListeners = [], this.abortOnDocChange = !1;
12
- }
13
- /**
14
- Get the extent, content, and (if there is a token) type of the
15
- token before `this.pos`.
16
- */
17
- tokenBefore(t) {
18
- let e = $(this.state).resolveInner(this.pos, -1);
19
- for (; e && t.indexOf(e.name) < 0; )
20
- e = e.parent;
21
- return e ? {
22
- from: e.from,
23
- to: this.pos,
24
- text: this.state.sliceDoc(e.from, this.pos),
25
- type: e.type
26
- } : null;
27
- }
28
- /**
29
- Get the match of the given expression directly before the
30
- cursor.
31
- */
32
- matchBefore(t) {
33
- let e = this.state.doc.lineAt(this.pos), n = Math.max(e.from, this.pos - 250), i = e.text.slice(n - e.from, this.pos - e.from), l = i.search(W(t));
34
- return l < 0 ? null : { from: n + l, to: this.pos, text: i.slice(l) };
35
- }
36
- /**
37
- Yields true when the query has been aborted. Can be useful in
38
- asynchronous queries to avoid doing work that will be ignored.
39
- */
40
- get aborted() {
41
- return this.abortListeners == null;
42
- }
43
- /**
44
- Allows you to register abort handlers, which will be called when
45
- the query is
46
- [aborted](https://codemirror.net/6/docs/ref/#autocomplete.CompletionContext.aborted).
47
-
48
- By default, running queries will not be aborted for regular
49
- typing or backspacing, on the assumption that they are likely to
50
- return a result with a
51
- [`validFor`](https://codemirror.net/6/docs/ref/#autocomplete.CompletionResult.validFor) field that
52
- allows the result to be used after all. Passing `onDocChange:
53
- true` will cause this query to be aborted for any document
54
- change.
55
- */
56
- addEventListener(t, e, n) {
57
- t == "abort" && this.abortListeners && (this.abortListeners.push(e), n && n.onDocChange && (this.abortOnDocChange = !0));
58
- }
59
- }
60
- function S(o) {
61
- let t = Object.keys(o).join(""), e = /\w/.test(t);
62
- return e && (t = t.replace(/\w/g, "")), `[${e ? "\\w" : ""}${t.replace(/[^\w\s]/g, "\\$&")}]`;
63
- }
64
- function V(o) {
65
- let t = /* @__PURE__ */ Object.create(null), e = /* @__PURE__ */ Object.create(null);
66
- for (let { label: i } of o) {
67
- t[i[0]] = !0;
68
- for (let l = 1; l < i.length; l++)
69
- e[i[l]] = !0;
70
- }
71
- let n = S(t) + S(e) + "*$";
72
- return [new RegExp("^" + n), new RegExp(n)];
73
- }
74
- function ie(o) {
75
- let t = o.map((i) => typeof i == "string" ? { label: i } : i), [e, n] = t.every((i) => /^\w+$/.test(i.label)) ? [/\w*$/, /\w+$/] : V(t);
76
- return (i) => {
77
- let l = i.matchBefore(n);
78
- return l || i.explicit ? { from: l ? l.from : i.pos, options: t, validFor: e } : null;
79
- };
80
- }
81
- function le(o, t) {
82
- return (e) => {
83
- for (let n = $(e.state).resolveInner(e.pos, -1); n; n = n.parent) {
84
- if (o.indexOf(n.name) > -1)
85
- return null;
86
- if (n.type.isTop)
87
- break;
1
+ import * as n from "react";
2
+ import { Primitive as p } from "./index81.js";
3
+ import { jsx as o } from "react/jsx-runtime";
4
+ var v = "Arrow", e = n.forwardRef((r, i) => {
5
+ const { children: t, width: a = 10, height: s = 5, ...m } = r;
6
+ return /* @__PURE__ */ o(
7
+ p.svg,
8
+ {
9
+ ...m,
10
+ ref: i,
11
+ width: a,
12
+ height: s,
13
+ viewBox: "0 0 30 10",
14
+ preserveAspectRatio: "none",
15
+ children: r.asChild ? t : /* @__PURE__ */ o("polygon", { points: "0,0 30,0 15,10" })
88
16
  }
89
- return t(e);
90
- };
91
- }
92
- function W(o, t) {
93
- var e;
94
- let { source: n } = o, i = n[n.length - 1] != "$";
95
- return i ? new RegExp(`(?:${n})${i ? "$" : ""}`, (e = o.flags) !== null && e !== void 0 ? e : o.ignoreCase ? "i" : "") : o;
96
- }
97
- const q = /* @__PURE__ */ T.define(), z = /* @__PURE__ */ w.baseTheme({
98
- ".cm-tooltip.cm-tooltip-autocomplete": {
99
- "& > ul": {
100
- fontFamily: "monospace",
101
- whiteSpace: "nowrap",
102
- overflow: "hidden auto",
103
- maxWidth_fallback: "700px",
104
- maxWidth: "min(700px, 95vw)",
105
- minWidth: "250px",
106
- maxHeight: "10em",
107
- height: "100%",
108
- listStyle: "none",
109
- margin: 0,
110
- padding: 0,
111
- "& > li, & > completion-section": {
112
- padding: "1px 3px",
113
- lineHeight: 1.2
114
- },
115
- "& > li": {
116
- overflowX: "hidden",
117
- textOverflow: "ellipsis",
118
- cursor: "pointer"
119
- },
120
- "& > completion-section": {
121
- display: "list-item",
122
- borderBottom: "1px solid silver",
123
- paddingLeft: "0.5em",
124
- opacity: 0.7
125
- }
126
- }
127
- },
128
- "&light .cm-tooltip-autocomplete ul li[aria-selected]": {
129
- background: "#17c",
130
- color: "white"
131
- },
132
- "&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]": {
133
- background: "#777"
134
- },
135
- "&dark .cm-tooltip-autocomplete ul li[aria-selected]": {
136
- background: "#347",
137
- color: "white"
138
- },
139
- "&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]": {
140
- background: "#444"
141
- },
142
- ".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after": {
143
- content: '"···"',
144
- opacity: 0.5,
145
- display: "block",
146
- textAlign: "center"
147
- },
148
- ".cm-tooltip.cm-completionInfo": {
149
- position: "absolute",
150
- padding: "3px 9px",
151
- width: "max-content",
152
- maxWidth: "400px",
153
- boxSizing: "border-box",
154
- whiteSpace: "pre-line"
155
- },
156
- ".cm-completionInfo.cm-completionInfo-left": { right: "100%" },
157
- ".cm-completionInfo.cm-completionInfo-right": { left: "100%" },
158
- ".cm-completionInfo.cm-completionInfo-left-narrow": { right: "30px" },
159
- ".cm-completionInfo.cm-completionInfo-right-narrow": { left: "30px" },
160
- "&light .cm-snippetField": { backgroundColor: "#00000022" },
161
- "&dark .cm-snippetField": { backgroundColor: "#ffffff22" },
162
- ".cm-snippetFieldPosition": {
163
- verticalAlign: "text-top",
164
- width: 0,
165
- height: "1.15em",
166
- display: "inline-block",
167
- margin: "0 -0.7px -.7em",
168
- borderLeft: "1.4px dotted #888"
169
- },
170
- ".cm-completionMatchedText": {
171
- textDecoration: "underline"
172
- },
173
- ".cm-completionDetail": {
174
- marginLeft: "0.5em",
175
- fontStyle: "italic"
176
- },
177
- ".cm-completionIcon": {
178
- fontSize: "90%",
179
- width: ".8em",
180
- display: "inline-block",
181
- textAlign: "center",
182
- paddingRight: ".6em",
183
- opacity: "0.6",
184
- boxSizing: "content-box"
185
- },
186
- ".cm-completionIcon-function, .cm-completionIcon-method": {
187
- "&:after": { content: "'ƒ'" }
188
- },
189
- ".cm-completionIcon-class": {
190
- "&:after": { content: "'○'" }
191
- },
192
- ".cm-completionIcon-interface": {
193
- "&:after": { content: "'◌'" }
194
- },
195
- ".cm-completionIcon-variable": {
196
- "&:after": { content: "'𝑥'" }
197
- },
198
- ".cm-completionIcon-constant": {
199
- "&:after": { content: "'𝐶'" }
200
- },
201
- ".cm-completionIcon-type": {
202
- "&:after": { content: "'𝑡'" }
203
- },
204
- ".cm-completionIcon-enum": {
205
- "&:after": { content: "'∪'" }
206
- },
207
- ".cm-completionIcon-property": {
208
- "&:after": { content: "'□'" }
209
- },
210
- ".cm-completionIcon-keyword": {
211
- "&:after": { content: "'🔑︎'" }
212
- // Disable emoji rendering
213
- },
214
- ".cm-completionIcon-namespace": {
215
- "&:after": { content: "'▢'" }
216
- },
217
- ".cm-completionIcon-text": {
218
- "&:after": { content: "'abc'", fontSize: "50%", verticalAlign: "middle" }
219
- }
17
+ );
220
18
  });
221
- class H {
222
- constructor(t, e, n, i) {
223
- this.field = t, this.line = e, this.from = n, this.to = i;
224
- }
225
- }
226
- class b {
227
- constructor(t, e, n) {
228
- this.field = t, this.from = e, this.to = n;
229
- }
230
- map(t) {
231
- let e = t.mapPos(this.from, -1, v.TrackDel), n = t.mapPos(this.to, 1, v.TrackDel);
232
- return e == null || n == null ? null : new b(this.field, e, n);
233
- }
234
- }
235
- class I {
236
- constructor(t, e) {
237
- this.lines = t, this.fieldPositions = e;
238
- }
239
- instantiate(t, e) {
240
- let n = [], i = [e], l = t.doc.lineAt(e), f = /^\s*/.exec(l.text)[0];
241
- for (let s of this.lines) {
242
- if (n.length) {
243
- let a = f, c = /^\t*/.exec(s)[0].length;
244
- for (let r = 0; r < c; r++)
245
- a += t.facet(j);
246
- i.push(e + a.length - c), s = a + s.slice(c);
247
- }
248
- n.push(s), e += s.length + 1;
249
- }
250
- let p = this.fieldPositions.map((s) => new b(s.field, i[s.line] + s.from, i[s.line] + s.to));
251
- return { text: n, ranges: p };
252
- }
253
- static parse(t) {
254
- let e = [], n = [], i = [], l;
255
- for (let f of t.split(/\r\n?|\n/)) {
256
- for (; l = /[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(f); ) {
257
- let p = l[1] ? +l[1] : null, s = l[2] || l[3] || "", a = -1, c = s.replace(/\\[{}]/g, (r) => r[1]);
258
- for (let r = 0; r < e.length; r++)
259
- (p != null ? e[r].seq == p : c && e[r].name == c) && (a = r);
260
- if (a < 0) {
261
- let r = 0;
262
- for (; r < e.length && (p == null || e[r].seq != null && e[r].seq < p); )
263
- r++;
264
- e.splice(r, 0, { seq: p, name: c }), a = r;
265
- for (let d of i)
266
- d.field >= a && d.field++;
267
- }
268
- for (let r of i)
269
- if (r.line == n.length && r.from > l.index) {
270
- let d = l[2] ? 3 + (l[1] || "").length : 2;
271
- r.from -= d, r.to -= d;
272
- }
273
- i.push(new H(a, n.length, l.index, l.index + c.length)), f = f.slice(0, l.index) + s + f.slice(l.index + l[0].length);
274
- }
275
- f = f.replace(/\\([{}])/g, (p, s, a) => {
276
- for (let c of i)
277
- c.line == n.length && c.from > a && (c.from--, c.to--);
278
- return s;
279
- }), n.push(f);
280
- }
281
- return new I(n, i);
282
- }
283
- }
284
- let K = /* @__PURE__ */ g.widget({ widget: /* @__PURE__ */ new class extends R {
285
- toDOM() {
286
- let o = document.createElement("span");
287
- return o.className = "cm-snippetFieldPosition", o;
288
- }
289
- ignoreEvent() {
290
- return !1;
291
- }
292
- }() }), N = /* @__PURE__ */ g.mark({ class: "cm-snippetField" });
293
- class m {
294
- constructor(t, e) {
295
- this.ranges = t, this.active = e, this.deco = g.set(t.map((n) => (n.from == n.to ? K : N).range(n.from, n.to)), !0);
296
- }
297
- map(t) {
298
- let e = [];
299
- for (let n of this.ranges) {
300
- let i = n.map(t);
301
- if (!i)
302
- return null;
303
- e.push(i);
304
- }
305
- return new m(e, this.active);
306
- }
307
- selectionInsideField(t) {
308
- return t.ranges.every((e) => this.ranges.some((n) => n.field == this.active && n.from <= e.from && n.to >= e.to));
309
- }
310
- }
311
- const h = /* @__PURE__ */ x.define({
312
- map(o, t) {
313
- return o && o.map(t);
314
- }
315
- }), X = /* @__PURE__ */ x.define(), u = /* @__PURE__ */ D.define({
316
- create() {
317
- return null;
318
- },
319
- update(o, t) {
320
- for (let e of t.effects) {
321
- if (e.is(h))
322
- return e.value;
323
- if (e.is(X) && o)
324
- return new m(o.ranges, e.value);
325
- }
326
- return o && t.docChanged && (o = o.map(t.changes)), o && t.selection && !o.selectionInsideField(t.selection) && (o = null), o;
327
- },
328
- provide: (o) => w.decorations.from(o, (t) => t ? t.deco : g.none)
329
- });
330
- function y(o, t) {
331
- return k.create(o.filter((e) => e.field == t).map((e) => k.range(e.from, e.to)));
332
- }
333
- function U(o) {
334
- let t = I.parse(o);
335
- return (e, n, i, l) => {
336
- let { text: f, ranges: p } = t.instantiate(e.state, i), { main: s } = e.state.selection, a = {
337
- changes: { from: i, to: l == s.from ? s.to : l, insert: A.of(f) },
338
- scrollIntoView: !0,
339
- annotations: n ? [q.of(n), L.userEvent.of("input.complete")] : void 0
340
- };
341
- if (p.length && (a.selection = y(p, 0)), p.some((c) => c.field > 0)) {
342
- let c = new m(p, 0), r = a.effects = [h.of(c)];
343
- e.state.field(u, !1) === void 0 && r.push(x.appendConfig.of([u, Z, _, z]));
344
- }
345
- e.dispatch(e.state.update(a));
346
- };
347
- }
348
- function E(o) {
349
- return ({ state: t, dispatch: e }) => {
350
- let n = t.field(u, !1);
351
- if (!n || o < 0 && n.active == 0)
352
- return !1;
353
- let i = n.active + o, l = o > 0 && !n.ranges.some((f) => f.field == i + o);
354
- return e(t.update({
355
- selection: y(n.ranges, i),
356
- effects: h.of(l ? null : new m(n.ranges, i)),
357
- scrollIntoView: !0
358
- })), !0;
359
- };
360
- }
361
- const Y = ({ state: o, dispatch: t }) => o.field(u, !1) ? (t(o.update({ effects: h.of(null) })), !0) : !1, G = /* @__PURE__ */ E(1), J = /* @__PURE__ */ E(-1), Q = [
362
- { key: "Tab", run: G, shift: J },
363
- { key: "Escape", run: Y }
364
- ], F = /* @__PURE__ */ P.define({
365
- combine(o) {
366
- return o.length ? o[0] : Q;
367
- }
368
- }), Z = /* @__PURE__ */ O.highest(/* @__PURE__ */ B.compute([F], (o) => o.facet(F)));
369
- function re(o, t) {
370
- return { ...t, apply: U(o) };
371
- }
372
- const _ = /* @__PURE__ */ w.domEventHandlers({
373
- mousedown(o, t) {
374
- let e = t.state.field(u, !1), n;
375
- if (!e || (n = t.posAtCoords({ x: o.clientX, y: o.clientY })) == null)
376
- return !1;
377
- let i = e.ranges.find((l) => l.from <= n && l.to >= n);
378
- return !i || i.field == e.active ? !1 : (t.dispatch({
379
- selection: y(e.ranges, i.field),
380
- effects: h.of(e.ranges.some((l) => l.field > i.field) ? new m(e.ranges, i.field) : null),
381
- scrollIntoView: !0
382
- }), !0);
383
- }
384
- }), C = /* @__PURE__ */ new class extends M {
385
- }();
386
- C.startSide = 1;
387
- C.endSide = -1;
19
+ e.displayName = v;
20
+ var h = e;
388
21
  export {
389
- oe as CompletionContext,
390
- Y as clearSnippet,
391
- ie as completeFromList,
392
- le as ifNotIn,
393
- G as nextSnippetField,
394
- q as pickedCompletion,
395
- J as prevSnippetField,
396
- U as snippet,
397
- re as snippetCompletion,
398
- F as snippetKeymap
22
+ e as Arrow,
23
+ h as Root
399
24
  };