void 0.7.5 → 0.7.7

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 (66) hide show
  1. package/dist/{auth-DrfOTMmr.d.mts → auth-DmuALf16.d.mts} +4 -4
  2. package/dist/{better-auth-shared-CZsIpjey.d.mts → better-auth-shared-HXlHRw02.d.mts} +15 -15
  3. package/dist/cli/cli.mjs +14 -14
  4. package/dist/{config-BIa9HwVX.mjs → config-DqkeX_Fa.mjs} +5 -5
  5. package/dist/{db-RqxhOT2E.mjs → db-BnKZW1J7.mjs} +26 -22
  6. package/dist/{deploy-CRIz77mw.mjs → deploy-D3t53kng.mjs} +46 -16
  7. package/dist/{domain-CDQhvYNZ.mjs → domain-ClDdX9I1.mjs} +24 -1
  8. package/dist/{dotenv-DwO4ti0Z.mjs → dotenv-zdFCCgFU.mjs} +26 -26
  9. package/dist/{env-CnrQY2b6.mjs → env-CU97_4YK.mjs} +1 -1
  10. package/dist/{env-helpers-CbeM_7-k.d.mts → env-helpers-Dw95CU8e.d.mts} +4 -4
  11. package/dist/{env-validation-DJKjR_8q.mjs → env-validation-Bc_aiBUm.mjs} +1 -1
  12. package/dist/{fetch-error-DflegrF3.d.mts → fetch-error-DZ868Xq4.d.mts} +4 -4
  13. package/dist/{gen-C0EY2k27.mjs → gen-CpeKIqlM.mjs} +2 -2
  14. package/dist/{handler-dKQWyF-G.d.mts → handler-DJTuxB10.d.mts} +24 -27
  15. package/dist/{head-CZGAunBV.d.mts → head-C7QW7UY1.d.mts} +5 -6
  16. package/dist/{headers-YVkHjOyq.mjs → headers-C7Yf6_CN.mjs} +1 -1
  17. package/dist/index.d.mts +3 -3
  18. package/dist/index.mjs +501 -63
  19. package/dist/{init-FMZ29UZW.mjs → init-CTtDfVVo.mjs} +4 -4
  20. package/dist/{node-DFqMcZR1.mjs → node-DHVCtkgt.mjs} +1 -1
  21. package/dist/pages/client.d.mts +35 -41
  22. package/dist/pages/head-client.d.mts +1 -1
  23. package/dist/pages/head.d.mts +1 -1
  24. package/dist/pages/head.mjs +4 -4
  25. package/dist/pages/index.d.mts +6 -6
  26. package/dist/pages/index.mjs +6 -6
  27. package/dist/pages/islands-plugin.d.mts +4 -13
  28. package/dist/pages/islands-plugin.mjs +2 -64
  29. package/dist/pages/prefetch.d.mts +5 -5
  30. package/dist/pages/protocol.d.mts +2 -2
  31. package/dist/pages/protocol.mjs +98 -14
  32. package/dist/plugin-inference-CXUuq0aC.mjs +577 -0
  33. package/dist/{prepare-PqAbhLte.mjs → prepare-CKzO06-Z.mjs} +4 -4
  34. package/dist/{preset-jKn1hQwP.mjs → preset-BhnZpb7t.mjs} +1 -1
  35. package/dist/{protocol-DxGzKEz2.d.mts → protocol-D7r_deVZ.d.mts} +7 -4
  36. package/dist/{route-types-DReF1gUY.mjs → route-types-Cnqj_8a7.mjs} +2 -2
  37. package/dist/runtime/ai.d.mts +33 -40
  38. package/dist/runtime/auth.d.mts +1 -1
  39. package/dist/runtime/better-auth-pg.d.mts +1 -1
  40. package/dist/runtime/better-auth.d.mts +1 -1
  41. package/dist/runtime/client.d.mts +2 -2
  42. package/dist/runtime/env-helpers.d.mts +1 -1
  43. package/dist/runtime/env-helpers.mjs +3 -3
  44. package/dist/runtime/env-public-client.d.mts +3 -3
  45. package/dist/runtime/env-public.d.mts +7 -7
  46. package/dist/runtime/fetch-stream.d.mts +1 -1
  47. package/dist/runtime/fetch.d.mts +1 -1
  48. package/dist/runtime/handler.d.mts +1 -1
  49. package/dist/runtime/handler.mjs +3 -3
  50. package/dist/runtime/isr.d.mts +2 -2
  51. package/dist/runtime/kv.d.mts +12 -12
  52. package/dist/runtime/live-server.d.mts +4 -4
  53. package/dist/runtime/live.d.mts +2 -2
  54. package/dist/runtime/migration-handler.d.mts +6 -6
  55. package/dist/runtime/seed.d.mts +4 -4
  56. package/dist/runtime/validator.d.mts +1 -1
  57. package/dist/runtime/ws-server.d.mts +8 -8
  58. package/dist/runtime/ws.d.mts +21 -21
  59. package/dist/{scan-QtRTdh94.mjs → scan-B8iEm8xn.mjs} +6 -6
  60. package/dist/{scan-Ba4hFwlH.mjs → scan-CWfLxtOe.mjs} +8 -8
  61. package/dist/{standard-schema-BfGDWXff.d.mts → standard-schema-D2qvCEYV.d.mts} +14 -14
  62. package/dist/sveltekit.d.mts +3 -5
  63. package/dist/types-DG_Ynnyd.d.mts +42 -0
  64. package/package.json +3 -3
  65. package/dist/plugin-inference-CCtRkt9O.mjs +0 -2476
  66. package/dist/types-AdKzPp2C.d.mts +0 -57
@@ -86,12 +86,12 @@ function toLayoutId(layout) {
86
86
  function resolveLayoutChain(componentId, layouts) {
87
87
  const parts = componentId.split("/");
88
88
  const chain = [];
89
- const root = layouts.find((l) => l.directory === "");
89
+ const root = layouts.find((layout) => layout.directory === "");
90
90
  if (root) chain.push(root);
91
91
  let dir = "";
92
- for (let i = 0; i < parts.length - 1; i++) {
93
- dir = dir ? `${dir}/${parts[i]}` : parts[i];
94
- const layout = layouts.find((l) => l.directory === dir);
92
+ for (let partIndex = 0; partIndex < parts.length - 1; partIndex++) {
93
+ dir = dir ? `${dir}/${parts[partIndex]}` : parts[partIndex];
94
+ const layout = layouts.find((candidate) => candidate.directory === dir);
95
95
  if (layout) chain.push(layout);
96
96
  }
97
97
  return chain;
@@ -101,14 +101,14 @@ function resolveNamedLayout(name, componentId, namedLayouts) {
101
101
  const parts = componentId.split("/");
102
102
  const dirs = [];
103
103
  let dir = "";
104
- for (let i = 0; i < parts.length - 1; i++) {
105
- dir = dir ? `${dir}/${parts[i]}` : parts[i];
104
+ for (let partIndex = 0; partIndex < parts.length - 1; partIndex++) {
105
+ dir = dir ? `${dir}/${parts[partIndex]}` : parts[partIndex];
106
106
  dirs.push(dir);
107
107
  }
108
108
  dirs.reverse();
109
109
  dirs.push("");
110
- for (const d of dirs) {
111
- const found = namedLayouts.find((nl) => nl.name === name && nl.directory === d);
110
+ for (const directory of dirs) {
111
+ const found = namedLayouts.find((namedLayout) => namedLayout.name === name && namedLayout.directory === directory);
112
112
  if (found) return found;
113
113
  }
114
114
  return null;
@@ -6,35 +6,35 @@
6
6
  * Per the spec's design, libraries may copy these types directly
7
7
  * to avoid requiring `@standard-schema/spec` as a dependency.
8
8
  */
9
- interface StandardSchemaV1<Input = unknown, Output = Input> {
9
+ type StandardSchemaV1<Input = unknown, Output = Input> = {
10
10
  readonly "~standard": StandardSchemaV1.Props<Input, Output>;
11
- }
11
+ };
12
12
  declare namespace StandardSchemaV1 {
13
- interface Props<Input = unknown, Output = Input> {
13
+ type Props<Input = unknown, Output = Input> = {
14
14
  readonly version: 1;
15
15
  readonly vendor: string;
16
16
  readonly validate: (value: unknown) => Result<Output> | Promise<Result<Output>>;
17
17
  readonly types?: Types<Input, Output> | undefined;
18
- }
18
+ };
19
19
  type Result<Output> = SuccessResult<Output> | FailureResult;
20
- interface SuccessResult<Output> {
20
+ type SuccessResult<Output> = {
21
21
  readonly value: Output;
22
22
  readonly issues?: undefined;
23
- }
24
- interface FailureResult {
23
+ };
24
+ type FailureResult = {
25
25
  readonly issues: ReadonlyArray<Issue>;
26
- }
27
- interface Issue {
26
+ };
27
+ type Issue = {
28
28
  readonly message: string;
29
29
  readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
30
- }
31
- interface PathSegment {
30
+ };
31
+ type PathSegment = {
32
32
  readonly key: PropertyKey;
33
- }
34
- interface Types<Input = unknown, Output = Input> {
33
+ };
34
+ type Types<Input = unknown, Output = Input> = {
35
35
  readonly input: Input;
36
36
  readonly output: Output;
37
- }
37
+ };
38
38
  type InferInput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["input"];
39
39
  type InferOutput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["output"];
40
40
  }
@@ -1,12 +1,10 @@
1
1
  //#region src/sveltekit.d.ts
2
2
  type Tsconfig = Record<string, unknown>;
3
3
  type TsconfigHook = (config: Tsconfig) => Tsconfig | void;
4
- interface VoidSvelteKitTsconfigOptions {
5
- /** Project root. Defaults to process.cwd(). */
6
- root?: string;
7
- /** SvelteKit output directory. Defaults to ".svelte-kit". */
4
+ type VoidSvelteKitTsconfigOptions = {
5
+ /** Project root. Defaults to process.cwd(). */root?: string; /** SvelteKit output directory. Defaults to ".svelte-kit". */
8
6
  outDir?: string;
9
- }
7
+ };
10
8
  /**
11
9
  * Merge Void's generated tsconfig fragment into SvelteKit's generated
12
10
  * tsconfig. Use from `kit.typescript.config` in `svelte.config.js`.
@@ -0,0 +1,42 @@
1
+ //#region src/pages/types.d.ts
2
+ type PageDefinition = {
3
+ /** URL pattern, e.g. "/users/:id" */pattern: string; /** Route params, e.g. ["id"] */
4
+ params: Array<string>; /** Whether this is a catch-all route */
5
+ catchAll: boolean; /** Component file relative path, e.g. "users/[id].vue" */
6
+ componentPath: string; /** Server handler file relative path, e.g. "users/[id].server.ts" */
7
+ serverPath: string | null; /** HTTP methods exported by server handler */
8
+ methods: Array<string>; /** Component ID used in page object, e.g. "users/[id]" */
9
+ componentId: string; /** Edge caching revalidate TTL in seconds, from .server.ts export */
10
+ revalidate?: number; /** Whether `export const prerender = true` is set in server handler */
11
+ prerender?: boolean; /** Whether `export function getPrerenderPaths` is defined in server handler */
12
+ hasGetPrerenderPaths?: boolean; /** Whether this is an island page (.island.tsx/.island.vue) */
13
+ island?: boolean; /** Frontmatter metadata extracted from .md files (title, description) */
14
+ metadata?: {
15
+ title?: string;
16
+ description?: string;
17
+ }; /** Named layout selection: "name", "!name", false, or relative path */
18
+ layout?: string | false;
19
+ };
20
+ type LayoutDefinition = {
21
+ /** Directory path relative to pages/, e.g. "" (root) or "users" */directory: string; /** Layout file relative path, e.g. "layout.vue" or "users/layout.vue" */
22
+ filePath: string; /** Whether this is an island layout (layout.island.tsx/.island.vue) */
23
+ island?: boolean;
24
+ };
25
+ type NamedLayoutDefinition = {
26
+ /** Layout name, e.g. "home", "post" */name: string; /** Directory containing _layouts/, e.g. "" (root) or "guide" */
27
+ directory: string; /** File path relative to pages/, e.g. "_layouts/home.vue" */
28
+ filePath: string; /** Whether this is an island layout */
29
+ island?: boolean;
30
+ };
31
+ type PageScanResult = {
32
+ pages: Array<PageDefinition>;
33
+ layouts: Array<LayoutDefinition>;
34
+ namedLayouts: Array<NamedLayoutDefinition>;
35
+ };
36
+ type DevCssAsset = {
37
+ /** Vite client URL used to request the CSS module. */url: string; /** Vite dev style id used by the client to adopt/update SSR-inlined styles. */
38
+ id?: string; /** CSS bytes returned by Vite's client environment transform with ?inline. */
39
+ css: string;
40
+ };
41
+ //#endregion
42
+ export { PageScanResult as a, PageDefinition as i, LayoutDefinition as n, NamedLayoutDefinition as r, DevCssAsset as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "void",
3
- "version": "0.7.5",
3
+ "version": "0.7.7",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/voidzero-dev/void.git",
@@ -300,6 +300,7 @@
300
300
  "drizzle-orm": "^0.45.2",
301
301
  "drizzle-valibot": "^0.4.2",
302
302
  "drizzle-zod": "^0.8.3",
303
+ "es-module-lexer": "^2.1.0",
303
304
  "hono": "^4.12.18",
304
305
  "ignore": "^7.0.5",
305
306
  "jsonc-parser": "3.3.1",
@@ -314,7 +315,6 @@
314
315
  "@types/pg": "^8.20.0",
315
316
  "@typescript/native-preview": "7.0.0-dev.20260507.1",
316
317
  "arktype": "^2.2.0",
317
- "es-module-lexer": "^2.1.0",
318
318
  "estree-walker": "^3.0.3",
319
319
  "magic-string": "^0.30.21",
320
320
  "ofetch": "2.0.0-alpha.3",
@@ -332,7 +332,7 @@
332
332
  "valibot": ">=1.0.0-beta.7",
333
333
  "vite": "^8.0.0",
334
334
  "zod": "^3.25.0 || ^4.0.0",
335
- "@void/md": "0.7.5"
335
+ "@void/md": "0.7.7"
336
336
  },
337
337
  "peerDependenciesMeta": {
338
338
  "@void/md": {