@apiuikit/web-component 1.4.0 → 1.6.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 +21 -1
- package/dist/CodeSamples-Dm277WGX-CiKryuS0.js +4238 -0
- package/dist/LinkedInExtension-BL-4T9tt-CFjbqkhZ.js +21 -0
- package/dist/LogoExtension-Bhw9grDi-DFPgcRdp.js +16 -0
- package/dist/XExtension-GyRtdHLL-hbNYWxJs.js +23 -0
- package/dist/c-Bz1-FJiA-CwNanOv1.js +277 -0
- package/dist/clojure-aY2138WD-CzZhvUkO.js +135 -0
- package/dist/crystal-BtD5fR4q-B1F7Ovrt.js +283 -0
- package/dist/csharp-AnFv7wyC-DBJ0ahb9.js +382 -0
- package/dist/elements/asyncapi-info.d.ts +7 -0
- package/dist/elements/asyncapi-info.js +17 -0
- package/dist/elements/asyncapi-messages.d.ts +7 -0
- package/dist/elements/asyncapi-messages.js +17 -0
- package/dist/elements/asyncapi-operations.d.ts +7 -0
- package/dist/elements/asyncapi-operations.js +17 -0
- package/dist/elements/asyncapi-renderer.d.ts +7 -0
- package/dist/elements/asyncapi-renderer.js +17 -0
- package/dist/elements/asyncapi-servers.d.ts +7 -0
- package/dist/elements/asyncapi-servers.js +17 -0
- package/dist/elements/asyncapi.d.ts +7 -0
- package/dist/elements/asyncapi.js +17 -0
- package/dist/elements/openapi-endpoints.d.ts +7 -0
- package/dist/elements/openapi-endpoints.js +17 -0
- package/dist/elements/openapi-info.d.ts +7 -0
- package/dist/elements/openapi-info.js +17 -0
- package/dist/elements/openapi-renderer.d.ts +7 -0
- package/dist/elements/openapi-renderer.js +17 -0
- package/dist/elements/openapi-servers.d.ts +7 -0
- package/dist/elements/openapi-servers.js +17 -0
- package/dist/elements/openapi-webhooks.d.ts +7 -0
- package/dist/elements/openapi-webhooks.js +17 -0
- package/dist/elements/openapi.d.ts +7 -0
- package/dist/elements/openapi.js +17 -0
- package/dist/elements/schemas.d.ts +7 -0
- package/dist/elements/schemas.js +17 -0
- package/dist/go-CkZ9_bn0-BavTPlHs.js +151 -0
- package/dist/http-DKeNlJKS-CncZekYb.js +85 -0
- package/dist/index-ButmLtm3-BxvUFOqt.js +25403 -0
- package/dist/index-ByTEMZ1h-D8WOAtLD.js +17529 -0
- package/dist/index-DCDYBZcY-B5md4zhj.js +1459 -0
- package/dist/java-BicX26Pg-BE9j1hqd.js +240 -0
- package/dist/kotlin-BwB8b-YX-DrhZ7rRS.js +242 -0
- package/dist/objectivec-CnyrJ13Z-crbGiB8Q.js +237 -0
- package/dist/ocaml-T8IqWCjo-T8IqWCjo.js +67 -0
- package/dist/php-BL35ZHWM-BVESXHm8.js +566 -0
- package/dist/powershell-DuhUKWoO-BkKc-lpt.js +236 -0
- package/dist/protoToJsonSchema-Bu1_KtXF-DMb0R0EM.js +6127 -0
- package/dist/protobufSchemaParser--9dltEfO-BJdsvVd_.js +55 -0
- package/dist/r-B8fCBydS-B8fCBydS.js +207 -0
- package/dist/registerElement-qkr8S33y.js +25763 -0
- package/dist/ruby-CvOid-1s-CANQXRsZ.js +386 -0
- package/dist/rust-BocnJ3Ns-BBcgTcYY.js +305 -0
- package/dist/swift-C35Eof-I-CeYSuGtY.js +799 -0
- package/dist/web-component.css +1 -1
- package/dist/web-component.es.js +23861 -23133
- package/dist/web-component.iife.js +336 -333
- package/package.json +57 -5
- package/dist/adapters.d.ts +0 -25
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ConfigInterface, AsyncAPIDocumentData, SectionLayout } from 'apiuikit';
|
|
2
|
+
export interface AsyncApiOperationsElementProps {
|
|
3
|
+
spec?: AsyncAPIDocumentData;
|
|
4
|
+
config?: ConfigInterface;
|
|
5
|
+
layout?: SectionLayout;
|
|
6
|
+
}
|
|
7
|
+
export declare function AsyncApiOperationsElement({ spec, config, layout }: AsyncApiOperationsElementProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { d as s, s as t, j as e, k as r } from "../registerElement-qkr8S33y.js";
|
|
2
|
+
function p({ spec: n, config: i, layout: o }) {
|
|
3
|
+
return n ? /* @__PURE__ */ e.jsx(r, { document: n, config: i, layout: o }) : null;
|
|
4
|
+
}
|
|
5
|
+
s(
|
|
6
|
+
"apiuikit-asyncapi-operations",
|
|
7
|
+
t(p, {
|
|
8
|
+
props: {
|
|
9
|
+
spec: void 0,
|
|
10
|
+
config: "json",
|
|
11
|
+
layout: "string"
|
|
12
|
+
}
|
|
13
|
+
})
|
|
14
|
+
);
|
|
15
|
+
export {
|
|
16
|
+
p as AsyncApiOperationsElement
|
|
17
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ConfigInterface } from 'apiuikit';
|
|
2
|
+
export interface AsyncApiRendererElementProps {
|
|
3
|
+
spec?: string;
|
|
4
|
+
config?: ConfigInterface;
|
|
5
|
+
onDiagnostics?: (diagnostics: unknown[]) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function AsyncApiRendererElement({ spec, config, onDiagnostics }: AsyncApiRendererElementProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { d as i, s, j as o, g as t } from "../registerElement-qkr8S33y.js";
|
|
2
|
+
function a({ spec: n, config: r, onDiagnostics: e }) {
|
|
3
|
+
return n ? /* @__PURE__ */ o.jsx(t, { raw: n, config: r, onDiagnostics: e }) : null;
|
|
4
|
+
}
|
|
5
|
+
i(
|
|
6
|
+
"apiuikit-asyncapi-renderer",
|
|
7
|
+
s(a, {
|
|
8
|
+
props: {
|
|
9
|
+
spec: "string",
|
|
10
|
+
config: "json",
|
|
11
|
+
onDiagnostics: void 0
|
|
12
|
+
}
|
|
13
|
+
})
|
|
14
|
+
);
|
|
15
|
+
export {
|
|
16
|
+
a as AsyncApiRendererElement
|
|
17
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ConfigInterface, AsyncAPIDocumentData, SectionLayout } from 'apiuikit';
|
|
2
|
+
export interface AsyncApiServersElementProps {
|
|
3
|
+
spec?: AsyncAPIDocumentData;
|
|
4
|
+
config?: ConfigInterface;
|
|
5
|
+
layout?: SectionLayout;
|
|
6
|
+
}
|
|
7
|
+
export declare function AsyncApiServersElement({ spec, config, layout }: AsyncApiServersElementProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { d as r, s as i, j as t, w as o } from "../registerElement-qkr8S33y.js";
|
|
2
|
+
function p({ spec: n, config: s, layout: e }) {
|
|
3
|
+
return n ? /* @__PURE__ */ t.jsx(o, { document: n, config: s, layout: e }) : null;
|
|
4
|
+
}
|
|
5
|
+
r(
|
|
6
|
+
"apiuikit-asyncapi-servers",
|
|
7
|
+
i(p, {
|
|
8
|
+
props: {
|
|
9
|
+
spec: void 0,
|
|
10
|
+
config: "json",
|
|
11
|
+
layout: "string"
|
|
12
|
+
}
|
|
13
|
+
})
|
|
14
|
+
);
|
|
15
|
+
export {
|
|
16
|
+
p as AsyncApiServersElement
|
|
17
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ConfigInterface, AsyncAPIDocumentData } from 'apiuikit';
|
|
2
|
+
export interface AsyncApiElementProps {
|
|
3
|
+
spec?: AsyncAPIDocumentData;
|
|
4
|
+
resolved?: boolean;
|
|
5
|
+
config?: ConfigInterface;
|
|
6
|
+
}
|
|
7
|
+
export declare function AsyncApiElement({ spec, resolved, config }: AsyncApiElementProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { d as a, s as r, j as i, X as e } from "../registerElement-qkr8S33y.js";
|
|
2
|
+
function p({ spec: n, resolved: o, config: s }) {
|
|
3
|
+
return n ? o ? /* @__PURE__ */ i.jsx(e, { kind: "resolved", asyncapi: n, config: s }) : /* @__PURE__ */ i.jsx(e, { asyncapi: n, config: s }) : null;
|
|
4
|
+
}
|
|
5
|
+
a(
|
|
6
|
+
"apiuikit-asyncapi",
|
|
7
|
+
r(p, {
|
|
8
|
+
props: {
|
|
9
|
+
spec: void 0,
|
|
10
|
+
resolved: "boolean",
|
|
11
|
+
config: "json"
|
|
12
|
+
}
|
|
13
|
+
})
|
|
14
|
+
);
|
|
15
|
+
export {
|
|
16
|
+
p as AsyncApiElement
|
|
17
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ConfigInterface, OpenAPIDocumentData, SectionLayout } from 'apiuikit';
|
|
2
|
+
export interface OpenApiEndpointsElementProps {
|
|
3
|
+
spec?: OpenAPIDocumentData;
|
|
4
|
+
config?: ConfigInterface;
|
|
5
|
+
layout?: SectionLayout;
|
|
6
|
+
}
|
|
7
|
+
export declare function OpenApiEndpointsElement({ spec, config, layout }: OpenApiEndpointsElementProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { d as t, s as e, j as p, T as s } from "../registerElement-qkr8S33y.js";
|
|
2
|
+
function r({ spec: n, config: i, layout: o }) {
|
|
3
|
+
return n ? /* @__PURE__ */ p.jsx(s, { document: n, config: i, layout: o }) : null;
|
|
4
|
+
}
|
|
5
|
+
t(
|
|
6
|
+
"apiuikit-openapi-endpoints",
|
|
7
|
+
e(r, {
|
|
8
|
+
props: {
|
|
9
|
+
spec: void 0,
|
|
10
|
+
config: "json",
|
|
11
|
+
layout: "string"
|
|
12
|
+
}
|
|
13
|
+
})
|
|
14
|
+
);
|
|
15
|
+
export {
|
|
16
|
+
r as OpenApiEndpointsElement
|
|
17
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ConfigInterface, OpenAPIDocumentData, SectionLayout } from 'apiuikit';
|
|
2
|
+
export interface OpenApiInfoElementProps {
|
|
3
|
+
spec?: OpenAPIDocumentData;
|
|
4
|
+
config?: ConfigInterface;
|
|
5
|
+
layout?: SectionLayout;
|
|
6
|
+
}
|
|
7
|
+
export declare function OpenApiInfoElement({ spec, config, layout }: OpenApiInfoElementProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { d as e, s as t, j as p, $ as r } from "../registerElement-qkr8S33y.js";
|
|
2
|
+
function s({ spec: n, config: i, layout: o }) {
|
|
3
|
+
return n ? /* @__PURE__ */ p.jsx(r, { document: n, config: i, layout: o }) : null;
|
|
4
|
+
}
|
|
5
|
+
e(
|
|
6
|
+
"apiuikit-openapi-info",
|
|
7
|
+
t(s, {
|
|
8
|
+
props: {
|
|
9
|
+
spec: void 0,
|
|
10
|
+
config: "json",
|
|
11
|
+
layout: "string"
|
|
12
|
+
}
|
|
13
|
+
})
|
|
14
|
+
);
|
|
15
|
+
export {
|
|
16
|
+
s as OpenApiInfoElement
|
|
17
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ConfigInterface } from 'apiuikit';
|
|
2
|
+
export interface OpenApiRendererElementProps {
|
|
3
|
+
spec?: string;
|
|
4
|
+
config?: ConfigInterface;
|
|
5
|
+
onDiagnostics?: (diagnostics: unknown[]) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function OpenApiRendererElement({ spec, config, onDiagnostics }: OpenApiRendererElementProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { d as i, s as o, j as s, y as t } from "../registerElement-qkr8S33y.js";
|
|
2
|
+
function p({ spec: n, config: e, onDiagnostics: r }) {
|
|
3
|
+
return n ? /* @__PURE__ */ s.jsx(t, { raw: n, config: e, onDiagnostics: r }) : null;
|
|
4
|
+
}
|
|
5
|
+
i(
|
|
6
|
+
"apiuikit-openapi-renderer",
|
|
7
|
+
o(p, {
|
|
8
|
+
props: {
|
|
9
|
+
spec: "string",
|
|
10
|
+
config: "json",
|
|
11
|
+
onDiagnostics: void 0
|
|
12
|
+
}
|
|
13
|
+
})
|
|
14
|
+
);
|
|
15
|
+
export {
|
|
16
|
+
p as OpenApiRendererElement
|
|
17
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ConfigInterface, OpenAPIDocumentData, SectionLayout } from 'apiuikit';
|
|
2
|
+
export interface OpenApiServersElementProps {
|
|
3
|
+
spec?: OpenAPIDocumentData;
|
|
4
|
+
config?: ConfigInterface;
|
|
5
|
+
layout?: SectionLayout;
|
|
6
|
+
}
|
|
7
|
+
export declare function OpenApiServersElement({ spec, config, layout }: OpenApiServersElementProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { d as i, s, j as o, N as t } from "../registerElement-qkr8S33y.js";
|
|
2
|
+
function p({ spec: e, config: n, layout: r }) {
|
|
3
|
+
return e ? /* @__PURE__ */ o.jsx(t, { document: e, config: n, layout: r }) : null;
|
|
4
|
+
}
|
|
5
|
+
i(
|
|
6
|
+
"apiuikit-openapi-servers",
|
|
7
|
+
s(p, {
|
|
8
|
+
props: {
|
|
9
|
+
spec: void 0,
|
|
10
|
+
config: "json",
|
|
11
|
+
layout: "string"
|
|
12
|
+
}
|
|
13
|
+
})
|
|
14
|
+
);
|
|
15
|
+
export {
|
|
16
|
+
p as OpenApiServersElement
|
|
17
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ConfigInterface, OpenAPIDocumentData, SectionLayout } from 'apiuikit';
|
|
2
|
+
export interface OpenApiWebhooksElementProps {
|
|
3
|
+
spec?: OpenAPIDocumentData;
|
|
4
|
+
config?: ConfigInterface;
|
|
5
|
+
layout?: SectionLayout;
|
|
6
|
+
}
|
|
7
|
+
export declare function OpenApiWebhooksElement({ spec, config, layout }: OpenApiWebhooksElementProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { d as i, s, j as t, _ as p } from "../registerElement-qkr8S33y.js";
|
|
2
|
+
function r({ spec: o, config: n, layout: e }) {
|
|
3
|
+
return o ? /* @__PURE__ */ t.jsx(p, { document: o, config: n, layout: e }) : null;
|
|
4
|
+
}
|
|
5
|
+
i(
|
|
6
|
+
"apiuikit-openapi-webhooks",
|
|
7
|
+
s(r, {
|
|
8
|
+
props: {
|
|
9
|
+
spec: void 0,
|
|
10
|
+
config: "json",
|
|
11
|
+
layout: "string"
|
|
12
|
+
}
|
|
13
|
+
})
|
|
14
|
+
);
|
|
15
|
+
export {
|
|
16
|
+
r as OpenApiWebhooksElement
|
|
17
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ConfigInterface, OpenAPIDocumentData } from 'apiuikit';
|
|
2
|
+
export interface OpenApiElementProps {
|
|
3
|
+
spec?: OpenAPIDocumentData;
|
|
4
|
+
resolved?: boolean;
|
|
5
|
+
config?: ConfigInterface;
|
|
6
|
+
}
|
|
7
|
+
export declare function OpenApiElement({ spec, resolved, config }: OpenApiElementProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { d as r, s, j as n, o as i } from "../registerElement-qkr8S33y.js";
|
|
2
|
+
function t({ spec: e, resolved: p, config: o }) {
|
|
3
|
+
return e ? p ? /* @__PURE__ */ n.jsx(i, { kind: "resolved", openapi: e, config: o }) : /* @__PURE__ */ n.jsx(i, { openapi: e, config: o }) : null;
|
|
4
|
+
}
|
|
5
|
+
r(
|
|
6
|
+
"apiuikit-openapi",
|
|
7
|
+
s(t, {
|
|
8
|
+
props: {
|
|
9
|
+
spec: void 0,
|
|
10
|
+
resolved: "boolean",
|
|
11
|
+
config: "json"
|
|
12
|
+
}
|
|
13
|
+
})
|
|
14
|
+
);
|
|
15
|
+
export {
|
|
16
|
+
t as OpenApiElement
|
|
17
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ConfigInterface, AsyncAPIDocumentData, OpenAPIDocumentData, SectionLayout } from 'apiuikit';
|
|
2
|
+
export interface SchemasElementProps {
|
|
3
|
+
spec?: AsyncAPIDocumentData | OpenAPIDocumentData;
|
|
4
|
+
config?: ConfigInterface;
|
|
5
|
+
layout?: SectionLayout;
|
|
6
|
+
}
|
|
7
|
+
export declare function SchemasElement({ spec, config, layout }: SchemasElementProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { d as t, s as i, j as o, A as r } from "../registerElement-qkr8S33y.js";
|
|
2
|
+
function u({ spec: n, config: s, layout: e }) {
|
|
3
|
+
return n ? /* @__PURE__ */ o.jsx(r, { document: n, config: s, layout: e }) : null;
|
|
4
|
+
}
|
|
5
|
+
t(
|
|
6
|
+
"apiuikit-schemas",
|
|
7
|
+
i(u, {
|
|
8
|
+
props: {
|
|
9
|
+
spec: void 0,
|
|
10
|
+
config: "json",
|
|
11
|
+
layout: "string"
|
|
12
|
+
}
|
|
13
|
+
})
|
|
14
|
+
);
|
|
15
|
+
export {
|
|
16
|
+
u as SchemasElement
|
|
17
|
+
};
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
function a(e) {
|
|
2
|
+
const n = {
|
|
3
|
+
keyword: [
|
|
4
|
+
"break",
|
|
5
|
+
"case",
|
|
6
|
+
"chan",
|
|
7
|
+
"const",
|
|
8
|
+
"continue",
|
|
9
|
+
"default",
|
|
10
|
+
"defer",
|
|
11
|
+
"else",
|
|
12
|
+
"fallthrough",
|
|
13
|
+
"for",
|
|
14
|
+
"func",
|
|
15
|
+
"go",
|
|
16
|
+
"goto",
|
|
17
|
+
"if",
|
|
18
|
+
"import",
|
|
19
|
+
"interface",
|
|
20
|
+
"map",
|
|
21
|
+
"package",
|
|
22
|
+
"range",
|
|
23
|
+
"return",
|
|
24
|
+
"select",
|
|
25
|
+
"struct",
|
|
26
|
+
"switch",
|
|
27
|
+
"type",
|
|
28
|
+
"var"
|
|
29
|
+
],
|
|
30
|
+
type: [
|
|
31
|
+
"bool",
|
|
32
|
+
"byte",
|
|
33
|
+
"complex64",
|
|
34
|
+
"complex128",
|
|
35
|
+
"error",
|
|
36
|
+
"float32",
|
|
37
|
+
"float64",
|
|
38
|
+
"int8",
|
|
39
|
+
"int16",
|
|
40
|
+
"int32",
|
|
41
|
+
"int64",
|
|
42
|
+
"string",
|
|
43
|
+
"uint8",
|
|
44
|
+
"uint16",
|
|
45
|
+
"uint32",
|
|
46
|
+
"uint64",
|
|
47
|
+
"int",
|
|
48
|
+
"uint",
|
|
49
|
+
"uintptr",
|
|
50
|
+
"rune"
|
|
51
|
+
],
|
|
52
|
+
literal: [
|
|
53
|
+
"true",
|
|
54
|
+
"false",
|
|
55
|
+
"iota",
|
|
56
|
+
"nil"
|
|
57
|
+
],
|
|
58
|
+
built_in: [
|
|
59
|
+
"append",
|
|
60
|
+
"cap",
|
|
61
|
+
"close",
|
|
62
|
+
"complex",
|
|
63
|
+
"copy",
|
|
64
|
+
"imag",
|
|
65
|
+
"len",
|
|
66
|
+
"make",
|
|
67
|
+
"new",
|
|
68
|
+
"panic",
|
|
69
|
+
"print",
|
|
70
|
+
"println",
|
|
71
|
+
"real",
|
|
72
|
+
"recover",
|
|
73
|
+
"delete"
|
|
74
|
+
]
|
|
75
|
+
};
|
|
76
|
+
return {
|
|
77
|
+
name: "Go",
|
|
78
|
+
aliases: ["golang"],
|
|
79
|
+
keywords: n,
|
|
80
|
+
illegal: "</",
|
|
81
|
+
contains: [
|
|
82
|
+
e.C_LINE_COMMENT_MODE,
|
|
83
|
+
e.C_BLOCK_COMMENT_MODE,
|
|
84
|
+
{
|
|
85
|
+
className: "string",
|
|
86
|
+
variants: [
|
|
87
|
+
e.QUOTE_STRING_MODE,
|
|
88
|
+
e.APOS_STRING_MODE,
|
|
89
|
+
{
|
|
90
|
+
begin: "`",
|
|
91
|
+
end: "`"
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
className: "number",
|
|
97
|
+
variants: [
|
|
98
|
+
{
|
|
99
|
+
match: /-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,
|
|
100
|
+
// hex without a present digit before . (making a digit afterwards required)
|
|
101
|
+
relevance: 0
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
match: /-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,
|
|
105
|
+
// hex with a present digit before . (making a digit afterwards optional)
|
|
106
|
+
relevance: 0
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
match: /-?\b0[oO](_?[0-7])*i?/,
|
|
110
|
+
// leading 0o octal
|
|
111
|
+
relevance: 0
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
match: /-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,
|
|
115
|
+
// decimal without a present digit before . (making a digit afterwards required)
|
|
116
|
+
relevance: 0
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
match: /-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,
|
|
120
|
+
// decimal with a present digit before . (making a digit afterwards optional)
|
|
121
|
+
relevance: 0
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
begin: /:=/
|
|
127
|
+
// relevance booster
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
className: "function",
|
|
131
|
+
beginKeywords: "func",
|
|
132
|
+
end: "\\s*(\\{|$)",
|
|
133
|
+
excludeEnd: !0,
|
|
134
|
+
contains: [
|
|
135
|
+
e.TITLE_MODE,
|
|
136
|
+
{
|
|
137
|
+
className: "params",
|
|
138
|
+
begin: /\(/,
|
|
139
|
+
end: /\)/,
|
|
140
|
+
endsParent: !0,
|
|
141
|
+
keywords: n,
|
|
142
|
+
illegal: /["']/
|
|
143
|
+
}
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
export {
|
|
150
|
+
a as default
|
|
151
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
function c(n) {
|
|
2
|
+
const t = n.regex, e = "HTTP/([32]|1\\.[01])", i = /[A-Za-z][A-Za-z0-9-]*/, a = {
|
|
3
|
+
className: "attribute",
|
|
4
|
+
begin: t.concat("^", i, "(?=\\:\\s)"),
|
|
5
|
+
starts: { contains: [
|
|
6
|
+
{
|
|
7
|
+
className: "punctuation",
|
|
8
|
+
begin: /: /,
|
|
9
|
+
relevance: 0,
|
|
10
|
+
starts: {
|
|
11
|
+
end: "$",
|
|
12
|
+
relevance: 0
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
] }
|
|
16
|
+
}, s = [
|
|
17
|
+
a,
|
|
18
|
+
{
|
|
19
|
+
begin: "\\n\\n",
|
|
20
|
+
starts: {
|
|
21
|
+
subLanguage: [],
|
|
22
|
+
endsWithParent: !0
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
];
|
|
26
|
+
return {
|
|
27
|
+
name: "HTTP",
|
|
28
|
+
aliases: ["https"],
|
|
29
|
+
illegal: /\S/,
|
|
30
|
+
contains: [
|
|
31
|
+
// response
|
|
32
|
+
{
|
|
33
|
+
begin: "^(?=" + e + " \\d{3})",
|
|
34
|
+
end: /$/,
|
|
35
|
+
contains: [
|
|
36
|
+
{
|
|
37
|
+
className: "meta",
|
|
38
|
+
begin: e
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
className: "number",
|
|
42
|
+
begin: "\\b\\d{3}\\b"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
starts: {
|
|
46
|
+
end: /\b\B/,
|
|
47
|
+
illegal: /\S/,
|
|
48
|
+
contains: s
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
// request
|
|
52
|
+
{
|
|
53
|
+
begin: "(?=^[A-Z]+ (.*?) " + e + "$)",
|
|
54
|
+
end: /$/,
|
|
55
|
+
contains: [
|
|
56
|
+
{
|
|
57
|
+
className: "string",
|
|
58
|
+
begin: " ",
|
|
59
|
+
end: " ",
|
|
60
|
+
excludeBegin: !0,
|
|
61
|
+
excludeEnd: !0
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
className: "meta",
|
|
65
|
+
begin: e
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
className: "keyword",
|
|
69
|
+
begin: "[A-Z]+"
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
starts: {
|
|
73
|
+
end: /\b\B/,
|
|
74
|
+
illegal: /\S/,
|
|
75
|
+
contains: s
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
// to allow headers to work even without a preamble
|
|
79
|
+
n.inherit(a, { relevance: 0 })
|
|
80
|
+
]
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
export {
|
|
84
|
+
c as default
|
|
85
|
+
};
|