{"_id":"@act-spec/component-vue","name":"@act-spec/component-vue","dist-tags":{"rc":"0.2.0-rc.1","latest":"0.2.0-rc.1"},"versions":{"0.2.0-rc.1":{"name":"@act-spec/component-vue","version":"0.2.0-rc.1","description":"PRD-302 Vue 3 binding for the ACT (Agent Content Tree) v0.1 component contract (PRD-300). Implements the Vue declaration patterns (SFC default-export static field `Component.act = {…}`, `useActContract` composable, `<script setup>` `defineActContract` mac","license":"Apache-2.0","author":{"name":"Jeremy Forsythe","email":"jeremy@act-spec.org"},"homepage":"https://act-spec.org","bugs":{"url":"https://github.com/act-spec/act/issues"},"type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/act-spec/act.git","directory":"packages/component-vue"},"dependencies":{"@act-spec/component-contract":"0.2.0-rc.1","@act-spec/validator":"0.2.0-rc.1","@act-spec/core":"0.2.0-rc.1"},"peerDependencies":{"vue":">=3.4 <4","@vue/server-renderer":">=3.4 <4"},"peerDependenciesMeta":{"vue":{"optional":true},"@vue/server-renderer":{"optional":true}},"devDependencies":{"@vitest/coverage-v8":"^2.1.9","@vue/server-renderer":"^3.4.0","tsx":"^4.19.2","typescript":"^5.6.3","vitest":"^2.1.4","vue":"^3.4.0"},"scripts":{"build":"tsc -p tsconfig.json","test":"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage","lint":"eslint src","typecheck":"tsc -p tsconfig.json --noEmit","conformance":"tsx conformance.ts"},"_id":"@act-spec/component-vue@0.2.0-rc.1","_integrity":"sha512-zmVJXeCkK6Vd+aL8IpF7ww95deGzO4O0lV7bh5bKGMV1nfz+QMV5rV/jlneya5g1XjHfYwYecO7f1DScVWdSyw==","_resolved":"/private/var/folders/yp/y7frhcvj70jgr6b8g633lghr0000gn/T/d2cc63a8e45a90907e91a71d3bec23cc/act-spec-component-vue-0.2.0-rc.1.tgz","_from":"file:act-spec-component-vue-0.2.0-rc.1.tgz","_nodeVersion":"22.19.0","_npmVersion":"11.6.0","dist":{"integrity":"sha512-zmVJXeCkK6Vd+aL8IpF7ww95deGzO4O0lV7bh5bKGMV1nfz+QMV5rV/jlneya5g1XjHfYwYecO7f1DScVWdSyw==","shasum":"1c1ece6616752a606167a3fdcc9becaa791a6f93","tarball":"https://registry.npmjs.org/@act-spec/component-vue/-/component-vue-0.2.0-rc.1.tgz","fileCount":54,"unpackedSize":185377,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD8xhVTMnMr5fQ+gcsMmBJGkoKyJ2PObrTO76j6UE1bHAIgU+c6NQveTo5X/nZrIQf5jlVrC7zD2I2Mt3S6wuGZVVs="}]},"_npmUser":{"name":"jdforsythe","email":"jdforsythe@gmail.com"},"directories":{},"maintainers":[{"name":"jdforsythe","email":"jdforsythe@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/component-vue_0.2.0-rc.1_1777915306246_0.6907699242716394"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-04T17:21:46.163Z","0.2.0-rc.1":"2026-05-04T17:21:46.431Z","modified":"2026-05-04T17:21:46.635Z"},"maintainers":[{"name":"jdforsythe","email":"jdforsythe@gmail.com"}],"description":"PRD-302 Vue 3 binding for the ACT (Agent Content Tree) v0.1 component contract (PRD-300). Implements the Vue declaration patterns (SFC default-export static field `Component.act = {…}`, `useActContract` composable, `<script setup>` `defineActContract` mac","homepage":"https://act-spec.org","repository":{"type":"git","url":"git+https://github.com/act-spec/act.git","directory":"packages/component-vue"},"author":{"name":"Jeremy Forsythe","email":"jeremy@act-spec.org"},"bugs":{"url":"https://github.com/act-spec/act/issues"},"license":"Apache-2.0","readme":"# @act-spec/component-vue\n\nVue 3 binding for the ACT component contract. Bridges Vue component trees\nto the framework-agnostic `NodeDraft` shape exported by\n`@act-spec/component-contract`.\n\nImplements the Vue declaration patterns:\n\n- SFC default-export static field — `Component.act = { … }`,\n- composable — `useActContract({ … })`,\n- `<script setup>` macro — `defineActContract({ … })`,\n- page-level boundary — `<ActSection>` wrapper.\n\nThe collector uses `provide` / `inject` and walks via\n`@vue/server-renderer.renderToString`. Variant replay constructs a fresh\nVue app per variant. Render-time errors surface through\n`app.config.errorHandler` as truncated + secret-redacted placeholders.\nVue 2 is explicitly out of scope.\n\n## Status\n\nACT v0.1 internal hand-test candidate. Public release lands at v0.2.\n\n## Install\n\nUnpublished in v0.1. Consume via the workspace:\n\n```jsonc\n// package.json\n{ \"dependencies\": { \"@act-spec/component-vue\": \"workspace:*\" } }\n```\n\n## Usage\n\nStatic field on an SFC:\n\n```ts\n// PricingTable.vue\nimport type { VueComponentWithAct } from '@act-spec/component-vue';\n\nconst PricingTable: VueComponentWithAct = defineComponent({ /* … */ });\nPricingTable.act = {\n  type: 'marketing:pricing',\n  title: (p) => p.heading,\n  contentBlocks: (p) => p.tiers.map(toBlock),\n};\nexport default PricingTable;\n```\n\nComposable:\n\n```ts\nimport { useActContract } from '@act-spec/component-vue';\n\nsetup(props) {\n  useActContract({\n    type: 'marketing:faq',\n    contentBlocks: () => props.items.map(toBlock),\n  });\n}\n```\n\n`<script setup>` macro:\n\n```vue\n<script setup lang=\"ts\">\nimport { defineActContract } from '@act-spec/component-vue';\n\ndefineActContract({\n  type: 'marketing:cta',\n  title: (p) => p.headline,\n});\n</script>\n```\n\nGenerators (Nuxt, custom Vite-Vue) call `extractRoute`:\n\n```ts\nimport { extractRoute, vueBinding } from '@act-spec/component-vue';\n\nconst drafts = await extractRoute({\n  pageContract: { /* … */ },\n  rootComponent: AppPage,\n  variants: [/* … */],\n});\n```\n\n## Conformance / what's tested\n\nEvery public API has a citing test in the package's test suite, including\nthe Vue 3+ floor (`assertVue3Plus`), the contract-version pin, the\nvariant replay loop, and the placeholder + redaction contract. The\nconformance gate runs `@act-spec/validator` against the extracted nodes.\n\n```bash\npnpm -F @act-spec/component-vue conformance\n```\n\n## Peer dependencies\n\n| Peer | Range |\n| --- | --- |\n| `vue` | `>=3.4 <4` |\n| `@vue/server-renderer` | `>=3.4 <4` |\n\nBoth peers are optional from npm's perspective; the binding only requires\nthem at extraction time.\n\n## Links\n\n- Component contract: [`@act-spec/component-contract`](../component-contract)\n- Repository: <https://github.com/act-spec/act>\n","readmeFilename":"README.md","_rev":"1-556d29d325b1f3668688a8cbed376397"}