okno 1.0.0-beta.43 → 1.0.0-beta.45

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.
Files changed (57) hide show
  1. package/dist/astro/index.d.ts +0 -8
  2. package/dist/astro/index.d.ts.map +1 -1
  3. package/dist/astro/index.js +6 -18
  4. package/dist/build-revision.d.ts +5 -0
  5. package/dist/build-revision.d.ts.map +1 -0
  6. package/dist/codegen/generate.d.ts +1 -1
  7. package/dist/codegen/generate.d.ts.map +1 -1
  8. package/dist/codegen/modules.d.ts +13 -8
  9. package/dist/codegen/modules.d.ts.map +1 -1
  10. package/dist/codegen/scan-imports.d.ts +6 -8
  11. package/dist/codegen/scan-imports.d.ts.map +1 -1
  12. package/dist/codegen/validate-content.d.ts +39 -0
  13. package/dist/codegen/validate-content.d.ts.map +1 -0
  14. package/dist/{encode-BfJY0Xy5.js → content-path-Bc0rnTVl.js} +10 -6
  15. package/dist/dispatch-C1NpqUhY.js +1187 -0
  16. package/dist/editor/index.d.ts +5 -0
  17. package/dist/editor/index.d.ts.map +1 -0
  18. package/dist/editor/index.js +15160 -14478
  19. package/dist/engine/content-path.d.ts +5 -0
  20. package/dist/engine/content-path.d.ts.map +1 -0
  21. package/dist/engine/index.d.ts +1 -0
  22. package/dist/engine/index.d.ts.map +1 -1
  23. package/dist/engine/index.js +13 -12
  24. package/dist/index.js +1 -1
  25. package/dist/local/dispatch.d.ts.map +1 -1
  26. package/dist/mcp.d.ts.map +1 -1
  27. package/dist/mcp.js +39 -38
  28. package/dist/next/codegen.d.ts +10 -10
  29. package/dist/next/codegen.d.ts.map +1 -1
  30. package/dist/next/config.d.ts +3 -0
  31. package/dist/next/config.d.ts.map +1 -1
  32. package/dist/next/index.js +92 -84
  33. package/dist/plugin-4k3fA3lQ.js +504 -0
  34. package/dist/runtime/wrap.d.ts +13 -1
  35. package/dist/runtime/wrap.d.ts.map +1 -1
  36. package/dist/runtime/wrap.js +533 -432
  37. package/dist/types/fields.d.ts +6 -1
  38. package/dist/types/fields.d.ts.map +1 -1
  39. package/dist/types/schema.d.ts +6 -6
  40. package/dist/types/schema.d.ts.map +1 -1
  41. package/dist/vite/index.js +1 -1
  42. package/dist/vite/plugin.d.ts +12 -1
  43. package/dist/vite/plugin.d.ts.map +1 -1
  44. package/package.json +1 -1
  45. package/src/runtime/wrap.test.ts +160 -1
  46. package/src/runtime/wrap.ts +223 -45
  47. package/dist/codegen/modules-instant.d.ts +0 -24
  48. package/dist/codegen/modules-instant.d.ts.map +0 -1
  49. package/dist/dispatch-EtWM6-GP.js +0 -989
  50. package/dist/engine/materialize.d.ts +0 -66
  51. package/dist/engine/materialize.d.ts.map +0 -1
  52. package/dist/plugin-DgYy2aTI.js +0 -578
  53. package/dist/runtime/instant.d.ts +0 -60
  54. package/dist/runtime/instant.d.ts.map +0 -1
  55. package/dist/runtime/instant.js +0 -271
  56. package/src/runtime/instant.test.ts +0 -391
  57. package/src/runtime/instant.ts +0 -398
@@ -5,14 +5,6 @@ interface AstroIntegrationLike {
5
5
  "astro:config:setup"(opts: {
6
6
  updateConfig(config: Record<string, unknown>): void;
7
7
  injectScript(stage: "page" | "before-hydration" | "page-ssr" | "head-inline", code: string): void;
8
- addMiddleware(opts: {
9
- entrypoint: string;
10
- order: "pre" | "post";
11
- }): void;
12
- command: "dev" | "build" | "preview" | "sync";
13
- config: {
14
- adapter?: unknown;
15
- };
16
8
  }): void;
17
9
  };
18
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/astro/index.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAKpD,UAAU,oBAAoB;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE;QACN,oBAAoB,CAAC,IAAI,EAAE;YAC1B,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;YACnD,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,kBAAkB,GAAG,UAAU,GAAG,aAAa,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;YACjG,aAAa,CAAC,IAAI,EAAE;gBAAE,UAAU,EAAE,MAAM,CAAC;gBAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAAA;aAAE,GAAG,IAAI,CAAA;YACxE,OAAO,EAAE,KAAK,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAA;YAC7C,MAAM,EAAE;gBAAE,OAAO,CAAC,EAAE,OAAO,CAAA;aAAE,CAAA;SAC7B,GAAG,IAAI,CAAA;KACR,CAAA;CACD;AAcD,wBAAgB,IAAI,CAAC,MAAM,GAAE,UAAe,GAAG,oBAAoB,CA+BlE;AAED,eAAe,IAAI,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/astro/index.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAGpD,UAAU,oBAAoB;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE;QACN,oBAAoB,CAAC,IAAI,EAAE;YAC1B,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;YACnD,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,kBAAkB,GAAG,UAAU,GAAG,aAAa,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;SACjG,GAAG,IAAI,CAAA;KACR,CAAA;CACD;AAED,wBAAgB,IAAI,CAAC,MAAM,GAAE,UAAe,GAAG,oBAAoB,CAalE;AAED,eAAe,IAAI,CAAA"}
@@ -1,27 +1,15 @@
1
- import { o as i } from "../plugin-DgYy2aTI.js";
2
- import { join as d } from "node:path";
3
- import { readFileSync as p } from "node:fs";
4
- function c(o) {
5
- try {
6
- return JSON.parse(p(d(process.cwd(), o, "project.json"), "utf-8"))?.instant === !0;
7
- } catch {
8
- return !1;
9
- }
10
- }
11
- function k(o = {}) {
1
+ import { o as e } from "../plugin-4k3fA3lQ.js";
2
+ function r(o = {}) {
12
3
  return {
13
4
  name: "okno",
14
5
  hooks: {
15
- "astro:config:setup"({ updateConfig: e, injectScript: r, addMiddleware: a, command: s, config: n }) {
16
- const t = s === "build" && c(o.dir ?? "okno");
17
- t && !n.adapter && console.warn(
18
- "[okno] instant is on in okno/project.json, but this Astro project has no adapter — falling back to the baked build. Add one (e.g. `npx astro add cloudflare`) and set `export const prerender = false` on okno-driven pages. See docs/instant.md."
19
- ), process.env.OKNO_INSTANT = t && n.adapter ? "1" : "0", e({ vite: { plugins: [i(o)] } }), r("page", 'import "okno/boot"'), t && n.adapter && a({ entrypoint: "okno:instant-middleware", order: "pre" });
6
+ "astro:config:setup"({ updateConfig: t, injectScript: n }) {
7
+ t({ vite: { plugins: [e(o, { imageMode: "astro" })] } }), n("page", 'import "okno/boot"');
20
8
  }
21
9
  }
22
10
  };
23
11
  }
24
12
  export {
25
- k as default,
26
- k as okno
13
+ r as default,
14
+ r as okno
27
15
  };
@@ -0,0 +1,5 @@
1
+ /** The only publication metadata a deployed site needs. It is generated from
2
+ * the checked-out content alongside the framework's ordinary build output. */
3
+ export declare function readPublicationRevision(oknoDir: string): number;
4
+ export declare function writeDeploymentMarker(oknoDir: string, staticRoot: string): void;
5
+ //# sourceMappingURL=build-revision.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-revision.d.ts","sourceRoot":"","sources":["../src/build-revision.ts"],"names":[],"mappings":"AAGA;8EAC8E;AAC9E,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAS/D;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAK/E"}
@@ -3,7 +3,7 @@
3
3
  * - modules.d.ts (type declarations for okno:* virtual modules)
4
4
  *
5
5
  * `root` is the project root (parent of the okno dir) — we scan it for
6
- * `import { x } from "okno:<kind>"` so names referenced before scaffolding
6
+ * `import { x } from "okno/<kind>"` so names referenced before scaffolding
7
7
  * still get a (placeholder) type, mirroring the runtime virtual modules.
8
8
  */
9
9
  export declare function generateTypes(oknoDir: string, root: string): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/codegen/generate.ts"],"names":[],"mappings":"AAUA;;;;;;;GAOG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,iBAqNhE"}
1
+ {"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/codegen/generate.ts"],"names":[],"mappings":"AAqIA;;;;;;;GAOG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,iBAoOhE"}
@@ -1,12 +1,16 @@
1
- export declare const IMAGE_MAP_SETUP = "__oknoSetImages(import.meta.glob(\"/okno/files/**/*.{png,jpg,jpeg,webp,avif,gif,svg,tiff}\", { eager: false }))";
1
+ /** How a generated content module resolves `.image.src` for its framework.
2
+ * `raw` is the universal contract used by Next, Nuxt and generic Vite apps:
3
+ * their image component accepts a URL and owns optimization. Astro needs an
4
+ * imported asset instead, so its integration explicitly selects `astro`. */
5
+ export type ImageMode = "raw" | "astro";
6
+ /** Setup emitted into pages/collections/globals. Raw is deliberately the
7
+ * default: adding Okno's ordinary Vite plugin must never assume Astro semantics. */
8
+ export declare function imageMapSetup(mode?: ImageMode): string;
2
9
  /** The `okno:runtime` module body (the built `dist/runtime/wrap.js`), or null
3
10
  * when it's missing (unbuilt tree — run `bun run build:pkg`). */
4
11
  export declare function getRuntimeSource(): string | null;
5
- /** The `okno:instant` module body (the built `dist/runtime/instant.js`) —
6
- * same resolution dance as the wrap runtime above. */
7
- export declare function getInstantRuntimeSource(): string | null;
8
12
  /** The umbrella `okno:content` module: one import, all kinds namespaced
9
- * (`import * as okno from "okno:content"` → okno.pages / .globals /
13
+ * (`import * as okno from "okno/content"` → okno.pages / .globals /
10
14
  * .collections) + the UI-strings store (okno.strings). Pure re-export — the
11
15
  * per-kind modules still work. */
12
16
  export declare function buildContentModule(): string;
@@ -15,6 +19,7 @@ export declare function listContentFiles(dir: string): Promise<string[]>;
15
19
  * and the `drafts` opt-in flag. Best-effort — a missing/unparseable schema
16
20
  * yields empty (file order, no draft filtering). */
17
21
  export declare function readCollectionConfig(oknoDir: string): {
22
+ names: string[];
18
23
  orders: Record<string, string[]>;
19
24
  /** Collections that OPTED OUT (`drafts: false`) — the workflow is on by default. */
20
25
  draftsOff: Set<string>;
@@ -40,9 +45,9 @@ export declare function buildLocalesModule(oknoDir: string): string;
40
45
  */
41
46
  export declare function buildStringsModule(oknoDir: string): Promise<string>;
42
47
  /** Build virtual module for okno:pages */
43
- export declare function buildPagesModule(oknoDir: string, used?: Set<string>): Promise<string>;
48
+ export declare function buildPagesModule(oknoDir: string, used?: Set<string>, imageMode?: ImageMode): Promise<string>;
44
49
  /** Build virtual module for okno:collections — exports each collection as a named array */
45
- export declare function buildCollectionsModule(oknoDir: string, used?: Set<string>, isBuild?: boolean): Promise<string>;
50
+ export declare function buildCollectionsModule(oknoDir: string, used?: Set<string>, isBuild?: boolean, imageMode?: ImageMode): Promise<string>;
46
51
  /** Build virtual module for okno:globals */
47
- export declare function buildGlobalsModule(oknoDir: string, used?: Set<string>): Promise<string>;
52
+ export declare function buildGlobalsModule(oknoDir: string, used?: Set<string>, imageMode?: ImageMode): Promise<string>;
48
53
  //# sourceMappingURL=modules.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../../src/codegen/modules.ts"],"names":[],"mappings":"AAgCA,eAAO,MAAM,eAAe,oHACoF,CAAA;AAoBhH;kEACkE;AAClE,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,IAAI,CAKhD;AAED;uDACuD;AACvD,wBAAgB,uBAAuB,IAAI,MA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;AAC3F,wBAAsB,sBAAsB,CAC3C,OAAO,EAAE,MAAM,EACf,IAAI,GAAE,GAAG,CAAC,MAAM,CAAa,EAC7B,OAAO,UAAQ,EACf,SAAS,GAAE,SAAiB,GAC1B,OAAO,CAAC,MAAM,CAAC,CAyJjB;AAED,4CAA4C;AAC5C,wBAAsB,kBAAkB,CACvC,OAAO,EAAE,MAAM,EACf,IAAI,GAAE,GAAG,CAAC,MAAM,CAAa,EAC7B,SAAS,GAAE,SAAiB,GAC1B,OAAO,CAAC,MAAM,CAAC,CA+EjB"}
@@ -1,12 +1,10 @@
1
1
  /**
2
- * Walk the project root looking for `import { foo, bar } from "okno:<kind>"`
3
- * (or the colon-free `okno/<kind>` token) statements and return the union of
4
- * imported names. Used by both the runtime virtual modules and the type codegen
5
- * to emit placeholder exports for content that doesn't exist yet, so a project
6
- * can refer to `home.title` (and get types for it) before any schema is
7
- * scaffolded — including for an optional/unscaffolded name (e.g. a `theme`
8
- * global). Matches BOTH the `okno:` (Vite virtual) and `okno/` (Next/tsconfig
9
- * paths) forms so the placeholder emits regardless of which token a page uses.
2
+ * Walk the project root looking for `import { foo, bar } from "okno/<kind>"`
3
+ * statements and return the union of imported names. Used by both the runtime
4
+ * virtual modules and the type codegen to emit placeholder exports for content
5
+ * that doesn't exist yet, so a project can refer to `home.title` (and get
6
+ * types for it) before any schema is scaffolded — including for an
7
+ * optional/unscaffolded name (e.g. a `theme` global).
10
8
  */
11
9
  export declare function scanImports(root: string, kind: "pages" | "collections" | "globals"): Promise<Set<string>>;
12
10
  //# sourceMappingURL=scan-imports.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"scan-imports.d.ts","sourceRoot":"","sources":["../../src/codegen/scan-imports.ts"],"names":[],"mappings":"AAiBA;;;;;;;;;GASG;AACH,wBAAsB,WAAW,CAChC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,OAAO,GAAG,aAAa,GAAG,SAAS,GACvC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CA0CtB"}
1
+ {"version":3,"file":"scan-imports.d.ts","sourceRoot":"","sources":["../../src/codegen/scan-imports.ts"],"names":[],"mappings":"AAiBA;;;;;;;GAOG;AACH,wBAAsB,WAAW,CAChC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,OAAO,GAAG,aAAa,GAAG,SAAS,GACvC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CA0CtB"}
@@ -0,0 +1,39 @@
1
+ type Def = {
2
+ type?: string;
3
+ required?: boolean;
4
+ multiple?: boolean;
5
+ collection?: string;
6
+ block?: string;
7
+ blocks?: string[];
8
+ fields?: Fields;
9
+ options?: Array<string | {
10
+ value?: string;
11
+ }>;
12
+ };
13
+ type Fields = Record<string, Def>;
14
+ type Schema = {
15
+ pages?: Record<string, {
16
+ fields?: Fields;
17
+ }>;
18
+ collections?: Record<string, {
19
+ fields?: Fields;
20
+ }>;
21
+ globals?: Record<string, {
22
+ fields?: Fields;
23
+ }>;
24
+ blocks?: Record<string, {
25
+ fields?: Fields;
26
+ }>;
27
+ locales?: {
28
+ supported?: Array<string | {
29
+ id?: string;
30
+ }>;
31
+ };
32
+ };
33
+ /** Validate the small part TypeScript cannot prove by itself: actual repository
34
+ * values against schema fields, polymorphic block tags, and reference targets.
35
+ * Content remains plain static TS; this runs during codegen/build and has no
36
+ * runtime or framework dependency. */
37
+ export declare function validateContent(oknoDir: string, schema: Schema | null): void;
38
+ export {};
39
+ //# sourceMappingURL=validate-content.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-content.d.ts","sourceRoot":"","sources":["../../src/codegen/validate-content.ts"],"names":[],"mappings":"AAIA,KAAK,GAAG,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAA;AAC3L,KAAK,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AACjC,KAAK,MAAM,GAAG;IACb,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IACjD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAC5C,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG;YAAE,EAAE,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KAAE,CAAA;CACzD,CAAA;AAwBD;;;sCAGsC;AACtC,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAgH5E"}
@@ -1,6 +1,6 @@
1
- function r(e, t) {
2
- const n = { date: t.now, author: t.author }, a = { ...e, created: t.created ?? n, updated: n };
3
- return `export default ${JSON.stringify(a, null, " ")}
1
+ function a(e, t) {
2
+ const n = { date: t.now, author: t.author }, r = { ...e, created: t.created ?? n, updated: n };
3
+ return `export default ${JSON.stringify(r, null, " ")}
4
4
  `;
5
5
  }
6
6
  function o(e, t = `import type { Schema } from "okno"
@@ -9,12 +9,16 @@ function o(e, t = `import type { Schema } from "okno"
9
9
  return `${t}export default ${JSON.stringify(e, null, " ")} satisfies Schema
10
10
  `;
11
11
  }
12
- function u(e) {
12
+ function i(e) {
13
13
  return `export default ${JSON.stringify(e, null, " ")}
14
14
  `;
15
15
  }
16
+ function u(e) {
17
+ return /^collections\/(?:[^/]+\/){1,2}new\.ts$/.test(e);
18
+ }
16
19
  export {
17
20
  o as a,
18
- u as b,
19
- r as e
21
+ i as b,
22
+ a as e,
23
+ u as i
20
24
  };