MCPcopy Index your code
hub / github.com/Tahul/pinceau

github.com/Tahul/pinceau @0.20.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.20.1 ↗ · + Follow
224 symbols 548 edges 91 files 29 documented · 13%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Pinceau Cover

Pinceau

NPM version

Make your <script> lighter and your <style> smarter.

🎨 play.pinceau.dev🧑‍🎨 Documentation

⚙️ Install

npm i pinceau

Nuxt

// nuxt.config.js
export default defineNuxtConfig({
  modules: [
    'pinceau/nuxt',
  ],
  pinceau: {
    ...PinceauOptions
  }
})

Example: playground/

This module only works with Nuxt 3.

Vite

// vite.config.ts
import Pinceau from 'pinceau/vite'

export default defineConfig({
  plugins: [
    Pinceau(PinceauOptions),
  ],
})

Example: playground/_vite.config.ts

Create your theme

// tokens.config.ts
import { defineTheme } from 'pinceau'

export default defineTheme({
  // Media queries
  media: {
    mobile: '(min-width: 320px)',
    tablet: '(min-width: 768px)',
    desktop: '(min-width: 1280px)'
  },


  // Some Design tokens
  color: {
    red: {
      1: '#FCDFDA',
      2: '#F48E7C',
      3: '#ED4D31',
      4: '#A0240E',
      5: '#390D05',
    },
    green: {
      1: '#CDF4E5',
      2: '#9AE9CB',
      3: '#36D397',
      4: '#1B7D58',
      5: '#072117',
    }
  },
  space: {
    1: '0.25rem',
    2: '0.5rem',
    3: '0.75rem',
    4: '1rem'
  }

  // Utils properties
  utils: {
    px: (value: PropertyValue<'padding'>) => ({ paddingLeft: value, paddingRight: value }),
    py: (value: PropertyValue<'padding'>) => ({ paddingTop: value, paddingBottom: value })
  }
})

Example: playground/theme/tokens.config.ts

Learn more about Pinceau in the documentation].

💖 Credits

Thanks to these amazing people that helped me along the way:

This package takes a lot of inspiration from these amazing projects:

License

MIT License © 2022-PRESENT Yaël GUILLOUX


“All you need to paint is a few tools, a little instruction, and a vision in your mind.” • Bob Ross

Extension points exported contracts — how you extend this code

ModuleHooks (Interface)
(no doc)
src/index.ts
TokensFunctionOptions (Interface)
(no doc)
src/types/dt.ts
PropOptions (Interface)
(no doc)
src/transforms/vue/variants.ts
ModuleOptions (Interface)
(no doc)
src/index.ts
PinceauOptions (Interface)
(no doc)
src/types/index.ts
ComponentCustomProperties (Interface)
(no doc)
src/index.ts
DefaultThemeMap (Interface)
(no doc)
src/types/map.ts
NuxtHooks (Interface)
(no doc)
src/index.ts

Core symbols most depended-on inside this repo

message
called by 9
src/utils/logger.ts
expressionToAst
called by 6
src/utils/ast.ts
useDebugPerformance
called by 5
src/utils/debug.ts
get
called by 4
src/utils/data.ts
walkTokens
called by 4
src/utils/data.ts
normalizeConfig
called by 4
src/utils/data.ts
parseAst
called by 4
src/utils/ast.ts
fileLink
called by 4
src/utils/logger.ts

Shape

Function 189
Interface 34
Method 1

Languages

TypeScript100%

Modules by API surface

src/theme/context.ts12 symbols
src/runtime/features/theme.ts11 symbols
src/unplugin.ts10 symbols
src/runtime/features/stylesheet.ts10 symbols
src/utils/logger.ts8 symbols
src/transforms/vue/sfc.ts8 symbols
src/utils/css.ts7 symbols
src/types/config.ts7 symbols
src/transforms/vue/variants.ts7 symbols
src/theme/layers.ts7 symbols
src/theme/formats.ts7 symbols
src/theme/config.ts7 symbols

For agents

$ claude mcp add pinceau \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page