UNPKG

@atlaskit/image

Version:

An image that changes in light or dark themes.

540 lines (331 loc) • 15.5 kB
# @atlaskit/image ## 5.2.4 ### Patch Changes - Updated dependencies ## 5.2.3 ### Patch Changes - Updated dependencies ## 5.2.2 ### Patch Changes - Updated dependencies ## 5.2.1 ### Patch Changes - Updated dependencies ## 5.2.0 ### Minor Changes - [`bd2c5b0112185`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bd2c5b0112185) - Remove stale API report artifacts from published Platform packages. ### Patch Changes - Updated dependencies ## 5.1.1 ### Patch Changes - [`e974cd0ae082c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e974cd0ae082c) - Experimental React 19 peer dependency support. This patch widens the peer range; CI coverage is partial. - Updated dependencies ## 5.1.0 ### Minor Changes - [`d82e6f76528ab`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d82e6f76528ab) - 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.json` `exports` subpaths 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 ## 5.0.0 ### Major Changes - [`48e7d03469b80`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/48e7d03469b80) - Apply Volt entry-point and barrel-removal standards across these design-system packages. Public `exports` now resolve **directly** to `./src/*` implementations instead of intermediate `./src/entry-points/*` re-exports, root barrels and remaining entry-point shims are marked deprecated in favour of per-export subpaths, and a few new subpaths are added (`@atlaskit/badge/badge-new`, `@atlaskit/tile/tile-skeleton`, `@atlaskit/popper/main`, `@atlaskit/section-message/message`, `@atlaskit/section-message/message-action`). ### Why this is breaking Subpaths and the package root can now resolve to the **same module instance**. Consumers that deep-imported `entry-points/*`, or `jest.mock()`'d a specific subpath may need updates. `@atlaskit/image`'s root export now points at `./src/ui/image/index.tsx`. `@atlaskit/checkbox/checkbox` now exports a named `Checkbox` from the implementation module (default export retained for backwards compatibility). ### Migration Prefer published subpaths over the package root: ```ts import { Checkbox } from '@atlaskit/checkbox/checkbox'; import TextField from '@atlaskit/textfield/text-field'; import Popup from '@atlaskit/popup/popup'; import SectionMessage from '@atlaskit/section-message/message'; import EmptyState from '@atlaskit/empty-state/empty-state'; ``` If you imported through internal entry-point modules, switch to the public subpath: ```diff -import Checkbox from '@atlaskit/checkbox/entry-points/checkbox'; +import { Checkbox } from '@atlaskit/checkbox/checkbox'; ``` ### Patch Changes - Updated dependencies ## 4.2.1 ### Patch Changes - Updated dependencies ## 4.2.0 ### Minor Changes - [`c98e0cf5cc4f6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c98e0cf5cc4f6) - Autofix: add explicit package exports (barrel removal) ## 4.1.0 ### Minor Changes - [`cd097a2111788`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/cd097a2111788) - Republish packages depending on `@atlaskit/react-compiler-gating` so their published dependency reference is updated to the renamed `@atlaskit/react-compiler-gating` scope. The earlier rename of `@atlassian/react-compiler-gating` to `@atlaskit/react-compiler-gating` only bumped the renamed package itself, so dependent packages were never republished and their published versions still referenced the old `@atlassian/react-compiler-gating` name, which is not available in the public npm registry. This minor bump republishes all affected packages with the corrected dependency. ### Patch Changes - Updated dependencies ## 4.0.1 ### Patch Changes - [`ee28cf33718b0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ee28cf33718b0) - Add @atlaskit/react-compiler-gating as a runtime dependency to enable React Compiler platform gating. - Updated dependencies ## 4.0.0 ### Major Changes - [`f2dc9097319f0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f2dc9097319f0) - ### Dropped support for _legacy_ Typescript 4 types. **Typescript 5 is now the new minimum**. Removes the `typesVersions` property and `dist/types-ts4.5` directory from the dist. Types are now exclusively via the `"types": "dist/types/index.d.ts"` property. ```diff - "typesVersions": { - ">=4.5 <4.9": { - "*": [ - "dist/types-ts4.5/*", - "dist/types-ts4.5/index.d.ts" - ] - } - }, ``` ### Patch Changes - Updated dependencies ## 3.1.0 ### Minor Changes - [`afbd895691509`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/afbd895691509) - Promote `@atlaskit/image` to general availability. ## 3.0.10 ### Patch Changes - Updated dependencies ## 3.0.9 ### Patch Changes - Updated dependencies ## 3.0.8 ### Patch Changes - [`02483200273ec`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/02483200273ec) - Enrol all Design System UI packages into the React Compiler with platform gating via isReactCompilerActivePlatform. - Updated dependencies ## 3.0.7 ### Patch Changes - Updated dependencies ## 3.0.6 ### Patch Changes - Updated dependencies ## 3.0.5 ### Patch Changes - Updated dependencies ## 3.0.4 ### Patch Changes - Updated dependencies ## 3.0.3 ### Patch Changes - Updated dependencies ## 3.0.2 ### Patch Changes - Updated dependencies ## 3.0.1 ### Patch Changes - Updated dependencies ## 3.0.0 ### Major Changes - [#130672](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/130672) [`c92554212ded6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c92554212ded6) - Migrated from `@emotion/react` to `@compiled/react` in order to improve performance, align with the rest of the Atlaskit techstack, and support React 18 Streaming SSR. Please note, in order to use this version of `@atlaskit/image`, you will need to ensure that your bundler is configured to handle `.css` imports correctly. Removed `--img-source` and `--img-source-dark` CSS variables and `content` CSS property from `<img>` since the `content` values were invalid before. Most bundlers come with built-in support for `.css` imports, 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 `.css` imports. For more information on the migration, please refer to [RFC-73 Migrating our components to Compiled CSS-in-JS](https://community.developer.atlassian.com/t/rfc-73-migrating-our-components-to-compiled-css-in-js/85953). ## 2.0.0 ### Major Changes - [#117363](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/117363) [`10a0f7f6c2027`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/10a0f7f6c2027) - This package's `peerDependencies` have been adjusted for `react` and/or `react-dom` to 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 ### Patch Changes - Updated dependencies ## 1.4.1 ### Patch Changes - Updated dependencies ## 1.4.0 ### Minor Changes - [#109060](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/109060) [`4660ec858a305`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4660ec858a305) - Update `React` from v16 to v18 ### Patch Changes - Updated dependencies ## 1.3.11 ### Patch Changes - [#108671](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/108671) [`6cfd20784a42b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6cfd20784a42b) - Update dev depdencies. ## 1.3.10 ### Patch Changes - Updated dependencies ## 1.3.9 ### Patch Changes - [#103999](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/103999) [`9f62ecec4d422`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9f62ecec4d422) - Update dependencies. - Updated dependencies ## 1.3.8 ### Patch Changes - Updated dependencies ## 1.3.7 ### Patch Changes - Updated dependencies ## 1.3.6 ### Patch Changes - Updated dependencies ## 1.3.5 ### Patch Changes - Updated dependencies ## 1.3.4 ### Patch Changes - [#166026](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/166026) [`962b5e77810fb`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/962b5e77810fb) - Adds side-effect config to support Compiled css extraction in third-party apps ## 1.3.3 ### Patch Changes - [#156266](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/156266) [`6029cf729997a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6029cf729997a) - Fixes an issue where images with invalid/not-found urls will be requested in an infinite loop - Updated dependencies ## 1.3.2 ### Patch Changes - Updated dependencies ## 1.3.1 ### Patch Changes - Updated dependencies ## 1.3.0 ### Minor Changes - [#110670](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/110670) [`c733254a2dd6e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c733254a2dd6e) - Explicitly set jsxRuntime to classic via pragma comments in order to avoid issues where jsxRuntime is implicitly set to automatic. ## 1.2.2 ### Patch Changes - Updated dependencies ## 1.2.1 ### Patch Changes - [#89307](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/89307) [`47cdc66371fb`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/47cdc66371fb) - [ux] Fix bug where images flickered in dark mode. Source URLs are now set based on the current theme before first paint. - Updated dependencies ## 1.2.0 ### Minor Changes - [#96499](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/96499) [`d9a3724cdeb8`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d9a3724cdeb8) - Add support for React 18 in non-strict mode. ## 1.1.7 ### Patch Changes - [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116) [`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) - Upgrade Typescript from `4.9.5` to `5.4.2` ## 1.1.6 ### Patch Changes - [#38487](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/38487) [`b2da5b33468`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b2da5b33468) - Documents that props like `css` and `className` are unsafe and will be deprecated in the future. ## 1.1.5 ### Patch Changes - [#36754](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/36754) [`4ae083a7e66`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4ae083a7e66) - Use `@af/accessibility-testing` for default jest-axe config and jest-axe import in accessibility testing. ## 1.1.4 ### Patch Changes - [#34853](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/34853) [`d0a020ae050`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d0a020ae050) - Basic accessibility unit tests with jest-axe ## 1.1.3 ### Patch Changes - [#32935](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/32935) [`b1bdec7cce2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b1bdec7cce2) - Internal change to enforce token usage for spacing properties. There is no expected visual or behaviour change. ## 1.1.2 ### Patch Changes - [#33793](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33793) [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8 ## 1.1.1 ### Patch Changes - [#33649](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33649) [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5` ## 1.1.0 ### Minor Changes - [#33258](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33258) [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump ### Patch Changes - Updated dependencies ## 1.0.4 ### Patch Changes - [#27634](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/27634) [`718d5ad3044`](https://bitbucket.org/atlassian/atlassian-frontend/commits/718d5ad3044) - Updates to support the new `@atlaskit/tokens` theming API. - Updated dependencies ## 1.0.3 ### Patch Changes - Updated dependencies ## 1.0.2 ### Patch Changes - Updated dependencies ## 1.0.1 ### Patch Changes - [#28081](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/28081) [`98f5ba36c98`](https://bitbucket.org/atlassian/atlassian-frontend/commits/98f5ba36c98) - Updates atlaskit/image thumbnails + descriptions for the website ## 1.0.0 ### Major Changes - [#28012](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/28012) [`bc74a5feb7d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/bc74a5feb7d) - This package is no longer experimental and the API is considered stable. Version contains no changes what so ever. ## 0.2.1 ### Patch Changes - [#27885](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/27885) [`c674eafa051`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c674eafa051) - Fixes a bug where the system preference would override the default behaviour when the color-mode was not set to auto. As a result, an OS setting of "dark" and a product setting of "light" would result in a "dark" image. ## 0.2.0 ### Minor Changes - [#27046](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/27046) [`8ab96dfc824`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8ab96dfc824) - Adds a new Image primitive that works like the native HTML img element, with the added functionality of being theme-aware. ## 0.1.0 - Create Image component with theme functionality.