apiuikit 0.3.0 → 1.0.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 (149) hide show
  1. package/README.md +66 -7
  2. package/dist/LinkedInExtension-6xekO5bX.cjs +1 -0
  3. package/dist/LinkedInExtension-BL-4T9tt.js +21 -0
  4. package/dist/LogoExtension-BOYrY_RE.cjs +1 -0
  5. package/dist/LogoExtension-HOlSsQf-.js +27 -0
  6. package/dist/XExtension-GyRtdHLL.js +23 -0
  7. package/dist/XExtension-jAiATfg-.cjs +1 -0
  8. package/dist/apiuikit.cjs.js +1 -1
  9. package/dist/apiuikit.css +1 -1
  10. package/dist/apiuikit.es.js +24 -17
  11. package/dist/c-Bz1-FJiA.js +277 -0
  12. package/dist/c-C_Sx7N-F.cjs +1 -0
  13. package/dist/clojure-DWYEZwCD.cjs +1 -0
  14. package/dist/clojure-aY2138WD.js +135 -0
  15. package/dist/components/Authorization.d.ts +28 -17
  16. package/dist/components/ChannelAddress.d.ts +8 -2
  17. package/dist/components/CodeBlock.d.ts +4 -1
  18. package/dist/components/CodeSamples.d.ts +12 -0
  19. package/dist/components/CollapsiblePanel.d.ts +24 -0
  20. package/dist/components/CopyMarkdownButton.d.ts +15 -0
  21. package/dist/components/Examples.d.ts +4 -2
  22. package/dist/components/InfoMetadata.d.ts +21 -2
  23. package/dist/components/Markdown.d.ts +2 -0
  24. package/dist/components/MarkdownExportMenu.d.ts +13 -0
  25. package/dist/components/MethodBadge.d.ts +14 -0
  26. package/dist/components/Navigation/AsyncAPINavigation.d.ts +28 -0
  27. package/dist/components/Navigation/Navigation.d.ts +58 -0
  28. package/dist/components/Navigation/OpenAPINavigation.d.ts +22 -0
  29. package/dist/components/Navigation/SpecNavigation.d.ts +25 -0
  30. package/dist/components/Navigation/index.d.ts +4 -0
  31. package/dist/components/Navigation/sharedSections.d.ts +10 -0
  32. package/dist/components/RenderExtensions.d.ts +28 -0
  33. package/dist/components/Section.d.ts +3 -1
  34. package/dist/components/ServerAddressBanner.d.ts +16 -0
  35. package/dist/components/SidePanel.d.ts +2 -0
  36. package/dist/components/Tabs.d.ts +3 -1
  37. package/dist/components/schema/SchemaTab.d.ts +24 -3
  38. package/dist/components/tests/Authorization.test.d.ts +1 -0
  39. package/dist/components/tests/Bindings.test.d.ts +1 -0
  40. package/dist/components/tests/CodeBlock.test.d.ts +1 -0
  41. package/dist/components/tests/CodeSamples.test.d.ts +1 -0
  42. package/dist/components/tests/CopyMarkdownButton.test.d.ts +1 -0
  43. package/dist/components/tests/MarkdownExportMenu.test.d.ts +1 -0
  44. package/dist/components/tests/RenderExtensions.test.d.ts +1 -0
  45. package/dist/config/config.d.ts +10 -0
  46. package/dist/containers/AsyncAPI/AsyncAPI.d.ts +12 -6
  47. package/dist/containers/AsyncAPI/AsyncAPIRenderer.d.ts +9 -0
  48. package/dist/containers/Information/InformationSection.d.ts +22 -0
  49. package/dist/containers/Information/OpenAPIInformation.d.ts +9 -0
  50. package/dist/containers/OpenAPI/Layout.d.ts +7 -0
  51. package/dist/containers/OpenAPI/OpenAPI.d.ts +18 -0
  52. package/dist/containers/OpenAPI/OpenAPIDocumentProvider.d.ts +13 -0
  53. package/dist/containers/OpenAPI/OpenAPIRenderer.d.ts +17 -0
  54. package/dist/containers/OpenAPI/tests/OpenAPI.test.d.ts +1 -0
  55. package/dist/containers/OpenAPI/tests/OpenAPIRenderer.test.d.ts +1 -0
  56. package/dist/containers/Operation/Operations.d.ts +2 -1
  57. package/dist/containers/Path/OperationCallbacks.d.ts +37 -0
  58. package/dist/containers/Path/PathOperation.d.ts +21 -0
  59. package/dist/containers/Path/Paths.d.ts +16 -0
  60. package/dist/containers/Path/ResponseLinks.d.ts +21 -0
  61. package/dist/containers/Path/tests/PathOperation.test.d.ts +1 -0
  62. package/dist/containers/Server/OpenAPIServer.d.ts +4 -0
  63. package/dist/containers/Server/OpenAPIServers.d.ts +13 -0
  64. package/dist/contants.d.ts +7 -0
  65. package/dist/contexts/useSpec.d.ts +30 -6
  66. package/dist/crystal-BcGgviMR.cjs +1 -0
  67. package/dist/crystal-BtD5fR4q.js +283 -0
  68. package/dist/csharp-AnFv7wyC.js +382 -0
  69. package/dist/csharp-yuAGIuP4.cjs +1 -0
  70. package/dist/go-BpetKc7b.cjs +1 -0
  71. package/dist/go-CkZ9_bn0.js +151 -0
  72. package/dist/helpers/codeSamples.d.ts +92 -0
  73. package/dist/helpers/exampleSchema.d.ts +19 -0
  74. package/dist/helpers/hljsLanguages.d.ts +6 -0
  75. package/dist/helpers/openapiParser.d.ts +10 -0
  76. package/dist/helpers/openapiSearchIndex.d.ts +3 -0
  77. package/dist/helpers/resolveDocument.d.ts +8 -0
  78. package/dist/helpers/runtimeExpression.d.ts +15 -0
  79. package/dist/helpers/schemaExample.d.ts +9 -0
  80. package/dist/helpers/searchIndex.d.ts +5 -2
  81. package/dist/helpers/tests/codeSamples.test.d.ts +1 -0
  82. package/dist/helpers/tests/exampleSchema.test.d.ts +1 -0
  83. package/dist/helpers/tests/openapiSearchIndex.test.d.ts +1 -0
  84. package/dist/helpers/tests/toMarkdown.test.d.ts +1 -0
  85. package/dist/helpers/toMarkdown.d.ts +20 -0
  86. package/dist/hooks/useDocumentProviderValue.d.ts +27 -0
  87. package/dist/hooks/useFuseSearch.d.ts +14 -0
  88. package/dist/hooks/useOpenAPISearch.d.ts +9 -0
  89. package/dist/hooks/useSearchResultFocus.d.ts +18 -0
  90. package/dist/hooks/useSpecLayoutController.d.ts +51 -0
  91. package/dist/hooks/useSpecSearch.d.ts +2 -6
  92. package/dist/http--XH4hLDt.cjs +1 -0
  93. package/dist/http-DKeNlJKS.js +85 -0
  94. package/dist/icons/Copy.d.ts +6 -0
  95. package/dist/icons/Info.d.ts +5 -0
  96. package/dist/icons/Search.d.ts +3 -0
  97. package/dist/{index-D7GelPk0.cjs → index-ArzwV232.cjs} +6 -6
  98. package/dist/index-Bh4OKjMA.js +25412 -0
  99. package/dist/index-C278WDNb.cjs +139 -0
  100. package/dist/index-C4I0xC5G.js +17544 -0
  101. package/dist/index-DuW5iShy.cjs +177 -0
  102. package/dist/index-PtAFPDfk.js +18851 -0
  103. package/dist/index.d.ts +7 -0
  104. package/dist/java-BIk0G-rH.cjs +1 -0
  105. package/dist/java-BicX26Pg.js +240 -0
  106. package/dist/kotlin-BwB8b-YX.js +242 -0
  107. package/dist/kotlin-kGuORR5a.cjs +2 -0
  108. package/dist/objectivec-CnyrJ13Z.js +237 -0
  109. package/dist/objectivec-CoeV81Tz.cjs +1 -0
  110. package/dist/ocaml-0j7KDjso.cjs +1 -0
  111. package/dist/ocaml-T8IqWCjo.js +67 -0
  112. package/dist/php-BL35ZHWM.js +566 -0
  113. package/dist/php-DF4zG2hq.cjs +2 -0
  114. package/dist/powershell-CvydS3ek.cjs +1 -0
  115. package/dist/powershell-DuhUKWoO.js +236 -0
  116. package/dist/protoToJsonSchema-AciPTlBK.cjs +83 -0
  117. package/dist/protoToJsonSchema-D1lojrO3.js +6131 -0
  118. package/dist/{protobufSchemaParser-D_2rEsD4.cjs → protobufSchemaParser-7SgmMhQd.cjs} +1 -1
  119. package/dist/{protobufSchemaParser-Cj2WOp05.js → protobufSchemaParser-BohWo_pY.js} +2 -2
  120. package/dist/public/createSectionRoot.d.ts +30 -0
  121. package/dist/public/openapiSections.d.ts +26 -0
  122. package/dist/public/sections.d.ts +6 -3
  123. package/dist/r-B8fCBydS.js +207 -0
  124. package/dist/r-CYaZnHkA.cjs +1 -0
  125. package/dist/ruby-CvOid-1s.js +388 -0
  126. package/dist/ruby-nPcbuC2a.cjs +1 -0
  127. package/dist/rust-BocnJ3Ns.js +305 -0
  128. package/dist/rust-DKnYCg2f.cjs +1 -0
  129. package/dist/stories/AsyncAPI.stories.d.ts +6 -0
  130. package/dist/stories/AsyncAPIRenderer.stories.d.ts +6 -0
  131. package/dist/stories/Messages.stories.d.ts +1 -0
  132. package/dist/stories/Operations.stories.d.ts +6 -0
  133. package/dist/stories/SchemaTab.stories.d.ts +1 -0
  134. package/dist/stories/SchemaTree.stories.d.ts +1 -0
  135. package/dist/stories/Server.stories.d.ts +1 -0
  136. package/dist/stories/documentContextDecorator.d.ts +2 -2
  137. package/dist/stories/noCanvasDocsPage.d.ts +9 -0
  138. package/dist/swift-C35Eof-I.js +799 -0
  139. package/dist/swift-CAnH__EC.cjs +1 -0
  140. package/dist/types/openapi.d.ts +85 -0
  141. package/package.json +16 -3
  142. package/dist/components/Navigation.d.ts +0 -28
  143. package/dist/icons/SideBar.d.ts +0 -6
  144. package/dist/index-Bad1aEIj.js +0 -11352
  145. package/dist/index-CzcxQGxP.js +0 -25414
  146. package/dist/index-gn5KpvCL.cjs +0 -73
  147. package/dist/protoToJsonSchema-8Mm10CIx.cjs +0 -83
  148. package/dist/protoToJsonSchema-BJpwl2Am.js +0 -6174
  149. package/dist/vite.svg +0 -1
@@ -0,0 +1,566 @@
1
+ function D(e) {
2
+ const t = e.regex, _ = /(?![A-Za-z0-9])(?![$])/, o = t.concat(
3
+ /[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,
4
+ _
5
+ ), r = t.concat(
6
+ /(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,
7
+ _
8
+ ), I = t.concat(
9
+ /[A-Z]+/,
10
+ _
11
+ ), E = {
12
+ scope: "variable",
13
+ match: "\\$+" + o
14
+ }, M = {
15
+ scope: "meta",
16
+ variants: [
17
+ { begin: /<\?php/, relevance: 10 },
18
+ // boost for obvious PHP
19
+ { begin: /<\?=/ },
20
+ // less relevant per PSR-1 which says not to use short-tags
21
+ { begin: /<\?/, relevance: 0.1 },
22
+ { begin: /\?>/ }
23
+ // end php tag
24
+ ]
25
+ }, g = {
26
+ scope: "subst",
27
+ variants: [
28
+ { begin: /\$\w+/ },
29
+ {
30
+ begin: /\{\$/,
31
+ end: /\}/
32
+ }
33
+ ]
34
+ }, N = e.inherit(e.APOS_STRING_MODE, { illegal: null }), y = e.inherit(e.QUOTE_STRING_MODE, {
35
+ illegal: null,
36
+ contains: e.QUOTE_STRING_MODE.contains.concat(g)
37
+ }), w = {
38
+ begin: /<<<[ \t]*(?:(\w+)|"(\w+)")\n/,
39
+ end: /[ \t]*(\w+)\b/,
40
+ contains: e.QUOTE_STRING_MODE.contains.concat(g),
41
+ "on:begin": (n, a) => {
42
+ a.data._beginMatch = n[1] || n[2];
43
+ },
44
+ "on:end": (n, a) => {
45
+ a.data._beginMatch !== n[1] && a.ignoreMatch();
46
+ }
47
+ }, x = e.END_SAME_AS_BEGIN({
48
+ begin: /<<<[ \t]*'(\w+)'\n/,
49
+ end: /[ \t]*(\w+)\b/
50
+ }), S = `[
51
+ ]`, i = {
52
+ scope: "string",
53
+ variants: [
54
+ y,
55
+ N,
56
+ w,
57
+ x
58
+ ]
59
+ }, s = {
60
+ scope: "number",
61
+ variants: [
62
+ { begin: "\\b0[bB][01]+(?:_[01]+)*\\b" },
63
+ // Binary w/ underscore support
64
+ { begin: "\\b0[oO][0-7]+(?:_[0-7]+)*\\b" },
65
+ // Octals w/ underscore support
66
+ { begin: "\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b" },
67
+ // Hex w/ underscore support
68
+ // Decimals w/ underscore support, with optional fragments and scientific exponent (e) suffix.
69
+ { begin: "(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?" }
70
+ ],
71
+ relevance: 0
72
+ }, d = [
73
+ "false",
74
+ "null",
75
+ "true"
76
+ ], T = [
77
+ // Magic constants:
78
+ // <https://www.php.net/manual/en/language.constants.predefined.php>
79
+ "__CLASS__",
80
+ "__DIR__",
81
+ "__FILE__",
82
+ "__FUNCTION__",
83
+ "__COMPILER_HALT_OFFSET__",
84
+ "__LINE__",
85
+ "__METHOD__",
86
+ "__NAMESPACE__",
87
+ "__TRAIT__",
88
+ // Function that look like language construct or language construct that look like function:
89
+ // List of keywords that may not require parenthesis
90
+ "die",
91
+ "echo",
92
+ "exit",
93
+ "include",
94
+ "include_once",
95
+ "print",
96
+ "require",
97
+ "require_once",
98
+ // These are not language construct (function) but operate on the currently-executing function and can access the current symbol table
99
+ // 'compact extract func_get_arg func_get_args func_num_args get_called_class get_parent_class ' +
100
+ // Other keywords:
101
+ // <https://www.php.net/manual/en/reserved.php>
102
+ // <https://www.php.net/manual/en/language.types.type-juggling.php>
103
+ "array",
104
+ "abstract",
105
+ "and",
106
+ "as",
107
+ "binary",
108
+ "bool",
109
+ "boolean",
110
+ "break",
111
+ "callable",
112
+ "case",
113
+ "catch",
114
+ "class",
115
+ "clone",
116
+ "const",
117
+ "continue",
118
+ "declare",
119
+ "default",
120
+ "do",
121
+ "double",
122
+ "else",
123
+ "elseif",
124
+ "empty",
125
+ "enddeclare",
126
+ "endfor",
127
+ "endforeach",
128
+ "endif",
129
+ "endswitch",
130
+ "endwhile",
131
+ "enum",
132
+ "eval",
133
+ "extends",
134
+ "final",
135
+ "finally",
136
+ "float",
137
+ "for",
138
+ "foreach",
139
+ "from",
140
+ "global",
141
+ "goto",
142
+ "if",
143
+ "implements",
144
+ "instanceof",
145
+ "insteadof",
146
+ "int",
147
+ "integer",
148
+ "interface",
149
+ "isset",
150
+ "iterable",
151
+ "list",
152
+ "match|0",
153
+ "mixed",
154
+ "new",
155
+ "never",
156
+ "object",
157
+ "or",
158
+ "private",
159
+ "protected",
160
+ "public",
161
+ "readonly",
162
+ "real",
163
+ "return",
164
+ "string",
165
+ "switch",
166
+ "throw",
167
+ "trait",
168
+ "try",
169
+ "unset",
170
+ "use",
171
+ "var",
172
+ "void",
173
+ "while",
174
+ "xor",
175
+ "yield"
176
+ ], p = [
177
+ // Standard PHP library:
178
+ // <https://www.php.net/manual/en/book.spl.php>
179
+ "Error|0",
180
+ "AppendIterator",
181
+ "ArgumentCountError",
182
+ "ArithmeticError",
183
+ "ArrayIterator",
184
+ "ArrayObject",
185
+ "AssertionError",
186
+ "BadFunctionCallException",
187
+ "BadMethodCallException",
188
+ "CachingIterator",
189
+ "CallbackFilterIterator",
190
+ "CompileError",
191
+ "Countable",
192
+ "DirectoryIterator",
193
+ "DivisionByZeroError",
194
+ "DomainException",
195
+ "EmptyIterator",
196
+ "ErrorException",
197
+ "Exception",
198
+ "FilesystemIterator",
199
+ "FilterIterator",
200
+ "GlobIterator",
201
+ "InfiniteIterator",
202
+ "InvalidArgumentException",
203
+ "IteratorIterator",
204
+ "LengthException",
205
+ "LimitIterator",
206
+ "LogicException",
207
+ "MultipleIterator",
208
+ "NoRewindIterator",
209
+ "OutOfBoundsException",
210
+ "OutOfRangeException",
211
+ "OuterIterator",
212
+ "OverflowException",
213
+ "ParentIterator",
214
+ "ParseError",
215
+ "RangeException",
216
+ "RecursiveArrayIterator",
217
+ "RecursiveCachingIterator",
218
+ "RecursiveCallbackFilterIterator",
219
+ "RecursiveDirectoryIterator",
220
+ "RecursiveFilterIterator",
221
+ "RecursiveIterator",
222
+ "RecursiveIteratorIterator",
223
+ "RecursiveRegexIterator",
224
+ "RecursiveTreeIterator",
225
+ "RegexIterator",
226
+ "RuntimeException",
227
+ "SeekableIterator",
228
+ "SplDoublyLinkedList",
229
+ "SplFileInfo",
230
+ "SplFileObject",
231
+ "SplFixedArray",
232
+ "SplHeap",
233
+ "SplMaxHeap",
234
+ "SplMinHeap",
235
+ "SplObjectStorage",
236
+ "SplObserver",
237
+ "SplPriorityQueue",
238
+ "SplQueue",
239
+ "SplStack",
240
+ "SplSubject",
241
+ "SplTempFileObject",
242
+ "TypeError",
243
+ "UnderflowException",
244
+ "UnexpectedValueException",
245
+ "UnhandledMatchError",
246
+ // Reserved interfaces:
247
+ // <https://www.php.net/manual/en/reserved.interfaces.php>
248
+ "ArrayAccess",
249
+ "BackedEnum",
250
+ "Closure",
251
+ "Fiber",
252
+ "Generator",
253
+ "Iterator",
254
+ "IteratorAggregate",
255
+ "Serializable",
256
+ "Stringable",
257
+ "Throwable",
258
+ "Traversable",
259
+ "UnitEnum",
260
+ "WeakReference",
261
+ "WeakMap",
262
+ // Reserved classes:
263
+ // <https://www.php.net/manual/en/reserved.classes.php>
264
+ "Directory",
265
+ "__PHP_Incomplete_Class",
266
+ "parent",
267
+ "php_user_filter",
268
+ "self",
269
+ "static",
270
+ "stdClass"
271
+ ], b = {
272
+ keyword: T,
273
+ literal: ((n) => {
274
+ const a = [];
275
+ return n.forEach((c) => {
276
+ a.push(c), c.toLowerCase() === c ? a.push(c.toUpperCase()) : a.push(c.toLowerCase());
277
+ }), a;
278
+ })(d),
279
+ built_in: p
280
+ }, u = (n) => n.map((a) => a.replace(/\|\d+$/, "")), O = { variants: [
281
+ {
282
+ match: [
283
+ /new/,
284
+ t.concat(S, "+"),
285
+ // to prevent built ins from being confused as the class constructor call
286
+ t.concat("(?!", u(p).join("\\b|"), "\\b)"),
287
+ r
288
+ ],
289
+ scope: {
290
+ 1: "keyword",
291
+ 4: "title.class"
292
+ }
293
+ }
294
+ ] }, f = t.concat(o, "\\b(?!\\()"), l = { variants: [
295
+ {
296
+ match: [
297
+ t.concat(
298
+ /::/,
299
+ t.lookahead(/(?!class\b)/)
300
+ ),
301
+ f
302
+ ],
303
+ scope: { 2: "variable.constant" }
304
+ },
305
+ {
306
+ match: [
307
+ /::/,
308
+ /class/
309
+ ],
310
+ scope: { 2: "variable.language" }
311
+ },
312
+ {
313
+ match: [
314
+ r,
315
+ t.concat(
316
+ /::/,
317
+ t.lookahead(/(?!class\b)/)
318
+ ),
319
+ f
320
+ ],
321
+ scope: {
322
+ 1: "title.class",
323
+ 3: "variable.constant"
324
+ }
325
+ },
326
+ {
327
+ match: [
328
+ r,
329
+ t.concat(
330
+ "::",
331
+ t.lookahead(/(?!class\b)/)
332
+ )
333
+ ],
334
+ scope: { 1: "title.class" }
335
+ },
336
+ {
337
+ match: [
338
+ r,
339
+ /::/,
340
+ /class/
341
+ ],
342
+ scope: {
343
+ 1: "title.class",
344
+ 3: "variable.language"
345
+ }
346
+ }
347
+ ] }, C = {
348
+ scope: "attr",
349
+ match: t.concat(o, t.lookahead(":"), t.lookahead(/(?!::)/))
350
+ }, R = {
351
+ relevance: 0,
352
+ begin: /\(/,
353
+ end: /\)/,
354
+ keywords: b,
355
+ contains: [
356
+ C,
357
+ E,
358
+ l,
359
+ e.C_BLOCK_COMMENT_MODE,
360
+ i,
361
+ s,
362
+ O
363
+ ]
364
+ }, A = {
365
+ relevance: 0,
366
+ match: [
367
+ /\b/,
368
+ // to prevent keywords from being confused as the function title
369
+ t.concat("(?!fn\\b|function\\b|", u(T).join("\\b|"), "|", u(p).join("\\b|"), "\\b)"),
370
+ o,
371
+ t.concat(S, "*"),
372
+ t.lookahead(/(?=\()/)
373
+ ],
374
+ scope: { 3: "title.function.invoke" },
375
+ contains: [R]
376
+ };
377
+ R.contains.push(A);
378
+ const m = [
379
+ C,
380
+ l,
381
+ e.C_BLOCK_COMMENT_MODE,
382
+ i,
383
+ s,
384
+ O
385
+ ], v = {
386
+ begin: t.concat(
387
+ /#\[\s*\\?/,
388
+ t.either(
389
+ r,
390
+ I
391
+ )
392
+ ),
393
+ beginScope: "meta",
394
+ end: /]/,
395
+ endScope: "meta",
396
+ keywords: {
397
+ literal: d,
398
+ keyword: [
399
+ "new",
400
+ "array"
401
+ ]
402
+ },
403
+ contains: [
404
+ {
405
+ begin: /\[/,
406
+ end: /]/,
407
+ keywords: {
408
+ literal: d,
409
+ keyword: [
410
+ "new",
411
+ "array"
412
+ ]
413
+ },
414
+ contains: [
415
+ "self",
416
+ ...m
417
+ ]
418
+ },
419
+ ...m,
420
+ {
421
+ scope: "meta",
422
+ variants: [
423
+ { match: r },
424
+ { match: I }
425
+ ]
426
+ }
427
+ ]
428
+ };
429
+ return {
430
+ case_insensitive: !1,
431
+ keywords: b,
432
+ contains: [
433
+ v,
434
+ e.HASH_COMMENT_MODE,
435
+ e.COMMENT("//", "$"),
436
+ e.COMMENT(
437
+ "/\\*",
438
+ "\\*/",
439
+ { contains: [
440
+ {
441
+ scope: "doctag",
442
+ match: "@[A-Za-z]+"
443
+ }
444
+ ] }
445
+ ),
446
+ {
447
+ match: /__halt_compiler\(\);/,
448
+ keywords: "__halt_compiler",
449
+ starts: {
450
+ scope: "comment",
451
+ end: e.MATCH_NOTHING_RE,
452
+ contains: [
453
+ {
454
+ match: /\?>/,
455
+ scope: "meta",
456
+ endsParent: !0
457
+ }
458
+ ]
459
+ }
460
+ },
461
+ M,
462
+ {
463
+ scope: "variable.language",
464
+ match: /\$this\b/
465
+ },
466
+ E,
467
+ A,
468
+ l,
469
+ {
470
+ match: [
471
+ /const/,
472
+ /\s/,
473
+ o
474
+ ],
475
+ scope: {
476
+ 1: "keyword",
477
+ 3: "variable.constant"
478
+ }
479
+ },
480
+ O,
481
+ {
482
+ scope: "function",
483
+ relevance: 0,
484
+ beginKeywords: "fn function",
485
+ end: /[;{]/,
486
+ excludeEnd: !0,
487
+ illegal: "[$%\\[]",
488
+ contains: [
489
+ { beginKeywords: "use" },
490
+ e.UNDERSCORE_TITLE_MODE,
491
+ {
492
+ begin: "=>",
493
+ // No markup, just a relevance booster
494
+ endsParent: !0
495
+ },
496
+ {
497
+ scope: "params",
498
+ begin: "\\(",
499
+ end: "\\)",
500
+ excludeBegin: !0,
501
+ excludeEnd: !0,
502
+ keywords: b,
503
+ contains: [
504
+ "self",
505
+ v,
506
+ E,
507
+ l,
508
+ e.C_BLOCK_COMMENT_MODE,
509
+ i,
510
+ s
511
+ ]
512
+ }
513
+ ]
514
+ },
515
+ {
516
+ scope: "class",
517
+ variants: [
518
+ {
519
+ beginKeywords: "enum",
520
+ illegal: /[($"]/
521
+ },
522
+ {
523
+ beginKeywords: "class interface trait",
524
+ illegal: /[:($"]/
525
+ }
526
+ ],
527
+ relevance: 0,
528
+ end: /\{/,
529
+ excludeEnd: !0,
530
+ contains: [
531
+ { beginKeywords: "extends implements" },
532
+ e.UNDERSCORE_TITLE_MODE
533
+ ]
534
+ },
535
+ // both use and namespace still use "old style" rules (vs multi-match)
536
+ // because the namespace name can include `\` and we still want each
537
+ // element to be treated as its own *individual* title
538
+ {
539
+ beginKeywords: "namespace",
540
+ relevance: 0,
541
+ end: ";",
542
+ illegal: /[.']/,
543
+ contains: [e.inherit(e.UNDERSCORE_TITLE_MODE, { scope: "title.class" })]
544
+ },
545
+ {
546
+ beginKeywords: "use",
547
+ relevance: 0,
548
+ end: ";",
549
+ contains: [
550
+ // TODO: title.function vs title.class
551
+ {
552
+ match: /\b(as|const|function)\b/,
553
+ scope: "keyword"
554
+ },
555
+ // TODO: could be title.class or title.function
556
+ e.UNDERSCORE_TITLE_MODE
557
+ ]
558
+ },
559
+ i,
560
+ s
561
+ ]
562
+ };
563
+ }
564
+ export {
565
+ D as default
566
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function x(e){const t=e.regex,_=/(?![A-Za-z0-9])(?![$])/,o=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,_),r=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,_),g=t.concat(/[A-Z]+/,_),E={scope:"variable",match:"\\$+"+o},M={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},I={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},y=e.inherit(e.APOS_STRING_MODE,{illegal:null}),N=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(I)}),w={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(I),"on:begin":(n,a)=>{a.data._beginMatch=n[1]||n[2]},"on:end":(n,a)=>{a.data._beginMatch!==n[1]&&a.ignoreMatch()}},h=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),S=`[
2
+ ]`,i={scope:"string",variants:[N,y,w,h]},s={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},d=["false","null","true"],T=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],p=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],b={keyword:T,literal:(n=>{const a=[];return n.forEach(c=>{a.push(c),c.toLowerCase()===c?a.push(c.toUpperCase()):a.push(c.toLowerCase())}),a})(d),built_in:p},u=n=>n.map(a=>a.replace(/\|\d+$/,"")),O={variants:[{match:[/new/,t.concat(S,"+"),t.concat("(?!",u(p).join("\\b|"),"\\b)"),r],scope:{1:"keyword",4:"title.class"}}]},f=t.concat(o,"\\b(?!\\()"),l={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),f],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[r,t.concat(/::/,t.lookahead(/(?!class\b)/)),f],scope:{1:"title.class",3:"variable.constant"}},{match:[r,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[r,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},C={scope:"attr",match:t.concat(o,t.lookahead(":"),t.lookahead(/(?!::)/))},R={relevance:0,begin:/\(/,end:/\)/,keywords:b,contains:[C,E,l,e.C_BLOCK_COMMENT_MODE,i,s,O]},A={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",u(T).join("\\b|"),"|",u(p).join("\\b|"),"\\b)"),o,t.concat(S,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[R]};R.contains.push(A);const m=[C,l,e.C_BLOCK_COMMENT_MODE,i,s,O],v={begin:t.concat(/#\[\s*\\?/,t.either(r,g)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:d,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:d,keyword:["new","array"]},contains:["self",...m]},...m,{scope:"meta",variants:[{match:r},{match:g}]}]};return{case_insensitive:!1,keywords:b,contains:[v,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},M,{scope:"variable.language",match:/\$this\b/},E,A,l,{match:[/const/,/\s/,o],scope:{1:"keyword",3:"variable.constant"}},O,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:b,contains:["self",v,E,l,e.C_BLOCK_COMMENT_MODE,i,s]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},i,s]}}exports.default=x;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function y(e){const l=["string","char","byte","int","long","bool","decimal","single","double","DateTime","xml","array","hashtable","void"],p="Add|Clear|Close|Copy|Enter|Exit|Find|Format|Get|Hide|Join|Lock|Move|New|Open|Optimize|Pop|Push|Redo|Remove|Rename|Reset|Resize|Search|Select|Set|Show|Skip|Split|Step|Switch|Undo|Unlock|Watch|Backup|Checkpoint|Compare|Compress|Convert|ConvertFrom|ConvertTo|Dismount|Edit|Expand|Export|Group|Import|Initialize|Limit|Merge|Mount|Out|Publish|Restore|Save|Sync|Unpublish|Update|Approve|Assert|Build|Complete|Confirm|Deny|Deploy|Disable|Enable|Install|Invoke|Register|Request|Restart|Resume|Start|Stop|Submit|Suspend|Uninstall|Unregister|Wait|Debug|Measure|Ping|Repair|Resolve|Test|Trace|Connect|Disconnect|Read|Receive|Send|Write|Block|Grant|Protect|Revoke|Unblock|Unprotect|Use|ForEach|Sort|Tee|Where",g="-and|-as|-band|-bnot|-bor|-bxor|-casesensitive|-ccontains|-ceq|-cge|-cgt|-cle|-clike|-clt|-cmatch|-cne|-cnotcontains|-cnotlike|-cnotmatch|-contains|-creplace|-csplit|-eq|-exact|-f|-file|-ge|-gt|-icontains|-ieq|-ige|-igt|-ile|-ilike|-ilt|-imatch|-in|-ine|-inotcontains|-inotlike|-inotmatch|-ireplace|-is|-isnot|-isplit|-join|-le|-like|-lt|-match|-ne|-not|-notcontains|-notin|-notlike|-notmatch|-or|-regex|-replace|-shl|-shr|-split|-wildcard|-xor",s={$pattern:/-?[A-z\.\-]+\b/,keyword:"if else foreach return do while until elseif begin for trap data dynamicparam end break throw param continue finally in switch exit filter try process catch hidden static parameter",built_in:"ac asnp cat cd CFS chdir clc clear clhy cli clp cls clv cnsn compare copy cp cpi cpp curl cvpa dbp del diff dir dnsn ebp echo|0 epal epcsv epsn erase etsn exsn fc fhx fl ft fw gal gbp gc gcb gci gcm gcs gdr gerr ghy gi gin gjb gl gm gmo gp gps gpv group gsn gsnp gsv gtz gu gv gwmi h history icm iex ihy ii ipal ipcsv ipmo ipsn irm ise iwmi iwr kill lp ls man md measure mi mount move mp mv nal ndr ni nmo npssc nsn nv ogv oh popd ps pushd pwd r rbp rcjb rcsn rd rdr ren ri rjb rm rmdir rmo rni rnp rp rsn rsnp rujb rv rvpa rwmi sajb sal saps sasv sbp sc scb select set shcm si sl sleep sls sort sp spjb spps spsv start stz sujb sv swmi tee trcm type wget where wjb write"},d=/\w[\w\d]*((-)[\w\d]+)*/,t={begin:"`[\\s\\S]",relevance:0},n={className:"variable",variants:[{begin:/\$\B/},{className:"keyword",begin:/\$this/},{begin:/\$[\w\d][\w\d_:]*/}]},m={className:"literal",begin:/\$(null|true|false)\b/},i={className:"string",variants:[{begin:/"/,end:/"/},{begin:/@"/,end:/^"@/}],contains:[t,n,{className:"variable",begin:/\$[A-z]/,end:/[^A-z]/}]},a={className:"string",variants:[{begin:/'/,end:/'/},{begin:/@'/,end:/^'@/}]},b={className:"doctag",variants:[{begin:/\.(synopsis|description|example|inputs|outputs|notes|link|component|role|functionality)/},{begin:/\.(parameter|forwardhelptargetname|forwardhelpcategory|remotehelprunspace|externalhelp)\s+\S+/}]},u=e.inherit(e.COMMENT(null,null),{variants:[{begin:/#/,end:/$/},{begin:/<#/,end:/#>/}],contains:[b]}),v={className:"built_in",variants:[{begin:"(".concat(p,")+(-)[\\w\\d]+")}]},S={className:"class",beginKeywords:"class enum",end:/\s*[{]/,excludeEnd:!0,relevance:0,contains:[e.TITLE_MODE]},h={className:"function",begin:/function\s+/,end:/\s*\{|$/,excludeEnd:!0,returnBegin:!0,relevance:0,contains:[{begin:"function",relevance:0,className:"keyword"},{className:"title",begin:d,relevance:0},{begin:/\(/,end:/\)/,className:"params",relevance:0,contains:[n]}]},w={begin:/using\s/,end:/$/,returnBegin:!0,contains:[i,a,{className:"keyword",begin:/(using|assembly|command|module|namespace|type)/}]},E={variants:[{className:"operator",begin:"(".concat(g,")\\b")},{className:"literal",begin:/(-){1,2}[\w\d-]+/,relevance:0}]},N={className:"selector-tag",begin:/@\B/,relevance:0},c={className:"function",begin:/\[.*\]\s*[\w]+[ ]??\(/,end:/$/,returnBegin:!0,relevance:0,contains:[{className:"keyword",begin:"(".concat(s.keyword.toString().replace(/\s/g,"|"),")\\b"),endsParent:!0,relevance:0},e.inherit(e.TITLE_MODE,{endsParent:!0})]},r=[c,u,t,e.NUMBER_MODE,i,a,v,n,m,N],o={begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[].concat("self",r,{begin:"("+l.join("|")+")",className:"built_in",relevance:0},{className:"type",begin:/[\.\w\d]+/,relevance:0})};return c.contains.unshift(o),{name:"PowerShell",aliases:["pwsh","ps","ps1"],case_insensitive:!0,keywords:s,contains:r.concat(S,h,w,E,o)}}exports.default=y;