@mono-lit/utility 0.0.1 → 0.0.2

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 (36) hide show
  1. package/LICENSE.md +54 -54
  2. package/README.md +156 -156
  3. package/dist/{app-roots-BJsIxzjk.d.ts → app-roots-DK41xMWj.d.ts} +1 -2
  4. package/dist/config-node.d.ts +134 -188
  5. package/dist/config-node.js +1 -1
  6. package/dist/config.d.ts +1 -1
  7. package/dist/{create-config-D3m6xTaQ.d.ts → create-config-B8IhX4ht.d.ts} +5 -3
  8. package/dist/fetching.d.ts +51 -46
  9. package/dist/fetching.js +163 -15
  10. package/dist/{index-C2hZeNkq.d.ts → index-BAy6tbOG.d.ts} +12 -6
  11. package/dist/{index-ClrZbU7n.d.ts → index-DYlzhHq7.d.ts} +83 -87
  12. package/dist/index.d.ts +3 -7
  13. package/dist/index.js +5 -3
  14. package/dist/{merge-file-C5nzi_MY.d.ts → merge-file-CLc3wxY4.d.ts} +5 -28
  15. package/dist/{mock-db-5mJTObSC.js → mock-db-4tTWrF-P.js} +12 -12
  16. package/dist/mock-db.d.ts +1 -1
  17. package/dist/mock-db.js +1 -1
  18. package/dist/mono-db.d.ts +1 -1
  19. package/dist/mono-db.js +115 -108
  20. package/dist/mono-prepare.d.ts +1 -1
  21. package/dist/mono-prepare.js +3 -2
  22. package/dist/mono-skills.d.ts +1 -1
  23. package/dist/mono-skills.js +39 -32
  24. package/dist/nuxt-layers.d.ts +4 -2
  25. package/dist/nuxt-runtime.d.ts +4 -5
  26. package/dist/nuxt-runtime.js +1 -1
  27. package/dist/nuxt.d.ts +40 -36
  28. package/dist/nuxt.js +153 -6
  29. package/dist/{runtime-C_IWNrAG.js → runtime-vs7U9Ed4.js} +394 -157
  30. package/dist/runtime.d.ts +68 -133
  31. package/dist/runtime.js +2 -2
  32. package/dist/{session-Bk985AIM.js → session-Bcig-rPi.js} +4 -4
  33. package/dist/{universal-B2eD9xho.d.ts → universal-BR0O7Qwk.d.ts} +8 -46
  34. package/dist/{universal-BNTo_83u.js → universal-DIVEzCvN.js} +3 -2
  35. package/dist/vite.d.ts +44 -41
  36. package/package.json +11 -11
package/dist/mono-db.js CHANGED
@@ -23,10 +23,12 @@ import { defineCommand, runMain } from "citty";
23
23
  */
24
24
  async function loadMergedConfig(cwd) {
25
25
  const dirname = path.resolve(cwd ?? process.cwd());
26
- return resolveMonoConfig(await getMonoConfig({
26
+ const alias = monoAlias({ dirname });
27
+ const raw = await getMonoConfig({
27
28
  cwd: dirname,
28
- jitiOptions: { alias: monoAlias({ dirname }) }
29
- }));
29
+ jitiOptions: { alias }
30
+ });
31
+ return resolveMonoConfig(raw);
30
32
  }
31
33
  function requireMock(config) {
32
34
  const mock = config?.mockIndexedDB;
@@ -36,116 +38,121 @@ function requireMock(config) {
36
38
  }
37
39
  return mock;
38
40
  }
39
- runMain(defineCommand({
41
+ const validateCommand = defineCommand({
42
+ meta: {
43
+ name: "validate",
44
+ description: "Parse every mock schema and report bad fields/relations."
45
+ },
46
+ args: { cwd: {
47
+ type: "string",
48
+ description: "App root (defaults to the current directory)."
49
+ } },
50
+ async run({ args }) {
51
+ const mock = requireMock(await loadMergedConfig(args.cwd));
52
+ const { schemas, errors } = parseMockSchema(mock);
53
+ for (const schema of schemas) {
54
+ const entities = Object.values(schema.entities);
55
+ console.log(`\n ${schema.baseUrl} (${entities.length} entit${entities.length === 1 ? "y" : "ies"})`);
56
+ for (const entity of entities) {
57
+ const relations = entity.relations.map((f) => f.name);
58
+ console.log(` - ${entity.name} pk=${entity.primaryKey} columns=${entity.columns.length}` + (relations.length ? ` expand=[${relations.join(", ")}]` : "") + (entity.seed ? ` seed=${entity.seed.length} row(s)` : ""));
59
+ }
60
+ }
61
+ if (errors.length) {
62
+ console.error(`\n ${errors.length} error(s):`);
63
+ for (const error of errors) console.error(` x ${error.baseUrl} -> ${error.entity}${error.field ? `.${error.field}` : ""}: ${error.message}`);
64
+ process.exit(1);
65
+ }
66
+ console.log("\n schema OK\n");
67
+ }
68
+ });
69
+ const previewCommand = defineCommand({
70
+ meta: {
71
+ name: "preview",
72
+ description: "Print the rows the generator would produce."
73
+ },
74
+ args: {
75
+ cwd: {
76
+ type: "string",
77
+ description: "App root (defaults to the current directory)."
78
+ },
79
+ entity: {
80
+ type: "string",
81
+ description: "Only this entity."
82
+ },
83
+ count: {
84
+ type: "string",
85
+ description: "Rows per entity (overrides seedCount)."
86
+ }
87
+ },
88
+ async run({ args }) {
89
+ const mock = requireMock(await loadMergedConfig(args.cwd));
90
+ const { schemas, errors } = parseMockSchema(mock);
91
+ if (errors.length) {
92
+ console.error("[mono db] schema has errors — run `mono db validate` first.");
93
+ process.exit(1);
94
+ }
95
+ for (const schema of schemas) {
96
+ const seed = generateSeed(schema, {
97
+ count: args.count ? Number(args.count) : mock.seedCount,
98
+ random: mock.seedRandom
99
+ });
100
+ for (const [entityName, rows] of Object.entries(seed)) {
101
+ if (args.entity && args.entity !== entityName) continue;
102
+ console.log(`\n ${schema.baseUrl} / ${entityName} (${rows.length} rows)`);
103
+ console.log(JSON.stringify(rows, null, 2));
104
+ }
105
+ }
106
+ }
107
+ });
108
+ const exportCommand = defineCommand({
109
+ meta: {
110
+ name: "export",
111
+ description: "Write generated rows to a JSON file (to promote them into an explicit `seed`)."
112
+ },
113
+ args: {
114
+ cwd: {
115
+ type: "string",
116
+ description: "App root (defaults to the current directory)."
117
+ },
118
+ out: {
119
+ type: "string",
120
+ description: "Output file.",
121
+ default: "mock-seed.json"
122
+ },
123
+ count: {
124
+ type: "string",
125
+ description: "Rows per entity (overrides seedCount)."
126
+ }
127
+ },
128
+ async run({ args }) {
129
+ const mock = requireMock(await loadMergedConfig(args.cwd));
130
+ const { schemas, errors } = parseMockSchema(mock);
131
+ if (errors.length) {
132
+ console.error("[mono db] schema has errors — run `mono db validate` first.");
133
+ process.exit(1);
134
+ }
135
+ const out = {};
136
+ for (const schema of schemas) out[schema.baseUrl] = generateSeed(schema, {
137
+ count: args.count ? Number(args.count) : mock.seedCount,
138
+ random: mock.seedRandom
139
+ });
140
+ const file = path.resolve(process.cwd(), args.out);
141
+ writeFileSync(file, JSON.stringify(out, null, 2));
142
+ console.log(`[mono db] wrote ${file}`);
143
+ }
144
+ });
145
+ const main = defineCommand({
40
146
  meta: {
41
147
  name: "db",
42
148
  description: "Mock IndexedDB backend: validate schemas and preview generated seed data. The store itself lives in the browser — use monoMockDb().reset()/.export() at runtime."
43
149
  },
44
150
  subCommands: {
45
- validate: defineCommand({
46
- meta: {
47
- name: "validate",
48
- description: "Parse every mock schema and report bad fields/relations."
49
- },
50
- args: { cwd: {
51
- type: "string",
52
- description: "App root (defaults to the current directory)."
53
- } },
54
- async run({ args }) {
55
- const { schemas, errors } = parseMockSchema(requireMock(await loadMergedConfig(args.cwd)));
56
- for (const schema of schemas) {
57
- const entities = Object.values(schema.entities);
58
- console.log(`\n ${schema.baseUrl} (${entities.length} entit${entities.length === 1 ? "y" : "ies"})`);
59
- for (const entity of entities) {
60
- const relations = entity.relations.map((f) => f.name);
61
- console.log(` - ${entity.name} pk=${entity.primaryKey} columns=${entity.columns.length}` + (relations.length ? ` expand=[${relations.join(", ")}]` : "") + (entity.seed ? ` seed=${entity.seed.length} row(s)` : ""));
62
- }
63
- }
64
- if (errors.length) {
65
- console.error(`\n ${errors.length} error(s):`);
66
- for (const error of errors) console.error(` x ${error.baseUrl} -> ${error.entity}${error.field ? `.${error.field}` : ""}: ${error.message}`);
67
- process.exit(1);
68
- }
69
- console.log("\n schema OK\n");
70
- }
71
- }),
72
- preview: defineCommand({
73
- meta: {
74
- name: "preview",
75
- description: "Print the rows the generator would produce."
76
- },
77
- args: {
78
- cwd: {
79
- type: "string",
80
- description: "App root (defaults to the current directory)."
81
- },
82
- entity: {
83
- type: "string",
84
- description: "Only this entity."
85
- },
86
- count: {
87
- type: "string",
88
- description: "Rows per entity (overrides seedCount)."
89
- }
90
- },
91
- async run({ args }) {
92
- const mock = requireMock(await loadMergedConfig(args.cwd));
93
- const { schemas, errors } = parseMockSchema(mock);
94
- if (errors.length) {
95
- console.error("[mono db] schema has errors — run `mono db validate` first.");
96
- process.exit(1);
97
- }
98
- for (const schema of schemas) {
99
- const seed = generateSeed(schema, {
100
- count: args.count ? Number(args.count) : mock.seedCount,
101
- random: mock.seedRandom
102
- });
103
- for (const [entityName, rows] of Object.entries(seed)) {
104
- if (args.entity && args.entity !== entityName) continue;
105
- console.log(`\n ${schema.baseUrl} / ${entityName} (${rows.length} rows)`);
106
- console.log(JSON.stringify(rows, null, 2));
107
- }
108
- }
109
- }
110
- }),
111
- export: defineCommand({
112
- meta: {
113
- name: "export",
114
- description: "Write generated rows to a JSON file (to promote them into an explicit `seed`)."
115
- },
116
- args: {
117
- cwd: {
118
- type: "string",
119
- description: "App root (defaults to the current directory)."
120
- },
121
- out: {
122
- type: "string",
123
- description: "Output file.",
124
- default: "mock-seed.json"
125
- },
126
- count: {
127
- type: "string",
128
- description: "Rows per entity (overrides seedCount)."
129
- }
130
- },
131
- async run({ args }) {
132
- const mock = requireMock(await loadMergedConfig(args.cwd));
133
- const { schemas, errors } = parseMockSchema(mock);
134
- if (errors.length) {
135
- console.error("[mono db] schema has errors — run `mono db validate` first.");
136
- process.exit(1);
137
- }
138
- const out = {};
139
- for (const schema of schemas) out[schema.baseUrl] = generateSeed(schema, {
140
- count: args.count ? Number(args.count) : mock.seedCount,
141
- random: mock.seedRandom
142
- });
143
- const file = path.resolve(process.cwd(), args.out);
144
- writeFileSync(file, JSON.stringify(out, null, 2));
145
- console.log(`[mono db] wrote ${file}`);
146
- }
147
- })
151
+ validate: validateCommand,
152
+ preview: previewCommand,
153
+ export: exportCommand
148
154
  }
149
- }));
155
+ });
156
+ runMain(main);
150
157
 
151
158
  //#endregion
@@ -1 +1 @@
1
- export { };
1
+ export {}
@@ -3,7 +3,7 @@ import path from "node:path";
3
3
  import { defineCommand, runMain } from "citty";
4
4
 
5
5
  //#region pkg/cli/prepare.ts
6
- runMain(defineCommand({
6
+ const main = defineCommand({
7
7
  meta: {
8
8
  name: "prepare",
9
9
  description: "Generate .mono/tsconfig.json from the mono alias map and wire it into the root tsconfig (via extends)."
@@ -22,6 +22,7 @@ runMain(defineCommand({
22
22
  if (result.removedKeys.length) console.log(`[mono] removed ${result.removedKeys.length} inline alias path(s) from tsconfig.json`);
23
23
  if (result.wiredApps.length) console.log(`[mono] wired ${result.wiredApps.length} cloned app tsconfig(s) -> ${monoRel}: ${result.wiredApps.join(", ")}`);
24
24
  }
25
- }));
25
+ });
26
+ runMain(main);
26
27
 
27
28
  //#endregion
@@ -1 +1 @@
1
- export { };
1
+ export {}
@@ -1,4 +1,4 @@
1
- import { J as loadSkillsEnv, K as isGenericAppName, O as resolveRemote, R as redactUrl, S as SkillsAccessError, U as ALLOWED_FLAGS, Y as resolveSkillTarget, _ as stagingRoot, b as resolveAppId, i as runSearch, n as runCheck, o as buildSavePlan, p as listSessions, q as loadSkillConfig, r as runRead, s as runSave, t as runSessionShow, w as ensureRepo, x as detectActor } from "./session-Bk985AIM.js";
1
+ import { J as loadSkillsEnv, K as isGenericAppName, O as resolveRemote, R as redactUrl, S as SkillsAccessError, U as ALLOWED_FLAGS, Y as resolveSkillTarget, _ as stagingRoot, b as resolveAppId, i as runSearch, n as runCheck, o as buildSavePlan, p as listSessions, q as loadSkillConfig, r as runRead, s as runSave, t as runSessionShow, w as ensureRepo, x as detectActor } from "./session-Bcig-rPi.js";
2
2
  import fs from "node:fs";
3
3
  import path from "node:path";
4
4
  import { defineCommand, runMain } from "citty";
@@ -160,9 +160,10 @@ const whoamiCommand = defineCommand({
160
160
  },
161
161
  async run({ rawArgs }) {
162
162
  guardArgs(rawArgs);
163
+ const cwd = prelude();
163
164
  printJson({
164
165
  success: true,
165
- ...detectActor(prelude())
166
+ ...detectActor(cwd)
166
167
  });
167
168
  }
168
169
  });
@@ -200,15 +201,16 @@ const readCommand = defineCommand({
200
201
  const { remote } = connect(cwd, target, "if-stale");
201
202
  try {
202
203
  const type = args.type === "knowledge" || args.type === "skills" ? args.type : void 0;
204
+ const result = runRead({
205
+ cwd,
206
+ app: args.app,
207
+ type,
208
+ path: args.path,
209
+ remote
210
+ });
203
211
  printJson({
204
212
  success: true,
205
- ...runRead({
206
- cwd,
207
- app: args.app,
208
- type,
209
- path: args.path,
210
- remote
211
- })
213
+ ...result
212
214
  });
213
215
  } catch (e) {
214
216
  fail(e.message);
@@ -249,15 +251,16 @@ const searchCommand = defineCommand({
249
251
  const { remote } = connect(cwd, target, "if-stale");
250
252
  const limit = args.limit ? Math.max(1, parseInt(args.limit, 10) || 10) : 10;
251
253
  try {
254
+ const result = runSearch({
255
+ cwd,
256
+ app: args.app,
257
+ query: args.query,
258
+ limit,
259
+ remote
260
+ });
252
261
  printJson({
253
262
  success: true,
254
- ...runSearch({
255
- cwd,
256
- app: args.app,
257
- query: args.query,
258
- limit,
259
- remote
260
- })
263
+ ...result
261
264
  });
262
265
  } catch (e) {
263
266
  fail(e.message);
@@ -420,12 +423,13 @@ const pendingCommand = defineCommand({
420
423
  async run({ args, rawArgs }) {
421
424
  guardArgs(rawArgs);
422
425
  const cwd = prelude();
426
+ const app = resolveAppId({
427
+ app: args.app,
428
+ cwd
429
+ });
423
430
  printJson({
424
431
  success: true,
425
- app: resolveAppId({
426
- app: args.app,
427
- cwd
428
- }),
432
+ app,
429
433
  kind: "pending",
430
434
  sessions: listSessions(cwd, "pending")
431
435
  });
@@ -447,12 +451,13 @@ const failedCommand = defineCommand({
447
451
  async run({ args, rawArgs }) {
448
452
  guardArgs(rawArgs);
449
453
  const cwd = prelude();
454
+ const app = resolveAppId({
455
+ app: args.app,
456
+ cwd
457
+ });
450
458
  printJson({
451
459
  success: true,
452
- app: resolveAppId({
453
- app: args.app,
454
- cwd
455
- }),
460
+ app,
456
461
  kind: "failed",
457
462
  sessions: listSessions(cwd, "failed")
458
463
  });
@@ -485,14 +490,15 @@ const showCommand = defineCommand({
485
490
  const { target } = requireSkillConfig(cwd);
486
491
  const { remote } = connect(cwd, target, "if-stale");
487
492
  try {
493
+ const result = runSessionShow({
494
+ cwd,
495
+ app: args.app,
496
+ sessionId,
497
+ remote
498
+ });
488
499
  printJson({
489
500
  success: true,
490
- ...runSessionShow({
491
- cwd,
492
- app: args.app,
493
- sessionId,
494
- remote
495
- })
501
+ ...result
496
502
  });
497
503
  } catch (e) {
498
504
  fail(e.message);
@@ -806,7 +812,7 @@ const syncCommand = defineCommand({
806
812
 
807
813
  //#endregion
808
814
  //#region pkg/cli/skills/index.ts
809
- runMain(defineCommand({
815
+ const main = defineCommand({
810
816
  meta: {
811
817
  name: "skills",
812
818
  description: "MONO Skills: read app knowledge/skills and save AI session history to the git repository configured as `skill` in mono.config.ts. Off unless `skill` is set; git credentials first, `envToken` as fallback."
@@ -825,6 +831,7 @@ runMain(defineCommand({
825
831
  sync: syncCommand,
826
832
  template: templateCommand
827
833
  }
828
- }));
834
+ });
835
+ runMain(main);
829
836
 
830
837
  //#endregion
@@ -1,3 +1,5 @@
1
+ import "./create-config-B8IhX4ht.js";
2
+ import "./app-roots-DK41xMWj.js";
1
3
  //#region src/nuxt/nuxt-layers.d.ts
2
4
  interface MonoNuxtLayersOptions {
3
5
  /** Project root. `apps[].path` resolves against it. @default process.cwd() */
@@ -29,6 +31,6 @@ interface MonoNuxtLayersOptions {
29
31
  * own `extends` chain reaches for `@mono-host-root/mono.config`, an alias mono
30
32
  * has not installed at that point). Hence the static parse.
31
33
  */
32
- declare function monoNuxtLayers(opts?: MonoNuxtLayersOptions): string[];
34
+ export declare function monoNuxtLayers(opts?: MonoNuxtLayersOptions): string[];
33
35
  //#endregion
34
- export { type MonoNuxtLayersOptions, monoNuxtLayers };
36
+ export type { MonoNuxtLayersOptions };
@@ -1,7 +1,6 @@
1
- import { o as setMonoEventResolver, t as MonoRequestEvent } from "./universal-B2eD9xho.js";
1
+ import { o as setMonoEventResolver, t as MonoRequestEvent } from "./universal-BR0O7Qwk.js";
2
2
  import { Driver, Storage } from "unstorage";
3
3
  import { H3Event } from "h3";
4
-
5
4
  //#region src/nuxt/ssr-cookie.d.ts
6
5
  interface MonoCookieDriverOptions {
7
6
  /** h3 request event (server). When absent, the driver uses document.cookie (client). */
@@ -11,8 +10,8 @@ interface MonoCookieDriverOptions {
11
10
  * unstorage cookie driver. Values are plain strings; expiry is passed through the
12
11
  * transaction options as `{ expires: Date }` on `setItem`.
13
12
  */
14
- declare const monoCookieDriver: (opts: MonoCookieDriverOptions | undefined) => Driver<MonoCookieDriverOptions | undefined, any>;
13
+ export declare const monoCookieDriver: (opts: MonoCookieDriverOptions | undefined) => Driver<MonoCookieDriverOptions | undefined, any>;
15
14
  /** A unstorage Storage bound to the cookie driver (server event or client). */
16
- declare function monoCookieStorage(event?: H3Event): Storage;
15
+ export declare function monoCookieStorage(event?: H3Event): Storage;
17
16
  //#endregion
18
- export { type MonoCookieDriverOptions, type MonoRequestEvent, monoCookieDriver, monoCookieStorage, setMonoEventResolver };
17
+ export { type MonoCookieDriverOptions, type MonoRequestEvent, setMonoEventResolver };
@@ -1,4 +1,4 @@
1
- import { a as setMonoEventResolver } from "./universal-BNTo_83u.js";
1
+ import { a as setMonoEventResolver } from "./universal-DIVEzCvN.js";
2
2
  import { createStorage, defineDriver } from "unstorage";
3
3
  import { deleteCookie, getCookie, parseCookies, setCookie } from "h3";
4
4
 
package/dist/nuxt.d.ts CHANGED
@@ -1,9 +1,8 @@
1
1
  /// <reference path="../../vue.d.ts" />
2
- import { c as MonoConfig } from "./create-config-D3m6xTaQ.js";
3
- import { t as MergeEcosystemOptions } from "./merge-file-C5nzi_MY.js";
2
+ import { c as MonoConfig } from "./create-config-B8IhX4ht.js";
3
+ import { t as MergeEcosystemOptions } from "./merge-file-CLc3wxY4.js";
4
4
  import { Plugin } from "vite";
5
5
  import { NuxtModule } from "@nuxt/schema";
6
-
7
6
  //#region src/nuxt/nuxt-ecosystem.d.ts
8
7
  /**
9
8
  * Which Nuxt API consumes the discovered folders (the "destination").
@@ -13,39 +12,8 @@ import { NuxtModule } from "@nuxt/schema";
13
12
  */
14
13
  type EcosystemType = 'imports' | 'components' | 'pages' | 'layouts' | 'middleware' | 'plugins';
15
14
  //#endregion
16
- //#region ../helper/dist/src/vite/index.d.ts
17
- interface MonoSsrOptions {
18
- /** Custom-element tag prefix wrapped in <ClientOnly>. Default 'mono-'. */
19
- prefix?: string;
20
- /** Wrapper component used for client-only rendering. Default 'ClientOnly'. */
21
- wrapper?: string;
22
- /** Import prefix of registration modules stubbed during SSR. Default '@mono-lit/helper/ui/'. */
23
- ssrStubPrefix?: string;
24
- /**
25
- * Tag names (e.g. `['mono-nav']`) to NOT wrap in `<ClientOnly>` — for
26
- * components server-rendered by another mechanism (e.g. `nuxt-ssr-lit`
27
- * shadow-DOM builds). Default `[]`.
28
- */
29
- exclude?: string[];
30
- /**
31
- * Wrap LIGHT `<prefix*>` elements in `<ClientOnly>`. Default `true`. `false`
32
- * keeps the server import-stub and the shadow `<LitWrapper>` wrap but leaves
33
- * light tags as they are — see `MonoClientOnlyOptions.lightWrap`.
34
- */
35
- lightWrap?: boolean;
36
- /**
37
- * Enable the import-driven SSR wrap: `<mono-*>` whose `@mono-lit/helper/ui/shadow/
38
- * <entry>` build a `.vue` file imports get wrapped in `<LitWrapper>`
39
- * (Declarative Shadow DOM) instead of `<ClientOnly>`. Default off.
40
- */
41
- litWrapper?: boolean;
42
- /** Component name used for the SSR wrap. Default `'LitWrapper'`. */
43
- litWrapperComponent?: string;
44
- /** Tags to ALWAYS treat as shadow (for globally-registered components). */
45
- shadowOverride?: string[];
46
- }
47
- //#endregion
48
15
  //#region ../helper/dist/src/components/tooltip/tooltip-types.d.ts
16
+ //#region src/components/tooltip/tooltip-types.d.ts
49
17
  type Side = 'top' | 'right' | 'bottom' | 'left';
50
18
  type MonoTooltipPlacement = Side | `${Side}-start` | `${Side}-end`;
51
19
  /** What opens the tooltip. `manual` = only `show()` / `hide()` do. */
@@ -120,6 +88,7 @@ interface MonoTooltipGlobalOptions extends MonoTooltipOptions {
120
88
  }
121
89
  //#endregion
122
90
  //#region ../helper/dist/src/composables/mono-skeleton.d.ts
91
+ //#region src/composables/mono-skeleton.d.ts
123
92
  /** phantom-ui's options, camelCase (applied to the wrapper as kebab-case attributes). */
124
93
  interface MonoPhantomProps {
125
94
  /** `shimmer` (default) | `pulse` | `breathe` | `solid`. */
@@ -166,12 +135,13 @@ interface MonoSkeletonDefaults extends Partial<MonoPhantomProps> {
166
135
  }
167
136
  //#endregion
168
137
  //#region ../helper/dist/src/composables/mono-ui.d.ts
138
+ //#region src/composables/mono-ui.d.ts
169
139
  /**
170
140
  * Tag → props map for typed configs. `scripts/gen-vue-types.mjs` augments it in
171
141
  * the published types (`'mono-button': ButtonProps`, …); it is empty in source.
172
142
  */
173
143
  interface MonoUIComponents {}
174
- type KnownConfig = { [K in keyof MonoUIComponents]?: Partial<MonoUIComponents[K]> };
144
+ type KnownConfig = { [K in keyof MonoUIComponents]?: Partial<MonoUIComponents[K]>; };
175
145
  /**
176
146
  * Per-component default props. Keys are tags (`mono-button`); props are camelCase or kebab-case.
177
147
  * The reserved `skeleton` key holds the global defaults of the automatic skeleton
@@ -183,7 +153,41 @@ type MonoUIConfig = KnownConfig & {
183
153
  [tag: `mono-${string}`]: Record<string, unknown> | undefined;
184
154
  };
185
155
  //#endregion
156
+ //#region ../helper/dist/src/vite/index.d.ts
157
+ //#region src/vite/index.d.ts
158
+ interface MonoSsrOptions {
159
+ /** Custom-element tag prefix wrapped in <ClientOnly>. Default 'mono-'. */
160
+ prefix?: string;
161
+ /** Wrapper component used for client-only rendering. Default 'ClientOnly'. */
162
+ wrapper?: string;
163
+ /** Import prefix of registration modules stubbed during SSR. Default '@mono-lit/helper/ui/'. */
164
+ ssrStubPrefix?: string;
165
+ /**
166
+ * Tag names (e.g. `['mono-nav']`) to NOT wrap in `<ClientOnly>` — for
167
+ * components server-rendered by another mechanism (e.g. `nuxt-ssr-lit`
168
+ * shadow-DOM builds). Default `[]`.
169
+ */
170
+ exclude?: string[];
171
+ /**
172
+ * Wrap LIGHT `<prefix*>` elements in `<ClientOnly>`. Default `true`. `false`
173
+ * keeps the server import-stub and the shadow `<LitWrapper>` wrap but leaves
174
+ * light tags as they are — see `MonoClientOnlyOptions.lightWrap`.
175
+ */
176
+ lightWrap?: boolean;
177
+ /**
178
+ * Enable the import-driven SSR wrap: `<mono-*>` whose `@mono-lit/helper/ui/shadow/
179
+ * <entry>` build a `.vue` file imports get wrapped in `<LitWrapper>`
180
+ * (Declarative Shadow DOM) instead of `<ClientOnly>`. Default off.
181
+ */
182
+ litWrapper?: boolean;
183
+ /** Component name used for the SSR wrap. Default `'LitWrapper'`. */
184
+ litWrapperComponent?: string;
185
+ /** Tags to ALWAYS treat as shadow (for globally-registered components). */
186
+ shadowOverride?: string[];
187
+ }
188
+ //#endregion
186
189
  //#region ../helper/dist/src/nuxt/index.d.ts
190
+ //#region src/nuxt/index.d.ts
187
191
  interface MonoHelperModuleOptions extends MonoSsrOptions {
188
192
  /** Auto-add `@mono-lit/helper/ui/index.css` to nuxt css. Default true. */
189
193
  css?: boolean;