compiled

A familiar and performant compile time CSS-in-JS library for React.

APACHE-2.0 License

Downloads
186.9K
Stars
2K
Committers
46

Bot releases are visible (Hide)

compiled - @compiled/[email protected]

Published by atlas-dst-bot almost 3 years ago

Patch Changes

  • 8c9ab8c: Update homepage and other package.json properties
compiled - @compiled/[email protected]

Published by atlas-dst-bot almost 3 years ago

Patch Changes

  • 8c9ab8c: Update homepage and other package.json properties
compiled - @compiled/[email protected]

Published by atlas-dst-bot almost 3 years ago

Patch Changes

  • c092daf: Bumping dependencies via Renovate
compiled - @compiled/[email protected]

Published by atlas-dst-bot almost 3 years ago

Patch Changes

  • dedadbb: The jsx-pragma rule now removes the default react import when moving to the automatic runtime and it isn't used.
compiled - @compiled/[email protected]

Published by atlas-dst-bot almost 3 years ago

Patch Changes

  • 79cfb08: Internal refactor changing how the TypeScript compiler picks up source files.
compiled - @compiled/[email protected]

Published by atlas-dst-bot almost 3 years ago

Patch Changes

  • 427cead: Compiled now supports turning on the css prop using jsx pragmas (both with @jsx and @jsxImportSource).
  • Updated dependencies [79cfb08]
  • Updated dependencies [14368bb]
  • Updated dependencies [68ebac3]
  • Updated dependencies [427cead]
  • Updated dependencies [79cfb08]
compiled - @compiled/[email protected]

Published by atlas-dst-bot almost 3 years ago

Patch Changes

  • 79cfb08: Compiled will no longer try to traverse modules boundaries of its own.
  • 14368bb: Fix issue where a styled value function using both object destructuring and a template literal in at least one branch resulted in a CSS error
  • 68ebac3: Add support for namespace imports and export specifiers
  • 427cead: Compiled now supports turning on the css prop using jsx pragmas (both with @jsx and @jsxImportSource).
  • 79cfb08: Internal refactor changing how the TypeScript compiler picks up source files.
  • Updated dependencies [79cfb08]
compiled - @compiled/[email protected]

Published by atlas-dst-bot almost 3 years ago

Patch Changes

  • 79cfb08: Internal refactor changing how the TypeScript compiler picks up source files.
compiled - @compiled/[email protected]

Published by atlas-dst-bot almost 3 years ago

Patch Changes

  • 79cfb08: Internal refactor changing how the TypeScript compiler picks up source files.
  • Updated dependencies [79cfb08]
compiled - @compiled/[email protected]

Published by atlas-dst-bot almost 3 years ago

Patch Changes

  • 79cfb08: Internal refactor changing how the TypeScript compiler picks up source files.
  • Updated dependencies [79cfb08]
compiled - @compiled/[email protected]

Published by atlas-dst-bot almost 3 years ago

Patch Changes

  • 427cead: Compiled now supports turning on the css prop using jsx pragmas (both with @jsx and @jsxImportSource).
  • 79cfb08: Internal refactor changing how the TypeScript compiler picks up source files.
  • 79cfb08: Compiled's CSS loader now uses referential equality instead of pathname to determine if it needs to re-order itself from the last to first.
  • Updated dependencies [79cfb08]
  • Updated dependencies [14368bb]
  • Updated dependencies [68ebac3]
  • Updated dependencies [427cead]
  • Updated dependencies [79cfb08]
compiled - @compiled/[email protected]

Published by atlas-dst-bot almost 3 years ago

Minor Changes

  • 427cead: Breaking change: When using the css prop with TypeScript you now need to declare a JSX pragma enabling types for that module. Previously when importing the @compiled/react package the global JSX namespace would be polluted as a side effect potentially causing collisions with other CSS-in-JS libraries. Now thanks to the use of locally scoped JSX namespaces the global JSX namespace will no longer be polluted.

    As an added bonus the css prop will only be available on JSX elements that have also defined a className prop with the potential for more type safe features later on.

    Make sure to update @compiled/babel-plugin, @compiled/webpack-loader, and @compiled/parcel-transformer to latest when adopting this change.

    Automatic runtime

    -import '@compiled/react';
    +/** @jsxImportSource @compiled/react */
    
    <div css={{ display: 'block' }} />;
    

    Classic runtime

    -import '@compiled/react';
    +/** @jsx jsx */
    +import { jsx } from '@compiled/react';
    
    <div css={{ display: 'block' }} />;
    

    To aid consumers in adopting this change easily, a new ESLint rule jsx-pragma has been created which will automatically migrate you to use a JSX pragma if missing when running with --fix. The rule takes an option to configure the runtime (either classic or automatic) and defaults to automatic.

    npm i @compiled/eslint-plugin
    
    {
      "rules": {
        "@compiled/jsx-pragma": ["error", { "runtime": "classic" }]
      }
    }
    

Patch Changes

  • 79cfb08: Internal refactor changing how the TypeScript compiler picks up source files.
compiled - @compiled/[email protected]

Published by atlas-dst-bot almost 3 years ago

Patch Changes

  • 79cfb08: Internal refactor changing how the TypeScript compiler picks up source files.
compiled - @compiled/[email protected]

Published by atlas-dst-bot almost 3 years ago

Minor Changes

  • f203635: Renames emotion-to-compiled rule to no-emotion-css.

Patch Changes

  • f203635: The no-emotion-css rule now keeps the jsx pragma around if defined.
  • f203635: The no-emotion-css rule now will check for jsxImportSource pragma usage with a supplementary fixer.
  • 1a9e503: Adds jsx-pragma rule,
    useful when working with the css prop.
    When enabled it will error when the jsx pragma is missing or when using the wrong pragma for the configured runtime.
  • 79cfb08: Package now built with project references.
  • 79cfb08: Internal refactor changing how the TypeScript compiler picks up source files.
compiled - @compiled/[email protected]

Published by atlas-dst-bot almost 3 years ago

Patch Changes

  • 44ba755: Update dependencies
compiled - @compiled/[email protected]

Published by atlas-dst-bot almost 3 years ago

Patch Changes

  • Updated dependencies [e015a3a]
  • Updated dependencies [fa6af90]
compiled - @compiled/[email protected]

Published by atlas-dst-bot almost 3 years ago

Patch Changes

  • 4309aaa: Patch inexact flow type on styled
compiled - @compiled/[email protected]

Published by atlas-dst-bot almost 3 years ago

Minor Changes

  • fa6af90: Add support for nested ternary operators. Additionally, Compiled will no longer transform ternaries into logical statements unless one side is undefined.

Patch Changes

  • e015a3a: Add comment directive // @compiled-disable(-next)-line) transform-css-prop to disable Compiled processing on CSS prop
compiled - @compiled/[email protected]

Published by atlas-dst-bot almost 3 years ago

Patch Changes

  • Updated dependencies [e015a3a]
  • Updated dependencies [fa6af90]
compiled - @compiled/[email protected]

Published by atlas-dst-bot almost 3 years ago

Patch Changes

  • b6263ae: Add support for keyframes import from @emotion/core and @emotion/react with alphabetical sorting