Code Monkey home page Code Monkey logo

Comments (2)

blinpete avatar blinpete commented on June 12, 2024 2

yep, having the same problem right now.

That's bcoz of the missing utils field in defineTheme({}) config. Passing an empty object utils: {} doesn't work either.

Why it happens

Seems like Pinceau generates wrong node_modules/.vite/pinceau/utils.ts file in this case:

import { PinceauTheme, PropertyValue } from 'pinceau'

export const utils = undefined

export type GeneratedPinceauUtils = typeof utils

export default utils

And then CssFunctionType takes GeneratedPinceauUtils as a generic and returns never.

Workaround

You can set a padding utility or anything else:

defineTheme({
  ...,

  utils: {
    px: (value: PropertyValue<"padding">) => ({
      paddingLeft: value,
      paddingRight: value,
    }),
  },
})

Make sure to restart your dev server (to trigger pinceau rebuild) and Vue/TS server after this.

from pinceau.

Tahul avatar Tahul commented on June 12, 2024 1

Hello @agenordebriat and @blinpete ;

Thank you so much for your interest in Pinceau, I'm really glad to hear that.

I'm currently working on #95 ; that will greatly improve the situation concerning typing support.

As for now, I can confirm the bug you mention is fixed in my current workspace.

I will close this issue once the PR gets merged, happy to get your feedpack on upcoming 1.0 release!

from pinceau.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.