@tsuki/icons-svelte (0.1.0)
Installation
@tsuki:registry=https://git.d-v.cc/api/packages/tsuki/npm/npm install @tsuki/icons-svelte@0.1.0"@tsuki/icons-svelte": "0.1.0"About this package
@tsuki/icons-svelte
Lucide icons, pre-configured for the tsuki design system: 20 px default size, 1.5 px stroke, currentColor fill. Bundles @lucide/svelte as a regular dependency so consumers only install one package.
Install
# .npmrc
@tsuki:registry=https://git.d-v.cc/api/packages/tsuki/npm/
//git.d-v.cc/api/packages/tsuki/npm/:_authToken=${GITEA_NPM_READ_TOKEN}
pnpm add @tsuki/icons-svelte
Use
<script>
import { Icon, ChevronDown, Settings } from '@tsuki/icons-svelte';
</script>
<Icon icon={ChevronDown} />
<Icon icon={Settings} size={24} />
<Icon icon={ChevronDown} strokeWidth={2} color="#9B3C30" />
All Lucide icons are re-exported by name. Any LucideProps prop can be overridden per-icon (size, strokeWidth, color, class, aria-label, etc.).
Defaults
| Prop | Default | Tsuki rationale |
|---|---|---|
size |
20 |
Standard UI size from the brief |
strokeWidth |
1.5 |
Hairline aesthetic — Lucide ships 2 by default |
color |
currentColor |
Icons inherit text color, no colored chrome |
Tree-shaking
Importing only what you use is the whole point. With sideEffects: false and Lucide's per-icon entry files, a bundler that includes only ChevronDown and Settings will ship around 350 bytes of JS for the icon plumbing — not the ~150 KB it would take to bundle all ~1500 icons.
A regression test (src/bundle-size.test.ts) builds a 2-icon entry with esbuild + a stub .svelte loader and fails if the emitted bundle creeps past 2 KB.
Develop
pnpm install
pnpm build # svelte-package -> dist/
pnpm test # Icon behavior + tree-shaking guard
pnpm check # svelte-check
Releasing
export GITEA_NPM_TOKEN=<your-gitea-personal-access-token>
pnpm install
pnpm test
pnpm build
npm version <patch|minor|major>
npm publish # honors publishConfig.registry
git push --follow-tags
The repo's .npmrc reads GITEA_NPM_TOKEN from the environment — never commit the token. The publishConfig.registry in package.json pins the publish target.
License
@lucide/svelte is ISC. Tsuki's wrapper itself has no license declared at v0.1 (internal use).
Dependencies
Dependencies
| ID | Version |
|---|---|
| @lucide/svelte | 1.16.0 |
Development Dependencies
| ID | Version |
|---|---|
| @sveltejs/package | ^2.3.7 |
| @sveltejs/vite-plugin-svelte | ^7.0.0 |
| @testing-library/svelte | ^5.2.4 |
| esbuild | ^0.24.0 |
| jsdom | ^25.0.0 |
| svelte | ^5.0.0 |
| svelte-check | ^4.0.0 |
| typescript | ^5.6.0 |
| vite | ^7.0.0 |
| vitest | ^4.0.0 |
Peer Dependencies
| ID | Version |
|---|---|
| svelte | ^5.0.0 |