@atlaskit/code 14.6.0 → 14.6.1
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/bidi-warning/package.json +2 -2
- package/bidi-warning-decorator/package.json +2 -2
- package/block/package.json +2 -2
- package/constants/package.json +2 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/bidi-warning/ui/types.d.ts +1 -1
- package/dist/types/constants.d.ts +4 -4
- package/dist/types/internal/theme/styles.d.ts +1 -1
- package/dist/types/internal/utils/get-normalized-language.d.ts +1 -1
- package/dist/types/syntax-highlighter/lib/process/create-line-element.d.ts +1 -1
- package/dist/types/syntax-highlighter/types.d.ts +3 -3
- package/inline/package.json +2 -2
- package/package.json +11 -3
- package/types/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"types": "../dist/types/bidi-warning/bidi-warning-decorator.d.ts",
|
|
8
8
|
"typesVersions": {
|
|
9
|
-
">=4.
|
|
9
|
+
">=4.5 <4.9": {
|
|
10
10
|
"*": [
|
|
11
|
-
"../dist/types-ts4.
|
|
11
|
+
"../dist/types-ts4.5/bidi-warning/bidi-warning-decorator.d.ts"
|
|
12
12
|
]
|
|
13
13
|
}
|
|
14
14
|
}
|
package/block/package.json
CHANGED
package/constants/package.json
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"types": "../dist/types/entry-points/constants.d.ts",
|
|
8
8
|
"typesVersions": {
|
|
9
|
-
">=4.
|
|
9
|
+
">=4.5 <4.9": {
|
|
10
10
|
"*": [
|
|
11
|
-
"../dist/types-ts4.
|
|
11
|
+
"../dist/types-ts4.5/entry-points/constants.d.ts"
|
|
12
12
|
]
|
|
13
13
|
}
|
|
14
14
|
}
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/version.json
CHANGED
package/dist/esm/version.json
CHANGED
|
@@ -308,7 +308,7 @@ export declare const SUPPORTED_LANGUAGES: readonly [{
|
|
|
308
308
|
readonly value: "splunk-spl";
|
|
309
309
|
}];
|
|
310
310
|
export { CODE_BLOCK_SELECTOR } from './internal/theme/constants';
|
|
311
|
-
export
|
|
312
|
-
export
|
|
313
|
-
export
|
|
314
|
-
export
|
|
311
|
+
export type Language = (typeof SUPPORTED_LANGUAGES)[number];
|
|
312
|
+
export type LanguageAlias = (typeof SUPPORTED_LANGUAGES)[number]['alias'][number];
|
|
313
|
+
export type LanguageName = (typeof SUPPORTED_LANGUAGES)[number]['name'];
|
|
314
|
+
export type SupportedLanguages = LanguageName | LanguageAlias;
|
|
@@ -24,4 +24,4 @@ export declare const getCodeBlockStyles: (theme: CodeBlockTheme) => (highlighted
|
|
|
24
24
|
export declare const getCodeStyles: (globalTheme: Theme | {
|
|
25
25
|
theme: Theme;
|
|
26
26
|
}) => CSSObject;
|
|
27
|
-
export declare const getCodeBlockTheme: (globalTheme: Theme, maxLines?: number
|
|
27
|
+
export declare const getCodeBlockTheme: (globalTheme: Theme, maxLines?: number) => CodeBlockTheme;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { SupportedLanguages } from '../types';
|
|
2
|
-
export declare const normalizeLanguage: import("memoize-one").MemoizedFn<(language?: SupportedLanguages
|
|
2
|
+
export declare const normalizeLanguage: import("memoize-one").MemoizedFn<(language?: SupportedLanguages) => string>;
|
|
@@ -8,13 +8,13 @@ export declare class SyntaxHighlighter extends React.PureComponent<SyntaxHighlig
|
|
|
8
8
|
* Function that receives current line number as argument and returns a
|
|
9
9
|
* line props object to be applied to each `span` wrapping code line.
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
type lineTagPropsFunction = (lineNumber?: number) => AST.Properties;
|
|
12
12
|
/**
|
|
13
13
|
* Props to be passed to the `span` wrapping each code line. Can be an
|
|
14
14
|
* object or a function that receives current line number as argument and
|
|
15
15
|
* returns a props object.
|
|
16
16
|
*/
|
|
17
|
-
export
|
|
17
|
+
export type SyntaxHighlighterLineProps = lineTagPropsFunction | AST.Properties;
|
|
18
18
|
export interface SyntaxHighlighterProps {
|
|
19
19
|
/**
|
|
20
20
|
* A unique string that appears as a data attribute `data-testid`
|
|
@@ -126,4 +126,4 @@ export interface CodeBidiWarningConfig {
|
|
|
126
126
|
interface IAstGenerator {
|
|
127
127
|
highlight: (code: string, language: string) => RefractorNode[];
|
|
128
128
|
}
|
|
129
|
-
export
|
|
129
|
+
export type AstGenerator = IAstGenerator | null;
|
package/inline/package.json
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"types": "../dist/types/entry-points/inline.d.ts",
|
|
8
8
|
"typesVersions": {
|
|
9
|
-
">=4.
|
|
9
|
+
">=4.5 <4.9": {
|
|
10
10
|
"*": [
|
|
11
|
-
"../dist/types-ts4.
|
|
11
|
+
"../dist/types-ts4.5/entry-points/inline.d.ts"
|
|
12
12
|
]
|
|
13
13
|
}
|
|
14
14
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/code",
|
|
3
|
-
"version": "14.6.
|
|
3
|
+
"version": "14.6.1",
|
|
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,14 @@
|
|
|
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.5 <4.9": {
|
|
17
|
+
"*": [
|
|
18
|
+
"dist/types-ts4.5/*",
|
|
19
|
+
"dist/types-ts4.5/index.d.ts"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
},
|
|
15
23
|
"sideEffects": false,
|
|
16
24
|
"atlaskit:src": "src/index.tsx",
|
|
17
25
|
"atlassian": {
|
|
@@ -28,7 +36,7 @@
|
|
|
28
36
|
"dependencies": {
|
|
29
37
|
"@atlaskit/codemod-utils": "^4.2.0",
|
|
30
38
|
"@atlaskit/theme": "^12.5.0",
|
|
31
|
-
"@atlaskit/tokens": "^1.
|
|
39
|
+
"@atlaskit/tokens": "^1.4.0",
|
|
32
40
|
"@atlaskit/tooltip": "^17.8.0",
|
|
33
41
|
"@babel/runtime": "^7.0.0",
|
|
34
42
|
"@emotion/react": "^11.7.1",
|
|
@@ -58,7 +66,7 @@
|
|
|
58
66
|
"jscodeshift": "^0.13.0",
|
|
59
67
|
"prismjs": "^1.25.0",
|
|
60
68
|
"react-dom": "^16.8.0",
|
|
61
|
-
"typescript": "4.
|
|
69
|
+
"typescript": "~4.9.5"
|
|
62
70
|
},
|
|
63
71
|
"keywords": [
|
|
64
72
|
"atlaskit",
|
package/types/package.json
CHANGED