@atlaskit/code 14.3.9 → 14.4.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/CHANGELOG.md +16 -0
- package/bidi-warning/package.json +8 -1
- package/bidi-warning-decorator/package.json +8 -1
- package/block/package.json +8 -1
- package/constants/package.json +8 -1
- package/dist/cjs/bidi-warning/ui/styled.js +4 -4
- package/dist/cjs/code-block.js +3 -3
- package/dist/cjs/code.js +7 -7
- package/dist/cjs/internal/theme/styles.js +4 -9
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/bidi-warning/ui/styled.js +1 -1
- package/dist/es2019/code-block.js +2 -2
- package/dist/es2019/code.js +2 -2
- package/dist/es2019/internal/theme/styles.js +4 -9
- package/dist/es2019/version.json +1 -1
- package/dist/esm/bidi-warning/ui/styled.js +1 -1
- package/dist/esm/code-block.js +2 -2
- package/dist/esm/code.js +2 -2
- package/dist/esm/internal/theme/styles.js +4 -9
- package/dist/esm/version.json +1 -1
- package/dist/types/bidi-warning/ui/styled.d.ts +2 -1
- package/dist/types/code.d.ts +1 -1
- package/dist/types/internal/theme/styles.d.ts +10 -2
- package/dist/types-ts4.0/bidi-warning/bidi-warning-decorator.d.ts +5 -0
- package/dist/types-ts4.0/bidi-warning/index.d.ts +1 -0
- package/dist/types-ts4.0/bidi-warning/ui/index.d.ts +3 -0
- package/dist/types-ts4.0/bidi-warning/ui/styled.d.ts +8 -0
- package/dist/types-ts4.0/bidi-warning/ui/types.d.ts +33 -0
- package/dist/types-ts4.0/code-block.d.ts +13 -0
- package/dist/types-ts4.0/code.d.ts +16 -0
- package/dist/types-ts4.0/constants.d.ts +625 -0
- package/dist/types-ts4.0/entry-points/block.d.ts +2 -0
- package/dist/types-ts4.0/entry-points/constants.d.ts +1 -0
- package/dist/types-ts4.0/entry-points/inline.d.ts +2 -0
- package/dist/types-ts4.0/entry-points/types.d.ts +1 -0
- package/dist/types-ts4.0/extract-react-types/code-block.d.ts +37 -0
- package/dist/types-ts4.0/extract-react-types/code.d.ts +2 -0
- package/dist/types-ts4.0/index.d.ts +4 -0
- package/dist/types-ts4.0/internal/hooks/use-highlight.d.ts +6 -0
- package/dist/types-ts4.0/internal/theme/constants.d.ts +8 -0
- package/dist/types-ts4.0/internal/theme/get-theme.d.ts +7 -0
- package/dist/types-ts4.0/internal/theme/styles.d.ts +27 -0
- package/dist/types-ts4.0/internal/theme/types.d.ts +57 -0
- package/dist/types-ts4.0/internal/types.d.ts +57 -0
- package/dist/types-ts4.0/internal/utils/get-normalized-language.d.ts +2 -0
- package/dist/types-ts4.0/react-syntax-highlighter-bidi-warning-renderer.d.ts +9 -0
- package/dist/types-ts4.0/types.d.ts +32 -0
- package/inline/package.json +8 -1
- package/package.json +15 -7
- package/report.api.md +130 -112
- package/types/package.json +8 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { CSSObject } from '@emotion/react';
|
|
2
|
+
import type { Theme } from '@atlaskit/theme/types';
|
|
3
|
+
import type { CodeBlockTheme, CodeTheme } from './types';
|
|
4
|
+
export declare const getLineNumWidth: (numLines: number) => string;
|
|
5
|
+
/**
|
|
6
|
+
* Styles applied at the root element level, common across code/codeblock
|
|
7
|
+
*/
|
|
8
|
+
export declare const getBaseCodeStyles: (theme: CodeTheme) => {
|
|
9
|
+
fontSize: number;
|
|
10
|
+
fontFamily: string | undefined;
|
|
11
|
+
fontWeight: string;
|
|
12
|
+
backgroundColor: string;
|
|
13
|
+
color: string | undefined;
|
|
14
|
+
borderStyle: string;
|
|
15
|
+
borderRadius: string;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Takes an implemented CodeBlock theme, and returns styles required for
|
|
19
|
+
* react-syntax-highlighter.
|
|
20
|
+
*
|
|
21
|
+
* @param theme
|
|
22
|
+
*/
|
|
23
|
+
export declare const getCodeBlockStyles: (theme: CodeBlockTheme) => (highlightedStartText: string, highlightedEndText: string, hasLineNumbers?: boolean | undefined) => CSSObject;
|
|
24
|
+
export declare const getCodeStyles: (globalTheme: Theme | {
|
|
25
|
+
theme: Theme;
|
|
26
|
+
}) => CSSObject;
|
|
27
|
+
export declare const getCodeBlockTheme: (globalTheme: Theme, maxLines?: number | undefined) => CodeBlockTheme;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export interface CodeTheme {
|
|
2
|
+
backgroundColor?: string;
|
|
3
|
+
textColor?: string;
|
|
4
|
+
fontFamilyItalic?: string;
|
|
5
|
+
fontFamily?: string;
|
|
6
|
+
lineNumberColor?: string;
|
|
7
|
+
lineNumberBgColor?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface CodeBlockTheme extends CodeTheme {
|
|
10
|
+
substringColor?: string;
|
|
11
|
+
keywordColor?: string;
|
|
12
|
+
attributeColor?: string;
|
|
13
|
+
selectorTagColor?: string;
|
|
14
|
+
docTagColor?: string;
|
|
15
|
+
nameColor?: string;
|
|
16
|
+
builtInColor?: string;
|
|
17
|
+
literalColor?: string;
|
|
18
|
+
bulletColor?: string;
|
|
19
|
+
codeColor?: string;
|
|
20
|
+
additionColor?: string;
|
|
21
|
+
regexpColor?: string;
|
|
22
|
+
symbolColor?: string;
|
|
23
|
+
variableColor?: string;
|
|
24
|
+
templateVariableColor?: string;
|
|
25
|
+
linkColor?: string;
|
|
26
|
+
selectorAttributeColor?: string;
|
|
27
|
+
selectorPseudoColor?: string;
|
|
28
|
+
typeColor?: string;
|
|
29
|
+
stringColor?: string;
|
|
30
|
+
selectorIdColor?: string;
|
|
31
|
+
selectorClassColor?: string;
|
|
32
|
+
quoteColor?: string;
|
|
33
|
+
templateTagColor?: string;
|
|
34
|
+
deletionColor?: string;
|
|
35
|
+
titleColor?: string;
|
|
36
|
+
sectionColor?: string;
|
|
37
|
+
commentColor?: string;
|
|
38
|
+
metaKeywordColor?: string;
|
|
39
|
+
metaColor?: string;
|
|
40
|
+
functionColor?: string;
|
|
41
|
+
numberColor?: string;
|
|
42
|
+
prologColor?: string;
|
|
43
|
+
cdataColor?: string;
|
|
44
|
+
punctuationColor?: string;
|
|
45
|
+
propertyColor?: string;
|
|
46
|
+
constantColor?: string;
|
|
47
|
+
deletedColor?: string;
|
|
48
|
+
booleanColor?: string;
|
|
49
|
+
charColor?: string;
|
|
50
|
+
insertedColor?: string;
|
|
51
|
+
operatorColor?: string;
|
|
52
|
+
atruleColor?: string;
|
|
53
|
+
importantColor?: string;
|
|
54
|
+
highlightedLineBgColor?: string;
|
|
55
|
+
highlightedLineBorderColor?: string;
|
|
56
|
+
lineNumberWidth?: string | number;
|
|
57
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { SupportedLanguages } from '../constants';
|
|
2
|
+
export interface CodeBlockProps {
|
|
3
|
+
/**
|
|
4
|
+
* The code to be formatted
|
|
5
|
+
*/
|
|
6
|
+
text: string;
|
|
7
|
+
/**
|
|
8
|
+
* A unique string that appears as a data attribute `data-testid`
|
|
9
|
+
* in the rendered code. Serves as a hook for automated tests.
|
|
10
|
+
*/
|
|
11
|
+
testId?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Whether to showLineNumbers or not, defaults to true
|
|
14
|
+
*/
|
|
15
|
+
showLineNumbers?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* The language in which the code is written
|
|
18
|
+
*/
|
|
19
|
+
language?: SupportedLanguages;
|
|
20
|
+
/**
|
|
21
|
+
* Lines to highlight comma delimited.
|
|
22
|
+
* Example uses:
|
|
23
|
+
* - To highlight one line `highlight="3"`
|
|
24
|
+
* - To highlight a group of lines `highlight="1-5"`
|
|
25
|
+
* - To highlight multiple groups `highlight="1-5,7,10,15-20"`
|
|
26
|
+
*/
|
|
27
|
+
highlight?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Screen reader text for the start of a highlighted line
|
|
30
|
+
*/
|
|
31
|
+
highlightedStartText?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Screen reader text for the end of a highlighted line
|
|
34
|
+
*/
|
|
35
|
+
highlightedEndText?: string;
|
|
36
|
+
/**
|
|
37
|
+
* When false, disables decorating code with bidi warnings
|
|
38
|
+
*
|
|
39
|
+
* defaults to true
|
|
40
|
+
*/
|
|
41
|
+
codeBidiWarnings?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Labels for the previous and next buttons used in pagination.
|
|
44
|
+
* Defaults to `Bidirectional characters change the order that text is rendered. This could be used to obscure malicious code.`.
|
|
45
|
+
*/
|
|
46
|
+
codeBidiWarningLabel?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Defaults to enabled (true)
|
|
49
|
+
*
|
|
50
|
+
* Intended to be disabled when used in a mobile view, such as in the editor
|
|
51
|
+
* via mobile bridge, where the tooltip could end up being cut off of otherwise
|
|
52
|
+
* not work as expected.
|
|
53
|
+
*/
|
|
54
|
+
codeBidiWarningTooltipEnabled?: boolean;
|
|
55
|
+
}
|
|
56
|
+
export type { SupportedLanguages, LanguageAlias, Language } from '../constants';
|
|
57
|
+
export type { CodeBlockTheme, CodeTheme } from './theme/types';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare type CodeBidiWarningConfig = {
|
|
2
|
+
codeBidiWarningLabel?: string;
|
|
3
|
+
codeBidiWarningTooltipEnabled: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare function createBidiWarningRenderer(codeBidiWarningConfig: CodeBidiWarningConfig): ({ rows, stylesheet, useInlineStyles, }: any) => any;
|
|
6
|
+
export declare function createStyleObject(classNames: any, elementStyle: {} | undefined, stylesheet: any): any;
|
|
7
|
+
export declare function createClassNameString(classNames: any): any;
|
|
8
|
+
export declare function createChildren(stylesheet: any, useInlineStyles: any, codeBidiWarningConfig: any): (children: any) => any;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { HTMLProps, ReactNode } from 'react';
|
|
2
|
+
export type { SupportedLanguages, Language, LanguageAlias, CodeBlockProps, } from './internal/types';
|
|
3
|
+
export interface CodeProps extends HTMLProps<HTMLElement> {
|
|
4
|
+
/**
|
|
5
|
+
* A unique string that appears as a data attribute `data-testid`
|
|
6
|
+
* in the rendered code. Serves as a hook for automated tests.
|
|
7
|
+
*/
|
|
8
|
+
testId?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Content to be rendered in the inline code block
|
|
11
|
+
*/
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* When false, disables decorating code with bidi warnings
|
|
15
|
+
*
|
|
16
|
+
* defaults to true
|
|
17
|
+
*/
|
|
18
|
+
codeBidiWarnings?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Labels for the previous and next buttons used in pagination.
|
|
21
|
+
* Defaults to `Bidirectional characters change the order that text is rendered. This could be used to obscure malicious code.`.
|
|
22
|
+
*/
|
|
23
|
+
codeBidiWarningLabel?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Defaults to enabled (true)
|
|
26
|
+
*
|
|
27
|
+
* Intended to be disabled when used in a mobile view, such as in the editor
|
|
28
|
+
* via mobile bridge, where the tooltip could end up being cut off of otherwise
|
|
29
|
+
* not work as expected.
|
|
30
|
+
*/
|
|
31
|
+
codeBidiWarningTooltipEnabled?: boolean;
|
|
32
|
+
}
|
package/inline/package.json
CHANGED
|
@@ -4,5 +4,12 @@
|
|
|
4
4
|
"module": "../dist/esm/entry-points/inline.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/entry-points/inline.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/entry-points/inline.d.ts"
|
|
7
|
+
"types": "../dist/types/entry-points/inline.d.ts",
|
|
8
|
+
"typesVersions": {
|
|
9
|
+
">=4.0 <4.5": {
|
|
10
|
+
"*": [
|
|
11
|
+
"../dist/types-ts4.0/entry-points/inline.d.ts"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
8
15
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/code",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.4.0",
|
|
4
4
|
"description": "Code highlights short strings of code snippets inline with body text.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -12,6 +12,13 @@
|
|
|
12
12
|
"module": "dist/esm/index.js",
|
|
13
13
|
"module:es2019": "dist/es2019/index.js",
|
|
14
14
|
"types": "dist/types/index.d.ts",
|
|
15
|
+
"typesVersions": {
|
|
16
|
+
">=4.0 <4.5": {
|
|
17
|
+
"*": [
|
|
18
|
+
"dist/types-ts4.0/*"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
},
|
|
15
22
|
"sideEffects": false,
|
|
16
23
|
"atlaskit:src": "src/index.tsx",
|
|
17
24
|
"atlassian": {
|
|
@@ -27,11 +34,11 @@
|
|
|
27
34
|
},
|
|
28
35
|
"dependencies": {
|
|
29
36
|
"@atlaskit/codemod-utils": "^4.1.0",
|
|
30
|
-
"@atlaskit/theme": "^12.
|
|
37
|
+
"@atlaskit/theme": "^12.2.0",
|
|
31
38
|
"@atlaskit/tokens": "^0.10.0",
|
|
32
|
-
"@atlaskit/tooltip": "^17.
|
|
39
|
+
"@atlaskit/tooltip": "^17.6.0",
|
|
33
40
|
"@babel/runtime": "^7.0.0",
|
|
34
|
-
"@emotion/
|
|
41
|
+
"@emotion/react": "^11.7.1",
|
|
35
42
|
"memoize-one": "^6.0.0",
|
|
36
43
|
"react-syntax-highlighter": "^15.4.3"
|
|
37
44
|
},
|
|
@@ -42,18 +49,19 @@
|
|
|
42
49
|
"@atlaskit/button": "^16.3.0",
|
|
43
50
|
"@atlaskit/docs": "^9.0.0",
|
|
44
51
|
"@atlaskit/ds-lib": "^2.1.0",
|
|
45
|
-
"@atlaskit/section-message": "^6.
|
|
52
|
+
"@atlaskit/section-message": "^6.3.0",
|
|
46
53
|
"@atlaskit/ssr": "*",
|
|
47
54
|
"@atlaskit/visual-regression": "*",
|
|
55
|
+
"@atlaskit/webdriver-runner": "*",
|
|
48
56
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
49
|
-
"@testing-library/react": "^
|
|
57
|
+
"@testing-library/react": "^12.1.5",
|
|
50
58
|
"@types/jscodeshift": "^0.11.0",
|
|
51
59
|
"@types/react-syntax-highlighter": "^13.5.0",
|
|
52
60
|
"color-contrast-checker": "^1.5.0",
|
|
53
61
|
"jscodeshift": "^0.13.0",
|
|
54
62
|
"prismjs": "^1.25.0",
|
|
55
63
|
"react-dom": "^16.8.0",
|
|
56
|
-
"typescript": "4.
|
|
64
|
+
"typescript": "4.5.5"
|
|
57
65
|
},
|
|
58
66
|
"keywords": [
|
|
59
67
|
"atlaskit",
|
package/report.api.md
CHANGED
|
@@ -1,145 +1,75 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/code"
|
|
1
|
+
## API Report File for "@atlaskit/code".
|
|
2
2
|
|
|
3
|
-
> Do not edit this file.
|
|
3
|
+
> Do not edit this file. This report is auto-generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
[Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
4
6
|
|
|
5
7
|
```ts
|
|
6
8
|
/// <reference types="react" />
|
|
7
9
|
|
|
8
|
-
import type { CSSObject } from '@emotion/
|
|
10
|
+
import type { CSSObject } from '@emotion/react';
|
|
9
11
|
import type { HTMLProps } from 'react';
|
|
10
12
|
import { NamedExoticComponent } from 'react';
|
|
11
13
|
import { default as React_2 } from 'react';
|
|
12
14
|
import type { ReactNode } from 'react';
|
|
13
15
|
import type { Theme } from '@atlaskit/theme/types';
|
|
14
16
|
|
|
17
|
+
/**
|
|
18
|
+
* __Code__
|
|
19
|
+
*
|
|
20
|
+
* Code highlights short strings of code snippets inline with body text.
|
|
21
|
+
*
|
|
22
|
+
* - [Examples](https://atlassian.design/components/code/examples)
|
|
23
|
+
* - [Code](https://atlassian.design/components/code/code)
|
|
24
|
+
* - [Usage](https://atlassian.design/components/code/usage)
|
|
25
|
+
*/
|
|
15
26
|
export declare const Code: React_2.MemoExoticComponent<React_2.ForwardRefExoticComponent<
|
|
16
27
|
Pick<
|
|
17
28
|
CodeProps,
|
|
18
29
|
| 'as'
|
|
19
|
-
| 'css'
|
|
20
30
|
| 'name'
|
|
31
|
+
| 'testId'
|
|
32
|
+
| 'codeBidiWarnings'
|
|
33
|
+
| 'codeBidiWarningLabel'
|
|
34
|
+
| 'codeBidiWarningTooltipEnabled'
|
|
35
|
+
| 'list'
|
|
36
|
+
| 'step'
|
|
21
37
|
| 'color'
|
|
22
38
|
| 'content'
|
|
23
39
|
| 'height'
|
|
24
40
|
| 'width'
|
|
25
41
|
| 'start'
|
|
26
|
-
| '
|
|
27
|
-
| '
|
|
42
|
+
| 'hidden'
|
|
43
|
+
| 'size'
|
|
44
|
+
| 'style'
|
|
28
45
|
| 'default'
|
|
46
|
+
| 'wrap'
|
|
47
|
+
| 'open'
|
|
48
|
+
| 'multiple'
|
|
49
|
+
| 'disabled'
|
|
50
|
+
| 'children'
|
|
29
51
|
| 'cite'
|
|
30
52
|
| 'data'
|
|
31
53
|
| 'form'
|
|
32
54
|
| 'label'
|
|
33
55
|
| 'span'
|
|
34
|
-
| 'style'
|
|
35
56
|
| 'summary'
|
|
36
57
|
| 'title'
|
|
37
58
|
| 'pattern'
|
|
38
|
-
| '
|
|
39
|
-
| '
|
|
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'
|
|
59
|
+
| 'className'
|
|
60
|
+
| 'key'
|
|
130
61
|
| 'defaultChecked'
|
|
131
62
|
| 'defaultValue'
|
|
132
63
|
| 'suppressContentEditableWarning'
|
|
133
64
|
| 'suppressHydrationWarning'
|
|
134
65
|
| 'accessKey'
|
|
135
|
-
| 'className'
|
|
136
66
|
| 'contentEditable'
|
|
137
67
|
| 'contextMenu'
|
|
138
68
|
| 'dir'
|
|
139
69
|
| 'draggable'
|
|
140
|
-
| 'hidden'
|
|
141
70
|
| 'id'
|
|
142
71
|
| 'lang'
|
|
72
|
+
| 'placeholder'
|
|
143
73
|
| 'slot'
|
|
144
74
|
| 'spellCheck'
|
|
145
75
|
| 'tabIndex'
|
|
@@ -375,14 +305,103 @@ export declare const Code: React_2.MemoExoticComponent<React_2.ForwardRefExoticC
|
|
|
375
305
|
| 'onAnimationIterationCapture'
|
|
376
306
|
| 'onTransitionEnd'
|
|
377
307
|
| 'onTransitionEndCapture'
|
|
378
|
-
| '
|
|
379
|
-
| '
|
|
380
|
-
| '
|
|
381
|
-
| '
|
|
308
|
+
| 'accept'
|
|
309
|
+
| 'acceptCharset'
|
|
310
|
+
| 'action'
|
|
311
|
+
| 'allowFullScreen'
|
|
312
|
+
| 'allowTransparency'
|
|
313
|
+
| 'alt'
|
|
314
|
+
| 'async'
|
|
315
|
+
| 'autoComplete'
|
|
316
|
+
| 'autoFocus'
|
|
317
|
+
| 'autoPlay'
|
|
318
|
+
| 'capture'
|
|
319
|
+
| 'cellPadding'
|
|
320
|
+
| 'cellSpacing'
|
|
321
|
+
| 'charSet'
|
|
322
|
+
| 'challenge'
|
|
323
|
+
| 'checked'
|
|
324
|
+
| 'classID'
|
|
325
|
+
| 'cols'
|
|
326
|
+
| 'colSpan'
|
|
327
|
+
| 'controls'
|
|
328
|
+
| 'coords'
|
|
329
|
+
| 'crossOrigin'
|
|
330
|
+
| 'dateTime'
|
|
331
|
+
| 'defer'
|
|
332
|
+
| 'download'
|
|
333
|
+
| 'encType'
|
|
334
|
+
| 'formAction'
|
|
335
|
+
| 'formEncType'
|
|
336
|
+
| 'formMethod'
|
|
337
|
+
| 'formNoValidate'
|
|
338
|
+
| 'formTarget'
|
|
339
|
+
| 'frameBorder'
|
|
340
|
+
| 'headers'
|
|
341
|
+
| 'high'
|
|
342
|
+
| 'href'
|
|
343
|
+
| 'hrefLang'
|
|
344
|
+
| 'htmlFor'
|
|
345
|
+
| 'httpEquiv'
|
|
346
|
+
| 'integrity'
|
|
347
|
+
| 'keyParams'
|
|
348
|
+
| 'keyType'
|
|
349
|
+
| 'kind'
|
|
350
|
+
| 'loop'
|
|
351
|
+
| 'low'
|
|
352
|
+
| 'manifest'
|
|
353
|
+
| 'marginHeight'
|
|
354
|
+
| 'marginWidth'
|
|
355
|
+
| 'max'
|
|
356
|
+
| 'maxLength'
|
|
357
|
+
| 'media'
|
|
358
|
+
| 'mediaGroup'
|
|
359
|
+
| 'method'
|
|
360
|
+
| 'min'
|
|
361
|
+
| 'minLength'
|
|
362
|
+
| 'muted'
|
|
363
|
+
| 'nonce'
|
|
364
|
+
| 'noValidate'
|
|
365
|
+
| 'optimum'
|
|
366
|
+
| 'playsInline'
|
|
367
|
+
| 'poster'
|
|
368
|
+
| 'preload'
|
|
369
|
+
| 'readOnly'
|
|
370
|
+
| 'rel'
|
|
371
|
+
| 'required'
|
|
372
|
+
| 'reversed'
|
|
373
|
+
| 'rows'
|
|
374
|
+
| 'rowSpan'
|
|
375
|
+
| 'sandbox'
|
|
376
|
+
| 'scope'
|
|
377
|
+
| 'scoped'
|
|
378
|
+
| 'scrolling'
|
|
379
|
+
| 'seamless'
|
|
380
|
+
| 'selected'
|
|
381
|
+
| 'shape'
|
|
382
|
+
| 'sizes'
|
|
383
|
+
| 'src'
|
|
384
|
+
| 'srcDoc'
|
|
385
|
+
| 'srcLang'
|
|
386
|
+
| 'srcSet'
|
|
387
|
+
| 'target'
|
|
388
|
+
| 'type'
|
|
389
|
+
| 'useMap'
|
|
390
|
+
| 'value'
|
|
391
|
+
| 'wmode'
|
|
382
392
|
> &
|
|
383
393
|
React_2.RefAttributes<HTMLElement>
|
|
384
394
|
>>;
|
|
385
395
|
|
|
396
|
+
/**
|
|
397
|
+
* __Code block__
|
|
398
|
+
*
|
|
399
|
+
* A code block highlights an entire block of code and keeps the formatting.
|
|
400
|
+
*
|
|
401
|
+
* - [Examples](https://atlassian.design/components/code/code-block/examples)
|
|
402
|
+
* - [Code](https://atlassian.design/components/code/code-block/code)
|
|
403
|
+
* - [Usage](https://atlassian.design/components/code/code-block/usage)
|
|
404
|
+
*/
|
|
386
405
|
export declare const CodeBlock: NamedExoticComponent<CodeBlockProps>;
|
|
387
406
|
|
|
388
407
|
export declare interface CodeBlockProps {
|
|
@@ -404,13 +423,12 @@ export declare interface CodeBlockProps {
|
|
|
404
423
|
*/
|
|
405
424
|
language?: SupportedLanguages;
|
|
406
425
|
/**
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
*/
|
|
426
|
+
* Lines to highlight comma delimited.
|
|
427
|
+
* Example uses:
|
|
428
|
+
* - To highlight one line `highlight="3"`
|
|
429
|
+
* - To highlight a group of lines `highlight="1-5"`
|
|
430
|
+
* - To highlight multiple groups `highlight="1-5,7,10,15-20"`
|
|
431
|
+
*/
|
|
414
432
|
highlight?: string;
|
|
415
433
|
/**
|
|
416
434
|
* Screen reader text for the start of a highlighted line
|
package/types/package.json
CHANGED
|
@@ -4,5 +4,12 @@
|
|
|
4
4
|
"module": "../dist/esm/entry-points/types.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/entry-points/types.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/entry-points/types.d.ts"
|
|
7
|
+
"types": "../dist/types/entry-points/types.d.ts",
|
|
8
|
+
"typesVersions": {
|
|
9
|
+
">=4.0 <4.5": {
|
|
10
|
+
"*": [
|
|
11
|
+
"../dist/types-ts4.0/entry-points/types.d.ts"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
8
15
|
}
|