{"_id":"@1-week/trayicon-bun","_rev":"5-7d835763f890a10312826ff07383fa02","name":"@1-week/trayicon-bun","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.1":{"name":"@1-week/trayicon-bun","version":"0.1.1","keywords":["trayicon","systray","bun","windows"],"author":{"name":"1-week","email":"bayeszou@gmail.com"},"license":"MIT","_id":"@1-week/trayicon-bun@0.1.1","maintainers":[{"name":"1-week","email":"bayeszou@gmail.com"}],"dist":{"shasum":"8d470d707fdbe88db66bf1e2fa4ff024dcc14f82","tarball":"https://registry.npmjs.org/@1-week/trayicon-bun/-/trayicon-bun-0.1.1.tgz","fileCount":6,"integrity":"sha512-nJ15cxaPo0X4pTPzhLQ1cgOJoN2jAqVnsKgsR9ni46QQ7Vz7gTEnaGp8sHx8RPP+Dlmv+3uSHvvVIsne5zSDqw==","signatures":[{"sig":"MEUCIGyLf2uF822XGuLB308uoOx6hDa3RbkZgF+gJNl4ZpYBAiEAgXdownAb4iFyOPKMQ8GDYHFW9BHjjDSIvy7twxQ6Xx8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":48611},"main":"index.ts","type":"module","types":"index.ts","exports":{".":{"types":"./index.ts","import":"./index.ts"}},"gitHead":"241f3252269683ab79c84dddfed421c08f6a7970","scripts":{"test":"bun test","build":"bun build index.ts --target=bun --outdir dist"},"_npmUser":{"name":"1-week","email":"bayeszou@gmail.com"},"_npmVersion":"11.12.1","description":"Fork of trayicon by 131, rewritten natively for Bun by 1-week","directories":{},"_nodeVersion":"24.15.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/trayicon-bun_0.1.1_1779120057332_0.08087609494247183","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@1-week/trayicon-bun","version":"0.1.2","keywords":["trayicon","systray","bun","windows"],"author":{"name":"1-week","email":"bayeszou@gmail.com"},"license":"MIT","_id":"@1-week/trayicon-bun@0.1.2","maintainers":[{"name":"1-week","email":"bayeszou@gmail.com"}],"dist":{"shasum":"567f072c298b0f24855e474e4ff82c009edcd17b","tarball":"https://registry.npmjs.org/@1-week/trayicon-bun/-/trayicon-bun-0.1.2.tgz","fileCount":6,"integrity":"sha512-x49O/wiEyfOBxxKm4me3xLk4EHcv6cQGOeW5B75FUVPQGbgXlAaPqiq7WxWN/eZLIxg49clXetc0O+81tFPWZw==","signatures":[{"sig":"MEQCICb5BDu5qp8Z1m57VZl0B8RY3aLYAfsSVtvm5MwEhEzBAiB3NuiJOP7OXNbkZExdRbRG3CBkJ2JzM8KZdsdFayZlPA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49053},"main":"index.ts","type":"module","types":"index.ts","exports":{".":{"types":"./index.ts","import":"./index.ts"}},"gitHead":"2a956e4614768b92a816b3be0a25744ee9ff4683","scripts":{"test":"bun test","build":"bun build index.ts --target=bun --outdir dist"},"_npmUser":{"name":"1-week","email":"bayeszou@gmail.com"},"_npmVersion":"11.12.1","description":"Fork of trayicon by 131, rewritten natively for Bun by 1-week","directories":{},"_nodeVersion":"24.15.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/trayicon-bun_0.1.2_1779121443044_0.9717870965007611","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@1-week/trayicon-bun","version":"0.1.3","author":{"name":"1-week","email":"bayeszou@gmail.com"},"main":"index.ts","exports":{".":{"import":"./index.ts","types":"./index.ts"}},"description":"Fork of trayicon by 131, rewritten natively for Bun by 1-week","keywords":["trayicon","systray","bun","windows"],"license":"MIT","publishConfig":{"access":"public"},"scripts":{"test":"bun test","build":"bun build index.ts --target=bun --outdir dist"},"type":"module","types":"index.ts","gitHead":"0806a7de48ea63fc2e6db39af40eaf5cca411705","_id":"@1-week/trayicon-bun@0.1.3","_nodeVersion":"24.15.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-zcKJ/d+oJlayTBZypKUu4JJOm09qUH244f9XH0A4pK2uXock4dtbNZMKTXOss0zBm/PfG+NkMr0LQotfKTPzoA==","shasum":"83449a26eee20dffc963916639a15434a5fa0c9d","tarball":"https://registry.npmjs.org/@1-week/trayicon-bun/-/trayicon-bun-0.1.3.tgz","fileCount":6,"unpackedSize":48676,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBHydp4P8JLdFvEk5fbBclCE3sSDwQbc4biJz4Qc+rYAAiBEoQ+CIjiUVCBRDNQTKE6aQf7zEybUsmhK40Lewal1JA=="}]},"_npmUser":{"name":"1-week","email":"bayeszou@gmail.com"},"directories":{},"maintainers":[{"name":"1-week","email":"bayeszou@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/trayicon-bun_0.1.3_1779160649257_0.15010763461217325"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-18T16:00:57.215Z","modified":"2026-05-19T03:17:29.503Z","0.1.0":"2026-05-18T14:18:24.418Z","0.1.1":"2026-05-18T16:00:57.522Z","0.1.2":"2026-05-18T16:24:03.229Z","0.1.3":"2026-05-19T03:17:29.398Z"},"author":{"name":"1-week","email":"bayeszou@gmail.com"},"license":"MIT","keywords":["trayicon","systray","bun","windows"],"description":"Fork of trayicon by 131, rewritten natively for Bun by 1-week","maintainers":[{"name":"1-week","email":"bayeszou@gmail.com"}],"readme":"# trayicon-bun\n\nWindows system tray library **built natively for Bun**. Forked from [trayicon](https://github.com/131/trayicon) and redesigned to take full advantage of Bun's runtime APIs.\n\n> **v2 is Bun-native.** If you need Node.js compatibility, use v1.x.\n\n## What's different from the original\n\n- **Bun-native APIs**: Uses `Bun.listen()`, `Bun.spawn()`, `Bun.file()`, `Bun.write()`, and `Bun.CryptoHasher` instead of Node.js `net`, `child_process`, and `fs`.\n- **TypeScript source**: Written in `.ts` and runs directly with Bun — no build step needed.\n- **ESM only**: Pure ESM package, no CommonJS.\n- **Zero dependencies**: Removed the `debug` npm package entirely.\n- **`bun --compile` compatible**: Multi-path resolution for `trayicon.exe` and support for temp-dir execution.\n\n## Requirements\n\n- [Bun](https://bun.sh) >= 1.0\n- Windows (relies on `trayicon.exe`)\n\n## Installation\n\n```bash\nbun add @1-week/trayicon-bun\n```\n\n## Usage\n\n```typescript\nimport { Tray } from \"@1-week/trayicon-bun\";\n\nconst tray = await Tray.create({\n  title: \"My App\",\n  useTempDir: true,\n});\n\ntray.setMenu(\n  tray.item(\"Say Hello\", () => console.log(\"Hello\")),\n  tray.separator(),\n  tray.item(\"Quit\", () => tray.kill())\n);\n```\n\n## API\n\n### `Tray.create(options?, ready?)`\n\nCreates and initializes a tray instance.\n\n| Option | Type | Description |\n|--------|------|-------------|\n| `title` | `string` | Tooltip text |\n| `icon` | `Uint8Array` | Icon bytes (defaults to built-in `default.ico`) |\n| `debug` | `boolean` | Use fixed port `5678` |\n| `useTempDir` | `boolean \\| \"clean\"` | Copy `trayicon.exe` to temp dir (`\"clean\"` deletes on exit) |\n| `action` | `() => void` | Click handler for the tray icon itself |\n\n### Instance methods\n\n- `tray.setTitle(title)`\n- `tray.setIcon(icon: Uint8Array)`\n- `tray.setMenu(...items)`\n- `tray.item(label, action?)` / `tray.item(label, props?)`\n- `tray.separator()`\n- `tray.notify(title, msg, action?)`\n- `tray.kill()`\n\n## Deploying with `bun --compile`\n\nPlace `trayicon.exe` next to your compiled executable:\n\n```bash\nbun build src/index.ts --compile --outfile dist/myapp.exe\ncp node_modules/@1-week/trayicon-bun/rsrcs/trayicon.exe dist/\n```\n\nOr let the library handle it automatically with `useTempDir: true`.\n\n## License\n\nMIT (same as original)\n","readmeFilename":"README.md"}