{"_id":"@antoineguglielmi/tw-typeface","_rev":"4-4d61ada472f2645ffebb89ed982bc7eb","name":"@antoineguglielmi/tw-typeface","dist-tags":{"latest":"0.0.5"},"versions":{"0.0.1":{"name":"@antoineguglielmi/tw-typeface","version":"0.0.1","keywords":["tailwindcss","typescript","typeface"],"author":{"name":"Antoine Guglielmi"},"license":"MIT","_id":"@antoineguglielmi/tw-typeface@0.0.1","maintainers":[{"name":"antoineguglielmi","email":"contact.antoine.guglielmi@gmail.com"}],"dist":{"shasum":"70e1fc8d008cabd1cc58f1e89684f6552491d2d6","tarball":"https://registry.npmjs.org/@antoineguglielmi/tw-typeface/-/tw-typeface-0.0.1.tgz","fileCount":5,"integrity":"sha512-g32Dpt7al+PWWb5+blS0DMP4mR6Pi2jddTnqFtPBIR2s+QnB6qvDg9iG1JOglgerEorCADG1ZmHH0XWvyWBzKA==","signatures":[{"sig":"MEYCIQDHqUOyQd0Uz3MH3sASjtWhhwDODHBA4S1xuZg8qNjK3wIhAKcFIpcu40QgZeNQtAmY/kI71jbyOODYLF3Q3K+0UPF0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3085},"main":"dist/typeface.js","types":"dist/typeface.d.ts","scripts":{"build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"antoineguglielmi","email":"contact.antoine.guglielmi@gmail.com"},"_npmVersion":"10.8.3","description":"A typeface customization","directories":{},"_nodeVersion":"20.11.0","_hasShrinkwrap":false,"devDependencies":{"postcss":"^8.4.49","typescript":"^5.0.0","tailwindcss":"^3.4.15","autoprefixer":"^10.4.20"},"_npmOperationalInternal":{"tmp":"tmp/tw-typeface_0.0.1_1732021064861_0.21959133551119603","host":"s3://npm-registry-packages"}},"0.0.2":{"name":"@antoineguglielmi/tw-typeface","version":"0.0.2","keywords":["tailwindcss","typescript","typeface"],"author":{"name":"Antoine Guglielmi"},"license":"MIT","_id":"@antoineguglielmi/tw-typeface@0.0.2","maintainers":[{"name":"antoineguglielmi","email":"contact.antoine.guglielmi@gmail.com"}],"dist":{"shasum":"c4cd695495e8839527467bd5c6dbba491308a764","tarball":"https://registry.npmjs.org/@antoineguglielmi/tw-typeface/-/tw-typeface-0.0.2.tgz","fileCount":3,"integrity":"sha512-Ss5RX4/VadwMBg6LvM/dNkVCkjMJrNVESp/ar6+fXJp9M7+VkYSP9H9Bkvo0jC4ArTKdvpVNptSqBIVLvR1gww==","signatures":[{"sig":"MEYCIQDjdQESjDBur38oH4jZyDFlrBW95AEApBeORIjYF5pIlAIhAMrPO2EeYMimMyx4nBzKkJD+u050N6mFEnq3JZ1N5JN+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1881},"main":"dist/typeface.js","types":"dist/typeface.d.ts","scripts":{"build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"antoineguglielmi","email":"contact.antoine.guglielmi@gmail.com"},"_npmVersion":"10.8.3","description":"A typeface customization","directories":{},"_nodeVersion":"20.11.0","_hasShrinkwrap":false,"devDependencies":{"postcss":"^8.4.49","typescript":"^5.0.0","tailwindcss":"^3.4.15","autoprefixer":"^10.4.20"},"_npmOperationalInternal":{"tmp":"tmp/tw-typeface_0.0.2_1732021130956_0.15137755640303907","host":"s3://npm-registry-packages"}},"0.0.3":{"name":"@antoineguglielmi/tw-typeface","version":"0.0.3","keywords":["tailwindcss","typescript","typeface"],"author":{"name":"Antoine Guglielmi"},"license":"MIT","_id":"@antoineguglielmi/tw-typeface@0.0.3","maintainers":[{"name":"antoineguglielmi","email":"contact.antoine.guglielmi@gmail.com"}],"dist":{"shasum":"f94c8be0c16f9123ac0b2ee2cd86718e4d909565","tarball":"https://registry.npmjs.org/@antoineguglielmi/tw-typeface/-/tw-typeface-0.0.3.tgz","fileCount":4,"integrity":"sha512-Wt/7ECqY5xnOb0leTg7xGz37yl37IB3qyLdBGQ0vuE13VX8SXcY0zAl/ej252B1CtrJzS8kVZwyqVgsMU3ympQ==","signatures":[{"sig":"MEQCIDsf3RqDvrq7m7dxHPwIdP05o8L/b3VBreaAQUqWcJvdAiAIQevjKei1hS4+iBZ4sUoaWPvWYZLum7YrlpeD8KuPuw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2606},"main":"dist/typeface.js","types":"dist/tailwindcss.d.ts","gitHead":"d4aef9fe3a1f4fb1974ca0e3b1ed6167ae137617","scripts":{"build":"tsc","postbuild":"cp src/tailwindcss.d.ts dist/","prepublishOnly":"npm run build"},"_npmUser":{"name":"antoineguglielmi","email":"contact.antoine.guglielmi@gmail.com"},"_npmVersion":"10.8.3","description":"A typeface customization","directories":{},"_nodeVersion":"20.11.0","_hasShrinkwrap":false,"devDependencies":{"postcss":"^8.4.49","typescript":"^5.0.0","tailwindcss":"^3.4.15","autoprefixer":"^10.4.20"},"_npmOperationalInternal":{"tmp":"tmp/tw-typeface_0.0.3_1732029140637_0.8090749497100389","host":"s3://npm-registry-packages"}},"0.0.4":{"name":"@antoineguglielmi/tw-typeface","version":"0.0.4","keywords":["tailwindcss","typescript","typeface"],"author":{"name":"Antoine Guglielmi"},"license":"MIT","_id":"@antoineguglielmi/tw-typeface@0.0.4","maintainers":[{"name":"antoineguglielmi","email":"contact.antoine.guglielmi@gmail.com"}],"dist":{"shasum":"ec0e761ebc0d465ee9d5adc71793a3497df045b3","tarball":"https://registry.npmjs.org/@antoineguglielmi/tw-typeface/-/tw-typeface-0.0.4.tgz","fileCount":4,"integrity":"sha512-So3dWKnzLnsp1TRnpw4VTk888ST0vuj+77Rea11aHD4oy3ONjeiig9gPtPEEJJcgUiDC9Z+G3EYBlxftpElu2w==","signatures":[{"sig":"MEUCIFV+cRlCCRyUDmoTPw1Z3ih7a5aP8Q21V+QPubM1XeQTAiEA+GIR3ZRN/iprPpZXBgIlYqeOKJL3hFDIEafJPmfvAZs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6458},"main":"dist/typeface.js","types":"dist/typeface.d.ts","gitHead":"3a2c4229db013036b5943895de175b04b13763d6","scripts":{"build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"antoineguglielmi","email":"contact.antoine.guglielmi@gmail.com"},"_npmVersion":"10.8.3","description":"A typeface customization","directories":{},"_nodeVersion":"20.11.0","_hasShrinkwrap":false,"devDependencies":{"postcss":"^8.4.49","typescript":"^5.0.0","tailwindcss":"^3.4.15","autoprefixer":"^10.4.20"},"_npmOperationalInternal":{"tmp":"tmp/tw-typeface_0.0.4_1732096053531_0.6439559808438462","host":"s3://npm-registry-packages"}},"0.0.5":{"name":"@antoineguglielmi/tw-typeface","version":"0.0.5","description":"A typeface customization","main":"dist/typeface.js","types":"dist/typeface.d.ts","scripts":{"build":"tsc","prepublishOnly":"npm run build"},"keywords":["tailwindcss","typescript","typeface"],"author":{"name":"Antoine Guglielmi"},"license":"MIT","devDependencies":{"autoprefixer":"^10.4.20","postcss":"^8.4.49","tailwindcss":"^3.4.15","typescript":"^5.0.0"},"_id":"@antoineguglielmi/tw-typeface@0.0.5","gitHead":"3a2c4229db013036b5943895de175b04b13763d6","_nodeVersion":"20.11.0","_npmVersion":"10.8.3","dist":{"integrity":"sha512-5m809/L6kEeY8KUAU2J+dzXra38OSKdUfXixhszBS2Ty+ftTrtlPl2xfm+O+AtxQWVh2T/RPihnTmusmkOyBMw==","shasum":"823f299739d64ac01e3947be9e014bd17cd278c7","tarball":"https://registry.npmjs.org/@antoineguglielmi/tw-typeface/-/tw-typeface-0.0.5.tgz","fileCount":4,"unpackedSize":7048,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCSDD52SuQopO/9BrKgE7ZKX86diWmYpkAxeoXO3Rxe9gIhAPcFv+FnYq9Eo+ZULCSR8ootJtYtWCk6cOV4gqbiKqx3"}]},"_npmUser":{"name":"antoineguglielmi","email":"contact.antoine.guglielmi@gmail.com"},"directories":{},"maintainers":[{"name":"antoineguglielmi","email":"contact.antoine.guglielmi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tw-typeface_0.0.5_1732226362522_0.4002013153856465"},"_hasShrinkwrap":false}},"time":{"created":"2024-11-19T12:57:44.770Z","modified":"2024-11-21T21:59:22.902Z","0.0.1":"2024-11-19T12:57:45.112Z","0.0.2":"2024-11-19T12:58:51.110Z","0.0.3":"2024-11-19T15:12:20.835Z","0.0.4":"2024-11-20T09:47:33.695Z","0.0.5":"2024-11-21T21:59:22.721Z"},"author":{"name":"Antoine Guglielmi"},"license":"MIT","keywords":["tailwindcss","typescript","typeface"],"description":"A typeface customization","maintainers":[{"name":"antoineguglielmi","email":"contact.antoine.guglielmi@gmail.com"}],"readme":"# @antoineguglielmi/tw-typeface\n\nA **TailwindCSS** typeface customizer.\n\n## Basic usage\n\n```bash\nnpm i @antoineguglielmi/tw-typeface\n```\n\nThen in `tailwind.config.ts` file:\n\n```typescript\nimport { typeface, defineTypeface } from '@antoineguglielmi/tw-typeface'\n\nexport default {\n  content: [\n    './src/pages/**/*.{js,ts,jsx,tsx,mdx}',\n    './src/components/**/*.{js,ts,jsx,tsx,mdx}',\n    './src/app/**/*.{js,ts,jsx,tsx,mdx}',\n  ],\n  theme: {\n    extend: {\n      typeface: defineTypeface({\n        'heading-main': {\n          fontFamily: 'var(--font-heading)',\n          fontSize: 'lg-3',\n        },\n      }),\n    },\n  },\n\n  plugins: [typeface()],\n} satisfies Config\n```\n\nYou can define a custom `configKey`:\n\n```typescript\nimport { typeface, defineTypeface } from '@antoineguglielmi/tw-typeface'\n\nexport default {\n  content: [\n    './src/pages/**/*.{js,ts,jsx,tsx,mdx}',\n    './src/components/**/*.{js,ts,jsx,tsx,mdx}',\n    './src/app/**/*.{js,ts,jsx,tsx,mdx}',\n  ],\n  theme: {\n    extend: {\n      // The custom configKey is used here to define typefaces\n      myTypefaceKey: defineTypeface({\n        'heading-main': {\n          fontFamily: 'var(--font-heading)',\n          fontSize: 'lg-3',\n        },\n      }),\n    },\n  },\n\n  plugins: [typeface({ configKey: 'myTypefaceKey' })],\n} satisfies Config\n```\n\nBy default, the plugin defines a typeface `body`:\n\n```typescript\ndefineTypeface({\n  body: {\n    fontFamily: 'var(--font-nunito)',\n    fontSize: 'base',\n    fontWeight: '400',\n    lineHeight: '1.5',\n  },\n})\n```\n\n## `defineTypeface`\n\nThe `defineTypeface` function is not mandatory but provides autocompletion, providing a better developer experience.\n\n## How to define a typeface\n\nYou can define a typeface with 6 properties:\n\n### `extends`\n\nBy defining the key `extends`, you can copy the style from another typeface and override some styles. Provide, as a `string`, the key of the typeface you want to extend from, then set properties you want to override:\n\n```typescript\ndefineTypeface({\n  'body-small': {\n    extends: 'body',\n    fontSize: 'sm-1',\n  },\n})\n```\n\n### `fontFamily`,`fontSize`,`lineHeight`,`letterSpacing`,`fontWeight`\n\nYou can set the font family, size, weight, the letter spacing and line height:\n\n```typescript\n{\n    extends?: string\n    fontFamily?: string // Can be a css variable or a css value\n    fontSize?: string // Can be a key of the spacings value or a css value\n    lineHeight?: string | number\n    letterSpacing?: string\n    fontWeight?:\n      | '100'\n      | '200'\n      | '300'\n      | '400'\n      | '500'\n      | '600'\n      | '700'\n      | '800'\n      | '900'\n  }\n```\n","readmeFilename":"README.md"}