{"_id":"@bureaucracy/svelte","name":"@bureaucracy/svelte","dist-tags":{"latest":"0.5.4"},"versions":{"0.5.4":{"name":"@bureaucracy/svelte","version":"0.5.4","description":"Svelte 5 custom-element renderer for the Bureaucracy ViewContract — declare a table/form/detail contract, get the UI.","type":"module","license":"MIT","publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"main":"./dist/bureaucracy-admin.js","module":"./dist/bureaucracy-admin.js","types":"./src/lib/types.ts","exports":{".":{"types":"./src/lib/types.ts","import":"./dist/bureaucracy-admin.js"},"./types":"./src/lib/types.ts","./tokens.css":"./src/lib/tokens.css","./tokens-dark.css":"./src/lib/tokens-dark.css"},"scripts":{"tokens":"node src/build-tokens.mjs","dev":"vite dev","build":"npm run tokens && vite build","check":"svelte-check --tsconfig ./tsconfig.json","test":"vitest run","test:watch":"vitest","preview":"vite preview","prepublishOnly":"npm run build"},"devDependencies":{"@sveltejs/vite-plugin-svelte":"^5.0.0","@testing-library/jest-dom":"^6.9.1","@testing-library/svelte":"^5.3.1","@tsconfig/svelte":"^5.0.0","bits-ui":"^2.0.0","jsdom":"^29.0.1","style-dictionary":"^4.0.0","svelte":"^5.0.0","svelte-check":"^4.0.0","typescript":"^5.5.0","vite":"^6.0.0","vitest":"^4.1.2","zod":"^3.23.0"},"gitHead":"e28d779028a1c96dd3d3394471474db0954056eb","_id":"@bureaucracy/svelte@0.5.4","_nodeVersion":"24.16.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-2+wRTH6MS4UX/3oW/Mtxrxnx5bIMmkOl4dF5Arq5yc6mLYSLrq2wTBlST5LHI77y8l1wNiCxDTB6kMEA6zaL6w==","shasum":"c910b187f928eb18ab44d84d30282e6098077253","tarball":"https://registry.npmjs.org/@bureaucracy/svelte/-/svelte-0.5.4.tgz","fileCount":9,"unpackedSize":816301,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCHaDFFk2F+8W8VyDnOYNgLTy+0EmJH3WEkaYT6m1fcfAIhAKlqBZinDb9NjSy50IY8McrVdJyuUJXEIPC5UQAZ/1QN"}]},"_npmUser":{"name":"mrkrmv","email":"krymov@gmail.com"},"directories":{},"maintainers":[{"name":"mrkrmv","email":"krymov@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/svelte_0.5.4_1784655921355_0.23130921500229085"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-21T17:45:21.191Z","0.5.4":"2026-07-21T17:45:21.565Z","modified":"2026-07-21T17:45:21.715Z"},"maintainers":[{"name":"mrkrmv","email":"krymov@gmail.com"}],"description":"Svelte 5 custom-element renderer for the Bureaucracy ViewContract — declare a table/form/detail contract, get the UI.","license":"MIT","readme":"# @bureaucracy/svelte\n\nSvelte 5 custom-element renderer for the **Bureaucracy ViewContract**. A backend\ndeclares a typed contract (table / form / detail); this package renders the\ninteractive UI. No business logic on the frontend, no HTML on the backend.\n\nThis is the standalone renderer extracted from the [`bureaucracy`](../bureaucracy)\nPython project so it can be consumed by any frontend (and externalised later),\nnot only the built-in Jinja admin.\n\n## What it renders\n\n- `<bureaucracy-table>` — data table: 17 column types, sort / filter / paginate,\n  editable + bulk columns, actions.\n- `<bureaucracy-form>` — form view: 26 field types, conditional visibility,\n  validation.\n- `<bureaucracy-detail>` — read-only detail view.\n\nAll three are framework-agnostic **custom elements**, so they drop into any host\n(SvelteKit, plain HTML, etc.). Feed them a `contract` (and the data endpoint the\ncontract declares); they do the rest.\n\n## Install\n\n```bash\nnpm install @bureaucracy/svelte   # from verdaccio.c1.aipe.dev\n```\n\n## Use\n\n```html\n<script type=\"module\">\n  import \"@bureaucracy/svelte\";           // registers the custom elements\n</script>\n<link rel=\"stylesheet\" href=\"@bureaucracy/svelte/tokens.css\" />       <!-- light theme vars -->\n<link rel=\"stylesheet\" href=\"@bureaucracy/svelte/tokens-dark.css\" />  <!-- [data-theme=dark] -->\n\n<bureaucracy-table id=\"tasks\"></bureaucracy-table>\n<script type=\"module\">\n  document.getElementById(\"tasks\").contract = tableContract; // TableContract JSON\n</script>\n```\n\nTypeScript contract types (mirroring the Python SDK) are exported from\n`@bureaucracy/svelte/types`.\n\n## Theming\n\nAll visuals read from `--bureaucracy-*` design-token CSS custom properties\n(W3C DTCG source in `tokens/`, built to `src/lib/tokens{,-dark}.css`). Override\nthem on `:root` to rebrand.\n\n## Develop\n\n```bash\nnpm install\nnpm run build     # tokens + vite lib build → dist/\nnpm test\n```\n","readmeFilename":"README.md","_rev":"1-dad1d30b335aaa295305288c31cb52dd"}