@vmz/vmz 0.0.0 → 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 (75) hide show
  1. package/README.md +48 -2
  2. package/bin/vmz.js +4 -0
  3. package/dist/application-cmd.d.ts +22 -0
  4. package/dist/application-cmd.js +348 -0
  5. package/dist/bundler-adapter.d.ts +64 -0
  6. package/dist/bundler-adapter.js +111 -0
  7. package/dist/cli.d.ts +15 -0
  8. package/dist/cli.js +370 -0
  9. package/dist/dev-session.d.ts +35 -0
  10. package/dist/dev-session.js +290 -0
  11. package/dist/document-build.d.ts +99 -0
  12. package/dist/document-build.js +274 -0
  13. package/dist/document-check.d.ts +44 -0
  14. package/dist/document-check.js +246 -0
  15. package/dist/document-cmd.d.ts +9 -0
  16. package/dist/document-cmd.js +147 -0
  17. package/dist/document-designs.d.ts +9 -0
  18. package/dist/document-designs.js +126 -0
  19. package/dist/document-enrich.d.ts +23 -0
  20. package/dist/document-enrich.js +234 -0
  21. package/dist/document-evidence.d.ts +49 -0
  22. package/dist/document-evidence.js +501 -0
  23. package/dist/document-integrate.d.ts +35 -0
  24. package/dist/document-integrate.js +89 -0
  25. package/dist/document-interactive.d.ts +69 -0
  26. package/dist/document-interactive.js +255 -0
  27. package/dist/document-locale.d.ts +31 -0
  28. package/dist/document-locale.js +59 -0
  29. package/dist/document-markdown.d.ts +13 -0
  30. package/dist/document-markdown.js +39 -0
  31. package/dist/document-scan.d.ts +21 -0
  32. package/dist/document-scan.js +151 -0
  33. package/dist/document-schema.d.ts +87 -0
  34. package/dist/document-schema.js +88 -0
  35. package/dist/explain-cmd.d.ts +5 -0
  36. package/dist/explain-cmd.js +123 -0
  37. package/dist/index.d.ts +808 -0
  38. package/dist/index.js +569 -0
  39. package/dist/locale-check.d.ts +106 -0
  40. package/dist/locale-check.js +737 -0
  41. package/dist/locale-cmd.d.ts +5 -0
  42. package/dist/locale-cmd.js +443 -0
  43. package/dist/locale-delivery.d.ts +298 -0
  44. package/dist/locale-delivery.js +444 -0
  45. package/dist/locale-router.d.ts +207 -0
  46. package/dist/locale-router.js +508 -0
  47. package/dist/locale-runtime.d.ts +406 -0
  48. package/dist/locale-runtime.js +542 -0
  49. package/dist/locale-schema.d.ts +9 -0
  50. package/dist/locale-schema.js +10 -0
  51. package/dist/locale-tooling.d.ts +118 -0
  52. package/dist/locale-tooling.js +358 -0
  53. package/dist/log.d.ts +19 -0
  54. package/dist/log.js +42 -0
  55. package/dist/packages.d.ts +27 -0
  56. package/dist/packages.js +147 -0
  57. package/dist/plugin-host.d.ts +30 -0
  58. package/dist/plugin-host.js +370 -0
  59. package/dist/refactor-cmd.d.ts +8 -0
  60. package/dist/refactor-cmd.js +156 -0
  61. package/dist/resolve.d.ts +25 -0
  62. package/dist/resolve.js +56 -0
  63. package/dist/test-cmd.d.ts +9 -0
  64. package/dist/test-cmd.js +343 -0
  65. package/dist/test-compile.d.ts +2 -0
  66. package/dist/test-compile.js +3 -0
  67. package/dist/test-discover.d.ts +2 -0
  68. package/dist/test-discover.js +3 -0
  69. package/dist/test-logic.d.ts +2 -0
  70. package/dist/test-logic.js +3 -0
  71. package/dist/test-protocol.d.ts +2 -0
  72. package/dist/test-protocol.js +3 -0
  73. package/dist/watch-diff.d.ts +17 -0
  74. package/dist/watch-diff.js +56 -0
  75. package/package.json +86 -4
@@ -0,0 +1,406 @@
1
+ /**
2
+ * Fixed negotiation priority (doc 28 §6). Host only supplies candidates.
3
+ * @param {{
4
+ * supportedLocales: string[],
5
+ * defaultLocale: string,
6
+ * routeLocale?: string|null,
7
+ * userChoice?: string|null,
8
+ * preference?: string|null,
9
+ * hostCandidates?: string[],
10
+ * }} input
11
+ */
12
+ export declare function negotiateLocale(input: any): any;
13
+ /**
14
+ * @param {{
15
+ * applicationId: string,
16
+ * deliveryId: string,
17
+ * localeId: string,
18
+ * timeZone: string,
19
+ * calendar?: string,
20
+ * numberingSystem?: string,
21
+ * direction?: string,
22
+ * generation?: number,
23
+ * }} opts
24
+ */
25
+ export declare function buildApplicationContext(opts: any): {
26
+ schema: string;
27
+ applicationId: any;
28
+ deliveryId: any;
29
+ localeId: any;
30
+ timeZone: any;
31
+ calendar: any;
32
+ numberingSystem: any;
33
+ direction: any;
34
+ generation: any;
35
+ };
36
+ /**
37
+ * @param {ReturnType<typeof buildApplicationContext>} app
38
+ * @param {{ currency?: string }} [opts]
39
+ */
40
+ export declare function buildFormatterContext(app: any, opts?: {}): {
41
+ schema: string;
42
+ localeId: any;
43
+ timeZone: any;
44
+ calendar: any;
45
+ numberingSystem: any;
46
+ currency: any;
47
+ formatterDataVersion: string;
48
+ };
49
+ /**
50
+ * Stable digest for Resume / SSR↔client parity.
51
+ * @param {ReturnType<typeof buildFormatterContext>} formatter
52
+ */
53
+ export declare function formatterContextDigest(formatter: any): string;
54
+ /**
55
+ * Server must not read machine locale/timezone defaults.
56
+ * @param {ReturnType<typeof buildFormatterContext>} formatter
57
+ * @param {{ allowMachineDefault?: boolean }} [opts]
58
+ */
59
+ export declare function validateFormatterContext(formatter: any, opts?: {}): {
60
+ ok: boolean;
61
+ diagnostics: any[];
62
+ };
63
+ /**
64
+ * Resolve one MessageBinding to a single locale variant (whole-message, no mix).
65
+ * @param {{
66
+ * messageId: string,
67
+ * requestedLocale: string,
68
+ * variants: Record<string, { template: string }>,
69
+ * fallback?: Record<string, string[]>,
70
+ * }} input
71
+ */
72
+ export declare function resolveMessageVariant(input: any): {
73
+ schema: string;
74
+ messageId: any;
75
+ requestedLocale: any;
76
+ resolvedLocale: any;
77
+ fallbackPath: any[];
78
+ template: any;
79
+ ok: boolean;
80
+ };
81
+ /**
82
+ * Minimal ICU MessageFormat subset for I2 parity proofs (params + plural + #).
83
+ * @param {string} template
84
+ * @param {Record<string, any>} [args]
85
+ */
86
+ export declare function formatMessageTemplate(template: any, args?: {}): string;
87
+ /**
88
+ * @param {{
89
+ * applicationId: string,
90
+ * deliveryId: string,
91
+ * supportedLocales: string[],
92
+ * defaultLocale: string,
93
+ * fallback?: Record<string, string[]>,
94
+ * directions?: Record<string, string>,
95
+ * messages: Record<string, { variants: Record<string, { template: string }> }>,
96
+ * initialLocaleId: string,
97
+ * timeZone: string,
98
+ * generation?: number,
99
+ * loadedChunks?: Set<string>|string[],
100
+ * }} opts
101
+ */
102
+ export declare function createLocaleSession(opts: any): {
103
+ negotiateLocale: typeof negotiateLocale;
104
+ snapshot: () => {
105
+ applicationContext: {
106
+ schema: string;
107
+ applicationId: any;
108
+ deliveryId: any;
109
+ localeId: any;
110
+ timeZone: any;
111
+ calendar: any;
112
+ numberingSystem: any;
113
+ direction: any;
114
+ generation: any;
115
+ };
116
+ formatterContext: {
117
+ schema: string;
118
+ localeId: any;
119
+ timeZone: any;
120
+ calendar: any;
121
+ numberingSystem: any;
122
+ currency: any;
123
+ formatterDataVersion: string;
124
+ };
125
+ formatterDigest: string;
126
+ loadedChunks: unknown[];
127
+ generation: any;
128
+ };
129
+ renderAll: (argMap?: {}) => {
130
+ bindings: {};
131
+ resolvedLocales: any[];
132
+ };
133
+ transition: (targetLocaleId: any, transitionOpts?: {}) => Promise<{
134
+ schema: string;
135
+ status: string;
136
+ fromLocale: any;
137
+ toLocale: any;
138
+ reason: string;
139
+ diagnostics: {
140
+ code: string;
141
+ severity: string;
142
+ message: string;
143
+ }[];
144
+ snapshot: {
145
+ applicationContext: {
146
+ schema: string;
147
+ applicationId: any;
148
+ deliveryId: any;
149
+ localeId: any;
150
+ timeZone: any;
151
+ calendar: any;
152
+ numberingSystem: any;
153
+ direction: any;
154
+ generation: any;
155
+ };
156
+ formatterContext: {
157
+ schema: string;
158
+ localeId: any;
159
+ timeZone: any;
160
+ calendar: any;
161
+ numberingSystem: any;
162
+ currency: any;
163
+ formatterDataVersion: string;
164
+ };
165
+ formatterDigest: string;
166
+ loadedChunks: unknown[];
167
+ generation: any;
168
+ };
169
+ rendered?: undefined;
170
+ } | {
171
+ schema: string;
172
+ status: string;
173
+ fromLocale: any;
174
+ toLocale: any;
175
+ reason: string;
176
+ diagnostics: any[];
177
+ snapshot: {
178
+ applicationContext: {
179
+ schema: string;
180
+ applicationId: any;
181
+ deliveryId: any;
182
+ localeId: any;
183
+ timeZone: any;
184
+ calendar: any;
185
+ numberingSystem: any;
186
+ direction: any;
187
+ generation: any;
188
+ };
189
+ formatterContext: {
190
+ schema: string;
191
+ localeId: any;
192
+ timeZone: any;
193
+ calendar: any;
194
+ numberingSystem: any;
195
+ currency: any;
196
+ formatterDataVersion: string;
197
+ };
198
+ formatterDigest: string;
199
+ loadedChunks: unknown[];
200
+ generation: any;
201
+ };
202
+ rendered: {
203
+ bindings: {};
204
+ resolvedLocales: any[];
205
+ };
206
+ }>;
207
+ readonly applicationContext: {
208
+ schema: string;
209
+ applicationId: any;
210
+ deliveryId: any;
211
+ localeId: any;
212
+ timeZone: any;
213
+ calendar: any;
214
+ numberingSystem: any;
215
+ direction: any;
216
+ generation: any;
217
+ };
218
+ readonly formatterContext: {
219
+ schema: string;
220
+ localeId: any;
221
+ timeZone: any;
222
+ calendar: any;
223
+ numberingSystem: any;
224
+ currency: any;
225
+ formatterDataVersion: string;
226
+ };
227
+ readonly formatterDigest: string;
228
+ };
229
+ /**
230
+ * SSR and client must share the same resolved FormatterContext digest and texts.
231
+ * @param {{
232
+ * ssr: { localeId: string, formatterDigest: string, formatterDataVersion?: string, texts: Record<string, string> },
233
+ * client: { localeId: string, formatterDigest: string, formatterDataVersion?: string, texts: Record<string, string> },
234
+ * }} input
235
+ */
236
+ export declare function checkSsrClientParity(input: any): {
237
+ schema: string;
238
+ status: string;
239
+ kind: string;
240
+ diagnostics: any[];
241
+ };
242
+ /**
243
+ * Aggregate I2 runtime proof for a project check report + explicit contexts.
244
+ * @param {{
245
+ * manifest: { defaultLocale: string, locales: Array<{id:string,direction?:string}>, fallback?: Record<string,string[]> },
246
+ * messages: Array<{ messageId: string, variants: Record<string, { template: string }> }>,
247
+ * applicationId?: string,
248
+ * deliveryId?: string,
249
+ * timeZone?: string,
250
+ * }} input
251
+ */
252
+ export declare function checkLocaleRuntime(input: any): {
253
+ schema: string;
254
+ status: string;
255
+ negotiatedLocale: any;
256
+ applicationContext: {
257
+ schema: string;
258
+ applicationId: any;
259
+ deliveryId: any;
260
+ localeId: any;
261
+ timeZone: any;
262
+ calendar: any;
263
+ numberingSystem: any;
264
+ direction: any;
265
+ generation: any;
266
+ };
267
+ formatterContext: {
268
+ schema: string;
269
+ localeId: any;
270
+ timeZone: any;
271
+ calendar: any;
272
+ numberingSystem: any;
273
+ currency: any;
274
+ formatterDataVersion: string;
275
+ };
276
+ formatterDigest: string;
277
+ formatterDataVersion: string;
278
+ diagnostics: any[];
279
+ session: {
280
+ negotiateLocale: typeof negotiateLocale;
281
+ snapshot: () => {
282
+ applicationContext: {
283
+ schema: string;
284
+ applicationId: any;
285
+ deliveryId: any;
286
+ localeId: any;
287
+ timeZone: any;
288
+ calendar: any;
289
+ numberingSystem: any;
290
+ direction: any;
291
+ generation: any;
292
+ };
293
+ formatterContext: {
294
+ schema: string;
295
+ localeId: any;
296
+ timeZone: any;
297
+ calendar: any;
298
+ numberingSystem: any;
299
+ currency: any;
300
+ formatterDataVersion: string;
301
+ };
302
+ formatterDigest: string;
303
+ loadedChunks: unknown[];
304
+ generation: any;
305
+ };
306
+ renderAll: (argMap?: {}) => {
307
+ bindings: {};
308
+ resolvedLocales: any[];
309
+ };
310
+ transition: (targetLocaleId: any, transitionOpts?: {}) => Promise<{
311
+ schema: string;
312
+ status: string;
313
+ fromLocale: any;
314
+ toLocale: any;
315
+ reason: string;
316
+ diagnostics: {
317
+ code: string;
318
+ severity: string;
319
+ message: string;
320
+ }[];
321
+ snapshot: {
322
+ applicationContext: {
323
+ schema: string;
324
+ applicationId: any;
325
+ deliveryId: any;
326
+ localeId: any;
327
+ timeZone: any;
328
+ calendar: any;
329
+ numberingSystem: any;
330
+ direction: any;
331
+ generation: any;
332
+ };
333
+ formatterContext: {
334
+ schema: string;
335
+ localeId: any;
336
+ timeZone: any;
337
+ calendar: any;
338
+ numberingSystem: any;
339
+ currency: any;
340
+ formatterDataVersion: string;
341
+ };
342
+ formatterDigest: string;
343
+ loadedChunks: unknown[];
344
+ generation: any;
345
+ };
346
+ rendered?: undefined;
347
+ } | {
348
+ schema: string;
349
+ status: string;
350
+ fromLocale: any;
351
+ toLocale: any;
352
+ reason: string;
353
+ diagnostics: any[];
354
+ snapshot: {
355
+ applicationContext: {
356
+ schema: string;
357
+ applicationId: any;
358
+ deliveryId: any;
359
+ localeId: any;
360
+ timeZone: any;
361
+ calendar: any;
362
+ numberingSystem: any;
363
+ direction: any;
364
+ generation: any;
365
+ };
366
+ formatterContext: {
367
+ schema: string;
368
+ localeId: any;
369
+ timeZone: any;
370
+ calendar: any;
371
+ numberingSystem: any;
372
+ currency: any;
373
+ formatterDataVersion: string;
374
+ };
375
+ formatterDigest: string;
376
+ loadedChunks: unknown[];
377
+ generation: any;
378
+ };
379
+ rendered: {
380
+ bindings: {};
381
+ resolvedLocales: any[];
382
+ };
383
+ }>;
384
+ readonly applicationContext: {
385
+ schema: string;
386
+ applicationId: any;
387
+ deliveryId: any;
388
+ localeId: any;
389
+ timeZone: any;
390
+ calendar: any;
391
+ numberingSystem: any;
392
+ direction: any;
393
+ generation: any;
394
+ };
395
+ readonly formatterContext: {
396
+ schema: string;
397
+ localeId: any;
398
+ timeZone: any;
399
+ calendar: any;
400
+ numberingSystem: any;
401
+ currency: any;
402
+ formatterDataVersion: string;
403
+ };
404
+ readonly formatterDigest: string;
405
+ };
406
+ };