{"_id":"@bedrock-oss/stylish","_rev":"6-d830149d1dbf61daf291b061de7bc1ac","name":"@bedrock-oss/stylish","dist-tags":{"latest":"0.0.5"},"versions":{"0.0.1":{"name":"@bedrock-oss/stylish","version":"0.0.1","keywords":["minecraft","bedrock","addon","script-api","typescript"],"author":{"name":"Bedrock-OSS"},"license":"MIT","_id":"@bedrock-oss/stylish@0.0.1","maintainers":[{"name":"stirante","email":"brzozowski.s.piotr@gmail.com"}],"homepage":"https://github.com/Bedrock-OSS/stylish#readme","bugs":{"url":"https://github.com/Bedrock-OSS/stylish/issues"},"dist":{"shasum":"a1b7a6b5ba9fdbf7a2955bd3801a68b1fa30af18","tarball":"https://registry.npmjs.org/@bedrock-oss/stylish/-/stylish-0.0.1.tgz","fileCount":9,"integrity":"sha512-uR/aQMq4kAd/IOgnv8tO2I8JHGyzoP3OQ2OZn3G0ENClpvXRW0Um//JQn2KuJMHzPVIppWsvC4h22oTNTKVxjQ==","signatures":[{"sig":"MEUCIFtTNxuhY1W2rvdLDJwJjRAuF0WelVcpfi01dmcN1psZAiEA4aMf/CqnFSWVdTd+xjmC48euvaALY+17z031/N+nF1w=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":22754},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"bb15d14fae2b18ebfc87e13c2448aad620eb9bdc","scripts":{"lint":"eslint src --ext .ts","test":"jest","build":"tsup","prepublishOnly":"npm run build"},"_npmUser":{"name":"stirante","email":"brzozowski.s.piotr@gmail.com"},"repository":{"url":"git+https://github.com/Bedrock-OSS/stylish.git","type":"git"},"_npmVersion":"10.9.2","description":"A decorator package with for developing add-ons with Script API in Minecraft Bedrock Edition","directories":{},"_nodeVersion":"22.16.0","dependencies":{"@minecraft/common":"latest","@minecraft/server":"beta"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","tsup":"^7.2.0","eslint":"^8.57.0","ts-jest":"^29.1.1","@types/jest":"^29.5.6","@typescript-eslint/parser":"^7.1.0","eslint-plugin-minecraft-linting":"^1.1.0","@typescript-eslint/eslint-plugin":"^7.1.0"},"_npmOperationalInternal":{"tmp":"tmp/stylish_0.0.1_1749373792084_0.3096791324325441","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@bedrock-oss/stylish","version":"0.0.2","keywords":["minecraft","bedrock","addon","script-api","typescript"],"author":{"name":"Bedrock-OSS"},"license":"MIT","_id":"@bedrock-oss/stylish@0.0.2","maintainers":[{"name":"stirante","email":"brzozowski.s.piotr@gmail.com"}],"homepage":"https://github.com/Bedrock-OSS/stylish#readme","bugs":{"url":"https://github.com/Bedrock-OSS/stylish/issues"},"dist":{"shasum":"044c5063eb7a2ccce8e9fc5d27a5aab18606312b","tarball":"https://registry.npmjs.org/@bedrock-oss/stylish/-/stylish-0.0.2.tgz","fileCount":9,"integrity":"sha512-2HA7IAmsCmTUWG26zox3Jue+HOOhjIpdDPrO6c8cl1pGXk0PFB+q3tpZdXpHUtM5Z17rthobMu8T8PF9cN24wA==","signatures":[{"sig":"MEQCIEyh1EDmcVaSaOT5a7a5YRn2j3FRz3ohPd/KIM7TtL/zAiB40/1J6f81FNLOkmsiZY75F+1WAIKrwgFTen9DNsGp3w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":56282},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"faec67ba18651497845456699cf9c60886f15a00","scripts":{"lint":"eslint src --ext .ts","test":"jest","build":"tsup","prepublishOnly":"npm run build"},"_npmUser":{"name":"stirante","email":"brzozowski.s.piotr@gmail.com"},"repository":{"url":"git+https://github.com/Bedrock-OSS/stylish.git","type":"git"},"_npmVersion":"10.9.3","description":"A decorator package with for developing add-ons with Script API in Minecraft Bedrock Edition","directories":{},"_nodeVersion":"22.19.0","dependencies":{"@minecraft/common":"^1.2.0","@minecraft/server":"^2.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","tsup":"^7.2.0","eslint":"^8.57.0","ts-jest":"^29.1.1","@types/jest":"^29.5.6","@typescript-eslint/parser":"^7.1.0","eslint-plugin-minecraft-linting":"^1.1.0","@typescript-eslint/eslint-plugin":"^7.1.0"},"_npmOperationalInternal":{"tmp":"tmp/stylish_0.0.2_1757682022726_0.923021443219264","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@bedrock-oss/stylish","version":"0.0.3","keywords":["minecraft","bedrock","addon","script-api","typescript"],"author":{"name":"Bedrock-OSS"},"license":"MIT","_id":"@bedrock-oss/stylish@0.0.3","maintainers":[{"name":"stirante","email":"brzozowski.s.piotr@gmail.com"}],"homepage":"https://github.com/Bedrock-OSS/stylish#readme","bugs":{"url":"https://github.com/Bedrock-OSS/stylish/issues"},"dist":{"shasum":"bdfbcd4c3499ac4b0d4701de450ce04de77b0f66","tarball":"https://registry.npmjs.org/@bedrock-oss/stylish/-/stylish-0.0.3.tgz","fileCount":9,"integrity":"sha512-1li+fIQTfjOIX/CTvHxwI307tdz9ZvB9Oh0u0rv5H5k3ezYprajVrPKlDdZ4O58/rKPiSjkcJBSm20vgFh0xPg==","signatures":[{"sig":"MEUCIQDVXDW77VXN9DgTbHN2yvd5L/zv74wlDtE1OBXHWTWKFgIgIJS2tryZgLevyd7OoRYsrExjIszQNq1S8UJv+wKZmMg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":65469},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"b9e2cbf02ff3d92a4c47cc5ef7ab11370e701b38","scripts":{"lint":"eslint src --ext .ts","test":"jest","build":"tsup","prepublishOnly":"npm run build"},"_npmUser":{"name":"stirante","email":"brzozowski.s.piotr@gmail.com"},"repository":{"url":"git+https://github.com/Bedrock-OSS/stylish.git","type":"git"},"_npmVersion":"10.9.3","description":"A decorator package with for developing add-ons with Script API in Minecraft Bedrock Edition","directories":{},"_nodeVersion":"22.19.0","dependencies":{"@minecraft/common":"^1.2.0","@minecraft/server":"^2.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","tsup":"^7.2.0","eslint":"^8.57.0","ts-jest":"^29.1.1","@types/jest":"^29.5.6","@typescript-eslint/parser":"^7.1.0","eslint-plugin-minecraft-linting":"^1.1.0","@typescript-eslint/eslint-plugin":"^7.1.0"},"_npmOperationalInternal":{"tmp":"tmp/stylish_0.0.3_1758543951629_0.8986981592226269","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"@bedrock-oss/stylish","version":"0.0.4","keywords":["minecraft","bedrock","addon","script-api","typescript"],"author":{"name":"Bedrock-OSS"},"license":"MIT","_id":"@bedrock-oss/stylish@0.0.4","maintainers":[{"name":"stirante","email":"brzozowski.s.piotr@gmail.com"},{"name":"jannisx11","email":"jannis4236@gmail.com"}],"homepage":"https://github.com/Bedrock-OSS/stylish#readme","bugs":{"url":"https://github.com/Bedrock-OSS/stylish/issues"},"dist":{"shasum":"11256057acf64797de62e4787e726d8f19134f3a","tarball":"https://registry.npmjs.org/@bedrock-oss/stylish/-/stylish-0.0.4.tgz","fileCount":9,"integrity":"sha512-/U8dMg4M/AJ0Br1oghgS9hznkBA+h+gUS9RAWosQWUN/z4I0rxscsRFESHtdfF5A8EUJyJYRyh8mu1a0nfp2ig==","signatures":[{"sig":"MEUCIQCkPx0+JNNk/xG7u6Lz+mh91/CuQFRrJFjj1qLgJnolkAIgcFrMNHMAZPDU0nZKLPz+IWQ4yw7HGDvu85fNu+cTVgk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":189766},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"246eb8002df9d6234b6f4d035555fd4c9558d015","scripts":{"lint":"eslint src --ext .ts","test":"jest","build":"tsup","prepublishOnly":"npm run build"},"_npmUser":{"name":"stirante","email":"brzozowski.s.piotr@gmail.com"},"repository":{"url":"git+https://github.com/Bedrock-OSS/stylish.git","type":"git"},"_npmVersion":"10.9.3","description":"A decorator package with for developing add-ons with Script API in Minecraft Bedrock Edition","directories":{},"_nodeVersion":"22.20.0","dependencies":{"@minecraft/common":"^1.3.0","@minecraft/server":"^2.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","tsup":"^7.2.0","eslint":"^8.57.0","ts-jest":"^29.1.1","@types/jest":"^29.5.6","@typescript-eslint/parser":"^7.1.0","eslint-plugin-minecraft-linting":"^1.1.0","@typescript-eslint/eslint-plugin":"^7.1.0"},"_npmOperationalInternal":{"tmp":"tmp/stylish_0.0.4_1783945522489_0.2562231947184994","host":"s3://npm-registry-packages-npm-production"}},"0.0.5":{"name":"@bedrock-oss/stylish","version":"0.0.5","description":"A decorator package with for developing add-ons with Script API in Minecraft Bedrock Edition","keywords":["minecraft","bedrock","addon","script-api","typescript"],"repository":{"type":"git","url":"git+https://github.com/Bedrock-OSS/stylish.git"},"main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.js","types":"./dist/index.d.ts"}},"scripts":{"build":"tsup","lint":"eslint src --ext .ts","test":"jest","prepublishOnly":"npm run build"},"author":{"name":"Bedrock-OSS"},"license":"MIT","devDependencies":{"@types/jest":"^29.5.6","@typescript-eslint/eslint-plugin":"^7.1.0","@typescript-eslint/parser":"^7.1.0","eslint":"^8.57.0","eslint-plugin-minecraft-linting":"^1.1.0","jest":"^29.7.0","ts-jest":"^29.1.1","tsup":"^7.2.0"},"dependencies":{"@minecraft/common":"^1.3.0","@minecraft/server":"^2.8.0"},"publishConfig":{"access":"public"},"engines":{"node":">=18"},"_id":"@bedrock-oss/stylish@0.0.5","gitHead":"8ad263c15bcdac4395b0717bd59c02791bd352a8","bugs":{"url":"https://github.com/Bedrock-OSS/stylish/issues"},"homepage":"https://github.com/Bedrock-OSS/stylish#readme","_nodeVersion":"22.20.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-4M1SE5ZKlisJ9foeSzCn+8R/fgG4inFe8TxNBGmYFoNBKXGuXBkQ3z6M8k63Rb7G3JYYWF5thoICMtoyHJcONQ==","shasum":"751429ae8064d9e109543a75dea054b0a1f05176","tarball":"https://registry.npmjs.org/@bedrock-oss/stylish/-/stylish-0.0.5.tgz","fileCount":9,"unpackedSize":198664,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDKm7t60FMmMXZToyFj5X9cSi93cmYdzu2bbjtJS5PIGQIhALieHHEe4ZFUclBwE2EcEKk/1ASfjZS3+fD2P0QODwK/"}]},"_npmUser":{"name":"stirante","email":"brzozowski.s.piotr@gmail.com"},"directories":{},"maintainers":[{"name":"stirante","email":"brzozowski.s.piotr@gmail.com"},{"name":"jannisx11","email":"jannis4236@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/stylish_0.0.5_1788872303735_0.6795909631581569"},"_hasShrinkwrap":false}},"time":{"created":"2025-06-08T09:09:51.990Z","modified":"2026-09-08T12:58:24.059Z","0.0.1":"2025-06-08T09:09:52.258Z","0.0.2":"2025-09-12T13:00:22.931Z","0.0.3":"2025-09-22T12:25:51.844Z","0.0.4":"2026-07-13T12:25:22.637Z","0.0.5":"2026-09-08T12:58:23.884Z"},"bugs":{"url":"https://github.com/Bedrock-OSS/stylish/issues"},"author":{"name":"Bedrock-OSS"},"license":"MIT","homepage":"https://github.com/Bedrock-OSS/stylish#readme","keywords":["minecraft","bedrock","addon","script-api","typescript"],"repository":{"type":"git","url":"git+https://github.com/Bedrock-OSS/stylish.git"},"description":"A decorator package with for developing add-ons with Script API in Minecraft Bedrock Edition","maintainers":[{"name":"stirante","email":"brzozowski.s.piotr@gmail.com"},{"name":"jannisx11","email":"jannis4236@gmail.com"}],"readme":"# stylish\n\n[![npm version](https://badge.fury.io/js/@bedrock-oss%2Fstylish.svg)](https://badge.fury.io/js/@bedrock-oss%2Fstylish)\n\nStylish is a decorator library aimed at simplifying development for the Minecraft Bedrock Script API. It focuses on automatic registration of custom components and convenience helpers for method binding.\n\n## Features\n\n- `@ItemComponent` - automatically registers a custom item component.\n- `@BlockComponent` - automatically registers a custom block component.\n- `@CustomCmd` - automatically registers a custom command.\n- `@BindThis` - binds a method to its instance when accessed.\n- `@OnStartup` - runs decorated methods when the pack starts.\n- `@OnWorldLoad` - runs decorated methods when the world is loaded.\n- `@On<Event>` / `@OnBefore<Event>` - a strongly typed decorator for every world/system event in `@minecraft/server` (e.g. `@OnPlayerJoin`, `@OnEntityDie`, `@OnBeforeItemUse`, `@OnScriptEventReceive`). Supports native filter options where the API does: `@OnEntityHurt({ entityTypes: ['example:boss'] })`. See [docs/events.md](docs/events.md) for the full list.\n- `@ScriptEvent('example:my_event')` - routes `/scriptevent` commands by id over a single namespace-filtered subscription.\n- `@Interval(ticks)` / `@Timeout(ticks)` / `@OnTick` - runs methods on a tick schedule, starting at startup.\n- `@WorldProperty('example:key', default)` - backs a class field with a world dynamic property (cached reads, write-through).\n- `@RegisterEvents` - auto-registers instance event methods (like `@OnStartup`) on construction.\n\n## Installation\n\n1. Install the package:\n\n```bash\nnpm install @bedrock-oss/stylish\n```\n2. Enable decorators in your `tsconfig.json`:\n\n```json\n{\n  \"compilerOptions\": {\n    \"experimentalDecorators\": true\n  }\n}\n```\n\n## Usage\n\nRegister a custom item component:\n\nExampleComponent.ts:\n```ts\nimport { ItemComponentUseEvent } from '@minecraft/server';\nimport { ItemComponent, BindThis } from '@bedrock-oss/stylish';\n\n@ItemComponent\nclass ExampleComponent {\n  static componentId = 'example:component';\n  message = 'Hello world!';\n\n  @BindThis\n  onUse(event: ItemComponentUseEvent) {\n    event.source.sendMessage(this.message);\n  }\n}\n```\n\nmain.ts:\n```ts\nimport { init } from '@bedrock-oss/stylish';\nexport * from './ExampleComponent';\n\ninit(); // Registers all decorated components and wires events\n// Alternatively, you can register your own event handler and call registerAllComponents()\n\n```\n\n> [!IMPORTANT]  \n> When splitting components into multiple files, remember to import/export the file containing the component class.\n\n## Stripping logs from production builds\n\nEvery `console.*` call in stylish sits under a `LOGGING:` label. If you bundle\nwith esbuild (directly, or through tools such as regolith filters that expose its\noptions), you can drop all of the library's logging in one go:\n\n```js\nesbuild.build({\n  // ...\n  dropLabels: [\"LOGGING\"],\n});\n```\n\nYou can use the same label in your own code to have it stripped together with\nthe library's logs.\n\n## Documentation\n\nSee the [`docs`](docs/) folder for details on decorators:\n\n- [BindThis](docs/bindthis.md)\n- [ItemComponent](docs/itemcomponent.md)\n- [BlockComponent](docs/blockcomponent.md)\n- [CustomCmd](docs/customcommand.md)\n- [Events](docs/events.md)\n\n\n## Contributing\n\nFeel free to raise an issue or submit a pull request if you have any improvements or features to suggest.\n\n## License\n\nThis project is licensed under the MIT License.\n","readmeFilename":"README.md"}