@takazudo/zfb 0.1.0-next.74 → 0.1.0-next.76

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,55 @@
1
+ // Extracted from zfb.mjs so the detection decision can be unit-tested
2
+ // without triggering zfb.mjs's top-level exec/spawn side effects. Pure and
3
+ // dependency-injectable: production callers can omit every option.
4
+ import { readdirSync } from "node:fs";
5
+
6
+ const MUSL_LOADER_DIR = "/lib";
7
+ const MUSL_LOADER_PREFIX = "ld-musl-";
8
+
9
+ // True if a musl dynamic loader file is present (e.g. Alpine's
10
+ // /lib/ld-musl-x86_64.so.1). Reading the directory and matching the prefix
11
+ // covers every arch's loader filename with one probe instead of hardcoding
12
+ // an existsSync path per arch. Mirrors the loader-file probe used by the
13
+ // widely-adopted `detect-libc` npm package.
14
+ function hasMuslLoaderFile(readdirSyncFn) {
15
+ try {
16
+ return readdirSyncFn(MUSL_LOADER_DIR).some((name) => name.startsWith(MUSL_LOADER_PREFIX));
17
+ } catch {
18
+ return false;
19
+ }
20
+ }
21
+
22
+ function defaultGetReport() {
23
+ return process.report?.getReport?.();
24
+ }
25
+
26
+ // True if Node's process.report exposes a glibc runtime version. glibc-built
27
+ // Node populates header.glibcVersionRuntime; musl-built Node does not. Used
28
+ // only as a fallback signal when the loader-file probe above is inconclusive.
29
+ function hasGlibcVersionRuntime(getReportFn) {
30
+ try {
31
+ return Boolean(getReportFn()?.header?.glibcVersionRuntime);
32
+ } catch {
33
+ return false;
34
+ }
35
+ }
36
+
37
+ /**
38
+ * Detects musl libc (e.g. Alpine) on Linux, where the gnu-built platform
39
+ * binary would otherwise fail with an opaque dynamic-loader exec error
40
+ * instead of a clear "not supported" message. Always returns false on
41
+ * non-linux platforms (darwin, win32) — zero behavior change there.
42
+ */
43
+ export function detectMuslLinux({
44
+ platform = process.platform,
45
+ readdirSyncFn = readdirSync,
46
+ getReportFn = defaultGetReport,
47
+ } = {}) {
48
+ if (platform !== "linux") return false;
49
+ // The glibc runtime report is authoritative when present: a Node process
50
+ // that reports a glibc version is definitely glibc-linked and will work,
51
+ // regardless of an unrelated musl loader file sitting on the filesystem
52
+ // (e.g. a `musl` package installed on Debian/Ubuntu for other reasons).
53
+ if (hasGlibcVersionRuntime(getReportFn)) return false;
54
+ return hasMuslLoaderFile(readdirSyncFn);
55
+ }
package/bin/zfb.mjs CHANGED
@@ -10,6 +10,7 @@ import { spawn } from "node:child_process";
10
10
  import { createRequire } from "node:module";
11
11
  import { constants as osConstants } from "node:os";
12
12
  import { join } from "node:path";
13
+ import { detectMuslLinux } from "./detect-musl.mjs";
13
14
 
14
15
  const require = createRequire(import.meta.url);
15
16
 
@@ -32,6 +33,18 @@ if (!pkg) {
32
33
  process.exit(1);
33
34
  }
34
35
 
36
+ // The gnu-built binary above matches on os/cpu but not on libc: an
37
+ // Alpine/musl-libc Linux install passes the os/cpu check yet would still
38
+ // fail to exec, with a raw, confusing dynamic-loader error. Detect and fail
39
+ // with a clear message before attempting to resolve/spawn the binary.
40
+ if (detectMuslLinux()) {
41
+ console.error(
42
+ "[zfb] musl/Alpine is not supported yet — no @takazudo/zfb-linux-*-musl package exists.\n" +
43
+ " Use a glibc-based Linux image (e.g. Debian/Ubuntu) instead of Alpine.",
44
+ );
45
+ process.exit(1);
46
+ }
47
+
35
48
  let binPath;
36
49
  try {
37
50
  // Resolve the platform package's package.json to get the install directory.
@@ -52,4 +52,3 @@
52
52
  * pipeline rewrites it to the hashed URL; dev serves the stable URL directly.
53
53
  */
54
54
  export declare function clientScript(name: string): string;
55
- //# sourceMappingURL=client-script.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client-script.js","sourceRoot":"","sources":["../src/client-script.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,sFAAsF;AACtF,MAAM,yBAAyB,GAAG,iBAAiB,CAAC;AAEpD;;;;;;;;GAQG;AACH,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,qEAAqE;IACrE,uEAAuE;IACvE,iEAAiE;IACjE,uEAAuE;IACvE,uEAAuE;IACvE,4DAA4D;IAC5D,MAAM,IAAI,GAAI,UAAsC,CAAC,KAAsC,CAAC;IAC5F,MAAM,MAAM,GAAG,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC;IAChC,OAAO,GAAG,MAAM,GAAG,yBAAyB,GAAG,IAAI,KAAK,CAAC;AAC3D,CAAC"}
1
+ {"version":3,"file":"client-script.js","sourceRoot":"","sources":["../src/client-script.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,sFAAsF;AACtF,MAAM,yBAAyB,GAAG,iBAAiB,CAAC;AAEpD;;;;;;;;GAQG;AACH,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,qEAAqE;IACrE,uEAAuE;IACvE,iEAAiE;IACjE,uEAAuE;IACvE,uEAAuE;IACvE,4DAA4D;IAC5D,MAAM,IAAI,GAAI,UAAsC,CAAC,KAAsC,CAAC;IAC5F,MAAM,MAAM,GAAG,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC;IAChC,OAAO,GAAG,MAAM,GAAG,yBAAyB,GAAG,IAAI,KAAK,CAAC;AAC3D,CAAC","sourcesContent":["/**\n * SSR helper for referencing a client-script asset URL in a page or layout.\n *\n * ## Usage\n *\n * ```tsx\n * import { clientScript } from \"@takazudo/zfb\";\n *\n * export default function MyPage() {\n * return (\n * <html>\n * <head>\n * <script type=\"module\" src={clientScript(\"search-widget\")} />\n * </head>\n * <body>…</body>\n * </html>\n * );\n * }\n * ```\n *\n * ## How it works\n *\n * `clientScript(name)` returns the **stable URL** for the named client-script\n * entry: `${base}/assets/client/<name>.js`. The production build pipeline\n * (`ProductionAssetPipeline`) rewrites every occurrence of this stable URL in\n * rendered HTML to the content-hashed equivalent\n * (`/assets/client/<name>-<hash>.js`), so the hash never needs to be known at\n * SSR time.\n *\n * The `base` prefix is read from `globalThis.__zfb?.base` (emitted by the\n * bundler when at least one `*.client.*` file exists in the project). For\n * root-mounted sites (`base` is absent or `\"/\"`), the prefix is the empty\n * string and `clientScript(\"search-widget\")` returns\n * `\"/assets/client/search-widget.js\"`. For a sub-path deploy\n * (`base=\"/foo/\"`), it returns `\"/foo/assets/client/search-widget.js\"`.\n *\n * ## SSR-only note (v1)\n *\n * This is an SSR-time helper. Calling it in browser-executed code works but\n * the base prefix (`globalThis.__zfb.base`) is currently not shipped to the\n * browser — `clientScript()` will return the unprefixed stable URL\n * (`/assets/client/<name>.js`) in that context. For the common use-case of\n * rendering a `<script src>` tag at SSR time this is not a problem.\n */\n\n/** Stable public-URL prefix for client-script entries, matching the Rust constant. */\nconst CLIENT_SCRIPTS_URL_PREFIX = \"/assets/client/\";\n\n/**\n * Returns the base-prefixed stable public URL for the named client-script entry.\n *\n * `name` is the entry name (file stem minus `.client`, e.g. `\"search-widget\"`\n * for `search-widget.client.ts`).\n *\n * The returned URL is `${base}/assets/client/<name>.js`. The production\n * pipeline rewrites it to the hashed URL; dev serves the stable URL directly.\n */\nexport function clientScript(name: string): string {\n // `globalThis.__zfb?.base` is set to the resolved base prefix by the\n // bundler when the project has at least one `*.client.*` entry (#978).\n // For root-mounted or no-base builds the value is `\"\"`, yielding\n // `/assets/client/<name>.js` as expected. The `?? \"\"` fallback handles\n // the edge case where __zfb.base was not emitted (zero-script project,\n // or a browser context where the slot was never populated).\n const base = (globalThis as Record<string, unknown>).__zfb as { base?: string } | undefined;\n const prefix = base?.base ?? \"\";\n return `${prefix}${CLIENT_SCRIPTS_URL_PREFIX}${name}.js`;\n}\n"]}
package/dist/config.d.ts CHANGED
@@ -1056,4 +1056,3 @@ export declare function defineConfig(config: ZfbConfig): ZfbConfig;
1056
1056
  * zfb npm package installed locally.
1057
1057
  */
1058
1058
  export declare function definePreset(sourcePackage: string, config: Partial<ZfbConfig>): Partial<ZfbConfig>;
1059
- //# sourceMappingURL=config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,EAAE;AACF,kEAAkE;AAClE,uEAAuE;AACvE,uEAAuE;AACvE,sEAAsE;AACtE,+BAA+B;AAC/B,EAAE;AACF,yEAAyE;AACzE,uEAAuE;AACvE,uEAAuE;AACvE,kEAAkE;AAClE,EAAE;AACF,uEAAuE;AACvE,uEAAuE;AAykCvE;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,MAAiB;IAC5C,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,YAAY,CAC1B,aAAqB,EACrB,MAA0B;IAE1B,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,OAAO;QACL,GAAG,MAAM;QACT,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;YACrC,IAAI,MAAM,KAAK,IAAI,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;gBAC5E,wEAAwE;gBACxE,mEAAmE;gBACnE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,GAAG,MAAM,EAAE,CAAC;YACtD,CAAC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC,CAAC;KACH,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,EAAE;AACF,kEAAkE;AAClE,uEAAuE;AACvE,uEAAuE;AACvE,sEAAsE;AACtE,+BAA+B;AAC/B,EAAE;AACF,yEAAyE;AACzE,uEAAuE;AACvE,uEAAuE;AACvE,kEAAkE;AAClE,EAAE;AACF,uEAAuE;AACvE,uEAAuE;AAykCvE;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,MAAiB;IAC5C,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,YAAY,CAC1B,aAAqB,EACrB,MAA0B;IAE1B,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,OAAO;QACL,GAAG,MAAM;QACT,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;YACrC,IAAI,MAAM,KAAK,IAAI,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;gBAC5E,wEAAwE;gBACxE,mEAAmE;gBACnE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,GAAG,MAAM,EAAE,CAAC;YACtD,CAAC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC,CAAC;KACH,CAAC;AACJ,CAAC","sourcesContent":["// `zfb/config` — TypeScript helper for the `zfb.config.ts` form.\n//\n// The zfb config loader (`crates/zfb/src/config.rs`) accepts both\n// `zfb.config.ts` and `zfb.config.json`; JSON wins when both files are\n// present, which is the back-compat path for projects predating the TS\n// loader. New projects should prefer the TS form for editor types and\n// `defineConfig` autocomplete.\n//\n// At parse time, zfb bundles the user's `zfb.config.ts` with esbuild and\n// aliases this `zfb/config` import to an internal stub that re-exports\n// `defineConfig` as the identity function — so a user project does not\n// need the `zfb` npm package installed locally just to be parsed.\n//\n// The shape mirrors the Rust `Config` struct one-for-one. Keep them in\n// sync; the `defineConfig` identity helper is the single anchor point.\n\nexport type Framework = \"preact\" | \"react\";\n\nexport type CollectionDef = {\n /** Identifier used at the call site (e.g. `\"blog\"`). */\n name: string;\n /** Directory (relative to the project root) holding the entries. */\n path: string;\n /** Optional schema. Reserved for v1.1 — accepted but not enforced today. */\n schema?: Record<string, unknown>;\n /**\n * Optional include globs (Astro-style, evaluated relative to `path`).\n * When set and non-empty, an entry is kept only if at least one\n * pattern matches its relative path. When omitted or empty, no\n * include-filtering happens. Patterns use the `globset` dialect\n * (Unix-style: `*`, `**`, `?`, `[…]`).\n */\n include?: string[];\n /**\n * Optional exclude globs. When set, an entry is dropped if any\n * pattern matches its relative path. Evaluated AFTER `include`.\n * Together they mirror Astro's `['**\\/*.mdx', '!**\\/*.en.mdx']`\n * convention (zfb splits the negative side into its own field).\n */\n exclude?: string[];\n /**\n * Optional suffix to strip from each kept entry's slug + module\n * specifier. Use with multi-locale layouts where one source\n * directory holds both `foo.mdx` (default locale) and `foo.en.mdx`\n * (locale override) — set `idStripSuffix: \".en\"` so the EN\n * collection's slugs round-trip as `foo` instead of `foo.en`.\n */\n idStripSuffix?: string;\n};\n\nexport type TailwindConfig = {\n /** Whether Tailwind is enabled. Default: `true`. */\n enabled?: boolean;\n};\n\n/**\n * Prefetch options. Mirrors `PrefetchConfig` in `crates/zfb/src/config.rs`.\n */\nexport type PrefetchConfig = {\n /**\n * Disable prefetch entirely.\n *\n * When `true`, the bundler emits `globalThis.__zfb.prefetchDisabled = true`\n * in `entry.mjs`, and `<ClientRouter />` renders\n * `<meta name=\"zfb-prefetch-disabled\" content=\"true\">` in `<head>`.\n * The sibling prefetch-core module reads that meta tag at `init()` time\n * and short-circuits — no prefetch wiring runs.\n *\n * The flag is site-wide and static — set once at bundle-emit time,\n * never recomputed per-page. Default: `false`.\n */\n disabled?: boolean;\n};\n\n/**\n * Bundler options. Mirrors `BundleConfig` in `crates/zfb/src/config.rs`.\n */\nexport type BundleConfig = {\n /**\n * Project-relative glob patterns (gitignore-style) for source files\n * the bundler must NOT pull into the esbuild graph.\n *\n * Why this exists: an eager `import.meta.glob('components/**\\/*.stories.tsx',\n * { eager: true })` expands to a static import of every matched file. If a\n * matched file imports a CJS-only package whose `package.json` resolves only\n * via `main`/`module` or a `require`-only `exports` condition (e.g.\n * `msw` → `path-to-regexp@6`), esbuild — invoked with `--platform=neutral`\n * for the worker bundle — rejects it with \"Could not resolve … Main fields\n * must be configured explicitly when using the neutral platform.\" Listing the\n * offending file here keeps the migration build green.\n *\n * Each pattern is matched against the file's path RELATIVE TO THE PROJECT\n * ROOT, in POSIX form (e.g. `components/Foo.stories.tsx` or\n * `components/**\\/*.stories.tsx`). A matched file is:\n *\n * - never copied/symlinked into the bundler's shadow tree, and\n * - dropped from any eager `import.meta.glob(...)` expansion that would\n * otherwise statically import it.\n *\n * Unset / empty → behaviour is byte-identical to a build without this knob:\n * no files are skipped.\n *\n * Mirrors `Config::bundle` in crates/zfb/src/config.rs.\n */\n exclude?: string[];\n\n /**\n * Explicit esbuild `main-fields` list for the `--platform=neutral` page/SSR\n * pass. Under `neutral` esbuild's main-fields list is EMPTY by default, so a\n * dep resolved purely via `package.json` `main`/`module` (no `exports` map)\n * is rejected (\"The \"main\" field here was ignored. Main fields must be\n * configured explicitly when using the neutral platform.\"). Set e.g.\n * `[\"main\", \"module\"]` to let such CJS-main-only deps resolve (#676 —\n * `msw` → `path-to-regexp@6`). Applies to every framework; unset/empty →\n * byte-identical to a build without the knob (the React-only `main,module`\n * shim still applies).\n *\n * Mirrors `BundleConfig::main_fields` in `crates/zfb/src/config.rs`.\n */\n mainFields?: string[];\n\n /**\n * Bare specifiers to mark external in the `--platform=neutral` page/SSR\n * pass, so esbuild leaves them unbundled instead of resolving them (the\n * other #676 escape hatch — externalize a CJS-only dep rather than\n * resolving it). Appended to the framework-provided externals. Unset/empty\n * → no extra externals.\n *\n * Mirrors `BundleConfig::external` in `crates/zfb/src/config.rs`.\n */\n external?: string[];\n};\n\n/**\n * One plugin entry in `zfb.config.ts`.\n *\n * `name` MUST be a module reference that Node's resolver can locate from\n * the project root. The zfb config loader\n * (`crates/zfb-config-loader/js/config-loader.mjs`) resolves it to an\n * absolute module specifier and the build / dev plugin host loads it via\n * dynamic `import()`:\n *\n * - `\"./plugins/my-plugin.mjs\"` / `\"../shared/plugin.mjs\"` —\n * path-relative to the project root (the dir containing `zfb.config.ts`).\n * - `\"/abs/path/to/plugin.mjs\"` — absolute filesystem path.\n * - `\"@takazudo/zfb-plugin-search\"` / `\"my-plugin\"` — npm bare specifier\n * resolved against the project's `node_modules`.\n *\n * Inline-function hooks are NOT supported; the plugin module's default\n * export must be a [`ZfbPlugin`] (see `@takazudo/zfb/plugins`).\n *\n * `options` is passed verbatim to the plugin's hook contexts; treat\n * the schema as plugin-specific.\n */\nexport type PluginConfig = {\n name: string;\n options?: Record<string, unknown>;\n};\n\nexport type ZfbConfig = {\n /** Output directory for built assets. Default: `dist`. */\n outDir?: string;\n /** Public/static directory copied verbatim. Default: `public`. */\n publicDir?: string;\n /** Optional dev/preview server bind host. */\n host?: string;\n /** Optional dev/preview server port. */\n port?: number;\n /**\n * Host header values the dev/preview server accepts when bound to a\n * non-localhost interface (`--host 0.0.0.0`, the bare `--host` LAN\n * shortcut, or `host` above) — the DNS-rebinding guard, mirroring\n * Vite's `server.allowedHosts`.\n *\n * Defaults: only consulted for non-loopback binds — the default\n * `localhost` bind skips validation entirely. `localhost`, the\n * explicitly bound host, and any IP-literal Host — `127.0.0.1`,\n * `[::1]`, the LAN URLs the startup banner prints — are always\n * allowed (DNS rebinding needs a DNS name, so raw IPs are safe;\n * Vite parity); requests with any other Host get a 403.\n *\n * Matching rules (the request Host's port is stripped first and\n * comparison is case-insensitive):\n *\n * - `\"example.com\"` — matches exactly that host.\n * - `\".example.com\"` (leading dot) — matches `example.com` and every\n * subdomain (`api.example.com`).\n * - IPv6 entries may be written with or without brackets\n * (`\"[::1]\"` / `\"::1\"`).\n *\n * Mirrors `Config::allowed_hosts` in `crates/zfb/src/config.rs`.\n */\n allowedHosts?: string[];\n /** JSX framework runtime. Default: `preact`. */\n framework?: Framework;\n /** Content collections. Mirrors the JSON form one-for-one. */\n collections?: CollectionDef[];\n /** Tailwind options; absent = defaults. */\n tailwind?: TailwindConfig;\n /**\n * Prefetch options. When `disabled: true`, the build emits a meta tag\n * that the runtime's prefetch-core module reads at init time to skip\n * all prefetch wiring. Mirrors `Config::prefetch` in\n * `crates/zfb/src/config.rs`.\n */\n prefetch?: PrefetchConfig;\n /**\n * Bundler options. `bundle.exclude` lists project-relative globs of\n * source files to keep out of the esbuild graph (e.g.\n * `[\"components/*.stories.tsx\"]`) — see {@link BundleConfig.exclude} for\n * why this is needed. Unset → byte-identical to a build without the knob.\n * Mirrors `Config::bundle` in `crates/zfb/src/config.rs`.\n */\n bundle?: BundleConfig;\n /** User-supplied plugins. */\n plugins?: PluginConfig[];\n /**\n * Deploy-target adapter package name. Omit (or `\"none\"`) for a pure\n * static build — any route exporting `prerender = false` is then a\n * hard build error. A package name like\n * `\"@takazudo/zfb-adapter-cloudflare\"` selects the matching adapter,\n * and `zfb build` invokes that package's bin to wrap the SSR bundle\n * into a deploy-ready entry (e.g. `dist/_worker.js` for Cloudflare\n * Workers Static Assets, Pages-compatible).\n *\n * Mirrors `Config::adapter` in crates/zfb/src/config.rs.\n */\n adapter?: string;\n /**\n * Strip `.md` / `.mdx` from internal `<a href>` paths during MDX\n * compilation, and append a trailing `/` so the resulting URL shape\n * converges with the rest of the site (mirrors the JS engine's\n * `rehypeStripMdExtension`). Default: `false`.\n *\n * Enable this when content authors hand-write `[label](other.md)`\n * style references that should resolve to the rendered route URL\n * (e.g. `other/`) instead of a literal file path. Built dist and\n * `pnpm dev` honour the same flag, so previews match shipped output.\n *\n * Mirrors `Config::strip_md_ext` in crates/zfb/src/config.rs.\n */\n stripMdExt?: boolean;\n\n /**\n * Public URL prefix mounted in front of every absolute HTML asset\n * URL the build emits — `<link rel=\"stylesheet\">`, `<script type=\"module\">`,\n * and any other `/assets/...`-prefixed reference rewritten by the\n * production asset pipeline.\n *\n * Use this when the site is deployed under a sub-path (e.g.\n * `https://example.com/pj/zudo-doc/`) instead of the domain root.\n * With `base: \"/pj/zudo-doc/\"` the dist HTML emits\n * `<link rel=\"stylesheet\" href=\"/pj/zudo-doc/assets/styles-<hash>.css\">`\n * instead of the unprefixed `/assets/styles-<hash>.css`.\n *\n * Accepted shapes (all normalised to a single canonical form\n * internally):\n *\n * - omitted / `undefined` / `\"\"` / `\"/\"` — no prefix; behaviour is\n * byte-identical to the pre-`base` build (root-mounted site).\n * - leading-and-trailing-slash path like `\"/pj/zudo-doc/\"` — prefix\n * that path onto every asset URL.\n * - absolute URL like `\"https://cdn.example.com/\"` — emit absolute\n * URLs (CDN-hosted assets).\n *\n * Inputs missing a leading or trailing `/` are normalised at config-\n * load time (paths) or asset-emit time (URL prefixes); callers do\n * not have to pre-trim.\n *\n * Mirrors `Config::base` in crates/zfb/src/config.rs.\n */\n base?: string;\n\n /**\n * Canonical origin URL for the site (e.g. `\"https://example.com\"`).\n *\n * When set, the bundler emits `globalThis.__zfb.site = <value>` in\n * `entry.mjs` so layouts can build canonical `<link>` tags,\n * OpenGraph `og:url` meta, sitemap absolute hrefs, and hreflang\n * `<link rel=\"alternate\">` from a single config-level source of truth.\n *\n * **Distinct from `base`**: `base` is a sub-path mount prefix used\n * for asset URLs (e.g. `\"/pj/my-site/\"`). `site` is the full\n * canonical origin (scheme + host, no path) used to construct\n * absolute page URLs for SEO/social metadata. Both may be set\n * simultaneously.\n *\n * Accepted shape: an absolute HTTP or HTTPS URL. Relative URLs,\n * non-HTTP(S) schemes, and empty strings are rejected at config-load\n * time. Trailing slash normalisation is the consumer's responsibility.\n *\n * When absent, `globalThis.__zfb.site` is not emitted — the build\n * output is byte-for-byte identical to builds without this field.\n *\n * Mirrors `Config::site` in crates/zfb/src/config.rs.\n */\n site?: string;\n\n /**\n * Markdown link resolver (port of `remarkResolveMarkdownLinks`).\n *\n * When `enabled: true`, the build appends `ResolveLinksPlugin` to the\n * mdast pipeline so author-written `[label](./other.mdx)` links are\n * rewritten to the corresponding rendered route URL — bypassing the\n * file→directory transformation that breaks relative paths in dist\n * HTML when `foo.mdx` becomes `foo/index.html`. Extensionless\n * (`./other`) and directory-style (`other/`) targets resolve too,\n * probing `{name}.mdx`, `{name}.md`, `{name}/index.mdx`,\n * `{name}/index.md` in that order. Relative targets resolve from the\n * source file's directory; for a directory-style link written from a\n * non-index page against its rendered URL — which sits one directory\n * deeper, e.g. `../sibling/` from `section/article.mdx` — a URL-space\n * fallback retries the probe from the page's route directory when\n * every file-space candidate misses.\n *\n * Two ways to specify the source dirs:\n *\n * - **Single dir (legacy):** set `docsDir` and the build assumes the\n * `/docs/` route prefix. Convenient for single-locale projects.\n * - **Multi dir (`dirs` non-empty):** explicit `{ dir, routePrefix }`\n * entries — required for any project with locale mirrors (e.g.\n * `docs/` AND `docs-ja/`) so each dir maps to its own route prefix\n * (`/docs/` vs `/ja/docs/`). When `dirs` is non-empty, `docsDir`\n * is ignored.\n *\n * Mirrors `Config::resolve_markdown_links` in crates/zfb/src/config.rs.\n */\n resolveMarkdownLinks?: ResolveMarkdownLinksConfig;\n\n /**\n * Whether the basePath rewriter should append a trailing `/` to\n * extensionless absolute hrefs (`<a href=\"/docs/foo\">` becomes\n * `<a href=\"/pj/zudo-doc/docs/foo/\">` when `base = \"/pj/zudo-doc/\"`\n * and this is `true`).\n *\n * Off by default — preserves byte-for-byte parity with the\n * pre-`trailingSlash` build for projects that haven't opted in.\n * Enable when the deploy target serves canonical URLs with trailing\n * slashes (Cloudflare Pages with `trailingSlash: always`, Netlify\n * pretty URLs, etc.) so the dist HTML doesn't ship non-canonical\n * hrefs that 301-redirect on every click.\n *\n * Only the trailing slash for extensionless hrefs is affected.\n * Hrefs that already end in `/`, that have a file extension\n * (`.png`, `.pdf`, …), or that opt out via `data-no-base` pass\n * through unchanged.\n *\n * Mirrors `Config::trailing_slash` in crates/zfb/src/config.rs.\n */\n trailingSlash?: boolean;\n\n /**\n * Markdown / MDX parsing options. Currently the only knob exposed is\n * [`gfm`](MarkdownConfig.gfm), which toggles GFM constructs\n * (strikethrough, table, autolink-literal, task-list-item,\n * footnote-definition) on or off.\n *\n * Mirrors `Config::markdown` in crates/zfb/src/config.rs.\n */\n markdown?: MarkdownConfig;\n\n /**\n * Extra absolute filesystem paths watched by the dev server in\n * addition to the project-root tree.\n *\n * Use this when project content reads from outside the project root\n * (a sibling knowledge-base repo, a shared filesystem directory, a\n * `file:` dep that ships content alongside code, etc.) and you want\n * `zfb dev` to live-reload when those external files change.\n *\n * Semantics:\n *\n * - Each entry MUST be an absolute path. Relative paths are\n * rejected at config-load time with a clear error message.\n * - Paths are canonicalised when the watcher boots; events match\n * the canonical form.\n * - A path that does NOT exist at boot is skipped with a warning;\n * the watcher does NOT re-watch the path if it appears later.\n * Restart `zfb dev` after creating the path.\n * - Each entry is watched recursively.\n * - Events from outside the project root bypass fine-grained graph\n * classification and may trigger a broader rebuild than equivalent\n * in-tree edits.\n *\n * **Security note:** opt-in only — do NOT point this at unbounded\n * directories like `$HOME` or `/`. On Linux the recursive watcher\n * registers every subdirectory and can hit the inotify\n * `max_user_watches` ceiling on large trees.\n *\n * Mirrors `Config::extra_watch_paths` in crates/zfb/src/config.rs.\n */\n extraWatchPaths?: string[];\n\n /**\n * Whether `zfb build` writes the post-build route manifest to disk\n * at `<outDir>/__zfb/routes.json` (#347).\n *\n * The on-disk file mirrors the in-memory `ctx.routes` shape that the\n * plugin API hands to `postBuild` hooks — same fields, same\n * url-sorted order — so any consumer script wired into `pnpm build`\n * can read the manifest without writing a zfb plugin. The plugin\n * `ctx.routes` and the on-disk `routes.json` are two access shapes\n * over the same data, not two contracts.\n *\n * Default: emit (`undefined` is treated as `true`). Set `false` to\n * skip the write — useful for projects that strip everything but\n * shipped assets out of `dist/` before deploy.\n *\n * Mirrors `Config::emit_routes_manifest` in crates/zfb/src/config.rs.\n */\n emitRoutesManifest?: boolean;\n\n /**\n * Syntect code-highlight options; absent = default theme\n * (`base16-ocean.dark`). See {@link CodeHighlightConfig} for accepted\n * theme names and custom-theme loading.\n *\n * Mirrors `Config::code_highlight` in crates/zfb/src/config.rs.\n */\n codeHighlight?: CodeHighlightConfig;\n\n /**\n * Maximum seconds a single plugin lifecycle hook (preBuild, postBuild,\n * setup, etc.) may run before the build fails with a diagnostic error\n * and the plugin host is force-killed.\n *\n * Absent falls through to the `ZFB_PLUGIN_HOOK_TIMEOUT` env var, then\n * the 120s built-in default. Set this when your plugins do long but\n * bounded work (e.g. large sitemap generation) and you want a tighter\n * or more explicit budget.\n *\n * Mirrors `Config::plugin_hook_timeout_secs` in crates/zfb/src/config.rs.\n */\n pluginHookTimeoutSecs?: number;\n\n /**\n * Whether `copy_public_dir` copies `public/` under the `base`\n * sub-path segment (`true`, default) or flat to the `dist/` root\n * (`false`).\n *\n * - **`true` (default):** files land at\n * `<outDir>/<base-segment>/<rel>`, matching the base-prefixed URLs\n * that `withBase()` emits in the rendered HTML. Use this for\n * projects served directly at their configured sub-path.\n * - **`false`:** files land flat at `<outDir>/<rel>` regardless of\n * `base`. Use this when the deploy pipeline relocates the entire\n * `dist/` tree into the base segment itself (e.g.\n * `cp -a dist/. deploy-root/pj/site/`), so putting the files under\n * `<outDir>/<base>/...` would result in a double-nested path.\n *\n * **Note on `zfb preview`:** with `false`, base-prefixed public-asset\n * URLs 404 under `zfb preview` because the flat copy lives at the\n * dist root and `zfb preview` does not simulate deploy-side\n * relocation. This is a known trade-off of the flat-copy deploy\n * scheme.\n *\n * Mirrors `Config::copy_public_with_base` in crates/zfb/src/config.rs.\n */\n copyPublicWithBase?: boolean;\n\n /**\n * Project output mode. Drives the V8-mode decision the build engine\n * makes right after the no-SSR-without-adapter precondition check\n * (sub-task 4.1b / issue #373):\n *\n * - `\"static\"` — declare a pure-static (SSG-only) project. Errors at\n * build start if any route exports `prerender = false`, pointing\n * at the offending route. Use this on projects that must never\n * accidentally pick up an SSR route as a result of a copy-paste.\n * - `\"hybrid\"` — declare a project that may host SSR routes. V8-on\n * regardless of detection, even when no `prerender = false` route\n * currently exists. Useful for projects that will add SSR routes\n * later and want a stable build topology in the meantime.\n * - `\"auto\"` (default) — detection-driven. Non-empty `prerender =\n * false` route set => V8-on; empty => V8-off.\n *\n * Today's load-bearing role is the `\"static\"` precondition check.\n * The V8-off branch does NOT skip V8 host startup on the shipping\n * `zfb` binary — SSG still needs V8 to render pages. The flag exists\n * as infrastructure for the future shipping path (Tauri sidecar /\n * standalone SSR server). See the\n * [Build engine docs](https://github.com/Takazudo/zudo-front-builder/blob/main/docs/src/content/docs/architecture/build-engine.mdx)\n * for the gate decision table.\n *\n * Mirrors `Config::output` in crates/zfb/src/config.rs.\n */\n output?: OutputMode;\n\n /**\n * Config presets to merge before validation (#1196).\n *\n * Each preset is a partial `ZfbConfig`-shaped object. The merge pass runs\n * BEFORE field validation and folds preset contributions using additive\n * semantics:\n *\n * - **Array fields** (`plugins`, `collections`, `extraWatchPaths`,\n * `allowedHosts`): preset values are prepended so the main config's\n * entries retain their relative position after the preset's.\n * - **Scalar / optional fields**: a preset value fills in only when the\n * main config leaves the field at its default — the main config is\n * authoritative; presets act as defaults.\n *\n * Nested `presets` inside a preset are NOT recursively expanded.\n *\n * Mirrors `Config::presets` in crates/zfb/src/config.rs.\n */\n presets?: Partial<ZfbConfig>[];\n};\n\n/**\n * Project output mode.\n *\n * - `\"static\"` — pure-static (SSG-only); errors on detected SSR routes.\n * - `\"hybrid\"` — may host SSR routes; V8-on regardless of detection.\n * - `\"auto\"` — detection-driven; the default.\n *\n * Mirrors `OutputMode` in crates/zfb/src/config.rs.\n */\nexport type OutputMode = \"static\" | \"hybrid\" | \"auto\";\n\n/**\n * Syntect code-highlight options.\n *\n * Unknown theme names are rejected at build start with a clear error\n * rather than silently falling back.\n *\n * **Single-theme mode** (the default): set `theme` to a syntect theme name,\n * or omit it to use the default (`\"base16-ocean.dark\"`). Tokens are colored\n * with inline `color:`.\n *\n * **Dual-theme mode**: set both `themeLight` and `themeDark`. Tokens are\n * colored with CSS custom properties (`--shiki-light` / `--shiki-dark`),\n * and the consumer applies a `light-dark()` rule to pick the active color.\n * The `<pre>` element carries `class=\"syntect-dual\"` and\n * `--shiki-light-bg` / `--shiki-dark-bg` in its `style` attribute.\n *\n * `theme` and the dual pair are mutually exclusive. Setting only one of\n * `themeLight` / `themeDark` is an error.\n *\n * All theme names are **SYNTECT** built-in or user-loaded names (e.g.\n * `\"base16-ocean.light\"`, `\"base16-ocean.dark\"`, `\"InspiredGitHub\"`,\n * `\"Solarized (dark)\"`), NOT Shiki names like `\"dracula\"`.\n *\n * Mirrors `CodeHighlightConfig` in crates/zfb/src/config.rs.\n */\nexport type CodeHighlightConfig = {\n /**\n * Syntect built-in or user-loaded theme name. When absent the\n * pipeline defaults to `\"base16-ocean.dark\"`.\n *\n * Mutually exclusive with {@link themeLight} / {@link themeDark}.\n * Must be a SYNTECT theme name (e.g. `\"InspiredGitHub\"`), NOT a Shiki name.\n */\n theme?: string;\n /**\n * Path to a directory of `.tmTheme` files, relative to the project\n * root. Every `.tmTheme` file in the directory is loaded and becomes\n * available by its declared `name` via {@link theme}, {@link themeLight},\n * or {@link themeDark}. When absent only syntect's bundled themes are\n * available.\n *\n * The path must be relative and must not escape the project root via\n * `..`. A missing directory is reported as an error at build start.\n *\n * Applies to both single-theme and dual-theme mode.\n */\n themesDir?: string;\n /**\n * Light-mode syntect theme name for dual-theme highlighting.\n *\n * Must be set together with {@link themeDark} — setting only one of\n * the two is a build error. When both are set, tokens are colored with\n * CSS custom properties (`--shiki-light` / `--shiki-dark`) instead of\n * inline `color:`. Mutually exclusive with {@link theme}.\n *\n * Must be a SYNTECT theme name (e.g. `\"base16-ocean.light\"`),\n * NOT a Shiki name like `\"dracula\"`.\n */\n themeLight?: string;\n /**\n * Dark-mode syntect theme name for dual-theme highlighting.\n *\n * Must be set together with {@link themeLight} — setting only one of\n * the two is a build error. Mutually exclusive with {@link theme}.\n *\n * Must be a SYNTECT theme name (e.g. `\"base16-ocean.dark\"`),\n * NOT a Shiki name like `\"dracula\"`.\n */\n themeDark?: string;\n};\n\n/**\n * Table-of-contents options. Wire via `markdown.toc` in `zfb.config.ts`.\n *\n * When present, a TOC `<ul>/<li>` list is inserted as the next sibling\n * of the first heading whose text matches `heading` (case-insensitive).\n * Each `<a href=\"#id\">` links to the deduplicated `id` that\n * `HeadingLinksPlugin` placed on the corresponding heading.\n *\n * Mirrors `TocConfig` in `crates/zfb-content/src/plugins/toc.rs`.\n */\nexport type TocConfig = {\n /**\n * Heading text that triggers TOC insertion. Matched\n * case-insensitively after whitespace trimming. Default: `\"TOC\"`.\n */\n heading?: string;\n\n /**\n * Number of heading levels to include starting from `<h2>`.\n *\n * - `1` — h2 only\n * - `2` (default) — h2 + h3\n * - `3` — h2, h3, h4\n * - …up to `5` (h2 through h6)\n */\n maxDepth?: number;\n};\n\n/**\n * Markdown / MDX parsing options.\n *\n * See [`ZfbConfig.markdown`] for the embed point. Fields: [`gfm`],\n * [`toc`], [`externalLinks`], [`cjkFriendly`], and [`features`].\n * Future markdown knobs would also live here.\n *\n * See the \"Markdown Features\" docs category for the per-feature option\n * reference once individual features are ported.\n *\n * Mirrors `MarkdownConfig` in crates/zfb/src/config.rs.\n */\nexport type MarkdownConfig = {\n /**\n * Enable GFM constructs.\n *\n * Accepts three shapes:\n *\n * - `true` — turn every GFM construct ON (strikethrough, table,\n * autolink-literal, task-list-item, footnote-definition).\n * - `false` — turn every GFM construct OFF.\n * - partial object — set individual fields explicitly; fields you\n * omit fall back to the conservative-default values described\n * below.\n *\n * When `markdown` itself is omitted entirely, the conservative\n * default applies: `strikethrough: true`, `table: true`, every other\n * GFM construct off. This is the smallest behavioural delta from\n * zfb's historical effective state (table-only). Projects that want\n * the full GFM surface should opt in with `gfm: true`.\n */\n gfm?: GfmFlag;\n\n /**\n * Table-of-contents options. When present, a `<ul>/<li>` list is\n * inserted after the first heading whose text matches `heading`\n * (default `\"TOC\"`, case-insensitive). Each link points to the\n * deduplicated `id` that `HeadingLinksPlugin` placed on the heading.\n *\n * Omitting this field entirely leaves the build byte-for-byte identical\n * to the pre-TOC build. See [`TocConfig`] for the available options.\n *\n * Mirrors `MarkdownConfig::toc` in crates/zfb/src/config.rs.\n */\n toc?: TocConfig;\n /**\n * External-link rewriter. When set, every `<a>` whose href is\n * classified as external receives the configured `target` and `rel`\n * attributes.\n *\n * An href is external when it is an absolute HTTP/HTTPS URL AND its\n * origin differs from the top-level `site` URL (if `site` is\n * configured). When `site` is absent, any absolute HTTP/HTTPS URL is\n * treated as external.\n *\n * `mailto:`, `tel:`, and other non-HTTP(S) schemes are always left\n * unchanged. Relative URLs (`/internal/`, `./file.mdx`, `#anchor`) are\n * always internal.\n *\n * Omitting this field keeps the output byte-for-byte identical to the\n * pre-feature behaviour.\n *\n * Mirrors `ExternalLinksConfig` in crates/zfb/src/config.rs.\n */\n externalLinks?: ExternalLinksConfig;\n\n /**\n * Enable CJK-friendly markdown handling.\n *\n * Governs two post-parse fixups that adapt CommonMark/GFM rules to CJK\n * text:\n *\n * 1. **Emphasis/strong flanking** (`CjkFriendlyPlugin`). CommonMark's\n * left-/right-flanking delimiter-run rules treat CJK characters as\n * non-whitespace non-punctuation, which causes `**foo**` adjacent to\n * CJK text (e.g. `**テスト。**テスト`) to render as literal stars\n * instead of `<strong>`.\n * 2. **Bare-URL autolink boundary** (`CjkAutolinkBoundaryPlugin`,\n * zfb#1105). The GFM autolink-literal path grammar terminates only on\n * ASCII whitespace, so a bare URL flush against CJK text\n * (`詳細はhttps://example.com参照`) swallows the trailing CJK run into\n * the `href`. This fixup terminates the link at the first CJK\n * character. Only active when `gfm.autolinkLiteral` is also on.\n *\n * - **absent / `true` (default):** CJK-friendly handling is on.\n * Preserves today's behaviour — existing CJK-content sites are\n * unaffected.\n * - **`false`:** opt-out. Neither plugin is added to the pipeline;\n * emphasis markers and bare-URL autolinks adjacent to CJK characters\n * follow base CommonMark/GFM rules. Rarely the right choice; provided\n * as an escape hatch for projects that need strict CommonMark/GFM\n * output.\n *\n * **GFM strikethrough** (`~~foo~~`) at CJK boundaries is unaffected\n * by this toggle — it is handled by markdown-rs's GFM tokeniser, not\n * by these plugins, and works correctly in both modes.\n *\n * Mirrors `MarkdownConfig::cjk_friendly` in crates/zfb/src/config.rs.\n */\n cjkFriendly?: boolean;\n\n /**\n * Convert every soft line break (a single `\\n` inside a paragraph) into\n * `<br>` (remark-breaks parity).\n *\n * - **absent / `false` (default):** soft line breaks follow standard\n * CommonMark behaviour — collapsed into a single space.\n * - **`true`:** every `\\n` inside a paragraph becomes `<br>`. Use this\n * when your content relies on newline→`<br>` fidelity (e.g. product\n * descriptions, lyrics, or other newline-sensitive prose).\n *\n * Mirrors `MarkdownConfig::hard_breaks` in crates/zfb/src/config.rs.\n */\n hardBreaks?: boolean;\n\n /**\n * Per-feature markdown pipeline toggles.\n *\n * Each field is a [`FeatureToggle`] (`true` / `false` / options object)\n * or a feature-specific config type (for features that require extra\n * parameters). Absent / `undefined` means all features are disabled,\n * preserving the behaviour of the pre-features build byte-for-byte.\n *\n * Unknown keys are rejected at deserialization time by the Rust loader\n * so a typo in `zfb.config.ts` surfaces as a clear error.\n *\n * Mirrors `MarkdownFeaturesConfig` in crates/zfb/src/config.rs.\n */\n features?: MarkdownFeaturesConfig;\n};\n\n/**\n * Per-feature toggle: `boolean` shorthand or an options object.\n *\n * `true` enables the feature with defaults; `false` (or absent) disables it.\n * The object form carries per-feature options (fields vary by feature and\n * are filled in by each feature's port sub-issue — stubs today).\n *\n * Mirrors `FeatureToggle` in crates/zfb/src/config.rs.\n */\nexport type FeatureToggle = boolean | FeatureOptions;\n\n/**\n * Empty options object for features that accept `{ ... }` but have no\n * user-facing knobs yet. Fields are filled in by each feature's port\n * sub-issue; this stub satisfies the schema shape requirement.\n *\n * Mirrors `FeatureOptions` in crates/zfb/src/config.rs.\n */\nexport type FeatureOptions = Record<string, never>;\n\n/**\n * Options for the `githubAutolinks` feature. Requires `repo`.\n *\n * TODO: fill in actual fields when the githubAutolinks feature is ported.\n *\n * Mirrors `GithubAutolinksConfig` in crates/zfb/src/config.rs.\n */\nexport type GithubAutolinksConfig = {\n /** GitHub repository reference (`owner/repo`) used to build autolink URLs. */\n repo?: string;\n};\n\n/**\n * Options stub for the `codeEnrichment` feature.\n *\n * TODO: fill in actual fields when the codeEnrichment feature is ported.\n *\n * Mirrors `CodeEnrichmentConfig` in crates/zfb/src/config.rs.\n */\nexport type CodeEnrichmentConfig = Record<string, never>;\n\n/**\n * Options for the `tocExport` feature.\n *\n * Controls which headings are included in the exported `toc` JSON.\n * `maxDepth` is the **absolute** heading depth (2–6):\n * - `2` → h2 only\n * - `3` (default) → h2 + h3\n *\n * This differs from `headingMarkerToc.maxDepth`, which counts levels\n * starting from h2. The two features are independent.\n *\n * Mirrors `TocExportConfig` in crates/zfb-md-ast/src/features_config.rs.\n */\nexport type TocExportConfig = {\n /** Maximum heading depth to include (absolute, 2–6). Default: 3. */\n maxDepth?: number;\n};\n\n/**\n * Options for the `imageDimensions` feature.\n *\n * Auto-detects and injects `width`/`height` on local `<img>` elements. Raster\n * formats are probed header-only; SVGs are read from their markup\n * (`width`/`height`/`viewBox`).\n *\n * Mirrors `ImageDimensionsConfig` in crates/zfb-md-ast/src/features_config.rs.\n */\nexport type ImageDimensionsConfig = {\n /**\n * When `true` (the default), `http://` and `https://` image sources are\n * silently skipped and not probed for dimensions. Set to `false` only for\n * testing or unusual setups — remote images require network access at build\n * time and slow the pipeline.\n */\n skipRemote?: boolean;\n};\n\n/**\n * Options for the `linkValidation` feature.\n *\n * Validates internal `[text](file.md#anchor)` and `[text](#anchor)` links at\n * build time. External URLs (`http://`, `https://`, `mailto:`) are always\n * skipped — network validation is out of scope.\n *\n * Mirrors `LinkValidationConfig` in `crates/zfb-md-ast/src/features_config.rs`.\n */\nexport type LinkValidationConfig = {\n /**\n * When `true`, broken links are reported as errors (build can fail).\n * Default: `false` (warn-only).\n */\n failOnBroken?: boolean;\n};\n\n/**\n * Options for the `transclude` feature.\n *\n * Enables `:::include{file=\"./path.md\"}` directives that inline another\n * file's parsed mdast at the include site.\n *\n * Mirrors `TranscludeConfig` in crates/zfb-md-ast/src/features_config.rs.\n */\nexport type TranscludeConfig = {\n /**\n * Maximum transclusion depth (chain length A→B→C→…).\n *\n * A depth of `1` allows only direct includes (the included file itself\n * cannot include further files). Default: `5`. A cycle (A→B→A) is\n * always detected regardless of `maxDepth` and treated as an error.\n */\n maxDepth?: number;\n};\n\n/**\n * Options for the `readingTime` feature.\n *\n * Mirrors `ReadingTimeOptions` in crates/zfb-md-ast/src/features_config.rs.\n */\nexport type ReadingTimeConfig = {\n /** Words-per-minute rate for the reading-time estimate. Default: 200. */\n wpm?: number;\n};\n\n/**\n * `readingTime` feature value: either a `boolean` shorthand or a\n * {@link ReadingTimeConfig} options object.\n *\n * Mirrors `ReadingTimeFeature` in crates/zfb-md-ast/src/features_config.rs.\n */\nexport type ReadingTimeFeature = boolean | ReadingTimeConfig;\n\n/**\n * Per-feature markdown pipeline configuration.\n *\n * All fields are optional; absent = feature disabled, behaviour unchanged\n * from the pre-features build. Unknown keys are rejected at deserialization\n * time by the Rust loader so a typo surfaces as a clear error.\n *\n * Mirrors `MarkdownFeaturesConfig` in crates/zfb/src/config.rs.\n */\nexport type MarkdownFeaturesConfig = {\n /** GitHub-style alert blocks (`> [!NOTE]`, `> [!WARNING]`, etc.). */\n githubAlerts?: FeatureToggle;\n\n /**\n * Reading-time estimate injected into the document frontmatter.\n * Accepts `true` / `false` shorthand or `{ wpm: N }` for a custom rate.\n */\n readingTime?: ReadingTimeFeature;\n\n /** GitHub-style `owner/repo#123` and `SHA` autolinks. Requires `repo`. */\n githubAutolinks?: GithubAutolinksConfig;\n\n /** Code-block enrichment (copy button, language label, etc.). */\n codeEnrichment?: CodeEnrichmentConfig;\n\n /** Grouped code blocks rendered as tabs. */\n codeTabs?: FeatureToggle;\n\n /** Ruby annotation support (`{base}^{ruby}` syntax). */\n ruby?: FeatureToggle;\n\n /** Export the page TOC as structured data (e.g. for sidebar rendering). */\n tocExport?: TocExportConfig;\n\n /** Auto-detect and inject `width`/`height` on `<img>` elements. */\n imageDimensions?: ImageDimensionsConfig;\n\n /** Validate internal and external links at build time. */\n linkValidation?: LinkValidationConfig;\n\n /** Transclusion of other MDX files (`![[path]]` syntax). */\n transclude?: TranscludeConfig;\n\n /**\n * Generic `:::name` → component map. You supply the components; no defaults\n * are registered. Keys are directive names (e.g. `\"foo\"`), values are\n * {@link DirectiveSpec} (bare component name string or options object).\n *\n * Mirrors `directives` in `MarkdownFeaturesConfig` in crates/zfb/src/config.rs.\n */\n directives?: Record<string, DirectiveSpec>;\n\n /** Mermaid diagram rendering. */\n mermaid?: FeatureToggle;\n\n /**\n * Inline heading-marker TOC. Accepts either a `boolean` shorthand\n * (`true` = enable with defaults, `false` = disable) or a full\n * {@link TocConfig} options object — same union shape as the Rust\n * `HeadingMarkerTocFeature` enum.\n */\n headingMarkerToc?: HeadingMarkerTocFeature;\n\n /**\n * Heading-ID strategy for the always-on `HeadingLinks` plugin.\n * Absent → `\"flat\"` (the long-standing github-slugger scheme).\n * `{ strategy: \"hierarchical\" }` opts into ancestor-prefixed anchor\n * IDs (`## Foo` / `### Moo` / `#### Mew` → `foo`, `foo-moo`,\n * `foo-moo-mew`) — see {@link HeadingIdsConfig}.\n */\n headingIds?: HeadingIdsConfig;\n};\n\n/**\n * Options for the `headingIds` entry in `markdown.features`.\n *\n * Configures the always-on `HeadingLinks` plugin rather than toggling an\n * opt-in feature. Note: switching to `\"hierarchical\"` is anchor-breaking\n * for existing deep links to nested headings.\n *\n * Mirrors `HeadingIdsConfig` in crates/zfb-md-ast/src/features_config.rs.\n */\nexport type HeadingIdsConfig = {\n /**\n * `\"flat\"` (default): github-slugger slugs with a per-document dedup\n * counter shared across h2–h6 (`overview`, `overview-1`, …).\n * `\"hierarchical\"`: each heading's slug is prefixed with its ancestor\n * chain and deduped on the full path — anchors become reconstructible\n * from the heading outline.\n */\n strategy?: \"flat\" | \"hierarchical\";\n};\n\n/**\n * `headingMarkerToc` feature value: either a `boolean` shorthand or a\n * full {@link TocConfig} options object.\n *\n * Mirrors `HeadingMarkerTocFeature` in crates/zfb-md-ast/src/features_config.rs.\n */\nexport type HeadingMarkerTocFeature = boolean | TocConfig;\n\n/**\n * Spec for one user-defined directive: either a bare component name string\n * or a full {@link DirectiveFullSpec} options object.\n *\n * Mirrors `DirectiveSpec` in crates/zfb-md-ast/src/features_config.rs.\n */\nexport type DirectiveSpec = string | DirectiveFullSpec;\n\n/**\n * Full options object for one user-defined directive.\n *\n * Mirrors `DirectiveFullSpec` in crates/zfb-md-ast/src/features_config.rs.\n */\nexport type DirectiveFullSpec = {\n /** JSX component identifier (e.g. `\"Spoiler\"`, `\"Kbd\"`). */\n component: string;\n /** Container/leaf/text shape. Defaults to `\"container\"` when absent. */\n kind?: \"container\" | \"leaf\" | \"text\";\n /** Whether the bracketed `[label]` becomes a `title` attribute. Defaults to `true`. */\n titleFromLabel?: boolean;\n};\n\n/**\n * Options for the external-link rewriter (port of `rehype-external-links`).\n *\n * All fields are optional; omitting a field applies the documented default.\n *\n * Mirrors `ExternalLinksConfig` in crates/zfb/src/config.rs.\n */\nexport type ExternalLinksConfig = {\n /**\n * `rel` tokens applied to external links.\n *\n * Default: `[\"noopener\", \"noreferrer\"]`.\n *\n * Tokens are deduplicated (case-insensitive) and merged with any\n * existing `rel` attribute on the `<a>` element — existing tokens\n * appear first.\n */\n rel?: string[];\n /**\n * `target` value for external links.\n *\n * Default: `\"_blank\"`.\n */\n target?: string;\n};\n\n/**\n * Either the shorthand boolean form (`true` = all GFM constructs on,\n * `false` = all off) or a partial object that toggles individual\n * constructs.\n *\n * Mirrors `GfmFlag` in crates/zfb/src/config.rs.\n */\nexport type GfmFlag = boolean | GfmConstructs;\n\n/**\n * Per-construct opt-in / opt-out for GFM. Every field is optional;\n * omitted fields fall back to the conservative default\n * (`strikethrough: true`, `table: true`, others `false`).\n *\n * Mirrors `GfmConstructs` in crates/zfb/src/config.rs.\n */\nexport type GfmConstructs = {\n /** GFM strikethrough (`~~text~~` → `<del>text</del>`). */\n strikethrough?: boolean;\n /** GFM pipe-style tables. */\n table?: boolean;\n /**\n * GFM autolink literal — bare URLs like `https://example.com` become\n * clickable links without `<…>` brackets.\n */\n autolinkLiteral?: boolean;\n /** GFM task list items (`- [x]` / `- [ ]`). */\n taskListItem?: boolean;\n /** GFM footnote definitions (`[^ref]: …`). */\n footnoteDefinition?: boolean;\n};\n\n/**\n * What to do when a `.md`/`.mdx` link cannot be resolved.\n *\n * Mirrors `OnBrokenLinks` in crates/zfb/src/config.rs.\n */\nexport type OnBrokenLinks = \"warn\" | \"error\" | \"ignore\";\n\n/**\n * Config for the markdown link resolver. See\n * [`ZfbConfig.resolveMarkdownLinks`] for the design rationale.\n */\nexport type ResolveMarkdownLinksConfig = {\n /** Whether to enable link resolution. Default: `false`. */\n enabled?: boolean;\n\n /**\n * Legacy single-dir field. Used only when [`dirs`] is empty. When\n * non-empty, scanned against the hard-coded `/docs/` route prefix.\n */\n docsDir?: string;\n\n /**\n * Explicit per-dir source map. Each entry is one collection (e.g.\n * EN docs at `src/content/docs/` → `/docs/`, JA docs at\n * `src/content/docs-ja/` → `/ja/docs/`). Takes precedence over\n * [`docsDir`] when non-empty.\n */\n dirs?: ResolveMarkdownLinksDir[];\n\n /** What to do with unresolved `.md`/`.mdx` links. Default: `\"warn\"`. */\n onBrokenLinks?: OnBrokenLinks;\n};\n\n/** One source-dir entry for [`ResolveMarkdownLinksConfig.dirs`]. */\nexport type ResolveMarkdownLinksDir = {\n /**\n * Directory (relative to project root) whose `.md`/`.mdx` files are\n * scanned. Must be relative and must not escape the root via `..`.\n */\n dir: string;\n\n /**\n * Route prefix prepended to each file's slug. Include leading and\n * trailing slashes (e.g. `\"/docs/\"` or `\"/ja/docs/\"`).\n */\n routePrefix: string;\n};\n\n/**\n * Identity helper: returns the supplied config as-is, but typed against\n * [`ZfbConfig`]. Use as the default export of `zfb.config.ts` so editors\n * surface field-level types and typos surface at compile time.\n */\nexport function defineConfig(config: ZfbConfig): ZfbConfig {\n return config;\n}\n\n/**\n * Preset authoring helper: stamps each object entry in `config.plugins`\n * with `source_package: sourcePackage` so the Rust loader can attribute\n * plugin contributions back to the preset package that provided them.\n *\n * - Only plain-object plugin entries are stamped; non-object entries pass\n * through unchanged (defensive — the current schema requires objects,\n * but this guard keeps the helper safe if the schema is ever relaxed).\n * - An entry that ALREADY carries a `source_package` is left untouched, so a\n * preset composing another `definePreset`-returned preset (by spreading its\n * `plugins`) keeps the inner preset's provenance instead of clobbering it\n * with the outer package name (the spread below lets the existing marker win).\n * - When `config.plugins` is absent, the config is returned as-is.\n * - All other fields of `config` pass through unchanged.\n *\n * The key `source_package` (snake_case) mirrors the Rust `PluginConfig`\n * serde field added in T4. `PluginConfig` has no `#[serde(rename_all)]`\n * so the serde key is the field name verbatim — do NOT use camelCase.\n *\n * SYNC REQUIREMENT: keep this implementation behaviourally identical to\n * the stub in crates/zfb-config-loader/js/zfb-config-stub.mjs, which is\n * injected at config-eval time when the user's project does not have the\n * zfb npm package installed locally.\n */\nexport function definePreset(\n sourcePackage: string,\n config: Partial<ZfbConfig>,\n): Partial<ZfbConfig> {\n if (!config.plugins) {\n return config;\n }\n return {\n ...config,\n plugins: config.plugins.map((plugin) => {\n if (plugin !== null && typeof plugin === \"object\" && !Array.isArray(plugin)) {\n // Default first, then spread the plugin so an existing `source_package`\n // (from a composed inner preset) wins over the outer package name.\n return { source_package: sourcePackage, ...plugin };\n }\n return plugin;\n }),\n };\n}\n"]}
package/dist/content.d.ts CHANGED
@@ -278,4 +278,3 @@ export declare const defaultComponents: {
278
278
  * this merge into `buildContentComponent` does not change the rendered output.
279
279
  */
280
280
  export declare function mergeMdxComponents(globalSlot: MdxComponents | undefined, perCall: MdxComponents | undefined): MdxComponents;
281
- //# sourceMappingURL=content.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"content.js","sourceRoot":"","sources":["../src/content.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,EAAE;AACF,sEAAsE;AACtE,uEAAuE;AACvE,kFAAkF;AAClF,0EAA0E;AAC1E,0EAA0E;AAC1E,2CAA2C;AAC3C,EAAE;AACF,cA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C,CAAC;AAC3C,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,YAAY,CAAC,KAA4B;IACvD,OAAO,oBAAoB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AAC9C,CAAC;AAED,uEAAuE;AACvE,MAAM,UAAU,WAAW,CAAC,KAA4B;IACtD,OAAO,oBAAoB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAC7C,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,EAAE,EAAE,SAAS;IACb,EAAE,EAAE,SAAS;IACb,EAAE,EAAE,SAAS;IACb,CAAC,EAAE,gBAAgB;IACnB,CAAC,EAAE,WAAW;IACd,MAAM,EAAE,aAAa;IACrB,UAAU,EAAE,iBAAiB;IAC7B,EAAE,EAAE,SAAS;IACb,EAAE,EAAE,SAAS;IACb,KAAK,EAAE,YAAY;IACnB,IAAI,EAAE,WAAW;CACT,CAAC;AAEX;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,kBAAkB,CAChC,UAAqC,EACrC,OAAkC;IAElC,OAAO,EAAE,GAAG,iBAAiB,EAAE,GAAG,UAAU,EAAE,GAAG,OAAO,EAAE,CAAC;AAC7D,CAAC","sourcesContent":["// `zfb/content` — minimal v0 content collection loader.\n//\n// Reads `*.md` files from a content collection directory, parses YAML\n// frontmatter, and returns typed entries. This is a deliberately small\n// stub so the bundled basic-blog template can call `getCollection(\"blog\")` today;\n// the production path lives in `crates/zfb-content` and will replace this\n// once the JS-runtime decision (ADR-001) lands and the renderer wires the\n// Rust pipeline back through to user code.\n//\n// Scope (v0):\n// - YAML-ish frontmatter only: `key: value`, plus `key:\\n - item` arrays.\n// Quoted strings are unwrapped. ISO dates stay as strings.\n// - Body is the post content **after** the closing `---`, returned as raw\n// text. This is intentionally NOT pre-rendered HTML: the markdown\n// pipeline lives in the Rust crate and the JS stub does not duplicate\n// it.\n// - Collection root is resolved from\n// `process.env.ZFB_CONTENT_ROOT` (set by the dev/build pipeline), or\n// `<cwd>/content` as a fallback for unit tests and direct invocation.\n//\n// TODO(zfb-content): swap this stub for the runtime-provided implementation\n// once the content engine ships end-to-end.\n\n// `node:fs` and `node:path` are intentionally NOT imported statically at\n// the top level.\n//\n// Why: this module is reachable via the package root (`@takazudo/zfb`) — the\n// barrel re-exports `defaultComponents` / `ContentH2` / etc. from\n// `./content.js`. The islands per-island bundler (`crates/zfb-islands`) walks\n// `import * as Mod from \"@takazudo/zfb\"` and esbuild's static tree-shaker\n// cannot prune a module behind a wildcard barrel access, so the WHOLE\n// content.ts module ends up in the browser-side island bundle. Top-level\n// `node:fs` / `node:path` imports would then fail the bundle with\n// `Could not resolve \"node:fs\"`. Loading them indirectly through a\n// runtime-constructed `createRequire` keeps the Node-runtime fs path\n// working while letting the islands bundler emit browser-safe output.\n// (Discovered while investigating zudolab/zudo-doc#1355 Wave 3 — see also\n// upstream PR #134 / #130 Gap A.) Defense-in-depth: the islands esbuild\n// invocation also passes `--platform=browser --external:node:*` so any\n// stray `node:*` import that does end up in a browser bundle is\n// externalized rather than failing the build.\n//\n// `getCollection` is synchronous per ADR-004, so the node modules are\n// loaded synchronously on first fs-path use. Type-only imports below stay\n// at the top because TypeScript erases them at compile time — they leave\n// no runtime traces for esbuild to chase.\nimport { jsx } from \"react/jsx-runtime\";\n\nimport type * as NodeFs from \"node:fs\";\nimport type * as NodePath from \"node:path\";\n\nimport { parseFrontmatter } from \"./frontmatter.js\";\nimport type { ParsedFrontmatter } from \"./frontmatter.js\";\nimport type { VNode } from \"./jsx-types.js\";\n\n// Re-export the parser surface so existing `zfb/content` consumers that\n// import `parseFrontmatter` / `ParsedFrontmatter` from the content\n// subpath keep working. The implementation now lives in `./frontmatter.ts`\n// (BCI-3 fs-free subpath) — this re-export is the bridge for callers\n// that have not migrated yet.\nexport { parseFrontmatter };\nexport type { ParsedFrontmatter };\n\n// ---------------------------------------------------------------------------\n// In-memory ContentSnapshot bridge (consumed by `@takazudo/zfb-runtime`).\n//\n// At build time, the Rust pipeline produces a `ContentSnapshot` (see\n// `crates/zfb-content/src/content_bridge.rs`) and embeds it into the\n// Worker bundle. On Worker boot, `createPageRouter` calls\n// `setContentSnapshot(snapshot)` (below) before serving the first\n// request. From that point on, `getCollection(name)` resolves from the\n// embedded snapshot rather than the Node `fs` API — required because the\n// workerd / Cloudflare Workers runtime has no filesystem.\n//\n// The fs path remains the source of truth in two contexts:\n// 1. unit tests for this module (no snapshot installed → fs path),\n// 2. dev-preview / direct-Node invocations of `getCollection` outside\n// the Worker bundle (kept as v0 fallback so older callers still work).\n//\n// Keep [`SnapshotEntry`] / [`Snapshot`] aligned with the Rust struct\n// (`EntrySnapshot` / `ContentSnapshot`) and the runtime-package mirror\n// (`@takazudo/zfb-runtime/snapshot`). Field names are snake_case to\n// match the JSON serialization (`module_specifier`, `rel_path`).\n// ---------------------------------------------------------------------------\n\n/**\n * One entry in an embedded content snapshot. Mirrors\n * `crates/zfb-content/src/content_bridge.rs::EntrySnapshot`. Re-exported\n * by `@takazudo/zfb-runtime/snapshot` for the runtime-side bundle. See\n * that module for field-by-field documentation.\n */\nexport interface SnapshotEntry {\n readonly slug: string;\n readonly frontmatter: unknown;\n readonly body: string;\n readonly module_specifier: string;\n readonly rel_path: string;\n}\n\n/**\n * Point-in-time snapshot of every configured collection. Mirrors\n * `crates/zfb-content/src/content_bridge.rs::ContentSnapshot`.\n */\nexport interface Snapshot {\n readonly collections: Readonly<Record<string, readonly SnapshotEntry[]>>;\n}\n\n/**\n * Where the installed [`Snapshot`] lives.\n *\n * The state hangs off `globalThis.__zfb.contentSnapshot`, NOT a\n * module-level `let`. This matters because under the production worker\n * bundle the consumer's pnpm-strict `node_modules` layout exposes\n * two physical paths to `@takazudo/zfb`:\n *\n * - top-level `node_modules/@takazudo/zfb` (imported by user pages), AND\n * - nested `node_modules/.pnpm/@takazudo+zfb-runtime@.../node_modules/\n * @takazudo/zfb` (imported by `@takazudo/zfb-runtime` itself).\n *\n * The bundler passes `esbuild --preserve-symlinks` whenever a custom\n * `node_modules_dir` is configured (see `crates/zfb-build/src/bundler.rs`\n * around `--external:node:*`), so esbuild treats those two symlink\n * targets as distinct sources and inlines `content.js` TWICE — yielding\n * two module instances of `zfb/content` in the final worker bundle.\n *\n * If `installedSnapshot` were a per-module `let`, `createPageRouter`\n * would install the snapshot on the runtime's copy and `getCollection`\n * (called from a user `paths()` export) would read from the user\n * page's copy — see `undefined`, and fall through to the `node:fs`\n * branch, which then throws because `node:*` is externalized in the\n * worker bundle. This is the regression #442 / #449 surfaced.\n *\n * Routing the slot through `globalThis` makes the snapshot bridge\n * symmetric with the existing `globalThis.__zfb.content` MDX-component\n * bridge (set by the build pipeline at `crates/zfb-build/src/bundler.rs`,\n * read by `Content` below): both pieces of cross-module state share\n * one well-known global, so any number of `zfb/content` module\n * instances in the same JS realm see the same value.\n *\n * Tracked under #449 (production fix for #442); the test-fixture\n * counterpart was #413.\n */\ntype SnapshotBridgeNamespace = {\n contentSnapshot?: Snapshot | undefined;\n};\n\ntype SnapshotBridgeGlobal = typeof globalThis & {\n __zfb?: SnapshotBridgeNamespace;\n};\n\n/**\n * Register a [`Snapshot`] so [`getCollection`] resolves from memory.\n *\n * Pass `undefined` to clear (used by tests that need to restore the v0\n * filesystem path between runs). Idempotent: the latest call wins.\n *\n * Stored on `globalThis.__zfb.contentSnapshot` rather than a\n * module-level `let` so a worker bundle that ends up with two\n * `zfb/content` module instances still sees a single shared snapshot —\n * see the [`SnapshotBridgeNamespace`] doc above for the full\n * pnpm-symlink rationale.\n */\nexport function setContentSnapshot(snapshot: Snapshot | undefined): void {\n const g = globalThis as SnapshotBridgeGlobal;\n const ns = (g.__zfb ?? {}) as SnapshotBridgeNamespace;\n ns.contentSnapshot = snapshot;\n g.__zfb = ns;\n}\n\n/**\n * Read the currently-installed [`Snapshot`], or `undefined` if none is\n * registered. Exposed mostly for tests; production callers should not\n * need to introspect the bridge state.\n *\n * Reads from `globalThis.__zfb.contentSnapshot`; see\n * [`setContentSnapshot`] for why the slot lives on `globalThis`.\n */\nexport function getContentSnapshot(): Snapshot | undefined {\n return (globalThis as SnapshotBridgeGlobal).__zfb?.contentSnapshot;\n}\n\n/**\n * Flat map of element-name → override component, used by both\n * [`ContentProps.components`] and the global slot\n * (`globalThis.__zfb?.mdxComponents`). Keys are lowercase HTML tag names\n * (`h2`, `p`, `a`, …) or PascalCase custom-component names.\n */\nexport type MdxComponents = Record<string, unknown>;\n\n/**\n * Props accepted by an entry's [`CollectionEntry.Content`] component.\n *\n * `components` mirrors Astro's `<Content components={...}>` contract:\n * a flat record of element-name → override component (e.g. `{ h1: MyH1 }`).\n * The default-components convention ships from `zfb`'s root export\n * (`defaultComponents`, lands in Sub 6) and users compose with their own\n * via `{ ...defaultComponents, ...mine }`.\n */\nexport interface ContentProps {\n /** Element-name → override component map. Optional. */\n components?: MdxComponents;\n}\n\n/**\n * Public JSX-element shape returned by [`CollectionEntry.Content`].\n *\n * Matches the structural shape that both Preact's and React's `jsx-runtime`\n * accept on either side of the boundary, mirroring the Island wrapper's\n * approach. Consumers should treat this as opaque — its only contract is\n * \"renderable JSX value\".\n *\n * Aliased as `JSX.Element` in the field signature: the JS runtime is\n * type-erased and the actual VNode shape is supplied by the framework\n * adapter at evaluation time.\n */\nexport type ContentElement = {\n readonly type: string | ((...args: unknown[]) => unknown);\n readonly props: Readonly<Record<string, unknown>>;\n readonly key: unknown;\n};\n\n/**\n * Bridge contract published by the Rust-side `zfb-render` `Renderer` before\n * evaluating each page module. Cross-referenced from the Rust side in\n * `crates/zfb-render/src/loader.rs` so the two halves stay in sync — see\n * `packages/zfb/CONTRIBUTING.md` for the full contract narrative.\n *\n * The renderer installs `globalThis.__zfb.content.get(specifier)` keyed on\n * the entry's `module_specifier` (Sub 4 convention: `mdx://<collection>/<slug>#<hash>`,\n * collapsed to `mdx://<collection>/<slug>` from the JS stub side which has\n * no hash to compute). When `get` returns `undefined` (or the bridge as a\n * whole is absent — typical of unit tests, dev sandboxes, and any\n * non-renderer evaluation context), `Content` renders a clearly-marked\n * `<pre data-zfb-content-fallback>` fallback so the visual distinction is\n * obvious even in unstyled environments.\n */\ntype ContentBridge = {\n get(specifier: string): ((props: ContentProps) => unknown) | undefined;\n};\n\ntype ZfbBridgeNamespace = {\n content?: ContentBridge;\n /**\n * Global component-override slot. Populated by sub-task A2 (bridge\n * installer); A1 only reads it. Absent ⇒ no-op in the merge.\n */\n mdxComponents?: MdxComponents;\n};\n\ntype BridgeGlobal = typeof globalThis & {\n __zfb?: ZfbBridgeNamespace;\n};\n\n/**\n * Generic shape returned for one entry in a content collection. The `data`\n * field carries parsed frontmatter, typed by the caller via the generic\n * parameter.\n */\nexport type CollectionEntry<T = Record<string, unknown>> = {\n /** Filename without `.md` extension. Stable across runs. */\n slug: string;\n /** Parsed frontmatter. */\n data: T;\n /** Raw markdown body (frontmatter stripped). */\n body: string;\n /**\n * Stable module specifier used as the bridge lookup key. Format:\n * `mdx://<collection>/<slug>` (no hash component — the JS stub does\n * not compile MDX, so it has no body hash to attach; the production\n * Rust-side `zfb-content::collection::Entry::module_specifier` adds a\n * `#<hash>` suffix and the bridge is responsible for matching either\n * form against its registered components).\n *\n * This field is part of the v0+ JS surface so the bridge has something\n * deterministic to key on without consulting per-call state.\n */\n module_specifier: string;\n /**\n * Renderable component for this entry.\n *\n * **Bridge contract.** At call time, `Content` consults\n * `globalThis.__zfb?.content?.get(entry.module_specifier)`. If the\n * bridge is present and returns a function, that function is invoked\n * with `props` and its result returned verbatim.\n *\n * **Fallback.** Outside the renderer (unit tests, dev sandboxes, or any\n * environment where `globalThis.__zfb.content.get` is absent or returns\n * `undefined`), `Content` returns a JSX-shaped element rendering the\n * raw markdown body inside a `<pre data-zfb-content-fallback>` block,\n * with a leading `[zfb fallback render]` marker line so the visual\n * distinction survives unstyled environments. The marker is also a\n * grep target for \"did the production renderer not run?\" diagnostics.\n *\n * **Typed signature.** Returns `ContentElement` (a structural alias for\n * `JSX.Element`) so consumers can drop `<entry.Content components={...} />`\n * into both React and Preact JSX without per-framework type setup.\n *\n * @example\n * const post = (await getCollection(\"blog\"))[0];\n * return <post.Content components={{ ...defaultComponents, h1: MyH1 }} />;\n */\n Content: (props: ContentProps) => ContentElement;\n};\n\n// Cached node:fs / node:path module references. Populated lazily on first\n// fs-path use (see [`loadNodeModules`]); reused on subsequent calls.\nlet cachedNodeFs: typeof NodeFs | undefined;\nlet cachedNodePath: typeof NodePath | undefined;\n\n/**\n * Synchronously load `node:fs` and `node:path`, caching the results.\n *\n * The node specifiers are concatenated at runtime (`\"node:\" + \"fs\"`) so\n * esbuild's static analyzer cannot follow them — that's the load-bearing\n * detail here, because this module is reachable from browser-bundled\n * island chains via the `@takazudo/zfb` root barrel (see top-of-file note).\n *\n * Uses CommonJS `require` via [`createRequire`] (stable, sync) rather than\n * `await import()` (async, would force `getCollection` async and violate\n * ADR-004). `createRequire` itself is fetched from `node:module` through\n * the same runtime-built specifier pattern.\n *\n * If `createRequire` cannot be obtained at all (i.e. truly running in a\n * browser-shaped runtime — which would mean a misconfigured island\n * bundle), throws so the failure is loud rather than silent.\n */\nfunction loadNodeModules(): { fs: typeof NodeFs; path: typeof NodePath } {\n if (cachedNodeFs !== undefined && cachedNodePath !== undefined) {\n return { fs: cachedNodeFs, path: cachedNodePath };\n }\n // Runtime-built specifiers: opaque to esbuild's static analyzer.\n const moduleSpecifier = \"node:\" + \"module\";\n const fsSpecifier = \"node:\" + \"fs\";\n const pathSpecifier = \"node:\" + \"path\";\n // Strategy A: prefer the host `require` from a CommonJS context. We\n // probe via `globalThis` and `Function`-built lookup so neither esbuild\n // nor stricter ESM tooling errors out at the lookup site.\n const dynamicGlobal = globalThis as unknown as { require?: NodeJS.Require };\n let nodeRequire: NodeJS.Require | undefined = dynamicGlobal.require;\n // Strategy B: ESM context — synthesize a require via `node:module`'s\n // `createRequire`. Loading `node:module` itself through the same\n // dynamic specifier shields it from esbuild's static walker.\n if (typeof nodeRequire !== \"function\") {\n // `Function(\"return require\")()` returns the enclosing `require` when\n // the bundler/loader injects one (Node CJS, esbuild default). Falls\n // through if undefined — caught below.\n try {\n nodeRequire = new Function(\"return typeof require === 'function' ? require : undefined\")() as\n | NodeJS.Require\n | undefined;\n } catch {\n nodeRequire = undefined;\n }\n }\n if (typeof nodeRequire !== \"function\") {\n // Last resort: synthesize via createRequire. Reaches `node:module`\n // through a dynamic require we have to bootstrap somehow — the only\n // way without a static `import` is `process.getBuiltinModule` (Node\n // 22+) which exposes built-ins synchronously without a require.\n const proc = (\n globalThis as unknown as { process?: { getBuiltinModule?: (id: string) => unknown } }\n ).process;\n const getBuiltin = proc?.getBuiltinModule;\n if (typeof getBuiltin === \"function\") {\n const mod = getBuiltin(moduleSpecifier) as typeof import(\"node:module\");\n nodeRequire = mod.createRequire(import.meta.url);\n }\n }\n if (typeof nodeRequire !== \"function\") {\n throw new Error(\n \"zfb/content: cannot load node:fs / node:path — no Node-style require available. \" +\n \"This module's filesystem path requires a Node runtime; if you see this in a browser \" +\n \"bundle, the bundler should externalize node:* imports (the islands bundler does so).\",\n );\n }\n cachedNodeFs = nodeRequire(fsSpecifier) as typeof NodeFs;\n cachedNodePath = nodeRequire(pathSpecifier) as typeof NodePath;\n return { fs: cachedNodeFs, path: cachedNodePath };\n}\n\n/**\n * Resolve the directory that holds a named content collection. Override\n * via `ZFB_CONTENT_ROOT` so tests / fixtures can point at an arbitrary\n * directory.\n */\nfunction resolveCollectionDir(name: string): string {\n const { path } = loadNodeModules();\n const envRoot = process.env[\"ZFB_CONTENT_ROOT\"];\n const root = envRoot ? path.resolve(envRoot) : path.resolve(process.cwd(), \"content\");\n return path.join(root, name);\n}\n\n/**\n * Build the v0 stub's bridge specifier for an entry. Mirrors the Rust-side\n * convention (`mdx://<collection>/<slug>`) minus the body hash — the JS\n * stub does not compile MDX, so it has no hash to attach. The bridge\n * resolver on the renderer side is responsible for matching either form.\n */\nfunction buildModuleSpecifier(collection: string, slug: string): string {\n return `mdx://${collection}/${slug}`;\n}\n\n/**\n * Build the `Content` component for an entry. Captures `module_specifier`\n * + `body` in the closure so the returned function takes only `props`.\n *\n * The bridge lookup is done lazily on every call (not at entry-construction\n * time) so the renderer can install / swap `globalThis.__zfb.content` at\n * any point before the first render without ordering hazards.\n */\nfunction buildContentComponent(\n module_specifier: string,\n body: string,\n): (props: ContentProps) => ContentElement {\n return function Content(props: ContentProps): ContentElement {\n const zfb = (globalThis as BridgeGlobal).__zfb;\n const bridge = zfb?.content;\n const renderer = bridge?.get(module_specifier);\n if (typeof renderer === \"function\") {\n // Merge components in documented precedence order before delegating:\n // defaultComponents → globalThis.__zfb.mdxComponents → props.components\n // This is output-neutral because defaultComponents entries are pure\n // passthroughs; the seam is established here for A2 to populate.\n const mergedProps: ContentProps = {\n ...props,\n components: mergeMdxComponents(zfb?.mdxComponents, props.components),\n };\n // Trust the bridge to return a JSX-element-shaped value — we don't\n // try to validate; both Preact and React JSX runtimes accept any\n // structural `{ type, props, key }` object on either side of the\n // boundary, and the renderer is the source of truth here.\n return renderer(mergedProps) as ContentElement;\n }\n return renderFallback(body);\n };\n}\n\n/**\n * Mint a content element through the per-project JSX runtime.\n *\n * Calls `jsx` from `react/jsx-runtime` — alias-rewritten to\n * `preact/jsx-runtime` in Preact mode by the engine (bundler.rs ~2886),\n * native in React mode — so the returned value is a real element for\n * whichever framework the project configured. This replaces the previous\n * hand-rolled `{ type, props, key, constructor: undefined }` object literal\n * (the Preact diff-path sentinel): that shape made `preact-render-to-string`\n * treat it as a VNode, but React's renderer rejects it as a child with\n * error #31 (\"Objects are not valid as a React child\") because a real React\n * element carries `$$typeof: Symbol.for(\"react.element\")`. `children` is\n * passed inside `props` so a single child or an array both pass through\n * verbatim. Same migration as `Island` in this package. Kept private so\n * callers keep treating `ContentElement` / `ContentComponentElement` as\n * opaque. (Empty-MDX-body history: zudo-doc#505.)\n */\nfunction mintElement(type: string, props: Record<string, unknown>): ContentElement {\n // `jsx`'s `type` param is typed `ElementType` (string-literal intrinsic\n // tags or component types), which rejects an arbitrary runtime `string`.\n // The tag is dynamic here, so cast to the factory's own first-param type —\n // robust whether the engine aliases `jsx` to react or preact at build time.\n return jsx(type as Parameters<typeof jsx>[0], props) as unknown as ContentElement;\n}\n\n/**\n * Build the structural JSX element returned when the bridge is absent.\n *\n * Shape: `<pre data-zfb-content-fallback>{marker}\\n{body}</pre>` — the\n * leading `[zfb fallback render]` marker line is part of the public\n * fallback contract (it's both a visual signal and a grep target). Tests\n * pin both the attribute and the marker line.\n */\nfunction renderFallback(body: string): ContentElement {\n return mintElement(\"pre\", {\n \"data-zfb-content-fallback\": \"\",\n children: `${FALLBACK_MARKER}\\n${body}`,\n });\n}\n\n/** Leading marker line emitted by [`renderFallback`]. Public contract. */\nconst FALLBACK_MARKER = \"[zfb fallback render]\";\n\n/**\n * Load every `*.md` file in the named collection. Files starting with `.`\n * or that lack a `.md` extension are ignored.\n *\n * **ADR-004 contract: this function is synchronous.** TSX page modules\n * call it from anywhere — top-level, inside a render body, inside a\n * `useMemo` — and SSR completes in a single pass without yielding. The\n * snapshot path returns from memory; the filesystem fallback uses sync\n * `node:fs` APIs so the surface stays unified. (The legacy async\n * implementation was an oversight — the ADR predates it; SSG paths\n * always saw a Promise where ADR-004 says they should see an array,\n * which is why migrations from Astro tripped on `getCollection().filter\n * is not a function`.)\n *\n * @example\n * const posts = getCollection<{ title: string; date: string }>(\"blog\");\n */\nexport function getCollection<T = Record<string, unknown>>(name: string): CollectionEntry<T>[] {\n // Snapshot path: installed by `@takazudo/zfb-runtime`'s\n // `createPageRouter` at Worker boot. Worker runtimes have no `fs`, so\n // this branch is the production path under the embedded V8 host.\n //\n // The snapshot lookup reads `globalThis.__zfb.contentSnapshot`\n // (see `setContentSnapshot` above) rather than a per-module slot so\n // the cross-`zfb/content`-instance case under `--preserve-symlinks`\n // resolves through the same shared state — see #449.\n const installedSnapshot = (globalThis as SnapshotBridgeGlobal).__zfb?.contentSnapshot;\n if (installedSnapshot !== undefined) {\n const list = installedSnapshot.collections[name] ?? [];\n return list.map((entry) => entryFromSnapshot<T>(entry));\n }\n // Filesystem fallback (v0 path). Used by unit tests and direct Node\n // invocations outside the Worker bundle.\n //\n // BCI-6: traversal is now recursive — subdirectories are walked so a\n // collection rooted at `content/blog/` can contain nested `*.md` files\n // (e.g. `content/blog/2024/hello.md`). Slugs are derived from the\n // relative path so callers get stable, unique identifiers across nesting\n // levels.\n const dir = resolveCollectionDir(name);\n let mdPaths: string[];\n try {\n mdPaths = collectMdFilesSync(dir);\n } catch (err) {\n // Guard the `code` access at runtime — a thrown non-`Error` value\n // (rare, but possible) would otherwise crash here. We only swallow\n // a true ENOENT; anything else propagates.\n if (\n err !== null &&\n typeof err === \"object\" &&\n \"code\" in err &&\n (err as { code: unknown }).code === \"ENOENT\"\n ) {\n return [];\n }\n throw err;\n }\n const { fs, path } = loadNodeModules();\n return mdPaths.map((fullPath) => {\n const raw = fs.readFileSync(fullPath, \"utf8\");\n const { data, body } = parseFrontmatter(raw);\n // Derive a stable slug from the relative path (relative to collection\n // root), stripping the `.md` extension. For top-level files this\n // produces the same value as before; for nested files it produces a\n // path-based slug (e.g. `2024/hello`).\n const rel = path.relative(dir, fullPath);\n const slug = _relPathToSlug(rel);\n const module_specifier = buildModuleSpecifier(name, slug);\n return {\n slug,\n data: data as T,\n body,\n module_specifier,\n Content: buildContentComponent(module_specifier, body),\n };\n });\n}\n\n/**\n * Look up a single entry in a content collection by slug.\n *\n * Thin wrapper over [`getCollection`]: inherits both resolution paths\n * (snapshot via `globalThis.__zfb.contentSnapshot` and the `node:fs`\n * fallback) for free. Returns `undefined` when either the collection does\n * not exist or no entry matches `slug`.\n *\n * **Runtime vs. generated types divergence.** The generated `types.d.ts`\n * emits a keyed overload (`K extends keyof ZfbCollections`) that ties the\n * return type to the collection's declared schema. This runtime form is\n * intentionally structural — it does not reference `ZfbCollections` and\n * does not attempt to reconcile with the keyed shape. (#857)\n *\n * @example\n * const post = getEntry<{ title: string }>(\"blog\", \"hello-zfb\");\n * if (!post) return null;\n * return <post.Content />;\n */\nexport function getEntry<T = Record<string, unknown>>(\n name: string,\n slug: string,\n): CollectionEntry<T> | undefined {\n return getCollection<T>(name).find((e) => e.slug === slug);\n}\n\n/**\n * Construct a [`CollectionEntry`] from a [`SnapshotEntry`]. The snapshot\n * carries `frontmatter` as a possibly-`null` JSON value (matches the\n * Rust contract for entries with no frontmatter); we normalise `null` /\n * `undefined` to an empty object so consumers' `.data.title` reads\n * never have to deal with `null`.\n *\n * **Type-safety note:** `T` is the caller-supplied frontmatter shape\n * but we do **not** validate it at runtime — if the page declares a\n * shape that the actual frontmatter doesn't match, the cast below\n * lies. Callers are expected to keep their `getCollection<MySchema>()`\n * generic in sync with the actual frontmatter; we acknowledge the\n * unsafety with the explicit `unknown` indirection rather than a\n * direct (and silently lossy) cast.\n */\nfunction entryFromSnapshot<T>(entry: SnapshotEntry): CollectionEntry<T> {\n const data =\n entry.frontmatter === null || entry.frontmatter === undefined\n ? ({} as T)\n : (entry.frontmatter as unknown as T);\n return {\n slug: entry.slug,\n data,\n body: entry.body,\n module_specifier: entry.module_specifier,\n Content: buildContentComponent(entry.module_specifier, entry.body),\n };\n}\n\n/**\n * Recursively collect every `*.md` file under `dir` (synchronous).\n *\n * BCI-6: replaces the old flat `readdir(dir).filter(n => n.endsWith(\".md\"))`\n * approach. Hidden files (names starting with `.`) and hidden directories\n * are skipped at every nesting level, matching the top-level behaviour of\n * the previous implementation.\n *\n * Returns absolute paths sorted lexicographically so the result order is\n * deterministic across platforms and Node versions.\n *\n * Synchronous to honour ADR-004 — see [`getCollection`].\n */\nfunction collectMdFilesSync(dir: string): string[] {\n const result: string[] = [];\n const { fs, path } = loadNodeModules();\n walkDirSync(fs, path, dir, result);\n result.sort();\n return result;\n}\n\nfunction walkDirSync(\n fs: typeof NodeFs,\n path: typeof NodePath,\n current: string,\n out: string[],\n): void {\n const entries = fs.readdirSync(current, { withFileTypes: true });\n for (const entry of entries) {\n if (entry.name.startsWith(\".\")) continue;\n const fullPath = path.join(current, entry.name);\n // Skip symlinks to avoid infinite loops caused by cycles (e.g. a symlink\n // pointing at a parent directory). Content files are expected to be plain\n // regular files; following symlinks provides no value here.\n if (entry.isSymbolicLink()) continue;\n if (entry.isDirectory()) {\n walkDirSync(fs, path, fullPath, out);\n } else if (entry.isFile() && entry.name.endsWith(\".md\")) {\n out.push(fullPath);\n }\n }\n}\n\n/**\n * @internal\n *\n * Convert a `path.relative()` result into a forward-slash-separated\n * slug with the trailing `.md` extension stripped.\n *\n * Slugs are URL-flavored identifiers, not filesystem paths — they\n * MUST use `/` regardless of the host OS so a nested entry like\n * `2024/hello.md` produces the slug `2024/hello` on both POSIX and\n * Windows. Without this normalisation, Windows callers would see\n * `2024\\hello`, which then leaks through to `module_specifier` and\n * any URL the consumer derives from the slug.\n *\n * Exported solely so the unit test suite can pin the Windows\n * behaviour without needing an actual Windows host. Do not depend on\n * this from application code — name and signature may change.\n */\nexport function _relPathToSlug(relPath: string): string {\n const { path } = loadNodeModules();\n const posix = path.sep === \"/\" ? relPath : relPath.split(path.sep).join(\"/\");\n // Some Node versions normalise `\\` even when sep is `/`, so be\n // defensive: collapse any straggling backslashes too.\n const normalised = posix.includes(\"\\\\\") ? posix.split(\"\\\\\").join(\"/\") : posix;\n return normalised.endsWith(\".md\") ? normalised.slice(0, -\".md\".length) : normalised;\n}\n\n// ---------------------------------------------------------------------------\n// `defaultComponents` — htmlOverrides convention\n//\n// Ported from zudo-doc's `src/components/content/component-map.ts`. Users opt\n// in by spreading the map into their own `components` prop:\n//\n// import { defaultComponents } from \"zfb\";\n// <entry.Content components={{ ...defaultComponents, h2: MyH2 }} />\n//\n// Each component is a thin passthrough mirroring its zudo-doc counterpart\n// (e.g. `ContentParagraph` → `<p {...rest}>{children}</p>`). v0 ships the\n// passthroughs unstyled; layering smart-break / heading-anchor / link-icon\n// behaviour on top is independent follow-up — keeping the v0 deliverable\n// focused on infrastructure (issue #33).\n//\n// **`h1` is deliberately not in the map** — page titles render `<h1>` from\n// frontmatter, per the zudo-doc convention. Adding `h1` here would silently\n// double-render the page title.\n//\n// **Each override is exported as a named const AND included in\n// `defaultComponents`** so consumers can tree-shake-import a single component\n// (`import { ContentLink } from \"zfb\"`) without dragging in the whole map.\n//\n// Implementation note: components return the structural JSX-element shape\n// directly — same pattern as `Island`. This keeps the package\n// JSX-runtime-agnostic so it works under either Preact or React without\n// importing a runtime. Both `jsx-runtime` implementations accept the\n// `{ type, props, key }` object on either side of the boundary.\n// ---------------------------------------------------------------------------\n\n/**\n * Public JSX-element shape returned by every override in [`defaultComponents`].\n *\n * Mirrors [`ContentElement`] and [`IslandElement`]: a structural alias for\n * `JSX.Element` so consumers can drop these overrides into both React and\n * Preact JSX without per-framework type setup.\n */\nexport type ContentComponentElement = {\n readonly type: string;\n readonly props: Readonly<Record<string, unknown>>;\n readonly key: unknown;\n};\n\n/**\n * Props accepted by every default override. `children` and any extra\n * attributes (`className`, `id`, `href`, …) are passed through verbatim\n * to the underlying HTML element.\n */\nexport interface ContentComponentProps {\n children?: VNode;\n [key: string]: unknown;\n}\n\n/** Internal helper: build a structural JSX element of the given tag. */\nfunction buildOverrideElement(tag: string, props: ContentComponentProps): ContentComponentElement {\n const { children, ...rest } = props;\n // Minted through the per-project JSX runtime (`mintElement`) so the\n // override is a real element under both React and Preact — see the\n // helper's docblock (zudo-doc#505; React error #31 rationale).\n return mintElement(tag, { ...rest, children }) as unknown as ContentComponentElement;\n}\n\n/**\n * `<h2>` passthrough override. Ported from zudo-doc's `HeadingH2`, stripped\n * of styling — v0 ships pass-through behaviour; visual treatment is layered\n * on by the consumer (or by a follow-up enhancement pass).\n */\nexport function ContentH2(props: ContentComponentProps): ContentComponentElement {\n return buildOverrideElement(\"h2\", props);\n}\n\n/** `<h3>` passthrough override. See [`ContentH2`] for the contract. */\nexport function ContentH3(props: ContentComponentProps): ContentComponentElement {\n return buildOverrideElement(\"h3\", props);\n}\n\n/** `<h4>` passthrough override. See [`ContentH2`] for the contract. */\nexport function ContentH4(props: ContentComponentProps): ContentComponentElement {\n return buildOverrideElement(\"h4\", props);\n}\n\n/** `<p>` passthrough override. Mirrors zudo-doc's `ContentParagraph`. */\nexport function ContentParagraph(props: ContentComponentProps): ContentComponentElement {\n return buildOverrideElement(\"p\", props);\n}\n\n/** `<a>` passthrough override. Mirrors zudo-doc's `ContentLink`. */\nexport function ContentLink(props: ContentComponentProps): ContentComponentElement {\n return buildOverrideElement(\"a\", props);\n}\n\n/** `<strong>` passthrough override. Mirrors zudo-doc's `ContentStrong`. */\nexport function ContentStrong(props: ContentComponentProps): ContentComponentElement {\n return buildOverrideElement(\"strong\", props);\n}\n\n/** `<blockquote>` passthrough override. Mirrors zudo-doc's `ContentBlockquote`. */\nexport function ContentBlockquote(props: ContentComponentProps): ContentComponentElement {\n return buildOverrideElement(\"blockquote\", props);\n}\n\n/** `<ul>` passthrough override. Mirrors zudo-doc's `ContentUl`. */\nexport function ContentUl(props: ContentComponentProps): ContentComponentElement {\n return buildOverrideElement(\"ul\", props);\n}\n\n/** `<ol>` passthrough override. Mirrors zudo-doc's `ContentOl`. */\nexport function ContentOl(props: ContentComponentProps): ContentComponentElement {\n return buildOverrideElement(\"ol\", props);\n}\n\n/** `<table>` passthrough override. Mirrors zudo-doc's `ContentTable`. */\nexport function ContentTable(props: ContentComponentProps): ContentComponentElement {\n return buildOverrideElement(\"table\", props);\n}\n\n/** `<code>` passthrough override. Mirrors zudo-doc's `ContentCode`. */\nexport function ContentCode(props: ContentComponentProps): ContentComponentElement {\n return buildOverrideElement(\"code\", props);\n}\n\n/**\n * Default per-element override map — eleven entries covering the markdown\n * tags the zudo-doc convention overrides (`h2`, `h3`, `h4`, `p`, `a`,\n * `strong`, `blockquote`, `ul`, `ol`, `table`, `code`).\n *\n * `h1` is intentionally absent: page titles render from frontmatter, per\n * the zudo-doc convention.\n *\n * Spread into a `components` prop to compose with custom overrides:\n *\n * ```tsx\n * import { defaultComponents } from \"zfb\";\n *\n * <entry.Content components={{ ...defaultComponents, h2: MyFancyH2 }} />\n * ```\n */\nexport const defaultComponents = {\n h2: ContentH2,\n h3: ContentH3,\n h4: ContentH4,\n p: ContentParagraph,\n a: ContentLink,\n strong: ContentStrong,\n blockquote: ContentBlockquote,\n ul: ContentUl,\n ol: ContentOl,\n table: ContentTable,\n code: ContentCode,\n} as const;\n\n/**\n * Merge component maps with the documented precedence order:\n * built-in `defaultComponents` → global slot (`globalThis.__zfb?.mdxComponents`)\n * → per-call `props.components`.\n *\n * Spread in stable key order so the resulting map is deterministic; later\n * entries in the spread win on collision (lowest → highest priority). Absent\n * layers (`undefined`) are no-ops via spread-of-undefined.\n *\n * **Output-neutral by design:** `defaultComponents` entries are pure\n * passthroughs (e.g. `ContentH2` → `<h2>{...props}</h2>`), so introducing\n * this merge into `buildContentComponent` does not change the rendered output.\n */\nexport function mergeMdxComponents(\n globalSlot: MdxComponents | undefined,\n perCall: MdxComponents | undefined,\n): MdxComponents {\n return { ...defaultComponents, ...globalSlot, ...perCall };\n}\n"]}
@@ -20,4 +20,3 @@ export type ParsedFrontmatter = {
20
20
  * fence is present, or when the opening fence has no matching closer.
21
21
  */
22
22
  export declare function parseFrontmatter(raw: string): ParsedFrontmatter;
23
- //# sourceMappingURL=frontmatter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"frontmatter.js","sourceRoot":"","sources":["../src/frontmatter.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,EAAE;AACF,yEAAyE;AACzE,sEAAsE;AACtE,wEAAwE;AACxE,qEAAqE;AACrE,yEAAyE;AACzE,EAAE;AACF,mEAAmE;AACnE,wEAAwE;AACxE,uEAAuE;AACvE,sCAAsC;AACtC,EAAE;AACF,8EAA8E;AAC9E,6EAA6E;AAC7E,0EAA0E;AAC1E,uEAAuE;AACvE,EAAE;AACF,8EAA8E;AAC9E,sDAAsD;AACtD,kDAAkD;AAClD,EAAE;AACF,sEAAsE;AACtE,sEAAsE;AACtE,8EAA8E;AAE9E,MAAM,iBA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atter` lives in this dedicated subpath so consumers\n// that only need frontmatter parsing can import it without pulling in\n// `zfb/content`'s Node `fs` transitive dependency chain. Workers / edge\n// bundlers reading user content from a CMS or KV store can therefore\n// use this parser without bringing `node:fs/promises` into their bundle.\n//\n// The implementation lives directly in this module — `zfb/content`\n// imports from here, not the other way around. Tests pin the absence of\n// transitive `node:fs*` imports so a regression that re-introduces the\n// fs dependency surfaces immediately.\n//\n// ---------------------------------------------------------------------------\n// Minimal frontmatter parser. Intentionally NOT a full YAML implementation —\n// the v0 surface accepts the subset documented below. This avoids pulling\n// in `gray-matter` or `js-yaml` for what is, in v0, three field types:\n//\n// - `key: value` scalar (quoted strings unwrapped, ISO dates kept as strings)\n// - `key:` followed by a block list of `- item` lines\n// - blank lines and `#` comment lines are ignored\n//\n// Returns `{ data: {}, body: <input> }` unchanged when no frontmatter\n// fence is present, or when the opening fence has no matching closer.\n// ---------------------------------------------------------------------------\n\nconst FRONTMATTER_DELIM = \"---\";\n\n/** Public shape returned by [`parseFrontmatter`]. */\nexport type ParsedFrontmatter = {\n data: Record<string, unknown>;\n body: string;\n};\n\n/**\n * Parse a leading YAML-ish frontmatter block off a markdown document.\n *\n * **Public SDK surface.** Re-exported from `zfb/content` so consumers can\n * write their own custom content loaders without re-implementing the\n * (deliberately minimal) v0 frontmatter parser. The accepted grammar is\n * documented at the top of this module.\n *\n * Handles:\n * - empty frontmatter (`---\\n---\\nbody`) → `{ data: {}, body: \"body\" }`\n * - file ending exactly with `---` (no trailing newline) → frontmatter\n * parsed, body is empty.\n *\n * Returns `{ data: {}, body: <input> }` unchanged when no frontmatter\n * fence is present, or when the opening fence has no matching closer.\n */\nexport function parseFrontmatter(raw: string): ParsedFrontmatter {\n // Strip a leading BOM and normalise line endings before splitting.\n const text = raw.replace(/^/, \"\").replace(/\\r\\n/g, \"\\n\");\n if (!text.startsWith(`${FRONTMATTER_DELIM}\\n`)) {\n return { data: {}, body: text };\n }\n const headerStart = FRONTMATTER_DELIM.length + 1; // after first \"---\\n\"\n\n // Search for the closing fence. Accept either `\\n---\\n` (frontmatter\n // followed by body) or `\\n---` at the very end of the document\n // (frontmatter with no trailing newline). Start the search at\n // `headerStart - 1` so the empty-frontmatter case `---\\n---\\n...`\n // is detected (the `\\n---` at index 3 immediately follows the opener).\n const searchFrom = headerStart - 1;\n let closeIdx = -1;\n let bodyStart = -1;\n let i = searchFrom;\n while (i <= text.length - `\\n${FRONTMATTER_DELIM}`.length) {\n const candidate = text.indexOf(`\\n${FRONTMATTER_DELIM}`, i);\n if (candidate === -1) break;\n const afterFence = candidate + `\\n${FRONTMATTER_DELIM}`.length;\n if (afterFence === text.length) {\n // `\\n---` at end-of-string — frontmatter ends here, body is empty.\n closeIdx = candidate;\n bodyStart = afterFence;\n break;\n }\n if (text.charAt(afterFence) === \"\\n\") {\n // `\\n---\\n` — body starts after the trailing newline.\n closeIdx = candidate;\n bodyStart = afterFence + 1;\n break;\n }\n // `\\n---` followed by more `-` (e.g. `\\n----`) — keep searching.\n i = candidate + 1;\n }\n if (closeIdx === -1 || bodyStart === -1) {\n // Malformed frontmatter (no closing delimiter): treat as plain body.\n return { data: {}, body: text };\n }\n const header = text.slice(headerStart, closeIdx);\n const body = text.slice(bodyStart);\n return { data: parseFrontmatterHeader(header), body };\n}\n\nfunction parseFrontmatterHeader(header: string): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n const lines = header.split(\"\\n\");\n let i = 0;\n while (i < lines.length) {\n const line = lines[i] ?? \"\";\n if (line.trim() === \"\" || line.trimStart().startsWith(\"#\")) {\n i++;\n continue;\n }\n // Top-level keys are unindented `key: value` or `key:` (then list).\n const m = /^([A-Za-z_][\\w-]*)\\s*:\\s*(.*)$/.exec(line);\n if (!m) {\n i++;\n continue;\n }\n const key = m[1] as string;\n const inlineValue = (m[2] ?? \"\").trim();\n if (inlineValue === \"\") {\n // Possible block list.\n const list: string[] = [];\n let j = i + 1;\n while (j < lines.length) {\n const next = lines[j] ?? \"\";\n const itemMatch = /^\\s*-\\s+(.*)$/.exec(next);\n if (!itemMatch) break;\n list.push(unwrapScalar((itemMatch[1] ?? \"\").trim()));\n j++;\n }\n if (list.length > 0) {\n out[key] = list;\n i = j;\n continue;\n }\n // Empty value with no list — record empty string for completeness.\n out[key] = \"\";\n i++;\n continue;\n }\n out[key] = unwrapScalar(inlineValue);\n i++;\n }\n return out;\n}\n\nfunction unwrapScalar(value: string): string {\n if (value.length >= 2) {\n const first = value.charAt(0);\n const last = value.charAt(value.length - 1);\n if ((first === '\"' && last === '\"') || (first === \"'\" && last === \"'\")) {\n return value.slice(1, -1);\n }\n }\n return value;\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -7,4 +7,3 @@ export { definePlugin, type ZfbBuildHookContext, type ZfbDevMiddlewareContext, t
7
7
  export { slugify, SlugAllocator } from "./slugify.js";
8
8
  export { clientScript } from "./client-script.js";
9
9
  export { ContentBlockquote, ContentCode, ContentH2, ContentH3, ContentH4, ContentLink, ContentOl, ContentParagraph, ContentStrong, ContentTable, ContentUl, defaultComponents, mergeMdxComponents, type ContentComponentElement, type ContentComponentProps, type MdxComponents, } from "./content.js";
10
- //# sourceMappingURL=index.d.ts.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,EAAE;AACF,iFAAiF;AACjF,uDAAuD;AACvD,gFAAgF;AAChF,uCAAuC;AAEvC,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACnB,MAAM,EACN,oBAAoB,EACpB,WAAW,GAGZ,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,eAAe,EACf,YAAY,EACZ,eAAe,EACf,oBAAoB,EACpB,cAAc,GACf,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAa,MAAM,YAAY,CAAC;AAE1E,yEAAyE;AACzE,iFAAiF;AACjF,oEAAoE;AACpE,+FAA+F;AAC/F,qCAAqC;AACrC,kEAAkE;AAClE,sEAAsE;AACtE,wEAAwE;AACxE,YAAY;AACZ,OAAO,EACL,YAAY,GAQb,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EACL,iBAAiB,EACjB,WAAW,EACX,SAAS,EACT,SAAS,EACT,SAAS,EACT,WAAW,EACX,SAAS,EACT,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,SAAS,EACT,iBAAiB,EACjB,kBAAkB,GAInB,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,EAAE;AACF,iFAAiF;AACjF,uDAAuD;AACvD,gFAAgF;AAChF,uCAAuC;AAEvC,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACnB,MAAM,EACN,oBAAoB,EACpB,WAAW,GAGZ,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,eAAe,EACf,YAAY,EACZ,eAAe,EACf,oBAAoB,EACpB,cAAc,GACf,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAa,MAAM,YAAY,CAAC;AAE1E,yEAAyE;AACzE,iFAAiF;AACjF,oEAAoE;AACpE,+FAA+F;AAC/F,qCAAqC;AACrC,kEAAkE;AAClE,sEAAsE;AACtE,wEAAwE;AACxE,YAAY;AACZ,OAAO,EACL,YAAY,GAQb,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EACL,iBAAiB,EACjB,WAAW,EACX,SAAS,EACT,SAAS,EACT,SAAS,EACT,WAAW,EACX,SAAS,EACT,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,SAAS,EACT,iBAAiB,EACjB,kBAAkB,GAInB,MAAM,cAAc,CAAC","sourcesContent":["// Public entry point for the \"@takazudo/zfb\" package.\n//\n// User TSX pages reach this module via `import { Island } from \"@takazudo/zfb\"`.\n// The hydration runtime (Sub 3) reaches the helper via\n// `import { scheduleHydrate } from \"@takazudo/zfb/runtime\"` (or by inlining the\n// same logic; coordinated separately).\n\nexport {\n ANONYMOUS_COMPONENT_NAME,\n HYDRATE_MARKER_ATTR,\n Island,\n SKIP_SSR_MARKER_ATTR,\n resolveWhen,\n type IslandElement,\n type IslandProps,\n} from \"./island.js\";\nexport {\n scheduleHydrate,\n mountIslands,\n mountNewIslands,\n cancelPendingIslands,\n unmountIslands,\n} from \"./runtime.js\";\nexport type { IslandManifest, IslandManifestValue } from \"./runtime.js\";\nexport type { VNode, VNodeArray, VNodeObject } from \"./jsx-types.js\";\nexport { DEFAULT_WHEN, isWhen, WHEN_VALUES, type When } from \"./types.js\";\n\n// `defaultComponents` (htmlOverrides convention) is re-exported from the\n// root entry point so `import { defaultComponents } from \"@takazudo/zfb\"` is the\n// canonical access path. Each named override is also re-exported so\n// consumers can tree-shake-import a single one (`import { ContentLink } from \"@takazudo/zfb\"`)\n// without dragging in the whole map.\n// Plugin lifecycle types + `definePlugin` identity helper. Plugin\n// authors typically import these from \"@takazudo/zfb/plugins\" but the\n// root entry re-exports them so simple plugins can pull everything from\n// one path.\nexport {\n definePlugin,\n type ZfbBuildHookContext,\n type ZfbDevMiddlewareContext,\n type ZfbDevMiddlewareHandler,\n type ZfbDevMiddlewareRequest,\n type ZfbDevMiddlewareResponse,\n type ZfbPlugin,\n type ZfbPluginLogger,\n} from \"./plugins.js\";\n\nexport { slugify, SlugAllocator } from \"./slugify.js\";\n\nexport { clientScript } from \"./client-script.js\";\n\nexport {\n ContentBlockquote,\n ContentCode,\n ContentH2,\n ContentH3,\n ContentH4,\n ContentLink,\n ContentOl,\n ContentParagraph,\n ContentStrong,\n ContentTable,\n ContentUl,\n defaultComponents,\n mergeMdxComponents,\n type ContentComponentElement,\n type ContentComponentProps,\n type MdxComponents,\n} from \"./content.js\";\n"]}
package/dist/island.d.ts CHANGED
@@ -128,4 +128,3 @@ export declare function captureComponentName(children: unknown): string;
128
128
  * Exported for tests; not re-exported from `index.ts`.
129
129
  */
130
130
  export declare function captureSerializableProps(children: unknown): string | undefined;
131
- //# sourceMappingURL=island.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"island.js","sourceRoot":"","sources":["../src/island.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,EAAE;AACF,wEAAwE;AACxE,2EAA2E;AAC3E,2EAA2E;AAC3E,uEAAuE;AACvE,iCAAiC;AACjC,EAAE;AACF,sEAAsE;AACtE,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,cAAc;AACd,EAAE;AACF,wDAAwD;AACxD,kBAAkB;AAClB,WAAW;AACX,EAAE;AACF,6EAA6E;AAC7E,2EAA2E;AAC3E,sEAAsE;AACtE,wEAAwE;AACxE,uEAAuE;AACvE,EAAE;AACF,0EAA0E;AAC1E,uEAAuE;AACvE,UAAU;AACV,EAAE;AACF,2EAA2E;AAC3E,MAAM;AACN,qDAAqD;AACrD,0BAA0B;AAC1B,WAAW;AACX,EAAE;AACF,0EAA0E;AAC1E,uEAAuE;AACvE,0BAA0B;AAC1B,EAAE;AACF,qEAAqE;AACrE,sEAAsE;AACtE,sCAAsC;AAEtC,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGxC,OAAO,EAAE,YAAY,EAAE,WAAW,EAAa,MAAM,YAAY,CAAC;AAElE,0EAA0E;AAC1E,2EAA2E;AAC3E,wEAAwE;AACxE,sCAAsC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;AAErD;;;;;;GAMG;AACH,MAAM,CAAC,MA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IAAwB,CAAC;IAC7B,IAAI,CAAC;QACH,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IAClC,CAAC;IAAC,MAAM,CAAC;QACP,mEAAmE;QACnE,+DAA+D;QAC/D,qEAAqE;QACrE,2CAA2C;QAC3C,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,uEAAuE;IACvE,oEAAoE;IACpE,qEAAqE;IACrE,sCAAsC;IACtC,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IAC1D,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["// Build-time `<Island when=\"...\">` JSX wrapper.\n//\n// The wrapper is intentionally JSX-runtime-agnostic: it does not import\n// preact or react and never calls h() / createElement directly. Instead it\n// returns a plain object with a fixed shape that both Preact's and React's\n// jsx-runtime accept when the JSX transform turns the call site into a\n// jsx(Island, props) invocation.\n//\n// At build time, running through the SSR renderer (embedded V8 host):\n//\n// <Island when=\"visible\"><Counter /></Island>\n//\n// renders as:\n//\n// <div data-zfb-island=\"Counter\" data-when=\"visible\">\n// <Counter />\n// </div>\n//\n// The component-name attribute (`data-zfb-island=\"ComponentName\"`) is filled\n// in *here* by reading the child's JSX type identity (`displayName` first,\n// then `name`). Sub 3's hydration shim then `querySelectorAll`s these\n// markers and looks each one up in the islands manifest produced by the\n// scanner (see `crates/zfb-islands/src/manifest.rs` for the contract).\n//\n// SSR-skip mode: when the caller passes `ssrFallback`, the heavy child is\n// **not** evaluated at SSR time. Instead the wrapper emits a different\n// marker:\n//\n// <Island ssrFallback={<div>Loading…</div>}><HeavyClientOnly /></Island>\n// →\n// <div data-zfb-island-skip-ssr=\"HeavyClientOnly\">\n// <div>Loading…</div>\n// </div>\n//\n// On the client the hydration runtime distinguishes hydrate vs. render by\n// which marker attribute is present. This is the equivalent of Astro's\n// `client:only=\"preact\"`.\n//\n// When validation: in development we console.warn for unknown `when`\n// values and fall back to the default. In production we silently fall\n// back to keep the bundle path small.\n\nimport { jsx } from \"react/jsx-runtime\";\n\nimport type { VNode } from \"./jsx-types.js\";\nimport { DEFAULT_WHEN, resolveWhen, type When } from \"./types.js\";\n\n// Re-export `resolveWhen` for back-compat: tests and downstream consumers\n// historically imported it from `./island.js`. The implementation lives in\n// `./types.js` so the runtime scheduler can pull it in without dragging\n// the JSX wrapper along for the ride.\nexport { resolveWhen } from \"./types.js\";\n\n/**\n * Marker attribute the SSR wrapper writes when the child component should\n * be hydrated client-side. The hydration runtime queries\n * `[data-${HYDRATE_MARKER_ATTR}]` to find islands.\n */\nexport const HYDRATE_MARKER_ATTR = \"data-zfb-island\";\n\n/**\n * Marker attribute the SSR wrapper writes when SSR is being skipped (the\n * client:only-equivalent path). The hydration runtime queries\n * `[data-${SKIP_SSR_MARKER_ATTR}]` to find these placeholders and renders\n * the real component into them on hydration — there is no server output\n * to patch up.\n */\nexport const SKIP_SSR_MARKER_ATTR = \"data-zfb-island-skip-ssr\";\n\n/** Fallback name surfaced when child identity cannot be determined. */\nexport const ANONYMOUS_COMPONENT_NAME = \"Anonymous\";\n\n/**\n * Attribute the SSR wrapper writes to ferry the wrapped component's props\n * across the SSR → hydrate boundary. The hydration runtime parses this\n * with `JSON.parse` and forwards the result to the per-island `mount()`\n * call so the hydrated component sees the same props the SSR pass did.\n *\n * Omitted entirely when the wrapped child has no own data props (other\n * than `children`) — `readProps` already falls back to `{}` when the\n * attribute is missing, and emitting `data-props=\"\"` would just bloat\n * the SSR markup.\n */\nexport const PROPS_DATA_ATTR = \"data-props\";\n\n/** Props for `<Island>`. */\nexport interface IslandProps {\n /** Hydration scheduling strategy. Defaults to `\"load\"`. */\n when?: When;\n /**\n * CSS media query string for `when=\"media\"` islands. The island hydrates\n * when this query first matches (including later viewport changes). The\n * runtime uses `window.matchMedia(media)` to register a listener.\n *\n * Ignored when `when` is not `\"media\"` (a dev warning is emitted).\n * Required when `when === \"media\"` (omitting it falls back to DEFAULT_WHEN\n * with a dev warning).\n */\n media?: string;\n /**\n * If supplied, switches the island into SSR-skip mode (Astro's\n * `client:only` equivalent). The wrapper emits the\n * `data-zfb-island-skip-ssr` marker, the heavy `children` are **not**\n * evaluated server-side, and `ssrFallback` is rendered in their place.\n * On hydration the client runtime swaps in the real component.\n */\n ssrFallback?: VNode;\n /**\n * Server-rendered children, hydrated client-side once `when` fires.\n *\n * Typed as `VNode` (structural union) rather than `ReactNode` so\n * non-React frameworks can implement `IslandProps` without a React\n * type dependency (BCI-4).\n */\n children?: VNode;\n}\n\n/**\n * Public JSX-element shape returned by [`Island`]. Intentionally widened\n * to a structural type so consumers don't infer through the internal\n * `{ type, props, key }` VNode shape of either Preact or React. Both\n * jsx-runtimes accept this object on either side of the boundary.\n */\nexport type IslandElement = {\n readonly type: string;\n readonly props: Readonly<Record<string, unknown>>;\n readonly key: unknown;\n};\n\n/**\n * `<Island>` JSX wrapper.\n *\n * Returns a JSX element shape compatible with both Preact and React. The\n * runtime tag is `\"div\"`. In the default (hydrate) mode the wrapper emits\n * `data-zfb-island=\"ComponentName\"` and `data-when=\"<resolved-when>\"`. In\n * SSR-skip mode (when `ssrFallback` is provided) it emits\n * `data-zfb-island-skip-ssr=\"ComponentName\"` instead and renders the\n * fallback rather than the heavy child.\n *\n * The component-name string is derived from the child JSX element's type\n * identity (`type.displayName ?? type.name`). For string-typed children\n * (host elements) the tag name is used. If no usable identity can be\n * recovered, [`ANONYMOUS_COMPONENT_NAME`] is used so the marker still\n * lines up with the hydration shim's manifest lookup.\n *\n * The return type is the public [`IslandElement`] shape — the internal\n * VNode structure is deliberately not leaked so consumers never type-infer\n * through it.\n */\nexport function Island(props: IslandProps): IslandElement {\n const resolvedWhen = resolveMediaProps(props);\n const when = resolvedWhen.when;\n const media = resolvedWhen.media;\n const componentName = captureComponentName(props.children);\n const isSkipSsr = props.ssrFallback !== undefined;\n // Always source props from `props.children` (the heavy component VNode),\n // never from `ssrFallback` — the fallback is just SSR placeholder markup;\n // the hydrated component is the child, so its props are what `mount()`\n // needs at hydrate time. (Same rationale as `captureComponentName`.)\n const dataProps = captureSerializableProps(props.children);\n\n if (isSkipSsr) {\n const skipSsrProps: Record<string, unknown> = {\n [SKIP_SSR_MARKER_ATTR]: componentName,\n \"data-when\": when,\n };\n if (when === \"media\" && media !== undefined) skipSsrProps[\"data-media\"] = media;\n if (dataProps !== undefined) skipSsrProps[PROPS_DATA_ATTR] = dataProps;\n return makeWrapper(skipSsrProps, props.ssrFallback ?? null);\n }\n\n const hydrateProps: Record<string, unknown> = {\n [HYDRATE_MARKER_ATTR]: componentName,\n \"data-when\": when,\n };\n if (when === \"media\" && media !== undefined) hydrateProps[\"data-media\"] = media;\n if (dataProps !== undefined) hydrateProps[PROPS_DATA_ATTR] = dataProps;\n return makeWrapper(hydrateProps, props.children);\n}\n\n/**\n * Validate and resolve the `when` / `media` props together.\n *\n * - `when=\"media\"` without `media` → warn + fall back to `DEFAULT_WHEN`.\n * - `media` without `when=\"media\"` → warn-and-ignore; `media` is dropped.\n */\nfunction resolveMediaProps(props: IslandProps): { when: When; media: string | undefined } {\n const when = resolveWhen(props.when);\n const media = props.media;\n\n if (when === \"media\" && !media) {\n if (typeof process !== \"undefined\" && process.env && process.env[\"NODE_ENV\"] !== \"production\") {\n // eslint-disable-next-line no-console\n console.warn(\n `[zfb] <Island when=\"media\"> requires the \\`media\\` prop (a CSS media query string). ` +\n `Falling back to \"${DEFAULT_WHEN}\".`,\n );\n }\n return { when: DEFAULT_WHEN, media: undefined };\n }\n\n if (media && when !== \"media\") {\n if (typeof process !== \"undefined\" && process.env && process.env[\"NODE_ENV\"] !== \"production\") {\n // eslint-disable-next-line no-console\n console.warn(\n `[zfb] The \\`media\\` prop is only used when \\`when=\"media\"\\`. ` +\n `Current when=\"${when}\" — \\`media\\` will be ignored.`,\n );\n }\n return { when, media: undefined };\n }\n\n return { when, media };\n}\n\n/**\n * Construct the wrapper element through the **automatic JSX runtime\n * factory**, called explicitly so this file stays plain `.ts` (no JSX\n * syntax).\n *\n * Why the explicit `jsx(...)` call rather than a hand-rolled\n * `{ type, props, key }` object literal: a plain literal is only valid for\n * Preact (whose diff path / `preact-render-to-string` recognise a VNode by\n * `vnode.constructor === undefined`). React's renderer rejects such an\n * object as a child with \"Objects are not valid as a React child\"\n * (minified error #31) because a real React element carries\n * `$$typeof: Symbol.for(\"react.element\")`, which a literal cannot fake\n * portably. Calling `jsx` from `react/jsx-runtime` mints a real element:\n * in React mode it resolves natively; in Preact mode the engine rewrites\n * `react/jsx-runtime` → `preact/jsx-runtime` (bundler.rs ~2886), so the\n * Preact runtime mints the element. Same result the JSX `<div>` delegation\n * produced — but as plain `.ts`.\n *\n * Why `.ts` and NOT `.tsx`: esbuild rewrites a `.js` import specifier to\n * `.ts` but NOT to `.tsx`. The barrel `index.ts` imports `./island.js`;\n * when this file was `island.tsx`, source consumers (the dev `exports`\n * point at `src/*.ts`, e.g. the node-free template / smoke path) failed\n * with `Could not resolve \"./island.js\"`. The published `dist` worked\n * (tsc emits a real `island.js`), which masked the regression in\n * pnpm-pack/dist probes. Keeping this a `.ts` file makes the barrel resolve\n * `./island.js` → `./island.ts` from source everywhere, while tsc still\n * emits `dist/island.js` for the published package.\n *\n * The cast back to `IslandElement` keeps the public type tight; the\n * concrete element shape produced by the runtime is invisible to type\n * consumers.\n */\nfunction makeWrapper(props: Record<string, unknown>, children: unknown): IslandElement {\n return jsx(\"div\", { ...props, children }) as unknown as IslandElement;\n}\n\n/**\n * Pull a component-name string out of a JSX child.\n *\n * Both Preact and React store rendered VNodes as plain objects whose\n * `.type` field is either:\n * - the component function (look at `displayName ?? name`),\n * - or the host element tag name as a string.\n *\n * If `children` is an array (multiple children), the first child with a\n * usable identity wins. This is intentional: the typical island shape is\n * `<Island><Foo /></Island>` (single child); when the caller wraps a\n * fragment-like list we still want a deterministic, debuggable name.\n *\n * Exported for tests; not re-exported from `index.ts`.\n */\nexport function captureComponentName(children: unknown): string {\n if (Array.isArray(children)) {\n for (const child of children) {\n const name = nameFromSingle(child);\n if (name) return name;\n }\n return ANONYMOUS_COMPONENT_NAME;\n }\n return nameFromSingle(children) || ANONYMOUS_COMPONENT_NAME;\n}\n\nfunction nameFromSingle(child: unknown): string {\n if (!child || typeof child !== \"object\") return \"\";\n const c = child as { type?: unknown };\n const t = c.type;\n if (typeof t === \"function\") {\n const fn = t as { displayName?: unknown; name?: unknown };\n if (typeof fn.displayName === \"string\" && fn.displayName) return fn.displayName;\n if (typeof fn.name === \"string\" && fn.name) return fn.name;\n return \"\";\n }\n if (typeof t === \"string\" && t) return t;\n return \"\";\n}\n\n/**\n * Serialize the wrapped child's data props as a JSON string the runtime\n * can parse out of the `data-props` attribute on the Island marker div.\n *\n * Mirrors [`captureComponentName`]'s array handling: when `children` is\n * an array (multiple JSX siblings), the first child whose own props\n * yield a non-empty serialization wins. This keeps the \"first\n * identifiable child\" contract consistent across both attributes —\n * whatever the marker name points at is what the data-props payload\n * describes.\n *\n * Returns `undefined` (not `\"{}\"` and not `\"\"`) when no usable props\n * exist. The runtime's `readProps` already maps a missing attribute to\n * `{}`, so omitting the attribute keeps the SSR markup smaller and\n * preserves the invariant that the attribute, when present, always\n * parses to a non-empty record.\n *\n * Exported for tests; not re-exported from `index.ts`.\n */\nexport function captureSerializableProps(children: unknown): string | undefined {\n if (Array.isArray(children)) {\n for (const child of children) {\n const json = propsFromSingle(child);\n if (json !== undefined) return json;\n }\n return undefined;\n }\n return propsFromSingle(children);\n}\n\nfunction propsFromSingle(child: unknown): string | undefined {\n if (!child || typeof child !== \"object\") return undefined;\n const c = child as { props?: unknown };\n const raw = c.props;\n if (!raw || typeof raw !== \"object\" || Array.isArray(raw)) return undefined;\n\n // Exclude `children` from the serialized payload: the SSR pass already\n // emitted the rendered children into the DOM (the hydration target),\n // and JSX child nodes are typically VNode trees with non-serializable\n // shapes (functions, circular refs) that would either bloat the\n // payload or throw inside JSON.stringify. The hydration runtime\n // re-renders into the existing DOM, so it does not need the JSX\n // children replayed through props.\n //\n // Note: JSON.stringify already silently drops function / symbol /\n // undefined values from the output, so those don't need explicit\n // pre-filtering here.\n const propsRecord = raw as Record<string, unknown>;\n let hasOwn = false;\n const filtered: Record<string, unknown> = {};\n for (const key of Object.keys(propsRecord)) {\n if (key === \"children\") continue;\n filtered[key] = propsRecord[key];\n hasOwn = true;\n }\n if (!hasOwn) return undefined;\n\n let json: string | undefined;\n try {\n json = JSON.stringify(filtered);\n } catch {\n // Circular references, BigInt, or any other non-serializable input\n // — silently fall through (no `data-props`) rather than ship a\n // partial payload. The runtime already handles the missing-attribute\n // case by returning `{}` from `readProps`.\n return undefined;\n }\n\n // JSON.stringify can also return `undefined` (when the top-level value\n // serializes to nothing) or `\"{}\"` (when every key was a function /\n // symbol / undefined and got dropped). Treat both as \"nothing useful\n // to ship\" so the marker stays clean.\n if (json === undefined || json === \"{}\") return undefined;\n return json;\n}\n"]}
@@ -44,4 +44,3 @@ export interface VNodeArray extends ReadonlyArray<VNode> {
44
44
  }
45
45
  /** @deprecated Use `VNode` instead. */
46
46
  export type ReactNode = VNode;
47
- //# sourceMappingURL=jsx-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"jsx-types.js","sourceRoot":"","sources":["../src/jsx-types.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,uEAAuE;AACvE,EAAE;AACF,6EAA6E;AAC7E,qEAAqE;AACrE,+EAA+E;AAC/E,EAAE;AACF,6EAA6E;AAC7E,yEAAyE;AACzE,0CAA0C"}
1
+ {"version":3,"file":"jsx-types.js","sourceRoot":"","sources":["../src/jsx-types.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,uEAAuE;AACvE,EAAE;AACF,6EAA6E;AAC7E,qEAAqE;AACrE,+EAA+E;AAC/E,EAAE;AACF,6EAA6E;AAC7E,yEAAyE;AACzE,0CAA0C","sourcesContent":["// Lightweight ambient JSX types so the public Island wrapper does not\n// hard-depend on either preact or react as a runtime/types dependency.\n//\n// BCI-4: `IslandProps.children` is now typed as `VNode` (a structural union)\n// rather than the old `ReactNode` alias, so non-React frameworks can\n// implement `IslandProps` without any React type dependency at the type level.\n//\n// Both Preact and React's `children` accept this structural union; the build\n// is type-erased so the actual rendering happens in the user's app under\n// whichever framework adapter they chose.\n\n/**\n * Structural JSX element (VNode). Framework-agnostic: both Preact and React\n * produce objects that satisfy this shape when a JSX element is rendered.\n *\n * The `props` bag may itself contain `children` (nested VNodes) as well as\n * HTML attribute values (strings, numbers, booleans). All fields are widened\n * to `unknown` so the type stays opaque to callers that don't know which\n * framework produced the value.\n *\n * `type` accepts BOTH function components (call signature) AND class\n * components (construct signature). Preact and React both expose\n * `ComponentType = FunctionComponent | ComponentClass`, and the JSX runtime\n * stores either on `.type`. Without the construct signature, valid Preact\n * `<MyComponent />` expressions fail to assign to `VNode` at the framework\n * boundary (e.g. inside `<Island>` children) — even though class components\n * are rare in modern Preact, the `ComponentType` union includes them.\n */\nexport type VNodeObject = {\n readonly type: string | ((...args: unknown[]) => unknown) | (new (...args: unknown[]) => unknown);\n readonly props: Readonly<Record<string, unknown>>;\n readonly key: unknown;\n};\n\n/**\n * A renderable JSX node: a primitive, `null`, `undefined`, an array, a\n * structured VNode object, or a bare `object`.\n *\n * This union covers every value both Preact and React treat as valid\n * `children`. The bare `object` member is required to make Preact's\n * `ComponentChildren` / `VNode<{}>` assignable without casts — Preact's own\n * `ComponentChild` uses the same widening pattern. The loosening is safe\n * because all SDK runtime code duck-types `unknown` at the boundary\n * (island.ts, content.ts) and the Rust pipeline is type-erased.\n *\n * Importantly, the union does **not** reference any framework-specific type,\n * so packages that depend on `zfb` need not install a React / Preact `@types`\n * package to satisfy this type.\n *\n * **Name-collision note for Preact consumers:** if your file already has\n * `import { VNode } from \"preact\"`, use a qualifier on the zfb import:\n * `import type { VNode as ZfbVNode } from \"@takazudo/zfb\"`.\n */\nexport type VNode =\n | string\n | number\n | boolean\n | null\n | undefined\n | bigint\n | VNodeArray\n | VNodeObject\n | object;\n\nexport interface VNodeArray extends ReadonlyArray<VNode> {}\n\n// Back-compat alias — `ReactNode` was the previous name; code inside this\n// package that has not been migrated yet can still refer to it. New code\n// should use `VNode` directly.\n/** @deprecated Use `VNode` instead. */\nexport type ReactNode = VNode;\n"]}
@@ -40,4 +40,3 @@ export type PaginateRoute<T, K extends string = string> = {
40
40
  * empty page so the index route still renders rather than 404ing.
41
41
  */
42
42
  export declare function paginate<T, K extends string = string>(items: readonly T[], opts: PaginateOptions<K>): PaginateRoute<T, K>[];
43
- //# sourceMappingURL=paginate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"paginate.js","sourceRoot":"","sources":["../src/paginate.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,EAAE;AACF,mFAAmF;AACnF,uEAAuE;AACvE,wEAAwE;AACxE,mCAAmC;AAoCnC;;;;;;;GAOG;AACH,MAAM,UAAU,QAAQ,CACtB,KAAmB,EACnB,IAAwB;IAExB,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,QAAQ,GAAG,CAAC,EAAE,CAAC;QAC1D,MAAM,IAAI,UAAU,CAClB,mDAAmD,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAC3E,CAAC;IACJ,CAAC;IACD,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9D,MAAM,IAAI,SAAS,CACjB,mDAAmD,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAChF,CAAC;IACJ,CAAC;IACD,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;IAC/B,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC;IAC3B,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC;IAC1D,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AAK,CAAC,EAAE,CAChF,CAAC;IACJ,CAAC;IACD,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;IAC/B,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC;IAC3B,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC;IAC1D,MAAM,MAAM,GAA0B,EAAE,CAAC;IACzC,KAAK,IAAI,IAAI,GAAG,CAAC,EAAE,IAAI,IAAI,QAAQ,EAAE,IAAI,EAAE,EAAE,CAAC;QAC5C,MAAM,KAAK,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;QACpC,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,QAAQ,CAAC,CAAC;QACnD,MAAM,CAAC,IAAI,CAAC;YACV,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,EAAuB;YAC3D,KAAK,EAAE;gBACL,IAAI,EAAE;oBACJ,IAAI,EAAE,KAAK;oBACX,IAAI;oBACJ,QAAQ;oBACR,QAAQ;oBACR,KAAK;iBACN;aACF;SACF,CAAC,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// `zfb/paginate` — paginate an array of items into per-page route entries.\n//\n// Mirrors the shape of Astro's `paginate()` so the bundled basic-blog template can\n// emit one route per page from a `paths()` export. The renderer treats\n// each returned object as `{ params, props }`, the same convention used\n// elsewhere by the routing engine.\n\n/** Options accepted by [`paginate`]. */\nexport type PaginateOptions<K extends string = string> = {\n /** Items per page. Must be a positive integer (>= 1). */\n pageSize: number;\n /** Name of the dynamic param to fill (e.g. `\"page\"` for `[page].tsx`). */\n param: K;\n};\n\n/** One page of paginated results. The shape consumed by the page component. */\nexport type PaginatedPage<T> = {\n /** Items belonging to this page. */\n data: T[];\n /** 1-based page number. */\n page: number;\n /** Total number of pages (>= 1). */\n lastPage: number;\n /** Items per page (echoed for convenience). */\n pageSize: number;\n /** Total item count across all pages. */\n total: number;\n};\n\n/**\n * Route entry returned by [`paginate`], one per page.\n *\n * The `K` generic carries the literal param name through, so consumers\n * accessing e.g. `route.params.page` get `string` rather than\n * `string | undefined` under `noUncheckedIndexedAccess`.\n */\nexport type PaginateRoute<T, K extends string = string> = {\n params: Record<K, string>;\n props: { page: PaginatedPage<T> };\n};\n\n/**\n * Slice `items` into pages of `opts.pageSize` and produce one route entry\n * per page. The `param` option names the dynamic segment to fill — for\n * `pages/blog/page/[page].tsx` pass `param: \"page\"`.\n *\n * Always emits at least one route. An empty input list yields a single\n * empty page so the index route still renders rather than 404ing.\n */\nexport function paginate<T, K extends string = string>(\n items: readonly T[],\n opts: PaginateOptions<K>,\n): PaginateRoute<T, K>[] {\n if (!Number.isInteger(opts.pageSize) || opts.pageSize < 1) {\n throw new RangeError(\n `paginate: pageSize must be an integer >= 1, got ${String(opts.pageSize)}`,\n );\n }\n if (typeof opts.param !== \"string\" || opts.param.length === 0) {\n throw new TypeError(\n `paginate: param must be a non-empty string, got ${JSON.stringify(opts.param)}`,\n );\n }\n const pageSize = opts.pageSize;\n const total = items.length;\n const lastPage = Math.max(1, Math.ceil(total / pageSize));\n const routes: PaginateRoute<T, K>[] = [];\n for (let page = 1; page <= lastPage; page++) {\n const start = (page - 1) * pageSize;\n const slice = items.slice(start, start + pageSize);\n routes.push({\n params: { [opts.param]: String(page) } as Record<K, string>,\n props: {\n page: {\n data: slice,\n page,\n lastPage,\n pageSize,\n total,\n },\n },\n });\n }\n return routes;\n}\n"]}
package/dist/plugins.d.ts CHANGED
@@ -317,4 +317,3 @@ export type ZfbPlugin = {
317
317
  * ```
318
318
  */
319
319
  export declare function definePlugin(plugin: ZfbPlugin): ZfbPlugin;
320
- //# sourceMappingURL=plugins.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugins.js","sourceRoot":"","sources":["../src/plugins.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,EAAE;AACF,0EAA0E;AAC1E,wEAAwE;AACxE,wEAAwE;AACxE,oEAAoE;AACpE,oEAAoE;AACpE,EAAE;AACF,uEAAuE;AACvE,sEAAsE;AACtE,qEAAqE;AACrE,sEAAsE;AACtE,sEAAsE;AACtE,6CAA6C;AAC7C,EAAE;AACF,wCAAwC;AACxC,EAAE;AACF,qEAAqE;AACrE,mEAAmE;AACnE,oEAAoE;AACpE,oEAAoE;AACpE,+BAA+B;AA+T/B;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,YAAY,CAAC,MAAiB;IAC5C,OAAO,MAAM,CAAC;AAChB,CAAC"}
1
+ {"version":3,"file":"plugins.js","sourceRoot":"","sources":["../src/plugins.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,EAAE;AACF,0EAA0E;AAC1E,wEAAwE;AACxE,wEAAwE;AACxE,oEAAoE;AACpE,oEAAoE;AACpE,EAAE;AACF,uEAAuE;AACvE,sEAAsE;AACtE,qEAAqE;AACrE,sEAAsE;AACtE,sEAAsE;AACtE,6CAA6C;AAC7C,EAAE;AACF,wCAAwC;AACxC,EAAE;AACF,qEAAqE;AACrE,mEAAmE;AACnE,oEAAoE;AACpE,oEAAoE;AACpE,+BAA+B;AA+T/B;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,YAAY,CAAC,MAAiB;IAC5C,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// `zfb/plugins` — TypeScript helper for the zfb plugin lifecycle.\n//\n// A plugin is a JS module whose default export is a [`ZfbPlugin`] object.\n// `zfb.config.ts` references plugins by `name` (npm bare specifier or a\n// `./`-relative path); the zfb config loader resolves each `name` to an\n// absolute module specifier and the Rust-side plugin host loads the\n// module via dynamic `import()` and dispatches the lifecycle hooks.\n//\n// Sub 3 / issue #108 — initial drop. Three optional hooks: `preBuild`,\n// `postBuild`, `devMiddleware`. Astro-migration epic #253 / sub-issue\n// #255 adds a fourth: `setup`, which runs once before `preBuild` and\n// lets plugins register virtual modules, import aliases, and dev-only\n// injected routes. None of the hooks see real Node IPC objects across\n// the boundary; everything is JSON-friendly.\n//\n// ## Inline functions are NOT supported\n//\n// `PluginConfig` (in `./config.ts`) carries only data. A user cannot\n// inline a function in `zfb.config.ts` — the config goes through a\n// JSON round-trip and any function value would be silently dropped.\n// Plugins must live in their own module (npm package or local file)\n// and be referenced by `name`.\n\n/**\n * Logger handed to every plugin hook. The Rust side wraps `tracing` so\n * the same lines show up alongside the rest of the build's structured\n * logs. Hooks should prefer this over `console.log`.\n */\nexport type ZfbPluginLogger = {\n info(msg: string): void;\n warn(msg: string): void;\n error(msg: string): void;\n};\n\n/**\n * One emitted route in the `postBuild` route manifest (#262).\n * Present on `ctx.routes.routes` so a `postBuild` plugin can iterate\n * every URL the build produced (e.g. to write a `sitemap.xml`).\n */\nexport type ZfbRouteEntry = {\n /** Emitted URL path, e.g. `/`, `/blog/hello/`, `/sitemap.xml`. */\n url: string;\n /** Path under `outDir`, e.g. `index.html`, `blog/hello/index.html`, `sitemap.xml`. */\n output: string;\n /** File extension: `html`, `xml`, `rss`, `txt`, `json`, … */\n extension: string;\n /** Source page module relative to the project root, e.g. `pages/blog/[slug].tsx`. */\n source: string;\n /**\n * `true` when the page is prerendered to disk (default / SSG); `false`\n * when the page exports `prerender = false` and is served by the\n * runtime adapter (SSR — no on-disk artifact under `outDir`).\n *\n * Indexes that enumerate on-disk URLs (sitemap.xml, search-index.json,\n * etc.) should filter `r.prerender !== false` to avoid surfacing SSR\n * routes that have no static output.\n */\n prerender: boolean;\n /**\n * Bound route parameters. Absent for static routes.\n * Dynamic (`[slug]`) params are string scalars; catchall (`[...rest]`)\n * params are string arrays.\n */\n params?: Record<string, string | string[]>;\n};\n\n/**\n * The route manifest exposed on `ctx.routes` during a `postBuild` callback\n * (#262). Sorted by `url` for byte-stable output across runs.\n */\nexport type ZfbRouteManifest = {\n routes: ZfbRouteEntry[];\n};\n\n/**\n * Context passed to `preBuild` and `postBuild`. `outDir` is the\n * resolved absolute path of the configured `outDir` (default\n * `<projectRoot>/dist`). `projectRoot` is the directory containing\n * `zfb.config.ts`.\n *\n * `routes` is **only present on `postBuild`** calls; it is `undefined`\n * on `preBuild`. This is intentional: the route manifest is not\n * available until the build finishes writing `dist/` (#262).\n */\nexport type ZfbBuildHookContext = {\n /** Project root — the directory containing `zfb.config.ts`. */\n projectRoot: string;\n /** Resolved absolute path of the build output directory. */\n outDir: string;\n /** The full loaded `ZfbConfig` (data-only view). */\n config: import(\"./config.js\").ZfbConfig;\n /** Plugin-specific options block, copied verbatim from the matching `PluginConfig.options`. */\n options: Record<string, unknown>;\n /** Logger that wraps the Rust-side `tracing` subscriber. */\n logger: ZfbPluginLogger;\n /**\n * All routes emitted by this build, sorted by URL (#262).\n * Present only on `postBuild` calls; `undefined` on `preBuild`.\n */\n routes?: ZfbRouteManifest;\n};\n\n/**\n * A request handed to a `devMiddleware` handler. Subset of the Node\n * `http.IncomingMessage` surface intentionally — the dev server is\n * Rust-side `axum`, not Node, so we expose only what survives a JSON\n * envelope hop.\n */\nexport type ZfbDevMiddlewareRequest = {\n method: string;\n url: string;\n /** Lower-cased header names → first value. */\n headers: Record<string, string>;\n /** Raw request body; absent for GET/HEAD. UTF-8 only — binary is out of scope for v1 dev plugins. */\n body?: string;\n};\n\n/**\n * Response returned by a `devMiddleware` handler. All fields optional\n * except `status`. `body` may be a string (UTF-8) or a base64-encoded\n * binary payload (set `bodyEncoding` to `\"base64\"` in that case).\n */\nexport type ZfbDevMiddlewareResponse = {\n status: number;\n headers?: Record<string, string>;\n body?: string;\n bodyEncoding?: \"utf8\" | \"base64\";\n};\n\n/**\n * Handler signature for a `devMiddleware` registration. The `next` callback\n * is reserved for future composition; v1 plugins should produce a response\n * directly. Returning `undefined` from the handler signals \"I did not handle\n * this request\" — the dev server then falls through to its built-in routes\n * (the page cache, /__zfb/livereload.js, etc.).\n */\nexport type ZfbDevMiddlewareHandler = (\n req: ZfbDevMiddlewareRequest,\n) => Promise<ZfbDevMiddlewareResponse | undefined> | ZfbDevMiddlewareResponse | undefined;\n\n/**\n * Context passed to `devMiddleware`. The `register` callback installs\n * one handler per URL path prefix. `path` is matched as an exact prefix\n * — a registration on `/doc-history` matches `/doc-history` and\n * `/doc-history/foo`, but NOT `/doc-historyx`.\n */\nexport type ZfbDevMiddlewareContext = {\n projectRoot: string;\n config: import(\"./config.js\").ZfbConfig;\n options: Record<string, unknown>;\n logger: ZfbPluginLogger;\n /** Register an HTTP handler at `path`. Calling twice on the same path overwrites. */\n register(path: string, handler: ZfbDevMiddlewareHandler): void;\n};\n\n/**\n * Loader signature for a virtual-module registration. Must return the\n * **complete ESM module source text** as a string — the bundler /\n * embedded V8 host feeds the returned string in as the module's\n * source verbatim. The loader is invoked **exactly once per build**\n * (and once per `zfb dev` host boot) the first time any consumer\n * imports the registered specifier; subsequent imports of the same\n * specifier re-use the memoised result.\n *\n * Example:\n *\n * ```ts\n * addVirtualModule(\"virtual:my-data\", () =>\n * `export default ${JSON.stringify(myJson)}`,\n * );\n * ```\n */\nexport type ZfbVirtualModuleLoader = () => string | Promise<string>;\n\n/**\n * Context passed to the new `setup` hook (#255). Runs once per host\n * boot, in `Config.plugins` declaration order, **before** `preBuild`.\n *\n * `ctx.command` tells the plugin which lifecycle is active so it can\n * gate per-lifecycle registrations. A dev-only mock route stays gated\n * to `\"dev\"`; a package-owned page route is registered unconditionally\n * (it is prerendered during a build and dev-routed during dev):\n *\n * ```ts\n * setup({ command, injectRoute }) {\n * // package-owned page route (prerendered at BUILD; see injectRoute for\n * // the dev caveat)\n * injectRoute(\"/preset-page\", \"./pages/preset-page.tsx\");\n * // dev-only mock endpoint\n * if (command === \"dev\") {\n * injectRoute(\"/api/dev/x\", \"./scripts/dev-x.ts\");\n * }\n * }\n * ```\n *\n * The hook's surface is intentionally **closed**: only `injectRoute`,\n * `addVirtualModule`, `addAlias`, and `addClientEntry`. There is no\n * `addRemarkPlugin` / `addRehypePlugin` / `addMarkdownVisitor` — by\n * design (see the concept doc for the rationale).\n */\nexport type ZfbSetupContext = {\n /**\n * Active zfb command. `\"build\"` during `zfb build`; `\"dev\"` during\n * `zfb dev`. Affects `injectRoute`: in `\"dev\"`, `\"/\"` is reserved for\n * the devMiddleware catch-all and is rejected; in `\"build\"`, a `\"/\"`\n * package route is allowed (see [`injectRoute`](#injectRoute)).\n */\n command: \"build\" | \"dev\";\n /** Project root — the directory containing `zfb.config.ts`. */\n projectRoot: string;\n /** The full loaded `ZfbConfig` (data-only view). */\n config: import(\"./config.js\").ZfbConfig;\n /** Plugin-specific options block, copied verbatim from `PluginConfig.options`. */\n options: Record<string, unknown>;\n /** Logger that wraps the Rust-side `tracing` subscriber. */\n logger: ZfbPluginLogger;\n\n /**\n * Register an import alias. **Exact-match-only in v1**:\n * `addAlias(\"@/foo\", \"./src/foo.tsx\")` rewrites `import \"@/foo\"`\n * but does NOT match `import \"@/foo/bar\"`. Prefix-matching is\n * explicitly deferred to v2 — switch to one bare alias per file\n * until then.\n *\n * `to` is resolved relative to the project root. Two plugins\n * registering the same `from` with different `to` raises\n * `AliasConflict` and aborts the build.\n */\n addAlias(from: string, to: string): void;\n\n /**\n * Register a virtual module. `specifier` is a bare import\n * specifier (recommended `virtual:` prefix, not enforced).\n * `loader` returns the complete ESM source text as a string and\n * runs **exactly once per build** at first import.\n *\n * Two plugins registering the same `specifier` raises\n * `VirtualModuleConflict` and aborts the build.\n */\n addVirtualModule(specifier: string, loader: ZfbVirtualModuleLoader): void;\n\n /**\n * Register a synthetic / package-owned page route. `pattern` uses the\n * same grammar as `pages/` filenames (`/blog/[slug]`, `/api/dev/x`,\n * `/docs/[...rest]`).\n *\n * - In **build** (package-owned routes), the route is materialised\n * into a per-build overlay pages root and **prerendered** through\n * the normal scan → bundle → render pipeline, so a preset can own a\n * route without the project shipping a `pages/` stub file. A `\"/\"`\n * package route is allowed (it becomes the project's root page,\n * enabling a truly empty/absent user `pages/`). A package route\n * whose URL shape collides with a user `pages/` route is dropped\n * (user `pages/` wins). This is the supported, complete path.\n * - In **dev**, both static and dynamic injected routes are rendered\n * by `zfb dev`. Static routes (where the URL equals the pattern,\n * e.g. `/preset-about`) are seeded into the dev route universe at\n * boot; dynamic routes (e.g. `/preset-docs/[slug]`) are rendered\n * on first request via a request-time synthetic entry — params are\n * extracted from the URL by the Hono router inside the live bundle.\n * User `pages/` files take precedence over any injected route of\n * the same shape (including the dev-only `\"/\"` reservation, which\n * is still rejected at registration in dev). **HMR:** content the\n * route reads from watched collections live-refreshes normally.\n * Editing the package's **compiled entrypoint under `node_modules`**\n * is NOT watched and requires a `zfb dev` restart (restart-only\n * contract — a published package is not project source). **Per-route\n * data:** an injected route loads per-route data via a **dynamic\n * route's `paths()` export** (which returns `{ params, props }`);\n * `getStaticProps` on a package page is not forwarded by the overlay\n * (only `default` + the `prerender` hint are forwarded — same as\n * `zfb build`). A route that needs per-route data should be a\n * dynamic route whose `paths()` reads the data.\n *\n * `opts.prerender` controls the route's prerender shape during a\n * build: omit it (or `true`) for the SSG default; `false` marks an\n * SSR-shaped route, which `output: 'static'` rejects. It is build-only\n * metadata and ignored in dev.\n *\n * Two plugins registering the same `pattern` (or one plugin\n * re-registering it with a different entrypoint) raises\n * `InjectRouteConflict`.\n */\n injectRoute(pattern: string, entrypoint: string, opts?: { prerender?: boolean }): void;\n\n /**\n * Register a package-owned client-side side-effect entry (#1196).\n *\n * `entrypoint` **must** point to a `*.client.{ts,tsx,js,jsx}` file —\n * this is enforced (#1191 review [9]): a path missing the `.client.`\n * infix, or a bare `.client.ts` with an empty stem, throws an error\n * (`addClientEntry` JS-host validation + Rust `InvalidClientEntry`)\n * rather than being silently accepted under an invented name. The entry\n * name is derived from the filename stem minus `.client`\n * (e.g. `my-lib.client.ts` → `my-lib`), via the same canonical helper\n * as user-authored `*.client.*` discovery.\n *\n * The entry is bundled and shipped as\n * `/assets/client/<name>.js` (stable URL) / `/assets/client/<name>-<hash>.js`\n * (production, hashed). User-authored files win on name collision —\n * the registered entry is silently dropped when a user-authored file of\n * the same name exists in the discovery roots.\n *\n * Two plugins registering the same entry name with different entrypoints\n * raises `ClientEntryConflict` and aborts the build.\n *\n * `entrypoint` is resolved relative to the project root if given as a\n * relative path (same rule as `injectRoute`).\n */\n addClientEntry(entrypoint: string): void;\n};\n\n/**\n * The plugin-module shape. `name` is informational (the resolved module\n * specifier wins for identification on the Rust side) and helps the\n * plugin self-identify in logs.\n *\n * Four optional hooks; declaration-order matters when multiple plugins\n * touch the same surface. Each hook is independent — a plugin may\n * declare any subset:\n *\n * - `setup` (#255) — register virtual modules, aliases, injected\n * routes. Runs once at host boot, before `preBuild`.\n * - `preBuild` — file-generation work that downstream stages will\n * see. Runs once per `zfb build` and once per `zfb dev` boot.\n * - `postBuild` — finalisation work that runs after `dist/` has been\n * written.\n * - `devMiddleware` — register HTTP handlers for ad-hoc dev-only\n * URLs. Per-request dispatch, distinct from `injectRoute` (which\n * goes through the page renderer).\n */\nexport type ZfbPlugin = {\n /** Plugin display name; surfaces in error / log lines. */\n name: string;\n setup?(ctx: ZfbSetupContext): Promise<void> | void;\n preBuild?(ctx: ZfbBuildHookContext): Promise<void> | void;\n postBuild?(ctx: ZfbBuildHookContext): Promise<void> | void;\n devMiddleware?(ctx: ZfbDevMiddlewareContext): Promise<void> | void;\n};\n\n/**\n * Identity helper that types the supplied object as a [`ZfbPlugin`].\n * Use as the default export of a plugin module so editors surface\n * field-level types and typos surface at compile time.\n *\n * ```ts\n * import { definePlugin } from \"@takazudo/zfb/plugins\";\n *\n * export default definePlugin({\n * name: \"my-plugin\",\n * async preBuild({ outDir, logger }) {\n * logger.info(`generating index into ${outDir}`);\n * },\n * });\n * ```\n */\nexport function definePlugin(plugin: ZfbPlugin): ZfbPlugin {\n return plugin;\n}\n"]}
package/dist/runtime.d.ts CHANGED
@@ -104,4 +104,3 @@ export declare function __setIslandImporterForTests(impl: (url: string) => Promi
104
104
  */
105
105
  export declare function __hasPendingCancelForTests(element: Element): boolean;
106
106
  export {};
107
- //# sourceMappingURL=runtime.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,EAAE;AACF,sEAAsE;AACtE,sEAAsE;AACtE,wEAAwE;AACxE,uEAAuE;AACvE,mBAAmB;AACnB,EAAE;AACF,kDAAkD;AAClD,sEAAsE;AACtE,gDAAgD;AAChD,2EAA2E;AAC3E,wEAAwE;AACxE,sEAAsE;AACtE,sCAAsC;AACtC,6CAA6C;AAC7C,EAAE;AACF,2EAA2E;AAC3E,oEAAoE;AACpE,sEAAsE;AACtE,8DAA8D;AAE9D,OAAO,EAAE,WAAW,EAAa,MAAM,YAAY,CAAC;AAiBpD,MAAM,CAAC,GAAG,UAA6B,CAAC;AAExC;;;;GAIG;AACH,SAAS,uBAAuB,CAC9B,MAAe,EACf,IAA+B,EAC/B,IAAgB;IAEhB,MAAM,QAAQ,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;IAEnC,IAAI,QAAQ,KAAK,MAAM,EAAE,CAAC;QACxB,IAAI,EAAE,CAAC;QACP,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACvC,CAAC;IAED,IAAI,QAAQ,KAAK,MAAM,EAAE,CAAC;QACxB,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;IACtD,CAAC;IAED,IAAI,QAAQ,KAAK,OAAO,EAAE,CAAC;QACzB,OAAO,aAAa,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACrC,CAAC;IAED,YAAY;IACZ,OAAO,eAAe,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AACvC,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAC7B,MAAe,EACf,IA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;GAGG;AACH,MAAM,UAAU,2BAA2B,CACzC,IAA4C;IAE5C,MAAM,IAAI,GAAG,UAAU,CAAC;IACxB,UAAU,GAAG,IAAI,CAAC;IAClB,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,0BAA0B,CAAC,OAAgB;IACzD,OAAO,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC","sourcesContent":["// Hydration scheduling helper consumed by the hydration runtime (Sub 3).\n//\n// Sub 3 owns the hydration runtime that walks the DOM, finds elements\n// marked with `data-zfb-island`, and dispatches each one through this\n// helper to decide *when* to fire the actual hydrate() call. The helper\n// itself does not know how to hydrate — it only schedules the supplied\n// `fire` callback.\n//\n// The branching matches the `When` union exactly:\n// \"visible\" → IntersectionObserver, threshold 0.0, hydrate on first\n// intersection, then disconnect.\n// \"idle\" → requestIdleCallback if available, otherwise setTimeout(0).\n// \"media\" → matchMedia(target's data-media), hydrate when the query\n// first matches (now or on a later change event), then\n// remove the listener.\n// \"load\" → immediate, synchronous fire.\n//\n// Anything else is treated as \"load\" (with a console.warn in development).\n// The helper is environment-tolerant: callers can run it in jsdom /\n// happy-dom or bare Node, and the absence of `IntersectionObserver` /\n// `requestIdleCallback` / `matchMedia` is handled gracefully.\n\nimport { resolveWhen, type When } from \"./types.js\";\n\n/**\n * Subset of the global object that this module touches. Cast once at the\n * module top so individual scheduler functions don't repeat the inline\n * widening.\n */\ntype SchedulerGlobal = typeof globalThis & {\n requestIdleCallback?: (\n cb: (deadline: { didTimeout: boolean; timeRemaining: () => number }) => void,\n options?: { timeout?: number },\n ) => number;\n cancelIdleCallback?: (handle: number) => void;\n IntersectionObserver?: typeof IntersectionObserver;\n matchMedia?: typeof matchMedia;\n};\n\nconst g = globalThis as SchedulerGlobal;\n\n/**\n * Internal variant of `scheduleHydrate` that also reports whether the fire\n * callback was invoked synchronously. Unexported — call sites in this module\n * use this to decide whether to register a `pendingCancels` entry.\n */\nfunction scheduleHydrateInternal(\n target: Element,\n when: When | string | undefined,\n fire: () => void,\n): { fired: boolean; cancel: () => void } {\n const resolved = resolveWhen(when);\n\n if (resolved === \"load\") {\n fire();\n return { fired: true, cancel: noop };\n }\n\n if (resolved === \"idle\") {\n return { fired: false, cancel: scheduleIdle(fire) };\n }\n\n if (resolved === \"media\") {\n return scheduleMedia(target, fire);\n }\n\n // \"visible\"\n return scheduleVisible(target, fire);\n}\n\n/**\n * Schedule a hydration `fire` callback for `target` according to `when`.\n *\n * Returns a `cancel` function that aborts the scheduling if it has not\n * fired yet. After firing, calling `cancel` is a no-op. If the helper\n * cannot find the relevant browser API (e.g. running in pure Node with no\n * polyfill), it falls back to firing synchronously so server-side smoke\n * tests still observe the call.\n */\nexport function scheduleHydrate(\n target: Element,\n when: When | string | undefined,\n fire: () => void,\n): () => void {\n return scheduleHydrateInternal(target, when, fire).cancel;\n}\n\nfunction noop(): void {\n // intentionally empty\n}\n\n/**\n * Build a one-shot gate around `fn`. The returned `run` invokes `fn`\n * exactly once provided `cancel` has not been called first; `cancel`\n * marks the gate as cancelled (later `run` invocations become no-ops)\n * and reports whether the gate had already fired.\n */\nfunction oneShot(fn: () => void): {\n run: () => void;\n cancel: () => boolean;\n} {\n let fired = false;\n let cancelled = false;\n return {\n run(): void {\n if (cancelled || fired) return;\n fired = true;\n fn();\n },\n cancel(): boolean {\n if (fired) return true;\n cancelled = true;\n return false;\n },\n };\n}\n\nfunction scheduleIdle(fire: () => void): () => void {\n const gate = oneShot(fire);\n\n if (typeof g.requestIdleCallback === \"function\") {\n const handle = g.requestIdleCallback(gate.run);\n return () => {\n const alreadyFired = gate.cancel();\n if (alreadyFired) return;\n if (typeof g.cancelIdleCallback === \"function\") g.cancelIdleCallback(handle);\n };\n }\n\n const handle = setTimeout(gate.run, 0);\n return () => {\n const alreadyFired = gate.cancel();\n if (alreadyFired) return;\n clearTimeout(handle);\n };\n}\n\nfunction scheduleVisible(\n target: Element,\n fire: () => void,\n): { fired: boolean; cancel: () => void } {\n const Observer = g.IntersectionObserver;\n\n // No IntersectionObserver (e.g. very old browsers, bare Node) — fail\n // open and hydrate immediately so the island is at least functional.\n if (typeof Observer !== \"function\") {\n fire();\n return { fired: true, cancel: noop };\n }\n\n const gate = oneShot(fire);\n const observer = new Observer(\n (entries, obs) => {\n for (const entry of entries) {\n if (entry.isIntersecting) {\n obs.disconnect();\n gate.run();\n return;\n }\n }\n },\n { threshold: 0 },\n );\n\n observer.observe(target);\n\n return {\n fired: false,\n cancel: () => {\n const alreadyFired = gate.cancel();\n if (alreadyFired) return;\n observer.disconnect();\n },\n };\n}\n\nfunction scheduleMedia(target: Element, fire: () => void): { fired: boolean; cancel: () => void } {\n const query = target.getAttribute(\"data-media\");\n\n // No matchMedia API (e.g. bare Node, very old browser) or missing/empty\n // query — fail open and hydrate immediately so the island is at least\n // functional.\n if (typeof g.matchMedia !== \"function\" || !query) {\n fire();\n return { fired: true, cancel: noop };\n }\n\n const mql = g.matchMedia(query);\n\n // Already matches — fire synchronously (no pending listener needed).\n if (mql.matches) {\n fire();\n return { fired: true, cancel: noop };\n }\n\n const gate = oneShot(fire);\n\n let removeListener = noop;\n\n // Listen for the first change event where the query matches.\n // We do NOT use `{once:true}` because we must ignore un-match events\n // (e.g. viewport widens back above breakpoint) and only fire on the\n // first match event — `{once:true}` would consume any change, including\n // un-match changes.\n const handler = (e: MediaQueryListEvent): void => {\n if (!e.matches) return; // ignore un-match changes\n removeListener();\n gate.run();\n };\n\n // Modern browsers expose the EventTarget API on MediaQueryList; older\n // Safari (<14) only has the deprecated addListener/removeListener pair\n // and throws on addEventListener. Prefer modern, fall back to legacy,\n // and fail open when neither exists (mirrors the missing-matchMedia case).\n if (typeof mql.addEventListener === \"function\") {\n mql.addEventListener(\"change\", handler);\n removeListener = () => mql.removeEventListener(\"change\", handler);\n } else if (typeof mql.addListener === \"function\") {\n mql.addListener(handler);\n removeListener = () => mql.removeListener(handler);\n } else {\n fire();\n return { fired: true, cancel: noop };\n }\n\n return {\n fired: false,\n cancel: () => {\n const alreadyFired = gate.cancel();\n if (alreadyFired) return;\n removeListener();\n },\n };\n}\n\n// ---------------------------------------------------------------------------\n// mountIslands — DOM walk + dynamic-import dispatcher.\n//\n// `mountIslands` is the entry point the generated `islands-runtime-<hash>.js`\n// bundle calls at script load time. It walks the DOM for the two island\n// markers emitted by the server-side hydration step and the `<Island>`\n// JSX wrapper:\n//\n// 1. `[data-zfb-island]` — SSR'd islands. We `hydrate()` (Preact) /\n// `hydrateRoot()` (React) against the existing server-rendered\n// DOM, gated by `scheduleHydrate(when)`.\n//\n// 2. `[data-zfb-island-skip-ssr]` — SSR-skip islands. The server\n// emitted no markup for these, so we `render()` (Preact) /\n// `createRoot().render()` (React). Skipping hydrate for this case\n// avoids the hydrate-mismatch warnings React/Preact would emit\n// against an empty DOM container.\n//\n// The per-island bundles each export a `mount(props, element, mode)`\n// function (see zfb_islands::render_island_entry_source). The\n// framework-specific glue lives inside that bundle, so this runtime is\n// framework-agnostic.\n//\n// ## Module-level singleton\n//\n// Dynamic imports of the same URL are cached by the JS runtime, so\n// \"switching pages\" (in an SPA shell) reuses the loaded bundle for free.\n// We keep an extra in-memory dedup map keyed by element so an island is\n// never mounted twice (e.g. on hot-reload / repeat-mount scenarios).\n// ---------------------------------------------------------------------------\n\n/**\n * The shape of the default export each per-island bundle ships.\n *\n * `mode === \"hydrate\"` is used for SSR'd islands, `\"render\"` for\n * SSR-skip islands.\n */\ntype IslandMount = (\n props: Record<string, unknown>,\n element: Element,\n mode: \"hydrate\" | \"render\",\n) => void;\n\ntype IslandUnmount = (element: Element) => void;\n\ninterface IslandModule {\n mount?: IslandMount;\n default?: IslandMount;\n unmount?: IslandUnmount;\n}\n\n/**\n * Map of `componentName → island descriptor` baked into the runtime entry.\n *\n * Two descriptor shapes are accepted so the same `mountIslands` runtime\n * handles both bundling strategies the build emits:\n *\n * 1. `string` — a per-island bundle URL. The runtime fetches it via\n * dynamic `import()` and reads `mount` / `default` off the loaded\n * module. Used by the per-island bundling path\n * (`bundle_per_island` / `render_runtime_entry_source`).\n *\n * 2. `IslandModule` — an inline module-shaped object whose `mount` (or\n * `default`) is called directly. Used by the shared-bundle path\n * (`render_shared_bundle_entry_source`): every island's source code\n * is already in the same bundle, so the synthesised entry can hand\n * the runtime the constructed mount functions inline without a\n * second HTTP fetch. This preserves the one-request shared-bundle\n * contract while giving up nothing on hydration semantics\n * (zudolab/zudo-doc#1355 wave 6).\n */\nexport type IslandManifestValue = string | IslandModule;\nexport type IslandManifest = Readonly<Record<string, IslandManifestValue>>;\n\n// WeakMap<Element, unmount thunk> — replaces the old WeakSet.\n// Value is a per-element function that calls the bundle's unmount(element)\n// (or a noop if the bundle does not expose one). Used by unmountIslands()\n// to fire framework lifecycle cleanups before a body swap.\nconst mounted = new WeakMap<Element, () => void>();\n// Elements for which the nested-island self-wrap warning has already been\n// emitted. Guards against repeated warn spam across re-walks (e.g. SPA swaps).\nconst warnedNested = new WeakSet<Element>();\n// Elements with an in-flight dynamic import that has not yet resolved.\n// Two concurrent `mountIslands` invocations (or two `scheduleMount`\n// calls hitting the same element through different code paths) could\n// otherwise both pass the `mounted` guard and both spawn an\n// `importIsland(url)` -> `fn()` chain, double-mounting the component.\n// Adding the element to `pending` synchronously, before the import is\n// fired, closes that window; the entry is removed in both the success\n// (after `mounted.set`) and failure branches.\nconst pending = new WeakSet<Element>();\n\n// Module-level captured manifest — set by the first `mountIslands` call and reused by\n// `mountNewIslands()` so the client-router does not need to know the manifest directly.\n// Named technical cause (W1B §12.1): the router lives in @takazudo/zfb-runtime; the\n// islands manifest lives in @takazudo/zfb. Passing the manifest through the swap event\n// would require widening the event API or threading manifest into router options. The\n// captured-manifest pattern keeps the package boundary clean.\nlet capturedManifest: IslandManifest | null = null;\n\n// Map of element → cancel-function for deferred-hydration islands\n// (data-when=\"idle\"|\"visible\"|\"media\").\n// Populated in scheduleMount; consulted on `zfb:before-swap` so deferred fires do not run\n// against orphan elements after a body swap. (W1B §12.5)\nconst pendingCancels = new Map<Element, () => void>();\n\n/**\n * Walk the DOM and mount every `[data-zfb-island]` / `[data-zfb-island-skip-ssr]`\n * element using `manifest`.\n *\n * No-op when `document` is undefined (SSR, edge runtime). Safe to call\n * multiple times: each element is mounted at most once thanks to the\n * `mounted` WeakSet guard.\n *\n * The manifest is captured at module level so `mountNewIslands()` can re-use\n * it after an SPA body swap without needing the caller to re-supply it.\n */\nexport function mountIslands(manifest: IslandManifest): void {\n if (typeof document === \"undefined\") return;\n\n // Capture the manifest for post-swap re-walks via mountNewIslands().\n capturedManifest = manifest;\n\n const ssrIslands = document.querySelectorAll<HTMLElement>(\"[data-zfb-island]\");\n for (const el of Array.from(ssrIslands)) {\n // Skip the empty-skeleton case left behind when the server-side\n // rewriter has not run yet (data-zfb-island=\"\" with no component\n // name). The hydration emit step is expected to fill this in\n // before the page reaches the browser; if it didn't, we cannot\n // dispatch.\n const name = el.getAttribute(\"data-zfb-island\");\n if (!name) continue;\n warnIfNestedIsland(el, name);\n scheduleMount(manifest, el, name, \"hydrate\");\n }\n\n const skipSsrIslands = document.querySelectorAll<HTMLElement>(\"[data-zfb-island-skip-ssr]\");\n for (const el of Array.from(skipSsrIslands)) {\n const name = el.getAttribute(\"data-zfb-island-skip-ssr\");\n if (!name) continue;\n warnIfNestedIsland(el, name);\n scheduleMount(manifest, el, name, \"render\");\n }\n}\n\n/**\n * Re-walk the current document body and mount any new island markers introduced\n * by an SPA body swap. Uses the manifest captured by the previous `mountIslands`\n * call — no manifest arg required.\n *\n * The caller (client-router `router.ts`) invokes this after `swap()` + `runScripts()`\n * and before dispatching `zfb:page-load`, per W1B §12.2 contract.\n *\n * No-op when called before `mountIslands` (capturedManifest is null) or when\n * `document` is undefined.\n */\nexport function mountNewIslands(): void {\n if (typeof document === \"undefined\") return;\n if (capturedManifest === null) return;\n\n const manifest = capturedManifest;\n\n const ssrIslands = document.querySelectorAll<HTMLElement>(\"[data-zfb-island]\");\n for (const el of Array.from(ssrIslands)) {\n const name = el.getAttribute(\"data-zfb-island\");\n if (!name) continue;\n warnIfNestedIsland(el, name);\n scheduleMount(manifest, el, name, \"hydrate\");\n }\n\n const skipSsrIslands = document.querySelectorAll<HTMLElement>(\"[data-zfb-island-skip-ssr]\");\n for (const el of Array.from(skipSsrIslands)) {\n const name = el.getAttribute(\"data-zfb-island-skip-ssr\");\n if (!name) continue;\n warnIfNestedIsland(el, name);\n scheduleMount(manifest, el, name, \"render\");\n }\n}\n\n/**\n * Cancel deferred-hydration callbacks for all islands in the old body before a\n * swap. Prevents idle / visibility callbacks from running against orphan elements\n * after `swapBodyElement` removes them from the live document. (W1B §12.5)\n *\n * Call this on `zfb:before-swap` (or equivalently, in the router's swap sequence\n * before `swap()` mutates the DOM). Fire-and-forget; safe to call if nothing is\n * pending.\n */\nexport function cancelPendingIslands(): void {\n for (const [el, cancel] of pendingCancels) {\n cancel();\n pendingCancels.delete(el);\n }\n}\n\n/**\n * Warn (once per element, dev-only) when an island marker element is found\n * nested inside another island marker. Self-wrapping an island — emitting a\n * `data-zfb-island` or `data-zfb-island-skip-ssr` container *inside* another\n * island component's render output — mis-hydrates because the runtime will\n * try to mount both the outer and inner islands independently. The outer\n * island's framework instance owns the inner DOM, so a second `hydrate()` /\n * `render()` call against the inner element races with the outer render and\n * produces undefined behaviour.\n *\n * The fix is to author the inner component bare (no `<Island>` in its own\n * render output) and apply the `<Island when=\"...\">` wrapper at the call site.\n */\nfunction warnIfNestedIsland(el: Element, componentName: string): void {\n if (typeof process === \"undefined\" || !process.env || process.env[\"NODE_ENV\"] === \"production\") {\n return;\n }\n if (warnedNested.has(el)) return;\n const parent = el.parentElement;\n if (!parent || typeof parent.closest !== \"function\") return;\n const ancestor = parent.closest(\"[data-zfb-island],[data-zfb-island-skip-ssr]\");\n if (!ancestor) return;\n warnedNested.add(el);\n // eslint-disable-next-line no-console\n console.warn(\n `[zfb] Island \"${componentName}\" is nested inside another island marker. ` +\n `Self-wrapping an island mis-hydrates: the outer framework instance owns ` +\n `the inner DOM, causing a conflicting mount. ` +\n `Fix: author \"${componentName}\" bare (remove <Island> from its own render output) ` +\n `and apply <Island when=\"...\"> at the call site instead.`,\n );\n}\n\nfunction scheduleMount(\n manifest: IslandManifest,\n element: Element,\n componentName: string,\n mode: \"hydrate\" | \"render\",\n): void {\n // Skip elements already mounted OR currently importing — the latter\n // prevents two concurrent `mountIslands` calls from each firing a\n // separate dynamic import for the same element.\n if (mounted.has(element) || pending.has(element)) return;\n\n const entry = manifest[componentName];\n if (entry == null) {\n if (typeof process !== \"undefined\" && process.env && process.env[\"NODE_ENV\"] !== \"production\") {\n // eslint-disable-next-line no-console\n console.warn(\n `[zfb] no island manifest entry for component \"${componentName}\" — ` +\n `the runtime manifest is out of sync with the rendered HTML.`,\n );\n }\n return;\n }\n\n const when = element.getAttribute(\"data-when\") ?? undefined;\n\n // Two manifest shapes:\n //\n // - `string` (per-island bundle URL): fetch via dynamic `import()`\n // and call `mount` / `default` on the resolved module.\n // - `IslandModule` (inline descriptor): the shared-bundle path has\n // already imported every island's source into the same bundle and\n // constructed a mount function for it. Skip the dynamic import\n // and call the supplied function directly.\n if (typeof entry !== \"string\") {\n fireInlineMount(element, entry, mode);\n return;\n }\n\n const url: string = entry;\n\n const fire = (): void => {\n // Re-check both guards in case `fire` is invoked from a deferred\n // scheduler (rIC/rAF/visibility) after a sibling caller already\n // mounted or started importing for this element.\n if (mounted.has(element) || pending.has(element)) return;\n\n // When the deferred fire actually runs, the cancel handle is no longer\n // needed — remove it so pendingCancels doesn't hold stale entries.\n pendingCancels.delete(element);\n\n // Lazy props parse: read and parse data-props only now that we know we\n // are actually going to mount this island. For deferred strategies\n // (media, visible, idle) this avoids JSON.parse work at boot time for\n // islands that may never hydrate (e.g. media query never matches).\n const props = readProps(element);\n\n // Mark as pending BEFORE firing the import so any concurrent\n // `mountIslands` invocation that arrives during the await window\n // is short-circuited by `scheduleMount`'s guard.\n pending.add(element);\n\n // Dynamic-import is cached by the JS runtime, so repeat hits for\n // the same URL share the resolved module — module-level\n // singletons are fine.\n //\n // We move the element from `pending` to `mounted` only on the\n // success path so a failed import (e.g. transient network blip\n // in dev) doesn't permanently block a retry of the same element.\n let started: Promise<IslandModule>;\n try {\n started = importIsland(url);\n } catch (err) {\n // Some implementations of dynamic-import wrappers can throw\n // synchronously (e.g. URL parsing errors). Treat the same as\n // an async rejection.\n pending.delete(element);\n // eslint-disable-next-line no-console\n console.error(`[zfb] failed to start dynamic import for ${url}`, err);\n return;\n }\n started.then(\n (mod) => {\n const fn = mod.mount ?? mod.default;\n if (typeof fn !== \"function\") {\n pending.delete(element);\n if (\n typeof process !== \"undefined\" &&\n process.env &&\n process.env[\"NODE_ENV\"] !== \"production\"\n ) {\n // eslint-disable-next-line no-console\n console.warn(`[zfb] island bundle at ${url} did not export mount() or default()`);\n }\n return;\n }\n // Stale-mount race guard: if the element was detached while the\n // dynamic import was in-flight (e.g. a body swap happened), skip\n // mounting — the element is no longer in the live document and\n // its useEffect listeners would never receive a cleanup call.\n if (!element.isConnected) {\n pending.delete(element);\n return;\n }\n const unmountThunk = mod.unmount\n ? () => mod.unmount!(element)\n : () => {\n // noop — bundle does not expose unmount\n };\n mounted.set(element, unmountThunk);\n pending.delete(element);\n fn(props, element, mode);\n },\n (err: unknown) => {\n // Surface the error in dev so the user notices, then clear\n // both guards so a later retry (e.g. another scheduleHydrate\n // fire) can attempt the import again.\n pending.delete(element);\n mounted.delete(element);\n // eslint-disable-next-line no-console\n console.error(`[zfb] failed to load island bundle ${url}`, err);\n },\n );\n };\n\n if (mode === \"render\") {\n // SSR-skip islands ignore data-when: there is nothing to defer\n // hydration of, just an empty container we paint into. Mount\n // immediately so the user sees output.\n fire();\n return;\n }\n\n const { fired, cancel } = scheduleHydrateInternal(element, when, fire);\n // Track deferred-hydration cancel handle so cancelPendingIslands() can abort\n // idle / visibility callbacks before a body swap. (W1B §12.5)\n // Only register when the scheduler did NOT fire synchronously — a synchronous\n // fire means the island is already handling its import and there is no\n // deferred callback to cancel. Registering noop after a sync fire would leave\n // a stale pendingCancels entry for an already-handled element. (#743)\n if (when && when !== \"load\" && !fired) {\n pendingCancels.set(element, cancel);\n }\n}\n\n/**\n * Run the mount step for the inline-module manifest shape used by the\n * shared-bundle path. The module is already in memory (it was imported\n * into the bundle at build time), so there is no async window to\n * coordinate around — we just call `mount` / `default` directly,\n * gated by the same `data-when` semantics as the URL path.\n */\nfunction fireInlineMount(element: Element, mod: IslandModule, mode: \"hydrate\" | \"render\"): void {\n const fn = mod.mount ?? mod.default;\n if (typeof fn !== \"function\") {\n if (typeof process !== \"undefined\" && process.env && process.env[\"NODE_ENV\"] !== \"production\") {\n // eslint-disable-next-line no-console\n console.warn(\"[zfb] inline island manifest entry did not export mount() or default()\");\n }\n return;\n }\n\n const fire = (): void => {\n // Re-check the guard in case `fire` is invoked from a deferred\n // scheduler (rIC/rAF/visibility) after a sibling caller already\n // mounted this element.\n if (mounted.has(element)) return;\n // When the deferred fire actually runs, the cancel handle is no longer\n // needed — remove it so pendingCancels doesn't hold stale entries.\n pendingCancels.delete(element);\n // Stale-mount race guard for deferred inline mounts: skip if the element\n // was detached (e.g. body swap) while the idle/visible callback was queued.\n if (!element.isConnected) return;\n // Lazy props parse: read and parse data-props only at mount time.\n // For deferred strategies (media, visible, idle) this avoids JSON.parse\n // work at boot time for islands that may never hydrate.\n const props = readProps(element);\n const unmountThunk = mod.unmount\n ? () => mod.unmount!(element)\n : () => {\n // noop — inline module does not expose unmount\n };\n mounted.set(element, unmountThunk);\n fn(props, element, mode);\n };\n\n if (mode === \"render\") {\n fire();\n return;\n }\n\n const when = element.getAttribute(\"data-when\") ?? undefined;\n const { fired, cancel } = scheduleHydrateInternal(element, when, fire);\n // Track deferred-hydration cancel handle so cancelPendingIslands() can abort\n // idle / visibility callbacks before a body swap. (W1B §12.5)\n // Only register when the scheduler did NOT fire synchronously — a synchronous\n // fire means the island is already handling its mount and there is no\n // deferred callback to cancel. Registering noop after a sync fire would leave\n // a stale pendingCancels entry for an already-handled element. (#743)\n if (when && when !== \"load\" && !fired) {\n pendingCancels.set(element, cancel);\n }\n}\n\n/**\n * Unmount all currently-mounted islands within `root` (default: `document.body`).\n *\n * Walks `root` for `[data-zfb-island]` and `[data-zfb-island-skip-ssr]` elements,\n * looks up each element's unmount thunk in the `mounted` WeakMap, calls it (which\n * triggers `render(null, element)` for Preact or `root.unmount()` for React), and\n * removes the entry from the map so `mountNewIslands()` can re-mount later.\n *\n * Call this before `swapBodyElement(...)` so the OLD body's islands receive proper\n * framework lifecycle cleanup (useEffect teardowns, etc.) before being discarded.\n *\n * No-op for elements not in the `mounted` map (e.g. never-mounted or already cleaned up).\n */\nexport function unmountIslands(root: ParentNode = document.body): void {\n const selector = \"[data-zfb-island],[data-zfb-island-skip-ssr]\";\n const elements = root.querySelectorAll<HTMLElement>(selector);\n for (const el of Array.from(elements)) {\n const thunk = mounted.get(el);\n if (thunk) {\n thunk();\n mounted.delete(el);\n }\n }\n}\n\nfunction readProps(element: Element): Record<string, unknown> {\n const raw = element.getAttribute(\"data-props\");\n if (!raw) return {};\n try {\n const parsed = JSON.parse(raw) as unknown;\n // Reject arrays explicitly: `typeof [] === \"object\"` is true but\n // an array is not a valid props bag, and passing it through would\n // mean the component receives index-keyed values where it\n // expected a record. Fall through to the empty-object default\n // instead of forwarding a malformed shape.\n if (parsed && typeof parsed === \"object\" && !Array.isArray(parsed)) {\n return parsed as Record<string, unknown>;\n }\n } catch {\n // fall through\n }\n return {};\n}\n\n/**\n * Indirection so tests can stub the dynamic import without intercepting\n * the global `import()`. In production this is a thin wrapper over\n * native `import(url)`.\n */\nlet importImpl: (url: string) => Promise<IslandModule> = (url) =>\n // Modern bundlers (esbuild, Vite, Rollup, webpack) preserve a plain\n // `import(<dynamic>)` call when the argument isn't a static literal,\n // so we no longer need the `new Function(...)` indirection — which\n // also failed under strict CSPs that disallow `unsafe-eval`.\n import(/* @vite-ignore */ /* webpackIgnore: true */ url) as Promise<IslandModule>;\n\nfunction importIsland(url: string): Promise<IslandModule> {\n return importImpl(url);\n}\n\n/**\n * Test-only seam. Replace the module dynamic-import with a fake.\n * Returns the previous implementation so tests can restore it.\n */\nexport function __setIslandImporterForTests(\n impl: (url: string) => Promise<IslandModule>,\n): (url: string) => Promise<IslandModule> {\n const prev = importImpl;\n importImpl = impl;\n return prev;\n}\n\n/**\n * Test-only seam. Returns whether the given element has an entry in the\n * module-private `pendingCancels` Map. Used to assert that a synchronous\n * scheduler fire does not leave a stale entry behind. (#743)\n */\nexport function __hasPendingCancelForTests(element: Element): boolean {\n return pendingCancels.has(element);\n}\n"]}
package/dist/slugify.d.ts CHANGED
@@ -66,4 +66,3 @@ export declare class SlugAllocator {
66
66
  */
67
67
  reset(): void;
68
68
  }
69
- //# sourceMappingURL=slugify.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"slugify.js","sourceRoot":"","sources":["../src/slugify.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,8EAA8E;AAC9E,qDAAqD;AACrD,8EAA8E;AAE9E,wDAAwD;AACxD,SAAS,IAAI,CAAC,EAAU;IACtB,qFAAqF;IACrF,OAAO,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC9B,CAAC;AAED;;;;;GAKG;AACH,SAAS,UAAU,CAAC,EAAU;IAC5B,IAAI,IAAI,CAAC,EAAE,CAAC;QAAE,OAAO,IAAI,CAAC;IAC1B,OAAO,CACL,EAAE,KAAK,GAAG;QACV,EAAE,KAAK,GAAG;QACV,EAAE,KAAK,GAAG;QACV,EAAE,KAAK,GAAG;QACV,EAAE,KAAK,GAAG;QACV,EAAE,KAAK,GAAG;QACV,EAAE,KAAK,GAAG;QACV,EAAE,KAAK,GAAG;QACV,EAAE,KAAK,GAAG;QACV,EAAE,KAAK,GAAG;QACV,EAAE,KAAK,GAAG;QACV,EAAE,KAAK,GAAG;QACV,EAAE,KAAK,GAAG;QACV,EAAE,KAAK,GAAG;QACV,EAAE,KAA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oD;QACpD,IAAI,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5B,OAAO,GAAG,KAAK,SAAS,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC;YAC5C,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;YACjB,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1B,CAAC;QAED,MAAM,SAAS,GAAG,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;QACjE,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QAC5C,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC;QAC/B,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;OAGG;IACH,KAAK;QACH,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;QAClB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;IAClB,CAAC;CACF","sourcesContent":["/**\n * Heading-anchor slug utilities — a pure-TypeScript port of the Rust\n * `slugify` / `next_slug` / `SlugAllocator` in\n * `crates/zfb-content/src/plugins/heading_links.rs`.\n *\n * These functions produce the `id` attribute values that appear on\n * `<h2>`–`<h6>` elements in the rendered HTML. They are intentionally\n * **not** compatible with npm `github-slugger`: stripped punctuation\n * collapses to a `-` separator (`\"a,b\"` → `\"a-b\"`), and leading/trailing\n * whitespace / stripped chars emit nothing rather than a stray dash.\n *\n * ⚠️ These functions produce heading-anchor slugs (e.g. `\"hello-world\"`\n * for `<h2 id=\"hello-world\">`). They are **different** from\n * `_relPathToSlug` in `content.ts`, which converts a file-system relative\n * path into a URL slug for `CollectionEntry.slug`.\n *\n * Parity is enforced by the shared fixture at\n * `crates/zfb-content/tests/fixtures/slugify-parity.json`, consumed by\n * both a Rust integration test and the `slugify.test.ts` vitest suite.\n */\n\n// ---------------------------------------------------------------------------\n// Helpers — mirrors the Rust `is_stripped` predicate\n// ---------------------------------------------------------------------------\n\n/** Unicode General Category Cc (control characters). */\nfunction isCc(ch: string): boolean {\n // \\p{Cc} = general category \"Control\" (C0 + C1 blocks: U+0000–U+001F, U+007F–U+009F)\n return /^\\p{Cc}$/u.test(ch);\n}\n\n/**\n * Returns true when the character should be stripped (maps to a dash\n * separator in the output). Mirrors Rust's `is_stripped`:\n * - Unicode Cc control characters\n * - Explicit ASCII punctuation set: `! \" # $ % & ' ( ) * + , . / : ; < = > ? @ [ \\ ] ^ ` { | } ~`\n */\nfunction isStripped(ch: string): boolean {\n if (isCc(ch)) return true;\n return (\n ch === \"!\" ||\n ch === '\"' ||\n ch === \"#\" ||\n ch === \"$\" ||\n ch === \"%\" ||\n ch === \"&\" ||\n ch === \"'\" ||\n ch === \"(\" ||\n ch === \")\" ||\n ch === \"*\" ||\n ch === \"+\" ||\n ch === \",\" ||\n ch === \".\" ||\n ch === \"/\" ||\n ch === \":\" ||\n ch === \";\" ||\n ch === \"<\" ||\n ch === \"=\" ||\n ch === \">\" ||\n ch === \"?\" ||\n ch === \"@\" ||\n ch === \"[\" ||\n ch === \"\\\\\" ||\n ch === \"]\" ||\n ch === \"^\" ||\n ch === \"`\" ||\n ch === \"{\" ||\n ch === \"|\" ||\n ch === \"}\" ||\n ch === \"~\"\n );\n}\n\n/**\n * Returns true when `ch` is a Unicode whitespace character.\n *\n * Mirrors Rust `char::is_whitespace` which is `\\p{White_Space}/u` — NOT\n * the JS `\\s` class (`\\s` wrongly matches U+FEFF BYTE ORDER MARK and\n * misses U+0085 NEXT LINE).\n */\nfunction isWhitespace(ch: string): boolean {\n return /^\\p{White_Space}$/u.test(ch);\n}\n\n// ---------------------------------------------------------------------------\n// slugify\n// ---------------------------------------------------------------------------\n\n/**\n * Produce a heading-anchor slug from `input`, matching the Rust\n * `slugify()` in `crates/zfb-content/src/plugins/heading_links.rs`.\n *\n * Algorithm (per Unicode code point):\n * - whitespace or stripped punctuation → emit ONE `-` unless the last\n * emitted character was already a `-` (leading separators are skipped\n * because `lastDash` starts `true`).\n * - anything else → push `ch.toLowerCase()` (per-code-point, not\n * whole-string, to avoid Greek final-sigma context collapsing).\n * - finally pop ONE trailing `-` if present.\n *\n * Divergence from npm github-slugger (intentional — parity target is\n * the Rust function, not npm):\n * - `\"a,b\"` → `\"a-b\"` (stripped punctuation emits a dash, not nothing)\n * - `\" --weird-- \"` → `\"--weird--\"` (existing dashes/underscores pass\n * through unchanged)\n */\nexport function slugify(input: string): string {\n let out = \"\";\n let lastDash = true;\n\n for (const ch of input) {\n if (isWhitespace(ch) || isStripped(ch)) {\n if (!lastDash) {\n out += \"-\";\n lastDash = true;\n }\n } else {\n // Per-code-point lowercase — avoids Greek final-sigma context:\n // \"ΦΟΣ\" → \"φοσ\" not \"φος\".\n out += ch.toLowerCase();\n lastDash = false;\n }\n }\n\n if (out.endsWith(\"-\")) {\n out = out.slice(0, -1);\n }\n\n return out;\n}\n\n// ---------------------------------------------------------------------------\n// next_slug\n// ---------------------------------------------------------------------------\n\n/**\n * Allocate the next deduplicated slug for `base` against a per-document\n * counter map.\n *\n * Mirrors Rust `next_slug`: first occurrence returns `base`, second\n * returns `base-1`, third `base-2`, … Empty `base` short-circuits to\n * `\"\"` without mutating the map.\n */\nfunction nextSlug(seen: Map<string, number>, base: string): string {\n if (base === \"\") return \"\";\n const count = seen.get(base) ?? 0;\n const slug = count === 0 ? base : `${base}-${count}`;\n seen.set(base, count + 1);\n return slug;\n}\n\n// ---------------------------------------------------------------------------\n// SlugAllocator\n// ---------------------------------------------------------------------------\n\n/**\n * Strategy-aware slug allocator for a single document.\n *\n * Mirrors Rust `SlugAllocator` in heading_links.rs:70-118.\n *\n * @param strategy `\"flat\"` (default) — per-document dedup counter, mirrors\n * github-slugger numbering. `\"hierarchical\"` — each slug is prefixed with\n * its ancestor chain and deduped on the full candidate path.\n *\n * Depth contract: callers pass `depth` values 2–6 (h2–h6). h1 is never\n * allocated — it is handled by the page layout, not the markdown body.\n */\nexport class SlugAllocator {\n private readonly strategy: \"flat\" | \"hierarchical\";\n private seen: Map<string, number>;\n /** Hierarchical ancestor stack of `[depth, finalId]` pairs. Unused in flat mode. */\n private stack: Array<[number, string]>;\n\n constructor(strategy: \"flat\" | \"hierarchical\" = \"flat\") {\n this.strategy = strategy;\n this.seen = new Map();\n this.stack = [];\n }\n\n /**\n * Allocate the slug for a heading of `depth` (2–6) whose slugified text\n * is `base`. Returns `\"\"` for an empty `base` without mutating state.\n */\n allocate(depth: number, base: string): string {\n if (this.strategy === \"flat\") {\n return nextSlug(this.seen, base);\n }\n\n // Hierarchical mode\n if (base === \"\") return \"\";\n\n // Pop ancestors whose depth >= this heading's depth\n let top = this.stack.at(-1);\n while (top !== undefined && top[0] >= depth) {\n this.stack.pop();\n top = this.stack.at(-1);\n }\n\n const candidate = top !== undefined ? `${top[1]}-${base}` : base;\n const slug = nextSlug(this.seen, candidate);\n this.stack.push([depth, slug]);\n return slug;\n }\n\n /**\n * Clear all per-document state (dedup counters AND the hierarchical\n * ancestor stack). Call between documents to avoid slug counter leakage.\n */\n reset(): void {\n this.seen.clear();\n this.stack = [];\n }\n}\n"]}
package/dist/types.d.ts CHANGED
@@ -27,4 +27,3 @@ export declare function isWhen(value: unknown): value is When;
27
27
  * wrapper.
28
28
  */
29
29
  export declare function resolveWhen(when: unknown): When;
30
- //# sourceMappingURL=types.d.ts.map
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,EAAE;AACF,wEAAwE;AACxE,2EAA2E;AAC3E,4EAA4E;AAkB5E,0EAA0E;AAC1E,MAAM,CAAC,MAAM,WAAW,GAAoB,CAAC,SAAS,EA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AAW,CAAC,IAAa;IACvC,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,YAAY,CAAC;IAC5C,IAAI,MAAM,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IAC9B,IAAI,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,YAAY,EAAE,CAAC;QAC9F,sCAAsC;QACtC,OAAO,CAAC,IAAI,CACV,uBAAuB,MAAM,CAAC,IAAI,CAAC,2BAA2B;YAC5D,oEAAoE,YAAY,IAAI,CACvF,CAAC;IACJ,CAAC;IACD,OAAO,YAAY,CAAC;AACtB,CAAC","sourcesContent":["// Public type surface for the zfb island system.\n//\n// `When` is the string-literal union of allowed `data-when` values. The\n// hydration runtime (Sub 3) reads the same attribute and dispatches on the\n// same set of strings. Keep these in sync; the unit tests pin the spelling.\n\n/**\n * Hydration scheduling strategy.\n *\n * - `\"visible\"` — hydrate when the island first intersects the viewport\n * (IntersectionObserver, threshold 0). Cheapest deferral for content the\n * user has not scrolled to yet.\n * - `\"idle\"` — hydrate during the next idle callback. Falls back to a\n * `setTimeout(0)` on platforms without `requestIdleCallback`.\n * - `\"load\"` — hydrate immediately and synchronously. Default when\n * `when` is omitted.\n * - `\"media\"` — hydrate when a CSS media query first matches (matchMedia).\n * Requires the companion `media` prop on `<Island>`. Degrades to immediate\n * hydration when `window.matchMedia` is unavailable.\n */\nexport type When = \"visible\" | \"idle\" | \"load\" | \"media\";\n\n/** Public set of allowed `When` values, useful for runtime validation. */\nexport const WHEN_VALUES: readonly When[] = [\"visible\", \"idle\", \"load\", \"media\"];\n\n/** Default `when` strategy applied when `when` is omitted. */\nexport const DEFAULT_WHEN: When = \"load\";\n\n/** Type guard for `When`. */\nexport function isWhen(value: unknown): value is When {\n return typeof value === \"string\" && (WHEN_VALUES as readonly string[]).includes(value);\n}\n\n/**\n * Resolve the validated `when` value, warning in development for unknown\n * inputs. Returns the input unchanged when valid, or [`DEFAULT_WHEN`]\n * otherwise. Lives here (rather than in `island.ts`) so the runtime\n * scheduler can import it without transitively pulling in the JSX\n * wrapper.\n */\nexport function resolveWhen(when: unknown): When {\n if (when === undefined) return DEFAULT_WHEN;\n if (isWhen(when)) return when;\n if (typeof process !== \"undefined\" && process.env && process.env[\"NODE_ENV\"] !== \"production\") {\n // eslint-disable-next-line no-console\n console.warn(\n `[zfb] <Island when=\"${String(when)}\"> is not a valid value. ` +\n `Expected \"visible\" | \"idle\" | \"load\" | \"media\". Falling back to \"${DEFAULT_WHEN}\".`,\n );\n }\n return DEFAULT_WHEN;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takazudo/zfb",
3
- "version": "0.1.0-next.74",
3
+ "version": "0.1.0-next.76",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Rust-built static-site engine for Astro and Next.js users — millisecond rebuilds, single binary. SDK with islands, content collections, pagination, and config helpers.",
@@ -74,11 +74,11 @@
74
74
  "LICENSE"
75
75
  ],
76
76
  "optionalDependencies": {
77
- "@takazudo/zfb-darwin-arm64": "0.1.0-next.74",
78
- "@takazudo/zfb-darwin-x64": "0.1.0-next.74",
79
- "@takazudo/zfb-linux-arm64-gnu": "0.1.0-next.74",
80
- "@takazudo/zfb-linux-x64-gnu": "0.1.0-next.74",
81
- "@takazudo/zfb-win32-x64-msvc": "0.1.0-next.74"
77
+ "@takazudo/zfb-darwin-arm64": "0.1.0-next.76",
78
+ "@takazudo/zfb-darwin-x64": "0.1.0-next.76",
79
+ "@takazudo/zfb-linux-arm64-gnu": "0.1.0-next.76",
80
+ "@takazudo/zfb-linux-x64-gnu": "0.1.0-next.76",
81
+ "@takazudo/zfb-win32-x64-msvc": "0.1.0-next.76"
82
82
  },
83
83
  "publishConfig": {
84
84
  "access": "public"
@@ -1 +0,0 @@
1
- {"version":3,"file":"client-script.d.ts","sourceRoot":"","sources":["../src/client-script.ts"],"names":[],"mapp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AAE,qBAAqB,GAAG,uBAAuB,CAE/E;AAED,yEAAyE;AACzE,wBAAgB,YAAY,CAAC,KAAK,EAAE,qBAAqB,GAAG,uBAAuB,CAElF;AAED,uEAAuE;AACvE,wBAAgB,WAAW,CAAC,KAAK,EAAE,qBAAqB,GAAG,uBAAuB,CAEjF;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;CAYpB,CAAC;AAEX;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,aAAa,GAAG,SAAS,EACrC,OAAO,EAAE,aAAa,GAAG,SAAS,GACjC,aAAa,CAEf"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"frontmatter.d.ts","sourceRoot":"","sources":["../src/frontmatter.ts"],"names":[],"mappings":"AA4BA,qDAAqD;AACrD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,iBAAiB,CA2C/D"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACnB,MAAM,EACN,oBAAoB,EACpB,WAAW,EACX,KAAK,aAAa,EAClB,KAAK,WAAW,GACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,eAAe,EACf,YAAY,EACZ,eAAe,EACf,oBAAoB,EACpB,cAAc,GACf,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACxE,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,EAAE,YAAY,EA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AAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,CAAC,GAC3C,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,CAAC,CAIxC;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAEpE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"slugify.d.ts","sourceRoot":"","sources":["../src/slugify.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAqEH;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAuB7C;AA0BD;;;;;;;;;;;GAWG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA0B;IACnD,OAAO,CAAC,IAAI,CAAsB;IAClC,oFAAoF;IACpF,OAAO,CAAC,KAAK,CAA0B;gBAE3B,QAAQ,GAAE,MAAM,GAAG,cAAuB;IAMtD;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM;IAqB7C;;;OAGG;IACH,KAAK,IAAI,IAAI;CAId"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAEzD,0EAA0E;AAC1E,eAAO,MAAM,WAAW,EAAE,SAAS,IAAI,EAAyC,CAAC;AAEjF,8DAA8D;AAC9D,eAAO,MAAM,YAAY,EAAE,IAAa,CAAC;AAEzC,6BAA6B;AAC7B,wBAAgB,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,IAAI,CAEpD;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAW/C"}