{"_id":"@aero-js/core","_rev":"4-2d4472d1adf335b5dbab634e56938c54","name":"@aero-js/core","dist-tags":{"latest":"0.4.0"},"versions":{"0.3.3":{"name":"@aero-js/core","version":"0.3.3","author":{"name":"Jamie Wilson"},"license":"MIT","_id":"@aero-js/core@0.3.3","maintainers":[{"name":"jmwlsn","email":"jamie@jamiewilson.io"}],"homepage":"https://github.com/jamiewilson/aero","bugs":{"url":"https://github.com/jamiewilson/aero/issues"},"dist":{"shasum":"aed393f40373840a832784839fef9ad549a0e026","tarball":"https://registry.npmjs.org/@aero-js/core/-/core-0.3.3.tgz","fileCount":25,"integrity":"sha512-D7E08A/tvhFcAFAH5h5r8HqhlgigCO8ASo5v8a8S7TEut/2DZ82b5C5bWDNICIFwK2zi0eZXED3pC4eH1fKmFA==","signatures":[{"sig":"MEUCIQDXb5CPYmsiOo9iPIQ6ebGMJbL+cC08y6BN7qC4H6ZxIQIgW0aVGXJY1TtOTyYZbsY5kynFSS9RzQf2NH7AJzEOnCo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":149846},"type":"module","_from":"file:aero-js-core-0.3.3.tgz","types":"./dist/entry-dev.d.mts","exports":{".":{"types":"./dist/entry-dev.d.mts","default":"./dist/entry-dev.mjs"},"./env":"./env.d.ts","./vite":{"types":"./dist/vite/index.d.mts","default":"./dist/vite/index.mjs"},"./types":"./dist/types.d.mts","./editor":{"types":"./dist/entry-editor.d.mts","default":"./dist/entry-editor.mjs"},"./runtime":{"types":"./dist/runtime/index.d.mts","default":"./dist/runtime/index.mjs"},"./entry-prod":{"types":"./dist/entry-prod.d.mts","default":"./dist/entry-prod.mjs"},"./utils/aliases":{"types":"./dist/utils/aliases.d.mts","default":"./dist/utils/aliases.mjs"},"./utils/redirects":{"types":"./dist/utils/redirects.d.mts","default":"./dist/utils/redirects.mjs"},"./runtime/instance":{"types":"./dist/runtime/instance.d.mts","default":"./dist/runtime/instance.mjs"}},"private":false,"scripts":{"test":"vitest run","build":"tsdown","typecheck":"tsc --noEmit"},"_npmUser":{"name":"jmwlsn","email":"jamie@jamiewilson.io"},"_resolved":"/private/var/folders/yc/828p39ws2lxgqcb96h4qdbjm0000gn/T/d9dbcf38da999dd1603ed0c64a319719/aero-js-core-0.3.3.tgz","_integrity":"sha512-D7E08A/tvhFcAFAH5h5r8HqhlgigCO8ASo5v8a8S7TEut/2DZ82b5C5bWDNICIFwK2zi0eZXED3pC4eH1fKmFA==","repository":{"url":"git+https://github.com/jamiewilson/aero.git","type":"git","directory":"packages/core"},"_npmVersion":"10.9.3","description":"The core package of the Aero static site generator. It provides the compiler, runtime, and Vite plugin that power Aero’s HTML-first template engine, component system, and build pipeline.","directories":{},"_nodeVersion":"22.18.0","dependencies":{"svgo":"^4.0.0","nitro":"^3.0.1-alpha.2","sharp":"^0.34.5","linkedom":"^0.18.12","oxc-parser":"^0.115.0","get-tsconfig":"^4.13.6","oxc-resolver":"^11.19.0","oxc-transform":"^0.116.0","html-minifier-next":"^5.1.1","@aero-js/interpolation":"0.3.3","vite-plugin-image-optimizer":"^2.0.3"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.21.0-beta.2","vitest":"^4.0.18","typescript":"^5.9.3","@types/node":"^25.3.0"},"peerDependencies":{"vite":"^8.0.0-0"},"peerDependenciesMeta":{"vite":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/core_0.3.3_1772817347618_0.6526197599519612","host":"s3://npm-registry-packages-npm-production"}},"0.3.4":{"name":"@aero-js/core","version":"0.3.4","author":{"name":"Jamie Wilson"},"license":"MIT","_id":"@aero-js/core@0.3.4","maintainers":[{"name":"jmwlsn","email":"jamie@jamiewilson.io"}],"homepage":"https://github.com/jamiewilson/aero","bugs":{"url":"https://github.com/jamiewilson/aero/issues"},"dist":{"shasum":"2a6ffda9871f9176403f24a5c92c472db99a6d98","tarball":"https://registry.npmjs.org/@aero-js/core/-/core-0.3.4.tgz","fileCount":25,"integrity":"sha512-yTwGaRcD6NuH8vTKyhwrK9de7pXbuSl6Ji+tZBrurgbALB+oim3f00NPFBJ9JC+l8UgKBW42SXLJ8N/mRFpMsA==","signatures":[{"sig":"MEUCIHdcGS81KxpBJNg+/opxoSfpK8Tk9NFEBjaoWrcZA++PAiEArqdqeUh7AN86CigT2yqyssE2yV35+TUsJDw8suUkl6o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":150551},"type":"module","_from":"file:aero-js-core-0.3.4.tgz","types":"./dist/entry-dev.d.mts","exports":{".":{"types":"./dist/entry-dev.d.mts","default":"./dist/entry-dev.mjs"},"./env":"./env.d.ts","./vite":{"types":"./dist/vite/index.d.mts","default":"./dist/vite/index.mjs"},"./types":"./dist/types.d.mts","./editor":{"types":"./dist/entry-editor.d.mts","default":"./dist/entry-editor.mjs"},"./runtime":{"types":"./dist/runtime/index.d.mts","default":"./dist/runtime/index.mjs"},"./entry-prod":{"types":"./dist/entry-prod.d.mts","default":"./dist/entry-prod.mjs"},"./utils/aliases":{"types":"./dist/utils/aliases.d.mts","default":"./dist/utils/aliases.mjs"},"./utils/redirects":{"types":"./dist/utils/redirects.d.mts","default":"./dist/utils/redirects.mjs"},"./runtime/instance":{"types":"./dist/runtime/instance.d.mts","default":"./dist/runtime/instance.mjs"}},"private":false,"scripts":{"test":"vitest run","build":"tsdown","typecheck":"tsc --noEmit"},"_npmUser":{"name":"jmwlsn","email":"jamie@jamiewilson.io"},"_resolved":"/private/var/folders/yc/828p39ws2lxgqcb96h4qdbjm0000gn/T/22e1753cdfd5af3dcb7cd6fc4b58c3e2/aero-js-core-0.3.4.tgz","_integrity":"sha512-yTwGaRcD6NuH8vTKyhwrK9de7pXbuSl6Ji+tZBrurgbALB+oim3f00NPFBJ9JC+l8UgKBW42SXLJ8N/mRFpMsA==","repository":{"url":"git+https://github.com/jamiewilson/aero.git","type":"git","directory":"packages/core"},"_npmVersion":"10.9.3","description":"The core package of the Aero static site generator. It provides the compiler, runtime, and Vite plugin that power Aero’s HTML-first template engine, component system, and build pipeline.","directories":{},"_nodeVersion":"22.18.0","dependencies":{"svgo":"^4.0.0","nitro":"^3.0.1-alpha.2","sharp":"^0.34.5","linkedom":"^0.18.12","oxc-parser":"^0.115.0","get-tsconfig":"^4.13.6","oxc-resolver":"^11.19.0","oxc-transform":"^0.116.0","html-minifier-next":"^5.1.1","@aero-js/interpolation":"0.3.4","vite-plugin-image-optimizer":"^2.0.3"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.21.0-beta.2","vitest":"^4.0.18","typescript":"^5.9.3","@types/node":"^25.3.0"},"peerDependencies":{"vite":"^8.0.0-0"},"peerDependenciesMeta":{"vite":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/core_0.3.4_1773676592620_0.25903357859092013","host":"s3://npm-registry-packages-npm-production"}},"0.3.5":{"name":"@aero-js/core","version":"0.3.5","author":{"name":"Jamie Wilson"},"license":"MIT","_id":"@aero-js/core@0.3.5","maintainers":[{"name":"jmwlsn","email":"jamie@jamiewilson.io"}],"homepage":"https://github.com/jamiewilson/aero","bugs":{"url":"https://github.com/jamiewilson/aero/issues"},"dist":{"shasum":"37c3443ca589e1b6030f989a965199c39c701a7e","tarball":"https://registry.npmjs.org/@aero-js/core/-/core-0.3.5.tgz","fileCount":25,"integrity":"sha512-1Q+Q1yInAwmZduDiEBl2klPVoKYykcFAqGaLnAlDo3+jx+KmFfFrzkcKLwxu2te4QL17e+MwieQ1pATVaw+M/w==","signatures":[{"sig":"MEUCIQCpXJV+RIfDm9c/WlaEvW3bOHgcoWnzqJqF88MimGGM8wIgDDcFqUXC9OVTE1q1XTsGKrZVdoczKMPUjajsVXYlQcc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":153458},"type":"module","_from":"file:aero-js-core-0.3.5.tgz","types":"./dist/entry-dev.d.mts","exports":{".":{"types":"./dist/entry-dev.d.mts","default":"./dist/entry-dev.mjs"},"./env":"./env.d.ts","./vite":{"types":"./dist/vite/index.d.mts","default":"./dist/vite/index.mjs"},"./types":"./dist/types.d.mts","./editor":{"types":"./dist/entry-editor.d.mts","default":"./dist/entry-editor.mjs"},"./runtime":{"types":"./dist/runtime/index.d.mts","default":"./dist/runtime/index.mjs"},"./entry-prod":{"types":"./dist/entry-prod.d.mts","default":"./dist/entry-prod.mjs"},"./utils/aliases":{"types":"./dist/utils/aliases.d.mts","default":"./dist/utils/aliases.mjs"},"./utils/redirects":{"types":"./dist/utils/redirects.d.mts","default":"./dist/utils/redirects.mjs"},"./runtime/instance":{"types":"./dist/runtime/instance.d.mts","default":"./dist/runtime/instance.mjs"}},"private":false,"scripts":{"test":"vitest run","build":"tsdown","typecheck":"tsc --noEmit"},"_npmUser":{"name":"jmwlsn","email":"jamie@jamiewilson.io"},"_resolved":"/private/var/folders/yc/828p39ws2lxgqcb96h4qdbjm0000gn/T/06c716fe24cfb09b8171d32946c3c277/aero-js-core-0.3.5.tgz","_integrity":"sha512-1Q+Q1yInAwmZduDiEBl2klPVoKYykcFAqGaLnAlDo3+jx+KmFfFrzkcKLwxu2te4QL17e+MwieQ1pATVaw+M/w==","repository":{"url":"git+https://github.com/jamiewilson/aero.git","type":"git","directory":"packages/core"},"_npmVersion":"10.9.3","description":"The core package of the Aero static site generator. It provides the compiler, runtime, and Vite plugin that power Aero’s HTML-first template engine, component system, and build pipeline.","directories":{},"_nodeVersion":"22.18.0","dependencies":{"svgo":"^4.0.0","nitro":"^3.0.1-alpha.2","sharp":"^0.34.5","linkedom":"^0.18.12","oxc-parser":"^0.115.0","get-tsconfig":"^4.13.6","oxc-resolver":"^11.19.0","oxc-transform":"^0.116.0","html-minifier-next":"^5.1.1","@aero-js/interpolation":"0.3.5","vite-plugin-image-optimizer":"^2.0.3"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.21.0-beta.2","vitest":"^4.0.18","typescript":"^5.9.3","@types/node":"^25.3.0"},"peerDependencies":{"vite":"^8.0.0-0"},"peerDependenciesMeta":{"vite":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/core_0.3.5_1773848984222_0.07829018797342546","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@aero-js/core","version":"0.4.0","private":false,"homepage":"https://github.com/jamiewilson/aero","license":"MIT","author":{"name":"Jamie Wilson"},"repository":{"type":"git","url":"git+https://github.com/jamiewilson/aero.git","directory":"packages/core"},"type":"module","types":"./dist/entry-dev.d.mts","exports":{".":{"types":"./dist/entry-dev.d.mts","default":"./dist/entry-dev.mjs"},"./entry-prod":{"types":"./dist/entry-prod.d.mts","default":"./dist/entry-prod.mjs"},"./vite":{"types":"./dist/vite/index.d.mts","default":"./dist/vite/index.mjs"},"./runtime":{"types":"./dist/runtime/index.d.mts","default":"./dist/runtime/index.mjs"},"./runtime/standalone":{"types":"./dist/runtime/standalone.d.mts","default":"./dist/runtime/standalone.mjs"},"./runtime/instance":{"types":"./dist/runtime/instance.d.mts","default":"./dist/runtime/instance.mjs"},"./types":"./dist/types.d.mts","./utils/aliases":{"types":"./dist/utils/aliases.d.mts","default":"./dist/utils/aliases.mjs"},"./utils/redirects":{"types":"./dist/utils/redirects.d.mts","default":"./dist/utils/redirects.mjs"},"./editor":{"types":"./dist/entry-editor.d.mts","default":"./dist/entry-editor.mjs"},"./diagnostics":{"types":"./dist/diagnostics.d.mts","default":"./dist/diagnostics.mjs"},"./compile-check":{"types":"./dist/compile-check-api.d.mts","default":"./dist/compile-check-api.mjs"},"./routing/route-manifest":{"types":"./dist/routing/route-manifest.d.mts","default":"./dist/routing/route-manifest.mjs"},"./routing/route-typegen":{"types":"./dist/routing/route-typegen.d.mts","default":"./dist/routing/route-typegen.mjs"},"./env":"./env.d.ts"},"dependencies":{"effect":"^3.21.0","get-tsconfig":"^4.13.7","html-minifier-next":"^5.2.2","jiti":"^2.6.1","linkedom":"^0.18.12","nitro":"3.0.260311-beta","oxc-resolver":"^11.19.1","sharp":"^0.34.5","svgo":"^4.0.1","vite-plugin-image-optimizer":"^2.0.3","@aero-js/diagnostics":"0.4.0","@aero-js/compiler":"0.4.0","@aero-js/interpolation":"0.4.0"},"devDependencies":{"@types/node":"^25.5.0","tsdown":"^0.21.7","typescript":"^6.0.2","vitest":"^4.1.2"},"peerDependencies":{"vite":"8.0.3"},"peerDependenciesMeta":{"vite":{"optional":true}},"scripts":{"build":"tsdown","typecheck":"tsc --noEmit","test":"vitest run"},"_id":"@aero-js/core@0.4.0","description":"The core package of the Aero static site generator. It provides the compiler, runtime, and Vite plugin that power Aero’s HTML-first template engine, component system, and build pipeline.","bugs":{"url":"https://github.com/jamiewilson/aero/issues"},"_integrity":"sha512-ajF2HsKQHANbNBndZVmvgdwxIYS46VP7vYtWql9dXt7OSG0gq2Dq4Fjs6CVBK7UVXHoNoyBVCGJKWmvkLIIu7A==","_resolved":"/private/var/folders/yc/828p39ws2lxgqcb96h4qdbjm0000gn/T/a304da675c9ef01a8bf6cc339e56fcc8/aero-js-core-0.4.0.tgz","_from":"file:aero-js-core-0.4.0.tgz","_nodeVersion":"24.15.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-ajF2HsKQHANbNBndZVmvgdwxIYS46VP7vYtWql9dXt7OSG0gq2Dq4Fjs6CVBK7UVXHoNoyBVCGJKWmvkLIIu7A==","shasum":"3f413db219927c47605ac45735b8a1e7e8a25014","tarball":"https://registry.npmjs.org/@aero-js/core/-/core-0.4.0.tgz","fileCount":39,"unpackedSize":169385,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFiQDJRiqgJle8y0l0wluBDNyAQAelu4Vg8fM+0D8oZAAiBGYUiKa0LHXRlzQmZdsRO8GKe2K5/EOAVfZ2NCGOJCXw=="}]},"_npmUser":{"name":"jmwlsn","email":"jamie@jamiewilson.io"},"directories":{},"maintainers":[{"name":"jmwlsn","email":"jamie@jamiewilson.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/core_0.4.0_1777591028542_0.34306183592133244"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-06T17:15:47.424Z","modified":"2026-04-30T23:17:08.998Z","0.3.3":"2026-03-06T17:15:47.767Z","0.3.4":"2026-03-16T15:56:32.770Z","0.3.5":"2026-03-18T15:49:44.578Z","0.4.0":"2026-04-30T23:17:08.727Z"},"bugs":{"url":"https://github.com/jamiewilson/aero/issues"},"author":{"name":"Jamie Wilson"},"license":"MIT","homepage":"https://github.com/jamiewilson/aero","repository":{"type":"git","url":"git+https://github.com/jamiewilson/aero.git","directory":"packages/core"},"description":"The core package of the Aero static site generator. It provides the compiler, runtime, and Vite plugin that power Aero’s HTML-first template engine, component system, and build pipeline.","maintainers":[{"name":"jmwlsn","email":"jamie@jamiewilson.io"}],"readme":"# @aero-js/core\n\nThe core package of the Aero static site generator. It provides the compiler, runtime, and Vite plugin that power Aero’s HTML-first template engine, component system, and build pipeline.\n\n## Overview\n\n- **Compiler** — Parses Aero HTML templates, extracts script blocks, and compiles templates into async render functions (DOM → IR → JS).\n- **Runtime** — Renders pages and components with context; supports props, slots, globals, and 404 handling.\n- **Vite plugin** — Integrates templates into the Vite build: virtual client modules, HMR, static generation, optional Nitro and image optimization.\n\n## Exports\n\n| Export                           | Description                                                                                      |\n| -------------------------------- | ------------------------------------------------------------------------------------------------ |\n| `@aero-js/core`                  | Default: shared `aero` instance with `mount()` for the client entry.                             |\n| `@aero-js/vite`                  | `aero()` Vite plugin for build and dev. (Re-exported from core.)                                 |\n| `@aero-js/core/runtime`          | `Aero` class for programmatic rendering.                                                         |\n| `@aero-js/core/runtime/instance` | Shared `aero` instance and `onUpdate` for HMR.                                                   |\n| `@aero-js/core/types`            | Shared TypeScript types.                                                                         |\n| `@aero-js/core/diagnostics`      | Re-exports `@aero-js/diagnostics` (`AeroDiagnostic`, formatters, mappers).                       |\n| `@aero-js/core/compile-check`    | **Node-only:** `compileTemplate` for tooling (e.g. `aero check`). Do not use in browser bundles. |\n| `@aero-js/core/utils/aliases`    | `loadTsconfigAliases`, `mergeWithDefaultAliases`, `jitiAliasRecordFromProject`, `resolveDirs`.   |\n\n## Script taxonomy\n\nScript blocks are classified by attributes (see [Scripts](https://github.com/jamiewilson/aero/blob/main/docs/concepts/scripts.mdx) in the repo):\n\n| Script type | Attribute              | When it runs      | Notes                                                                                     |\n| ----------- | ---------------------- | ----------------- | ----------------------------------------------------------------------------------------- |\n| Build       | `<script is:build>`    | Build time (Node) | One per template; compiles into the render module. Access `aero.props`, globals, imports. |\n| Client      | Plain `<script>`       | Browser           | Bundled as a Vite virtual module; HMR. Use `props` to inject build-time data.             |\n| Inline      | `<script is:inline>`   | Browser           | Left in place; not bundled. For critical inline scripts (e.g. theme FOUC prevention).     |\n| Blocking    | `<script is:blocking>` | Browser           | Extracted and emitted in `<head>`.                                                        |\n\n## Features\n\n### Template compiler\n\n- Parses templates and extracts `<script is:build>`, client (plain `<script>`), `<script is:inline>`, and `<script is:blocking>` blocks.\n- Lowers template DOM to an **IR** (intermediate representation), then emits a single async render function with `{ }` interpolation.\n- Supports components, slots, `for` / `data-for`, `if` / `else-if` / `else`, and `props` on scripts and styles.\n\n**Example**\n\n```html\n<script is:build>\n\timport header from '@components/header'\n\tconst { title } = aero.props\n</script>\n<header-component title=\"{ title }\" />\n```\n\n### Runtime\n\n- **Aero** class: `global()`, `registerPages()`, `render()`, `renderComponent()`.\n- Context includes globals (e.g. from content), props, slots, request, url, params.\n- Resolves pages by name with fallbacks (index, trailing slash, `getStaticPaths`); returns `null` for 404 when no static path matches.\n\n**Example**\n\n```js\nimport { Aero } from '@aero-js/core/runtime'\nconst aero = new Aero()\naero.global('site', { title: 'My Site' })\n// … registerPages, then:\nconst html = await aero.render('index', { props: { title: 'Home' } })\n```\n\n### Vite plugin\n\n- **Plugin** from `@aero-js/vite`: `aero(options?)`. Options: `server`, `apiPrefix`, `dirs`, `site` (canonical URL; exposed as `import.meta.env.SITE` and `Aero.site`; when set, generates `dist/sitemap.xml` after build).\n- Sub-plugins: config resolution, virtual client modules (`\\0`-prefixed), HTML transform, SSR middleware, HMR.\n- Build: page discovery, static render, optional Nitro build, optional image optimizer (sharp/svgo).\n\n**Example**\n\n```js\nimport { aero } from '@aero-js/vite'\nexport default {\n\tplugins: [aero({ server: true })],\n}\n```\n\nApps typically use `createViteConfig` from `@aero-js/config/vite` with `defineConfig` from `@aero-js/config` in `aero.config.ts`, which wires the Aero plugin for them.\n\n### Client entry\n\nThe default export of `@aero-js/core` is the shared `aero` instance with `mount(options?)` attached. Use it as the browser entry (e.g. in your main script). It does not perform an initial render; it attaches to a root element and subscribes to HMR re-renders in dev.\n\n```js\nimport aero from '@aero-js/core'\naero.mount({\n\ttarget: '#app',\n\tonRender: el => {\n\t\t/* optional */\n\t},\n})\n```\n\n### Components and layouts\n\n- Components: use `-component` suffix in markup; import without suffix (e.g. `@components/header` → `header.html`).\n- Layouts: use `-layout` and `<slot>` (with `name` and optional `slot` attribute).\n- Props: attributes or `props` / `props=\"{ ... }\"`. In build script, read via `aero.props`.\n\n### Path aliases and client stack\n\n- Path aliases (e.g. `@components/*`, `@layouts/*`, `@content/*`) are resolved from the project tsconfig.\n- Alpine.js and HTMX attributes (e.g. `x-data`, `:disabled`, `hx-post`) are preserved; attributes matching `^(x-|[@:.]).*` are not interpolated.\n\n## File structure\n\nTemplate compilation lives in **`@aero-js/compiler`**; this package integrates it via the Vite plugin and runtime.\n\n```\nsrc/\n  vite/         # aero() plugin, static build, build manifest, SSR helpers\n  runtime/      # Aero class, instance, client entry helpers\n  utils/        # aliases, routing\n  compile-check-api.ts   # re-exports for aero check\n  types.ts, entry-*.ts, ambient.d.ts, diagnostics.ts, index.ts\n```\n\n## Tests\n\nVitest: `src/runtime/__tests__/`, `src/utils/__tests__/`, `src/vite/__tests__/`. Run from repo root: `pnpm test` (see workspace scripts for package-scoped runs).\n","readmeFilename":"README.md"}