Skip to content

Releases: jonambas/panda-plugin-ct

v0.1.2

11 Apr 00:24
Compare
Choose a tag to compare

What's Changed

Fixes a linting error from the generated ct.d.ts file


  • chore(deps): update dependency typescript to v5.4.5 by @renovate in #23
  • test: add e2e tests by @jonambas in #25
  • chore(deps): pin dependency @pandabox/unplugin to 0.1.3 by @renovate in #26
  • chore: disable macro, update workflow titles by @jonambas in #27
  • chore(deps): update dependency node to v20.12.2 by @renovate in #24
  • fix(codegen): fix missing initializer error by @jonambas in #28

Full Changelog: v0.1.1...v0.1.2

v0.1.1

09 Apr 14:53
Compare
Choose a tag to compare

What's Changed

Fixes a types issue when using transform with unplugin.

Full Changelog: v0.1.0...v0.1.1

v0.1.0

09 Apr 13:48
Compare
Choose a tag to compare

What's Changed

Adds a transformer to remove the plugin's JS runtime using @pandabox/unplugin. Your bundler's config will need to be modified to achieve this.

Example Next.js config:

import unplugin from '@pandabox/unplugin';
import { transform } from 'panda-plugin-ct';

// Your token object
// This should be the same as the object you supplied to the Panda plugin
const tokens = {};

/** @type {import('next').NextConfig} */
const nextConfig = {
  reactStrictMode: true,
  webpack: (config) => {
    config.plugins.push(
      unplugin.webpack({
        transform: transform(tokens),
        optimizeJs: true, // Optional, this will replace other Panda runtime functions (css, cva, etc)
      }),
    );
    return config;
  },
};

export default nextConfig;
  • fix(codegen): match file extensions by @jonambas in #19
  • feat(transformer): add JS runtime transformer for @pandabox/unplugin by @jonambas in #21

Full Changelog: v0.0.7...v0.1.0

v0.0.7

07 Apr 17:03
Compare
Choose a tag to compare

What's Changed

Adds return type hints to the plugin's generated ct function.

Screenshot 2024-04-07 at 1 02 48 PM
  • feat(codegen): add ct return value hints by @jonambas in #16
  • refactor(codegen): simplify return value hints by @jonambas in #17

Full Changelog: v0.0.6...v0.0.7

v0.0.6

07 Apr 16:17
Compare
Choose a tag to compare

What's Changed

Adds debug logging, enabled with logLevel: 'debug' in your panda.config.ts

Full Changelog: v0.0.5...v0.0.6

v0.0.5

07 Apr 04:52
Compare
Choose a tag to compare

What's Changed

Panda codegen now generates individual ct.mjs and ct.d.ts files instead of appending to Panda's files.

Adds support for aliased imports, such as:

import { ct as foo } from '@/styled-system/css';
  • feat(parser): add support for import aliases by @jonambas in #13
  • refactor(codegen): generate separate ct files by @jonambas in #14
  • chore(deps): pin dependency node to 20.12.1 by @renovate in #12

Full Changelog: v0.0.4...v0.0.5

v0.0.4

06 Apr 17:10
Compare
Choose a tag to compare

What's Changed

Improves runtime performance by pre-generating alias token paths into a Map on panda codegen. Runtime ct() calls no longer have to traverse the plugin's token object.

  • refactor: improve runtime alias lookups by @jonambas in #9
  • fix: remove uneeded JSON.parse, add codegen banner by @jonambas in #10
  • refactor: reuse isObject in isObjectWithValue by @jonambas in #11

Full Changelog: v0.0.3...v0.0.4

v0.0.3

05 Apr 22:41
Compare
Choose a tag to compare

What's Changed

Adds support for aliases to Panda style objects:

pluginComponentTokens({
  foo: { value: { base: 'red.100', lg: 'white' }}
})

ct('foo') // -> { base: 'red.100', lg: 'white' }
  • refactor: move ts-morph project to context, remove import traversal by @jonambas in #1
  • feat: support aliases to style objects by @jonambas in #2
  • fix(deps): pin dependencies by @renovate in #4
  • fix(deps): update dependency @pandacss/types to v0.37.2 by @renovate in #6
  • chore: add typecheck command by @jonambas in #7
  • chore(deps): move @pandacss/types and typescript to dev deps by @jonambas in #8

New Contributors

Full Changelog: v0.0.2...v0.0.3