@wallarm-org/design-system 1.30.0 → 1.31.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/dist/components/CodeEditor/CodeEditorContent.d.ts +17 -0
- package/dist/components/CodeEditor/CodeEditorContent.js +197 -0
- package/dist/components/CodeEditor/CodeEditorContext.d.ts +17 -0
- package/dist/components/CodeEditor/CodeEditorContext.js +8 -0
- package/dist/components/CodeEditor/CodeEditorRoot.d.ts +77 -0
- package/dist/components/CodeEditor/CodeEditorRoot.js +203 -0
- package/dist/components/CodeEditor/classes.d.ts +21 -0
- package/dist/components/CodeEditor/classes.js +41 -0
- package/dist/components/CodeEditor/engine/SearchPanel.d.ts +13 -0
- package/dist/components/CodeEditor/engine/SearchPanel.js +201 -0
- package/dist/components/CodeEditor/engine/adapterPainter.d.ts +23 -0
- package/dist/components/CodeEditor/engine/adapterPainter.js +110 -0
- package/dist/components/CodeEditor/engine/babelSyntax.d.ts +15 -0
- package/dist/components/CodeEditor/engine/babelSyntax.js +54 -0
- package/dist/components/CodeEditor/engine/completion.d.ts +17 -0
- package/dist/components/CodeEditor/engine/completion.js +129 -0
- package/dist/components/CodeEditor/engine/contentAttributes.d.ts +12 -0
- package/dist/components/CodeEditor/engine/contentAttributes.js +24 -0
- package/dist/components/CodeEditor/engine/diagnostics.d.ts +73 -0
- package/dist/components/CodeEditor/engine/diagnostics.js +327 -0
- package/dist/components/CodeEditor/engine/diff.d.ts +37 -0
- package/dist/components/CodeEditor/engine/diff.js +145 -0
- package/dist/components/CodeEditor/engine/folds.d.ts +25 -0
- package/dist/components/CodeEditor/engine/folds.js +458 -0
- package/dist/components/CodeEditor/engine/gutters.d.ts +22 -0
- package/dist/components/CodeEditor/engine/gutters.js +160 -0
- package/dist/components/CodeEditor/engine/index.d.ts +12 -0
- package/dist/components/CodeEditor/engine/index.js +387 -0
- package/dist/components/CodeEditor/engine/languages/http/index.d.ts +20 -0
- package/dist/components/CodeEditor/engine/languages/http/index.js +69 -0
- package/dist/components/CodeEditor/engine/languages/http/parser.d.ts +2 -0
- package/dist/components/CodeEditor/engine/languages/http/parser.js +31 -0
- package/dist/components/CodeEditor/engine/languages/http/parser.terms.d.ts +1 -0
- package/dist/components/CodeEditor/engine/languages/http/parser.terms.js +2 -0
- package/dist/components/CodeEditor/engine/languages/index.d.ts +8 -0
- package/dist/components/CodeEditor/engine/languages/index.js +41 -0
- package/dist/components/CodeEditor/engine/languages/json.d.ts +8 -0
- package/dist/components/CodeEditor/engine/languages/json.js +11 -0
- package/dist/components/CodeEditor/engine/languages/jsonPointers.d.ts +47 -0
- package/dist/components/CodeEditor/engine/languages/jsonPointers.js +125 -0
- package/dist/components/CodeEditor/engine/languages/yaml.d.ts +4 -0
- package/dist/components/CodeEditor/engine/languages/yaml.js +11 -0
- package/dist/components/CodeEditor/engine/lines.d.ts +22 -0
- package/dist/components/CodeEditor/engine/lines.js +131 -0
- package/dist/components/CodeEditor/engine/luaSyntax.d.ts +14 -0
- package/dist/components/CodeEditor/engine/luaSyntax.js +36 -0
- package/dist/components/CodeEditor/engine/positions.d.ts +19 -0
- package/dist/components/CodeEditor/engine/positions.js +22 -0
- package/dist/components/CodeEditor/engine/schema/complete.d.ts +12 -0
- package/dist/components/CodeEditor/engine/schema/complete.js +211 -0
- package/dist/components/CodeEditor/engine/schema/hover.d.ts +12 -0
- package/dist/components/CodeEditor/engine/schema/hover.js +73 -0
- package/dist/components/CodeEditor/engine/schema/loadSchema.d.ts +19 -0
- package/dist/components/CodeEditor/engine/schema/loadSchema.js +32 -0
- package/dist/components/CodeEditor/engine/schema/validate.d.ts +9 -0
- package/dist/components/CodeEditor/engine/schema/validate.js +67 -0
- package/dist/components/CodeEditor/engine/search.d.ts +13 -0
- package/dist/components/CodeEditor/engine/search.js +84 -0
- package/dist/components/CodeEditor/engine/searchMatches.d.ts +8 -0
- package/dist/components/CodeEditor/engine/searchMatches.js +15 -0
- package/dist/components/CodeEditor/engine/theme.d.ts +8 -0
- package/dist/components/CodeEditor/engine/theme.js +89 -0
- package/dist/components/CodeEditor/engine/types.d.ts +44 -0
- package/dist/components/CodeEditor/engine/types.js +0 -0
- package/dist/components/CodeEditor/hooks/useCodeEditor.d.ts +6 -0
- package/dist/components/CodeEditor/hooks/useCodeEditor.js +3 -0
- package/dist/components/CodeEditor/index.d.ts +6 -0
- package/dist/components/CodeEditor/index.js +5 -0
- package/dist/components/CodeEditor/lib/PortalOutlet.d.ts +11 -0
- package/dist/components/CodeEditor/lib/PortalOutlet.js +11 -0
- package/dist/components/CodeEditor/lib/httpCompletions.d.ts +7 -0
- package/dist/components/CodeEditor/lib/httpCompletions.js +102 -0
- package/dist/components/CodeEditor/lib/httpCompletionsData.d.ts +29 -0
- package/dist/components/CodeEditor/lib/httpCompletionsData.js +650 -0
- package/dist/components/CodeEditor/lib/keyboardHint.d.ts +5 -0
- package/dist/components/CodeEditor/lib/keyboardHint.js +2 -0
- package/dist/components/CodeEditor/lib/loadEngine.d.ts +7 -0
- package/dist/components/CodeEditor/lib/loadEngine.js +9 -0
- package/dist/components/CodeEditor/lib/portalRegistry.d.ts +20 -0
- package/dist/components/CodeEditor/lib/portalRegistry.js +47 -0
- package/dist/components/CodeEditor/lib/splitContentProps.d.ts +12 -0
- package/dist/components/CodeEditor/lib/splitContentProps.js +28 -0
- package/dist/components/CodeEditor/types.d.ts +72 -0
- package/dist/components/CodeEditor/types.js +0 -0
- package/dist/components/CodeSnippet/CodeSnippetCode.js +6 -23
- package/dist/components/CodeSnippet/CodeSnippetCopyButton.js +4 -3
- package/dist/components/CodeSnippet/CodeSnippetFrameContext.d.ts +25 -0
- package/dist/components/CodeSnippet/CodeSnippetFrameContext.js +3 -0
- package/dist/components/CodeSnippet/CodeSnippetFullscreenButton.js +2 -2
- package/dist/components/CodeSnippet/CodeSnippetRoot.d.ts +3 -5
- package/dist/components/CodeSnippet/CodeSnippetRoot.js +56 -50
- package/dist/components/CodeSnippet/CodeSnippetShowMoreButton.js +7 -5
- package/dist/components/CodeSnippet/CodeSnippetWrapButton.js +2 -2
- package/dist/components/CodeSnippet/adapters/highlightjs.js +1 -0
- package/dist/components/CodeSnippet/adapters/prism.js +3 -1
- package/dist/components/CodeSnippet/adapters/shiki.js +1 -0
- package/dist/components/CodeSnippet/adapters/types.d.ts +3 -3
- package/dist/components/CodeSnippet/classes.d.ts +3 -0
- package/dist/components/CodeSnippet/classes.js +14 -0
- package/dist/components/CodeSnippet/hooks/index.d.ts +1 -0
- package/dist/components/CodeSnippet/hooks/index.js +1 -0
- package/dist/components/CodeSnippet/hooks/useCodeSnippetFrame.d.ts +2 -0
- package/dist/components/CodeSnippet/hooks/useCodeSnippetFrame.js +8 -0
- package/dist/components/CodeSnippet/index.d.ts +2 -1
- package/dist/components/CodeSnippet/index.js +1 -1
- package/dist/components/CodeSnippet/internal/CodeSnippetFrame.d.ts +22 -0
- package/dist/components/CodeSnippet/internal/CodeSnippetFrame.js +81 -0
- package/dist/components/CodeSnippet/internal/CodeToken.d.ts +2 -1
- package/dist/components/CodeSnippet/internal/CodeToken.js +1 -1
- package/dist/components/CodeSnippet/internal/FoldSummary.d.ts +11 -0
- package/dist/components/CodeSnippet/internal/FoldSummary.js +27 -0
- package/dist/components/CodeSnippet/internal/FoldToggle.d.ts +2 -0
- package/dist/components/CodeSnippet/internal/FoldToggle.js +2 -1
- package/dist/components/CodeSnippet/internal/index.d.ts +1 -0
- package/dist/components/CodeSnippet/internal/index.js +1 -0
- package/dist/components/CodeSnippet/lib/foldUtils.d.ts +9 -2
- package/dist/components/CodeSnippet/lib/foldUtils.js +2 -2
- package/dist/components/CodeSnippet/lib/showMore.d.ts +7 -0
- package/dist/components/CodeSnippet/lib/showMore.js +7 -0
- package/dist/components/Copyable/Copyable.d.ts +5 -2
- package/dist/components/Copyable/Copyable.js +1 -1
- package/dist/metadata/components.json +1235 -5
- package/package.json +24 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Curated HTTP completion data for `httpCompletions` (spec §7.14).
|
|
3
|
+
* Hand-maintained from RFC 9110/9111, MDN (`@mdn/browser-compat-data`, CC0) and
|
|
4
|
+
* the IANA field-name registry — no runtime dependency on either source.
|
|
5
|
+
*/
|
|
6
|
+
/** Which message kinds a header is normally sent in. */
|
|
7
|
+
export type HttpHeaderDirection = 'request' | 'response' | 'both';
|
|
8
|
+
export interface HttpHeaderInfo {
|
|
9
|
+
/** Canonical spelling, inserted as `Name: `. */
|
|
10
|
+
name: string;
|
|
11
|
+
direction: HttpHeaderDirection;
|
|
12
|
+
/** May appear on several lines of one message (`Set-Cookie`), so it is offered even when present. */
|
|
13
|
+
repeatable?: boolean;
|
|
14
|
+
description: string;
|
|
15
|
+
}
|
|
16
|
+
export interface HttpHeaderValueInfo {
|
|
17
|
+
label: string;
|
|
18
|
+
/** Text to insert; defaults to `label`. */
|
|
19
|
+
apply?: string;
|
|
20
|
+
info?: string;
|
|
21
|
+
}
|
|
22
|
+
/** DS `HTTP_METHODS` plus the remaining RFC 9110 §9 methods. */
|
|
23
|
+
export declare const HTTP_COMPLETION_METHODS: readonly string[];
|
|
24
|
+
export declare const HTTP_VERSIONS: readonly string[];
|
|
25
|
+
export declare const HTTP_HEADERS: readonly HttpHeaderInfo[];
|
|
26
|
+
/** Parameter values offered after `;` in a Content-Type / Accept value. */
|
|
27
|
+
export declare const HTTP_MEDIA_TYPE_PARAMETERS: readonly HttpHeaderValueInfo[];
|
|
28
|
+
/** Header values keyed by lowercased header name. */
|
|
29
|
+
export declare const HTTP_HEADER_VALUES: Readonly<Record<string, readonly HttpHeaderValueInfo[]>>;
|
|
@@ -0,0 +1,650 @@
|
|
|
1
|
+
import { HTTP_METHODS } from "../../HttpMethod/constants.js";
|
|
2
|
+
const HTTP_COMPLETION_METHODS = [
|
|
3
|
+
...HTTP_METHODS,
|
|
4
|
+
'CONNECT',
|
|
5
|
+
'TRACE'
|
|
6
|
+
];
|
|
7
|
+
const HTTP_VERSIONS = [
|
|
8
|
+
'HTTP/1.1',
|
|
9
|
+
'HTTP/2'
|
|
10
|
+
];
|
|
11
|
+
const HTTP_HEADERS = [
|
|
12
|
+
{
|
|
13
|
+
name: 'Accept',
|
|
14
|
+
direction: 'request',
|
|
15
|
+
description: 'Media types the client can handle, in order of preference.'
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: 'Accept-Encoding',
|
|
19
|
+
direction: 'request',
|
|
20
|
+
description: 'Content codings (compression) the client understands.'
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'Accept-Language',
|
|
24
|
+
direction: 'request',
|
|
25
|
+
description: 'Natural languages the client prefers for the response.'
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'Access-Control-Request-Headers',
|
|
29
|
+
direction: 'request',
|
|
30
|
+
description: 'CORS preflight: headers the actual request will send.'
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: 'Access-Control-Request-Method',
|
|
34
|
+
direction: 'request',
|
|
35
|
+
description: 'CORS preflight: method the actual request will use.'
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: 'Authorization',
|
|
39
|
+
direction: 'request',
|
|
40
|
+
description: 'Credentials that authenticate the client with the server.'
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'Cookie',
|
|
44
|
+
direction: 'request',
|
|
45
|
+
description: 'Cookies previously sent by the server with Set-Cookie.'
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: 'Expect',
|
|
49
|
+
direction: 'request',
|
|
50
|
+
description: 'Expectations the server must meet, such as 100-continue.'
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'Forwarded',
|
|
54
|
+
direction: 'request',
|
|
55
|
+
repeatable: true,
|
|
56
|
+
description: 'Client and proxy information lost when a proxy is involved (RFC 7239).'
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'From',
|
|
60
|
+
direction: 'request',
|
|
61
|
+
description: 'Email address of the person controlling the user agent.'
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: 'Host',
|
|
65
|
+
direction: 'request',
|
|
66
|
+
description: 'Host and port of the server the request is sent to.'
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: 'If-Match',
|
|
70
|
+
direction: 'request',
|
|
71
|
+
description: 'Apply the method only if the resource matches one of the ETags.'
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: 'If-Modified-Since',
|
|
75
|
+
direction: 'request',
|
|
76
|
+
description: 'Return the resource only if it changed after this date.'
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: 'If-None-Match',
|
|
80
|
+
direction: 'request',
|
|
81
|
+
description: 'Return the resource only if it matches none of the ETags.'
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: 'If-Range',
|
|
85
|
+
direction: 'request',
|
|
86
|
+
description: 'Send the requested range only if the ETag or date still matches.'
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: 'If-Unmodified-Since',
|
|
90
|
+
direction: 'request',
|
|
91
|
+
description: 'Apply the method only if the resource has not changed since this date.'
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: 'Max-Forwards',
|
|
95
|
+
direction: 'request',
|
|
96
|
+
description: 'Maximum number of proxies for TRACE and OPTIONS requests.'
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: 'Origin',
|
|
100
|
+
direction: 'request',
|
|
101
|
+
description: 'Scheme, host and port the request originates from.'
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: 'Priority',
|
|
105
|
+
direction: 'request',
|
|
106
|
+
description: 'Urgency and incremental delivery hints (RFC 9218).'
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
name: 'Proxy-Authorization',
|
|
110
|
+
direction: 'request',
|
|
111
|
+
description: 'Credentials that authenticate the client with a proxy.'
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
name: 'Range',
|
|
115
|
+
direction: 'request',
|
|
116
|
+
description: 'Parts of the resource to return, such as bytes=0-1023.'
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
name: 'Referer',
|
|
120
|
+
direction: 'request',
|
|
121
|
+
description: 'Address of the page that linked to the requested resource.'
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
name: 'Sec-Fetch-Dest',
|
|
125
|
+
direction: 'request',
|
|
126
|
+
description: 'Fetch metadata: how the response will be used (document, image, empty).'
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
name: 'Sec-Fetch-Mode',
|
|
130
|
+
direction: 'request',
|
|
131
|
+
description: 'Fetch metadata: request mode (cors, navigate, no-cors, same-origin).'
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
name: 'Sec-Fetch-Site',
|
|
135
|
+
direction: 'request',
|
|
136
|
+
description: 'Fetch metadata: relation between initiator and target origin.'
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
name: 'Sec-Fetch-User',
|
|
140
|
+
direction: 'request',
|
|
141
|
+
description: 'Fetch metadata: the navigation was triggered by user activation.'
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
name: 'TE',
|
|
145
|
+
direction: 'request',
|
|
146
|
+
description: 'Transfer codings the client accepts, such as trailers.'
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
name: 'Upgrade-Insecure-Requests',
|
|
150
|
+
direction: 'request',
|
|
151
|
+
description: 'The client prefers an encrypted, authenticated response.'
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
name: 'User-Agent',
|
|
155
|
+
direction: 'request',
|
|
156
|
+
description: 'Software that sends the request.'
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
name: 'X-Api-Key',
|
|
160
|
+
direction: 'request',
|
|
161
|
+
description: 'API key used by many services to authenticate the client.'
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
name: 'X-CSRF-Token',
|
|
165
|
+
direction: 'request',
|
|
166
|
+
description: 'Anti-CSRF token echoed back to the server.'
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
name: 'X-Forwarded-For',
|
|
170
|
+
direction: 'request',
|
|
171
|
+
repeatable: true,
|
|
172
|
+
description: 'Originating client IP address when behind proxies (de facto).'
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
name: 'X-Forwarded-Host',
|
|
176
|
+
direction: 'request',
|
|
177
|
+
description: 'Original Host requested by the client (de facto).'
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
name: 'X-Forwarded-Proto',
|
|
181
|
+
direction: 'request',
|
|
182
|
+
description: 'Protocol the client used to connect to the proxy (de facto).'
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
name: 'X-Real-IP',
|
|
186
|
+
direction: 'request',
|
|
187
|
+
description: 'Client IP address set by a reverse proxy (de facto).'
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
name: 'X-Requested-With',
|
|
191
|
+
direction: 'request',
|
|
192
|
+
description: 'Marks AJAX requests, usually XMLHttpRequest (de facto).'
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
name: 'Cache-Control',
|
|
196
|
+
direction: 'both',
|
|
197
|
+
description: 'Caching directives for requests and responses.'
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
name: 'Connection',
|
|
201
|
+
direction: 'both',
|
|
202
|
+
description: 'Whether the connection stays open after the current message.'
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
name: 'Content-Encoding',
|
|
206
|
+
direction: 'both',
|
|
207
|
+
description: 'Content codings applied to the body, such as gzip.'
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
name: 'Content-Language',
|
|
211
|
+
direction: 'both',
|
|
212
|
+
description: 'Natural language of the intended audience of the body.'
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
name: 'Content-Length',
|
|
216
|
+
direction: 'both',
|
|
217
|
+
description: 'Size of the body in bytes.'
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
name: 'Content-Type',
|
|
221
|
+
direction: 'both',
|
|
222
|
+
description: 'Media type of the body.'
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
name: 'Date',
|
|
226
|
+
direction: 'both',
|
|
227
|
+
description: 'Date and time the message was created.'
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
name: 'Keep-Alive',
|
|
231
|
+
direction: 'both',
|
|
232
|
+
description: 'Timeout and maximum requests for a persistent connection.'
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
name: 'Pragma',
|
|
236
|
+
direction: 'both',
|
|
237
|
+
description: 'HTTP/1.0 caching directive, usually no-cache.'
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
name: 'Trailer',
|
|
241
|
+
direction: 'both',
|
|
242
|
+
description: 'Header fields sent after a chunked body.'
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
name: 'Transfer-Encoding',
|
|
246
|
+
direction: 'both',
|
|
247
|
+
description: 'Encoding used to transfer the body, such as chunked.'
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
name: 'Upgrade',
|
|
251
|
+
direction: 'both',
|
|
252
|
+
description: 'Switch the connection to another protocol, such as websocket.'
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
name: 'Via',
|
|
256
|
+
direction: 'both',
|
|
257
|
+
repeatable: true,
|
|
258
|
+
description: 'Proxies the message passed through.'
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
name: 'X-Correlation-ID',
|
|
262
|
+
direction: 'both',
|
|
263
|
+
description: 'Identifier that correlates related requests across services (de facto).'
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
name: 'X-Request-ID',
|
|
267
|
+
direction: 'both',
|
|
268
|
+
description: 'Unique identifier of the request for tracing (de facto).'
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
name: 'Accept-Patch',
|
|
272
|
+
direction: 'response',
|
|
273
|
+
description: 'Media types the server accepts in a PATCH request.'
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
name: 'Accept-Ranges',
|
|
277
|
+
direction: 'response',
|
|
278
|
+
description: 'Whether the server supports range requests, usually bytes.'
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
name: 'Access-Control-Allow-Credentials',
|
|
282
|
+
direction: 'response',
|
|
283
|
+
description: 'CORS: whether the response may be shared when credentials are sent.'
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
name: 'Access-Control-Allow-Headers',
|
|
287
|
+
direction: 'response',
|
|
288
|
+
description: 'CORS: headers allowed in the actual request.'
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
name: 'Access-Control-Allow-Methods',
|
|
292
|
+
direction: 'response',
|
|
293
|
+
description: 'CORS: methods allowed for the resource.'
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
name: 'Access-Control-Allow-Origin',
|
|
297
|
+
direction: 'response',
|
|
298
|
+
description: 'CORS: origin allowed to read the response.'
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
name: 'Access-Control-Expose-Headers',
|
|
302
|
+
direction: 'response',
|
|
303
|
+
description: "CORS: response headers scripts are allowed to read."
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
name: 'Access-Control-Max-Age',
|
|
307
|
+
direction: 'response',
|
|
308
|
+
description: 'CORS: seconds a preflight result may be cached.'
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
name: 'Age',
|
|
312
|
+
direction: 'response',
|
|
313
|
+
description: 'Seconds the response has been in a proxy cache.'
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
name: 'Allow',
|
|
317
|
+
direction: 'response',
|
|
318
|
+
description: 'Methods supported by the target resource.'
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
name: 'Alt-Svc',
|
|
322
|
+
direction: 'response',
|
|
323
|
+
description: 'Alternative services (protocol, host, port) for the origin.'
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
name: 'Clear-Site-Data',
|
|
327
|
+
direction: 'response',
|
|
328
|
+
description: 'Clears browsing data (cookies, storage, cache) for the site.'
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
name: 'Content-Disposition',
|
|
332
|
+
direction: 'response',
|
|
333
|
+
description: 'Show the body inline or download it as an attachment.'
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
name: 'Content-Location',
|
|
337
|
+
direction: 'response',
|
|
338
|
+
description: 'Alternate location of the returned data.'
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
name: 'Content-Range',
|
|
342
|
+
direction: 'response',
|
|
343
|
+
description: 'Position of a partial body in the full resource.'
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
name: 'Content-Security-Policy',
|
|
347
|
+
direction: 'response',
|
|
348
|
+
description: 'Resources the user agent is allowed to load for the page.'
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
name: 'Content-Security-Policy-Report-Only',
|
|
352
|
+
direction: 'response',
|
|
353
|
+
description: 'CSP that only reports violations without enforcing them.'
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
name: 'Cross-Origin-Embedder-Policy',
|
|
357
|
+
direction: 'response',
|
|
358
|
+
description: 'Controls loading of cross-origin resources into the document.'
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
name: 'Cross-Origin-Opener-Policy',
|
|
362
|
+
direction: 'response',
|
|
363
|
+
description: 'Isolates the browsing context group from cross-origin documents.'
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
name: 'Cross-Origin-Resource-Policy',
|
|
367
|
+
direction: 'response',
|
|
368
|
+
description: 'Blocks no-cors cross-origin or cross-site loads of the resource.'
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
name: 'ETag',
|
|
372
|
+
direction: 'response',
|
|
373
|
+
description: 'Identifier of a specific version of the resource.'
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
name: 'Expires',
|
|
377
|
+
direction: 'response',
|
|
378
|
+
description: 'Date after which the response is considered stale.'
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
name: 'Last-Modified',
|
|
382
|
+
direction: 'response',
|
|
383
|
+
description: 'Date the resource was last changed.'
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
name: 'Link',
|
|
387
|
+
direction: 'response',
|
|
388
|
+
repeatable: true,
|
|
389
|
+
description: 'Typed links to related resources (RFC 8288).'
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
name: 'Location',
|
|
393
|
+
direction: 'response',
|
|
394
|
+
description: 'URL to redirect to, or of a newly created resource.'
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
name: 'Permissions-Policy',
|
|
398
|
+
direction: 'response',
|
|
399
|
+
description: 'Browser features the document and its frames may use.'
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
name: 'Proxy-Authenticate',
|
|
403
|
+
direction: 'response',
|
|
404
|
+
repeatable: true,
|
|
405
|
+
description: 'Authentication scheme required to access a resource through a proxy.'
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
name: 'Referrer-Policy',
|
|
409
|
+
direction: 'response',
|
|
410
|
+
description: 'How much referrer information requests should include.'
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
name: 'Retry-After',
|
|
414
|
+
direction: 'response',
|
|
415
|
+
description: 'How long to wait before making a follow-up request.'
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
name: 'Server',
|
|
419
|
+
direction: 'response',
|
|
420
|
+
description: 'Software used by the origin server.'
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
name: 'Server-Timing',
|
|
424
|
+
direction: 'response',
|
|
425
|
+
repeatable: true,
|
|
426
|
+
description: 'Server-side performance metrics for the request.'
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
name: 'Set-Cookie',
|
|
430
|
+
direction: 'response',
|
|
431
|
+
repeatable: true,
|
|
432
|
+
description: 'Sends a cookie from the server to the user agent.'
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
name: 'Strict-Transport-Security',
|
|
436
|
+
direction: 'response',
|
|
437
|
+
description: 'Tells browsers to use HTTPS only for this host (HSTS).'
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
name: 'Vary',
|
|
441
|
+
direction: 'response',
|
|
442
|
+
description: 'Request headers that affect which response is cached.'
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
name: 'WWW-Authenticate',
|
|
446
|
+
direction: 'response',
|
|
447
|
+
repeatable: true,
|
|
448
|
+
description: 'Authentication scheme required to access the resource.'
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
name: 'X-Content-Type-Options',
|
|
452
|
+
direction: 'response',
|
|
453
|
+
description: 'nosniff disables MIME type sniffing.'
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
name: 'X-Frame-Options',
|
|
457
|
+
direction: 'response',
|
|
458
|
+
description: 'Whether the page may be shown in a frame (DENY, SAMEORIGIN).'
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
name: 'X-RateLimit-Limit',
|
|
462
|
+
direction: 'response',
|
|
463
|
+
description: 'Requests allowed in the current rate-limit window (de facto).'
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
name: 'X-RateLimit-Remaining',
|
|
467
|
+
direction: 'response',
|
|
468
|
+
description: 'Requests left in the current rate-limit window (de facto).'
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
name: 'X-RateLimit-Reset',
|
|
472
|
+
direction: 'response',
|
|
473
|
+
description: 'When the current rate-limit window resets (de facto).'
|
|
474
|
+
}
|
|
475
|
+
];
|
|
476
|
+
const MEDIA_TYPES = [
|
|
477
|
+
'application/json',
|
|
478
|
+
'application/x-www-form-urlencoded',
|
|
479
|
+
'multipart/form-data',
|
|
480
|
+
'text/plain',
|
|
481
|
+
'text/html',
|
|
482
|
+
'application/xml',
|
|
483
|
+
'application/octet-stream'
|
|
484
|
+
];
|
|
485
|
+
const TEXTUAL_MEDIA_TYPES = [
|
|
486
|
+
'application/json',
|
|
487
|
+
'text/plain',
|
|
488
|
+
'text/html',
|
|
489
|
+
'application/xml'
|
|
490
|
+
];
|
|
491
|
+
const mediaTypeValues = (withWildcard)=>[
|
|
492
|
+
...withWildcard ? [
|
|
493
|
+
{
|
|
494
|
+
label: '*/*',
|
|
495
|
+
info: 'Any media type'
|
|
496
|
+
}
|
|
497
|
+
] : [],
|
|
498
|
+
...MEDIA_TYPES.map((label)=>({
|
|
499
|
+
label
|
|
500
|
+
})),
|
|
501
|
+
...TEXTUAL_MEDIA_TYPES.map((type)=>({
|
|
502
|
+
label: `${type}; charset=utf-8`
|
|
503
|
+
}))
|
|
504
|
+
];
|
|
505
|
+
const AUTH_SCHEMES = [
|
|
506
|
+
{
|
|
507
|
+
label: 'Bearer',
|
|
508
|
+
apply: 'Bearer ',
|
|
509
|
+
info: 'OAuth 2.0 / JWT access token (RFC 6750)'
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
label: 'Basic',
|
|
513
|
+
apply: 'Basic ',
|
|
514
|
+
info: 'base64(user:password) (RFC 7617)'
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
label: 'Digest',
|
|
518
|
+
apply: 'Digest ',
|
|
519
|
+
info: 'Digest access authentication (RFC 7616)'
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
label: 'Negotiate',
|
|
523
|
+
apply: 'Negotiate ',
|
|
524
|
+
info: 'SPNEGO / Kerberos (RFC 4559)'
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
label: 'AWS4-HMAC-SHA256',
|
|
528
|
+
apply: 'AWS4-HMAC-SHA256 ',
|
|
529
|
+
info: 'AWS Signature Version 4'
|
|
530
|
+
}
|
|
531
|
+
];
|
|
532
|
+
const CODINGS = [
|
|
533
|
+
{
|
|
534
|
+
label: 'gzip'
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
label: 'deflate'
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
label: 'br'
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
label: 'zstd'
|
|
544
|
+
}
|
|
545
|
+
];
|
|
546
|
+
const HTTP_MEDIA_TYPE_PARAMETERS = [
|
|
547
|
+
{
|
|
548
|
+
label: 'charset=utf-8'
|
|
549
|
+
}
|
|
550
|
+
];
|
|
551
|
+
const HTTP_HEADER_VALUES = {
|
|
552
|
+
accept: mediaTypeValues(true),
|
|
553
|
+
'accept-encoding': [
|
|
554
|
+
{
|
|
555
|
+
label: 'gzip, deflate, br, zstd'
|
|
556
|
+
},
|
|
557
|
+
...CODINGS,
|
|
558
|
+
{
|
|
559
|
+
label: 'identity'
|
|
560
|
+
}
|
|
561
|
+
],
|
|
562
|
+
'access-control-allow-credentials': [
|
|
563
|
+
{
|
|
564
|
+
label: 'true'
|
|
565
|
+
}
|
|
566
|
+
],
|
|
567
|
+
'access-control-allow-origin': [
|
|
568
|
+
{
|
|
569
|
+
label: '*',
|
|
570
|
+
info: 'Any origin (not allowed with credentials)'
|
|
571
|
+
}
|
|
572
|
+
],
|
|
573
|
+
authorization: AUTH_SCHEMES,
|
|
574
|
+
'cache-control': [
|
|
575
|
+
{
|
|
576
|
+
label: 'no-cache'
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
label: 'no-store'
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
label: 'max-age=',
|
|
583
|
+
info: 'Seconds the response stays fresh'
|
|
584
|
+
},
|
|
585
|
+
{
|
|
586
|
+
label: 'private'
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
label: 'public'
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
label: 'must-revalidate'
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
label: 'no-transform'
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
label: 'immutable'
|
|
599
|
+
}
|
|
600
|
+
],
|
|
601
|
+
connection: [
|
|
602
|
+
{
|
|
603
|
+
label: 'keep-alive'
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
label: 'close'
|
|
607
|
+
}
|
|
608
|
+
],
|
|
609
|
+
'content-encoding': CODINGS,
|
|
610
|
+
'content-type': mediaTypeValues(false),
|
|
611
|
+
pragma: [
|
|
612
|
+
{
|
|
613
|
+
label: 'no-cache'
|
|
614
|
+
}
|
|
615
|
+
],
|
|
616
|
+
'proxy-authorization': AUTH_SCHEMES,
|
|
617
|
+
'transfer-encoding': [
|
|
618
|
+
{
|
|
619
|
+
label: 'chunked'
|
|
620
|
+
},
|
|
621
|
+
...CODINGS
|
|
622
|
+
],
|
|
623
|
+
upgrade: [
|
|
624
|
+
{
|
|
625
|
+
label: 'websocket'
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
label: 'h2c'
|
|
629
|
+
}
|
|
630
|
+
],
|
|
631
|
+
'x-content-type-options': [
|
|
632
|
+
{
|
|
633
|
+
label: 'nosniff'
|
|
634
|
+
}
|
|
635
|
+
],
|
|
636
|
+
'x-frame-options': [
|
|
637
|
+
{
|
|
638
|
+
label: 'DENY'
|
|
639
|
+
},
|
|
640
|
+
{
|
|
641
|
+
label: 'SAMEORIGIN'
|
|
642
|
+
}
|
|
643
|
+
],
|
|
644
|
+
'x-requested-with': [
|
|
645
|
+
{
|
|
646
|
+
label: 'XMLHttpRequest'
|
|
647
|
+
}
|
|
648
|
+
]
|
|
649
|
+
};
|
|
650
|
+
export { HTTP_COMPLETION_METHODS, HTTP_HEADERS, HTTP_HEADER_VALUES, HTTP_MEDIA_TYPE_PARAMETERS, HTTP_VERSIONS };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keyboard hint for the editor (spec §7.16). Render it in an element and point
|
|
3
|
+
* `aria-describedby` on `CodeEditorContent` at that element's id.
|
|
4
|
+
*/
|
|
5
|
+
export declare const CODE_EDITOR_KEYBOARD_HINT = "Tab inserts indentation. Press Escape, then Tab, to move focus out of the editor, or press Ctrl+M (Alt+Shift+M on macOS) to switch Tab between indenting and moving focus.";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type EngineModule = typeof import('../engine');
|
|
2
|
+
/**
|
|
3
|
+
* Loads the CodeMirror engine chunk once. Every `CodeEditorContent` shares the
|
|
4
|
+
* same promise; a rejected import clears the cache so a later mount can retry.
|
|
5
|
+
*/
|
|
6
|
+
export declare const loadEngine: () => Promise<EngineModule>;
|
|
7
|
+
export {};
|