{"_id":"@aestheticfunction/dspack-export","_rev":"3-48c10c01e7a05309cd88ffcbd484a110","name":"@aestheticfunction/dspack-export","dist-tags":{"latest":"0.5.0"},"versions":{"0.3.0":{"name":"@aestheticfunction/dspack-export","version":"0.3.0","keywords":["dspack","design-system","design-tokens","shadcn","tailwind","react","exporter","ai-agents"],"author":{"name":"Ryan Dombrowski"},"license":"Apache-2.0","_id":"@aestheticfunction/dspack-export@0.3.0","maintainers":[{"name":"ryandmonk","email":"rdombrowski@gmail.com"}],"homepage":"https://github.com/aestheticfunction/dspack-export#readme","bugs":{"url":"https://github.com/aestheticfunction/dspack-export/issues"},"bin":{"dspack-export":"dist/cli.js"},"dist":{"shasum":"d71b4722d474cfd7ee8d0d25c2372bc5d628f44c","tarball":"https://registry.npmjs.org/@aestheticfunction/dspack-export/-/dspack-export-0.3.0.tgz","fileCount":89,"integrity":"sha512-HHyvEDyE7qaAZgXBaflWLdlSkEWE3M5u2KRhPnJPnFVJcnG9N+dSWkBxWkKkQ0UKvAs0fYkg8OGLUrdIt+qAnA==","signatures":[{"sig":"MEQCIGjfOxZz3OvJe6TU7w630oS7fD2/3+2RlwmJb9W0MxF3AiBCJdaCVu/ThN0QWT/+U7IhL9EkI4fIFy3X9S/gCnjg2Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":334792},"main":"dist/cli.js","type":"module","types":"./dist/cli.d.ts","engines":{"node":">=22.0.0"},"gitHead":"3da897c27db5e0cdbc9a29874ae178a100e5569b","scripts":{"test":"vitest run","build":"tsc","check:sync":"node scripts/check-sync.mjs","generate:fixture":"npm run build && SOURCE_DATE_EPOCH=1781049600 node dist/cli.js generate --config fixtures/shadcn-demo/dspack-export.config.json","generate:fixture:vue":"npm run build && SOURCE_DATE_EPOCH=1781049600 node dist/cli.js generate --config fixtures/vuetify-demo/dspack-export.config.json"},"_npmUser":{"name":"ryandmonk","email":"rdombrowski@gmail.com"},"repository":{"url":"git+https://github.com/aestheticfunction/dspack-export.git","type":"git"},"_npmVersion":"11.6.2","description":"Bootstrap a current-spec dspack design-system snapshot from a component codebase (React + Tailwind/shadcn, Vue 3 + Vuetify 3) through a framework-adapter layer","directories":{},"_nodeVersion":"25.2.1","dependencies":{"ajv":"^8.17.0","minimist":"^1.2.8","typescript":"^5.5.0","@babel/types":"^7.28.5","@babel/parser":"^7.28.5","@babel/traverse":"^7.28.5","@vue/compiler-sfc":"^3.5.38","react-docgen-typescript":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^3.5.38","clsx":"^2.1.1","react":"^18.3.1","vitest":"^3.0.0","@types/node":"^22.0.0","@types/react":"^18.3.20","tailwind-merge":"^2.6.0","@types/minimist":"^1.2.5","@radix-ui/react-slot":"^1.1.0","@types/babel__traverse":"^7.28.0","class-variance-authority":"^0.7.1"},"_npmOperationalInternal":{"tmp":"tmp/dspack-export_0.3.0_1784766559561_0.3840172499253438","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@aestheticfunction/dspack-export","version":"0.4.0","keywords":["dspack","design-system","design-tokens","shadcn","tailwind","react","exporter","ai-agents"],"author":{"name":"Ryan Dombrowski"},"license":"Apache-2.0","_id":"@aestheticfunction/dspack-export@0.4.0","maintainers":[{"name":"ryandmonk","email":"rdombrowski@gmail.com"}],"homepage":"https://github.com/aestheticfunction/dspack-export#readme","bugs":{"url":"https://github.com/aestheticfunction/dspack-export/issues"},"bin":{"dspack-export":"dist/cli.js"},"dist":{"shasum":"f9164ad2e9d7e7df21e8d56337fcf2bec2d079d7","tarball":"https://registry.npmjs.org/@aestheticfunction/dspack-export/-/dspack-export-0.4.0.tgz","fileCount":95,"integrity":"sha512-Y7q5ZcwnpxOXMWvnEBQ422LPBXSaluXKKr1xWZPv3xaq26DpB3WSU8rPrqpPhqZ0LLb4wUQ7I57I8t+QGlsFlg==","signatures":[{"sig":"MEYCIQCGS4GGyMICBV7cY0N89fgXvj40kquHgoNFuzzbdh+5bQIhAOYckUe8xx7iPSPzPsL4ZMi3at4d73WrTSfFpxobpkM0","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":346643},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22.0.0"},"exports":{".":"./dist/index.js","./package.json":"./package.json"},"gitHead":"42bc828734f61f512629551e51ffcc969e3434d6","scripts":{"test":"vitest run","build":"tsc","test:pack":"bash scripts/pack-test.sh","check:sync":"node scripts/check-sync.mjs","generate:fixture":"npm run build && SOURCE_DATE_EPOCH=1781049600 node dist/cli.js generate --config fixtures/shadcn-demo/dspack-export.config.json","generate:fixture:vue":"npm run build && SOURCE_DATE_EPOCH=1781049600 node dist/cli.js generate --config fixtures/vuetify-demo/dspack-export.config.json"},"_npmUser":{"name":"ryandmonk","email":"rdombrowski@gmail.com"},"repository":{"url":"git+https://github.com/aestheticfunction/dspack-export.git","type":"git"},"_npmVersion":"11.6.2","description":"Bootstrap a current-spec dspack design-system snapshot from a component codebase (React + Tailwind/shadcn, Vue 3 + Vuetify 3) through a framework-adapter layer","directories":{},"_nodeVersion":"25.2.1","dependencies":{"ajv":"^8.17.0","minimist":"^1.2.8","typescript":"^5.5.0","@babel/types":"^7.28.5","@babel/parser":"^7.28.5","@babel/traverse":"^7.28.5","@vue/compiler-sfc":"^3.5.38","react-docgen-typescript":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^3.5.38","clsx":"^2.1.1","react":"^18.3.1","vitest":"^3.0.0","@types/node":"^22.0.0","@types/react":"^18.3.20","tailwind-merge":"^2.6.0","@types/minimist":"^1.2.5","@radix-ui/react-slot":"^1.1.0","@types/babel__traverse":"^7.28.0","class-variance-authority":"^0.7.1"},"_npmOperationalInternal":{"tmp":"tmp/dspack-export_0.4.0_1785799230005_0.029691560648461568","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@aestheticfunction/dspack-export","version":"0.5.0","description":"Bootstrap a current-spec dspack design-system snapshot from a component codebase (React + Tailwind/shadcn, Vue 3 + Vuetify 3) through a framework-adapter layer","keywords":["dspack","design-system","design-tokens","shadcn","tailwind","react","exporter","ai-agents"],"license":"Apache-2.0","type":"module","main":"dist/index.js","bin":{"dspack-export":"dist/cli.js"},"engines":{"node":">=22.0.0"},"author":{"name":"Ryan Dombrowski"},"repository":{"type":"git","url":"git+https://github.com/aestheticfunction/dspack-export.git"},"homepage":"https://github.com/aestheticfunction/dspack-export#readme","bugs":{"url":"https://github.com/aestheticfunction/dspack-export/issues"},"scripts":{"build":"tsc","test":"vitest run","generate:fixture":"npm run build && SOURCE_DATE_EPOCH=1781049600 node dist/cli.js generate --config fixtures/shadcn-demo/dspack-export.config.json","generate:fixture:vue":"npm run build && SOURCE_DATE_EPOCH=1781049600 node dist/cli.js generate --config fixtures/vuetify-demo/dspack-export.config.json","check:sync":"node scripts/check-sync.mjs","test:pack":"bash scripts/pack-test.sh"},"dependencies":{"@babel/parser":"^7.28.5","@babel/traverse":"^7.28.5","@babel/types":"^7.28.5","@vue/compiler-sfc":"^3.5.38","ajv":"^8.17.0","minimist":"^1.2.8","react-docgen-typescript":"^2.4.0","typescript":"^5.5.0"},"devDependencies":{"@radix-ui/react-slot":"^1.1.0","@types/babel__traverse":"^7.28.0","@types/minimist":"^1.2.5","@types/node":"^22.0.0","@types/react":"^18.3.20","class-variance-authority":"^0.7.1","clsx":"^2.1.1","dspack-export-shipped":"npm:@aestheticfunction/dspack-export@^0.4.0","react":"^18.3.1","tailwind-merge":"^2.6.0","vitest":"^3.0.0","vue":"^3.5.38"},"exports":{".":"./dist/index.js","./package.json":"./package.json"},"gitHead":"431f427f35cb47602f8d20cc7fec264f0151604f","types":"./dist/index.d.ts","_id":"@aestheticfunction/dspack-export@0.5.0","_nodeVersion":"25.2.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-wW0bVYww8ylG4oosAClWUwQXWMcPsBkx5XmP0x5ytQEMAcBOUKXrSk9hFAiwON41lfP22mNpR7SLyAHPBZvOtA==","shasum":"a22471fb6f2642307e522cc8f6354d658828afd1","tarball":"https://registry.npmjs.org/@aestheticfunction/dspack-export/-/dspack-export-0.5.0.tgz","fileCount":95,"unpackedSize":380338,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEVWzGTuxFFrJ7HxOXw0jv5K7LjsnLedV0NwY6QlqGKuAiEA2FRXjD/QtmbItYQJqhl5dIkfPjkMk7ytnT0YxTpk6iY="}]},"_npmUser":{"name":"ryandmonk","email":"rdombrowski@gmail.com"},"directories":{},"maintainers":[{"name":"ryandmonk","email":"rdombrowski@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dspack-export_0.5.0_1785850432348_0.023508409642746253"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-23T00:29:19.459Z","modified":"2026-08-04T13:33:52.643Z","0.3.0":"2026-07-23T00:29:19.696Z","0.4.0":"2026-08-03T23:20:30.187Z","0.5.0":"2026-08-04T13:33:52.492Z"},"bugs":{"url":"https://github.com/aestheticfunction/dspack-export/issues"},"author":{"name":"Ryan Dombrowski"},"license":"Apache-2.0","homepage":"https://github.com/aestheticfunction/dspack-export#readme","keywords":["dspack","design-system","design-tokens","shadcn","tailwind","react","exporter","ai-agents"],"repository":{"type":"git","url":"git+https://github.com/aestheticfunction/dspack-export.git"},"description":"Bootstrap a current-spec dspack design-system snapshot from a component codebase (React + Tailwind/shadcn, Vue 3 + Vuetify 3) through a framework-adapter layer","maintainers":[{"name":"ryandmonk","email":"rdombrowski@gmail.com"}],"readme":"# dspack-export\n\nBootstrap current-spec [dspack](https://github.com/aestheticfunction/dspack)\ndesign-system snapshots from component codebases — **React + Tailwind/shadcn** and **Vue 3 +\nVuetify 3** — ready to serve to AI agents via\n[ds-mcp](https://github.com/aestheticfunction/ds-mcp).\n\n> Part of the [dspack ecosystem](https://github.com/aestheticfunction) — the organization profile has the full map of how the repositories fit together.\n>\n> **Kind:** snapshot tool (CLI, experimental, npm `@aestheticfunction/dspack-export`) · **Audience:** teams with an existing component codebase who want a starting dspack file · **Neighbors:** produces [dspack](https://github.com/aestheticfunction/dspack) documents; serves them via [ds-mcp](https://github.com/aestheticfunction/ds-mcp); see the governed end-to-end chain in [dspack-studio](https://github.com/aestheticfunction/dspack-studio) ([hosted replay](https://studio.aesthetic-function.com))\n>\n> This tool is **step 1** of the adoption journey; what to do with the snapshot it produces — review, governance authoring, validation, serving — is the [adoption guide](https://github.com/aestheticfunction/dspack/blob/main/ADOPTING.md).\n\nComponent extraction runs through a framework-adapter layer (see\n[docs/adapters.md](docs/adapters.md)); the shared pipeline — token extraction,\nassembly, provenance, warnings, validation, deterministic output — is identical\nacross frameworks. The active adapter is chosen by an optional `framework` config\nfield, or inferred from component file extensions (`.tsx/.jsx` → React, `.vue` →\nVue) with a hard error on ambiguous input.\n\n**Status: experimental** (`0.5.0`). Config format and output details may\nstill change between versions. Published to npm as\n`@aestheticfunction/dspack-export`. The [handbook](docs/handbook.md) covers\nthe supported stack, known limitations, and troubleshooting.\n\nThe snapshot declares the current spec version (v0.4) and populates the\nmachine-discoverable sections only. The governance layer (categories,\nintents, rules, examples, patterns, anti-patterns, and prose guidance) is\nhand-authored downstream, never extracted — the output's\n`metadata[\"x-bootstrap\"]` ledger records exactly which sections this tool\ngenerated (with content hashes) and which surfaces await authorship. The\nledger is non-semantic: it exists only so regeneration can make safe\ndecisions, and deleting it marks the document fully human-owned.\n\nSince 0.5.0 the ledger is **v2**: ownership of the components section is\ntracked per entry (`ledger.components`, id → hash), so `regenerateSections`\ncan refresh untouched entries while preserving enriched ones verbatim. A\nhash whose entry was hand-deleted is deletion memory — rediscovery skips it\nand asks (`deletedAwaitingDecision`) instead of silently restoring it — and\nids listed in `ledger.doNotRediscover` are never re-added. An id you\nre-authored as a sub-component of another entry reports `restoredConflict`\nuntil you decide: tombstone it to keep the nested form, or pass\n`regenerateSections(existing, fresh, { restoreTopLevel: [id] })` to restore\nthe top-level entry alongside it. Any document using these v2 states omits\nthe v1 whole-section signal, so older releases' whole-file regeneration\nrefuses to touch it; the 0.4.0 merge path predates tombstones, which is\nwhy ledger-v2 documents require 0.5.0 or later.\n\n**Regeneration never destroys human-authored content.** If the output file\ncontains anything this tool does not own — governance blocks, edited\nsections, or no ledger at all — `generate` refuses, explains why, and\npoints at `--out` for writing a fresh snapshot elsewhere. There is no\nforce flag.\n\n## Install\n\n```bash\nnpm install -g @aestheticfunction/dspack-export\n```\n\nOr from source:\n\n```bash\ngit clone https://github.com/aestheticfunction/dspack-export\ncd dspack-export && npm install && npm run build && npm link\n```\n\nThen, from your design-system project (with its own dependencies installed):\n\n```bash\ndspack-export init                                    # detect conventions, write config\ndspack-export generate --config dspack-export.config.json\ndspack-export validate my-system.dspack.json\n```\n\nA snapshot answers \"what does my design system look like right now\": components,\nprops (including cva variant enums **and their defaults**, or Vue\n`defineProps`/`withDefaults` types and defaults), semantic color/radius tokens\nfrom CSS custom properties (Tailwind v3 and v4 conventions), dark-theme\noverrides, layout breakpoints, and per-framework import bindings\n(`frameworkBindings.react` or `frameworkBindings.vue`).\n\nFor Vue 3 SFCs the Vue adapter extracts props (`<script setup>` type-based and\nruntime `defineProps`/`withDefaults`, plus the Options API), emits (normalized to\n`on<Event>` handler props), slots (default → `children`, named → `slot:<name>`),\nand conservative Vuetify 3 usage detection. See\n[Vue 3 + Vuetify 3](docs/handbook.md#vue-3--vuetify-3).\n\nTokens can also be imported from a **DTCG design-token JSON file** — the\ninterchange format that Figma exports, Tokens Studio, and Style Dictionary can\nproduce — via the `tokens` config field. This is a file-based snapshot import,\nnot a tool integration: no Figma API, no network. See\n[Importing design token files](docs/handbook.md#importing-design-token-files-dtcg).\n\nValidated against real repositories — see [trial results](docs/trials.md):\nshadcn-ui/next-template and shadcn-ui/taxonomy with zero config edits,\nsatnaing/shadcn-admin with one.\n\n## How it fits the ecosystem\n\n```\nyour component codebase\n        │\n        ▼\n  dspack-export  ──────►  your-system.dspack.json  ──────►  ds-mcp  ──────►  AI agents\n  (this repo:              (open format, defined by         (serves it       (Claude, Cursor, …)\n   snapshot generator)      the dspack specification)        over MCP)\n```\n\n- **[dspack](https://github.com/aestheticfunction/dspack)** — the open\n  specification: what a design-system snapshot contains.\n- **dspack-export** (this repo) — generates a spec-valid snapshot from code.\n- **[ds-mcp](https://github.com/aestheticfunction/ds-mcp)** — serves a\n  snapshot to MCP-compatible AI agents, read-only.\n- **[Aesthetic Function](https://github.com/aestheticfunction/aesthetic-function)**\n  — the open-core reconciliation engine beneath a commercial product: it\n  reads a committed dspack file as a reference contract and continuously\n  checks Figma, code, and docs against it.\n\n## What this tool is not\n\ndspack-export generates **snapshots only**. It has no drift detection, no\ndiffing, no watch mode, no CI enforcement, no write-back, and no reconciliation —\nthose concerns belong to [Aesthetic Function](https://github.com/aestheticfunction/aesthetic-function).\nHand-authored dspack sections (patterns, antiPatterns, whenToUse, accessibility,\ncomposition, constraints) are not generated; author them in the output file or a\ndownstream copy.\n\n## Development\n\n```bash\nnpm install\nnpm run build\nnpm test                          # vitest: golden files, units, ds-mcp round-trip\nnpm run generate:fixture          # regenerate the fixture snapshot (pinned epoch)\nDS_MCP=../ds-mcp/dist/index.js scripts/roundtrip.sh   # end-to-end gate check\nscripts/trial.sh <repo-url>       # run against a real repo (docs/trials.md)\n```\n\n## Contributing & scope\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) — especially the scope section before\nproposing features — plus [SECURITY.md](SECURITY.md) (the tool's three\ninvariants: writes only its output file, no network, no shell execution) and\n[docs/maintainership.md](docs/maintainership.md).\n\n## License\n\nApache-2.0\n","readmeFilename":"README.md"}