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.
- package/README.md +66 -7
- package/dist/LinkedInExtension-6xekO5bX.cjs +1 -0
- package/dist/LinkedInExtension-BL-4T9tt.js +21 -0
- package/dist/LogoExtension-BOYrY_RE.cjs +1 -0
- package/dist/LogoExtension-HOlSsQf-.js +27 -0
- package/dist/XExtension-GyRtdHLL.js +23 -0
- package/dist/XExtension-jAiATfg-.cjs +1 -0
- package/dist/apiuikit.cjs.js +1 -1
- package/dist/apiuikit.css +1 -1
- package/dist/apiuikit.es.js +24 -17
- package/dist/c-Bz1-FJiA.js +277 -0
- package/dist/c-C_Sx7N-F.cjs +1 -0
- package/dist/clojure-DWYEZwCD.cjs +1 -0
- package/dist/clojure-aY2138WD.js +135 -0
- package/dist/components/Authorization.d.ts +28 -17
- package/dist/components/ChannelAddress.d.ts +8 -2
- package/dist/components/CodeBlock.d.ts +4 -1
- package/dist/components/CodeSamples.d.ts +12 -0
- package/dist/components/CollapsiblePanel.d.ts +24 -0
- package/dist/components/CopyMarkdownButton.d.ts +15 -0
- package/dist/components/Examples.d.ts +4 -2
- package/dist/components/InfoMetadata.d.ts +21 -2
- package/dist/components/Markdown.d.ts +2 -0
- package/dist/components/MarkdownExportMenu.d.ts +13 -0
- package/dist/components/MethodBadge.d.ts +14 -0
- package/dist/components/Navigation/AsyncAPINavigation.d.ts +28 -0
- package/dist/components/Navigation/Navigation.d.ts +58 -0
- package/dist/components/Navigation/OpenAPINavigation.d.ts +22 -0
- package/dist/components/Navigation/SpecNavigation.d.ts +25 -0
- package/dist/components/Navigation/index.d.ts +4 -0
- package/dist/components/Navigation/sharedSections.d.ts +10 -0
- package/dist/components/RenderExtensions.d.ts +28 -0
- package/dist/components/Section.d.ts +3 -1
- package/dist/components/ServerAddressBanner.d.ts +16 -0
- package/dist/components/SidePanel.d.ts +2 -0
- package/dist/components/Tabs.d.ts +3 -1
- package/dist/components/schema/SchemaTab.d.ts +24 -3
- package/dist/components/tests/Authorization.test.d.ts +1 -0
- package/dist/components/tests/Bindings.test.d.ts +1 -0
- package/dist/components/tests/CodeBlock.test.d.ts +1 -0
- package/dist/components/tests/CodeSamples.test.d.ts +1 -0
- package/dist/components/tests/CopyMarkdownButton.test.d.ts +1 -0
- package/dist/components/tests/MarkdownExportMenu.test.d.ts +1 -0
- package/dist/components/tests/RenderExtensions.test.d.ts +1 -0
- package/dist/config/config.d.ts +10 -0
- package/dist/containers/AsyncAPI/AsyncAPI.d.ts +12 -6
- package/dist/containers/AsyncAPI/AsyncAPIRenderer.d.ts +9 -0
- package/dist/containers/Information/InformationSection.d.ts +22 -0
- package/dist/containers/Information/OpenAPIInformation.d.ts +9 -0
- package/dist/containers/OpenAPI/Layout.d.ts +7 -0
- package/dist/containers/OpenAPI/OpenAPI.d.ts +18 -0
- package/dist/containers/OpenAPI/OpenAPIDocumentProvider.d.ts +13 -0
- package/dist/containers/OpenAPI/OpenAPIRenderer.d.ts +17 -0
- package/dist/containers/OpenAPI/tests/OpenAPI.test.d.ts +1 -0
- package/dist/containers/OpenAPI/tests/OpenAPIRenderer.test.d.ts +1 -0
- package/dist/containers/Operation/Operations.d.ts +2 -1
- package/dist/containers/Path/OperationCallbacks.d.ts +37 -0
- package/dist/containers/Path/PathOperation.d.ts +21 -0
- package/dist/containers/Path/Paths.d.ts +16 -0
- package/dist/containers/Path/ResponseLinks.d.ts +21 -0
- package/dist/containers/Path/tests/PathOperation.test.d.ts +1 -0
- package/dist/containers/Server/OpenAPIServer.d.ts +4 -0
- package/dist/containers/Server/OpenAPIServers.d.ts +13 -0
- package/dist/contants.d.ts +7 -0
- package/dist/contexts/useSpec.d.ts +30 -6
- package/dist/crystal-BcGgviMR.cjs +1 -0
- package/dist/crystal-BtD5fR4q.js +283 -0
- package/dist/csharp-AnFv7wyC.js +382 -0
- package/dist/csharp-yuAGIuP4.cjs +1 -0
- package/dist/go-BpetKc7b.cjs +1 -0
- package/dist/go-CkZ9_bn0.js +151 -0
- package/dist/helpers/codeSamples.d.ts +92 -0
- package/dist/helpers/exampleSchema.d.ts +19 -0
- package/dist/helpers/hljsLanguages.d.ts +6 -0
- package/dist/helpers/openapiParser.d.ts +10 -0
- package/dist/helpers/openapiSearchIndex.d.ts +3 -0
- package/dist/helpers/resolveDocument.d.ts +8 -0
- package/dist/helpers/runtimeExpression.d.ts +15 -0
- package/dist/helpers/schemaExample.d.ts +9 -0
- package/dist/helpers/searchIndex.d.ts +5 -2
- package/dist/helpers/tests/codeSamples.test.d.ts +1 -0
- package/dist/helpers/tests/exampleSchema.test.d.ts +1 -0
- package/dist/helpers/tests/openapiSearchIndex.test.d.ts +1 -0
- package/dist/helpers/tests/toMarkdown.test.d.ts +1 -0
- package/dist/helpers/toMarkdown.d.ts +20 -0
- package/dist/hooks/useDocumentProviderValue.d.ts +27 -0
- package/dist/hooks/useFuseSearch.d.ts +14 -0
- package/dist/hooks/useOpenAPISearch.d.ts +9 -0
- package/dist/hooks/useSearchResultFocus.d.ts +18 -0
- package/dist/hooks/useSpecLayoutController.d.ts +51 -0
- package/dist/hooks/useSpecSearch.d.ts +2 -6
- package/dist/http--XH4hLDt.cjs +1 -0
- package/dist/http-DKeNlJKS.js +85 -0
- package/dist/icons/Copy.d.ts +6 -0
- package/dist/icons/Info.d.ts +5 -0
- package/dist/icons/Search.d.ts +3 -0
- package/dist/{index-D7GelPk0.cjs → index-ArzwV232.cjs} +6 -6
- package/dist/index-Bh4OKjMA.js +25412 -0
- package/dist/index-C278WDNb.cjs +139 -0
- package/dist/index-C4I0xC5G.js +17544 -0
- package/dist/index-DuW5iShy.cjs +177 -0
- package/dist/index-PtAFPDfk.js +18851 -0
- package/dist/index.d.ts +7 -0
- package/dist/java-BIk0G-rH.cjs +1 -0
- package/dist/java-BicX26Pg.js +240 -0
- package/dist/kotlin-BwB8b-YX.js +242 -0
- package/dist/kotlin-kGuORR5a.cjs +2 -0
- package/dist/objectivec-CnyrJ13Z.js +237 -0
- package/dist/objectivec-CoeV81Tz.cjs +1 -0
- package/dist/ocaml-0j7KDjso.cjs +1 -0
- package/dist/ocaml-T8IqWCjo.js +67 -0
- package/dist/php-BL35ZHWM.js +566 -0
- package/dist/php-DF4zG2hq.cjs +2 -0
- package/dist/powershell-CvydS3ek.cjs +1 -0
- package/dist/powershell-DuhUKWoO.js +236 -0
- package/dist/protoToJsonSchema-AciPTlBK.cjs +83 -0
- package/dist/protoToJsonSchema-D1lojrO3.js +6131 -0
- package/dist/{protobufSchemaParser-D_2rEsD4.cjs → protobufSchemaParser-7SgmMhQd.cjs} +1 -1
- package/dist/{protobufSchemaParser-Cj2WOp05.js → protobufSchemaParser-BohWo_pY.js} +2 -2
- package/dist/public/createSectionRoot.d.ts +30 -0
- package/dist/public/openapiSections.d.ts +26 -0
- package/dist/public/sections.d.ts +6 -3
- package/dist/r-B8fCBydS.js +207 -0
- package/dist/r-CYaZnHkA.cjs +1 -0
- package/dist/ruby-CvOid-1s.js +388 -0
- package/dist/ruby-nPcbuC2a.cjs +1 -0
- package/dist/rust-BocnJ3Ns.js +305 -0
- package/dist/rust-DKnYCg2f.cjs +1 -0
- package/dist/stories/AsyncAPI.stories.d.ts +6 -0
- package/dist/stories/AsyncAPIRenderer.stories.d.ts +6 -0
- package/dist/stories/Messages.stories.d.ts +1 -0
- package/dist/stories/Operations.stories.d.ts +6 -0
- package/dist/stories/SchemaTab.stories.d.ts +1 -0
- package/dist/stories/SchemaTree.stories.d.ts +1 -0
- package/dist/stories/Server.stories.d.ts +1 -0
- package/dist/stories/documentContextDecorator.d.ts +2 -2
- package/dist/stories/noCanvasDocsPage.d.ts +9 -0
- package/dist/swift-C35Eof-I.js +799 -0
- package/dist/swift-CAnH__EC.cjs +1 -0
- package/dist/types/openapi.d.ts +85 -0
- package/package.json +16 -3
- package/dist/components/Navigation.d.ts +0 -28
- package/dist/icons/SideBar.d.ts +0 -6
- package/dist/index-Bad1aEIj.js +0 -11352
- package/dist/index-CzcxQGxP.js +0 -25414
- package/dist/index-gn5KpvCL.cjs +0 -73
- package/dist/protoToJsonSchema-8Mm10CIx.cjs +0 -83
- package/dist/protoToJsonSchema-BJpwl2Am.js +0 -6174
- package/dist/vite.svg +0 -1
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
function c(e) {
|
|
2
|
+
const t = {
|
|
3
|
+
className: "built_in",
|
|
4
|
+
begin: "\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"
|
|
5
|
+
}, n = /[a-zA-Z@][a-zA-Z0-9_]*/, i = {
|
|
6
|
+
"variable.language": [
|
|
7
|
+
"this",
|
|
8
|
+
"super"
|
|
9
|
+
],
|
|
10
|
+
$pattern: n,
|
|
11
|
+
keyword: [
|
|
12
|
+
"while",
|
|
13
|
+
"export",
|
|
14
|
+
"sizeof",
|
|
15
|
+
"typedef",
|
|
16
|
+
"const",
|
|
17
|
+
"struct",
|
|
18
|
+
"for",
|
|
19
|
+
"union",
|
|
20
|
+
"volatile",
|
|
21
|
+
"static",
|
|
22
|
+
"mutable",
|
|
23
|
+
"if",
|
|
24
|
+
"do",
|
|
25
|
+
"return",
|
|
26
|
+
"goto",
|
|
27
|
+
"enum",
|
|
28
|
+
"else",
|
|
29
|
+
"break",
|
|
30
|
+
"extern",
|
|
31
|
+
"asm",
|
|
32
|
+
"case",
|
|
33
|
+
"default",
|
|
34
|
+
"register",
|
|
35
|
+
"explicit",
|
|
36
|
+
"typename",
|
|
37
|
+
"switch",
|
|
38
|
+
"continue",
|
|
39
|
+
"inline",
|
|
40
|
+
"readonly",
|
|
41
|
+
"assign",
|
|
42
|
+
"readwrite",
|
|
43
|
+
"self",
|
|
44
|
+
"@synchronized",
|
|
45
|
+
"id",
|
|
46
|
+
"typeof",
|
|
47
|
+
"nonatomic",
|
|
48
|
+
"IBOutlet",
|
|
49
|
+
"IBAction",
|
|
50
|
+
"strong",
|
|
51
|
+
"weak",
|
|
52
|
+
"copy",
|
|
53
|
+
"in",
|
|
54
|
+
"out",
|
|
55
|
+
"inout",
|
|
56
|
+
"bycopy",
|
|
57
|
+
"byref",
|
|
58
|
+
"oneway",
|
|
59
|
+
"__strong",
|
|
60
|
+
"__weak",
|
|
61
|
+
"__block",
|
|
62
|
+
"__autoreleasing",
|
|
63
|
+
"@private",
|
|
64
|
+
"@protected",
|
|
65
|
+
"@public",
|
|
66
|
+
"@try",
|
|
67
|
+
"@property",
|
|
68
|
+
"@end",
|
|
69
|
+
"@throw",
|
|
70
|
+
"@catch",
|
|
71
|
+
"@finally",
|
|
72
|
+
"@autoreleasepool",
|
|
73
|
+
"@synthesize",
|
|
74
|
+
"@dynamic",
|
|
75
|
+
"@selector",
|
|
76
|
+
"@optional",
|
|
77
|
+
"@required",
|
|
78
|
+
"@encode",
|
|
79
|
+
"@package",
|
|
80
|
+
"@import",
|
|
81
|
+
"@defs",
|
|
82
|
+
"@compatibility_alias",
|
|
83
|
+
"__bridge",
|
|
84
|
+
"__bridge_transfer",
|
|
85
|
+
"__bridge_retained",
|
|
86
|
+
"__bridge_retain",
|
|
87
|
+
"__covariant",
|
|
88
|
+
"__contravariant",
|
|
89
|
+
"__kindof",
|
|
90
|
+
"_Nonnull",
|
|
91
|
+
"_Nullable",
|
|
92
|
+
"_Null_unspecified",
|
|
93
|
+
"__FUNCTION__",
|
|
94
|
+
"__PRETTY_FUNCTION__",
|
|
95
|
+
"__attribute__",
|
|
96
|
+
"getter",
|
|
97
|
+
"setter",
|
|
98
|
+
"retain",
|
|
99
|
+
"unsafe_unretained",
|
|
100
|
+
"nonnull",
|
|
101
|
+
"nullable",
|
|
102
|
+
"null_unspecified",
|
|
103
|
+
"null_resettable",
|
|
104
|
+
"class",
|
|
105
|
+
"instancetype",
|
|
106
|
+
"NS_DESIGNATED_INITIALIZER",
|
|
107
|
+
"NS_UNAVAILABLE",
|
|
108
|
+
"NS_REQUIRES_SUPER",
|
|
109
|
+
"NS_RETURNS_INNER_POINTER",
|
|
110
|
+
"NS_INLINE",
|
|
111
|
+
"NS_AVAILABLE",
|
|
112
|
+
"NS_DEPRECATED",
|
|
113
|
+
"NS_ENUM",
|
|
114
|
+
"NS_OPTIONS",
|
|
115
|
+
"NS_SWIFT_UNAVAILABLE",
|
|
116
|
+
"NS_ASSUME_NONNULL_BEGIN",
|
|
117
|
+
"NS_ASSUME_NONNULL_END",
|
|
118
|
+
"NS_REFINED_FOR_SWIFT",
|
|
119
|
+
"NS_SWIFT_NAME",
|
|
120
|
+
"NS_SWIFT_NOTHROW",
|
|
121
|
+
"NS_DURING",
|
|
122
|
+
"NS_HANDLER",
|
|
123
|
+
"NS_ENDHANDLER",
|
|
124
|
+
"NS_VALUERETURN",
|
|
125
|
+
"NS_VOIDRETURN"
|
|
126
|
+
],
|
|
127
|
+
literal: [
|
|
128
|
+
"false",
|
|
129
|
+
"true",
|
|
130
|
+
"FALSE",
|
|
131
|
+
"TRUE",
|
|
132
|
+
"nil",
|
|
133
|
+
"YES",
|
|
134
|
+
"NO",
|
|
135
|
+
"NULL"
|
|
136
|
+
],
|
|
137
|
+
built_in: [
|
|
138
|
+
"dispatch_once_t",
|
|
139
|
+
"dispatch_queue_t",
|
|
140
|
+
"dispatch_sync",
|
|
141
|
+
"dispatch_async",
|
|
142
|
+
"dispatch_once"
|
|
143
|
+
],
|
|
144
|
+
type: [
|
|
145
|
+
"int",
|
|
146
|
+
"float",
|
|
147
|
+
"char",
|
|
148
|
+
"unsigned",
|
|
149
|
+
"signed",
|
|
150
|
+
"short",
|
|
151
|
+
"long",
|
|
152
|
+
"double",
|
|
153
|
+
"wchar_t",
|
|
154
|
+
"unichar",
|
|
155
|
+
"void",
|
|
156
|
+
"bool",
|
|
157
|
+
"BOOL",
|
|
158
|
+
"id|0",
|
|
159
|
+
"_Bool"
|
|
160
|
+
]
|
|
161
|
+
}, _ = {
|
|
162
|
+
$pattern: n,
|
|
163
|
+
keyword: [
|
|
164
|
+
"@interface",
|
|
165
|
+
"@class",
|
|
166
|
+
"@protocol",
|
|
167
|
+
"@implementation"
|
|
168
|
+
]
|
|
169
|
+
};
|
|
170
|
+
return {
|
|
171
|
+
name: "Objective-C",
|
|
172
|
+
aliases: [
|
|
173
|
+
"mm",
|
|
174
|
+
"objc",
|
|
175
|
+
"obj-c",
|
|
176
|
+
"obj-c++",
|
|
177
|
+
"objective-c++"
|
|
178
|
+
],
|
|
179
|
+
keywords: i,
|
|
180
|
+
illegal: "</",
|
|
181
|
+
contains: [
|
|
182
|
+
t,
|
|
183
|
+
e.C_LINE_COMMENT_MODE,
|
|
184
|
+
e.C_BLOCK_COMMENT_MODE,
|
|
185
|
+
e.C_NUMBER_MODE,
|
|
186
|
+
e.QUOTE_STRING_MODE,
|
|
187
|
+
e.APOS_STRING_MODE,
|
|
188
|
+
{
|
|
189
|
+
className: "string",
|
|
190
|
+
variants: [
|
|
191
|
+
{
|
|
192
|
+
begin: '@"',
|
|
193
|
+
end: '"',
|
|
194
|
+
illegal: "\\n",
|
|
195
|
+
contains: [e.BACKSLASH_ESCAPE]
|
|
196
|
+
}
|
|
197
|
+
]
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
className: "meta",
|
|
201
|
+
begin: /#\s*[a-z]+\b/,
|
|
202
|
+
end: /$/,
|
|
203
|
+
keywords: { keyword: "if else elif endif define undef warning error line pragma ifdef ifndef include" },
|
|
204
|
+
contains: [
|
|
205
|
+
{
|
|
206
|
+
begin: /\\\n/,
|
|
207
|
+
relevance: 0
|
|
208
|
+
},
|
|
209
|
+
e.inherit(e.QUOTE_STRING_MODE, { className: "string" }),
|
|
210
|
+
{
|
|
211
|
+
className: "string",
|
|
212
|
+
begin: /<.*?>/,
|
|
213
|
+
end: /$/,
|
|
214
|
+
illegal: "\\n"
|
|
215
|
+
},
|
|
216
|
+
e.C_LINE_COMMENT_MODE,
|
|
217
|
+
e.C_BLOCK_COMMENT_MODE
|
|
218
|
+
]
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
className: "class",
|
|
222
|
+
begin: "(" + _.keyword.join("|") + ")\\b",
|
|
223
|
+
end: /(\{|$)/,
|
|
224
|
+
excludeEnd: !0,
|
|
225
|
+
keywords: _,
|
|
226
|
+
contains: [e.UNDERSCORE_TITLE_MODE]
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
begin: "\\." + e.UNDERSCORE_IDENT_RE,
|
|
230
|
+
relevance: 0
|
|
231
|
+
}
|
|
232
|
+
]
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
export {
|
|
236
|
+
c as default
|
|
237
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function a(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,i={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},_={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:i,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+_.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:_,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}exports.default=a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function n(e){return{name:"OCaml",aliases:["ml"],keywords:{$pattern:"[a-z_]\\w*!?",keyword:"and as assert asr begin class constraint do done downto else end exception external for fun function functor if in include inherit! inherit initializer land lazy let lor lsl lsr lxor match method!|10 method mod module mutable new object of open! open or private rec sig struct then to try type val! val virtual when while with parser value",built_in:"array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit in_channel out_channel ref",literal:"true false"},illegal:/\/\/|>>/,contains:[{className:"literal",begin:"\\[(\\|\\|)?\\]|\\(\\)",relevance:0},e.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"type",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*",relevance:0},e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/->/}]}}exports.default=n;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
function n(e) {
|
|
2
|
+
return {
|
|
3
|
+
name: "OCaml",
|
|
4
|
+
aliases: ["ml"],
|
|
5
|
+
keywords: {
|
|
6
|
+
$pattern: "[a-z_]\\w*!?",
|
|
7
|
+
keyword: "and as assert asr begin class constraint do done downto else end exception external for fun function functor if in include inherit! inherit initializer land lazy let lor lsl lsr lxor match method!|10 method mod module mutable new object of open! open or private rec sig struct then to try type val! val virtual when while with parser value",
|
|
8
|
+
built_in: (
|
|
9
|
+
/* built-in types */
|
|
10
|
+
"array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit in_channel out_channel ref"
|
|
11
|
+
),
|
|
12
|
+
literal: "true false"
|
|
13
|
+
},
|
|
14
|
+
illegal: /\/\/|>>/,
|
|
15
|
+
contains: [
|
|
16
|
+
{
|
|
17
|
+
className: "literal",
|
|
18
|
+
begin: "\\[(\\|\\|)?\\]|\\(\\)",
|
|
19
|
+
relevance: 0
|
|
20
|
+
},
|
|
21
|
+
e.COMMENT(
|
|
22
|
+
"\\(\\*",
|
|
23
|
+
"\\*\\)",
|
|
24
|
+
{ contains: ["self"] }
|
|
25
|
+
),
|
|
26
|
+
{
|
|
27
|
+
/* type variable */
|
|
28
|
+
className: "symbol",
|
|
29
|
+
begin: "'[A-Za-z_](?!')[\\w']*"
|
|
30
|
+
/* the grammar is ambiguous on how 'a'b should be interpreted but not the compiler */
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
/* polymorphic variant */
|
|
34
|
+
className: "type",
|
|
35
|
+
begin: "`[A-Z][\\w']*"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
/* module or constructor */
|
|
39
|
+
className: "type",
|
|
40
|
+
begin: "\\b[A-Z][\\w']*",
|
|
41
|
+
relevance: 0
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
/* don't color identifiers, but safely catch all identifiers with ' */
|
|
45
|
+
begin: "[a-z_]\\w*'[\\w']*",
|
|
46
|
+
relevance: 0
|
|
47
|
+
},
|
|
48
|
+
e.inherit(e.APOS_STRING_MODE, {
|
|
49
|
+
className: "string",
|
|
50
|
+
relevance: 0
|
|
51
|
+
}),
|
|
52
|
+
e.inherit(e.QUOTE_STRING_MODE, { illegal: null }),
|
|
53
|
+
{
|
|
54
|
+
className: "number",
|
|
55
|
+
begin: "\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",
|
|
56
|
+
relevance: 0
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
begin: /->/
|
|
60
|
+
// relevance booster
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
export {
|
|
66
|
+
n as default
|
|
67
|
+
};
|