@atlaskit/code 14.4.0 → 14.4.2

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 (36) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/codemods/13.0.0-remove-unnecessary-code-props.tsx +9 -11
  3. package/codemods/utils/helpers.tsx +17 -22
  4. package/dist/cjs/bidi-warning/ui/styled.js +1 -1
  5. package/dist/cjs/version.json +1 -1
  6. package/dist/es2019/bidi-warning/ui/styled.js +1 -1
  7. package/dist/es2019/version.json +1 -1
  8. package/dist/esm/bidi-warning/ui/styled.js +1 -1
  9. package/dist/esm/version.json +1 -1
  10. package/dist/types/code.d.ts +1 -1
  11. package/package.json +5 -10
  12. package/report.api.md +407 -474
  13. package/dist/types-ts4.0/bidi-warning/bidi-warning-decorator.d.ts +0 -5
  14. package/dist/types-ts4.0/bidi-warning/index.d.ts +0 -1
  15. package/dist/types-ts4.0/bidi-warning/ui/index.d.ts +0 -3
  16. package/dist/types-ts4.0/bidi-warning/ui/styled.d.ts +0 -8
  17. package/dist/types-ts4.0/bidi-warning/ui/types.d.ts +0 -33
  18. package/dist/types-ts4.0/code-block.d.ts +0 -13
  19. package/dist/types-ts4.0/code.d.ts +0 -16
  20. package/dist/types-ts4.0/constants.d.ts +0 -625
  21. package/dist/types-ts4.0/entry-points/block.d.ts +0 -2
  22. package/dist/types-ts4.0/entry-points/constants.d.ts +0 -1
  23. package/dist/types-ts4.0/entry-points/inline.d.ts +0 -2
  24. package/dist/types-ts4.0/entry-points/types.d.ts +0 -1
  25. package/dist/types-ts4.0/extract-react-types/code-block.d.ts +0 -37
  26. package/dist/types-ts4.0/extract-react-types/code.d.ts +0 -2
  27. package/dist/types-ts4.0/index.d.ts +0 -4
  28. package/dist/types-ts4.0/internal/hooks/use-highlight.d.ts +0 -6
  29. package/dist/types-ts4.0/internal/theme/constants.d.ts +0 -8
  30. package/dist/types-ts4.0/internal/theme/get-theme.d.ts +0 -7
  31. package/dist/types-ts4.0/internal/theme/styles.d.ts +0 -27
  32. package/dist/types-ts4.0/internal/theme/types.d.ts +0 -57
  33. package/dist/types-ts4.0/internal/types.d.ts +0 -57
  34. package/dist/types-ts4.0/internal/utils/get-normalized-language.d.ts +0 -2
  35. package/dist/types-ts4.0/react-syntax-highlighter-bidi-warning-renderer.d.ts +0 -9
  36. package/dist/types-ts4.0/types.d.ts +0 -32
@@ -1,5 +0,0 @@
1
- export declare const bidiCharacterRegex: RegExp;
2
- export default function codeBidiWarningDecorator<DecoratorOutput>(originalText: string, decorate: (options: {
3
- bidiCharacter: string;
4
- index?: number;
5
- }) => DecoratorOutput): string | (string | DecoratorOutput)[];
@@ -1 +0,0 @@
1
- export { default } from './ui';
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { CodeBidiWarningProps } from './types';
3
- export default function BidiWarning({ testId, bidiCharacter, skipChildren, tooltipEnabled, label, }: CodeBidiWarningProps): JSX.Element;
@@ -1,8 +0,0 @@
1
- /** @jsx jsx */
2
- import { ReactNode } from 'react';
3
- import { jsx } from '@emotion/react';
4
- export declare function Decorator({ bidiCharacter, children, testId, }: {
5
- bidiCharacter: string;
6
- children: ReactNode;
7
- testId?: string;
8
- }): jsx.JSX.Element;
@@ -1,33 +0,0 @@
1
- export declare type CodeBidiWarningProps = {
2
- /**
3
- * A `testId` prop is provided for specified elements, which is a unique
4
- * string that appears as a data attribute `data-testid` in the rendered code,
5
- * serving as a hook for automated tests
6
- */
7
- testId?: string;
8
- /**
9
- * A bidi character which can be used to perform a "bidi override attack".
10
- *
11
- * See the following document for details.
12
- *
13
- * https://hello.atlassian.net/wiki/spaces/PRODSEC/pages/1347434677/PSHELP-2943+Investigate+Trojan+Source+Attack+Vulnerability#1)-Providing-visual-cues-for-our-Customers-in-our-affected-products
14
- */
15
- bidiCharacter: string;
16
- /**
17
- * Defaults to enabled (true)
18
- *
19
- * Intended to be disabled when used in a mobile view, such as in the editor
20
- * via mobile bridge, where the tooltip could end up being cut off of otherwise
21
- * not work as expected.
22
- */
23
- tooltipEnabled?: boolean;
24
- /**
25
- * Useful when wrapping the bidi character with the decoration is not achievable.
26
- */
27
- skipChildren?: boolean;
28
- /**
29
- * Labels for the previous and next buttons used in pagination.
30
- * Defaults to `Bidirectional characters change the order that text is rendered. This could be used to obscure malicious code.`.
31
- */
32
- label?: string;
33
- };
@@ -1,13 +0,0 @@
1
- /// <reference types="react" />
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
- */
12
- declare const CodeBlock: import("react").NamedExoticComponent<CodeBlockProps>;
13
- export default CodeBlock;
@@ -1,16 +0,0 @@
1
- /** @jsx jsx */
2
- import React from 'react';
3
- import { getCodeStyles } from './internal/theme/styles';
4
- import type { CodeProps } from './types';
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" | "name" | "testId" | "codeBidiWarnings" | "codeBidiWarningLabel" | "codeBidiWarningTooltipEnabled" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "label" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "nonce" | "noValidate" | "open" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "span" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "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" | "children" | "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>>>;
15
- export { getCodeStyles };
16
- export default Code;