@apipass/design-system 3.3.0 → 4.1.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 (78) hide show
  1. package/dist/lib/embedded-styles.js +1 -1
  2. package/dist/lib/json-viewer.index.cjs +2 -0
  3. package/dist/lib/json-viewer.index.cjs.map +1 -0
  4. package/dist/lib/json-viewer.index.js +7 -0
  5. package/dist/lib/json-viewer.index.js.map +1 -0
  6. package/dist/lib/lib.index.cjs +1 -1
  7. package/dist/lib/lib.index.js +742 -744
  8. package/dist/lib/lib.index.js.map +1 -1
  9. package/dist/lib/style.css +1 -1
  10. package/dist/lib/ui/primitives/JsonViewer/JsonEditor.cjs +2 -0
  11. package/dist/lib/ui/primitives/JsonViewer/JsonEditor.cjs.map +1 -0
  12. package/dist/lib/ui/primitives/JsonViewer/JsonEditor.js +95 -0
  13. package/dist/lib/ui/primitives/JsonViewer/JsonEditor.js.map +1 -0
  14. package/dist/lib/ui/primitives/JsonViewer/JsonViewer.cjs +1 -1
  15. package/dist/lib/ui/primitives/JsonViewer/JsonViewer.cjs.map +1 -1
  16. package/dist/lib/ui/primitives/JsonViewer/JsonViewer.js +37 -88
  17. package/dist/lib/ui/primitives/JsonViewer/JsonViewer.js.map +1 -1
  18. package/dist/lib/ui/primitives/JsonViewer/json-code-mirror.cjs +2 -0
  19. package/dist/lib/ui/primitives/JsonViewer/json-code-mirror.cjs.map +1 -0
  20. package/dist/lib/ui/primitives/JsonViewer/json-code-mirror.js +64 -0
  21. package/dist/lib/ui/primitives/JsonViewer/json-code-mirror.js.map +1 -0
  22. package/dist/lib/ui/primitives/Menu/Menu.cjs +1 -1
  23. package/dist/lib/ui/primitives/Menu/Menu.cjs.map +1 -1
  24. package/dist/lib/ui/primitives/Menu/Menu.js +71 -51
  25. package/dist/lib/ui/primitives/Menu/Menu.js.map +1 -1
  26. package/dist/lib/ui/primitives/PermissionGate/PermissionGate.cjs.map +1 -1
  27. package/dist/lib/ui/primitives/PermissionGate/PermissionGate.js.map +1 -1
  28. package/dist/types/json-viewer.index.d.ts +2 -0
  29. package/dist/types/ui/primitives/JsonViewer/JsonEditor.d.ts +18 -0
  30. package/dist/types/ui/primitives/JsonViewer/json-code-mirror.d.ts +17 -0
  31. package/dist/types/ui/primitives/Menu/Menu.d.ts +1 -1
  32. package/dist/types/ui/primitives/PermissionGate/PermissionGate.d.ts +20 -0
  33. package/dist/types/ui/primitives/index.d.ts +0 -1
  34. package/package.json +34 -7
  35. package/dist/lib/vendor/@codemirror/lang-json/dist/index.cjs +0 -2
  36. package/dist/lib/vendor/@codemirror/lang-json/dist/index.cjs.map +0 -1
  37. package/dist/lib/vendor/@codemirror/lang-json/dist/index.js +0 -28
  38. package/dist/lib/vendor/@codemirror/lang-json/dist/index.js.map +0 -1
  39. package/dist/lib/vendor/@codemirror/language/dist/index.cjs +0 -2
  40. package/dist/lib/vendor/@codemirror/language/dist/index.cjs.map +0 -1
  41. package/dist/lib/vendor/@codemirror/language/dist/index.js +0 -791
  42. package/dist/lib/vendor/@codemirror/language/dist/index.js.map +0 -1
  43. package/dist/lib/vendor/@codemirror/state/dist/index.cjs +0 -6
  44. package/dist/lib/vendor/@codemirror/state/dist/index.cjs.map +0 -1
  45. package/dist/lib/vendor/@codemirror/state/dist/index.js +0 -2633
  46. package/dist/lib/vendor/@codemirror/state/dist/index.js.map +0 -1
  47. package/dist/lib/vendor/@codemirror/view/dist/index.cjs +0 -5
  48. package/dist/lib/vendor/@codemirror/view/dist/index.cjs.map +0 -1
  49. package/dist/lib/vendor/@codemirror/view/dist/index.js +0 -6068
  50. package/dist/lib/vendor/@codemirror/view/dist/index.js.map +0 -1
  51. package/dist/lib/vendor/@lezer/common/dist/index.cjs +0 -2
  52. package/dist/lib/vendor/@lezer/common/dist/index.cjs.map +0 -1
  53. package/dist/lib/vendor/@lezer/common/dist/index.js +0 -1392
  54. package/dist/lib/vendor/@lezer/common/dist/index.js.map +0 -1
  55. package/dist/lib/vendor/@lezer/highlight/dist/index.cjs +0 -2
  56. package/dist/lib/vendor/@lezer/highlight/dist/index.cjs.map +0 -1
  57. package/dist/lib/vendor/@lezer/highlight/dist/index.js +0 -638
  58. package/dist/lib/vendor/@lezer/highlight/dist/index.js.map +0 -1
  59. package/dist/lib/vendor/@lezer/json/dist/index.cjs +0 -2
  60. package/dist/lib/vendor/@lezer/json/dist/index.cjs.map +0 -1
  61. package/dist/lib/vendor/@lezer/json/dist/index.js +0 -35
  62. package/dist/lib/vendor/@lezer/json/dist/index.js.map +0 -1
  63. package/dist/lib/vendor/@lezer/lr/dist/index.cjs +0 -2
  64. package/dist/lib/vendor/@lezer/lr/dist/index.cjs.map +0 -1
  65. package/dist/lib/vendor/@lezer/lr/dist/index.js +0 -1269
  66. package/dist/lib/vendor/@lezer/lr/dist/index.js.map +0 -1
  67. package/dist/lib/vendor/@marijn/find-cluster-break/src/index.cjs +0 -2
  68. package/dist/lib/vendor/@marijn/find-cluster-break/src/index.cjs.map +0 -1
  69. package/dist/lib/vendor/@marijn/find-cluster-break/src/index.js +0 -70
  70. package/dist/lib/vendor/@marijn/find-cluster-break/src/index.js.map +0 -1
  71. package/dist/lib/vendor/style-mod/src/style-mod.cjs +0 -4
  72. package/dist/lib/vendor/style-mod/src/style-mod.cjs.map +0 -1
  73. package/dist/lib/vendor/style-mod/src/style-mod.js +0 -110
  74. package/dist/lib/vendor/style-mod/src/style-mod.js.map +0 -1
  75. package/dist/lib/vendor/w3c-keyname/index.cjs +0 -2
  76. package/dist/lib/vendor/w3c-keyname/index.cjs.map +0 -1
  77. package/dist/lib/vendor/w3c-keyname/index.js +0 -89
  78. package/dist/lib/vendor/w3c-keyname/index.js.map +0 -1
@@ -1,638 +0,0 @@
1
- import { NodeProp as F } from "../../common/dist/index.js";
2
- let z = 0;
3
- class g {
4
- /**
5
- @internal
6
- */
7
- constructor(t, a, n, i) {
8
- this.name = t, this.set = a, this.base = n, this.modified = i, this.id = z++;
9
- }
10
- toString() {
11
- let { name: t } = this;
12
- for (let a of this.modified)
13
- a.name && (t = `${a.name}(${t})`);
14
- return t;
15
- }
16
- static define(t, a) {
17
- let n = typeof t == "string" ? t : "?";
18
- if (t instanceof g && (a = t), a != null && a.base)
19
- throw new Error("Can not derive from a modified tag");
20
- let i = new g(n, [], null, []);
21
- if (i.set.push(i), a)
22
- for (let o of a.set)
23
- i.set.push(o);
24
- return i;
25
- }
26
- /**
27
- Define a tag _modifier_, which is a function that, given a tag,
28
- will return a tag that is a subtag of the original. Applying the
29
- same modifier to a twice tag will return the same value (`m1(t1)
30
- == m1(t1)`) and applying multiple modifiers will, regardless or
31
- order, produce the same tag (`m1(m2(t1)) == m2(m1(t1))`).
32
-
33
- When multiple modifiers are applied to a given base tag, each
34
- smaller set of modifiers is registered as a parent, so that for
35
- example `m1(m2(m3(t1)))` is a subtype of `m1(m2(t1))`,
36
- `m1(m3(t1)`, and so on.
37
- */
38
- static defineModifier(t) {
39
- let a = new q(t);
40
- return (n) => n.modified.indexOf(a) > -1 ? n : q.get(n.base || n, n.modified.concat(a).sort((i, o) => i.id - o.id));
41
- }
42
- }
43
- let G = 0;
44
- class q {
45
- constructor(t) {
46
- this.name = t, this.instances = [], this.id = G++;
47
- }
48
- static get(t, a) {
49
- if (!a.length)
50
- return t;
51
- let n = a[0].instances.find((r) => r.base == t && L(a, r.modified));
52
- if (n)
53
- return n;
54
- let i = [], o = new g(t.name, i, t, a);
55
- for (let r of a)
56
- r.instances.push(o);
57
- let c = P(a);
58
- for (let r of t.set)
59
- if (!r.modified.length)
60
- for (let m of c)
61
- i.push(q.get(r, m));
62
- return o;
63
- }
64
- }
65
- function L(s, t) {
66
- return s.length == t.length && s.every((a, n) => a == t[n]);
67
- }
68
- function P(s) {
69
- let t = [[]];
70
- for (let a = 0; a < s.length; a++)
71
- for (let n = 0, i = t.length; n < i; n++)
72
- t.push(t[n].concat(s[a]));
73
- return t.sort((a, n) => n.length - a.length);
74
- }
75
- function Z(s) {
76
- let t = /* @__PURE__ */ Object.create(null);
77
- for (let a in s) {
78
- let n = s[a];
79
- Array.isArray(n) || (n = [n]);
80
- for (let i of a.split(" "))
81
- if (i) {
82
- let o = [], c = 2, r = i;
83
- for (let d = 0; ; ) {
84
- if (r == "..." && d > 0 && d + 3 == i.length) {
85
- c = 1;
86
- break;
87
- }
88
- let f = /^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(r);
89
- if (!f)
90
- throw new RangeError("Invalid path: " + i);
91
- if (o.push(f[0] == "*" ? "" : f[0][0] == '"' ? JSON.parse(f[0]) : f[0]), d += f[0].length, d == i.length)
92
- break;
93
- let b = i[d++];
94
- if (d == i.length && b == "!") {
95
- c = 0;
96
- break;
97
- }
98
- if (b != "/")
99
- throw new RangeError("Invalid path: " + i);
100
- r = i.slice(d);
101
- }
102
- let m = o.length - 1, h = o[m];
103
- if (!h)
104
- throw new RangeError("Invalid path: " + i);
105
- let v = new R(n, c, m > 0 ? o.slice(0, m) : null);
106
- t[h] = v.sort(t[h]);
107
- }
108
- }
109
- return J.add(t);
110
- }
111
- const J = new F({
112
- combine(s, t) {
113
- let a, n, i;
114
- for (; s || t; ) {
115
- if (!s || t && s.depth >= t.depth ? (i = t, t = t.next) : (i = s, s = s.next), a && a.mode == i.mode && !i.context && !a.context)
116
- continue;
117
- let o = new R(i.tags, i.mode, i.context);
118
- a ? a.next = o : n = o, a = o;
119
- }
120
- return n;
121
- }
122
- });
123
- class R {
124
- constructor(t, a, n, i) {
125
- this.tags = t, this.mode = a, this.context = n, this.next = i;
126
- }
127
- get opaque() {
128
- return this.mode == 0;
129
- }
130
- get inherit() {
131
- return this.mode == 1;
132
- }
133
- sort(t) {
134
- return !t || t.depth < this.depth ? (this.next = t, this) : (t.next = this.sort(t.next), t);
135
- }
136
- get depth() {
137
- return this.context ? this.context.length : 0;
138
- }
139
- }
140
- R.empty = new R([], 2, null);
141
- function Q(s, t) {
142
- let a = /* @__PURE__ */ Object.create(null);
143
- for (let o of s)
144
- if (!Array.isArray(o.tag))
145
- a[o.tag.id] = o.class;
146
- else
147
- for (let c of o.tag)
148
- a[c.id] = o.class;
149
- let { scope: n, all: i = null } = t || {};
150
- return {
151
- style: (o) => {
152
- let c = i;
153
- for (let r of o)
154
- for (let m of r.set) {
155
- let h = a[m.id];
156
- if (h) {
157
- c = c ? c + " " + h : h;
158
- break;
159
- }
160
- }
161
- return c;
162
- },
163
- scope: n
164
- };
165
- }
166
- function U(s, t) {
167
- let a = null;
168
- for (let n of s) {
169
- let i = n.style(t);
170
- i && (a = a ? a + " " + i : i);
171
- }
172
- return a;
173
- }
174
- function _(s, t, a, n = 0, i = s.length) {
175
- let o = new W(n, Array.isArray(t) ? t : [t], a);
176
- o.highlightRange(s.cursor(), n, i, "", o.highlighters), o.flush(i);
177
- }
178
- class W {
179
- constructor(t, a, n) {
180
- this.at = t, this.highlighters = a, this.span = n, this.class = "";
181
- }
182
- startSpan(t, a) {
183
- a != this.class && (this.flush(t), t > this.at && (this.at = t), this.class = a);
184
- }
185
- flush(t) {
186
- t > this.at && this.class && this.span(this.at, t, this.class);
187
- }
188
- highlightRange(t, a, n, i, o) {
189
- let { type: c, from: r, to: m } = t;
190
- if (r >= n || m <= a)
191
- return;
192
- c.isTop && (o = this.highlighters.filter((b) => !b.scope || b.scope(c)));
193
- let h = i, v = X(t) || R.empty, d = U(o, v.tags);
194
- if (d && (h && (h += " "), h += d, v.mode == 1 && (i += (i ? " " : "") + d)), this.startSpan(Math.max(a, r), h), v.opaque)
195
- return;
196
- let f = t.tree && t.tree.prop(F.mounted);
197
- if (f && f.overlay) {
198
- let b = t.node.enter(f.overlay[0].from + r, 1), V = this.highlighters.filter((w) => !w.scope || w.scope(f.tree.type)), B = t.firstChild();
199
- for (let w = 0, M = r; ; w++) {
200
- let S = w < f.overlay.length ? f.overlay[w] : null, E = S ? S.from + r : m, H = Math.max(a, M), A = Math.min(n, E);
201
- if (H < A && B)
202
- for (; t.from < A && (this.highlightRange(t, H, A, i, o), this.startSpan(Math.min(A, t.to), h), !(t.to >= E || !t.nextSibling())); )
203
- ;
204
- if (!S || E > n)
205
- break;
206
- M = S.to + r, M > a && (this.highlightRange(b.cursor(), Math.max(a, S.from + r), Math.min(n, M), "", V), this.startSpan(Math.min(n, M), h));
207
- }
208
- B && t.parent();
209
- } else if (t.firstChild()) {
210
- f && (i = "");
211
- do
212
- if (!(t.to <= a)) {
213
- if (t.from >= n)
214
- break;
215
- this.highlightRange(t, a, n, i, o), this.startSpan(Math.min(n, t.to), h);
216
- }
217
- while (t.nextSibling());
218
- t.parent();
219
- }
220
- }
221
- }
222
- function X(s) {
223
- let t = s.type.prop(J);
224
- for (; t && t.context && !s.matchContext(t.context); )
225
- t = t.next;
226
- return t || null;
227
- }
228
- const e = g.define, I = e(), y = e(), D = e(y), $ = e(y), N = e(), T = e(N), K = e(N), k = e(), x = e(k), p = e(), u = e(), j = e(), O = e(j), C = e(), l = {
229
- /**
230
- A comment.
231
- */
232
- comment: I,
233
- /**
234
- A line [comment](#highlight.tags.comment).
235
- */
236
- lineComment: e(I),
237
- /**
238
- A block [comment](#highlight.tags.comment).
239
- */
240
- blockComment: e(I),
241
- /**
242
- A documentation [comment](#highlight.tags.comment).
243
- */
244
- docComment: e(I),
245
- /**
246
- Any kind of identifier.
247
- */
248
- name: y,
249
- /**
250
- The [name](#highlight.tags.name) of a variable.
251
- */
252
- variableName: e(y),
253
- /**
254
- A type [name](#highlight.tags.name).
255
- */
256
- typeName: D,
257
- /**
258
- A tag name (subtag of [`typeName`](#highlight.tags.typeName)).
259
- */
260
- tagName: e(D),
261
- /**
262
- A property or field [name](#highlight.tags.name).
263
- */
264
- propertyName: $,
265
- /**
266
- An attribute name (subtag of [`propertyName`](#highlight.tags.propertyName)).
267
- */
268
- attributeName: e($),
269
- /**
270
- The [name](#highlight.tags.name) of a class.
271
- */
272
- className: e(y),
273
- /**
274
- A label [name](#highlight.tags.name).
275
- */
276
- labelName: e(y),
277
- /**
278
- A namespace [name](#highlight.tags.name).
279
- */
280
- namespace: e(y),
281
- /**
282
- The [name](#highlight.tags.name) of a macro.
283
- */
284
- macroName: e(y),
285
- /**
286
- A literal value.
287
- */
288
- literal: N,
289
- /**
290
- A string [literal](#highlight.tags.literal).
291
- */
292
- string: T,
293
- /**
294
- A documentation [string](#highlight.tags.string).
295
- */
296
- docString: e(T),
297
- /**
298
- A character literal (subtag of [string](#highlight.tags.string)).
299
- */
300
- character: e(T),
301
- /**
302
- An attribute value (subtag of [string](#highlight.tags.string)).
303
- */
304
- attributeValue: e(T),
305
- /**
306
- A number [literal](#highlight.tags.literal).
307
- */
308
- number: K,
309
- /**
310
- An integer [number](#highlight.tags.number) literal.
311
- */
312
- integer: e(K),
313
- /**
314
- A floating-point [number](#highlight.tags.number) literal.
315
- */
316
- float: e(K),
317
- /**
318
- A boolean [literal](#highlight.tags.literal).
319
- */
320
- bool: e(N),
321
- /**
322
- Regular expression [literal](#highlight.tags.literal).
323
- */
324
- regexp: e(N),
325
- /**
326
- An escape [literal](#highlight.tags.literal), for example a
327
- backslash escape in a string.
328
- */
329
- escape: e(N),
330
- /**
331
- A color [literal](#highlight.tags.literal).
332
- */
333
- color: e(N),
334
- /**
335
- A URL [literal](#highlight.tags.literal).
336
- */
337
- url: e(N),
338
- /**
339
- A language keyword.
340
- */
341
- keyword: p,
342
- /**
343
- The [keyword](#highlight.tags.keyword) for the self or this
344
- object.
345
- */
346
- self: e(p),
347
- /**
348
- The [keyword](#highlight.tags.keyword) for null.
349
- */
350
- null: e(p),
351
- /**
352
- A [keyword](#highlight.tags.keyword) denoting some atomic value.
353
- */
354
- atom: e(p),
355
- /**
356
- A [keyword](#highlight.tags.keyword) that represents a unit.
357
- */
358
- unit: e(p),
359
- /**
360
- A modifier [keyword](#highlight.tags.keyword).
361
- */
362
- modifier: e(p),
363
- /**
364
- A [keyword](#highlight.tags.keyword) that acts as an operator.
365
- */
366
- operatorKeyword: e(p),
367
- /**
368
- A control-flow related [keyword](#highlight.tags.keyword).
369
- */
370
- controlKeyword: e(p),
371
- /**
372
- A [keyword](#highlight.tags.keyword) that defines something.
373
- */
374
- definitionKeyword: e(p),
375
- /**
376
- A [keyword](#highlight.tags.keyword) related to defining or
377
- interfacing with modules.
378
- */
379
- moduleKeyword: e(p),
380
- /**
381
- An operator.
382
- */
383
- operator: u,
384
- /**
385
- An [operator](#highlight.tags.operator) that dereferences something.
386
- */
387
- derefOperator: e(u),
388
- /**
389
- Arithmetic-related [operator](#highlight.tags.operator).
390
- */
391
- arithmeticOperator: e(u),
392
- /**
393
- Logical [operator](#highlight.tags.operator).
394
- */
395
- logicOperator: e(u),
396
- /**
397
- Bit [operator](#highlight.tags.operator).
398
- */
399
- bitwiseOperator: e(u),
400
- /**
401
- Comparison [operator](#highlight.tags.operator).
402
- */
403
- compareOperator: e(u),
404
- /**
405
- [Operator](#highlight.tags.operator) that updates its operand.
406
- */
407
- updateOperator: e(u),
408
- /**
409
- [Operator](#highlight.tags.operator) that defines something.
410
- */
411
- definitionOperator: e(u),
412
- /**
413
- Type-related [operator](#highlight.tags.operator).
414
- */
415
- typeOperator: e(u),
416
- /**
417
- Control-flow [operator](#highlight.tags.operator).
418
- */
419
- controlOperator: e(u),
420
- /**
421
- Program or markup punctuation.
422
- */
423
- punctuation: j,
424
- /**
425
- [Punctuation](#highlight.tags.punctuation) that separates
426
- things.
427
- */
428
- separator: e(j),
429
- /**
430
- Bracket-style [punctuation](#highlight.tags.punctuation).
431
- */
432
- bracket: O,
433
- /**
434
- Angle [brackets](#highlight.tags.bracket) (usually `<` and `>`
435
- tokens).
436
- */
437
- angleBracket: e(O),
438
- /**
439
- Square [brackets](#highlight.tags.bracket) (usually `[` and `]`
440
- tokens).
441
- */
442
- squareBracket: e(O),
443
- /**
444
- Parentheses (usually `(` and `)` tokens). Subtag of
445
- [bracket](#highlight.tags.bracket).
446
- */
447
- paren: e(O),
448
- /**
449
- Braces (usually `{` and `}` tokens). Subtag of
450
- [bracket](#highlight.tags.bracket).
451
- */
452
- brace: e(O),
453
- /**
454
- Content, for example plain text in XML or markup documents.
455
- */
456
- content: k,
457
- /**
458
- [Content](#highlight.tags.content) that represents a heading.
459
- */
460
- heading: x,
461
- /**
462
- A level 1 [heading](#highlight.tags.heading).
463
- */
464
- heading1: e(x),
465
- /**
466
- A level 2 [heading](#highlight.tags.heading).
467
- */
468
- heading2: e(x),
469
- /**
470
- A level 3 [heading](#highlight.tags.heading).
471
- */
472
- heading3: e(x),
473
- /**
474
- A level 4 [heading](#highlight.tags.heading).
475
- */
476
- heading4: e(x),
477
- /**
478
- A level 5 [heading](#highlight.tags.heading).
479
- */
480
- heading5: e(x),
481
- /**
482
- A level 6 [heading](#highlight.tags.heading).
483
- */
484
- heading6: e(x),
485
- /**
486
- A prose [content](#highlight.tags.content) separator (such as a horizontal rule).
487
- */
488
- contentSeparator: e(k),
489
- /**
490
- [Content](#highlight.tags.content) that represents a list.
491
- */
492
- list: e(k),
493
- /**
494
- [Content](#highlight.tags.content) that represents a quote.
495
- */
496
- quote: e(k),
497
- /**
498
- [Content](#highlight.tags.content) that is emphasized.
499
- */
500
- emphasis: e(k),
501
- /**
502
- [Content](#highlight.tags.content) that is styled strong.
503
- */
504
- strong: e(k),
505
- /**
506
- [Content](#highlight.tags.content) that is part of a link.
507
- */
508
- link: e(k),
509
- /**
510
- [Content](#highlight.tags.content) that is styled as code or
511
- monospace.
512
- */
513
- monospace: e(k),
514
- /**
515
- [Content](#highlight.tags.content) that has a strike-through
516
- style.
517
- */
518
- strikethrough: e(k),
519
- /**
520
- Inserted text in a change-tracking format.
521
- */
522
- inserted: e(),
523
- /**
524
- Deleted text.
525
- */
526
- deleted: e(),
527
- /**
528
- Changed text.
529
- */
530
- changed: e(),
531
- /**
532
- An invalid or unsyntactic element.
533
- */
534
- invalid: e(),
535
- /**
536
- Metadata or meta-instruction.
537
- */
538
- meta: C,
539
- /**
540
- [Metadata](#highlight.tags.meta) that applies to the entire
541
- document.
542
- */
543
- documentMeta: e(C),
544
- /**
545
- [Metadata](#highlight.tags.meta) that annotates or adds
546
- attributes to a given syntactic element.
547
- */
548
- annotation: e(C),
549
- /**
550
- Processing instruction or preprocessor directive. Subtag of
551
- [meta](#highlight.tags.meta).
552
- */
553
- processingInstruction: e(C),
554
- /**
555
- [Modifier](#highlight.Tag^defineModifier) that indicates that a
556
- given element is being defined. Expected to be used with the
557
- various [name](#highlight.tags.name) tags.
558
- */
559
- definition: g.defineModifier("definition"),
560
- /**
561
- [Modifier](#highlight.Tag^defineModifier) that indicates that
562
- something is constant. Mostly expected to be used with
563
- [variable names](#highlight.tags.variableName).
564
- */
565
- constant: g.defineModifier("constant"),
566
- /**
567
- [Modifier](#highlight.Tag^defineModifier) used to indicate that
568
- a [variable](#highlight.tags.variableName) or [property
569
- name](#highlight.tags.propertyName) is being called or defined
570
- as a function.
571
- */
572
- function: g.defineModifier("function"),
573
- /**
574
- [Modifier](#highlight.Tag^defineModifier) that can be applied to
575
- [names](#highlight.tags.name) to indicate that they belong to
576
- the language's standard environment.
577
- */
578
- standard: g.defineModifier("standard"),
579
- /**
580
- [Modifier](#highlight.Tag^defineModifier) that indicates a given
581
- [names](#highlight.tags.name) is local to some scope.
582
- */
583
- local: g.defineModifier("local"),
584
- /**
585
- A generic variant [modifier](#highlight.Tag^defineModifier) that
586
- can be used to tag language-specific alternative variants of
587
- some common tag. It is recommended for themes to define special
588
- forms of at least the [string](#highlight.tags.string) and
589
- [variable name](#highlight.tags.variableName) tags, since those
590
- come up a lot.
591
- */
592
- special: g.defineModifier("special")
593
- };
594
- for (let s in l) {
595
- let t = l[s];
596
- t instanceof g && (t.name = s);
597
- }
598
- Q([
599
- { tag: l.link, class: "tok-link" },
600
- { tag: l.heading, class: "tok-heading" },
601
- { tag: l.emphasis, class: "tok-emphasis" },
602
- { tag: l.strong, class: "tok-strong" },
603
- { tag: l.keyword, class: "tok-keyword" },
604
- { tag: l.atom, class: "tok-atom" },
605
- { tag: l.bool, class: "tok-bool" },
606
- { tag: l.url, class: "tok-url" },
607
- { tag: l.labelName, class: "tok-labelName" },
608
- { tag: l.inserted, class: "tok-inserted" },
609
- { tag: l.deleted, class: "tok-deleted" },
610
- { tag: l.literal, class: "tok-literal" },
611
- { tag: l.string, class: "tok-string" },
612
- { tag: l.number, class: "tok-number" },
613
- { tag: [l.regexp, l.escape, l.special(l.string)], class: "tok-string2" },
614
- { tag: l.variableName, class: "tok-variableName" },
615
- { tag: l.local(l.variableName), class: "tok-variableName tok-local" },
616
- { tag: l.definition(l.variableName), class: "tok-variableName tok-definition" },
617
- { tag: l.special(l.variableName), class: "tok-variableName2" },
618
- { tag: l.definition(l.propertyName), class: "tok-propertyName tok-definition" },
619
- { tag: l.typeName, class: "tok-typeName" },
620
- { tag: l.namespace, class: "tok-namespace" },
621
- { tag: l.className, class: "tok-className" },
622
- { tag: l.macroName, class: "tok-macroName" },
623
- { tag: l.propertyName, class: "tok-propertyName" },
624
- { tag: l.operator, class: "tok-operator" },
625
- { tag: l.comment, class: "tok-comment" },
626
- { tag: l.meta, class: "tok-meta" },
627
- { tag: l.invalid, class: "tok-invalid" },
628
- { tag: l.punctuation, class: "tok-punctuation" }
629
- ]);
630
- export {
631
- g as Tag,
632
- X as getStyleTags,
633
- _ as highlightTree,
634
- Z as styleTags,
635
- Q as tagHighlighter,
636
- l as tags
637
- };
638
- //# sourceMappingURL=index.js.map