@atlaskit/code 14.3.7 → 14.3.8
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/CHANGELOG.md +6 -0
- package/codemods/{13.0.0-remove-unnecessary-code-props.ts → 13.0.0-remove-unnecessary-code-props.tsx} +0 -0
- package/codemods/{13.0.0-rename-imports.ts → 13.0.0-rename-imports.tsx} +0 -0
- package/codemods/{14.0.0-lite-mode.ts → 14.0.0-lite-mode.tsx} +0 -0
- package/codemods/__tests__/{13.0.0-remove-unnecessary-code-props.ts → 13.0.0-remove-unnecessary-code-props.tsx} +0 -0
- package/codemods/__tests__/{13.0.0-rename-imports.ts → 13.0.0-rename-imports.tsx} +0 -0
- package/codemods/__tests__/14.0.0-lite-mode/{14.0.0-lite-mode.ts → 14.0.0-lite-mode.tsx} +0 -0
- package/codemods/__tests__/14.0.0-lite-mode/{remove-language.ts → remove-language.tsx} +0 -0
- package/codemods/__tests__/14.0.0-lite-mode/{text-to-child.ts → text-to-child.tsx} +0 -0
- package/codemods/migrations/14.0.0-lite-mode/{remove-language.ts → remove-language.tsx} +0 -0
- package/codemods/migrations/14.0.0-lite-mode/{text-to-child.ts → text-to-child.tsx} +0 -0
- package/codemods/utils/{helpers.ts → helpers.tsx} +0 -0
- package/dist/cjs/bidi-warning/ui/styled.js +10 -15
- package/dist/cjs/code-block.js +10 -0
- package/dist/cjs/code.js +10 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/bidi-warning/ui/styled.js +10 -15
- package/dist/es2019/code-block.js +10 -0
- package/dist/es2019/code.js +11 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/bidi-warning/ui/styled.js +10 -15
- package/dist/esm/code-block.js +10 -0
- package/dist/esm/code.js +11 -0
- package/dist/esm/version.json +1 -1
- package/dist/types/bidi-warning/ui/types.d.ts +5 -1
- package/dist/types/code-block.d.ts +9 -0
- package/dist/types/code.d.ts +10 -1
- package/dist/types/extract-react-types/code-block.d.ts +1 -2
- package/dist/types/internal/types.d.ts +0 -1
- package/package.json +15 -11
- package/report.api.md +892 -0
package/report.api.md
ADDED
|
@@ -0,0 +1,892 @@
|
|
|
1
|
+
## API Report File for "@atlaskit/code"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
/// <reference types="react" />
|
|
7
|
+
|
|
8
|
+
import type { CSSObject } from '@emotion/core';
|
|
9
|
+
import type { HTMLProps } from 'react';
|
|
10
|
+
import { NamedExoticComponent } from 'react';
|
|
11
|
+
import { default as React_2 } from 'react';
|
|
12
|
+
import type { ReactNode } from 'react';
|
|
13
|
+
import type { Theme } from '@atlaskit/theme/types';
|
|
14
|
+
|
|
15
|
+
export declare const Code: React_2.MemoExoticComponent<React_2.ForwardRefExoticComponent<
|
|
16
|
+
Pick<
|
|
17
|
+
CodeProps,
|
|
18
|
+
| 'as'
|
|
19
|
+
| 'css'
|
|
20
|
+
| 'name'
|
|
21
|
+
| 'color'
|
|
22
|
+
| 'content'
|
|
23
|
+
| 'height'
|
|
24
|
+
| 'width'
|
|
25
|
+
| 'start'
|
|
26
|
+
| 'children'
|
|
27
|
+
| 'testId'
|
|
28
|
+
| 'default'
|
|
29
|
+
| 'cite'
|
|
30
|
+
| 'data'
|
|
31
|
+
| 'form'
|
|
32
|
+
| 'label'
|
|
33
|
+
| 'span'
|
|
34
|
+
| 'style'
|
|
35
|
+
| 'summary'
|
|
36
|
+
| 'title'
|
|
37
|
+
| 'pattern'
|
|
38
|
+
| 'accept'
|
|
39
|
+
| 'acceptCharset'
|
|
40
|
+
| 'action'
|
|
41
|
+
| 'allowFullScreen'
|
|
42
|
+
| 'allowTransparency'
|
|
43
|
+
| 'alt'
|
|
44
|
+
| 'async'
|
|
45
|
+
| 'autoComplete'
|
|
46
|
+
| 'autoFocus'
|
|
47
|
+
| 'autoPlay'
|
|
48
|
+
| 'capture'
|
|
49
|
+
| 'cellPadding'
|
|
50
|
+
| 'cellSpacing'
|
|
51
|
+
| 'charSet'
|
|
52
|
+
| 'challenge'
|
|
53
|
+
| 'checked'
|
|
54
|
+
| 'classID'
|
|
55
|
+
| 'cols'
|
|
56
|
+
| 'colSpan'
|
|
57
|
+
| 'controls'
|
|
58
|
+
| 'coords'
|
|
59
|
+
| 'crossOrigin'
|
|
60
|
+
| 'dateTime'
|
|
61
|
+
| 'defer'
|
|
62
|
+
| 'disabled'
|
|
63
|
+
| 'download'
|
|
64
|
+
| 'encType'
|
|
65
|
+
| 'formAction'
|
|
66
|
+
| 'formEncType'
|
|
67
|
+
| 'formMethod'
|
|
68
|
+
| 'formNoValidate'
|
|
69
|
+
| 'formTarget'
|
|
70
|
+
| 'frameBorder'
|
|
71
|
+
| 'headers'
|
|
72
|
+
| 'high'
|
|
73
|
+
| 'href'
|
|
74
|
+
| 'hrefLang'
|
|
75
|
+
| 'htmlFor'
|
|
76
|
+
| 'httpEquiv'
|
|
77
|
+
| 'integrity'
|
|
78
|
+
| 'keyParams'
|
|
79
|
+
| 'keyType'
|
|
80
|
+
| 'kind'
|
|
81
|
+
| 'list'
|
|
82
|
+
| 'loop'
|
|
83
|
+
| 'low'
|
|
84
|
+
| 'manifest'
|
|
85
|
+
| 'marginHeight'
|
|
86
|
+
| 'marginWidth'
|
|
87
|
+
| 'max'
|
|
88
|
+
| 'maxLength'
|
|
89
|
+
| 'media'
|
|
90
|
+
| 'mediaGroup'
|
|
91
|
+
| 'method'
|
|
92
|
+
| 'min'
|
|
93
|
+
| 'minLength'
|
|
94
|
+
| 'multiple'
|
|
95
|
+
| 'muted'
|
|
96
|
+
| 'nonce'
|
|
97
|
+
| 'noValidate'
|
|
98
|
+
| 'open'
|
|
99
|
+
| 'optimum'
|
|
100
|
+
| 'placeholder'
|
|
101
|
+
| 'playsInline'
|
|
102
|
+
| 'poster'
|
|
103
|
+
| 'preload'
|
|
104
|
+
| 'readOnly'
|
|
105
|
+
| 'rel'
|
|
106
|
+
| 'required'
|
|
107
|
+
| 'reversed'
|
|
108
|
+
| 'rows'
|
|
109
|
+
| 'rowSpan'
|
|
110
|
+
| 'sandbox'
|
|
111
|
+
| 'scope'
|
|
112
|
+
| 'scoped'
|
|
113
|
+
| 'scrolling'
|
|
114
|
+
| 'seamless'
|
|
115
|
+
| 'selected'
|
|
116
|
+
| 'shape'
|
|
117
|
+
| 'size'
|
|
118
|
+
| 'sizes'
|
|
119
|
+
| 'src'
|
|
120
|
+
| 'srcDoc'
|
|
121
|
+
| 'srcLang'
|
|
122
|
+
| 'srcSet'
|
|
123
|
+
| 'step'
|
|
124
|
+
| 'target'
|
|
125
|
+
| 'type'
|
|
126
|
+
| 'useMap'
|
|
127
|
+
| 'value'
|
|
128
|
+
| 'wmode'
|
|
129
|
+
| 'wrap'
|
|
130
|
+
| 'defaultChecked'
|
|
131
|
+
| 'defaultValue'
|
|
132
|
+
| 'suppressContentEditableWarning'
|
|
133
|
+
| 'suppressHydrationWarning'
|
|
134
|
+
| 'accessKey'
|
|
135
|
+
| 'className'
|
|
136
|
+
| 'contentEditable'
|
|
137
|
+
| 'contextMenu'
|
|
138
|
+
| 'dir'
|
|
139
|
+
| 'draggable'
|
|
140
|
+
| 'hidden'
|
|
141
|
+
| 'id'
|
|
142
|
+
| 'lang'
|
|
143
|
+
| 'slot'
|
|
144
|
+
| 'spellCheck'
|
|
145
|
+
| 'tabIndex'
|
|
146
|
+
| 'inputMode'
|
|
147
|
+
| 'is'
|
|
148
|
+
| 'radioGroup'
|
|
149
|
+
| 'role'
|
|
150
|
+
| 'about'
|
|
151
|
+
| 'datatype'
|
|
152
|
+
| 'inlist'
|
|
153
|
+
| 'prefix'
|
|
154
|
+
| 'property'
|
|
155
|
+
| 'resource'
|
|
156
|
+
| 'typeof'
|
|
157
|
+
| 'vocab'
|
|
158
|
+
| 'autoCapitalize'
|
|
159
|
+
| 'autoCorrect'
|
|
160
|
+
| 'autoSave'
|
|
161
|
+
| 'itemProp'
|
|
162
|
+
| 'itemScope'
|
|
163
|
+
| 'itemType'
|
|
164
|
+
| 'itemID'
|
|
165
|
+
| 'itemRef'
|
|
166
|
+
| 'results'
|
|
167
|
+
| 'security'
|
|
168
|
+
| 'unselectable'
|
|
169
|
+
| 'aria-activedescendant'
|
|
170
|
+
| 'aria-atomic'
|
|
171
|
+
| 'aria-autocomplete'
|
|
172
|
+
| 'aria-busy'
|
|
173
|
+
| 'aria-checked'
|
|
174
|
+
| 'aria-colcount'
|
|
175
|
+
| 'aria-colindex'
|
|
176
|
+
| 'aria-colspan'
|
|
177
|
+
| 'aria-controls'
|
|
178
|
+
| 'aria-current'
|
|
179
|
+
| 'aria-describedby'
|
|
180
|
+
| 'aria-details'
|
|
181
|
+
| 'aria-disabled'
|
|
182
|
+
| 'aria-dropeffect'
|
|
183
|
+
| 'aria-errormessage'
|
|
184
|
+
| 'aria-expanded'
|
|
185
|
+
| 'aria-flowto'
|
|
186
|
+
| 'aria-grabbed'
|
|
187
|
+
| 'aria-haspopup'
|
|
188
|
+
| 'aria-hidden'
|
|
189
|
+
| 'aria-invalid'
|
|
190
|
+
| 'aria-keyshortcuts'
|
|
191
|
+
| 'aria-label'
|
|
192
|
+
| 'aria-labelledby'
|
|
193
|
+
| 'aria-level'
|
|
194
|
+
| 'aria-live'
|
|
195
|
+
| 'aria-modal'
|
|
196
|
+
| 'aria-multiline'
|
|
197
|
+
| 'aria-multiselectable'
|
|
198
|
+
| 'aria-orientation'
|
|
199
|
+
| 'aria-owns'
|
|
200
|
+
| 'aria-placeholder'
|
|
201
|
+
| 'aria-posinset'
|
|
202
|
+
| 'aria-pressed'
|
|
203
|
+
| 'aria-readonly'
|
|
204
|
+
| 'aria-relevant'
|
|
205
|
+
| 'aria-required'
|
|
206
|
+
| 'aria-roledescription'
|
|
207
|
+
| 'aria-rowcount'
|
|
208
|
+
| 'aria-rowindex'
|
|
209
|
+
| 'aria-rowspan'
|
|
210
|
+
| 'aria-selected'
|
|
211
|
+
| 'aria-setsize'
|
|
212
|
+
| 'aria-sort'
|
|
213
|
+
| 'aria-valuemax'
|
|
214
|
+
| 'aria-valuemin'
|
|
215
|
+
| 'aria-valuenow'
|
|
216
|
+
| 'aria-valuetext'
|
|
217
|
+
| 'dangerouslySetInnerHTML'
|
|
218
|
+
| 'onCopy'
|
|
219
|
+
| 'onCopyCapture'
|
|
220
|
+
| 'onCut'
|
|
221
|
+
| 'onCutCapture'
|
|
222
|
+
| 'onPaste'
|
|
223
|
+
| 'onPasteCapture'
|
|
224
|
+
| 'onCompositionEnd'
|
|
225
|
+
| 'onCompositionEndCapture'
|
|
226
|
+
| 'onCompositionStart'
|
|
227
|
+
| 'onCompositionStartCapture'
|
|
228
|
+
| 'onCompositionUpdate'
|
|
229
|
+
| 'onCompositionUpdateCapture'
|
|
230
|
+
| 'onFocus'
|
|
231
|
+
| 'onFocusCapture'
|
|
232
|
+
| 'onBlur'
|
|
233
|
+
| 'onBlurCapture'
|
|
234
|
+
| 'onChange'
|
|
235
|
+
| 'onChangeCapture'
|
|
236
|
+
| 'onBeforeInput'
|
|
237
|
+
| 'onBeforeInputCapture'
|
|
238
|
+
| 'onInput'
|
|
239
|
+
| 'onInputCapture'
|
|
240
|
+
| 'onReset'
|
|
241
|
+
| 'onResetCapture'
|
|
242
|
+
| 'onSubmit'
|
|
243
|
+
| 'onSubmitCapture'
|
|
244
|
+
| 'onInvalid'
|
|
245
|
+
| 'onInvalidCapture'
|
|
246
|
+
| 'onLoad'
|
|
247
|
+
| 'onLoadCapture'
|
|
248
|
+
| 'onError'
|
|
249
|
+
| 'onErrorCapture'
|
|
250
|
+
| 'onKeyDown'
|
|
251
|
+
| 'onKeyDownCapture'
|
|
252
|
+
| 'onKeyPress'
|
|
253
|
+
| 'onKeyPressCapture'
|
|
254
|
+
| 'onKeyUp'
|
|
255
|
+
| 'onKeyUpCapture'
|
|
256
|
+
| 'onAbort'
|
|
257
|
+
| 'onAbortCapture'
|
|
258
|
+
| 'onCanPlay'
|
|
259
|
+
| 'onCanPlayCapture'
|
|
260
|
+
| 'onCanPlayThrough'
|
|
261
|
+
| 'onCanPlayThroughCapture'
|
|
262
|
+
| 'onDurationChange'
|
|
263
|
+
| 'onDurationChangeCapture'
|
|
264
|
+
| 'onEmptied'
|
|
265
|
+
| 'onEmptiedCapture'
|
|
266
|
+
| 'onEncrypted'
|
|
267
|
+
| 'onEncryptedCapture'
|
|
268
|
+
| 'onEnded'
|
|
269
|
+
| 'onEndedCapture'
|
|
270
|
+
| 'onLoadedData'
|
|
271
|
+
| 'onLoadedDataCapture'
|
|
272
|
+
| 'onLoadedMetadata'
|
|
273
|
+
| 'onLoadedMetadataCapture'
|
|
274
|
+
| 'onLoadStart'
|
|
275
|
+
| 'onLoadStartCapture'
|
|
276
|
+
| 'onPause'
|
|
277
|
+
| 'onPauseCapture'
|
|
278
|
+
| 'onPlay'
|
|
279
|
+
| 'onPlayCapture'
|
|
280
|
+
| 'onPlaying'
|
|
281
|
+
| 'onPlayingCapture'
|
|
282
|
+
| 'onProgress'
|
|
283
|
+
| 'onProgressCapture'
|
|
284
|
+
| 'onRateChange'
|
|
285
|
+
| 'onRateChangeCapture'
|
|
286
|
+
| 'onSeeked'
|
|
287
|
+
| 'onSeekedCapture'
|
|
288
|
+
| 'onSeeking'
|
|
289
|
+
| 'onSeekingCapture'
|
|
290
|
+
| 'onStalled'
|
|
291
|
+
| 'onStalledCapture'
|
|
292
|
+
| 'onSuspend'
|
|
293
|
+
| 'onSuspendCapture'
|
|
294
|
+
| 'onTimeUpdate'
|
|
295
|
+
| 'onTimeUpdateCapture'
|
|
296
|
+
| 'onVolumeChange'
|
|
297
|
+
| 'onVolumeChangeCapture'
|
|
298
|
+
| 'onWaiting'
|
|
299
|
+
| 'onWaitingCapture'
|
|
300
|
+
| 'onAuxClick'
|
|
301
|
+
| 'onAuxClickCapture'
|
|
302
|
+
| 'onClick'
|
|
303
|
+
| 'onClickCapture'
|
|
304
|
+
| 'onContextMenu'
|
|
305
|
+
| 'onContextMenuCapture'
|
|
306
|
+
| 'onDoubleClick'
|
|
307
|
+
| 'onDoubleClickCapture'
|
|
308
|
+
| 'onDrag'
|
|
309
|
+
| 'onDragCapture'
|
|
310
|
+
| 'onDragEnd'
|
|
311
|
+
| 'onDragEndCapture'
|
|
312
|
+
| 'onDragEnter'
|
|
313
|
+
| 'onDragEnterCapture'
|
|
314
|
+
| 'onDragExit'
|
|
315
|
+
| 'onDragExitCapture'
|
|
316
|
+
| 'onDragLeave'
|
|
317
|
+
| 'onDragLeaveCapture'
|
|
318
|
+
| 'onDragOver'
|
|
319
|
+
| 'onDragOverCapture'
|
|
320
|
+
| 'onDragStart'
|
|
321
|
+
| 'onDragStartCapture'
|
|
322
|
+
| 'onDrop'
|
|
323
|
+
| 'onDropCapture'
|
|
324
|
+
| 'onMouseDown'
|
|
325
|
+
| 'onMouseDownCapture'
|
|
326
|
+
| 'onMouseEnter'
|
|
327
|
+
| 'onMouseLeave'
|
|
328
|
+
| 'onMouseMove'
|
|
329
|
+
| 'onMouseMoveCapture'
|
|
330
|
+
| 'onMouseOut'
|
|
331
|
+
| 'onMouseOutCapture'
|
|
332
|
+
| 'onMouseOver'
|
|
333
|
+
| 'onMouseOverCapture'
|
|
334
|
+
| 'onMouseUp'
|
|
335
|
+
| 'onMouseUpCapture'
|
|
336
|
+
| 'onSelect'
|
|
337
|
+
| 'onSelectCapture'
|
|
338
|
+
| 'onTouchCancel'
|
|
339
|
+
| 'onTouchCancelCapture'
|
|
340
|
+
| 'onTouchEnd'
|
|
341
|
+
| 'onTouchEndCapture'
|
|
342
|
+
| 'onTouchMove'
|
|
343
|
+
| 'onTouchMoveCapture'
|
|
344
|
+
| 'onTouchStart'
|
|
345
|
+
| 'onTouchStartCapture'
|
|
346
|
+
| 'onPointerDown'
|
|
347
|
+
| 'onPointerDownCapture'
|
|
348
|
+
| 'onPointerMove'
|
|
349
|
+
| 'onPointerMoveCapture'
|
|
350
|
+
| 'onPointerUp'
|
|
351
|
+
| 'onPointerUpCapture'
|
|
352
|
+
| 'onPointerCancel'
|
|
353
|
+
| 'onPointerCancelCapture'
|
|
354
|
+
| 'onPointerEnter'
|
|
355
|
+
| 'onPointerEnterCapture'
|
|
356
|
+
| 'onPointerLeave'
|
|
357
|
+
| 'onPointerLeaveCapture'
|
|
358
|
+
| 'onPointerOver'
|
|
359
|
+
| 'onPointerOverCapture'
|
|
360
|
+
| 'onPointerOut'
|
|
361
|
+
| 'onPointerOutCapture'
|
|
362
|
+
| 'onGotPointerCapture'
|
|
363
|
+
| 'onGotPointerCaptureCapture'
|
|
364
|
+
| 'onLostPointerCapture'
|
|
365
|
+
| 'onLostPointerCaptureCapture'
|
|
366
|
+
| 'onScroll'
|
|
367
|
+
| 'onScrollCapture'
|
|
368
|
+
| 'onWheel'
|
|
369
|
+
| 'onWheelCapture'
|
|
370
|
+
| 'onAnimationStart'
|
|
371
|
+
| 'onAnimationStartCapture'
|
|
372
|
+
| 'onAnimationEnd'
|
|
373
|
+
| 'onAnimationEndCapture'
|
|
374
|
+
| 'onAnimationIteration'
|
|
375
|
+
| 'onAnimationIterationCapture'
|
|
376
|
+
| 'onTransitionEnd'
|
|
377
|
+
| 'onTransitionEndCapture'
|
|
378
|
+
| 'key'
|
|
379
|
+
| 'codeBidiWarnings'
|
|
380
|
+
| 'codeBidiWarningLabel'
|
|
381
|
+
| 'codeBidiWarningTooltipEnabled'
|
|
382
|
+
> &
|
|
383
|
+
React_2.RefAttributes<HTMLElement>
|
|
384
|
+
>>;
|
|
385
|
+
|
|
386
|
+
export declare const CodeBlock: NamedExoticComponent<CodeBlockProps>;
|
|
387
|
+
|
|
388
|
+
export declare interface CodeBlockProps {
|
|
389
|
+
/**
|
|
390
|
+
* The code to be formatted
|
|
391
|
+
*/
|
|
392
|
+
text: string;
|
|
393
|
+
/**
|
|
394
|
+
* A unique string that appears as a data attribute `data-testid`
|
|
395
|
+
* in the rendered code. Serves as a hook for automated tests.
|
|
396
|
+
*/
|
|
397
|
+
testId?: string;
|
|
398
|
+
/**
|
|
399
|
+
* Whether to showLineNumbers or not, defaults to true
|
|
400
|
+
*/
|
|
401
|
+
showLineNumbers?: boolean;
|
|
402
|
+
/**
|
|
403
|
+
* The language in which the code is written
|
|
404
|
+
*/
|
|
405
|
+
language?: SupportedLanguages;
|
|
406
|
+
/**
|
|
407
|
+
* Lines to highlight comma delimited.
|
|
408
|
+
* Example uses:
|
|
409
|
+
|
|
410
|
+
* - To highlight one line `highlight="3"`
|
|
411
|
+
* - To highlight a group of lines `highlight="1-5"`
|
|
412
|
+
* - To highlight multiple groups `highlight="1-5,7,10,15-20"`
|
|
413
|
+
*/
|
|
414
|
+
highlight?: string;
|
|
415
|
+
/**
|
|
416
|
+
* Screen reader text for the start of a highlighted line
|
|
417
|
+
*/
|
|
418
|
+
highlightedStartText?: string;
|
|
419
|
+
/**
|
|
420
|
+
* Screen reader text for the end of a highlighted line
|
|
421
|
+
*/
|
|
422
|
+
highlightedEndText?: string;
|
|
423
|
+
/**
|
|
424
|
+
* When false, disables decorating code with bidi warnings
|
|
425
|
+
*
|
|
426
|
+
* defaults to true
|
|
427
|
+
*/
|
|
428
|
+
codeBidiWarnings?: boolean;
|
|
429
|
+
/**
|
|
430
|
+
* Labels for the previous and next buttons used in pagination.
|
|
431
|
+
* Defaults to `Bidirectional characters change the order that text is rendered. This could be used to obscure malicious code.`.
|
|
432
|
+
*/
|
|
433
|
+
codeBidiWarningLabel?: string;
|
|
434
|
+
/**
|
|
435
|
+
* Defaults to enabled (true)
|
|
436
|
+
*
|
|
437
|
+
* Intended to be disabled when used in a mobile view, such as in the editor
|
|
438
|
+
* via mobile bridge, where the tooltip could end up being cut off of otherwise
|
|
439
|
+
* not work as expected.
|
|
440
|
+
*/
|
|
441
|
+
codeBidiWarningTooltipEnabled?: boolean;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
export declare interface CodeProps extends HTMLProps<HTMLElement> {
|
|
445
|
+
/**
|
|
446
|
+
* A unique string that appears as a data attribute `data-testid`
|
|
447
|
+
* in the rendered code. Serves as a hook for automated tests.
|
|
448
|
+
*/
|
|
449
|
+
testId?: string;
|
|
450
|
+
/**
|
|
451
|
+
* Content to be rendered in the inline code block
|
|
452
|
+
*/
|
|
453
|
+
children?: ReactNode;
|
|
454
|
+
/**
|
|
455
|
+
* When false, disables decorating code with bidi warnings
|
|
456
|
+
*
|
|
457
|
+
* defaults to true
|
|
458
|
+
*/
|
|
459
|
+
codeBidiWarnings?: boolean;
|
|
460
|
+
/**
|
|
461
|
+
* Labels for the previous and next buttons used in pagination.
|
|
462
|
+
* Defaults to `Bidirectional characters change the order that text is rendered. This could be used to obscure malicious code.`.
|
|
463
|
+
*/
|
|
464
|
+
codeBidiWarningLabel?: string;
|
|
465
|
+
/**
|
|
466
|
+
* Defaults to enabled (true)
|
|
467
|
+
*
|
|
468
|
+
* Intended to be disabled when used in a mobile view, such as in the editor
|
|
469
|
+
* via mobile bridge, where the tooltip could end up being cut off of otherwise
|
|
470
|
+
* not work as expected.
|
|
471
|
+
*/
|
|
472
|
+
codeBidiWarningTooltipEnabled?: boolean;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
export declare const getCodeStyles: (
|
|
476
|
+
globalTheme:
|
|
477
|
+
| Theme
|
|
478
|
+
| {
|
|
479
|
+
theme: Theme;
|
|
480
|
+
},
|
|
481
|
+
) => CSSObject;
|
|
482
|
+
|
|
483
|
+
export declare type Language = typeof SUPPORTED_LANGUAGES[number];
|
|
484
|
+
|
|
485
|
+
export declare type LanguageAlias = typeof SUPPORTED_LANGUAGES[number]['alias'][number];
|
|
486
|
+
|
|
487
|
+
declare type LanguageName = typeof SUPPORTED_LANGUAGES[number]['name'];
|
|
488
|
+
|
|
489
|
+
export declare const SUPPORTED_LANGUAGES: readonly [
|
|
490
|
+
{
|
|
491
|
+
readonly name: 'PHP';
|
|
492
|
+
readonly alias: readonly ['php', 'php3', 'php4', 'php5'];
|
|
493
|
+
readonly value: 'php';
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
readonly name: 'Java';
|
|
497
|
+
readonly alias: readonly ['java'];
|
|
498
|
+
readonly value: 'java';
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
readonly name: 'CSharp';
|
|
502
|
+
readonly alias: readonly ['csharp', 'c#'];
|
|
503
|
+
readonly value: 'cs';
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
readonly name: 'Python';
|
|
507
|
+
readonly alias: readonly ['python', 'py'];
|
|
508
|
+
readonly value: 'python';
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
readonly name: 'JavaScript';
|
|
512
|
+
readonly alias: readonly ['javascript', 'js'];
|
|
513
|
+
readonly value: 'javascript';
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
readonly name: 'Html';
|
|
517
|
+
readonly alias: readonly ['html'];
|
|
518
|
+
readonly value: 'xml';
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
readonly name: 'C++';
|
|
522
|
+
readonly alias: readonly ['c++', 'cpp', 'clike'];
|
|
523
|
+
readonly value: 'cpp';
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
readonly name: 'Ruby';
|
|
527
|
+
readonly alias: readonly ['ruby', 'rb', 'duby'];
|
|
528
|
+
readonly value: 'ruby';
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
readonly name: 'Objective-C';
|
|
532
|
+
readonly alias: readonly ['objective-c', 'objectivec', 'obj-c', 'objc'];
|
|
533
|
+
readonly value: 'objectivec';
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
readonly name: 'C';
|
|
537
|
+
readonly alias: readonly ['c'];
|
|
538
|
+
readonly value: 'cpp';
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
readonly name: 'Swift';
|
|
542
|
+
readonly alias: readonly ['swift'];
|
|
543
|
+
readonly value: 'swift';
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
readonly name: 'TeX';
|
|
547
|
+
readonly alias: readonly ['tex', 'latex'];
|
|
548
|
+
readonly value: 'tex';
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
readonly name: 'Shell';
|
|
552
|
+
readonly alias: readonly ['shell', 'bash', 'sh', 'ksh', 'zsh'];
|
|
553
|
+
readonly value: 'shell';
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
readonly name: 'Scala';
|
|
557
|
+
readonly alias: readonly ['scala'];
|
|
558
|
+
readonly value: 'scala';
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
readonly name: 'Go';
|
|
562
|
+
readonly alias: readonly ['go'];
|
|
563
|
+
readonly value: 'go';
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
readonly name: 'ActionScript';
|
|
567
|
+
readonly alias: readonly ['actionscript', 'actionscript3', 'as'];
|
|
568
|
+
readonly value: 'actionscript';
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
readonly name: 'ColdFusion';
|
|
572
|
+
readonly alias: readonly ['coldfusion'];
|
|
573
|
+
readonly value: 'xml';
|
|
574
|
+
},
|
|
575
|
+
{
|
|
576
|
+
readonly name: 'JavaFX';
|
|
577
|
+
readonly alias: readonly ['javafx', 'jfx'];
|
|
578
|
+
readonly value: 'java';
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
readonly name: 'VbNet';
|
|
582
|
+
readonly alias: readonly ['vbnet', 'vb.net', 'vfp', 'clipper', 'xbase'];
|
|
583
|
+
readonly value: 'vbnet';
|
|
584
|
+
},
|
|
585
|
+
{
|
|
586
|
+
readonly name: 'JSON';
|
|
587
|
+
readonly alias: readonly ['json'];
|
|
588
|
+
readonly value: 'json';
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
readonly name: 'MATLAB';
|
|
592
|
+
readonly alias: readonly ['matlab'];
|
|
593
|
+
readonly value: 'matlab';
|
|
594
|
+
},
|
|
595
|
+
{
|
|
596
|
+
readonly name: 'Groovy';
|
|
597
|
+
readonly alias: readonly ['groovy'];
|
|
598
|
+
readonly value: 'groovy';
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
readonly name: 'SQL';
|
|
602
|
+
readonly alias: readonly [
|
|
603
|
+
'sql',
|
|
604
|
+
'postgresql',
|
|
605
|
+
'postgres',
|
|
606
|
+
'plpgsql',
|
|
607
|
+
'psql',
|
|
608
|
+
'postgresql-console',
|
|
609
|
+
'postgres-console',
|
|
610
|
+
'tsql',
|
|
611
|
+
't-sql',
|
|
612
|
+
'mysql',
|
|
613
|
+
'sqlite',
|
|
614
|
+
];
|
|
615
|
+
readonly value: 'sql';
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
readonly name: 'R';
|
|
619
|
+
readonly alias: readonly ['r'];
|
|
620
|
+
readonly value: 'r';
|
|
621
|
+
},
|
|
622
|
+
{
|
|
623
|
+
readonly name: 'Perl';
|
|
624
|
+
readonly alias: readonly ['perl', 'pl'];
|
|
625
|
+
readonly value: 'perl';
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
readonly name: 'Lua';
|
|
629
|
+
readonly alias: readonly ['lua'];
|
|
630
|
+
readonly value: 'lua';
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
readonly name: 'Pascal';
|
|
634
|
+
readonly alias: readonly ['pas', 'pascal', 'objectpascal', 'delphi'];
|
|
635
|
+
readonly value: 'pascal';
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
readonly name: 'XML';
|
|
639
|
+
readonly alias: readonly ['xml'];
|
|
640
|
+
readonly value: 'xml';
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
readonly name: 'TypeScript';
|
|
644
|
+
readonly alias: readonly ['typescript', 'ts'];
|
|
645
|
+
readonly value: 'typescript';
|
|
646
|
+
},
|
|
647
|
+
{
|
|
648
|
+
readonly name: 'CoffeeScript';
|
|
649
|
+
readonly alias: readonly ['coffeescript', 'coffee-script', 'coffee'];
|
|
650
|
+
readonly value: 'coffeescript';
|
|
651
|
+
},
|
|
652
|
+
{
|
|
653
|
+
readonly name: 'Haskell';
|
|
654
|
+
readonly alias: readonly ['haskell', 'hs'];
|
|
655
|
+
readonly value: 'haskell';
|
|
656
|
+
},
|
|
657
|
+
{
|
|
658
|
+
readonly name: 'Puppet';
|
|
659
|
+
readonly alias: readonly ['puppet'];
|
|
660
|
+
readonly value: 'puppet';
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
readonly name: 'Arduino';
|
|
664
|
+
readonly alias: readonly ['arduino'];
|
|
665
|
+
readonly value: 'arduino';
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
readonly name: 'Fortran';
|
|
669
|
+
readonly alias: readonly ['fortran'];
|
|
670
|
+
readonly value: 'fortran';
|
|
671
|
+
},
|
|
672
|
+
{
|
|
673
|
+
readonly name: 'Erlang';
|
|
674
|
+
readonly alias: readonly ['erlang', 'erl'];
|
|
675
|
+
readonly value: 'erlang';
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
readonly name: 'PowerShell';
|
|
679
|
+
readonly alias: readonly ['powershell', 'posh', 'ps1', 'psm1'];
|
|
680
|
+
readonly value: 'powershell';
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
readonly name: 'Haxe';
|
|
684
|
+
readonly alias: readonly ['haxe', 'hx', 'hxsl'];
|
|
685
|
+
readonly value: 'haxe';
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
readonly name: 'Elixir';
|
|
689
|
+
readonly alias: readonly ['elixir', 'ex', 'exs'];
|
|
690
|
+
readonly value: 'elixir';
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
readonly name: 'Verilog';
|
|
694
|
+
readonly alias: readonly ['verilog', 'v'];
|
|
695
|
+
readonly value: 'verilog';
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
readonly name: 'Rust';
|
|
699
|
+
readonly alias: readonly ['rust'];
|
|
700
|
+
readonly value: 'rust';
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
readonly name: 'VHDL';
|
|
704
|
+
readonly alias: readonly ['vhdl'];
|
|
705
|
+
readonly value: 'vhdl';
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
readonly name: 'Sass';
|
|
709
|
+
readonly alias: readonly ['sass'];
|
|
710
|
+
readonly value: 'less';
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
readonly name: 'OCaml';
|
|
714
|
+
readonly alias: readonly ['ocaml'];
|
|
715
|
+
readonly value: 'ocaml';
|
|
716
|
+
},
|
|
717
|
+
{
|
|
718
|
+
readonly name: 'Dart';
|
|
719
|
+
readonly alias: readonly ['dart'];
|
|
720
|
+
readonly value: 'dart';
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
readonly name: 'CSS';
|
|
724
|
+
readonly alias: readonly ['css'];
|
|
725
|
+
readonly value: 'css';
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
readonly name: 'reStructuredText';
|
|
729
|
+
readonly alias: readonly ['restructuredtext', 'rst', 'rest'];
|
|
730
|
+
readonly value: 'rest';
|
|
731
|
+
},
|
|
732
|
+
{
|
|
733
|
+
readonly name: 'Kotlin';
|
|
734
|
+
readonly alias: readonly ['kotlin'];
|
|
735
|
+
readonly value: 'kotlin';
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
readonly name: 'D';
|
|
739
|
+
readonly alias: readonly ['d'];
|
|
740
|
+
readonly value: 'd';
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
readonly name: 'Octave';
|
|
744
|
+
readonly alias: readonly ['octave'];
|
|
745
|
+
readonly value: 'matlab';
|
|
746
|
+
},
|
|
747
|
+
{
|
|
748
|
+
readonly name: 'QML';
|
|
749
|
+
readonly alias: readonly ['qbs', 'qml'];
|
|
750
|
+
readonly value: 'qml';
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
readonly name: 'Prolog';
|
|
754
|
+
readonly alias: readonly ['prolog'];
|
|
755
|
+
readonly value: 'prolog';
|
|
756
|
+
},
|
|
757
|
+
{
|
|
758
|
+
readonly name: 'FoxPro';
|
|
759
|
+
readonly alias: readonly ['foxpro', 'purebasic'];
|
|
760
|
+
readonly value: 'purebasic';
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
readonly name: 'Scheme';
|
|
764
|
+
readonly alias: readonly ['scheme', 'scm'];
|
|
765
|
+
readonly value: 'scheme';
|
|
766
|
+
},
|
|
767
|
+
{
|
|
768
|
+
readonly name: 'CUDA';
|
|
769
|
+
readonly alias: readonly ['cuda', 'cu'];
|
|
770
|
+
readonly value: 'cpp';
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
readonly name: 'Julia';
|
|
774
|
+
readonly alias: readonly ['julia', 'jl'];
|
|
775
|
+
readonly value: 'julia';
|
|
776
|
+
},
|
|
777
|
+
{
|
|
778
|
+
readonly name: 'Racket';
|
|
779
|
+
readonly alias: readonly ['racket', 'rkt'];
|
|
780
|
+
readonly value: 'lisp';
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
readonly name: 'Ada';
|
|
784
|
+
readonly alias: readonly ['ada', 'ada95', 'ada2005'];
|
|
785
|
+
readonly value: 'ada';
|
|
786
|
+
},
|
|
787
|
+
{
|
|
788
|
+
readonly name: 'Tcl';
|
|
789
|
+
readonly alias: readonly ['tcl'];
|
|
790
|
+
readonly value: 'tcl';
|
|
791
|
+
},
|
|
792
|
+
{
|
|
793
|
+
readonly name: 'Mathematica';
|
|
794
|
+
readonly alias: readonly ['mathematica', 'mma', 'nb'];
|
|
795
|
+
readonly value: 'mathematica';
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
readonly name: 'Autoit';
|
|
799
|
+
readonly alias: readonly ['autoit'];
|
|
800
|
+
readonly value: 'autoit';
|
|
801
|
+
},
|
|
802
|
+
{
|
|
803
|
+
readonly name: 'StandardML';
|
|
804
|
+
readonly alias: readonly ['standardmL', 'sml', 'standardml'];
|
|
805
|
+
readonly value: 'sml';
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
readonly name: 'Objective-J';
|
|
809
|
+
readonly alias: readonly ['objective-j', 'objectivej', 'obj-j', 'objj'];
|
|
810
|
+
readonly value: 'objectivec';
|
|
811
|
+
},
|
|
812
|
+
{
|
|
813
|
+
readonly name: 'Smalltalk';
|
|
814
|
+
readonly alias: readonly ['smalltalk', 'squeak', 'st'];
|
|
815
|
+
readonly value: 'smalltalk';
|
|
816
|
+
},
|
|
817
|
+
{
|
|
818
|
+
readonly name: 'Vala';
|
|
819
|
+
readonly alias: readonly ['vala', 'vapi'];
|
|
820
|
+
readonly value: 'vala';
|
|
821
|
+
},
|
|
822
|
+
{
|
|
823
|
+
readonly name: 'ABAP';
|
|
824
|
+
readonly alias: readonly ['abap'];
|
|
825
|
+
readonly value: 'sql';
|
|
826
|
+
},
|
|
827
|
+
{
|
|
828
|
+
readonly name: 'LiveScript';
|
|
829
|
+
readonly alias: readonly ['livescript', 'live-script'];
|
|
830
|
+
readonly value: 'livescript';
|
|
831
|
+
},
|
|
832
|
+
{
|
|
833
|
+
readonly name: 'XQuery';
|
|
834
|
+
readonly alias: readonly ['xquery', 'xqy', 'xq', 'xql', 'xqm'];
|
|
835
|
+
readonly value: 'xquery';
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
readonly name: 'PlainText';
|
|
839
|
+
readonly alias: readonly ['text', 'plaintext'];
|
|
840
|
+
readonly value: 'text';
|
|
841
|
+
},
|
|
842
|
+
{
|
|
843
|
+
readonly name: 'Yaml';
|
|
844
|
+
readonly alias: readonly ['yaml', 'yml'];
|
|
845
|
+
readonly value: 'yaml';
|
|
846
|
+
},
|
|
847
|
+
{
|
|
848
|
+
readonly name: 'GraphQL';
|
|
849
|
+
readonly alias: readonly ['graphql'];
|
|
850
|
+
readonly value: 'graphql';
|
|
851
|
+
},
|
|
852
|
+
{
|
|
853
|
+
readonly name: 'AppleScript';
|
|
854
|
+
readonly alias: readonly ['applescript'];
|
|
855
|
+
readonly value: 'applescript';
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
readonly name: 'Clojure';
|
|
859
|
+
readonly alias: readonly ['clojure'];
|
|
860
|
+
readonly value: 'clojure';
|
|
861
|
+
},
|
|
862
|
+
{
|
|
863
|
+
readonly name: 'Diff';
|
|
864
|
+
readonly alias: readonly ['diff'];
|
|
865
|
+
readonly value: 'diff';
|
|
866
|
+
},
|
|
867
|
+
{
|
|
868
|
+
readonly name: 'VisualBasic';
|
|
869
|
+
readonly alias: readonly ['visualbasic'];
|
|
870
|
+
readonly value: 'visual-basic';
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
readonly name: 'JSX';
|
|
874
|
+
readonly alias: readonly ['jsx'];
|
|
875
|
+
readonly value: 'jsx';
|
|
876
|
+
},
|
|
877
|
+
{
|
|
878
|
+
readonly name: 'TSX';
|
|
879
|
+
readonly alias: readonly ['tsx'];
|
|
880
|
+
readonly value: 'tsx';
|
|
881
|
+
},
|
|
882
|
+
{
|
|
883
|
+
readonly name: 'SplunkSPL';
|
|
884
|
+
readonly alias: readonly ['splunk-spl'];
|
|
885
|
+
readonly value: 'splunk-spl';
|
|
886
|
+
},
|
|
887
|
+
];
|
|
888
|
+
|
|
889
|
+
export declare type SupportedLanguages = LanguageName | LanguageAlias;
|
|
890
|
+
|
|
891
|
+
export {};
|
|
892
|
+
```
|