okno 1.0.0-beta.44 → 1.0.0-beta.46

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 (188) hide show
  1. package/dist/{parse-tlTHgSSs.js → acorn-oIjaFBVA.js} +198 -252
  2. package/dist/astro/index.js +6 -18
  3. package/dist/boot.js +5 -5
  4. package/dist/{cli.d.ts → cli/index.d.ts} +1 -1
  5. package/dist/cli/index.d.ts.map +1 -0
  6. package/dist/{init.d.ts → cli/init.d.ts} +20 -9
  7. package/dist/cli/init.d.ts.map +1 -0
  8. package/dist/cli/mcp.d.ts.map +1 -0
  9. package/dist/codegen/generate.d.ts +5 -1
  10. package/dist/codegen/generate.d.ts.map +1 -1
  11. package/dist/codegen/icon-assets.d.ts +13 -0
  12. package/dist/codegen/icon-assets.d.ts.map +1 -0
  13. package/dist/{bake.d.ts → codegen/identity.d.ts} +1 -1
  14. package/dist/codegen/identity.d.ts.map +1 -0
  15. package/dist/codegen/modules.d.ts +14 -7
  16. package/dist/codegen/modules.d.ts.map +1 -1
  17. package/dist/codegen/revision.d.ts +7 -0
  18. package/dist/codegen/revision.d.ts.map +1 -0
  19. package/dist/codegen/validate-content.d.ts +8 -0
  20. package/dist/codegen/validate-content.d.ts.map +1 -0
  21. package/dist/contracts/bootstrap.d.ts +74 -0
  22. package/dist/contracts/bootstrap.d.ts.map +1 -0
  23. package/dist/{types → contracts}/fields.d.ts +47 -21
  24. package/dist/contracts/fields.d.ts.map +1 -0
  25. package/dist/contracts/index.d.ts +5 -0
  26. package/dist/contracts/index.d.ts.map +1 -0
  27. package/dist/contracts/permissions.d.ts.map +1 -0
  28. package/dist/{types → contracts}/schema.d.ts +16 -18
  29. package/dist/contracts/schema.d.ts.map +1 -0
  30. package/dist/core/content-path.d.ts +13 -0
  31. package/dist/core/content-path.d.ts.map +1 -0
  32. package/dist/core/content.d.ts +53 -0
  33. package/dist/core/content.d.ts.map +1 -0
  34. package/dist/{engine → core}/encode.d.ts +2 -4
  35. package/dist/core/encode.d.ts.map +1 -0
  36. package/dist/core/fields.d.ts.map +1 -0
  37. package/dist/core/index.d.ts +22 -0
  38. package/dist/core/index.d.ts.map +1 -0
  39. package/dist/core/order.d.ts.map +1 -0
  40. package/dist/{engine → core}/parse.d.ts +4 -5
  41. package/dist/core/parse.d.ts.map +1 -0
  42. package/dist/core/schema-mutation.d.ts +67 -0
  43. package/dist/core/schema-mutation.d.ts.map +1 -0
  44. package/dist/core/schema.d.ts.map +1 -0
  45. package/dist/core/svg-icon.d.ts +21 -0
  46. package/dist/core/svg-icon.d.ts.map +1 -0
  47. package/dist/core/usage.d.ts +46 -0
  48. package/dist/core/usage.d.ts.map +1 -0
  49. package/dist/dispatch-BZ77CVor.js +1547 -0
  50. package/dist/editor/index.d.ts +5 -0
  51. package/dist/editor/index.d.ts.map +1 -0
  52. package/dist/editor/index.js +52500 -41634
  53. package/dist/engine/index.js +3392 -165
  54. package/dist/index.d.ts +3 -2
  55. package/dist/index.d.ts.map +1 -1
  56. package/dist/index.js +1 -1
  57. package/dist/init.js +408 -186
  58. package/dist/{astro → integrations/astro}/index.d.ts +1 -9
  59. package/dist/integrations/astro/index.d.ts.map +1 -0
  60. package/dist/integrations/next/assets.d.ts +13 -0
  61. package/dist/integrations/next/assets.d.ts.map +1 -0
  62. package/dist/{next → integrations/next}/codegen.d.ts +3 -1
  63. package/dist/integrations/next/codegen.d.ts.map +1 -0
  64. package/dist/{next → integrations/next}/config.d.ts +5 -2
  65. package/dist/integrations/next/config.d.ts.map +1 -0
  66. package/dist/integrations/next/handler.d.ts.map +1 -0
  67. package/dist/integrations/next/index.d.ts.map +1 -0
  68. package/dist/{vite → integrations/vite}/dev-server.d.ts +1 -1
  69. package/dist/integrations/vite/dev-server.d.ts.map +1 -0
  70. package/dist/integrations/vite/editor-aliases.d.ts.map +1 -0
  71. package/dist/integrations/vite/index.d.ts.map +1 -0
  72. package/dist/{vite → integrations/vite}/local-engine.d.ts +4 -4
  73. package/dist/integrations/vite/local-engine.d.ts.map +1 -0
  74. package/dist/integrations/vite/plugin.d.ts +15 -0
  75. package/dist/integrations/vite/plugin.d.ts.map +1 -0
  76. package/dist/local/disk.d.ts +17 -9
  77. package/dist/local/disk.d.ts.map +1 -1
  78. package/dist/local/dispatch.d.ts.map +1 -1
  79. package/dist/local/schema-mutation.d.ts +29 -0
  80. package/dist/local/schema-mutation.d.ts.map +1 -0
  81. package/dist/local/self-written.d.ts +5 -5
  82. package/dist/local/self-written.d.ts.map +1 -1
  83. package/dist/local/setup.d.ts +33 -0
  84. package/dist/local/setup.d.ts.map +1 -0
  85. package/dist/mcp.js +87 -70
  86. package/dist/next/index.js +183 -114
  87. package/dist/okno.css +1 -1
  88. package/dist/plugin-CgDy0_lV.js +525 -0
  89. package/dist/runtime/boot.d.ts.map +1 -0
  90. package/dist/runtime/date-format.d.ts +11 -0
  91. package/dist/runtime/date-format.d.ts.map +1 -0
  92. package/dist/runtime/hooks.d.ts +4 -0
  93. package/dist/runtime/hooks.d.ts.map +1 -0
  94. package/dist/runtime/preview-contract.d.ts +54 -0
  95. package/dist/runtime/preview-contract.d.ts.map +1 -0
  96. package/dist/runtime/preview-renderers.d.ts +15 -0
  97. package/dist/runtime/preview-renderers.d.ts.map +1 -0
  98. package/dist/runtime/preview-sync.d.ts +9 -0
  99. package/dist/runtime/preview-sync.d.ts.map +1 -0
  100. package/dist/runtime/preview.d.ts +72 -0
  101. package/dist/runtime/preview.d.ts.map +1 -0
  102. package/dist/runtime/slot-format.d.ts +21 -0
  103. package/dist/runtime/slot-format.d.ts.map +1 -0
  104. package/dist/runtime/transitions.d.ts +6 -0
  105. package/dist/runtime/transitions.d.ts.map +1 -0
  106. package/dist/runtime/values.d.ts +164 -0
  107. package/dist/runtime/values.d.ts.map +1 -0
  108. package/dist/runtime/wrap.d.ts +7 -179
  109. package/dist/runtime/wrap.d.ts.map +1 -1
  110. package/dist/runtime/wrap.js +4232 -478
  111. package/dist/schema-mutation-BWtb40Qj.js +675 -0
  112. package/dist/schema-mutation-DVgVbjdl.js +103 -0
  113. package/dist/vite/index.js +1 -1
  114. package/package.json +15 -25
  115. package/skills/connect-okno/SKILL.md +122 -395
  116. package/skills/connect-okno/references/content.md +297 -0
  117. package/src/runtime/boot.test.ts +25 -0
  118. package/src/runtime/boot.ts +312 -0
  119. package/src/runtime/date-format.test.ts +40 -0
  120. package/src/runtime/date-format.ts +46 -0
  121. package/src/runtime/hooks-distribution.test.ts +38 -0
  122. package/src/runtime/hooks.test.ts +183 -0
  123. package/src/runtime/hooks.ts +78 -0
  124. package/src/runtime/preview-contract.ts +53 -0
  125. package/src/runtime/preview-renderers.test.ts +98 -0
  126. package/src/runtime/preview-renderers.ts +67 -0
  127. package/src/runtime/preview-sync.fixture.ts +5 -0
  128. package/src/runtime/preview-sync.test.ts +367 -0
  129. package/src/runtime/preview-sync.ts +380 -0
  130. package/src/runtime/preview.ts +401 -0
  131. package/src/runtime/slot-format.ts +73 -0
  132. package/src/runtime/transitions.test.ts +95 -0
  133. package/src/runtime/transitions.ts +154 -0
  134. package/src/runtime/values.test.ts +513 -0
  135. package/src/runtime/values.ts +1226 -0
  136. package/src/runtime/wrap.test.ts +186 -1
  137. package/src/runtime/wrap.ts +22 -1559
  138. package/dist/astro/index.d.ts.map +0 -1
  139. package/dist/bake.d.ts.map +0 -1
  140. package/dist/boot.d.ts.map +0 -1
  141. package/dist/cli.d.ts.map +0 -1
  142. package/dist/codegen/modules-instant.d.ts +0 -24
  143. package/dist/codegen/modules-instant.d.ts.map +0 -1
  144. package/dist/dispatch-CumCB1dI.js +0 -986
  145. package/dist/encode-BfJY0Xy5.js +0 -20
  146. package/dist/engine/encode.d.ts.map +0 -1
  147. package/dist/engine/fields.d.ts.map +0 -1
  148. package/dist/engine/index.d.ts +0 -17
  149. package/dist/engine/index.d.ts.map +0 -1
  150. package/dist/engine/materialize.d.ts +0 -66
  151. package/dist/engine/materialize.d.ts.map +0 -1
  152. package/dist/engine/order.d.ts.map +0 -1
  153. package/dist/engine/parse.d.ts.map +0 -1
  154. package/dist/engine/schema.d.ts.map +0 -1
  155. package/dist/init.d.ts.map +0 -1
  156. package/dist/mcp.d.ts.map +0 -1
  157. package/dist/next/codegen.d.ts.map +0 -1
  158. package/dist/next/config.d.ts.map +0 -1
  159. package/dist/next/handler.d.ts.map +0 -1
  160. package/dist/next/index.d.ts.map +0 -1
  161. package/dist/order-bAkdncZC.js +0 -21
  162. package/dist/plugin-DCxkXmmG.js +0 -587
  163. package/dist/runtime/instant.d.ts +0 -60
  164. package/dist/runtime/instant.d.ts.map +0 -1
  165. package/dist/runtime/instant.js +0 -271
  166. package/dist/types/fields.d.ts.map +0 -1
  167. package/dist/types/index.d.ts +0 -4
  168. package/dist/types/index.d.ts.map +0 -1
  169. package/dist/types/permissions.d.ts.map +0 -1
  170. package/dist/types/schema.d.ts.map +0 -1
  171. package/dist/vite/dev-server.d.ts.map +0 -1
  172. package/dist/vite/editor-aliases.d.ts.map +0 -1
  173. package/dist/vite/index.d.ts.map +0 -1
  174. package/dist/vite/local-engine.d.ts.map +0 -1
  175. package/dist/vite/plugin.d.ts +0 -4
  176. package/dist/vite/plugin.d.ts.map +0 -1
  177. package/src/runtime/instant.test.ts +0 -391
  178. package/src/runtime/instant.ts +0 -398
  179. /package/dist/{mcp.d.ts → cli/mcp.d.ts} +0 -0
  180. /package/dist/{types → contracts}/permissions.d.ts +0 -0
  181. /package/dist/{engine → core}/fields.d.ts +0 -0
  182. /package/dist/{engine → core}/order.d.ts +0 -0
  183. /package/dist/{engine → core}/schema.d.ts +0 -0
  184. /package/dist/{next → integrations/next}/handler.d.ts +0 -0
  185. /package/dist/{next → integrations/next}/index.d.ts +0 -0
  186. /package/dist/{vite → integrations/vite}/editor-aliases.d.ts +0 -0
  187. /package/dist/{vite → integrations/vite}/index.d.ts +0 -0
  188. /package/dist/{boot.d.ts → runtime/boot.d.ts} +0 -0
@@ -1,27 +1,15 @@
1
- import { o as i } from "../plugin-DCxkXmmG.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-CgDy0_lV.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
  };
package/dist/boot.js CHANGED
@@ -52,7 +52,7 @@ function p(t) {
52
52
  const n = e.document?.getElementById(c);
53
53
  n instanceof HTMLElement && v(n);
54
54
  }
55
- function w(t) {
55
+ function y(t) {
56
56
  const n = t.viewTransition;
57
57
  if (!u() || !n || !e.document) return;
58
58
  const o = e.document.documentElement;
@@ -66,7 +66,7 @@ function w(t) {
66
66
  function f() {
67
67
  return !!e.__okno_loaded;
68
68
  }
69
- function y() {
69
+ function w() {
70
70
  let t = e.document?.activeElement;
71
71
  for (; t && t.shadowRoot?.activeElement; )
72
72
  t = t.shadowRoot.activeElement;
@@ -106,12 +106,12 @@ function k() {
106
106
  return o;
107
107
  }
108
108
  function g() {
109
- if (!e.document || (typeof __OKNO_IS_DEV__ < "u" ? __OKNO_IS_DEV__ : !1) || e.__okno_gate_installed) return;
109
+ if (!e.document || (typeof __OKNO_IS_DEV__ < "u" ? __OKNO_IS_DEV__ : !1) && e.document.querySelector('script[src="/__okno_bootstrap.js"]') || e.__okno_gate_installed) return;
110
110
  e.__okno_gate_installed = !0, e.document.addEventListener("keydown", (i) => {
111
- f() || i.key !== "e" || i.ctrlKey || i.metaKey || i.altKey || y() || s("key");
111
+ f() || i.key !== "e" || i.ctrlKey || i.metaKey || i.altKey || w() || s("key");
112
112
  }), e.__okno_ensure_vt = d;
113
113
  const n = window;
114
- n.addEventListener("pageswap", p), n.addEventListener("pagereveal", w), u() && (d(), s("session"));
114
+ n.addEventListener("pageswap", p), n.addEventListener("pagereveal", y), u() && (d(), s("session"));
115
115
  const o = k();
116
116
  if (o) {
117
117
  e.__okno_invite = o, s("url");
@@ -5,4 +5,4 @@
5
5
  * server. Each path lazy-imports its deps so neither pays for the other's.
6
6
  */
7
7
  declare function main(): Promise<void>;
8
- //# sourceMappingURL=cli.d.ts.map
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AACA;;;;GAIG;AAIH,iBAAe,IAAI,kBAuBlB"}
@@ -43,10 +43,11 @@ export declare function addAstroIntegration(configPath: string): boolean;
43
43
  * {@link addAstroIntegration}).
44
44
  * - sveltekit: create `src/hooks.client.ts` — runs once on the client for every
45
45
  * route, so its `import "okno/boot"` side effect installs the gate everywhere.
46
- * - nuxt: create `plugins/okno.client.ts` — Nuxt auto-loads client plugins.
46
+ * - nuxt: create `<srcDir>/plugins/okno.client.ts` after verifying the static
47
+ * configuration/layout — Nuxt auto-loads plugins from its source directory.
47
48
  * Idempotent (never overwrites an existing file). Returns a note line or null.
48
49
  */
49
- export declare function wireBoot(cwd: string, framework: Framework): string | null;
50
+ export declare function wireBoot(cwd: string, framework: Framework, nuxtSrcDir?: string): string | null;
50
51
  export type ScaffoldMode = "starter" | "empty";
51
52
  /**
52
53
  * Scaffold okno/ if there's no okno/ yet. Two modes:
@@ -60,15 +61,25 @@ export type ScaffoldMode = "starter" | "empty";
60
61
  * model. Returns false if okno/ already exists (left untouched).
61
62
  */
62
63
  export declare function scaffold(cwd: string, mode?: ScaffoldMode): boolean;
63
- /**
64
- * Install the `connect-okno` skill into the project's `.claude/skills/` so the
65
- * agent has the okno mental model (when to use collections vs blocks vs globals,
66
- * the spread-to-edit pattern) on hand. Claude clients only. Returns the relative
67
- * path written, or null if the bundled skill couldn't be found / already exists.
68
- */
69
- export declare function writeSkill(cwd: string): string | null;
64
+ export interface AgentSetupResult {
65
+ updated: string[];
66
+ unchanged: string[];
67
+ blockers: string[];
68
+ }
69
+ /** One packaged skill, discovered by both clients; preserve custom agent files. */
70
+ export declare function writeSkill(cwd: string): AgentSetupResult;
70
71
  /** Register the okno MCP server for an AI client. */
71
72
  export declare function writeMcpConfig(cwd: string, client: "claude" | "cursor"): string;
73
+ /** Prefer the declared package manager, then its lockfile (default npm). */
74
+ export declare function detectPackageManager(cwd: string): "bun" | "pnpm" | "yarn" | "npm";
75
+ /** Only suggest a command when the project actually defines a start script. */
76
+ export declare function startCommand(cwd: string): string | null;
77
+ /** Keep successful setup quiet, but never hide a required manual step. */
78
+ export declare function summarizeSetup(notes: string[]): {
79
+ ready: boolean;
80
+ title: string;
81
+ details: string[];
82
+ };
72
83
  export declare function runInit(): Promise<void>;
73
84
  export {};
74
85
  //# sourceMappingURL=init.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/cli/init.ts"],"names":[],"mappings":"AAuBA,KAAK,SAAS,GAAG,OAAO,GAAG,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;AAEpE,UAAU,QAAQ;IACjB,SAAS,EAAE,SAAS,CAAA;IACpB,yEAAy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C5E,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,CAWjF;AAaD,+EAA+E;AAC/E,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAYvD;AAED,0EAA0E;AAC1E,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG;IAChD,KAAK,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAChD,CAIA;AAyBD,wBAAsB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAsK7C"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../src/cli/mcp.ts"],"names":[],"mappings":"AA4CA;kCACkC;AAClC,wBAAsB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAsL5C"}
@@ -1,3 +1,5 @@
1
+ import { type ContentValidationPolicy } from "./validate-content.ts";
2
+ import { type Framework } from "../core/index.ts";
1
3
  /**
2
4
  * Read the schema, scan content directories, and generate:
3
5
  * - modules.d.ts (type declarations for okno:* virtual modules)
@@ -6,5 +8,7 @@
6
8
  * `import { x } from "okno/<kind>"` so names referenced before scaffolding
7
9
  * still get a (placeholder) type, mirroring the runtime virtual modules.
8
10
  */
9
- export declare function generateTypes(oknoDir: string, root: string): Promise<void>;
11
+ /** `framework` selects the render snippets in field docs; omitted, docs keep
12
+ * the schema summary and value hints without framework-specific markup. */
13
+ export declare function generateTypes(oknoDir: string, root: string, policy?: ContentValidationPolicy, framework?: Framework): Promise<void>;
10
14
  //# sourceMappingURL=generate.d.ts.map
@@ -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,iBA8MhE"}
1
+ {"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/codegen/generate.ts"],"names":[],"mappings":"AAKA,OAAO,EAAmB,KAAK,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AACrF,OAAO,EAA6E,KAAK,SAAS,EAAmB,MAAM,kBAAkB,CAAA;AA6N7I;;;;;;;GAOG;AACH;2EAC2E;AAC3E,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAE,uBAAkC,EAAE,SAAS,CAAC,EAAE,SAAS,iBA8QnI"}
@@ -0,0 +1,13 @@
1
+ /** Read canonical file labels without rewriting content. Legacy labels remain
2
+ * migration candidates only; no per-usage value can override file metadata. */
3
+ export declare function readFileAlts(oknoDir: string, warn?: (message: string) => void): Record<string, string>;
4
+ /** Build-time IO owner: validate only Icon references. The existing Files asset
5
+ * pipeline emits originals; builds never prepare, replace or duplicate sources. */
6
+ export declare function readIconAssets(oknoDir: string): Array<{
7
+ path: string;
8
+ address: string;
9
+ }>;
10
+ /** Icon fragment URLs are separate from optimized media imports and stay on the
11
+ * site's own origin so native external use references work in every browser. */
12
+ export declare function iconAssetMap(oknoDir: string, basePath?: string): Record<string, string>;
13
+ //# sourceMappingURL=icon-assets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-assets.d.ts","sourceRoot":"","sources":["../../src/codegen/icon-assets.ts"],"names":[],"mappings":"AAwDA;+EAC+E;AAC/E,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA4BpH;AAED;mFACmF;AACnF,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAqBxF;AAED;gFACgF;AAChF,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,SAAK,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAMnF"}
@@ -25,4 +25,4 @@ export declare function bakeRepoIdentity(oknoDir?: string): string | null;
25
25
  * hosted backend knows which subtree holds this project's `okno/`. "" at the repo
26
26
  * root (single-project repo), "apps/site" in a monorepo. POSIX-normalized. */
27
27
  export declare function bakeRootPath(): string;
28
- //# sourceMappingURL=bake.d.ts.map
28
+ //# sourceMappingURL=identity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../src/codegen/identity.ts"],"names":[],"mappings":"AAoBA;;;;sEAIsE;AACtE,wBAAgB,UAAU,IAAI,MAAM,CAWnC;AAiBD;;;;;;;;;;;;;;;uBAeuB;AACvB,wBAAgB,gBAAgB,CAAC,OAAO,SAAS,GAAG,MAAM,GAAG,IAAI,CAOhE;AAED;;+EAE+E;AAC/E,wBAAgB,YAAY,IAAI,MAAM,CAIrC"}
@@ -1,10 +1,14 @@
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
13
  * (`import * as okno from "okno/content"` → okno.pages / .globals /
10
14
  * .collections) + the UI-strings store (okno.strings). Pure re-export — the
@@ -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>;
@@ -23,6 +28,8 @@ export declare function readCollectionConfig(oknoDir: string): {
23
28
  };
24
29
  export declare function toExportName(filename: string): string;
25
30
  export declare function toContentName(filename: string): string;
31
+ /** Namespace methods must never silently replace an existing content export. */
32
+ export declare function assertContentNamespaceNames(kind: string, names: string[]): void;
26
33
  /** Build the framework-agnostic `okno:locales` module: ONE export, `locales` —
27
34
  * an array of the configured languages (`{ id, name, slug, link(url) }`) with a
28
35
  * `.default` property pointing at the base-locale entry. `link(url)` emits the
@@ -40,9 +47,9 @@ export declare function buildLocalesModule(oknoDir: string): string;
40
47
  */
41
48
  export declare function buildStringsModule(oknoDir: string): Promise<string>;
42
49
  /** Build virtual module for okno:pages */
43
- export declare function buildPagesModule(oknoDir: string, used?: Set<string>): Promise<string>;
50
+ export declare function buildPagesModule(oknoDir: string, used?: Set<string>, imageMode?: ImageMode, assetSetup?: string): Promise<string>;
44
51
  /** 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>;
52
+ export declare function buildCollectionsModule(oknoDir: string, used?: Set<string>, isBuild?: boolean, imageMode?: ImageMode, assetSetup?: string): Promise<string>;
46
53
  /** Build virtual module for okno:globals */
47
- export declare function buildGlobalsModule(oknoDir: string, used?: Set<string>): Promise<string>;
54
+ export declare function buildGlobalsModule(oknoDir: string, used?: Set<string>, imageMode?: ImageMode, assetSetup?: string): Promise<string>;
48
55
  //# 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,MAAM,GAAG,IAAI,CAMvD;AAED;;;mCAGmC;AACnC,wBAAgB,kBAAkB,IAAI,MAAM,CAO3C;AA+CD,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAIrE;AAED;;qDAEqD;AACrD,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG;IACtD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;IAChC,oFAAoF;IACpF,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACtB,wEAAwE;IACxE,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAC1B,CAqBA;AAwBD,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAErD;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEtD;AAMD;;;;;+EAK+E;AAC/E,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAoD1D;AAED;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAsDzE;AAED,0CAA0C;AAC1C,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,GAAG,CA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M,CAEtD;AAED,gFAAgF;AAChF,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAI/E;AAUD;;;;;+EAK+E;AAC/E,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAoD1D;AAED;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAwDzE;AAED,0CAA0C;AAC1C,wBAAsB,gBAAgB,CACrC,OAAO,EAAE,MAAM,EACf,IAAI,GAAE,GAAG,CAAC,MAAM,CAAa,EAC7B,SAAS,GAAE,SAAiB,EAC5B,UAAU,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,MAAM,CAAC,CAoGjB;AAED,2FAA2F;AAC3F,wBAAsB,sBAAsB,CAC3C,OAAO,EAAE,MAAM,EACf,IAAI,GAAE,GAAG,CAAC,MAAM,CAAa,EAC7B,OAAO,UAAQ,EACf,SAAS,GAAE,SAAiB,EAC5B,UAAU,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,MAAM,CAAC,CA+JjB;AAED,4CAA4C;AAC5C,wBAAsB,kBAAkB,CACvC,OAAO,EAAE,MAAM,EACf,IAAI,GAAE,GAAG,CAAC,MAAM,CAAa,EAC7B,SAAS,GAAE,SAAiB,EAC5B,UAAU,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,MAAM,CAAC,CAqFjB"}
@@ -0,0 +1,7 @@
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
+ /** Framework bridges emit this into their build output; never write to a
5
+ * consumer's public/static source directory. */
6
+ export declare function deploymentMarkerSource(oknoDir: string): string | null;
7
+ //# sourceMappingURL=revision.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"revision.d.ts","sourceRoot":"","sources":["../../src/codegen/revision.ts"],"names":[],"mappings":"AAGA;8EAC8E;AAC9E,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAS/D;AAED;gDACgD;AAChD,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGrE"}
@@ -0,0 +1,8 @@
1
+ import { type ContentSchema } from "../core/index.ts";
2
+ export type ContentValidationPolicy = "strict" | "development";
3
+ /** Validate the small part TypeScript cannot prove by itself: actual repository
4
+ * values against schema fields, polymorphic block tags, and reference targets.
5
+ * Content remains plain static TS; this runs during codegen/build and has no
6
+ * runtime or framework dependency. */
7
+ export declare function validateContent(oknoDir: string, schema: ContentSchema | null, policy?: ContentValidationPolicy): void;
8
+ //# 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":"AAEA,OAAO,EAA+C,KAAK,aAAa,EAAqB,MAAM,kBAAkB,CAAA;AAGrH,MAAM,MAAM,uBAAuB,GAAG,QAAQ,GAAG,aAAa,CAAA;AAmB9D;;;sCAGsC;AACtC,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,IAAI,EAAE,MAAM,GAAE,uBAAkC,GAAG,IAAI,CAyE/H"}
@@ -0,0 +1,74 @@
1
+ /** Authenticated editor bootstrap wire contract. Identity is separate from project readiness. */
2
+ export type BootstrapOutcome = "needs-repository" | "needs-installation" | "needs-initialization" | "access-denied" | "conflict" | "retryable-error" | "project-verified";
3
+ export interface BootstrapBilling {
4
+ override: "unlimited" | "blocked" | null;
5
+ spend: number;
6
+ days: number;
7
+ unlimited: boolean;
8
+ blocked: boolean;
9
+ todayActive: boolean;
10
+ todayEndsAt?: string | null;
11
+ cycleStart: string | null;
12
+ cycleEnd: string | null;
13
+ coverYear: number;
14
+ card?: {
15
+ brand: string;
16
+ last4: string;
17
+ } | null;
18
+ history?: {
19
+ day: string;
20
+ charged: number;
21
+ label?: string;
22
+ }[];
23
+ }
24
+ export interface BootstrapUser {
25
+ id: string;
26
+ login: string;
27
+ name: string;
28
+ avatar: string;
29
+ role?: string;
30
+ owner?: boolean;
31
+ authorized?: boolean;
32
+ billing?: BootstrapBilling | null;
33
+ spend?: number;
34
+ projectId?: string | null;
35
+ oknoDir?: string;
36
+ }
37
+ export interface BootstrapDiagnostic {
38
+ error: string;
39
+ step: string;
40
+ code: string;
41
+ retryable: boolean;
42
+ status?: number;
43
+ upstreamStatus?: number;
44
+ repo?: string;
45
+ path?: string;
46
+ branch?: string;
47
+ correlationId?: string;
48
+ completed?: string[];
49
+ }
50
+ export interface BootstrapResponse {
51
+ user: BootstrapUser;
52
+ outcome: BootstrapOutcome;
53
+ status?: {
54
+ hasInstallation: boolean;
55
+ initialized: boolean;
56
+ missing?: string[];
57
+ productionBranch?: string;
58
+ projectId?: string;
59
+ };
60
+ accessBranch?: string;
61
+ workingBranch?: string;
62
+ installUrl?: string | null;
63
+ /** Hosted permissions from the authorized access branch; absent means not supplied. */
64
+ permissions?: string | null;
65
+ /** Single-repository contents:read token; never a full installation token. */
66
+ readToken?: {
67
+ token: string;
68
+ expiresAt: string;
69
+ };
70
+ diagnostic?: BootstrapDiagnostic;
71
+ /** A billing outage keeps content preview available but cannot grant hosted editing. */
72
+ billingDiagnostic?: BootstrapDiagnostic;
73
+ }
74
+ //# sourceMappingURL=bootstrap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../../src/contracts/bootstrap.ts"],"names":[],"mappings":"AAAA,iGAAiG;AACjG,MAAM,MAAM,gBAAgB,GACzB,kBAAkB,GAClB,oBAAoB,GACpB,sBAAsB,GACtB,eAAe,GACf,UAAU,GACV,iBAAiB,GACjB,kBAAkB,CAAA;AAErB,MAAM,WAAW,gBAAgB;IAChC,QAAQ,EAAE,WAAW,GAAG,SAAS,GA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I,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;CACpB;AAED,MAAM,WAAW,iBAAiB;IACjC,IAAI,EAAE,aAAa,CAAA;IACnB,OAAO,EAAE,gBAAgB,CAAA;IACzB,MAAM,CAAC,EAAE;QACR,eAAe,EAAE,OAAO,CAAA;QACxB,WAAW,EAAE,OAAO,CAAA;QACpB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;QAClB,gBAAgB,CAAC,EAAE,MAAM,CAAA;QACzB,SAAS,CAAC,EAAE,MAAM,CAAA;KAClB,CAAA;IACD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,uFAAuF;IACvF,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,8EAA8E;IAC9E,SAAS,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAA;IAChD,UAAU,CAAC,EAAE,mBAAmB,CAAA;IAChC,wFAAwF;IACxF,iBAAiB,CAAC,EAAE,mBAAmB,CAAA;CACvC"}
@@ -8,9 +8,18 @@ interface FieldBase {
8
8
  hidden?: boolean;
9
9
  help?: string;
10
10
  }
11
- /** Plain text field */
12
- export interface StringField extends FieldBase {
11
+ /** Constraints shared by repeatable fields. Item count is independent of value limits. */
12
+ interface RepeatableField extends FieldBase {
13
+ multiple?: boolean;
14
+ /** Maximum entries when multiple is enabled; omitted means unlimited. */
15
+ maxItems?: number;
16
+ }
17
+ /** Text field */
18
+ export interface StringField extends RepeatableField {
13
19
  type: "string";
20
+ /** Render stored inline HTML with the framework's explicit HTML binding.
21
+ * Adds the data-okno-html preview marker; does not change the raw string. */
22
+ html?: boolean;
14
23
  default?: string;
15
24
  placeholder?: string;
16
25
  min?: number;
@@ -21,17 +30,17 @@ export interface StringField extends FieldBase {
21
30
  phone?: boolean;
22
31
  multiline?: boolean;
23
32
  multiple?: boolean;
24
- /** Slot definitions — slot name → kind — turning this value into "slotted
25
- * text". 0 slots → the value is a plain `string`; ≥1 slot → codegen emits it
26
- * as a `(params) => string` function and the runtime fills `{name}` tokens in
27
- * the stored value (numbers formatted lang-aware, a `count` slot driving CLDR
28
- * plural forms). Same primitive as the strings-store slots — see the shared
29
- * `SlotKind` in `./schema.ts` and `docs/strings-i18n.md` §2. Plain-text fields
30
- * only (never richtext). */
33
+ /** Slot definitions — slot name → kind. Configured Text fields are callable
34
+ * and fill `{name}` tokens, returning a wrapped string. Text parameters accept
35
+ * strings or numbers and insert their text without locale number formatting;
36
+ * Number parameters accept numbers without locale formatting; Count selects CLDR plural
37
+ * forms. Same interpolation primitive as strings-store slots — see `SlotKind`
38
+ * in `./schema.ts` and `docs/strings-i18n.md` §2. Single Text fields only
39
+ * (never richtext); declarations remain dormant while Multiple is enabled. */
31
40
  slots?: Record<string, "text" | "number" | "count">;
32
41
  }
33
42
  /** Numeric field */
34
- export interface NumberField extends FieldBase {
43
+ export interface NumberField extends RepeatableField {
35
44
  type: "number";
36
45
  default?: number;
37
46
  min?: number;
@@ -47,10 +56,12 @@ export interface BooleanField extends FieldBase {
47
56
  /** Date/datetime field */
48
57
  export interface DateField extends FieldBase {
49
58
  type: "date";
59
+ /** Include a local time in the editor and save edited instants as UTC ISO strings. */
60
+ time?: boolean;
50
61
  default?: string | "now";
51
62
  }
52
- /** One Option choice: a human `name` (shown in the editor picker + rendered as
53
- * the label) mapped to a stored `value` (what's saved, and what `.value`
63
+ /** One Option choice: a human `name` (shown in the editor picker and available as
64
+ * `.name`) mapped to a stored `value` (what's saved, and what `.value`
54
65
  * exposes to consumers). A bare string is shorthand for `{ name: s, value: s }`
55
66
  * — back-compat with the old plain-string options. */
56
67
  export interface EnumOption {
@@ -60,9 +71,9 @@ export interface EnumOption {
60
71
  /** Dropdown / multi-select. `options` are name→value pairs; the editor stores
61
72
  * the `value`(s), and the runtime hydrates each stored value back to
62
73
  * `{ name, value }` (from the schema) so consumers get both the human label
63
- * and the stored value — `{home.size}` renders the name, `home.size.value`
64
- * gives the value. Mirrors how reference fields resolve a slug to its item. */
65
- export interface EnumField extends FieldBase {
74
+ * and the stored value — `{home.size}` renders the stored value, `home.size.name`
75
+ * gives the label and `home.size.value` returns a raw string. Mirrors how reference fields resolve a slug to its item. */
76
+ export interface EnumField extends RepeatableField {
66
77
  type: "enum";
67
78
  options: (EnumOption | string)[];
68
79
  multiple?: boolean;
@@ -84,13 +95,23 @@ export type MediaKind = "image" | "video" | "audio" | "document";
84
95
  * split: a hero image is `{ accept: ["image"] }`, a photo+clip gallery is
85
96
  * `{ accept: ["image", "video"], multiple: true }`, downloadable docs are
86
97
  * `{ accept: ["document"], multiple: true }`. */
87
- export interface MediaField extends FieldBase {
98
+ export interface MediaField extends RepeatableField {
88
99
  type: "media";
89
100
  accept?: MediaKind[];
90
101
  multiple?: boolean;
91
102
  /** Files folder this field's uploads are saved to (folder id, "" = root). */
92
103
  uploadFolder?: string;
93
104
  }
105
+ /** SVG icon selected from the Files library. */
106
+ export interface IconField extends RepeatableField {
107
+ type: "icon";
108
+ /** Ordinary Files folder id: restricts selection and receives uploads. */
109
+ folder?: string;
110
+ }
111
+ export interface IconValue {
112
+ src: string;
113
+ viewBox: string;
114
+ }
94
115
  /** Color field — stores a raw CSS color string (any valid CSS color). Edited
95
116
  * via a dependency-free HSV picker. Foundation for the Theme global. */
96
117
  export interface ColorField extends FieldBase {
@@ -99,7 +120,7 @@ export interface ColorField extends FieldBase {
99
120
  }
100
121
  /** Link field — stores `{ text, url, external }`. Spreads onto an `<a>`
101
122
  * (url→href, +target/rel when external) and renders its text as the child. */
102
- export interface LinkField extends FieldBase {
123
+ export interface LinkField extends RepeatableField {
103
124
  type: "link";
104
125
  multiple?: boolean;
105
126
  }
@@ -110,7 +131,7 @@ export interface SlugField extends FieldBase {
110
131
  from?: string;
111
132
  }
112
133
  /** Reference to another collection */
113
- export interface ReferenceField extends FieldBase {
134
+ export interface ReferenceField extends RepeatableField {
114
135
  type: "reference";
115
136
  collection: string;
116
137
  multiple?: boolean;
@@ -123,9 +144,14 @@ export interface GroupField {
123
144
  /** One or more embedded instances of a reusable Block (a named field shape from
124
145
  * `schema.blocks`). Each placement owns its OWN values — an embed, not a
125
146
  * reference. `multiple` makes it a repeatable array of instances. */
126
- export interface BlockField extends FieldBase {
147
+ export interface BlockField extends RepeatableField {
127
148
  type: "block";
128
- block: string;
149
+ /** One permitted block shape (the original, compact form). */
150
+ block?: string;
151
+ /** Multiple permitted block shapes. Each stored instance carries
152
+ * `__block: "<key>"`, giving consumers a framework-agnostic discriminated
153
+ * union while the editor can offer an Add-section type picker. */
154
+ blocks?: string[];
129
155
  multiple?: boolean;
130
156
  }
131
157
  /** Editor-only section divider. Organizes the field list into labeled,
@@ -140,6 +166,6 @@ export interface DividerField {
140
166
  collapsed?: boolean;
141
167
  }
142
168
  /** Union of all field types */
143
- export type AnyField = StringField | NumberField | BooleanField | DateField | EnumField | RichtextField | MediaField | ColorField | LinkField | SlugField | ReferenceField | GroupField | BlockField | DividerField;
169
+ export type AnyField = StringField | NumberField | BooleanField | DateField | EnumField | RichtextField | MediaField | IconField | ColorField | LinkField | SlugField | ReferenceField | GroupField | BlockField | DividerField;
144
170
  export {};
145
171
  //# sourceMappingURL=fields.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.d.ts","sourceRoot":"","sources":["../../src/contracts/fields.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,UAAU,SAAS;IAClB;+CAC2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,MAAM,CA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AA"}
@@ -0,0 +1,5 @@
1
+ export type { StringField, NumberField, BooleanField, DateField, EnumField, EnumOption, RichtextField, MediaField, IconField, IconValue, MediaKind, SlugField, ReferenceField, GroupField, BlockField, DividerField, AnyField, } from "./fields.ts";
2
+ export type { Fields, PageDef, CollectionDef, GlobalDef, BlockDef, OknoSchema, Schema, OknoConfig, LayoutNode, SchemaLayout, OknoLocale, SchemaLocales, } from "./schema.ts";
3
+ export type { ResourcePermissions, RolePermissions, PermissionsConfig } from "./permissions.ts";
4
+ export type { BootstrapOutcome, BootstrapBilling, BootstrapUser, BootstrapDiagnostic, BootstrapResponse, } from "./bootstrap.ts";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACX,WAAW,EACX,WAAW,EACX,YAAY,EACZ,SAAS,EACT,SAAS,EACT,UAAU,EACV,aAAa,EACb,UAAU,EACV,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,cAAc,EACd,UAAU,EACV,UAAU,EACV,YAAY,EACZ,QAAQ,GACR,MAAM,aAAa,CAAA;AAEpB,YAAY,EACX,MAAM,EACN,OAAO,EACP,aAAa,EACb,SAAS,EACT,QAAQ,EACR,UAAU,EACV,MAAM,EACN,UAAU,EACV,UAAU,EACV,YAAY,EACZ,UAAU,EACV,aAAa,GACb,MAAM,aAAa,CAAA;AAEpB,YAAY,EAAE,mBAAmB,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAE/F,YAAY,EACX,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACnB,iBAAiB,GACjB,MAAM,gBAAgB,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../src/contracts/permissions.ts"],"names":[],"mappings":"AAAA;6BAC6B;AAC7B,MAAM,WAAW,mBAAmB;IACnC,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,OAAO,CAAA;IACd,MAAM,EAAE,OAAO,CAAA;IACf,OAAO,EAAE,OAAO,CAAA;CAChB;AAED,kDAAkD;AAClD,MAAM,WAAW,eAAe;IAC/B,KAAK,EAAE,mBAAmB,CAAA;IAC1B,WAAW,EAAE,mBAAmB,CAAA;IAChC,OAAO,EAAE,mBAAmB,CAAA;IAC5B,KAAK,EAAE,mBAAmB,CAAA;IAC1B,WAAW,EAAE,mBAAmB,CAAA;CAChC;AAED;yEACyE;AACzE,MAAM,WAAW,iBAAiB;IACjC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;CACtC"}
@@ -20,11 +20,11 @@ export interface CollectionDef {
20
20
  * (drag-to-reorder, create, delete); drives `okno:collections` iteration. */
21
21
  order?: string[];
22
22
  /** Draft workflow. ON by default — set `false` to opt OUT. Items carry a
23
- * `status` ("draft" | "live") the editor toggles, and items with
24
- * `status: "draft"` are EXCLUDED from `okno:collections` at build (so
25
- * references to them resolve to nothing too). A missing status counts as live,
23
+ * reserved boolean `draft` the editor toggles, and items with
24
+ * `draft: true` are EXCLUDED from `okno/collections` at build (so
25
+ * references to them resolve to nothing too). A missing flag counts as live,
26
26
  * so nothing disappears from an existing collection. `false` → the collection
27
- * has no status concept at all. Orthogonal to git publish: a draft item still
27
+ * has no draft workflow. `status` remains an ordinary custom field. Orthogonal to git publish: a draft item still
28
28
  * lives in the repo, it just isn't served. */
29
29
  drafts?: boolean;
30
30
  /** Scheduled publishing. ON by default — set `false` to opt OUT. Items may carry
@@ -53,7 +53,8 @@ export interface GlobalDef {
53
53
  fields: Fields;
54
54
  }
55
55
  /** Block definition - a reusable field shape embedded into pages/collections
56
- * via a Block field (`{ type: "block", block: "<key>" }`). Has NO standalone
56
+ * via a Block field (`{ type: "block", block: "<key>" }` or the polymorphic
57
+ * `{ type: "block", blocks: ["<key>", "<key>"] }`). Has NO standalone
57
58
  * entry or content file; each placement owns its own values (an embed, not a
58
59
  * reference). Use for repeating structures like cards or FAQ items. */
59
60
  export interface BlockDef {
@@ -84,7 +85,7 @@ export interface SchemaLayout {
84
85
  blocks?: LayoutNode[];
85
86
  }
86
87
  /** The kind of a string slot — drives the param type codegen emits and the
87
- * runtime fill. `text` → `string`, `number` → lang-aware `Intl.NumberFormat`,
88
+ * runtime fill. `text` → string/number text, `number` → plain numeric text,
88
89
  * `count` → the reserved slot that selects CLDR plural forms. v1 ships these
89
90
  * three; `select`/`date` come later. See `docs/strings-i18n.md` §2. */
90
91
  export type SlotKind = "text" | "number" | "count";
@@ -148,24 +149,21 @@ export interface OknoConfig {
148
149
  apiUrl?: string;
149
150
  /** Whether this is the editor build (disables HMR on content changes) */
150
151
  isEditor?: boolean;
151
- /** Force the prebuilt editor bundle even when the editor SOURCE is present
152
- * next to it (i.e. okno symlinked from its monorepo via `bun link`). Without
153
- * this, `vite dev` serves the editor's raw Svelte for HMR — which needs the
154
- * consumer's Vite to compile Svelte + resolve the editor's deps. A plain
155
- * consumer app (e.g. Astro without `@astrojs/svelte`) can't, so it sets this
156
- * to load `dist/editor` instead. Rebuild okno (`bun run build:pkg`) to pick up
157
- * editor changes. No-op for a normal `npm install` (no source present). */
152
+ /** Use the compiled editor bundle (the default), including linked packages.
153
+ * Set false explicitly for internal editor source HMR; this requires the
154
+ * consumer's Svelte toolchain and editor dependencies. Source HMR applies
155
+ * only during dev when the checkout's editor source is present. Builds and
156
+ * normal installed packages always use the compiled editor. */
158
157
  builtEditor?: boolean;
159
158
  /** Public demo mode: the editor boots login-less, reads content from a
160
159
  * static `okno-demo.json` snapshot, and no-ops every write (nothing is
161
160
  * persisted; a reload resets). For showcasing okno on a marketing site —
162
161
  * see `docs/demo-mode.md`. A demo build never reaches the backend. */
163
162
  demo?: boolean;
164
- /** Base URL the instant-mode snapshot is served from (default:
165
- * "https://snap.okno.build"). Only read when okno/project.json has
166
- * `"instant": true` — see docs/instant.md. Override for self-hosted or
167
- * local testing of the hot layer. */
168
- instantUrl?: string;
163
+ /** Internal UI testing controls. Opt in explicitly in an okno test project;
164
+ * ordinary local development does not enable them. This does not change the
165
+ * content engine, backend URL, authentication, or payment environment. */
166
+ internalTesting?: boolean;
169
167
  /** Localization configuration */
170
168
  locales?: {
171
169
  /** Default/base locale code (e.g. "en") */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/contracts/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEtD,iEAAiE;AACjE,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;AAE7C,iDAAiD;AACjD,MAAM,WAAW,OAAO;IACvB,8EAA8E;IAC9E,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;+EAC2E;IAC3E,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;CACd;AAED,gEAAgE;AAChE,MAAM,WAAW,aAAa;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;;kFAI8E;IAC9E,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB;;;;;;mDAM+C;IAC/C,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB;;;;;;;;qFAQiF;IACjF,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;sDAEkD;IAClD,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,GAAG;QAChB,IAAI,EAAE,SAAS,CAAA;KACf,CAAA;CACD;AAED;;oEAEoE;AACpE,MAAM,WAAW,SAAS;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACd;AAED;;;;wEAIwE;AACxE,MAAM,WAAW,QAAQ;IACxB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACd;A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IAC3C,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IACjC,gFAAgF;IAChF,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,8EAA8E;IAC9E,OAAO,CAAC,EAAE,aAAa,CAAA;IACvB;;4DAEwD;IACxD,OAAO,CAAC,EAAE,aAAa,CAAA;CACvB;AAED;yDACyD;AACzD,MAAM,MAAM,MAAM,GAAG,UAAU,CAAA;AAE/B,2BAA2B;AAC3B,MAAM,WAAW,UAAU;IAC1B,2DAA2D;IAC3D,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,4EAA4E;IAC5E,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,yEAAyE;IACzE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;;oEAIgE;IAChE,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;;2EAGuE;IACvE,IAAI,CAAC,EAAE,OAAO,CAAA;IACd;;8EAE0E;IAC1E,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,iCAAiC;IACjC,OAAO,CAAC,EAAE;QACT,2CAA2C;QAC3C,OAAO,EAAE,MAAM,CAAA;QACf,uDAAuD;QACvD,SAAS,EAAE,MAAM,EAAE,CAAA;KACnB,CAAA;CACD"}
@@ -0,0 +1,13 @@
1
+ import { type SchemaObj } from "./schema.ts";
2
+ export declare function isReservedCreationPath(path: string): boolean;
3
+ /** Shared owner resolution for current per-record and older collection modules. */
4
+ export declare function contentOwnerForPath(path: string, schema: SchemaObj): {
5
+ kind: string;
6
+ name: string;
7
+ } | undefined;
8
+ /** IO callers share collection ownership and new-write validation. Reads keep
9
+ * malformed flags/envelopes intact rather than deleting recoverable content. */
10
+ export declare function normalizeCollectionContent(path: string, schema: SchemaObj, value: unknown, options?: {
11
+ forWrite?: boolean;
12
+ }): unknown;
13
+ //# sourceMappingURL=content-path.d.ts.map