Releases: atlassian-labs/compiled
@compiled/react@0.21.2
Patch Changes
- 51925d5: Fix class component prop types under TypeScript 6.
ElementAttributesPropertyandElementChildrenAttributeare now declared as inline interfaces in theCompiledJSXnamespace rather than type aliases toJSX.ElementAttributesProperty/JSX.ElementChildrenAttribute. The aliases caused a circular reference when@compiled/reactis used asjsxImportSource(sinceJSXre-exportsCompiledJSX), which TypeScript 6 resolves differently — passing the class instance type toLibraryManagedAttributesinstead of the extracted props, making all class component props inaccessible in JSX.
@compiled/react@0.21.1
Patch Changes
- 9a805f7: Fix JSX namespace types compatibility with React 19.
CompiledJSX.LibraryManagedAttributesno longer delegates toReactJSXLibraryManagedAttributes, which caused a circular reference when used with React 19's@types/react. The type now directly intersects component props with{ key?: React.Key }, which works correctly for both React 18 and React 19.
@compiled/react@0.21.0
Minor Changes
- 8e70033: Add StyleContainerProvider to enable style injection into a custom DOM node (e.g. Shadow DOM) instead of document.head.
@compiled/eslint-plugin@0.19.2
Patch Changes
- 213e6d5: Use publishing registry from repo root
@compiled/codemods@0.10.1
Patch Changes
- 2992a96: Change to trigger new publishing flow
@compiled/css@0.21.1
Patch Changes
-
a990973: Add support for @position-try global at-rule
Added support for CSS
@position-tryat-rule (CSS Anchor Positioning Level 1) in Compiled's cssMap API. The@position-tryat-rule defines named fallback positions for CSS Anchor Positioning and is now correctly handled as a global at-rule, similar to@keyframes.What changed:
- Added
'position-try'to the ignored at-rules list inpackages/css/src/plugins/atomicify-rules.ts - This ensures
@position-tryrules are emitted globally without atomification or component scoping - Both nested and flat syntax styles are supported:
- Nested:
'@position-try': { '--name': { ... } } - Flat:
'@position-try --name': { ... }
- Nested:
Browser support:
- Chrome 125+ (May 2024)
- Firefox 131+ (Oct 2024)
- Safari 18.2+ (Dec 2024)
Example usage:
const styles = cssMap({ arrowBlockStart: { '@position-try --ds-arrow-block-start': { positionArea: 'block-start', margin: 0, marginBlockEnd: 'var(--ds-arrow-size, 8px)', }, }, });
Note: Type support for
@position-trywas already present via csstype 3.2.3 (added in #1867). This change completes the implementation by ensuring the CSS transformation correctly handles it as a global at-rule. - Added
@compiled/babel-plugin@0.39.1
Patch Changes
-
a990973: Add support for @position-try global at-rule
Added support for CSS
@position-tryat-rule (CSS Anchor Positioning Level 1) in Compiled's cssMap API. The@position-tryat-rule defines named fallback positions for CSS Anchor Positioning and is now correctly handled as a global at-rule, similar to@keyframes.What changed:
- Added
'position-try'to the ignored at-rules list inpackages/css/src/plugins/atomicify-rules.ts - This ensures
@position-tryrules are emitted globally without atomification or component scoping - Both nested and flat syntax styles are supported:
- Nested:
'@position-try': { '--name': { ... } } - Flat:
'@position-try --name': { ... }
- Nested:
Browser support:
- Chrome 125+ (May 2024)
- Firefox 131+ (Oct 2024)
- Safari 18.2+ (Dec 2024)
Example usage:
const styles = cssMap({ arrowBlockStart: { '@position-try --ds-arrow-block-start': { positionArea: 'block-start', margin: 0, marginBlockEnd: 'var(--ds-arrow-size, 8px)', }, }, });
Note: Type support for
@position-trywas already present via csstype 3.2.3 (added in #1867). This change completes the implementation by ensuring the CSS transformation correctly handles it as a global at-rule. - Added
-
Updated dependencies [a990973]
- @compiled/css@0.21.1
@compiled/webpack-loader@0.20.1
Patch Changes
- Updated dependencies [6429bfe]
- @compiled/babel-plugin@0.39.0
@compiled/vite-plugin@1.1.4
Patch Changes
- Updated dependencies [6429bfe]
- @compiled/babel-plugin@0.39.0
@compiled/react@0.20.0
Minor Changes
-
6429bfe: Bump csstype from 3.1.3 to 3.2.3 and add missing
@containersupport to cssMap validationUpdates csstype to the latest version which reflects the evolution of CSS standards. This change also fixes a bug where
@container(CSS Container Queries) was partially supported in CSS processing but was missing from the cssMap type validation lookup table.Removed at-rules:
@scroll-timeline- Abandoned CSS proposal; Scroll-driven Animations now useanimation-timelineproperty instead@viewport- Obsolete at-rule with no modern browser support; viewport configuration is now handled via meta tags and media queries
Added at-rules (with full support):
@container- CSS Container Queries (now fully validated in cssMap)@position-try- CSS Anchor Positioning@view-transition- View Transitions API
What changed:
- Updated csstype dependency to 3.2.3 across all packages
- Updated
AtRulestype mapping inpackages/babel-plugin/src/utils/css-map.tsto include the new at-rules and remove deprecated ones - Bumped to
minorfor@compiled/babel-plugindue to adding@containersupport to cssMap validation
Note: The
@scroll-timelineand@viewportat-rules are not used anywhere in the Compiled codebase, so this is not a breaking change.