@atlaskit/code 14.3.6 → 14.3.9

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.
Files changed (37) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/bidi-warning/package.json +1 -0
  3. package/bidi-warning-decorator/package.json +1 -0
  4. package/block/package.json +1 -0
  5. package/codemods/{13.0.0-remove-unnecessary-code-props.ts → 13.0.0-remove-unnecessary-code-props.tsx} +0 -0
  6. package/codemods/{13.0.0-rename-imports.ts → 13.0.0-rename-imports.tsx} +0 -0
  7. package/codemods/{14.0.0-lite-mode.ts → 14.0.0-lite-mode.tsx} +0 -0
  8. package/codemods/__tests__/{13.0.0-remove-unnecessary-code-props.ts → 13.0.0-remove-unnecessary-code-props.tsx} +0 -0
  9. package/codemods/__tests__/{13.0.0-rename-imports.ts → 13.0.0-rename-imports.tsx} +0 -0
  10. package/codemods/__tests__/14.0.0-lite-mode/{14.0.0-lite-mode.ts → 14.0.0-lite-mode.tsx} +0 -0
  11. package/codemods/__tests__/14.0.0-lite-mode/{remove-language.ts → remove-language.tsx} +0 -0
  12. package/codemods/__tests__/14.0.0-lite-mode/{text-to-child.ts → text-to-child.tsx} +0 -0
  13. package/codemods/migrations/14.0.0-lite-mode/{remove-language.ts → remove-language.tsx} +0 -0
  14. package/codemods/migrations/14.0.0-lite-mode/{text-to-child.ts → text-to-child.tsx} +0 -0
  15. package/codemods/utils/{helpers.ts → helpers.tsx} +0 -0
  16. package/constants/package.json +1 -0
  17. package/dist/cjs/bidi-warning/ui/styled.js +10 -15
  18. package/dist/cjs/code-block.js +10 -0
  19. package/dist/cjs/code.js +10 -0
  20. package/dist/cjs/version.json +1 -1
  21. package/dist/es2019/bidi-warning/ui/styled.js +10 -15
  22. package/dist/es2019/code-block.js +10 -0
  23. package/dist/es2019/code.js +11 -0
  24. package/dist/es2019/version.json +1 -1
  25. package/dist/esm/bidi-warning/ui/styled.js +10 -15
  26. package/dist/esm/code-block.js +10 -0
  27. package/dist/esm/code.js +11 -0
  28. package/dist/esm/version.json +1 -1
  29. package/dist/types/bidi-warning/ui/types.d.ts +5 -1
  30. package/dist/types/code-block.d.ts +9 -0
  31. package/dist/types/code.d.ts +10 -1
  32. package/dist/types/extract-react-types/code-block.d.ts +1 -2
  33. package/dist/types/internal/types.d.ts +0 -1
  34. package/inline/package.json +1 -0
  35. package/package.json +17 -13
  36. package/report.api.md +892 -0
  37. package/types/package.json +1 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/code
2
2
 
3
+ ## 14.3.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [`8d4228767b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d4228767b0) - Upgrade Typescript from `4.2.4` to `4.3.5`.
8
+
9
+ ## 14.3.8
10
+
11
+ ### Patch Changes
12
+
13
+ - [`8202e37941b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8202e37941b) - Internal code change turning on new linting rules.
14
+
15
+ ## 14.3.7
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies
20
+
3
21
  ## 14.3.6
4
22
 
5
23
  ### Patch Changes
@@ -3,5 +3,6 @@
3
3
  "main": "../dist/cjs/bidi-warning/index.js",
4
4
  "module": "../dist/esm/bidi-warning/index.js",
5
5
  "module:es2019": "../dist/es2019/bidi-warning/index.js",
6
+ "sideEffects": false,
6
7
  "types": "../dist/types/bidi-warning/index.d.ts"
7
8
  }
@@ -3,5 +3,6 @@
3
3
  "main": "../dist/cjs/bidi-warning/bidi-warning-decorator.js",
4
4
  "module": "../dist/esm/bidi-warning/bidi-warning-decorator.js",
5
5
  "module:es2019": "../dist/es2019/bidi-warning/bidi-warning-decorator.js",
6
+ "sideEffects": false,
6
7
  "types": "../dist/types/bidi-warning/bidi-warning-decorator.d.ts"
7
8
  }
@@ -3,5 +3,6 @@
3
3
  "main": "../dist/cjs/entry-points/block.js",
4
4
  "module": "../dist/esm/entry-points/block.js",
5
5
  "module:es2019": "../dist/es2019/entry-points/block.js",
6
+ "sideEffects": false,
6
7
  "types": "../dist/types/entry-points/block.d.ts"
7
8
  }
File without changes
@@ -3,5 +3,6 @@
3
3
  "main": "../dist/cjs/entry-points/constants.js",
4
4
  "module": "../dist/esm/entry-points/constants.js",
5
5
  "module:es2019": "../dist/es2019/entry-points/constants.js",
6
+ "sideEffects": false,
6
7
  "types": "../dist/types/entry-points/constants.d.ts"
7
8
  }
@@ -18,32 +18,27 @@ var decoration = (0, _core.css)({
18
18
  // U+202E RIGHT-TO-LEFT OVERRIDE' (when using pseudo element after)
19
19
  position: 'relative',
20
20
  ':before': {
21
- /* layout */
22
21
  display: 'inline-flex',
23
- flexDirection: 'row',
24
- justifyContent: 'center',
25
- alignItems: 'center',
26
22
  padding: '0 4px',
23
+ alignItems: 'center',
24
+ justifyContent: 'center',
25
+ flexDirection: 'row',
26
+ background: "var(--ds-background-warning, ".concat(_colors.Y75, ")"),
27
+ color: "var(--ds-text-warning, #7F5F01)",
28
+ content: '"<"attr(data-bidi-character-code)">"',
27
29
  fontSize: '14px',
30
+ fontStyle: 'normal',
28
31
  lineHeight: '18px',
29
- background: "var(--ds-background-warning, ".concat(_colors.Y75, ")"),
30
32
 
31
33
  /**
32
34
  * Ensures the decoration receives pointer events when it occurs with
33
35
  * an ancestor that disables them.
34
36
  */
35
- pointerEvents: 'auto',
36
-
37
- /* contents */
38
- content: '"<"attr(data-bidi-character-code)">"',
39
- // This color is Y800 which is not yet rolled out
40
- // https://hello.atlassian.net/wiki/spaces/~tswan/pages/1366555782?focusedCommentId=1370387374#comment-1370387374
41
- color: "var(--ds-text-warning, #7F5F01)",
42
- fontStyle: 'normal'
37
+ pointerEvents: 'auto'
43
38
  },
44
39
  ':hover:before': {
45
- color: "var(--ds-text-warning, #533F04)",
46
- background: "var(--ds-background-warning-hovered, ".concat(_colors.Y75, ")")
40
+ background: "var(--ds-background-warning-hovered, ".concat(_colors.Y75, ")"),
41
+ color: "var(--ds-text-warning, #533F04)"
47
42
  }
48
43
  });
49
44
 
@@ -22,6 +22,16 @@ var _getNormalizedLanguage = require("./internal/utils/get-normalized-language")
22
22
  var _reactSyntaxHighlighterBidiWarningRenderer = require("./react-syntax-highlighter-bidi-warning-renderer");
23
23
 
24
24
  /** @jsx jsx */
25
+
26
+ /**
27
+ * __Code block__
28
+ *
29
+ * A code block highlights an entire block of code and keeps the formatting.
30
+ *
31
+ * - [Examples](https://atlassian.design/components/code/code-block/examples)
32
+ * - [Code](https://atlassian.design/components/code/code-block/code)
33
+ * - [Usage](https://atlassian.design/components/code/code-block/usage)
34
+ */
25
35
  var CodeBlock = /*#__PURE__*/(0, _react.memo)(function CodeBlock(_ref) {
26
36
  var _ref$showLineNumbers = _ref.showLineNumbers,
27
37
  showLineNumbers = _ref$showLineNumbers === void 0 ? true : _ref$showLineNumbers,
package/dist/cjs/code.js CHANGED
@@ -38,6 +38,15 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
38
38
 
39
39
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
40
40
 
41
+ /**
42
+ * __Code__
43
+ *
44
+ * Code highlights short strings of code snippets inline with body text.
45
+ *
46
+ * - [Examples](https://atlassian.design/components/code/examples)
47
+ * - [Code](https://atlassian.design/components/code/code)
48
+ * - [Usage](https://atlassian.design/components/code/usage)
49
+ */
41
50
  var Code = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(function Code(_ref, ref) {
42
51
  var testId = _ref.testId,
43
52
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
@@ -84,6 +93,7 @@ function RenderCodeChildrenWithBidiWarnings(_ref2) {
84
93
  }
85
94
 
86
95
  if (isReactElement(childNode) && childNode.props.children) {
96
+ // eslint-disable-next-line @repo/internal/react/no-clone-element
87
97
  var newChildNode = /*#__PURE__*/_react.default.cloneElement(childNode, {
88
98
  children: (0, _core.jsx)(RenderCodeChildrenWithBidiWarnings, {
89
99
  codeBidiWarningLabel: codeBidiWarningLabel,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/code",
3
- "version": "14.3.6",
3
+ "version": "14.3.9",
4
4
  "sideEffects": false
5
5
  }
@@ -9,32 +9,27 @@ const decoration = css({
9
9
  // U+202E RIGHT-TO-LEFT OVERRIDE' (when using pseudo element after)
10
10
  position: 'relative',
11
11
  ':before': {
12
- /* layout */
13
12
  display: 'inline-flex',
14
- flexDirection: 'row',
15
- justifyContent: 'center',
16
- alignItems: 'center',
17
13
  padding: '0 4px',
14
+ alignItems: 'center',
15
+ justifyContent: 'center',
16
+ flexDirection: 'row',
17
+ background: `var(--ds-background-warning, ${Y75})`,
18
+ color: "var(--ds-text-warning, #7F5F01)",
19
+ content: '"<"attr(data-bidi-character-code)">"',
18
20
  fontSize: '14px',
21
+ fontStyle: 'normal',
19
22
  lineHeight: '18px',
20
- background: `var(--ds-background-warning, ${Y75})`,
21
23
 
22
24
  /**
23
25
  * Ensures the decoration receives pointer events when it occurs with
24
26
  * an ancestor that disables them.
25
27
  */
26
- pointerEvents: 'auto',
27
-
28
- /* contents */
29
- content: '"<"attr(data-bidi-character-code)">"',
30
- // This color is Y800 which is not yet rolled out
31
- // https://hello.atlassian.net/wiki/spaces/~tswan/pages/1366555782?focusedCommentId=1370387374#comment-1370387374
32
- color: "var(--ds-text-warning, #7F5F01)",
33
- fontStyle: 'normal'
28
+ pointerEvents: 'auto'
34
29
  },
35
30
  ':hover:before': {
36
- color: "var(--ds-text-warning, #533F04)",
37
- background: `var(--ds-background-warning-hovered, ${Y75})`
31
+ background: `var(--ds-background-warning-hovered, ${Y75})`,
32
+ color: "var(--ds-text-warning, #533F04)"
38
33
  }
39
34
  });
40
35
  export function Decorator({
@@ -7,6 +7,16 @@ import { useHighlightLines } from './internal/hooks/use-highlight';
7
7
  import { getCodeBlockStyles, getCodeBlockTheme } from './internal/theme/styles';
8
8
  import { normalizeLanguage } from './internal/utils/get-normalized-language';
9
9
  import { createBidiWarningRenderer } from './react-syntax-highlighter-bidi-warning-renderer';
10
+ /**
11
+ * __Code block__
12
+ *
13
+ * A code block highlights an entire block of code and keeps the formatting.
14
+ *
15
+ * - [Examples](https://atlassian.design/components/code/code-block/examples)
16
+ * - [Code](https://atlassian.design/components/code/code-block/code)
17
+ * - [Usage](https://atlassian.design/components/code/code-block/usage)
18
+ */
19
+
10
20
  const CodeBlock = /*#__PURE__*/memo(function CodeBlock({
11
21
  showLineNumbers = true,
12
22
  language: providedLanguage = 'text',
@@ -7,6 +7,16 @@ import { useGlobalTheme } from '@atlaskit/theme/components';
7
7
  import CodeBidiWarning from './bidi-warning';
8
8
  import codeBidiWarningDecorator from './bidi-warning/bidi-warning-decorator';
9
9
  import { getCodeStyles } from './internal/theme/styles';
10
+
11
+ /**
12
+ * __Code__
13
+ *
14
+ * Code highlights short strings of code snippets inline with body text.
15
+ *
16
+ * - [Examples](https://atlassian.design/components/code/examples)
17
+ * - [Code](https://atlassian.design/components/code/code)
18
+ * - [Usage](https://atlassian.design/components/code/usage)
19
+ */
10
20
  const Code = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Code({
11
21
  testId,
12
22
  ...props
@@ -51,6 +61,7 @@ function RenderCodeChildrenWithBidiWarnings({
51
61
  }
52
62
 
53
63
  if (isReactElement(childNode) && childNode.props.children) {
64
+ // eslint-disable-next-line @repo/internal/react/no-clone-element
54
65
  const newChildNode = /*#__PURE__*/React.cloneElement(childNode, {
55
66
  children: jsx(RenderCodeChildrenWithBidiWarnings, {
56
67
  codeBidiWarningLabel: codeBidiWarningLabel,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/code",
3
- "version": "14.3.6",
3
+ "version": "14.3.9",
4
4
  "sideEffects": false
5
5
  }
@@ -9,32 +9,27 @@ var decoration = css({
9
9
  // U+202E RIGHT-TO-LEFT OVERRIDE' (when using pseudo element after)
10
10
  position: 'relative',
11
11
  ':before': {
12
- /* layout */
13
12
  display: 'inline-flex',
14
- flexDirection: 'row',
15
- justifyContent: 'center',
16
- alignItems: 'center',
17
13
  padding: '0 4px',
14
+ alignItems: 'center',
15
+ justifyContent: 'center',
16
+ flexDirection: 'row',
17
+ background: "var(--ds-background-warning, ".concat(Y75, ")"),
18
+ color: "var(--ds-text-warning, #7F5F01)",
19
+ content: '"<"attr(data-bidi-character-code)">"',
18
20
  fontSize: '14px',
21
+ fontStyle: 'normal',
19
22
  lineHeight: '18px',
20
- background: "var(--ds-background-warning, ".concat(Y75, ")"),
21
23
 
22
24
  /**
23
25
  * Ensures the decoration receives pointer events when it occurs with
24
26
  * an ancestor that disables them.
25
27
  */
26
- pointerEvents: 'auto',
27
-
28
- /* contents */
29
- content: '"<"attr(data-bidi-character-code)">"',
30
- // This color is Y800 which is not yet rolled out
31
- // https://hello.atlassian.net/wiki/spaces/~tswan/pages/1366555782?focusedCommentId=1370387374#comment-1370387374
32
- color: "var(--ds-text-warning, #7F5F01)",
33
- fontStyle: 'normal'
28
+ pointerEvents: 'auto'
34
29
  },
35
30
  ':hover:before': {
36
- color: "var(--ds-text-warning, #533F04)",
37
- background: "var(--ds-background-warning-hovered, ".concat(Y75, ")")
31
+ background: "var(--ds-background-warning-hovered, ".concat(Y75, ")"),
32
+ color: "var(--ds-text-warning, #533F04)"
38
33
  }
39
34
  });
40
35
  export function Decorator(_ref) {
@@ -7,6 +7,16 @@ import { useHighlightLines } from './internal/hooks/use-highlight';
7
7
  import { getCodeBlockStyles, getCodeBlockTheme } from './internal/theme/styles';
8
8
  import { normalizeLanguage } from './internal/utils/get-normalized-language';
9
9
  import { createBidiWarningRenderer } from './react-syntax-highlighter-bidi-warning-renderer';
10
+ /**
11
+ * __Code block__
12
+ *
13
+ * A code block highlights an entire block of code and keeps the formatting.
14
+ *
15
+ * - [Examples](https://atlassian.design/components/code/code-block/examples)
16
+ * - [Code](https://atlassian.design/components/code/code-block/code)
17
+ * - [Usage](https://atlassian.design/components/code/code-block/usage)
18
+ */
19
+
10
20
  var CodeBlock = /*#__PURE__*/memo(function CodeBlock(_ref) {
11
21
  var _ref$showLineNumbers = _ref.showLineNumbers,
12
22
  showLineNumbers = _ref$showLineNumbers === void 0 ? true : _ref$showLineNumbers,
package/dist/esm/code.js CHANGED
@@ -10,6 +10,16 @@ import { useGlobalTheme } from '@atlaskit/theme/components';
10
10
  import CodeBidiWarning from './bidi-warning';
11
11
  import codeBidiWarningDecorator from './bidi-warning/bidi-warning-decorator';
12
12
  import { getCodeStyles } from './internal/theme/styles';
13
+
14
+ /**
15
+ * __Code__
16
+ *
17
+ * Code highlights short strings of code snippets inline with body text.
18
+ *
19
+ * - [Examples](https://atlassian.design/components/code/examples)
20
+ * - [Code](https://atlassian.design/components/code/code)
21
+ * - [Usage](https://atlassian.design/components/code/usage)
22
+ */
13
23
  var Code = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Code(_ref, ref) {
14
24
  var testId = _ref.testId,
15
25
  props = _objectWithoutProperties(_ref, _excluded);
@@ -58,6 +68,7 @@ function RenderCodeChildrenWithBidiWarnings(_ref2) {
58
68
  }
59
69
 
60
70
  if (isReactElement(childNode) && childNode.props.children) {
71
+ // eslint-disable-next-line @repo/internal/react/no-clone-element
61
72
  var newChildNode = /*#__PURE__*/React.cloneElement(childNode, {
62
73
  children: jsx(RenderCodeChildrenWithBidiWarnings, {
63
74
  codeBidiWarningLabel: codeBidiWarningLabel,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/code",
3
- "version": "14.3.6",
3
+ "version": "14.3.9",
4
4
  "sideEffects": false
5
5
  }
@@ -2,7 +2,8 @@ export declare type CodeBidiWarningProps = {
2
2
  /**
3
3
  * A `testId` prop is provided for specified elements, which is a unique
4
4
  * string that appears as a data attribute `data-testid` in the rendered code,
5
- * serving as a hook for automated tests */
5
+ * serving as a hook for automated tests
6
+ */
6
7
  testId?: string;
7
8
  /**
8
9
  * A bidi character which can be used to perform a "bidi override attack".
@@ -20,6 +21,9 @@ export declare type CodeBidiWarningProps = {
20
21
  * not work as expected.
21
22
  */
22
23
  tooltipEnabled?: boolean;
24
+ /**
25
+ * Useful when wrapping the bidi character with the decoration is not achievable.
26
+ */
23
27
  skipChildren?: boolean;
24
28
  /**
25
29
  * Labels for the previous and next buttons used in pagination.
@@ -1,4 +1,13 @@
1
1
  /// <reference types="react" />
2
2
  import type { CodeBlockProps } from './internal/types';
3
+ /**
4
+ * __Code block__
5
+ *
6
+ * A code block highlights an entire block of code and keeps the formatting.
7
+ *
8
+ * - [Examples](https://atlassian.design/components/code/code-block/examples)
9
+ * - [Code](https://atlassian.design/components/code/code-block/code)
10
+ * - [Usage](https://atlassian.design/components/code/code-block/usage)
11
+ */
3
12
  declare const CodeBlock: import("react").NamedExoticComponent<CodeBlockProps>;
4
13
  export default CodeBlock;
@@ -2,6 +2,15 @@
2
2
  import React from 'react';
3
3
  import { getCodeStyles } from './internal/theme/styles';
4
4
  import type { CodeProps } from './types';
5
- declare const Code: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<CodeProps, "as" | "css" | "name" | "color" | "content" | "height" | "width" | "start" | "children" | "testId" | "default" | "cite" | "data" | "form" | "label" | "span" | "style" | "summary" | "title" | "pattern" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "disabled" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "nonce" | "noValidate" | "open" | "optimum" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "step" | "target" | "type" | "useMap" | "value" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "tabIndex" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "codeBidiWarnings" | "codeBidiWarningLabel" | "codeBidiWarningTooltipEnabled"> & React.RefAttributes<HTMLElement>>>;
5
+ /**
6
+ * __Code__
7
+ *
8
+ * Code highlights short strings of code snippets inline with body text.
9
+ *
10
+ * - [Examples](https://atlassian.design/components/code/examples)
11
+ * - [Code](https://atlassian.design/components/code/code)
12
+ * - [Usage](https://atlassian.design/components/code/usage)
13
+ */
14
+ declare const Code: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<CodeProps, "as" | "css" | "name" | "testId" | "codeBidiWarnings" | "codeBidiWarningLabel" | "codeBidiWarningTooltipEnabled" | "list" | "step" | "color" | "content" | "height" | "width" | "start" | "hidden" | "size" | "style" | "default" | "wrap" | "open" | "multiple" | "disabled" | "children" | "cite" | "data" | "form" | "label" | "span" | "summary" | "title" | "pattern" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "muted" | "nonce" | "noValidate" | "optimum" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "target" | "type" | "useMap" | "value" | "wmode" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "slot" | "spellCheck" | "tabIndex" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key"> & React.RefAttributes<HTMLElement>>>;
6
15
  export { getCodeStyles };
7
16
  export default Code;
@@ -14,14 +14,13 @@ export default function CodeBlock(__: {
14
14
  showLineNumbers?: boolean;
15
15
  /**
16
16
  * The language in which the code is written
17
-
18
17
  * @see `SupportedLanguages` for type information in src
19
18
  */
20
19
  language?: string;
21
20
  /**
22
21
  * Lines to highlight comma delimited.
22
+ *
23
23
  * Example uses:
24
-
25
24
  * - To highlight one line `highlight="3"`
26
25
  * - To highlight a group of lines `highlight="1-5"`
27
26
  * - To highlight multiple groups `highlight="1-5,7,10,15-20"`
@@ -20,7 +20,6 @@ export interface CodeBlockProps {
20
20
  /**
21
21
  * Lines to highlight comma delimited.
22
22
  * Example uses:
23
-
24
23
  * - To highlight one line `highlight="3"`
25
24
  * - To highlight a group of lines `highlight="1-5"`
26
25
  * - To highlight multiple groups `highlight="1-5,7,10,15-20"`
@@ -3,5 +3,6 @@
3
3
  "main": "../dist/cjs/entry-points/inline.js",
4
4
  "module": "../dist/esm/entry-points/inline.js",
5
5
  "module:es2019": "../dist/es2019/entry-points/inline.js",
6
+ "sideEffects": false,
6
7
  "types": "../dist/types/entry-points/inline.d.ts"
7
8
  }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@atlaskit/code",
3
- "version": "14.3.6",
3
+ "version": "14.3.9",
4
4
  "description": "Code highlights short strings of code snippets inline with body text.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
7
7
  },
8
- "repository": "https://bitbucket.org/atlassian/atlassian-frontend",
8
+ "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
9
9
  "author": "Atlassian Pty Ltd",
10
10
  "license": "Apache-2.0",
11
11
  "main": "dist/cjs/index.js",
@@ -13,21 +13,22 @@
13
13
  "module:es2019": "dist/es2019/index.js",
14
14
  "types": "dist/types/index.d.ts",
15
15
  "sideEffects": false,
16
- "atlaskit:src": "src/index.ts",
16
+ "atlaskit:src": "src/index.tsx",
17
17
  "atlassian": {
18
18
  "team": "Design System Team",
19
19
  "releaseModel": "scheduled",
20
20
  "website": {
21
- "name": "Code"
21
+ "name": "Code",
22
+ "category": "Components"
22
23
  }
23
24
  },
24
25
  "config": {
25
26
  "access": "public"
26
27
  },
27
28
  "dependencies": {
28
- "@atlaskit/codemod-utils": "^4.0.0",
29
+ "@atlaskit/codemod-utils": "^4.1.0",
29
30
  "@atlaskit/theme": "^12.1.0",
30
- "@atlaskit/tokens": "^0.9.0",
31
+ "@atlaskit/tokens": "^0.10.0",
31
32
  "@atlaskit/tooltip": "^17.5.0",
32
33
  "@babel/runtime": "^7.0.0",
33
34
  "@emotion/core": "^10.0.9",
@@ -40,6 +41,7 @@
40
41
  "devDependencies": {
41
42
  "@atlaskit/button": "^16.3.0",
42
43
  "@atlaskit/docs": "^9.0.0",
44
+ "@atlaskit/ds-lib": "^2.1.0",
43
45
  "@atlaskit/section-message": "^6.0.0",
44
46
  "@atlaskit/ssr": "*",
45
47
  "@atlaskit/visual-regression": "*",
@@ -51,7 +53,7 @@
51
53
  "jscodeshift": "^0.13.0",
52
54
  "prismjs": "^1.25.0",
53
55
  "react-dom": "^16.8.0",
54
- "typescript": "4.2.4"
56
+ "typescript": "4.3.5"
55
57
  },
56
58
  "keywords": [
57
59
  "atlaskit",
@@ -59,19 +61,21 @@
59
61
  "ui"
60
62
  ],
61
63
  "af:exports": {
62
- "./types": "./src/entry-points/types.ts",
63
- ".": "./src/index.ts",
64
- "./bidi-warning": "./src/bidi-warning/index.ts",
64
+ "./types": "./src/entry-points/types.tsx",
65
+ ".": "./src/index.tsx",
66
+ "./bidi-warning": "./src/bidi-warning/index.tsx",
65
67
  "./bidi-warning-decorator": "./src/bidi-warning/bidi-warning-decorator.tsx",
66
- "./block": "./src/entry-points/block.ts",
67
- "./inline": "./src/entry-points/inline.ts",
68
- "./constants": "./src/entry-points/constants.ts"
68
+ "./block": "./src/entry-points/block.tsx",
69
+ "./inline": "./src/entry-points/inline.tsx",
70
+ "./constants": "./src/entry-points/constants.tsx"
69
71
  },
70
72
  "techstack": {
71
73
  "@atlassian/frontend": {
72
74
  "import-structure": "atlassian-conventions"
73
75
  },
74
76
  "@repo/internal": {
77
+ "design-system": "v1",
78
+ "dom-events": "use-bind-event-listener",
75
79
  "ui-components": [
76
80
  "lite-mode"
77
81
  ],