{"_id":"@apexmed/forms","name":"@apexmed/forms","dist-tags":{"next":"0.1.0-next.2","latest":"0.1.0-next.2"},"versions":{"0.1.0-next.2":{"name":"@apexmed/forms","version":"0.1.0-next.2","description":"Headless form model, validation, and tag binding for Apex DOCX templates.","type":"module","license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/Apex-Med/apex-docx-pdf.git","directory":"packages/forms"},"homepage":"https://github.com/Apex-Med/apex-docx-pdf#readme","bugs":{"url":"https://github.com/Apex-Med/apex-docx-pdf/issues"},"keywords":["forms","templates","docx"],"sideEffects":false,"engines":{"node":">=20"},"exports":{".":{"types":"./index.d.ts","import":"./index.js","default":"./index.js"}},"main":"./index.js","types":"./index.d.ts","publishConfig":{"access":"public","provenance":true},"gitHead":"b7b8e103f0968fe00ddc16e58d4dea69925b4e42","_id":"@apexmed/forms@0.1.0-next.2","_nodeVersion":"24.15.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-3P4HZ4M/8JgHvjqaHbV8kgdr5IMjnL+HwXQqZBkJEwTPslIw1r772Y0KmmFS/240v8Pk+pU4N4uacq3nelPJgQ==","shasum":"73a0f78952e6c1239c703ee48a01eafd9eec1f7a","tarball":"https://registry.npmjs.org/@apexmed/forms/-/forms-0.1.0-next.2.tgz","fileCount":6,"unpackedSize":301121,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDt8nyT6ICAkHv/Km2jT82/aIuLJQUslgHiuXXYurb7nAIgfGSDPaokgI+40zXc9SIkqzk+eNNpt65vhYZnCt7bkZ0="}]},"_npmUser":{"name":"c-bredenkamp","email":"dr.cdbredenkamp@gmail.com"},"directories":{},"maintainers":[{"name":"c-bredenkamp","email":"dr.cdbredenkamp@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/forms_0.1.0-next.2_1787311947046_0.33937530002275973"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-21T11:32:26.857Z","0.1.0-next.2":"2026-08-21T11:32:27.210Z","modified":"2026-08-21T11:32:27.407Z"},"maintainers":[{"name":"c-bredenkamp","email":"dr.cdbredenkamp@gmail.com"}],"description":"Headless form model, validation, and tag binding for Apex DOCX templates.","homepage":"https://github.com/Apex-Med/apex-docx-pdf#readme","keywords":["forms","templates","docx"],"repository":{"type":"git","url":"git+https://github.com/Apex-Med/apex-docx-pdf.git","directory":"packages/forms"},"bugs":{"url":"https://github.com/Apex-Med/apex-docx-pdf/issues"},"license":"Apache-2.0","readme":"# Apex DOCX PDF\n\nA Bun-first, deterministic DOCX-template-to-PDF engine and TanStack Start reference application.\n\nThe project is being built around an explicit supported DOCX profile. It performs its own template compilation, document layout, pagination, and PDF rendering without LibreOffice, Chromium, Microsoft Word, or an external conversion API.\n\nPhases 1–8 are implemented under engine compatibility version `0.0.0-phase.8`, with local Phase 9 hardening evidence and Phase 10 prerelease preparation checked in. The renderer supports the bounded Phase 6 DOCX profile—inline PNG/JPEG images, multiple `nextPage` sections, portrait/landscape geometry, inherited default headers and footers, and decimal `PAGE`/`NUMPAGES` fields—plus canonical `{{@image path}}` values backed by caller-owned bytes and dimensions. The public playground is local-only: documents and data stay in the browser and cloud persistence is not exposed. PDF output is deterministic, searchable, source-linked, and upright; repeated image bytes are deduplicated into stable XObjects, with PNG alpha emitted as an `/SMask`.\n\nThe image profile remains deliberately bounded. Static images must be internal DOCX relationships with explicit positive DrawingML dimensions; dynamic images must use canonical `{{@image path}}` tags and resolve to explicit PNG/JPEG bytes, pixel dimensions, and physical twip bounds before layout. The renderer performs no image fetch and does not support anchors/floating placement, crop, rotation, SVG, or broad color-profile conversion. Dynamic alt text is retained in the semantic document, but the current PDF is untagged. Explicit left/start Word tab stops are supported only at positive integer-twip positions with no leader; default and non-left tab behavior is rejected. Configured TrueType fonts are deterministically subsetted with exact source-to-subset glyph maps. Section-scoped first-page headers and footers are supported through `w:titlePg`. Continuous/odd/even section breaks, even-page headers, automatic header/footer numbering, complex scripts, CFF embedding, variable-font axis instantiation, complete Word autofit, production identity/authorization, and broad Word/Google-export/production-readiness claims remain outside the current boundary.\n\nThe local-only reference playground is deployed at [pdf-docx.apexmed.dev](https://pdf-docx.apexmed.dev), with [docx-pdf.apexmed.dev](https://docx-pdf.apexmed.dev) as an additional verified alias. That hosted browser surface is verified; it is not a persistent SaaS or production-identity claim.\n\nThe `apex-docx-pdf` umbrella and public `@apexmed/*` packages are published on npm at `0.1.0-next.2`. Install the recommended facade with `bun add apex-docx-pdf@next`; browser-worker bindings, the headless form model, and React devtools remain opt-in through `@apexmed/browser`, `@apexmed/forms`, and `@apexmed/devtools`. A clean registry-only install loads the lockstep public set under both Bun and Node, verifies registry signatures, and confirms that the umbrella includes its agent instructions, context, skills, and template inspector. The direct `next.1` fallback release has no npm provenance attestation because GitHub Actions cancelled the approved workflow without starting a step during a major service outage; all packages remain bound to the protected GitHub trusted publisher for a future provenance-bearing prerelease.\n\nThe umbrella tarball also includes agent-readable integration material. Start with `node_modules/apex-docx-pdf/AGENTS.md` or the manifest's `ai` field, then load `ai/CONTEXT.md` and the relevant shipped skill. `integrate-apex-docx-pdf` covers safe runtime adoption; `generate-compatible-docx-template` covers DOCX authoring and includes a runnable strict template inspector; `bind-apex-form` covers mapping `@apexmed/forms` answers onto template tags. Package validation and the isolated consumer smoke require those exact files and execute the inspector from the packed install.\n\n## Development\n\n```bash\nbun install --frozen-lockfile\nbun run dev\n```\n\n`bun run dev` starts the Turbo application tasks. Convex foundations remain in the repository for possible future SaaS work, but the current playground does not expose cloud persistence and does not require a Convex process.\n\nThe web application is available at [http://localhost:3000](http://localhost:3000).\n\nDocumentation is authored and previewed with Mintlify from `docs/`:\n\n```bash\nbun run docs:dev\n```\n\nThe Mintlify preview runs at [http://localhost:3001](http://localhost:3001). In development the web application links Documentation there. Set `VITE_DOCS_URL` to the deployed Mintlify origin for production; without it, `/docs` deliberately shows a configuration-required handoff.\n\nRun the repository quality gates with:\n\n```bash\nbun run lint\nbun run typecheck\nbun test\nbun run docs:check\nbun run build\n```\n\nThe root typecheck includes the generated Convex functions as well as every Turbo workspace.\n\nLinting uses exact-pinned Biome 2.5.9 with warnings treated as failures. Prettier remains the formatter so Tailwind class ordering stays consistent with the scaffold.\n\n## Adding components\n\nAdd shadcn components from the repository root with Bun:\n\n```bash\nbunx --bun shadcn@latest add button -c apps/web\n```\n\nThis will place the ui components in the `packages/ui/src/components` directory.\n\n## Using components\n\nTo use the components in your app, import them from the `ui` package.\n\n```tsx\nimport { Button } from \"@workspace/ui/components/button\"\n```\n\n## Architecture\n\nThe engine pipeline is deliberately staged:\n\n```text\nDOCX bytes -> validated package -> parsed OOXML -> semantic document\n-> compiled template -> resolved document -> layout -> display list -> PDF bytes\n```\n\nSee [docs/architecture.md](docs/architecture.md) for package boundaries, invariants, and the current supported slices.\n\nAuthoring and compatibility details live in the [template language](docs/template-language.mdx), [authoring guide](docs/authoring.mdx), and [support matrix](docs/supported-features.mdx).\n","readmeFilename":"README.md","_rev":"1-a5a60a91b7d95bd156b6465ad3816d72"}