Code
Code highlights short strings of code snippets inline with body text.20.0.0
Major Changes
0c7c7be927bde, (opens new window) - Remove deprecated Volt re-export shims from public package entry points. Consumers should import from the replacement subpaths or implementation entry points instead.
Patch Changes
- Updated dependencies
19.2.5
Patch Changes
- Updated dependencies
19.2.4
Patch Changes
- Updated dependencies
19.2.3
Patch Changes
- Updated dependencies
19.2.2
Patch Changes
d7eeefc938dd4, (opens new window) - Cleaned up new shape theme styles, making new border and radius values the default.
19.2.1
Patch Changes
836565aa39593, (opens new window) - Experimental React 19 test compatibility fix for Code. Test coverage is partial.
19.2.0
Minor Changes
bd2c5b0112185, (opens new window) - Remove stale API report artifacts from published Platform packages.
Patch Changes
- Updated dependencies
19.1.0
Minor Changes
-
d82e6f76528ab, (opens new window) - Add direct subpath package exports as part of the linking-platform, search, media, and design-system barrel-removal (de-barrel) migration.These packages now expose their individual modules via explicit
package.jsonexportssubpaths so that consumers can import directly from the leaf module (e.g.@atlaskit/pkg/thing) instead of the package barrel/index. This adds new public entry points without changing or removing any existing exports, so it is a backwards-compatible additive change.No runtime behaviour changes; this is an API-surface (entry-point) addition to support tree-shaking and to unblock removal of the barrel index files.
Patch Changes
- Updated dependencies
19.0.0
Major Changes
-
11ace7dc73878, (opens new window) - Apply Volt entry-point and multi-export standards viavolt-migrate-package. This is a major change to@atlaskit/code: the packageexportsmap has been restructured so every public subpath now resolves directly to its./src/*implementation instead of going through an intermediate./src/entry-points/*re-export. It also introduces new public subpaths:@atlaskit/code/bidi-character-regex,@atlaskit/code/bidi-warning/bidi-warning-decorator,@atlaskit/code/internal/types.Why this is breaking
Because each subpath now points straight at its implementation module, a subpath and the package root can resolve to the same module instance. Consumers that deep-import the internal
entry-points/*files, or thatjest.mock()a specific subpath, may observe changed resolution/behaviour and need updating.Migration — public imports are unchanged
Importing the published subpaths (or the package root) continues to work as before:
// Still valid — no change required import CodeBlock from '@atlaskit/code/code-block';If you were reaching into the internal entry-point modules, switch to the public subpath:
-import CodeBlock from '@atlaskit/code/entry-points/code-block'; +import CodeBlock from '@atlaskit/code/code-block';Before / after
exportsmap"exports": { ".": "./src/index.tsx", + "./bidi-character-regex": "./src/bidi-warning/bidi-character-regex.tsx", "./bidi-warning": "./src/bidi-warning/index.tsx", "./bidi-warning-decorator": "./src/entry-points/bidi-warning-decorator.tsx", - "./bidi-warning-ui": "./src/entry-points/bidi-warning-ui.tsx", + "./bidi-warning-ui": "./src/bidi-warning/ui/index.tsx", + "./bidi-warning/bidi-warning-decorator": "./src/bidi-warning/bidi-warning-decorator.tsx", "./block": "./src/entry-points/block.tsx", - "./code": "./src/entry-points/code.tsx", + "./code": "./src/code.tsx", - "./code-block": "./src/entry-points/code-block.tsx", + "./code-block": "./src/code-block.tsx", - "./constants": "./src/entry-points/constants.tsx", + "./constants": "./src/constants.tsx", "./inline": "./src/entry-points/inline.tsx", + "./internal/types": "./src/internal/types.tsx", - "./types": "./src/entry-points/types.tsx", + "./types": "./src/types.tsx", }The secondary re-exports that remain on multi-export modules (
CODE_BLOCK_SELECTORfrom./constants,bidiCharacterRegexfrom./bidi-warning-decorator, the./bidi-warningand./blockshims) are now marked@deprecated, each pointing at the import to use instead. VOLTC-139 tracks their removal.Internal type-only imports in the syntax highlighter were also straightened out —
ASTandRefractorNodeare now imported directly fromrefractorrather than re-exported through./src/syntax-highlighter/types.tsx. The set of types available from the public./typessubpath is unchanged.
Patch Changes
- Updated dependencies
18.2.2
Patch Changes
- Updated dependencies
18.2.1
Patch Changes
- Updated dependencies
18.2.0
Minor Changes
-
cd097a2111788, (opens new window) - Republish packages depending on@atlaskit/react-compiler-gatingso their published dependency reference is updated to the renamed@atlaskit/react-compiler-gatingscope.The earlier rename of
@atlassian/react-compiler-gatingto@atlaskit/react-compiler-gatingonly bumped the renamed package itself, so dependent packages were never republished and their published versions still referenced the old@atlassian/react-compiler-gatingname, which is not available in the public npm registry. This minor bump republishes all affected packages with the corrected dependency.
Patch Changes
- Updated dependencies
18.1.0
Minor Changes
8f42cb78984a2, (opens new window) - Fix markdown code blocks silently dropping HTML/JSX tags when refractor parses embedded sub-language grammars. Safe highlighting behind feature gate platform-code-highlight-markdown-safe.
18.0.1
Patch Changes
ee28cf33718b0, (opens new window) - Add @atlaskit/react-compiler-gating as a runtime dependency to enable React Compiler platform gating.- Updated dependencies
18.0.0
Major Changes
-
f2dc9097319f0, (opens new window) - ### Dropped support for legacy Typescript 4 types. Typescript 5 is now the new minimum.Removes the
typesVersionsproperty anddist/types-ts4.5directory from the dist.Types are now exclusively via the
"types": "dist/types/index.d.ts"property.- "typesVersions": { - ">=4.5 <4.9": { - "*": [ - "dist/types-ts4.5/*", - "dist/types-ts4.5/index.d.ts" - ] - } - },
Patch Changes
- Updated dependencies
17.5.1
Patch Changes
- Updated dependencies
17.5.0
Minor Changes
aef119573f01b, (opens new window) - Autofix: add explicit package exports (barrel removal)
Patch Changes
- Updated dependencies
17.4.8
Patch Changes
- Updated dependencies
17.4.7
Patch Changes
ddd049a745d38, (opens new window) - Internal change to how legacy colors are applied. No visual changes.
17.4.6
Patch Changes
- Updated dependencies
17.4.5
Patch Changes
02483200273ec, (opens new window) - Enrol all Design System UI packages into the React Compiler with platform gating via isReactCompilerActivePlatform.- Updated dependencies
17.4.4
Patch Changes
- Updated dependencies
17.4.3
Patch Changes
- Updated dependencies
17.4.2
Patch Changes
- Updated dependencies
17.4.1
Patch Changes
- Updated dependencies
17.4.0
Minor Changes
b867e641d818d, (opens new window) - Updated border radius values behind a feature gateplatform-dst-shape-theme-default.
17.3.3
Patch Changes
b783aa9a00348, (opens new window) - Use ADS code token for font styling.
17.3.2
Patch Changes
a60a82196851a, (opens new window) - Internal refactors to remove unused variables. No functional or public changes.- Updated dependencies
17.3.1
Patch Changes
- Updated dependencies
17.3.0
Minor Changes
480d781cdc018, (opens new window) - Align the code component to ADS design tokens where possible behind a feature flag. If successful, this will be part of a later release.
17.2.8
Patch Changes
- Updated dependencies
17.2.7
Patch Changes
ea4cb74c395ce, (opens new window) - [ux] Adds markdown language support to code blocks
17.2.6
Patch Changes
39e543109ec09, (opens new window) - add type info to forwardRef components- Updated dependencies
17.2.5
Patch Changes
248faa32d4835, (opens new window) - Internal changes to how borders are applied.
17.2.4
Patch Changes
74c2f420ee49b, (opens new window) - Internal changes to how border radius is applied.
17.2.3
Patch Changes
- Updated dependencies
17.2.2
Patch Changes
- #181696, (opens new window)
eded1f9313bbe, (opens new window) - Updated prismjs dependency to resolve security vulnerability: 1.30.0
17.2.1
Patch Changes
- Updated dependencies
17.2.0
Minor Changes
- #153642, (opens new window)
dca85557e83b9, (opens new window) - Adds a label prop for when code block is scrollable. Fixes the code block scrollablity bug.
17.1.2
Patch Changes
- #152825, (opens new window)
5e38d365c6154, (opens new window) - Reverts addition of tab index to code block
17.1.1
Patch Changes
- #152049, (opens new window)
a2bdf059329e8, (opens new window) - Add support for Gherkin language to code
17.1.0
Minor Changes
- #146790, (opens new window)
14ab02f5ac440, (opens new window) - Removing deprecatedgetCodeStylesfunction export
Patch Changes
- Updated dependencies
17.0.0
Major Changes
-
#125263, (opens new window)
1437a53a170e0, (opens new window) - Migrated from@emotion/reactto@compiled/reactin order to improve performance, align with the rest of the Atlaskit techstack, and support React 18 Streaming SSR.Deprecating the
getCodeStylesfunction export from the @atlaskit/code package as it is no longer used.Please note, in order to use this version of
@atlaskit/code, you will need to ensure that your bundler is configured to handle.cssimports correctly. Most bundlers come with built-in support for.cssimports, so you may not need to do anything. If you are using a different bundler, please refer to the documentation for that bundler to understand how to handle.cssimports.For more information on the migration, please refer to RFC-73 Migrating our components to Compiled CSS-in-JS, (opens new window).
Patch Changes
- Updated dependencies
16.3.0
Minor Changes
- #135906, (opens new window)
bf6acb8983b3c, (opens new window) - CodeBlock now supports syntax highlighting for the Handlebars templating language.
16.2.0
Minor Changes
- #135035, (opens new window)
0d6128bb1e136, (opens new window) - CodeBlock now correctly applies syntax highlighting for the ABAP language. This change is no longer behind a feature flag.
16.1.0
Minor Changes
- #130207, (opens new window)
555f7dfaf77f8, (opens new window) - CodeBlock now correctly applies syntax highlighting for the ABAP language. This change is behind the feature flagplatform_dst_code_abap_syntax.
16.0.3
Patch Changes
- #129972, (opens new window)
b2d69a39e6687, (opens new window) - Update@compiled/reactdependency for improved type checking support. - Updated dependencies
16.0.2
Patch Changes
- Updated dependencies
16.0.1
Patch Changes
- Updated dependencies
16.0.0
Major Changes
-
#117363, (opens new window)
10a0f7f6c2027, (opens new window) - This package'speerDependencieshave been adjusted forreactand/orreact-domto reflect the status of only supporting React 18 going forward. No explicit breaking change to React support has been made in this release, but this is to signify going forward, breaking changes for React 16 or React 17 may come via non-major semver releases.Please refer this community post for more details: https://community.developer.atlassian.com/t/rfc-78-dropping-support-for-react-16-and-rendering-in-a-react-18-concurrent-root-in-jira-and-confluence/87026, (opens new window)
Patch Changes
- Updated dependencies
15.8.0
Minor Changes
- #116138, (opens new window)
b50c5d5d65ae2, (opens new window) - Bump to the latest version of @compiled/react
Patch Changes
- Updated dependencies
15.7.3
Patch Changes
- Updated dependencies
15.7.2
Patch Changes
- #114336, (opens new window)
f09cd799e466a, (opens new window) - Update dependencies and remove old codemods.
15.7.1
Patch Changes
- Updated dependencies
15.7.0
Minor Changes
- #109060, (opens new window)
4660ec858a305, (opens new window) - UpdateReactfrom v16 to v18
Patch Changes
- Updated dependencies
15.6.10
Patch Changes
- #105601, (opens new window)
948a599bf836d, (opens new window) - Update dependencies and remove unused internal exports. - Updated dependencies
15.6.9
Patch Changes
- Updated dependencies
15.6.8
Patch Changes
- #178053, (opens new window)
cb318c8c28c26, (opens new window) - Internal changes to typography.
15.6.7
Patch Changes
- Updated dependencies
15.6.6
Patch Changes
- #166026, (opens new window)
962b5e77810fb, (opens new window) - Adds side-effect config to support Compiled css extraction in third-party apps
15.6.5
Patch Changes
- Updated dependencies
15.6.4
Patch Changes
- #153064, (opens new window)
fba89f308ab2b, (opens new window) - [ux] Removed feature flag resulting typography style changes but no visual changes.
15.6.3
Patch Changes
- #152305, (opens new window)
0f13c972be628, (opens new window) - [ux] Fix background color override using CSS variable for inlinde code behind a feature flag. If successful, these changes will be made available in a later release.
15.6.2
Patch Changes
- #146968, (opens new window)
55f40e0488d9e, (opens new window) - [ux] Use typography tokens where possible for code block component behind a feature flag. If successful, these changes will be made available in a later release.
15.6.1
Patch Changes
- Updated dependencies
15.6.0
Minor Changes
- #133573, (opens new window)
9e6563c10af4c, (opens new window) - Updating font styles for code component inline with the new typography system behind a feature flag. If successful, these changes will be made available in a later release.
15.5.1
Patch Changes
- Updated dependencies
15.5.0
Minor Changes
-
#127511, (opens new window)
db30e29344013, (opens new window) - Widening range ofreactandreact-dompeer dependencies from^16.8.0 || ^17.0.0 || ~18.2.0to the wider range of ``^16.8.0 || ^17.0.0 || ^18.0.0` (where applicable).This change has been done to enable usage of
react@18.3as well as to have a consistent peer dependency range forreactandreact-domfor/platformpackages.
Patch Changes
- Updated dependencies
15.4.2
Patch Changes
- #120049, (opens new window)
77504ff274f72, (opens new window) - DSP-19576: Assign names to anonymous default exports
15.4.1
Patch Changes
- #118430, (opens new window)
d5fe97a9a6bc1, (opens new window) - Remove remnants ofextract-react-types.
15.4.0
Minor Changes
- #116950, (opens new window)
c3908db22d486, (opens new window) - CodeBlock supports a newfirstLineNumberprop, which allows the starting line number to be set (defaulting to 1).
15.3.1
Patch Changes
- #116025, (opens new window)
cd506a937e44f, (opens new window) - Internal change to how typography is applied. There should be no visual change.
15.3.0
Minor Changes
- #111878, (opens new window)
223959ef57c80, (opens new window) - Explicitly set jsxRuntime to classic via pragma comments in order to avoid issues where jsxRuntime is implicitly set to automatic.
15.2.1
Patch Changes
- #109278, (opens new window)
61432c68027c1, (opens new window) - [ux] CodeBlock now renders tab size as 4 characters wide.
15.2.0
Minor Changes
- #98206, (opens new window)
71a555d49484, (opens new window) - Add support for React 18 in non-strict mode.
Patch Changes
- Updated dependencies
15.1.2
Patch Changes
- #83188, (opens new window)
cd5d06cd3329, (opens new window) - Minor adjustments to improve compatibility with React 18
15.1.1
Patch Changes
- #83116, (opens new window)
8d4e99057fe0, (opens new window) - Upgrade Typescript from4.9.5to5.4.2
15.1.0
Minor Changes
- #42903, (opens new window)
96e3a0ee5b7, (opens new window) - [ux] Add support for Dockerfile, HCL, NGINX and Protobuf languages
15.0.0
Major Changes
- #41498, (opens new window)
73adf14896c, (opens new window) - Remove usage of legacy theming from the Code component and refactor where necessary to accomodate the updated API.
14.6.9
Patch Changes
- Updated dependencies
14.6.8
Patch Changes
- #40914, (opens new window)
ffa68309c76, (opens new window) - update children variable to have type definition
14.6.7
Patch Changes
- #38162, (opens new window)
fd6bb9c9184, (opens new window) - Delete version.json - Updated dependencies
14.6.6
Patch Changes
- #36754, (opens new window)
4ae083a7e66, (opens new window) - Use@af/accessibility-testingfor default jest-axe config and jest-axe import in accessibility testing.
14.6.5
Patch Changes
- #34360, (opens new window)
59b808d6a46, (opens new window) - [ux] Improves the accessibility of the bidirectional character warnings.
14.6.4
Patch Changes
- #33652, (opens new window)
e7ea6832ad2, (opens new window) - Bans the use of React.FC/React.FunctionComponent type in ADS components as part of the React 18 migration work. The change is internal only and should not introduce any changes for the component consumers.
14.6.3
Patch Changes
- #34051, (opens new window)
49b08bfdf5f, (opens new window) - Migrated use ofgridSizeto space tokens where possible. There is no expected visual or behaviour change.
14.6.2
Patch Changes
- #33793, (opens new window)
9d00501a414, (opens new window) - Ensure legacy types are published for TS 4.5-4.8
14.6.1
Patch Changes
- #33649, (opens new window)
41fae2c6f68, (opens new window) - Upgrade Typescript from4.5.5to4.9.5
14.6.0
Minor Changes
- #33258, (opens new window)
56507598609, (opens new window) - Skip minor dependency bump
Patch Changes
- Updated dependencies
14.5.4
Patch Changes
- #32424, (opens new window)
2e01c9c74b5, (opens new window) - DUMMY remove before merging to master; dupe adf-schema via adf-utils
14.5.3
Patch Changes
- #31638, (opens new window)
74750bef5c4, (opens new window) - Fixes some bugs with the long line wrapping and syntax-highlighting changes that were released in v14.5.0.
14.5.2
Patch Changes
- #31378, (opens new window)
3ca97be0c06, (opens new window) - Internal change only. Replace usages of Inline/Stack with stable version from@atlaskit/primitives.
14.5.1
Patch Changes
- #31206, (opens new window)
261420360ec, (opens new window) - Upgrades component types to support React 18. - Updated dependencies
14.5.0
Minor Changes
- #30248, (opens new window)
f5ca132a05e, (opens new window) - [ux] CodeBlock has had some significant under-the-hood changes in this version. While technically it is a minor update as all API changes are additive and backwards-compatible, this is a heads up that there are some small visual changes that may require visual regression snapshots to be updated.-
Adds a new
shouldWrapLongLinesprop that allows you to wrap long lines of code over multiple lines, instead of always forcing the container to scroll horizontally. -
Fixes a frustrating bug where copying code from
CodeBlockwould also copy line numbers — this no longer occurs! -
Replaces the dependency of
react-syntax-highlighterwith our own implementation that is more maintainable and performant. This also lead to a bump in an underlying dependencyprismjswhich added new syntax highlighting features for some languages. This may cause some blocks of code to look slightly different, potentially impacting VR tests — some changes are expected! Reach out to #help-design-system if you have any questions. -
Improves the presentation and security of
CodeBlock's with bidirectional characters to present the source code exactly how it was written. The bidirectional characters themselves are still highlighted in the same way as before with a warning and a tooltip. This may also impact VR tests, but is expected.
-
Patch Changes
- Updated dependencies
14.4.8
Patch Changes
- Updated dependencies
14.4.7
Patch Changes
- #29390, (opens new window)
18aeca8c199, (opens new window) - Internal change to update token references. There is no expected behaviour or visual change.
14.4.6
Patch Changes
- #28064, (opens new window)
b0f6dd0bc35, (opens new window) - Updated to use typography tokens. There is no expected behaviour or visual change.
14.4.5
Patch Changes
- Updated dependencies
14.4.4
Patch Changes
- Updated dependencies
14.4.3
Patch Changes
- #26712, (opens new window)
f1765efdca6, (opens new window) - [ux] Fix bug that caused misalignment of Code Block content which contain a mixture of spaces and tabs
14.4.2
Patch Changes
- Updated dependencies
14.4.1
Patch Changes
- #26488, (opens new window)
bc989043572, (opens new window) - Internal changes to apply spacing tokens. This should be a no-op change.
14.4.0
Minor Changes
- #24710, (opens new window)
d6bf753bb43, (opens new window) - Updates@emotion/coreto@emotion/react; v10 to v11. There is no expected behavior change.
Patch Changes
- Updated dependencies
14.3.10
Patch Changes
- #24874, (opens new window)
8cc2f888c83, (opens new window) - Upgrade Typescript from4.3.5to4.5.5
14.3.9
Patch Changes
- #24492, (opens new window)
8d4228767b0, (opens new window) - Upgrade Typescript from4.2.4to4.3.5.
14.3.8
Patch Changes
- #23381, (opens new window)
8202e37941b, (opens new window) - Internal code change turning on new linting rules.
14.3.7
Patch Changes
- Updated dependencies
14.3.6
Patch Changes
- #20650, (opens new window)
cb2392f6d33, (opens new window) - Upgrade to TypeScript 4.2.4
14.3.5
Patch Changes
- #20033, (opens new window)
46824ff1acd, (opens new window) - [ux]<CodeBlock />s with no content no longer vertically collapse, and maintain their intended minimum height - Updated dependencies
14.3.4
Patch Changes
- Updated dependencies
14.3.3
Patch Changes
-
#19019, (opens new window)
a1a89347baa, (opens new window) - [ux] Instrumented@atlaskit/codewith the new theming package,@atlaskit/tokens.New tokens will be visible only in applications configured to use the new Tokens API (currently in alpha). These changes are intended to be interoperable with the legacy theme implementation. Legacy dark mode users should expect no visual or breaking changes.
-
Updated dependencies
14.3.2
Patch Changes
- #18356, (opens new window)
b5226ba2c15, (opens new window) - Replaceboltwithyarnfor rendered example changeset commands
14.3.1
Patch Changes
- #16531, (opens new window)
7a34eeea327, (opens new window) - Bump prismjs due to vulnerability
14.3.0
Minor Changes
- #16168, (opens new window)
db3477abb18, (opens new window) - [ux] ED-13938 disabled code-bidi warning tooltip for mobile, reworked TextWrapper to fix bidi mitigation, and fixed issue where bidi warnings were not presented when renderer used with an annotation provider with draftMode set to true
14.2.0
Minor Changes
- #16006, (opens new window)
c80c71b537d, (opens new window) - [ux] ED-13860 add bidi warning decorations to code components
14.1.5
Patch Changes
- #15694, (opens new window)
b85e7ce12cd, (opens new window) - Internal upgrade of memoize-one to 6.0.0
14.1.4
Patch Changes
- Updated dependencies
14.1.3
Patch Changes
- #12880, (opens new window)
378d1cef00f, (opens new window) - Bump@atlaskit/themeto version^11.3.0.
14.1.2
Patch Changes
- #12810, (opens new window)
d827fec15b2, (opens new window) - Fixes a regression in ^14.0.0 that meant the functiongetCodeStylesdidn't work correctly with interpolations using thestyled-componentstheming.
14.1.1
Patch Changes
- #12168, (opens new window)
cd488f9d370, (opens new window) - Bumps prismjs to address a security vulnerability in the underlying lib.
14.1.0
Minor Changes
- #11113, (opens new window)
aef12f51c46, (opens new window) - Add an entry point for constants to expose SUPPORTED_LANGUAGES and export the type of SUPPORTED_LANGUAGES. Splunk SPl has also been added as a supported language.
14.0.1
Patch Changes
- #10569, (opens new window)
596f1eb2fca, (opens new window) - [ux] Line height property remvoved from inline code. This was a bug as the line height was being under calculated relative to the code's font size. It now inherits correctly. - Updated dependencies
14.0.0
Major Changes
-
#10230, (opens new window)
e8f66c36dd7, (opens new window) - BREAKING CHANGESThis version includes several breaking changes to improve performance of the
@atlaskit/codepackage.<Code />no longer supports syntax highlighting, greatly simplifying the component. Additionally, thetextprop has been removed in favour of usingchildrendirectly. This allows users to provide complex nodes (not just plain text) to Code.// previous <Code text="const x = 10;" language="js" /> // now with language no longer supported <Code>const x = 10;</Code>Component theming is no longer supported in
<Code />or<CodeBlock />; this change does not effect global theming. As an escape hatch, two CSS variables are exposed:--ds--code--line-number-bg-color: which controls the background color of the line numbers if set--ds--code--bg-color: which controls the background color of the block body if set
Components can now be imported individually using individual entrypoints. Using these entrypoints will reduce the overall bundle size of this package if you do not need both components.
import { Code } from '@atlaskit/code'; // --> to import Code from '@atlaskit/code/inline'; import { CodeBlock } from '@atlaskit/code'; // --> to import CodeBlock from '@atlaskit/code/block'; // note this will still work import { Code, CodeBlock } from '@atlaskit/code';Finally,
CodeBlockhas had type improvements, and internal optimisations to facilitate faster rendering and updates. -
7e091c1d415, (opens new window) - BREAKING CHANGE:The
codeStyleprop has now been removed on theCodecomponent.For reference, previously this type of usage would effect the styling of any numbers in the code text.
<Code codeStyle={{ number: 'red' }} text={someCode} />Due to internal changes the above usage is no longer possible.
This release also includes internal changes to the syntax highlighting element to use class names instead of inline styles for syntax highlighting. This results in a substantial performance gain.
Minor Changes
07e012bfc5b, (opens new window) - Updates to internal package structure, exposing additional entrypoints. Types also tightened for language support to better match underlying component.
Patch Changes
b46ca884bc8, (opens new window) - Add a codemod to remove usages of thelanguageprop and convert thetextprop to be a child.- Updated dependencies
13.2.3
Patch Changes
- #9756, (opens new window)
900819ca759, (opens new window) - Update to VR test suite, to make diffs easier to reason about. - Updated dependencies
13.2.2
Patch Changes
- #9510, (opens new window)
c9da1eecd2a, (opens new window) - Internal changes moving class components to functional components, added updated types for react-syntax-highlighter
13.2.1
Patch Changes
- #8057, (opens new window)
413cc46d307, (opens new window) - [ux] Added colors for missing syntax keywords
13.2.0
Minor Changes
-
#7762, (opens new window)
3c7be954dbd, (opens new window) - [ux] Line highlighting now meets WCAG 2.1 guidelines. Colors that were failing contrast have been updated and there is now a new visual cue consisting of a left border to the highlighted lines. -
23ef692842a, (opens new window) - [ux]CodeandCodeBlocknow use react-syntax-highlighter@^15 to highlight code. As part of this change the fontSize for the line numbers and the code body have been normalised. This will be a breaking visual change for all consumers. No action is required other than a callout that this will affect any existing visual regression tests.Users can now use the
themeOverrideprop to customise the application of the default theme. This is an escape hatch which will likley be removed in a future major version.This change also includes:
- A bugfix for lineHeight that meant linenumbers and code body were not vertically aligned correctly.
- A bugfix for the SSR'd components not rendering consistently before hydration
- Improved semantic lines, which can now be properly consumed by screen readers.
- The
CodeandCodeBlocknow expose additional options in theirthemeprop. These arecodeFontSizeandcodeLineHeightwhich allow customisation of the component's rendered font size.
-
7c2f2056ef7, (opens new window) - [ux] Added code syntax highlighting for the following languages: AppleScript, Clojure, Delphi, Diff, FoxPro, Object Pascal, QML, Standard ML, Visual Basic, JSX and TSX
Patch Changes
72d19d3f308, (opens new window) - Internal changes relating to types, and tests. Includes a small bugfix to the way Code component had styles applied and adds testId as a prop to both Code and CodeBlock.84c4d95e2e0, (opens new window) - [ux] Line numbers now have correct spacing in Firefox and Safari.a4bcf21a972, (opens new window) - [ux] Syntax highlighting now uses accessibile colors that meet WCAG 2.0 Level AA guidelines for color contrastb5873e7bf01, (opens new window) - [ux] Fixed highlighted line left border alignment.
13.1.1
Patch Changes
- #5857, (opens new window)
d3265f19be, (opens new window) - Transpile packages using babel rather than tsc
13.1.0
Minor Changes
- #5516, (opens new window)
17162a77f2, (opens new window) - types of Supported Languages for @atlaskit/code is maintained by the package itself. Useful for when one references Supported Languages, wanting to know what types of languages are supported by @atlaskit/code.
13.0.3
Patch Changes
- #5497, (opens new window)
5f58283e1f, (opens new window) - Export types using Typescript's new "export type" syntax to satisfy Typescript's --isolatedModules compiler option. This requires version 3.8 of Typescript, read more about how we handle Typescript versions here: https://atlaskit.atlassian.com/get-started, (opens new window) Also addtypescripttodevDependenciesto denote version that the package was built with.
13.0.2
Patch Changes
- Updated dependencies
13.0.1
Patch Changes
- #4346, (opens new window)
ade5203287, (opens new window) - Fix codemod utilities being exposed through the codemod cli
13.0.0
Major Changes
- #4424, (opens new window)
37f8133702, (opens new window) - - RenameAkCodeandAkCodeBlockexports toCodeandCodeBlockrespectively.- Remove unnecessary props (
lineNumberContainerStyle,showLineNumbersandhighlight) fromCode. - Add codemods for above changes. Codemods can be found inside codemods directory. Please use @atlaskit/codemod-cli, (opens new window) for running the codemods according to version of your package. Check its documentation here, (opens new window).
- Split exported
Themetype intoCodeThemeandCodeBlockTheme. - Remove
lineNumberColorandlineNumberBgColortype fromCodeTheme. They are available only inCodeBlockThemenow.
- Remove unnecessary props (
Patch Changes
336f870e37, (opens new window) - fix exception errors of syntax highlighter for several languages
12.0.3
Patch Changes
-
#3885, (opens new window)
6c525a8229, (opens new window) - Upgraded to TypeScript 3.9.6 and tslib to 2.0.0Since tslib is a dependency for all our packages we recommend that products also follow this tslib upgrade to prevent duplicates of tslib being bundled.
12.0.2
Patch Changes
- #3293, (opens new window)
954cc87b62, (opens new window) - The readme and package information has been updated to point to the new design system website.
12.0.1
Patch Changes
- #3428, (opens new window)
db053b24d8, (opens new window) - Update all the theme imports to be tree-shakable
12.0.0
Major Changes
- #3335, (opens new window)
87f4720f27, (opens new window) - Officially dropping IE11 support, from this version onwards there are no warranties of the package working in IE11. For more information see: https://community.developer.atlassian.com/t/atlaskit-to-drop-support-for-internet-explorer-11-from-1st-july-2020/39534, (opens new window)
Patch Changes
- Updated dependencies
11.1.6
Patch Changes
- #2866, (opens new window)
54a9514fcf, (opens new window) - Build and supporting files will no longer be published to npm
11.1.5
Patch Changes
-
[patch]f7f2068a76, (opens new window):
Change imports to comply with Atlassian conventions
11.1.4
Patch Changes
-
[patch]5f5b93071f, (opens new window):
Code highlighting now works as expected when highlighting single to double digit lines.- Updated dependencies dae900bf82, (opens new window):
-
Updated dependencies 8c9e4f1ec6, (opens new window):
- @atlaskit/build-utils@2.6.4
- @atlaskit/docs@8.5.0
11.1.3
Patch Changes
-
[patch]6548261c9a, (opens new window):
Remove namespace imports from React, ReactDom, and PropTypes- Updated dependencies 6548261c9a, (opens new window):
- @atlaskit/docs@8.3.2
- @atlaskit/visual-regression@0.1.9
- @atlaskit/theme@9.5.1
11.1.2
Patch Changes
-
[patch]b52f2be5d9, (opens new window):
ThemedCode and ThemeCodeBlock props are now correctly typed- Updated dependencies d2b8166208, (opens new window):
- @atlaskit/docs@8.3.0
11.1.1
Patch Changes
-
[patch]4a223473c5, (opens new window):
Removes babel/runtime from dependencies. Users should see a smaller bundlesize as a result- Updated dependencies 82747f2922, (opens new window):
- @atlaskit/theme@9.5.0
11.1.0
Minor Changes
-
[minor]9648afc5be, (opens new window):
Adds
highlightprop toAkCodeBlock,Example, and thecodetemplate literal. Use this to emphasize which lines of code you would like people to look at!The
highlightprop can be used as follows:- To highlight one line:
highlight="3" - To highlight sequential lines:
highlight="1-5" - To highlight sequential and multiple single lines:
highlight="1-5,7,10,15-20"
AkCodeBlockcomponentUse the
highlightprop.import { AkCodeBlock } from '@atlaskit/code'; <AkCodeBlock highlight="1-2" text={` <div> hello there <span>buds</span> </div> `} />;ExamplecomponentUse the
highlightprop.import { Example } from '@atlaskit/docs'; <Example packageName="@atlaskit/code" Component={require('../examples/00-inline-code-basic').default} title="Basic" highlight="19,24,30,36" source={require('!!raw-loader!../examples/00-inline-code-basic')} />;codetemplate literalAdd
highlight=to the top of your code snippet. It takes the same values as thehighlightprop.import { code } from '@atlaskit/docs'; code`highlight=5-7 import React from 'react'; () => ( <div> hello there <span>buds</span> </div> )`; - To highlight one line:
11.0.14
Patch Changes
-
[patch]35d2229b2a, (opens new window):
Adding missing license to packages and update to Copyright 2019 Atlassian Pty Ltd.
11.0.13
Patch Changes
-
[patch]a2d0043716, (opens new window):
Updated version of analytics-next to fix potential incompatibilities with TS 3.6
11.0.12
Patch Changes
-
[patch]65ada7f318, (opens new window):
FABDODGEM-12 Editor Cashmere Release
Affected editor components:
tables, media, mobile, text color, emoji, copy/paste, analytics
Performance
- Async import for code blocks and task items on renderer
Table
- Add support to sort tables that contains smart links
- Scale table when changing to full width mode
Text color
- Update text color toolbar with right color when text is inside a list, panel, etc.
Mobile - Implement undo/redo interface on Hybrid Editor - https://product-fabric.atlassian.net/browse/FM-2393, (opens new window)
Copy and Paste
- Support copy & paste when missing context-id attr
- https://product-fabric.atlassian.net/browse/MS-2344
- Right click + copy image fails the second time that is pasted
- https://product-fabric.atlassian.net/browse/MS-2324
- Copying a never touched image for the first time from editor fails to paste
- https://product-fabric.atlassian.net/browse/MS-2338
- Implement analytics when a file is copied
- https://product-fabric.atlassian.net/browse/MS-2036
Media
- Add analytics events and error reporting [NEW BIG FEATURE]
- https://product-fabric.atlassian.net/browse/MS-2275, (opens new window)
- https://product-fabric.atlassian.net/browse/MS-2329, (opens new window)
- https://product-fabric.atlassian.net/browse/MS-2330, (opens new window)
- https://product-fabric.atlassian.net/browse/MS-2331, (opens new window)
- https://product-fabric.atlassian.net/browse/MS-2332, (opens new window)
- https://product-fabric.atlassian.net/browse/MS-2390, (opens new window)
- Fixed issue where we can’t insert same file from MediaPicker twice
- Disable upload of external files to media
Notable Bug Fixes
- Implement consistent behaviour for rule and mediaSingle on insertion
- Feature Flag:
- allowNewInsertionBehaviour - [default: true]
- https://product-fabric.atlassian.net/browse/ED-7503
- Fixed bug where we were showing table controls on mobile.
- https://product-fabric.atlassian.net/browse/ED-7690
- Fixed bug where editor crashes after unmounting react component.
- https://product-fabric.atlassian.net/browse/ED-7318
- Fixed bug where custom emojis are not been showed on the editor
- https://product-fabric.atlassian.net/browse/ED-7726
-
[patch]1715ad2bd5, (opens new window):
ED-7731: add support for GraphQL syntax highlighting
11.0.11
Patch Changes
-
[patch]097b696613, (opens new window):
Components now depend on TS 3.6 internally, in order to fix an issue with TS resolving non-relative imports as relative imports
11.0.10
Patch Changes
-
[patch]ecca4d1dbb, (opens new window):
Upgraded Typescript to 3.3.x
11.0.9
Patch Changes
-
[patch]708028db86, (opens new window):
Change all the imports to theme in Core to use multi entry points
11.0.8
Patch Changes
-
[patch]abee1a5f4f, (opens new window):
Bumping internal dependency (memoize-one) to latest version (5.1.0). memoize-one@5.1.0 has full typescript support so it is recommended that typescript consumers use it also.
11.0.7
Patch Changes
-
[patch]de35ce8c67, (opens new window):
Updates component maintainers
11.0.6
Patch Changes
-
[patch]bbff8a7d87, (opens new window):
Fixes bug, missing version.json file
11.0.5
Patch Changes
-
[patch]18dfac7332, (opens new window):
In this PR, we are:
- Re-introducing dist build folders
- Adding back cjs
- Replacing es5 by cjs and es2015 by esm
- Creating folders at the root for entry-points
- Removing the generation of the entry-points at the root Please see this ticket, (opens new window) or this page, (opens new window) for further details
11.0.4
Patch Changes
-
[patch]29a1f158c1, (opens new window):
Use default react import in typescript files.
11.0.3
Patch Changes
-
[patch]4615439434, (opens new window):
index.ts will now be ignored when publishing to npm
11.0.2
Patch Changes
-
[patch]93bcf314c6, (opens new window):
Added missing tslib dep
11.0.1
- [patch]b0ef06c685, (opens new window):
- This is just a safety release in case anything strange happened in in the previous one. See Pull Request #5942 for details
11.0.0
- [major]97bfe81ec8, (opens new window):
- @atlaskit/code has been converted to Typescript. Typescript consumers will now get static type safety. Flow types are no longer provided. No API or behavioural changes.
10.0.0
- [major]7c17b35107, (opens new window):
- Updates react and react-dom peer dependencies to react@^16.8.0 and react-dom@^16.8.0. To use this package, please ensure you use at least this version of react and react-dom.
9.0.1
- Updated dependencies
9c0b4744be, (opens new window):
- @atlaskit/docs@7.0.3
- @atlaskit/theme@8.1.7
9.0.0
-
[major]76299208e6, (opens new window):
- Drop ES5 from all the flow modules
Dropping CJS support in all @atlaskit packages
As a breaking change, all @atlaskit packages will be dropping cjs distributions and will only distribute esm. This means all distributed code will be transpiled, but will still contain
importandexportdeclarations.The major reason for doing this is to allow us to support multiple entry points in packages, e.g:
import colors from `@atlaskit/theme/colors`;Previously this was sort of possible for consumers by doing something like:
import colors from `@atlaskit/theme/dist/esm/colors`;This has a couple of issues. 1, it treats the file system as API making internal refactors harder, we have to worry about how consumers might be using things that aren't actually supposed to be used. 2. We are unable to do this internally in @atlaskit packages. This leads to lots of packages bundling all of theme, just to use a single color, especially in situations where tree shaking fails.
To support being able to use multiple entrypoints internally, we unfortunately cannot have multiple distributions as they would need to have very different imports from of their own internal dependencies.
ES Modules are widely supported by all modern bundlers and can be worked around in node environments.
We may choose to revisit this solution in the future if we find any unintended condequences, but we see this as a pretty sane path forward which should lead to some major bundle size decreases, saner API's and simpler package architecture.
Please reach out to #fabric-build (if in Atlassian) or create an issue in Design System Support, (opens new window) (for external) if you have any questions or queries about this.
8.2.3
- [patch]d49e9bbb13, (opens new window):
- Expose the props on website
8.2.2
- Updated dependencies 58b84fa, (opens new window):
- @atlaskit/theme@7.0.1
- @atlaskit/docs@6.0.0
8.2.1
- Updated dependencies d13242d, (opens new window):
- @atlaskit/docs@5.2.3
- @atlaskit/theme@7.0.0
8.2.0
- [minor]10fe416, (opens new window):
- Props Language should be required and surfacing more props for code
8.1.1
- [patch]84e8015, (opens new window):
- Bump react-syntax-highlighter to 10.0.1
8.1.0
- [minor]26027dd, (opens new window):
- Upgrade react syntax highlighter to version that ships its own async loaded languages and supports SSR
8.0.12
- [patch] Inline code should wrap f1d9a54, (opens new window)
8.0.11
- [patch] Fix webpack 3 support for page & code 03af95e, (opens new window)
8.0.10
- [patch] Update babel config to transpile out dynamic imports for commonjs 2dae295, (opens new window)
8.0.9
- [patch] Adds missing implicit @babel/runtime dependency b71751b, (opens new window)
8.0.8
- [patch] Add some padding to the code without line numbers 67cd63d, (opens new window)
8.0.7
- [patch] Added yaml to supported languages for code and added styling for the key token. 95f9236, (opens new window)
8.0.6
- [patch] Async load highlighter languages 9102fa2, (opens new window)
8.0.5
- [patch] Upgrade react-syntax-highlighter again and use async loaded prism 260d66a, (opens new window)
8.0.4
- [patch] Upgraded react-syntax-highlighter to 8.0.2 7cc7000, (opens new window)
8.0.3
- [patch] Adds sideEffects: false to allow proper tree shaking b5d6d04, (opens new window)
8.0.1
- [patch] Updated dependencies
df22ad8, (opens new window)
- @atlaskit/theme@6.0.0
- @atlaskit/docs@5.0.6
8.0.0
- [major] ED-4989: replace hjs with prism f9c0cdb, (opens new window)
- [none] Updated dependencies
f9c0cdb, (opens new window)
- @atlaskit/docs@5.0.5
7.0.3
- [patch] update the dependency of react-dom to 16.4.2 due to vulnerability in previous versions read https://reactjs.org/blog/2018/08/01/react-v-16-4-2.html, (opens new window) for details a4bd557, (opens new window)
- [none] Updated dependencies
a4bd557, (opens new window)
- @atlaskit/theme@5.1.3
7.0.2
- [patch] Updated dependencies
acd86a1, (opens new window)
- @atlaskit/theme@5.1.2
- @atlaskit/docs@5.0.2
7.0.1
- [patch] Add a SSR test for every package, add react-dom and build-utils in devDependencies 7e331b5, (opens new window)
- [none] Updated dependencies
7e331b5, (opens new window)
- @atlaskit/theme@5.1.1
7.0.0
- [major] Updates to React ^16.4.0 7edb866, (opens new window)
- [major] Updated dependencies
563a7eb, (opens new window)
- @atlaskit/theme@5.0.0
- @atlaskit/docs@5.0.0
- [major] Updated dependencies
7edb866, (opens new window)
- @atlaskit/theme@5.0.0
- @atlaskit/docs@5.0.0
6.0.1
- [patch] Add default theme prop to prevent Code throwing errors when no theme provider is given 07334bc, (opens new window)
- [none] Updated dependencies 07334bc, (opens new window)
6.0.0
- [major] Significantly reduce the bundle-size of @atlaskit/code by only supporting a subset of languages. Also introduces support for theming the content via @atlaskit/theme. AK-4536 eee2d45, (opens new window)
- [none] Updated dependencies
eee2d45, (opens new window)
- @atlaskit/docs@4.2.1
5.0.4
- [patch] Clean Changelogs - remove duplicates and empty entries e7756cd, (opens new window)
- [none] Updated dependencies
e7756cd, (opens new window)
- @atlaskit/theme@4.0.4
5.0.3
- [patch] Update changelogs to remove duplicate cc58e17, (opens new window)
- [none] Updated dependencies
cc58e17, (opens new window)
- @atlaskit/theme@4.0.3
- @atlaskit/docs@4.1.1
5.0.2
- [none] Updated dependencies
9d20f54, (opens new window)
- @atlaskit/docs@4.1.0
- @atlaskit/theme@4.0.2
5.0.1
- [patch] Update readme's 223cd67, (opens new window)
- [patch] Updated dependencies
223cd67, (opens new window)
- @atlaskit/theme@4.0.1
- @atlaskit/docs@4.0.1
5.0.0
- [major] makes styled-components a peer dependency and upgrades version range from 1.4.6 - 3 to ^3.2.6 1e80619, (opens new window)
- [patch] Updated dependencies
1e80619, (opens new window)
- @atlaskit/theme@4.0.0
- @atlaskit/docs@4.0.0
4.0.4
- [patch] Updated dependencies
d662caa, (opens new window)
- @atlaskit/theme@3.2.2
- @atlaskit/docs@3.0.4
4.0.3
- [patch] Align font sizes for inline code, mentions and dates d2ef1af, (opens new window)
- [none] Updated dependencies d2ef1af, (opens new window)
4.0.1
- [patch] Get rid of outdent dependency 6a2c1d9, (opens new window)
4.0.0
- [major] Bump to React 16.3. 4251858, (opens new window)
3.1.2
- [patch] Plain text should not be rendered as markdown fe307dc, (opens new window)
3.1.1
- [patch] Re-releasing due to potentially broken babel release 9ed0bba, (opens new window)
3.1.0
- [minor] Update styled-components dependency to support versions 1.4.6 - 3 ceccf30, (opens new window)
3.0.6
- [patch] updated the repository url to https://bitbucket.org/atlassian/atlaskit-mk-2, (opens new window) 1e57e5a, (opens new window)
3.0.5
- [patch] Packages Flow types for elements components 3111e74, (opens new window)
3.0.4
- [patch] Minor manual bump for packages desync'd from npm e988c58, (opens new window)
3.0.3
- Manual bump to resolve desync with npm package version.
3.0.2
- [patch] Enabling syntax highlighter language auto-detect 4831bd2, (opens new window)
3.0.1
- [patch] Resolved low hanging flow errors in field-base field-text comment icon item and website, $ 007de27, (opens new window)
3.0.0
- [major] Moved to elements repo converted to flow typing, stripped out typescript types 235e392, (opens new window)
2.2.1
- [patch] Remove styled-components as a peerDependency from @atlaskit/code. 047032b, (opens new window)
2.2.0
- [minor] Add React 16 support. 12ea6e4, (opens new window)