okno 1.0.0-beta.38 → 1.0.0-beta.39
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.
- package/dist/astro/index.d.ts +0 -8
- package/dist/astro/index.d.ts.map +1 -1
- package/dist/astro/index.js +6 -18
- package/dist/codegen/modules.d.ts +0 -16
- package/dist/codegen/modules.d.ts.map +1 -1
- package/dist/{dispatch-oBWbJ5Pl.js → dispatch-BifB_3GO.js} +181 -193
- package/dist/editor/index.js +14 -3
- package/dist/index.js +1 -1
- package/dist/next/index.js +1 -1
- package/dist/plugin-BdiBIiAv.js +489 -0
- package/dist/types/schema.d.ts +0 -5
- package/dist/types/schema.d.ts.map +1 -1
- package/dist/vite/index.js +1 -1
- package/dist/vite/plugin.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/codegen/modules-instant.d.ts +0 -21
- package/dist/codegen/modules-instant.d.ts.map +0 -1
- package/dist/plugin-Bgk7L4b7.js +0 -575
- package/dist/runtime/instant.d.ts +0 -55
- package/dist/runtime/instant.d.ts.map +0 -1
- package/dist/runtime/instant.js +0 -146
- package/src/runtime/instant.test.ts +0 -113
- package/src/runtime/instant.ts +0 -287
package/dist/astro/index.d.ts
CHANGED
|
@@ -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;
|
|
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,CAUlE;AAED,eAAe,IAAI,CAAA"}
|
package/dist/astro/index.js
CHANGED
|
@@ -1,27 +1,15 @@
|
|
|
1
|
-
import { o as
|
|
2
|
-
|
|
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-BdiBIiAv.js";
|
|
2
|
+
function a(o = {}) {
|
|
12
3
|
return {
|
|
13
4
|
name: "okno",
|
|
14
5
|
hooks: {
|
|
15
|
-
"astro:config:setup"({ updateConfig:
|
|
16
|
-
|
|
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: n, injectScript: t }) {
|
|
7
|
+
n({ vite: { plugins: [e(o)] } }), t("page", 'import "okno/boot"');
|
|
20
8
|
}
|
|
21
9
|
}
|
|
22
10
|
};
|
|
23
11
|
}
|
|
24
12
|
export {
|
|
25
|
-
|
|
26
|
-
|
|
13
|
+
a as default,
|
|
14
|
+
a as okno
|
|
27
15
|
};
|
|
@@ -2,27 +2,11 @@ export declare const IMAGE_MAP_SETUP = "__oknoSetImages(import.meta.glob(\"/okno
|
|
|
2
2
|
/** The `okno:runtime` module body (the built `dist/runtime/wrap.js`), or null
|
|
3
3
|
* when it's missing (unbuilt tree — run `bun run build:pkg`). */
|
|
4
4
|
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
5
|
/** The umbrella `okno:content` module: one import, all kinds namespaced
|
|
9
6
|
* (`import * as okno from "okno:content"` → okno.pages / .globals /
|
|
10
7
|
* .collections) + the UI-strings store (okno.strings). Pure re-export — the
|
|
11
8
|
* per-kind modules still work. */
|
|
12
9
|
export declare function buildContentModule(): string;
|
|
13
|
-
export declare function listContentFiles(dir: string): Promise<string[]>;
|
|
14
|
-
/** Read per-collection build config from schema.ts: manual `order` (slug list)
|
|
15
|
-
* and the `drafts` opt-in flag. Best-effort — a missing/unparseable schema
|
|
16
|
-
* yields empty (file order, no draft filtering). */
|
|
17
|
-
export declare function readCollectionConfig(oknoDir: string): {
|
|
18
|
-
orders: Record<string, string[]>;
|
|
19
|
-
/** Collections that OPTED OUT (`drafts: false`) — the workflow is on by default. */
|
|
20
|
-
draftsOff: Set<string>;
|
|
21
|
-
/** Collections that OPTED OUT (`scheduling: false`) — on by default. */
|
|
22
|
-
schedulingOff: Set<string>;
|
|
23
|
-
};
|
|
24
|
-
export declare function toExportName(filename: string): string;
|
|
25
|
-
export declare function toContentName(filename: string): string;
|
|
26
10
|
/** Build the framework-agnostic `okno:locales` module: ONE export, `locales` —
|
|
27
11
|
* an array of the configured languages (`{ id, name, slug, link(url) }`) with a
|
|
28
12
|
* `.default` property pointing at the base-locale entry. `link(url)` emits the
|
|
@@ -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
|
|
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;;;mCAGmC;AACnC,wBAAgB,kBAAkB,IAAI,MAAM,CAO3C;AAuHD;;;;;+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,CAAC,MAAM,CAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAqFtG;AAED,2FAA2F;AAC3F,wBAAsB,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,GAAG,CAAC,MAAM,CAAa,EAAE,OAAO,UAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAiJ7H;AAED,4CAA4C;AAC5C,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,GAAG,CAAC,MAAM,CAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAyExG"}
|